RESOLUTION
To conditionally compile your code (which takes into account the target platform), check the definition of WINVER at compile time. Make sure that you carefully check your drivers, and any public
include files that your drivers may reference, to determine whether these drivers and files rely on the definition of WINVER.
If reliance on WINVER cannot be avoided, you can edit the %BASEDIR%\bin\w2k\set2k.bat file, and then add the following line before any other set commands at the beginning of the file:
set WIN32_WINNT_VERSION=0x0500
For the sake of thoroughness, you may also want to set the value of WIN32_IE_VERSION. Although a particular driver may not rely on this value, Control Panel extensions or software components may. Add the following line immediately after the
set WIN32_WINNT_VERSION=0x0500 line (described in the preceding paragraph of this article):
set WIN32_IE_VERSION=0x0501
As an alternative to WINVER for conditional compilation tests in your driver, use the VER_PRODUCTMAJORVERSION and VER_PRODUCTMINORVERSION definitions found in ntverp.h.