Windows 10 GetVersionEx [英] Windows 10 GetVersionEx

查看:133
本文介绍了Windows 10 GetVersionEx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我们的安装程序中,我们使用带有OSVERSIONINFOEX结构的GetVersionEx来获取Windows版本。

In our installer we're using GetVersionEx with OSVERSIONINFOEX structure to obtain Windows version.

根据MSDN  Windows 10的预期回报值应为dwMajorVersion = 6,dwMinorVersion = 4.

According to the MSDN the expected return values for Windows 10 should be dwMajorVersion=6, dwMinorVersion=4.

在构建  9841 中,它按预期工作。

In the build 9841 it works as expected.

但是在构建 9926 时,我们得到dwMajorVersion = 10,dwMinorVersion = 0.。

But in build 9926 we got dwMajorVersion=10, dwMinorVersion=0.

请告知如何以正确的方式获取Windows版本或者应该为最终的Windows 10版本返回值。此外,我们需要知道新服务器平台的相同信息。

Please advise how to get Windows version in a proper way or what should be return values for final Windows 10 release. Also we need to know the same information for new server platform.

推荐答案

什么是检查版本?它不像微软已经发布了适用于Windows 10的任何新API。 

what is the version checking for ? it is not like Microsoft has released any new API for Windows 10.  

你应该放弃版本检查。没有法律规定微软不能将功能向后移植到旧版本的Windows
(GDI +,IE,WIC等),或者用户/欧盟反垄断机构无法添加/删除Windows功能/角色。如果您想检查是否存在某些内容,请检查其是否存在。 

And you should move away from version checking. There is no law says Microsoft can't backport a feature to an older version of Windows (GDI+, IE, WIC etc), or the user/the EU antitrust agencies can't add/remove Windows features/roles. If you want to check whether something exists, check for its existence. 


这篇关于Windows 10 GetVersionEx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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