mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-04-07 06:50:04 +02:00
Improved Is32BitProcess function.
This commit is contained in:
parent
7342cccbb5
commit
e5bb0cd561
@ -402,7 +402,6 @@ const
|
|||||||
CEF4DELPHI_URL = 'https://github.com/salvadordf/CEF4Delphi';
|
CEF4DELPHI_URL = 'https://github.com/salvadordf/CEF4Delphi';
|
||||||
CRLF = #13 + #10;
|
CRLF = #13 + #10;
|
||||||
|
|
||||||
// Bitness constants used in
|
|
||||||
IMAGE_FILE_MACHINE_UNKNOWN = 0;
|
IMAGE_FILE_MACHINE_UNKNOWN = 0;
|
||||||
IMAGE_FILE_MACHINE_I386 = $014c; // Intel x86
|
IMAGE_FILE_MACHINE_I386 = $014c; // Intel x86
|
||||||
IMAGE_FILE_MACHINE_IA64 = $0200; // Intel Itanium Processor Family (IPF)
|
IMAGE_FILE_MACHINE_IA64 = $0200; // Intel Itanium Processor Family (IPF)
|
||||||
|
@ -1204,7 +1204,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
on e : exception do
|
on e : exception do
|
||||||
if CustomExceptionHandler('GetDLLBitness', e) then raise;
|
if CustomExceptionHandler('GetDLLHeaderMachine', e) then raise;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
if (TempStream <> nil) then FreeAndNil(TempStream);
|
if (TempStream <> nil) then FreeAndNil(TempStream);
|
||||||
@ -1222,11 +1222,66 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF CPU386}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF CPUi386}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF CPUPOWERPC32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF CPUSPARC32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF CPU32BITS}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF CPUARM32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF WIN32}
|
{$IFDEF WIN32}
|
||||||
Result := True;
|
Result := True;
|
||||||
exit;
|
exit;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF IOS32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF MACOS32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF LINUX32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF POSIX32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$IFDEF ANDROID32}
|
||||||
|
Result := True;
|
||||||
|
exit;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$IFDEF MSWINDOWS}
|
{$IFDEF MSWINDOWS}
|
||||||
Result := ProcessUnderWow64(GetCurrentProcess, TempResult) and TempResult;
|
Result := ProcessUnderWow64(GetCurrentProcess, TempResult) and TempResult;
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user