VC 判断操作系统版本
CString OSVer()
{
OSVERSIONINFOEX os;
::ZeroMemory(&os,sizeof(os));
os.dwOSVersionInfoSize=sizeof(os);
::GetVersionEx(reinterpret_cast<LPOSVERSIONINFO>(&os));
if(os.dwPlatformId==VER_PLATFORM_WIN32_NT && os.dwMajorVersion >=5)
{
if(os.dwMinorVersion==0)
return "Win2000";
else
return "WinXP";
}
if(os.dwPlatformId ==VER_PLATFORM_WIN32_WINDOWS)
return "Win9x";
}