2018-12-10 17:48:41 -08:00
|
|
|
From af247c7d7c66b23aaa62054d2f7eeb20f8428e26 Mon Sep 17 00:00:00 2001
|
2018-08-08 20:57:52 -07:00
|
|
|
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.
|
|
|
|
|
|
|
|
---
|
2018-12-10 17:48:41 -08:00
|
|
|
dlls/ntdll/loader.c | 10 +++++++++-
|
|
|
|
dlls/ntdll/ntdll.spec | 1 +
|
|
|
|
2 files changed, 10 insertions(+), 1 deletion(-)
|
2018-08-08 20:57:52 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
2018-12-10 17:48:41 -08:00
|
|
|
index 631e8bd9..f7a64a80 100644
|
2018-08-08 20:57:52 -07:00
|
|
|
--- a/dlls/ntdll/loader.c
|
|
|
|
+++ b/dlls/ntdll/loader.c
|
2018-12-10 17:48:41 -08:00
|
|
|
@@ -3546,15 +3546,17 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
|
2018-08-08 20:57:52 -07:00
|
|
|
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);
|
2018-12-10 17:48:41 -08:00
|
|
|
@@ -3575,6 +3577,12 @@ void __wine_process_init(void)
|
|
|
|
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
+
|
2018-08-08 20:57:52 -07:00
|
|
|
+ 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 );
|
|
|
|
+
|
2018-12-10 17:48:41 -08:00
|
|
|
RtlInitAnsiString( &func_name, "__wine_kernel_init" );
|
|
|
|
if ((status = LdrGetProcedureAddress( wm->ldr.BaseAddress, &func_name,
|
|
|
|
0, (void **)&init_func )) != STATUS_SUCCESS)
|
2018-08-08 20:57:52 -07:00
|
|
|
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
2018-12-10 17:48:41 -08:00
|
|
|
index c2e2fb1c..cb55df3a 100644
|
2018-08-08 20:57:52 -07:00
|
|
|
--- a/dlls/ntdll/ntdll.spec
|
|
|
|
+++ b/dlls/ntdll/ntdll.spec
|
2018-12-10 17:48:41 -08:00
|
|
|
@@ -1046,6 +1046,7 @@
|
2018-08-08 20:57:52 -07:00
|
|
|
@ 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
|
|
|
|
--
|
2018-12-10 17:48:41 -08:00
|
|
|
2.19.2
|
2018-08-08 20:57:52 -07:00
|
|
|
|