type TIsWow64Process = function (AHandle: THandle; AWow64Process: PBOOL): BOOL; stdcall; procedure InitPlatformInfo; var AIsWow64Process: TIsWow64Process; AIsWow64: BOOL; begin IsWin9X := Win32Platform = VER_PLATFORM_WIN32_WINDOWS;
IsWin95 := IsWin9X and (Win32MinorVersion = 0); IsWin98 := IsWin9X and (Win32MinorVersion = 10); IsWinMe := IsWin9X and (Win32MinorVersion = 90);
IsWinNT := Win32Platform = VER_PLATFORM_WIN32_NT;
IsWin2K := IsWinNT and (Win32MajorVersion = 5) and (Win32MinorVersion = 0); IsWin2KOrLater := IsWinNT and (Win32MajorVersion >= 5); IsWinXP := IsWinNT and (Win32MajorVersion = 5) and (Win32MinorVersion > 0); IsWinXPOrLater := IsWinNT and (Win32MajorVersion >= 5) and not IsWin2K; IsWin2KOrXP := IsWin2K or IsWinXP;
IsWinVista := IsWinNT and (Win32MajorVersion = 6); IsWinVistaOrLater := IsWinNT and (Win32MajorVersion >= 6); IsWinSeven := IsWinNT and (Win32MajorVersion = 6) and (Win32MinorVersion = 1);
// IsWow64Process AIsWow64Process := GetProcAddress(GetModuleHandle(kernel32), 'IsWow64Process'); if Assigned(AIsWow64Process) and AIsWow64Process(GetCurrentProcess, @AIsWow64) then IsWow64 := AIsWow64 else IsWow64 := False; end; |