typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
LPFN_ISWOW64PROCESS fnIsWow64Process;
BOOL IsWow64()
{
/**
Minimum supported client Windows Vista, Windows XP with SP2
Minimum supported server Windows Server 2008, Windows Server 2003 with SP1
Header Winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll
**/
BOOL bIsWow64 = FALSE;
fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
GetModuleHandle(TEXT("kernel32")),"IsWow64Process");
if (NULL != fnIsWow64Process)
{
HANDLE hProc = OpenProcess(PROCESS_QUERY_INFORMATION, false, GetCurrentProcessId());
if (!fnIsWow64Process(hProc,&bIsWow64))
{
// handle error
ShowErrMsg(GetLastError());
}
CloseHandle(hProc);
}
return bIsWow64;
}
Solo funciona en: Windows Vista, Windows XP with SP2
Publicado en tttony.blogspot.com
Publicar un comentario
No hay comentarios.:
Publicar un comentario