本文介绍了什么是WINVER?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在看一些代码,他们有这样的行: #define WINVER 0x0501 stdafx.h ?为什么需要定义 WINVER ?它如何影响你的代码?有人可以解释一下吗?

解决方案

WINVER决定了构建应用程序所需的最低平台SDK,



您可以使用它在编译时验证您的应用程序将在Windows 2000(0x0500)上工作,例如,在Windows XP(0x0501)。

MSDN的更详细。


I was looking at some code and they had this line: #define WINVER 0x0501 in stdafx.h file? Why do you need to define WINVER? How does it affect your code? Can someone please explain?

解决方案

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 How to modify WINVER goes into this in more detail.

这篇关于什么是WINVER?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 17:26