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

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

问题描述

根据 文档,不。但是,Windows 10是否需要检测Windows 10是否正在运行是没有意义的。



我尝试过:



检查 IsWindows10OrGreater功能(Windows) [ ^ ]

According to the documentation, no. However it doesn't make sense that Windows 10 is required to detect whether Windows 10 is running.

What I have tried:

Checking IsWindows10OrGreater function (Windows)[^]

推荐答案

MSDN似乎在这里误导。 IsWindows10OrGreater 需要Windows 10 SDK和(我对此并不完全确定)该应用程序适用于Windows 10.



如果您的应用程序未显示在Windows 10中, IsWindows10OrGreater 将返回 false (或无法正常工作 - 我再次不确定)即使在Windows 10上运行。



你也可以查看 VersionHelpers.h 文件。从Windows 2000开始支持使用的功能。



因此在清单中指定Windows 10时应该可以工作,否则根本不使用。





如果没有在清单中指定Windows 10,则可以使用解决方案来检测Windows 10.但是,这是微软推荐的。

第1部分:克服Windows 8.1对GetVersionEx和GetVersion API的弃用 [ ^ ]

获取操作系统版本信息 - 即使对于Windows 10! [ ^ ]

[/ EDIT]
The MSDN seems to be misleading here. IsWindows10OrGreater requires the Windows 10 SDK and (I'm not absolutely sure with this) that the application is manifested for Windows 10.

If your application is not manifested for Windows 10, IsWindows10OrGreater will return false (or fail to work - I'm again not sure) even when running on Windows 10.

You may also have a look at the VersionHelpers.h file. The used functions are supported since Windows 2000.

So it should work when specifying Windows 10 in the manifest and not used at all otherwise.


When not specifying Windows 10 in the manifest there are solutions to detect Windows 10. However, such is ot recommended by Microsoft.
Part1: Overcoming Windows 8.1's deprecation of GetVersionEx and GetVersion APIs[^]
Getting Operating System Version Info - Even for Windows 10![^]
[/EDIT]


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

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