Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have one script in win32 that must search for "Documents" folder in User folder.
How I must code that?
Regards,
Posted

Use SHGetFolderPath passing the CSIDL CSIDL_PERSONAL:
TCHAR lpszPath[_MAX_PATH];
::SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, lpszPath);
 
Share this answer
 
Script?
Aren't you using C++?
However you may use SHGetFolderLocation[^] function.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900