vista与2008的大小版本都是一样的6.0,要区分就要通过wProductType来识别!
if( VerInfoEx.dwMajorVersion == 6 ) { if (VerInfoEx.wProductType == VER_NT_SERVER || VerInfoEx.wProductType == VER_NT_DOMAIN_CONTROLLER) return WINDOWS_2008;
return WINDOWS_VISTA; }