function IsWin64: Boolean;
var
Kernel32Handle: THandle;
IsWow64Process: function(Handle: Windows.THandle; var Res: Windows.BOOL): Windows.BOOL;
stdcall;
GetNativeSystemInfo :
procedure(var lpSystemInfo: TSystemInfo); stdcall; isWoW64 :BOOL;SystemInfo : TSystemInfo;
const
PROCESSOR_ARCHITECTURE_AMD64 = 9;
PROCESSOR_ARCHITECTURE_IA64 = 6;
begin
Kernel32Handle := GetModuleHandle('KERNEL32.DLL');
if Kernel32Handle = 0 then
Kernel32Handle := LoadLibrary('KERNEL32.DLL');
if Kernel32Handle <> 0 then
begin
IsWow64Process := GetProcAddress(Kernel32Handle, 'IsWow64Process');
GetNativeSystemInfo := GetProcAddress(Kernel32Handle, 'GetNativeSystemInfo');
if Assigned(IsWow64Process) then
begin
IsWow64Process(GetCurrentProcess, isWoW64);
Result := isWoW64 and Assigned(GetNativeSystemInfo);
if Result then
begin
GetNativeSystemInfo(SystemInfo);
Result := (SystemInfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_AMD64) or (SystemInfo.wProcessorArchitecture = PROCESSOR_ARCHITECTURE_IA64);
end;
end
else
Result := False;
end
else
Result := False;
end;
相关文章
- 10-10Delphi 判断时间是否合法 -IsValidDateTime、IsValidDate、IsValidTime、IsValidDateDay
- 10-10Delphi判断进程是否存在(使用CreateToolhelp32Snapshot)
- 10-10Delphi 判断AnsiStr是否是UTF编码格式 IsUtf8Format
- 10-10如何在安装程序中判断操作系统是否是64位 inno
- 10-10Delphi中的函数指针判断是否为空
- 10-10delphi 判断MDI窗体的子窗体是否存在
- 10-10Delphi 判断TImage是否为空及注意事项
- 10-10Delphi 判断一个字符串是否为数字
- 10-10Delphi 窗体的释放和判断窗体是否存在
- 10-10Delphi判断字符串是否是数字、字母、大小写字母