forked from Securepoint/openvpn-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check64.cpp
36 lines (27 loc) · 806 Bytes
/
check64.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "check64.h"
LPFN_ISWOW64PROCESS Check64::fnIsWow64Process;
BOOL Check64::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;
}
bool Check64::isRunning64Bit()
{
if (IsWow64()) {
return true;
}
return false;
}
Check64::Check64()
{
}