Added patch to implement stub for ntoskrnl.IoGetAttachedDeviceReference.

This commit is contained in:
Sebastian Lackner
2015-02-08 17:35:02 +01:00
parent 865083f801
commit cb402d63de
5 changed files with 79 additions and 1 deletions

View File

@@ -0,0 +1,59 @@
From d7911933e870e44358ae93c81f13020af49fecf4 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Thu, 29 Jan 2015 23:23:13 +0100
Subject: ntoskrnl.exe: Add stub for IoGetAttachedDeviceReference.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +-
include/ddk/wdm.h | 1 +
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index cdc5305..edd83de 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -837,6 +837,15 @@ NTSTATUS WINAPI IofCallDriver( DEVICE_OBJECT *device, IRP *irp )
return IoCallDriver( device, irp );
}
+/***********************************************************************
+ * IoGetAttachedDeviceReference (NTOSKRNL.EXE.@)
+ */
+PDEVICE_OBJECT WINAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT obj)
+{
+ FIXME("(%p): stub\n", obj);
+
+ return obj;
+}
/***********************************************************************
* IoGetRelatedDeviceObject (NTOSKRNL.EXE.@)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 11d1c62..52c7fbf 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -374,7 +374,7 @@
@ stdcall IoFreeMdl(ptr)
@ stub IoFreeWorkItem
@ stdcall IoGetAttachedDevice(ptr)
-@ stub IoGetAttachedDeviceReference
+@ stdcall IoGetAttachedDeviceReference(ptr)
@ stub IoGetBaseFileSystemDeviceObject
@ stub IoGetBootDiskInformation
@ stdcall IoGetConfigurationInformation()
diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h
index e4f693a..121ca45 100644
--- a/include/ddk/wdm.h
+++ b/include/ddk/wdm.h
@@ -1208,6 +1208,7 @@ void WINAPI IoDeleteDevice(DEVICE_OBJECT*);
void WINAPI IoDeleteDriver(DRIVER_OBJECT*);
NTSTATUS WINAPI IoDeleteSymbolicLink(UNICODE_STRING*);
void WINAPI IoFreeIrp(IRP*);
+PDEVICE_OBJECT WINAPI IoGetAttachedDeviceReference(PDEVICE_OBJECT);
PEPROCESS WINAPI IoGetCurrentProcess(void);
NTSTATUS WINAPI IoGetDeviceInterfaces(const GUID*,PDEVICE_OBJECT,ULONG,PWSTR*);
NTSTATUS WINAPI IoGetDeviceObjectPointer(UNICODE_STRING*,ACCESS_MASK,PFILE_OBJECT*,PDEVICE_OBJECT*);
--
2.2.2

View File

@@ -0,0 +1 @@
Fixes: Implement stub for ntoskrnl.IoGetAttachedDeviceReference

View File

@@ -137,6 +137,7 @@ patch_enable_all ()
enable_ntdll_WinSqm="$1"
enable_ntoskrnl_DriverTest="$1"
enable_ntoskrnl_Emulator="$1"
enable_ntoskrnl_IoGetAttachedDeviceReference="$1"
enable_ntoskrnl_KeWaitForMultipleObjects="$1"
enable_nvapi_Stub_DLL="$1"
enable_nvcuda_CUDA_Support="$1"
@@ -438,6 +439,9 @@ patch_enable ()
ntoskrnl-Emulator)
enable_ntoskrnl_Emulator="$2"
;;
ntoskrnl-IoGetAttachedDeviceReference)
enable_ntoskrnl_IoGetAttachedDeviceReference="$2"
;;
ntoskrnl-KeWaitForMultipleObjects)
enable_ntoskrnl_KeWaitForMultipleObjects="$2"
;;
@@ -2328,6 +2332,18 @@ if test "$enable_ntoskrnl_Emulator" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntoskrnl-IoGetAttachedDeviceReference
# |
# | Modified files:
# | * dlls/ntoskrnl.exe/ntoskrnl.c, dlls/ntoskrnl.exe/ntoskrnl.exe.spec, include/ddk/wdm.h
# |
if test "$enable_ntoskrnl_IoGetAttachedDeviceReference" -eq 1; then
patch_apply ntoskrnl-IoGetAttachedDeviceReference/0001-ntoskrnl.exe-Add-stub-for-IoGetAttachedDeviceReferen.patch
(
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for IoGetAttachedDeviceReference.", 1 },';
) >> "$patchlist"
fi
# Patchset ntoskrnl-KeWaitForMultipleObjects
# |
# | Modified files: