3 #if defined(WIN32) || defined(_WINDOWS)
6 GetSpecialDir(char *dst
, size_t size
, int whichDir
)
10 char path
[MAX_PATH
+ 1];
14 hResult
= SHGetMalloc(&shl
);
15 if (SUCCEEDED(hResult
)) {
16 hResult
= SHGetSpecialFolderLocation(
22 if (SUCCEEDED(hResult
)) {
23 if(SHGetPathFromIDList(idl
, path
)) {
24 (void) strncpy(dst
, path
, size
- 1);