2019. 9. 27. 10:06
델파이
OS버전 체크
procedure GetOSVersion;
var
VersionInfo: TOSVersionInfo;
Platform: string;
MajorVersion,MinorVersion,Build: DWORD;
begin
VersionInfo.dwOSVersionInfoSize := SizeOf(VersionInfo);
GetVersionEx(VersionInfo);
with VersionInfo do
begin
case dwPlatformId of
VER_PLATFORM_WIN32s: Platform := 'Windows 3x';
VER_PLATFORM_WIN32_WINDOWS: Platform := 'Windows 95';
VER_PLATFORM_WIN32_NT: Platform := 'Windows NT';
end;
MajorVersion := dwMajorVersion;
MinorVersion := dwMinorVersion;
Build := dwBuildNumber;
end;
end;