본문 바로가기

Delphi/꿀팁

윈도우가 64비트인지 아닌지 확인하기 - 1

function isWindows64: Boolean;
type
  TIsWow64Process = function(Handle: Windows.THandle; var Res: Windows.BOOL): Windows.BOOL; stdcall;
var
  IsWow64Result: Windows.BOOL;
  IsWow64Process: TIsWow64Process;
begin
  IsWow64Process := Windows.GetProcAddress(Windows.GetModuleHandle('kernel32'), 'IsWow64Process');
  
  if Assigned(IsWow64Process) then begin
    if not IsWow64Process(Windows.GetCurrentProcess, IsWow64Result) then
      Result := IsWow64Result
    else
      Result := False;
  end;
end;

 

반응형