From 4909d628f5473bf3538db3fcfeb783606e66b673 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 7 Oct 2015 10:24:35 +0200 Subject: [PATCH] + fixes #0002287: Entry Point Not Found IsWow64Process --- .../GuiApplicationNativeEventAwareWin32.cpp | 11 ++++++++++- src/Gui/Splashscreen.cpp | 4 +--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Gui/3Dconnexion/GuiApplicationNativeEventAwareWin32.cpp b/src/Gui/3Dconnexion/GuiApplicationNativeEventAwareWin32.cpp index e67b2e989..eeef826be 100644 --- a/src/Gui/3Dconnexion/GuiApplicationNativeEventAwareWin32.cpp +++ b/src/Gui/3Dconnexion/GuiApplicationNativeEventAwareWin32.cpp @@ -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 { diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index 98249c608..81d1e3dfc 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -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) @@ -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");