wine-staging/patches/ntoskrnl-Stubs/0018-ntoskrnl.exe-Improve-IoGetDeviceObjectPointer-stub-t.patch

36 lines
1.1 KiB
Diff
Raw Normal View History

From 61970080c0dc917618c2884ceeeb1ef664705292 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Sun, 14 Jun 2015 18:58:20 -0600
Subject: ntoskrnl.exe: Improve IoGetDeviceObjectPointer stub to appease
SecuROM 5.x.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 2051939..57352e4 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -884,10 +884,16 @@ NTSTATUS WINAPI IoGetDeviceInterfaces( const GUID *InterfaceClassGuid,
*/
NTSTATUS WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK access, PFILE_OBJECT *file, PDEVICE_OBJECT *device )
{
+ static DEVICE_OBJECT stub_device;
+ static DRIVER_OBJECT stub_driver;
+
FIXME( "stub: %s %x %p %p\n", debugstr_us(name), access, file, device );
+ stub_device.StackSize = 0x80; /* minimum value to appease SecuROM 5.x */
+ stub_device.DriverObject = &stub_driver;
+
*file = NULL;
- *device = NULL;
+ *device = &stub_device;
return STATUS_SUCCESS;
}
--
2.4.3