SHGetFolderLocation() function gives compile time error.
-
Hi all. In my application I am calling a SHGetFolderLocation() function to load a browse Folder dialog. I have included Shlobj.h and also I have added shell32.lib file in Project->Settings->Lib tab. The version of shell32.dll is 6.0.2900.2180. But when I tried to compile a program, it gives me a compile time error " error C2065: 'SHGetFolderLocation' : undeclared identifier " Can anybody help? Thanks
Rakesh Thakur
-
Hi all. In my application I am calling a SHGetFolderLocation() function to load a browse Folder dialog. I have included Shlobj.h and also I have added shell32.lib file in Project->Settings->Lib tab. The version of shell32.dll is 6.0.2900.2180. But when I tried to compile a program, it gives me a compile time error " error C2065: 'SHGetFolderLocation' : undeclared identifier " Can anybody help? Thanks
Rakesh Thakur
Try to
#define _WIN32_IE 0x0500
WhiteSky
-
Hi all. In my application I am calling a SHGetFolderLocation() function to load a browse Folder dialog. I have included Shlobj.h and also I have added shell32.lib file in Project->Settings->Lib tab. The version of shell32.dll is 6.0.2900.2180. But when I tried to compile a program, it gives me a compile time error " error C2065: 'SHGetFolderLocation' : undeclared identifier " Can anybody help? Thanks
Rakesh Thakur
-
Try to
#define _WIN32_IE 0x0500
WhiteSky
Thanks for reply. I tried adding #define _WIN32_IE 0x0500 but didn't worked-out. Thanks
Rakesh Thakur
-
Thanks for reply. I tried adding #define _WIN32_IE 0x0500 but didn't worked-out. Thanks
Rakesh Thakur
Where did you declare
WhiteSky
-
Where did you declare
WhiteSky
In the same file in which I am calling that function.
Rakesh Thakur
-
In the same file in which I am calling that function.
Rakesh Thakur
Do you insert it to
stdafx.h
WhiteSky
-
Do you insert it to
stdafx.h
WhiteSky
Yes I have #include "stdafx.h" #include "shlobj.h" #define _WIN32_IE 0x0500
Rakesh Thakur
-
Yes I have #include "stdafx.h" #include "shlobj.h" #define _WIN32_IE 0x0500
Rakesh Thakur
If you insert this line on StdAfx.h I think it must solve:)
WhiteSky
-
Yes I have #include "stdafx.h" #include "shlobj.h" #define _WIN32_IE 0x0500
Rakesh Thakur
Rakesh_Thakur wrote:
#define _WIN32_IE 0x0500
You must define it before anything else.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Rakesh_Thakur wrote:
#define _WIN32_IE 0x0500
You must define it before anything else.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
Try it like this: #define _WIN32_IE 0x0500 #include "stdafx.h" #include "shlobj.h" If you want, you can put _WIN32_IE=0x500 into the PreProcessor Definitions on the Project Properties page Scott
-
Try it like this: #define _WIN32_IE 0x0500 #include "stdafx.h" #include "shlobj.h" If you want, you can put _WIN32_IE=0x500 into the PreProcessor Definitions on the Project Properties page Scott
Perhaps you meant to respond to Rakesh.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Yes I have #include "stdafx.h" #include "shlobj.h" #define _WIN32_IE 0x0500
Rakesh Thakur
Try it like this: #define _WIN32_IE 0x0500 #include "stdafx.h" #include "shlobj.h" If you want, you can put _WIN32_IE=0x500 into the PreProcessor Definitions on the Project Properties page Scott