IsWindows10OrGreater()可以在早期版本的OS上运行吗? [英] Can IsWindows10OrGreater() be run on earlier versions of the OS?

查看:433
本文介绍了IsWindows10OrGreater()可以在早期版本的OS上运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据
文档
,没有。但是,要求Windows 10检测Windows 10是否正在运行是没有意义的。 - Michael Haephrati,Secured Globe,Inc。www.securedglobe.com



Michael Haephrati

According to the documentation, no. However it doesn't make sense that Windows 10 is required to detect whether Windows 10 is running. - Michael Haephrati, Secured Globe, Inc. www.securedglobe.com


Michael Haephrati

推荐答案

实际上,文档有点误导。

Actually, the documentation is a little misleading.

8.1 SDK中包含的VersionHelpers.h标头不包含该功能。 但是,它包含在同名的Win 10 SDK标头中以及相关的常量(_WIN32_WINNT_WINTHRESHOLD)。 因为内联函数只需要
,所以只需要调用  VerifyVersionInfo我看不出为什么使用Win 10 SDK构建的应用程序无法在Win 10之前的Windows版本上调用它的任何原因。 实际上,在Win7系统上,IsWindows10rGreater按预期返回FALSE。

The VersionHelpers.h header included in the 8.1 SDK does not include the function.  However, it is included in the Win 10 SDK header of the same name along with the related constant (_WIN32_WINNT_WINTHRESHOLD).  And since the inline function does nothing more than call  VerifyVersionInfo I can't see any reason why an app built with the Win 10 SDK can't call it on Windows versions older than Win 10.  In fact, on a Win7 system, IsWindows10rGreater returned FALSE, as expected.


这篇关于IsWindows10OrGreater()可以在早期版本的OS上运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆