type
TOSVersionInfoEx = packed record
dwOSVersionInfoSize: DWORD;
dwMajorVersion: DWORD;
dwMinorVersion: DWORD;
dwBuildNumber: DWORD;
dwPlatformId: DWORD;
szCSDVersion: array[0..127] of AnsiChar;
wServicePackMajor: WORD;
wServicePackMinor: WORD;
wSuiteMask: WORD;
wProductType: Byte;
wReserved: Byte;
end;
...
var
osvi : TOSVersionInfoEx;
begin
ZeroMemory(@osvi, sizeof(TOSVersionInfoEx));
osvi.dwOSVersionInfoSize := sizeof(TOSVersionInfoEx);
GetVersionEx(osvi);
...
end;