FIX: app: fix the issue on win-7

use typedef instead of IsWow64Process2

jira: no-jira

Change-Id: I3d5c4becca1586094b6950431470b12bd71a0056
This commit is contained in:
lane.wei 2025-04-16 16:44:45 +08:00 committed by Lane.Wei
parent 313e32db15
commit c34e985f18
1 changed files with 8 additions and 1 deletions

View File

@ -120,6 +120,13 @@
#include "dark_mode.hpp"
#include "wx/headerctrl.h"
#include "wx/msw/headerctrl.h"
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS2)(
HANDLE hProcess,
USHORT *pProcessMachine,
USHORT *pNativeMachine
);
#endif // _MSW_DARK_MODE
#endif // __WINDOWS__
@ -2775,7 +2782,7 @@ bool GUI_App::on_init_inner()
HMODULE hKernel32 = GetModuleHandleW(L"kernel32.dll");
m_is_arm64 = false;
if (hKernel32) {
auto fnIsWow64Process2 = (decltype(&IsWow64Process2))GetProcAddress(hKernel32, "IsWow64Process2");
auto fnIsWow64Process2 = (LPFN_ISWOW64PROCESS2)GetProcAddress(hKernel32, "IsWow64Process2");
if (fnIsWow64Process2) {
USHORT processMachine = 0;
USHORT nativeMachine = 0;