Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Пользователь


Сообщения: 76
Благодарности: 43

Профиль | Отправить PM | Цитировать


R.i.m.s.k.y., GetWindowsVersionEx винды 8, 8.1, 10
Код: Выделить весь код
function ForWindows10(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Windows 10 version is 6.4 (workstation)
  if (Version.Major = 6)  and
     (Version.Minor = 4) and
     (Version.ProductType = VER_NT_WORKSTATION)
  then
    Result := True
  else
    Result := False;
end;

function ForWindows8One(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Windows 8.1 version is 6.3 (workstation)
  if (Version.Major = 6)  and
     (Version.Minor = 3) and
     (Version.ProductType = VER_NT_WORKSTATION)
  then
    Result := True
  else
    Result := False;
end;

function ForWindows8(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Windows 8 version is 6.2 (workstation)
  if (Version.Major = 6)  and
     (Version.Minor = 2) and
     (Version.ProductType = VER_NT_WORKSTATION)
  then
    Result := True
  else
    Result := False;
end;
Это сообщение посчитали полезным следующие участники:

Отправлено: 14:47, 24-09-2015 | #960