What Is Winver

What is WINVER?

WINVER determines the minimum platform SDK required to build your application, which in turn will determine at compile time which routines are found by the headers.

You can use this to verify, at compile time, that your application will work on Windows 2000 (0x0500), for example, or on Windows XP (0x0501).

MSDN's page on Modifying WINVER and _WIN32_WINNT goes into this in more detail.

what is WINVER 0x501? RegisterDeviceNotification errors without it

The primary purpose of definitions like WINVER is to compile old code with recent compilers.

If you are writing new code, you need to define this variable and maybe several others in your cpp file or in your project file. The value is the version of Windows that you are targeting. This is how Microsoft designed it.

It is extremely bad practice to duplicate system definitions into your code.

Version of Windows (Winver vs sysinfo)

"Windows 10 is Windows 10 is Windows 10" is the intention, but of course in practice if Microsoft releases two copies of the OS a year there's going to be a lot of versions.
As such, the different releases of Windows 10 have acquired a number of ways they are referred to for marketing, technical-support, developer dependencies, etc.

Your operating system's "version number" as a classic four-digit value is 10.0.17134.345. That is major number 10, minor number 0, build 17134. The last value is used for QFEs and minor servicing fixes between releases. Those in the know can match up the version build numbers with releases, but generally this version is for technical people only.

Each release also has a "user-friendly" version which is a year-month release version. In this case "Version 1803" means the March 2018 release. This is the "version" used most-often when asking non-technical folks about which Windows 10 they have installed on a particular machine.

There have also been various 'marketing names' used for each release and the scheme for it changes every few years. Your release is known as the "Windows 10 April 2018 Update"

Yes, it is almost always the case that the year-month encoded as the "user-friendly" version is a month before the "marketing name" because of the time between declaring the build final and the official release date.

And to make it even more fun, each release had a codename so people in the technical press often refer to them as "Redstone 4" or whatever before the official marketing name is used. For example, the next release of Windows is commonly referred to as "20H1" for the Insider Program.

So to put it all together, here are the different official releases of Windows 10 to date--not including the many, many Insider builds:

Windows 10 November 2019 Update   Version 1909    10.0.18363    "19H2"
Windows 10 May 2019 Update Version 1903 10.0.18362 "19H1"
Windows 10 October 2018 Update Version 1809 10.0.17763 "Redstone 5"
Windows 10 April 2018 Update Version 1803 10.0.17134 "Redstone 4"
Windows 10 Fall Creators Update Version 1709 10.0.16299 "Redstone 3"
Windows 10 Creators Update Version 1703 10.0.15063 "Redstone 2"
Windows 10 Anniversary Update Version 1607 10.0.14393 "Redstone 1"
Windows 10 November 2015 Version 1511 10.0.10586 "Threshold 2"
Windows 10 10.0.10240 "Threshold"

In practice, most people are all on one of the most recent two--the most recent release is still being rolled out--, although a number of specific systems are stuck at 10.0.14393 due to a lack of support from the manufacturer.

UPDATED: Updated table of releases March 2020

Visual Studio setting WINVER/_WIN32_WINNT to Windows 8 on Windows 7?

The problem is (1) Microsoft marketing literature states VS2012 on Windows 7 is a supported configuration; but (2) Microsoft engineers state its not a supported configuration on MSDN Community Support. The minimum platform required is Windows 8.

MFC does not support WINVER less than 0x0501

All MFC apps define the WINVER macro value somewhere if you didn't define it yourself. I assume MS has removed the definition by default on its own header files and is now making mandatory that you explicitly define it.

So, to solve your problem, either put the #define in your 'preprocessor' compiler options, or at the top of your precompiled header (ie stdafx.h).

Note 0x501 is Windows XP support. 0x600 is Vista, 0x601 is Windows 7 — and how sad am I for remembering that!

How does WINVER or WIN32_WINNT affect operating system version as shown by dumpbin

The value of the "operating system version" field is set by LINK /SUBSYSTEM.

As an aside, the LINK /VERSION switch updates the "image version" field.



Related Topics



Leave a reply



Submit