wow64cpu-Wow64Transition: Load wow64cpu.dll after kernel32.dll.

Fixes bug 46251.
This commit is contained in:
Zebediah Figura
2018-12-10 19:48:41 -06:00
parent 6be0dfd008
commit e45211698d
2 changed files with 46 additions and 44 deletions

View File

@@ -1,18 +1,18 @@
From 97251c147d843617cf2e3fcf3f273ea779d39742 Mon Sep 17 00:00:00 2001
From af247c7d7c66b23aaa62054d2f7eeb20f8428e26 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
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(-)
dlls/ntdll/loader.c | 10 +++++++++-
dlls/ntdll/ntdll.spec | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index df206e8..e37aec2 100644
index 631e8bd9..f7a64a80 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3493,15 +3493,17 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
@@ -3546,15 +3546,17 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
return TRUE;
}
@@ -31,23 +31,24 @@ index df206e8..e37aec2 100644
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 );
@@ -3575,6 +3577,12 @@ void __wine_process_init(void)
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
exit(1);
}
+
+ 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 );
RtlInitAnsiString( &func_name, "__wine_kernel_init" );
if ((status = LdrGetProcedureAddress( wm->ldr.BaseAddress, &func_name,
0, (void **)&init_func )) != STATUS_SUCCESS)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index d321c44..3a7a144 100644
index c2e2fb1c..cb55df3a 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1034,6 +1034,7 @@
@@ -1046,6 +1046,7 @@
@ stdcall WinSqmIsOptedIn()
@ stdcall WinSqmSetDWORD(ptr long long)
@ stdcall WinSqmStartSession(ptr long long)
@@ -56,5 +57,5 @@ index d321c44..3a7a144 100644
@ 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
2.19.2