Checking the definition of "WINVER" at compile time is one method that driver writers use to conditionally compile their code depending on the target platform. Long-time NT driver writers traditionally don't rely on this symbol, mostly because it was always set to 0x400 for Windows NT V3.1 through Windows NT V4.
In the Windows XP DDK, as well as the Windows .NET Beta 3 DDK, the value for WINVER is set to 0x501, even in the Win2K build environments. This is a bug, and has been corrected for future releases of the DDK after .NET Beta 3. Developers should carefully check to ensure that their drivers, as well as any public include files their drivers may reference, do not rely on the definition of WINVER.
An alternative to WINVER for conditional compilation tests in your driver, is to use the definitions VER_PRODUCTBUILD found in ntverp.h -- These reliably indicate the product's build number on any version of Windows.