判斷作業系統是32位元或是64位元

 1,783 total views,  1 views today

判斷作業系統是32位元或是64位元 忘記到哪裡抄的….

[delphi]
function IsWOW64: Boolean;
type
TIsWow64Process = function(Handle: THandle;var Res: BOOL): BOOL; stdcall;
var
IsWow64Result: BOOL;
IsWow64Process: TIsWow64Process;
begin
IsWow64Process := GetProcAddress(
GetModuleHandle(‘kernel32’), ‘IsWow64Process’
);
if Assigned(IsWow64Process) then
begin
IsWow64Process(GetCurrentProcess, IsWow64Result);
Result := IsWow64Result;
end
else
Result := False;
end;[/delphi]

發表迴響

%d 位部落客按了讚: