Desktop-Pfad herausfinden
-
Ich wusste schon, dass das Quatsch ist. Viel zu groß und klobig. Aber es musste einfach sein
-
Belli schrieb:
So geht's für Versionen auch vor XP / 2000:
... LPITEMIDLIST pIdList; char path[MAX_PATH] SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, &pIdList); SHGetPathFromIDList(pIdList, path); ... }
Die Freigabe fehlt noch. Also entweder eine eigene kleine RAII-Klasse schreiben (die bessere Lösung) oder zumindest
LPMALLOC Malloc; SHGetMalloc(&Malloc); if(Malloc) { Malloc->Free(pIdList); Malloc->Release(); }
-
Danke euch allen, es geht jetzt