What is WINVER?

不问归期 提交于 2019-11-27 14:18:14
Reed Copsey

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.

WINVER defines the minimum Windows system the program can run on. There's a more detailed explanation at MSDN. What #define WINVER 0x0501 means is that the program requires Windows XP or Server 2003 to run, and that it therefore can use Windows functionality up through that release.

WINVER means Windows Version. In a nutshell, if you're building for a particular version of Windows, some APIs are available that are not available on previous versions.

Kirill V. Lyadvinsky

By defining WINVER macro you unhide a set of functions specific to a certain Windows version. For instance, if you define it as #define WINVER 0x0502 you will not able to use TaskDialog which is available only in Windows Vista. For more detail you could read the Using the Windows Headers article in MSDN.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!