![]() |
Desktop Pfad
Hi ihrs
wurde zwar bestimmt schon tausend mal gefragt, mir fehlen aber die ruchtigen Stichpunkte. Weiß jemand wie man den Pfad vom Desktop des angemeldeten/beliebigen benutzers herausfinden kann. Gruß Lars |
Re: Desktop Pfad
OK! Hat sich erledigt!
Delphi-Quellcode:
uses ActiveX, ShlObj; function GetDeskTopPath : string; var shellMalloc: IMalloc; ppidl: PItemIdList; PerDir: string; begin ppidl := nil; try if SHGetMalloc(shellMalloc) = NOERROR then begin SHGetSpecialFolderLocation(Form1.Handle, CSIDL_DESKTOP, ppidl); SetLength(Result, MAX_PATH); if not SHGetPathFromIDList(ppidl, PChar(Result)) then raise exception.create('SHGetPathFromIDList failed : invalid pidl'); SetLength(Result, lStrLen(PChar(Result))); end; finally if ppidl <> nil then shellMalloc.free(ppidl); end; end; |
Re: Desktop Pfad
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz