Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <windows.h>
  2. #include <tchar.h>
  3.  
  4. typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
  5.  
  6. LPFN_ISWOW64PROCESS fnIsWow64Process;
  7.  
  8. BOOL IsWow64()
  9. {
  10.     BOOL bIsWow64 = FALSE;
  11.  
  12.     fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
  13.         GetModuleHandle(TEXT("kernel32")),"IsWow64Process");
  14.  
  15.     if(NULL != fnIsWow64Process)
  16.     {
  17.         if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64))
  18.         {
  19.             //handle error
  20.         }
  21.     }
  22.     return bIsWow64;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement