private
{ Private declarations }
procedure OSInfo;
...
procedure TForm1.OSInfo;
var
BRes : boolean;
lpVersionInformation : TOSVersionInfo;
c : string;
begin
lpVersionInformation.dwOSVersionInfoSize :=
SizeOf(TOSVersionInfo);
BRes := GetVersionEx(lpVersionInformation);
if BRes then
with lpVersionInformation do
case dwPlatformId of
VER_PLATFORM_WIN32_WINDOWS :
if dwMinorVersion=0 then
c := "Windows 95"
else
c := "Windows 98";
VER_PLATFORM_WIN32_NT :
c := "Windows NT";
VER_PLATFORM_WIN32s :
c := "Win 3.1 with Win32s"
end;
Form1.Caption:=c;
end;
|