It sounds like your code neglected to include the necessary header files that declare the function and related constants. The documentation at https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha mentions Shlobj.h and Shlobj_core.h
SHGetFolderPath : undeclare identifier in vc++ 6.0 project
Sunny Thiyam
0
Reputation points
I have VC++ 6.0 project and I use the below statement in the code
SHGetFolderPath(NULL, CSIDL_COMMON_DOCUMENTS , NULL, SHGFP_TYPE_CURRENT, szFolderPath);
While giving a build to solution, I found the below errors.
'SHGetFolderPath' : undeclared identifier
'CSIDL_COMMON_DOCUMENTS' : undeclared identifier
'SHGFP_TYPE_CURRENT' : undeclared identifier
Note: CV++ 6.0 is installed on windows 10 operating system.
Kindly provide me solution for the above issue.
Regards,
Sunny