VC++ 获取windows系统的版本类型
2018-01-29 11:30
645 查看
转载自:https://www.cnblogs.com/JczmDeveloper/p/3513849.html
vc中获取windows版本信息,一般是调用GetVersionEx 这个API函数来获取的,这个API需要OSVERSIONINFOEX 这个结构体作为参数,OSVERSIONINFOEX 的对应的具体的OS版本类型详细如下:
本人就获取 windows xp,vista,win8 ,win8.1 等系统版本信息 写了个函数,实现如下:
vc中获取windows版本信息,一般是调用GetVersionEx 这个API函数来获取的,这个API需要OSVERSIONINFOEX 这个结构体作为参数,OSVERSIONINFOEX 的对应的具体的OS版本类型详细如下:
Operating system | Version number | dwMajorVersion | dwMinorVersion | Other |
---|---|---|---|---|
Windows 8.1 | 6.3* | 6 | 3 | OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION |
Windows Server 2012 R2 | 6.3* | 6 | 3 | OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION |
Windows 8 | 6.2 | 6 | 2 | OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION |
Windows Server 2012 | 6.2 | 6 | 2 | OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION |
Windows 7 | 6.1 | 6 | 1 | OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION |
Windows Server 2008 R2 | 6.1 | 6 | 1 | OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION |
Windows Server 2008 | 6.0 | 6 | 0 | OSVERSIONINFOEX.wProductType != VER_NT_WORKSTATION |
Windows Vista | 6.0 | 6 | 0 | OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION |
Windows Server 2003 R2 | 5.2 | 5 | 2 | GetSystemMetrics(SM_SERVERR2) != 0 |
Windows Home Server | 5.2 | 5 | 2 | OSVERSIONINFOEX.wSuiteMask & VER_SUITE_WH_SERVER |
Windows Server 2003 | 5.2 | 5 | 2 | GetSystemMetrics(SM_SERVERR2) == 0 |
Windows XP Professional x64 Edition | 5.2 | 5 | 2 | (OSVERSIONINFOEX.wProductType == VER_NT_WORKSTATION) && (SYSTEM_INFO.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64) |
Windows XP | 5.1 | 5 | 1 | Not applicable |
Windows 2000 | 5.0 | 5 | 0 | Not applicable |
* For applications that have been manifested for Windows 8.1. Applications not manifested for 8.1 will return the Windows 8 OS version value (6.2). To |
相关文章推荐
- VC++ 获取windows系统的版本类型
- 获取windows系统版本信息
- vc 取windows系统信息 版本 cpu信息 内存信息 ie版本信息 office版本
- windows平台下 c++获取 系统版本 网卡 内存 CPU 硬盘 显卡信息<转>
- js获取浏览器内核、类型、版本以及系统类型
- windows驱动获取系统版本信息 PsGetVersion RtlGetVersion
- VC++ -- 如何获取windows系统的串口号加载到combo box控件中
- vc 获取系统版本
- Android获取系统的硬件信息、系统版本以及如何检测ROM类型
- 获取Windows系统版本信息
- vc 取windows系统信息 版本 cpu信息 内存信息 ie版本信息 office版本
- 获取windows系统的版本名称
- Android获取系统的硬件信息、系统版本以及如何检测ROM类型
- MFC 获取系统类型及版本
- windows平台下 c++获取 系统版本 网卡 内存 CPU 硬盘 显卡信息
- 获取当前windows系统 及 版本
- VC++获取不同Windows版本的方法
- VC++获取不同Windows版本的方法
- 获取IOS设备的类型和系统版本
- 安卓获取设备的系统类型,系统版本,手机生产厂商和手机型号