zoukankan      html  css  js  c++  java
  • Delphi 判断当前系统是否64位

    uses Winapi.Windows;
    function IsWin64: Boolean;
    var
    IsWow64Process: function(Handle:  THandle; var Res:  BOOL): BOOL; stdcall;
      GetNativeSystemInfo: procedure(var lpSystemInfo: TSystemInfo); stdcall;
      Kernel32Handle: THandle;
    
      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;
  • 相关阅读:
    ReactJS入门学习一
    js控制html5 【video】标签中视频的播放和停止
    CentOS中vsftp安装与配置
    linux 添加多个网段
    js图片预加载后触发操作
    nodejs在后台运行
    asp.net环境搭建
    aspx aspx.cs
    linux 添加静态ip dns
    kali ssh服务开启登录
  • 原文地址:https://www.cnblogs.com/windson/p/12562364.html
Copyright © 2011-2022 走看看