获取操纵系统的范例和版本
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) );
}