Alexandre Julliard : ntdll/tests: Only load RtlWow64GetCpuAreaInfo() on 64-bit.
Alexandre Julliard
julliard at winehq.org
Fri May 21 14:19:44 CDT 2021
Module: wine
Branch: master
Commit: 771e9260f88c782a5ac7b1c76786c6cc469c2158
URL: https://source.winehq.org/git/wine.git/?a=commit;h=771e9260f88c782a5ac7b1c76786c6cc469c2158
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri May 21 18:08:45 2021 +0200
ntdll/tests: Only load RtlWow64GetCpuAreaInfo() on 64-bit.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/tests/info.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 213ff3cde36..4f638721262 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -25,7 +25,6 @@
static NTSTATUS (WINAPI * pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI * pNtSetSystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG);
static NTSTATUS (WINAPI * pRtlGetNativeSystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
-static NTSTATUS (WINAPI * pRtlWow64GetCpuAreaInfo)( WOW64_CPURESERVED *cpu, ULONG reserved, WOW64_CPU_AREA_INFO *info );
static USHORT (WINAPI * pRtlWow64GetCurrentMachine)(void);
static NTSTATUS (WINAPI * pRtlWow64GetProcessMachines)(HANDLE,WORD*,WORD*);
static NTSTATUS (WINAPI * pRtlWow64IsWowGuestMachineSupported)(USHORT,BOOLEAN*);
@@ -50,6 +49,9 @@ static NTSTATUS (WINAPI * pNtQueryObject)(HANDLE, OBJECT_INFORMATION_CLASS, void
static NTSTATUS (WINAPI * pNtCreateDebugObject)( HANDLE *, ACCESS_MASK, OBJECT_ATTRIBUTES *, ULONG );
static NTSTATUS (WINAPI * pNtSetInformationDebugObject)(HANDLE,DEBUGOBJECTINFOCLASS,PVOID,ULONG,ULONG*);
static NTSTATUS (WINAPI * pDbgUiConvertStateChangeStructure)(DBGUI_WAIT_STATE_CHANGE*,DEBUG_EVENT*);
+#ifdef _WIN64
+static NTSTATUS (WINAPI * pRtlWow64GetCpuAreaInfo)( WOW64_CPURESERVED *cpu, ULONG reserved, WOW64_CPU_AREA_INFO *info );
+#endif
static BOOL is_wow64;
@@ -86,7 +88,6 @@ static void InitFunctionPtrs(void)
NTDLL_GET_PROC(NtQuerySystemInformationEx);
NTDLL_GET_PROC(NtSetSystemInformation);
NTDLL_GET_PROC(RtlGetNativeSystemInformation);
- NTDLL_GET_PROC(RtlWow64GetCpuAreaInfo);
NTDLL_GET_PROC(RtlWow64GetCurrentMachine);
NTDLL_GET_PROC(RtlWow64GetProcessMachines);
NTDLL_GET_PROC(RtlWow64IsWowGuestMachineSupported);
@@ -107,6 +108,9 @@ static void InitFunctionPtrs(void)
NTDLL_GET_PROC(NtSetInformationDebugObject);
NTDLL_GET_PROC(NtGetCurrentProcessorNumber);
NTDLL_GET_PROC(DbgUiConvertStateChangeStructure);
+#ifdef _WIN64
+ NTDLL_GET_PROC(RtlWow64GetCpuAreaInfo);
+#endif
pIsWow64Process = (void *)GetProcAddress(hkernel32, "IsWow64Process");
if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE;
More information about the wine-cvs
mailing list