471,089 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,089 software developers and data experts.

shellspi.h not compiling

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
1 3658
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.

Similar topics

2 posts views Thread by Rudy Ray Moore | last post: by
1 post views Thread by Jim Heavey | last post: by
10 posts views Thread by Christina N | last post: by
2 posts views Thread by Justin Naidl | last post: by
reply views Thread by =?Utf-8?B?amVmZmVyeQ==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.