You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 6ca1a92684fcbaa1c569b60411a8036b6d11dc99.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From b230ad8676c16e2c02b6c317b0c050494225c696 Mon Sep 17 00:00:00 2001
|
||||
From e4dea5ee77c25ec502104dca8c503d5016e1a1d4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 8 Jun 2017 23:50:03 +0200
|
||||
Subject: [PATCH] programs/winedevice: Load some common drivers and fix ldr
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] programs/winedevice: Load some common drivers and fix ldr
|
||||
2 files changed, 76 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
index 0671a56efc7..85327c6f4b3 100644
|
||||
index d9d712418ee..808f304b258 100644
|
||||
--- a/dlls/ntoskrnl.exe/tests/driver.c
|
||||
+++ b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
@@ -46,6 +46,7 @@ static const WCHAR driver_link[] = {'\\','D','o','s','D','e','v','i','c','e','s'
|
||||
@@ -52,6 +52,7 @@ static int kmemcmp( const void *ptr1, const void *ptr2, size_t n )
|
||||
|
||||
static DRIVER_OBJECT *driver_obj;
|
||||
static DEVICE_OBJECT *lower_device, *upper_device;
|
||||
@@ -21,7 +21,7 @@ index 0671a56efc7..85327c6f4b3 100644
|
||||
|
||||
static POBJECT_TYPE *pExEventObjectType, *pIoFileObjectType, *pPsThreadType, *pIoDriverObjectType;
|
||||
static PEPROCESS *pPsInitialSystemProcess;
|
||||
@@ -1545,6 +1546,7 @@ static void test_resource(void)
|
||||
@@ -1592,6 +1593,7 @@ static void test_resource(void)
|
||||
ok(status == STATUS_SUCCESS, "got status %#x\n", status);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ index 0671a56efc7..85327c6f4b3 100644
|
||||
static void test_lookup_thread(void)
|
||||
{
|
||||
NTSTATUS status;
|
||||
@@ -2072,6 +2074,52 @@ static void test_permanence(void)
|
||||
@@ -2119,6 +2121,52 @@ static void test_permanence(void)
|
||||
ok(status == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", status);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ index 0671a56efc7..85327c6f4b3 100644
|
||||
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)
|
||||
{
|
||||
ULONG length = stack->Parameters.DeviceIoControl.OutputBufferLength;
|
||||
@@ -2118,6 +2166,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
|
||||
@@ -2165,6 +2213,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
|
||||
test_stack_callout();
|
||||
test_lookaside_list();
|
||||
test_ob_reference(test_input->path);
|
||||
@@ -90,7 +90,7 @@ index 0671a56efc7..85327c6f4b3 100644
|
||||
test_resource();
|
||||
test_lookup_thread();
|
||||
test_IoAttachDeviceToDeviceStack();
|
||||
@@ -2392,6 +2441,7 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, PUNICODE_STRING registry)
|
||||
@@ -2560,6 +2609,7 @@ NTSTATUS WINAPI DriverEntry(DRIVER_OBJECT *driver, PUNICODE_STRING registry)
|
||||
DbgPrint("loading driver\n");
|
||||
|
||||
driver_obj = driver;
|
||||
@@ -99,10 +99,10 @@ index 0671a56efc7..85327c6f4b3 100644
|
||||
/* Allow unloading of the driver */
|
||||
driver->DriverUnload = driver_Unload;
|
||||
diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c
|
||||
index 0755caaafb0..6595788053e 100644
|
||||
index 3acc5e8a799..f16f6204efe 100644
|
||||
--- a/programs/winedevice/device.c
|
||||
+++ b/programs/winedevice/device.c
|
||||
@@ -120,7 +120,33 @@ static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type, LPVOID event_
|
||||
@@ -115,8 +115,16 @@ static DWORD WINAPI service_handler( DWORD ctrl, DWORD event_type, LPVOID event_
|
||||
|
||||
static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv )
|
||||
{
|
||||
@@ -111,11 +111,18 @@ index 0755caaafb0..6595788053e 100644
|
||||
+ static const WCHAR dxgkrnlW[] = {'d','x','g','k','r','n','l','.','s','y','s',0};
|
||||
+ static const WCHAR dxgmms1W[] = {'d','x','g','m','m','s','1','.','s','y','s',0};
|
||||
+ static const WCHAR *stubs[] = { win32kW, dxgkrnlW, dxgmms1W };
|
||||
WCHAR driver_dir[MAX_PATH];
|
||||
const WCHAR *service_group = (argc >= 2) ? argv[1] : argv[0];
|
||||
+ LDR_DATA_TABLE_ENTRY *ldr;
|
||||
+ ULONG_PTR magic;
|
||||
+ int i;
|
||||
+
|
||||
|
||||
if (!(stop_event = CreateEventW( NULL, TRUE, FALSE, NULL )))
|
||||
return;
|
||||
@@ -129,6 +137,24 @@ static void WINAPI ServiceMain( DWORD argc, LPWSTR *argv )
|
||||
wcscat( driver_dir, L"\\drivers" );
|
||||
AddDllDirectory( driver_dir );
|
||||
|
||||
+ /* Load some default drivers (required by anticheat drivers) */
|
||||
+ for (i = 0; i < sizeof(stubs)/sizeof(stubs[0]); i++)
|
||||
+ {
|
||||
@@ -133,9 +140,10 @@ index 0755caaafb0..6595788053e 100644
|
||||
+ InsertHeadList( &NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &ldr->InMemoryOrderLinks );
|
||||
+ }
|
||||
+ LdrUnlockLoaderLock( 0, magic );
|
||||
|
||||
if (!(stop_event = CreateEventW( NULL, TRUE, FALSE, NULL )))
|
||||
return;
|
||||
+
|
||||
TRACE( "starting service group %s\n", wine_dbgstr_w(service_group) );
|
||||
set_service_status( service_handle, SERVICE_RUNNING,
|
||||
SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWN );
|
||||
--
|
||||
2.27.0
|
||||
2.30.2
|
||||
|
||||
|
Reference in New Issue
Block a user