ServProv.h problem for first time Win32 API user
Hello chaps.
I decided to have a go at using the Win API. Long time C++ coder, first time coding the Win API. I banged out some lines.
#include <windows.h>
int main (void)
{
return 0;
}
Result: No dice. An error tucked away in ServProv.h, apparently. Seemed odd, so I wrote this:
#include <ServProv.h>
int main (void)
{
return 0;
}
Same errors;
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\ServProv.h(113): warning C4094: untagged
'struct' declared no symbols
c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\PlatformSDK\Include\ServProv.h(106): error C2283:
'__unnamed::QueryService' : pure specifier not allowed on unnamed struct
Since I'm doing nothing other than including a standard header file, I must be really, REALLY missing the point here. Could someone please enlighten me as to what I'm doing wrong?
Inbugable, hive mind extraordinaire.
[1078 byte] By [
inbugable] at [2007-11-20 9:55:45]

# 1 Re: ServProv.h problem for first time Win32 API user
Since I'm doing nothing other than including a standard header file, [...]
Really, really nothing else?...
Not even somenting like for example setting /Za compiler option? (Disable Language Extensions (http://msdn2.microsoft.com/en-us/library/0k0w269d(VS.80).aspx)).
I don't think so... ;)
# 2 Re: ServProv.h problem for first time Win32 API user
Really, really nothing else?...
Not even somenting like for example setting /Za compiler option? (Disable Language Extensions (http://msdn2.microsoft.com/en-us/library/0k0w269d(VS.80).aspx)).
I don't think so... ;)
Turned out to be a corrupt ServProv.h file, containing an abstract class with a pure virtual function in it (by virtue of missing a statement indicating the class name and what it inherited from). I copied ServProv.h from another machine and all was well.
I do think so ;)
# 3 Re: ServProv.h problem for first time Win32 API user
Hello chaps.
I decided to have a go at using the Win API. Long time C++ coder, first time coding the Win API. I banged out some lines.
#include <windows.h>
int main (void)
{
return 0;
}
By the way, Win API programmers tend to use WinMain instead of main.
http://msdn2.microsoft.com/en-us/library/ms633559.aspx