Defines the bitness (32/64-bit) of the operating system.
1 2 3 4 5 6 |
var is64: Boolean; begin is64 := IsOS64bit(); if is64 = true then ShowMessage('64 бит') else ShowMessage('32 бит'); end; |
Options
Not
Result
True if the system is 64 bits and False if 32.
1 2 3 4 5 6 7 8 9 10 11 |
function IsOS64bit: BOOL; type TIsWow64Process = function(hProcess: THandle; var Wow64Process: BOOL): BOOL; stdcall; var IsWow64Process: TIsWow64Process; begin Result := False; @IsWow64Process := GetProcAddress(GetModuleHandle(kernel32), 'IsWow64Process'); if Assigned(@IsWow64Process) then IsWow64Process(GetCurrentProcess, Result); end; |