获取操作系统的类型和版本
2008-03-08 12:43:41 来源:WEB开发网核心提示:TOSVersionInfo VerInfo;AnsiString OSName;VerInfo.dwOSVersionInfoSize = sizeof(VerInfo);if( GetVersionEx( &VerInfo ) ){switch( VerInfo.dwPlatformId ){case VER_PL
TOSVersionInfo VerInfo;
AnsiString OSName;
VerInfo.dwOSVersionInfoSize = sizeof(VerInfo);
if( GetVersionEx( &VerInfo ) )
{
switch( VerInfo.dwPlatformId )
{
case VER_PLATFORM_WIN32s:
OSName = "Win32s";
break;
case VER_PLATFORM_WIN32_WINDOWS:
OSName = "Windows 95/98";
break;
case VER_PLATFORM_WIN32_NT:
OSName = "Windows NT";
break;
default:
break;
}
ShowMessage(OSName + IntToStr( VerInfo.dwMajorVersion ) +
IntToStr(VerInfo.dwMinorVersion) );
}
更多精彩
赞助商链接