FIX: app: fix the issue on win-7

use typedef instead of IsWow64Process2

jira: no-jira

Change-Id: I3d5c4becca1586094b6950431470b12bd71a0056
(cherry picked from commit c34e985f188c206d588ee8da7149ded2516981cf)
This commit is contained in:
lane.wei 2025-04-16 16:44:45 +08:00 committed by Noisyfox
parent 2d7259623f
commit 85bce2ac33

View file

@ -122,6 +122,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__
@ -2291,7 +2298,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;