通过使用环境API,我们得到了windows的版本。但是对于windows8.1和windows server 2012 R2都显示了6.3。
请建议一些使用环境变量的代码,如何区分它们。
发布于 2015-08-18 20:04:44
检查是否为VER_NT_WORKSTATION == OSversion.wProductType,如果是则为Windows8,如果不是则为server 2012。
请注意,GetVersionEx最多支持windows 8,对于win 8.1或10,您将获得6.2版
https://stackoverflow.com/questions/19789598
复制相似问题