[Wine-patches] [eterhack 21/24] ntoskrnl.exe: IoGetDeviceObjectPointer should return pointer to the topmost device object in the stack.
Alexander Morozov
=?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Ср Мар 4 12:25:30 MSK 2009
---
dlls/ntoskrnl.exe/ntoskrnl.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index a354b78..6f6cd5b 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1576,6 +1576,7 @@ NTSTATUS WINAPI IoSetDeviceInterfaceState( PUNICODE_STRING SymbolicLinkName,
*/
NTSTATUS WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK access, PFILE_OBJECT *file, PDEVICE_OBJECT *device )
{
+ DEVICE_OBJECT *dev;
HANDLE manager = get_device_manager();
NTSTATUS status;
@@ -1588,10 +1589,16 @@ NTSTATUS WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK acc
req->manager = wine_server_obj_handle( manager );
wine_server_add_data( req, name->Buffer, name->Length );
status = wine_server_call( req );
- *device = wine_server_get_ptr( reply->user_ptr );
+ dev = wine_server_get_ptr( reply->user_ptr );
}
SERVER_END_REQ;
+ if (dev)
+ {
+ while (dev->AttachedDevice)
+ dev = dev->AttachedDevice;
+ *device = dev;
+ }
return status;
}
--
1.6.1.3.GIT
Подробная информация о списке рассылки Wine-patches