From 97251c147d843617cf2e3fcf3f273ea779d39742 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 8 Aug 2018 20:00:15 -0500 Subject: [PATCH 2/2] ntdll: Add a stub implementation of Wow64Transition. --- dlls/ntdll/loader.c | 9 ++++++++- dlls/ntdll/ntdll.spec | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index df206e8..e37aec2 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -3493,15 +3493,17 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved ) return TRUE; } +void *Wow64Transition; /*********************************************************************** * __wine_process_init */ void __wine_process_init(void) { + static const WCHAR wow64cpuW[] = {'w','o','w','6','4','c','p','u','.','d','l','l',0}; static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0}; - WINE_MODREF *wm; + WINE_MODREF *wm, *wow64cpu_wm; NTSTATUS status; ANSI_STRING func_name; void (* DECLSPEC_NORETURN CDECL init_func)(void); @@ -3517,6 +3519,11 @@ void __wine_process_init(void) /* setup the load callback and create ntdll modref */ wine_dll_set_callback( load_builtin_callback ); + if ((status = load_builtin_dll( NULL, wow64cpuW, 0, 0, &wow64cpu_wm )) == STATUS_SUCCESS) + Wow64Transition = wow64cpu_wm->ldr.BaseAddress; + else + WARN( "could not load wow64cpu.dll, status %#x\n", status ); + if ((status = load_builtin_dll( NULL, kernel32W, 0, 0, &wm )) != STATUS_SUCCESS) { MESSAGE( "wine: could not load kernel32.dll, status %x\n", status ); diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index d321c44..3a7a144 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -1034,6 +1034,7 @@ @ stdcall WinSqmIsOptedIn() @ stdcall WinSqmSetDWORD(ptr long long) @ stdcall WinSqmStartSession(ptr long long) +@ extern Wow64Transition @ stdcall -private ZwAcceptConnectPort(ptr long ptr long ptr ptr) NtAcceptConnectPort @ stdcall -private ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck @ stdcall -private ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm -- 2.7.4