Hi All,
The question is at the end.
I have a PCI device + driver, which has to work on both Win-NT and
Win-2K.
I have 2 Drivers : A WDM driver for Win2K, and a Non-WDM driver for
Win-NT.
So, far everything is great.
The 2 drivers has the axact same interface from the application point
of
view. The only difference is in the "CreateFile() method". So,
naturally,
I want to have one DLL for both drivers, and do the CreateFile()
according to the runtime OS version.
This works also very good.
Here comes the problem :
Up until now, I compiled the DLL on Win-2K, and ran it under both OS.
Now, I want to compile this DLL, under Win-NT (I am not expecting to
run this DLL on win-2K). I am expecting to have one code though.
Now the following line does not compile !!!!
"include <initGuid.h>
The file axists, but I get some funny compilation error. Here I do not
care for the GUID (I CreateFile() by the good old NT method), so I
delete
this line and everything works. Remember that I am expecting to have
one
code for the DLL.
I want to do something like:
#if (WINVER > 0x0400)
"include <initGuid.h>
#endif
But for some reason, this does not work: On my Win-2K compilation
machine,
WINVER is also defined to be 0x0400.
***************************
So here comes the question :
How do I figgure out during compilation, which OS version I am
compiling on ?
I want to use some compiler variable.
Thanks
Maurice