[code lang=”delphi”]var
VersionInfo: TOSVersionInfo;
begin
VersionInfo.dwOSVersionInfoSize := Sizeof(TOSVersionInfo);
GetVersionEx(VersionInfo);
Case VersionInfo.dwPlatformID of
VER_PLATFORM_WIN32S:
Do_SomeThing;
VER_PLATFORM_WIN32_WINDOWS:
Do_SomeOtherThing;
VER_PLATFORM_WIN32_NT:
Do_SomeThingElse;
End;
end;
typedef struct _OSVERSIONINFO{
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
TCHAR szCSDVersion[ 128 ];
} OSVERSIONINFO; [/code]
[tags]Delphi, API[/tags]
0 Kommentare zu “Environment: OSVersion”