Skip to content

Commit

Permalink
+ fixes #2287: Entry Point Not Found IsWow64Process
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 7, 2015
1 parent b68ae65 commit 4909d62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 10 additions & 1 deletion src/Gui/3Dconnexion/GuiApplicationNativeEventAwareWin32.cpp
Expand Up @@ -401,7 +401,16 @@ UINT Gui::GUIApplicationNativeEventAware::GetRawInputBuffer(PRAWINPUT pData, PUI
return ::GetRawInputBuffer(pData, pcbSize, cbSizeHeader);
#else
BOOL bIsWow64 = FALSE;
::IsWow64Process(GetCurrentProcess(), &bIsWow64);
// 0002287: Entry Point Not Found IsWow64Process for Windows 2000
//::IsWow64Process(GetCurrentProcess(), &bIsWow64);
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);

LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
GetModuleHandle("kernel32"), "IsWow64Process");

if (NULL != fnIsWow64Process) {
fnIsWow64Process(GetCurrentProcess(), &bIsWow64);
}
if (!bIsWow64 || pData==NULL) {
return ::GetRawInputBuffer(pData, pcbSize, cbSizeHeader);
} else {
Expand Down
4 changes: 1 addition & 3 deletions src/Gui/Splashscreen.cpp
Expand Up @@ -309,9 +309,6 @@ static QString getOperatingSystem()
#endif
}

#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
#endif
static int getWordSizeOfOS()
{
#if defined(Q_OS_WIN64)
Expand All @@ -323,6 +320,7 @@ static int getWordSizeOfOS()
// default bIsWow64 to FALSE for 32-bit process on 32-bit windows

BOOL bIsWow64 = FALSE; // must default to FALSE
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);

LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(
GetModuleHandle("kernel32"), "IsWow64Process");
Expand Down

0 comments on commit 4909d62

Please sign in to comment.