Topic: Obtaining wSuiteMask from GetVersionEx
I should receive only wSuiteMask.
It is not present in GetVersion, but is in GetVersionEx.
However that it to receive, whether because of any error, whether it only in early versions Delphi, it is necessary to do a heap of things:
To declare type TOSVersionInfoEx
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;
because Delphi5 does not know that such TOSVersionInfoEx.
To rewrite function GetVersionEx
function GetVersionEx (var lpVersionInformationEx: TOSVERSIONINFOEX): BOOL; stdcall; overload; external kernel32 name ' GetVersionExA ';
because Delphi5 and for GetVersionEx (as well as for GetVersion), uses TOSVersionInfo, and instead of nonexistent at it TOSVersionInfoEx.
Here actually and a question: Can there is a simple method as in one line to receive wSuiteMask not to create all infrastructure for operation with TOSVersionInfoEx.
P.S. wSuiteMask to me it is necessary only for determination that at me Windows Home Server.