Beranda > Delphi > Getting the Windows version (Word result)

Getting the Windows version (Word result)

This is one of the most commonly asked question: How do you get the Windows version?  Well here it is…
Note: if you want the detailed string result such as the version, build number, whether it’s 95A, B, C, or 98, etc… see GetWindowsVersionStr().function GetWindowsVersion: Word;
var
  VerInfo: TOSVersionInfo;
begin
  VerInfo.dwOSVersionInfoSize := SizeOf(VerInfo);
  GetVersionEx(VerInfo);
  Result := VerInfo.dwPlatformID;
  { The results are as followed: }
  {case VerInfo.dwPlatformID of
    VER_PLATFORM_WIN32S: Platform is ‘Windows 3.1x running Win32s’;
    VER_PLATFORM_WIN32_WINDOWS: Platform is ‘Windows 95/98’;
    VER_PLATFORM_WIN32_NT: Platform is ‘Windows NT’;
  end;}
end;

Iklan
Kategori:Delphi
  1. Belum ada komentar.
  1. No trackbacks yet.

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: