vc怎么判断当前运行的系统是windows7还是windowsXP
1个回答
展开全部
dwVersion = GetVersion();
// Get the Windows version.
dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion)));
dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion)));
// Get the build number.
if (dwVersion < 0x80000000) // Windows NT/2000/XP
dwBuild = (DWORD)(HIWORD(dwVersion));
else if (dwWindowsMajorVersion < 4) // Win32s
dwBuild = (DWORD)(HIWORD(dwVersion) & ~0x8000);
else // Windows 95/98/Me
dwBuild = 0;
vista好像是6.0.win7我不太清楚,你自己获取后看下值是多少吧
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询