473,625 Members | 2,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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
'DragAcceptFile s'
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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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
'CommandLineToA rgvW'
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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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_IMPOR T'
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 3919
Thanks!!!

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

Oct 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2060
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html Unfortunately the binary for Python-2.4 isn't available yet and I'd hate to step back to a previous version. I'm glad I managed to set up my XP machine to being able to compile extensions using the VC++ toolkit which freely availbale from MS. See
3
3634
by: modemer | last post by:
Hello, I got weird compiling message similar like following when I compiled my simple code on Sun 5.8 with CC WorkShop 6 update 2 C++ 5.3. CC -g -o myclass.o -c myclass.cpp CC -g -o main.o -c main.cpp CC -g -L/usr/lib -lsocket -lnsl -o main myclass.o main.o __1cH__rwstdJ__rb_tree4CpknJmyclassHCSOCKET_nDstdEpair4Ck4n0BNCSOCKEVENTMGRJ SOCKEVENT___n0AL__select1st4n0G_C4__n0DEless4C4__n0DJallocator4n0G____Efind6
0
3053
by: David W. Fenton | last post by:
Today I was working on a hideous old app that I created a long time ago that does a lot of showing/hiding/resizing of fields on one of the forms. I had used constants to store reference values for many of the top/height/left settings. I noticed that some of the constants were defined by using other constant values, and I was impressed that VBA could do that. Here's an example: Const row1Top = 1.0208 * 1440 ' top of first row Const...
4
11339
by: Aaron Queenan | last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the following error message: Linking... LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport LINK : error LNK2020: unresolved token (0A000007) memset LINK : error LNK2020: unresolved token (0A000008) free LINK : error LNK2020: unresolved token (0A00000A) atexit LINK : error LNK2020: unresolved token (0A000028) wcscpy LINK : error LNK2020: unresolved...
2
1862
by: Rudy Ray Moore | last post by:
Hi guys, I just upgraded to "Visual Studio .net 2003 7.1 c++" from VS6. Some things I like (proper for loop variable scoping, for example), but some other things are troubling me. One annoying behavior is that the text editor often "hangs" (doesn't let me type) while compiling. Is there a way to fix this so it behaves more like VS6 (editor does not hang while compiling)?
1
1899
by: Jim Heavey | last post by:
Hello, trying to round out my knowlege here about compiling. To date I have used VS.Net to do all my compiling "majically", but I want to understand how to do it on my own, should the need ever arrise. It has been suggested to me that I should use the following pattern when compiling my programs, but I am not sure I understand the "pattern", Try creating a text file along the following lines where the /r are the dlls you are...
10
2183
by: Christina N | last post by:
When compiling my ASP.Net application, VS puts the new DLL under the local cached directory 'VSWebCache' in stead of on the server. How can I make it save the DLL file on the server when compiling? I have opened the source code project through 'File - Open - Open project from web..' Best regards, Christina
2
1948
by: Justin Naidl | last post by:
A group of friends and I are doing a RPG (role-playing game) maker for a school project. It occured to us, however, that if you want the user to be able to have almost complete control over the contents of his/her game, that you would end up with a tiny executable and a huge datafile. We wanted to keep clear of this as disk accesses take a lot of time to do and there would be a huge load of them to do this part. We could very easily...
0
1377
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help compiling code dynamically it may involve some reflection so if any one is any good in that field or compiling code this would be a great time to show me what you know. by the way my last weird but serious combo box error i solved my self it was just a simple recompile and some simple code changes and it worked. i will put a link to the code for compiling dynamially here: <a href =...
0
8251
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8688
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1800
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.