if (WINDOWS_SYSTEM_VER_VISTA32 == version)
{
CString strBuildLabEx;
dwBufSize = MAX_PATH;
if (ERROR_SUCCESS != RegQueryValueEx(hKey, SYSTEM_BUILD_LAB_EX_VAR, NULL, NULL,
(UCHAR*)strBuildLabEx.GetBuffer(MAX_PATH), &dwBufSize))
{
RegCloseKey(hKey);
strBuildLabEx.ReleaseBuffer();
return FALSE;
}
strBuildLabEx.ReleaseBuffer();
if (strBuildLabEx.Find("x86") == -1)
{
version = WINDOWS_SYSTEM_VER_VISTA64;
}
}
RegCloseKey(hKey);
return TRUE;
} 此最后代码可能与具体应用不相关,可参考使用
获取当前系统版本(4)
最新推荐文章于 2021-07-30 23:14:00 发布