[개발/delphi] 64bit OS 판별
// 64bit OS 판별
// 64bit OS 판별
function Is64BitOS: Boolean;
type
TIsWow64Process = function(Handle:THandle; var IsWow64 : BOOL) : BOOL; stdcall;
var
hKernel32 : Integer;
IsWow64Process : TIsWow64Process;
IsWow64 : BOOL;
begin
// we can check if the operating system is 64-bit by checking whether
// we are running under Wow64 (we are 32-bit code). We must check if this
// function is implemented before we call it, because some older versions
// of kernel32.dll (eg. Windows 2000) don't know about it.
// see http://msdn.microsoft.com/en-us/library/ms684139%28VS.85%29.aspx
Result := False;
hKernel32 := LoadLibrary('kernel32.dll');
if (hKernel32 = 0) then RaiseLastOSError;
@IsWow64Process := GetProcAddress(hkernel32, 'IsWow64Process');
if Assigned(IsWow64Process) then begin
IsWow64 := False;
if (IsWow64Process(GetCurrentProcess, IsWow64)) then begin
Result := IsWow64;
end
else RaiseLastOSError;
end;
FreeLibrary(hKernel32);
end;
반응형
'Delphi, RadStudio' 카테고리의 다른 글
[개발/delphi] 인터넷 연결 목록을 추적하기 (0) | 2012.01.17 |
---|---|
[개발/delphi] 델파이 zlib 를 이용한 파일압축 (0) | 2012.01.17 |
[개발/delphi] 64bit 시스템 디렉토리 가져오기 (0) | 2012.01.13 |
[개발/delphi] 키를 눌러 반복문 종료하기 (0) | 2012.01.11 |
[개발/delphi] 컨트롤 사이를 움직이는 방향키 (0) | 2012.01.11 |
댓글