Share via


WIN32_WINNT_VERSION

Use the WIN32_WINNT_VERSION macro to specify the operating system (OS) version of the content within the Windows Driver Kit (WDK) header files and libraries that your driver supports.

Starting with the Windows Vista version of the WDK, header files in the WDK contain conditional statements that specify contents that are unique to each version of the Windows operating system. The versioned information includes function definitions, structure definitions, and fields within structures.

To specify the content for each OS version, the header files contain preprocessor conditionals that compare the value of _WIN32_WINNT_VERSION with a set of predefined _WIN32_WINNT_XXX constant values.

The Build process sets the _WIN32_WINNT_VERSION compile-time macro with the value of the WIN32_WINNT_VERSION macro.

By default, the Build process sets the WIN32_WINNT_VERSION macro to the highest version of the operating system that is supported by the WDK. For example, in the Windows 7 version of the WDK, the Build process sets the WIN32_WINNT_VERSION to _WIN32_WINNT_WIN7 (0x0601).

You can override this default by setting the WIN32_WINNT_VERSION macro in your Sources file to the maximum OS version that your driver supports.

For more information about the _WIN32_WINNT_VERSION and the _WIN32_WINNT_XXX constant values, see Using the Windows Headers in the Microsoft Windows Software Development Kit (SDK) documentation.

The _WIN32_WINNT_XXX constants are declared in the Sdkddkver.h file.

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011