검색결과 리스트
bit에 해당되는 글 1건
- 2013.05.31 [VC++] 윈도우 OS Bit 판별하기
글
현재 윈도우가 x86인지 x64인지 확인하는 방법
링크 : http://msdn.microsoft.com/en-us/library/windows/desktop/ms684139(v=vs.85).aspx
#include <windows.h>
#include <tchar.h>typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
LPFN_ISWOW64PROCESS fnIsWow64Process;
BOOL IsWow64()
{
BOOL bIsWow64 = FALSE;//IsWow64Process is not available on all supported versions of Windows.
//Use GetModuleHandle to get a handle to the DLL that contains the function
//and GetProcAddress to get a pointer to the function if available.fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
GetModuleHandle(TEXT("kernel32")),"IsWow64Process");if(NULL != fnIsWow64Process)
{
if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
{
//handle error
}
}
return bIsWow64;
}int main( void )
{
if(IsWow64())
_tprintf(TEXT("The process is running under WOW64.\n"));
else
_tprintf(TEXT("The process is not running under WOW64.\n"));return 0;
}
'C/C++ > VC++ / MFC' 카테고리의 다른 글
[VC++] Device Info (0) | 2013.06.13 |
---|---|
[VC++] Getting the PropertyData of ManagementObject in C++ (0) | 2013.06.12 |
[VC++] 콘솔 프로세스의 리디렉션된 표준핸들이 생성되는 방법 (0) | 2013.05.31 |
[VC++] DevCon 사용법 (0) | 2013.05.31 |
[MFC] Dialog 베이스로 시작시 숨기기 (0) | 2013.05.31 |
RECENT COMMENT