Get desktop path . if you please fix it.

 
.
.
.
   string szPath;
   SHGetFolderPathW(NULL,0 /*"%USERPROFILE%\\Desktop*" */ /*CSIDL_DESKTOPDIRECTORY*/, NULL, /*0*/ "%USERPROFILE%\\Desktop*" /*FOLDERID_Desktop*/, szPath);
   string Desktop=szPath;
   Print(" Desktop=",Desktop);
//----------------------------------------------------------------------------------------------------------//

}

#import "Shell32.dll"
bool SHGetSpecialFolderPathW(int   hwnd,string pszPath,int    csidl,bool   fCreate);
bool SHGetFolderPathW(int   hwnd,int    csidl,int hToken,string  dwFlags,string pszPath);
#import
Files:
Capture8.JPG  36 kb
 

hi.

I want to get the  desktop address .

i try with above dll.

but have problem.


i want get automatically ,  the path of desktop folder , for active windows user logined.