delphi - 如何获取有关计算机的信息? [32位或64位]

标签 delphi 32bit-64bit delphi-2007

如何获取有关 Windows 操作系统类型的信息?是32位还是64位?我如何以编程方式获取此信息?

最佳答案

function IsWin64: Boolean;
var
  IsWow64Process : function(hProcess : THandle; var Wow64Process : BOOL): BOOL; stdcall;
  Wow64Process : BOOL;
begin
  Result := False;
  IsWow64Process := GetProcAddress(GetModuleHandle(Kernel32), 'IsWow64Process');
  if Assigned(IsWow64Process) then begin
    if IsWow64Process(GetCurrentProcess, Wow64Process) then begin
      Result := Wow64Process;
    end;
  end;
end;

关于delphi - 如何获取有关计算机的信息? [32位或64位],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2523957/

相关文章:

delphi - Delphi中如何获取光标下的Control?

delphi - 当源代码中存在 "|"时,IDE 将挂起。是Delphi XE8的bug吗?

c# - 我可以将引用dll放在C#中的特定目录中吗?

64-bit - 处理器,操作系统:32bit,64 bit

delphi - 在 Delphi 2007 中鸭子类型(duck typing)?

string - Delphi 2007 中对多维数组进行排序

delphi - 如何区分来自具有相同 IP 地址的多个客户端的连接?

delphi - 使用 GDI+ 旋转的图形看起来比原始图形大

xcode - 创建通用应用程序时,如何链接到32位和64位版本分开的框架?

delphi - 在弹出菜单的禁用菜单项上显示工具提示提示