获取Windows版本信息

阿里之家 Brief is beautiful. 性格决定命运,气度影响格局. 万人如海一身藏,拔剑四顾心茫然. << 为何%Processor Time (Process _Total)值能超出100%? | 返回首页 | 本月文章收录 >> 2007年09月27日 获取Windows版本信息 TAG: Programming 1. 调用 API GetVersionEx 获取操作系统版本信息 OSVERSIONINFO : typedef struct _OSVERSIONINFO { DWORD dwOSVersionInfoSize; //The size of this data structure. DWORD dwMajorVersion; //The major version number of the os. DWORD dwMinorVersion; //The minor version number of the os. DWORD dwBuildNumber; //The build number of the os. DWORD dwPlatformId; //The os platform. TCHAR szCSDVersion[128]; //A null-terminated string, such as "Service Pack 3", that indicates the latest SP installed on the system. } OSVERSIONINFO; 2. 访问注册表 "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" 下的项。 Table of Windows Version Numbers Windows OS dwPlatformID dwMajorVersion dwMinorVersion dwBuildNumber 95 1 4 0 950 95 SP1 1 4 0 > 950 && <= 1080 95 OSR2 1 4 < 10 > 1080 98 1 4 10 1998 98 SP1 1 4 10 >1998 && < 2183 98 SE 1 4 10 >= 2183 ME 1 4 90 3000 NT 3.51 2 3 51 1057 NT 4 2 4 0 1381 2000 2 5 0 2195 XP 2 5 1 2600 2003 2 5 2 3790 Vista 2 6 0 6000 Vista SP1/2008 2 6 0 6001 CE 1.0 3 1 0 CE 2.0 3 2 0 CE 2.1 3 2 1 CE 3.0 3 3 0 参考文章 Windows Version History How to determine which 32-bit Windows version is being used How To Determine the Operating System Build Number Detecting the Operating System Version Getting the System Version XWinVer - Simple class to get Windows OS version The 64 bit OS Architecture How to detect programmatically whether you are running on 64-bit Windows xiaoshancom 发表于 10时23分44秒 | 引用 (Trackback 0) | 编辑 评论 发表评论 用户名: E-mail: 地址:

原始快照:web.archive.org