type<br> SystemInfoRecord = record<br> Version :string;<br> Plattform : string;<br> PlattId : DWORD;<br>end;<br><br>var SysInfoRec: SystemInfoRecord;<br><br>procedure TMainForm.GetOSVersionInfo;<br><br> function Plat(Pl: DWORD): string;<br> begin<br> case Pl of<br> VER_PLATFORM_WIN32s: result := 'Win32s on Windows 3.1';<br> VER_PLATFORM_WIN32_WINDOWS: result := 'Win32 on Windows 95';<br> VER_PLATFORM_WIN32_NT: result := 'Windows NT';<br> else result := '???';<br> end;<br> end;<br><br>begin<br><br> with OSVerInfo, SysInfoRec do begin<br> dwOSVersionInfoSize := SizeOf(OSVerInfo);<br> if GetVersionEx(OSVerInfo) then;<br> Version := Format('%d.%d (%d.%s)',[dwMajorVersion, dwMinorVersion,<br> (dwBuildNumber and $FFFF), szCSDVersion]);<br> Plattform := Plat(dwPlatformId);<br> PlattID := dwPlatformId;<br> end;<br>end;