Dann darfste jetzt von mir klauenThorsten1867 hat geschrieben: Ich glaube, dass habe ich aus JaPBe 'geklaut' und für meine Zwecke abgeändert.

Code: Alles auswählen
Procedure.s GetDesktopDir()
Protected *itemid.ITEMIDLIST
Protected location.s = Space(#MAX_PATH)
If SHGetSpecialFolderLocation_ (0, #CSIDL_DESKTOP, @*itemid) = #NOERROR
If SHGetPathFromIDList_(*itemid, @location)
If Right(location, 1) <> "" : location + "" : EndIf
ProcedureReturn location
EndIf
EndIf
EndProcedure