关于Version Helper functions判断WINDOWS版本的有关问题
关于Version Helper functions判断WINDOWS版本的问题
在VS2013中,用GetVersionEx判断系统版本会提示警告。怎么用Version Helper functions判断当前系统是95或者98,请大家帮帮忙。
------解决方案--------------------
上面的API定义掉了,用下面的。
在VS2013中,用GetVersionEx判断系统版本会提示警告。怎么用Version Helper functions判断当前系统是95或者98,请大家帮帮忙。
------解决方案--------------------
上面的API定义掉了,用下面的。
typedef LONG(WINAPI * _pfuncGetVersionExW)(
LPOSVERSIONINFOW lpVersionInformation
);
void Test(){
HMODULE hkernel = GetModuleHandle("kernel32.dll");
if(hkernel)
{
_pfuncGetVersionExW pGetVersionfunc = (_pfuncGetVersionExW)GetProcAddress(hkernel, "GetVersionExW");
if(pGetVersionfunc )
{
//pGetVersionfunc(...);
}
}
}