By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,492 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,492 IT Pros & Developers. It's quick & easy.

shellspi.h not compiling

P: n/a
I tried to compile some code with #include <shellapi.h. I am
linking shell32.lib. I am not trying to use ShellExecute() but right
now just getting the code to compile with the header file an issue. I
am using Visual Basic 2005 (express). I got shellapi.h from the
platform sdk.
Thanks for any help.

here is my error log
1>------ Build started: Project: openFile, Configuration: Debug Win32
------
1>Compiling...
1>openFile.c
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(57) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(57) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(57) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(57) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(58) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(58) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(58) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(58) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(64) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(64) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(64) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(64) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(65) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(65) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(65) : error C2061: syntax error : identifier 'DragFinish'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(65) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(65) : error C2182: 'HDROP' : illegal use of type 'void'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2061: syntax error : identifier
'DragAcceptFiles'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2143: syntax error : missing ')' before ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2182: 'HWND' : illegal use of type 'void'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(66) : error C2182: 'BOOL' : illegal use of type 'void'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2146: syntax error : missing ')' before
identifier 'hwnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2061: syntax error : identifier 'hwnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(68) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2146: syntax error : missing ')' before
identifier 'hwnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2061: syntax error : identifier 'hwnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(69) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2146: syntax error : missing ')' before
identifier 'lpFile'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2061: syntax error : identifier 'lpFile'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(75) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2146: syntax error : missing ')' before
identifier 'lpFile'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2061: syntax error : identifier 'lpFile'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(76) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2143: syntax error : missing '{' before '*'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2061: syntax error : identifier
'CommandLineToArgvW'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2146: syntax error : missing ')' before
identifier 'lpCmdLine'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2061: syntax error : identifier 'lpCmdLine'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(82) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2146: syntax error : missing ')' before
identifier 'hWnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2061: syntax error : identifier 'hWnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(84) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2146: syntax error : missing ')' before
identifier 'hWnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2061: syntax error : identifier 'hWnd'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(85) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2146: syntax error : missing ')' before
identifier 'hInst'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2061: syntax error : identifier 'hInst'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2059: syntax error : ','
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(91) : error C2059: syntax error : ')'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(92) : error C2061: syntax error : identifier
'DECLSPEC_IMPORT'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(92) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(92) : error C2061: syntax error : identifier
'STDAPICALLTYPE'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(92) : error C2059: syntax error : ';'
1>C:\Program Files\Microsoft Visual Studio 8\VC\include
\shellapi.h(92) : fatal error C1003: error count exceeds 100; stopping
compilation
1>Build log was saved at "file://c:\Visual Studio 2005\Projects
\openFile\Debug\BuildLog.htm"
1>openFile - 102 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

Oct 20 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Thanks!!!

I had the windows.h header file listed after shellapi.h. Put it
before and compilation worked perfectly.

Oct 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.