在其中一个单元中加入以下代码:
type
TOSType = (ostUnknown,ostWin95,ostWinNT);
function OSType : TOSType;
var
osv : TOSVersionInfo;
begin
osv.dwOSVersionInfoSize := sizeof(osv);
GetVersionEx(osv);
Case osv.dwPlatformId of
VER_PLATFORM_WIN32_NT : Result := ostWinNT;
VER_PLATFORM_WIN32_WINDOWS : Result := ostWin95;
else Result := ostUnknown;
end; //Case
end;
type
TOSType = (ostUnknown,ostWin95,ostWinNT);
function OSType : TOSType;
var
osv : TOSVersionInfo;
begin
osv.dwOSVersionInfoSize := sizeof(osv);
GetVersionEx(osv);
Case osv.dwPlatformId of
VER_PLATFORM_WIN32_NT : Result := ostWinNT;
VER_PLATFORM_WIN32_WINDOWS : Result := ostWin95;
else Result := ostUnknown;
end; //Case
end;
浙公网安备 33010602011771号