Commit 562ce28d authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

ntoskrnl.exe: Implement IoGetAttachedDevice and IoGetAttachedDeviceReference.

parent b5f95498
...@@ -1105,13 +1105,19 @@ NTSTATUS WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK acc ...@@ -1105,13 +1105,19 @@ NTSTATUS WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK acc
/*********************************************************************** /***********************************************************************
* IoGetAttachedDevice (NTOSKRNL.EXE.@) * IoGetAttachedDevice (NTOSKRNL.EXE.@)
*/ */
PDEVICE_OBJECT WINAPI IoGetAttachedDevice( PDEVICE_OBJECT device ) DEVICE_OBJECT* WINAPI IoGetAttachedDevice( DEVICE_OBJECT *device )
{ {
FIXME( "stub: %p\n", device ); DEVICE_OBJECT *result = device;
return device; TRACE( "(%p)\n", device );
while (result->AttachedDevice)
result = result->AttachedDevice;
return result;
} }
/*********************************************************************** /***********************************************************************
* IoGetDeviceProperty (NTOSKRNL.EXE.@) * IoGetDeviceProperty (NTOSKRNL.EXE.@)
*/ */
...@@ -2121,6 +2127,12 @@ NTSTATUS WINAPI ObReferenceObjectByName( UNICODE_STRING *ObjectName, ...@@ -2121,6 +2127,12 @@ NTSTATUS WINAPI ObReferenceObjectByName( UNICODE_STRING *ObjectName,
} }
static void ObReferenceObject( void *obj )
{
TRACE( "(%p): stub\n", obj );
}
/*********************************************************************** /***********************************************************************
* ObDereferenceObject (NTOSKRNL.EXE.@) * ObDereferenceObject (NTOSKRNL.EXE.@)
*/ */
...@@ -2140,7 +2152,7 @@ void WINAPI __regs_ObfReferenceObject( void *obj ) ...@@ -2140,7 +2152,7 @@ void WINAPI __regs_ObfReferenceObject( void *obj )
void WINAPI ObfReferenceObject( void *obj ) void WINAPI ObfReferenceObject( void *obj )
#endif #endif
{ {
FIXME( "(%p): stub\n", obj ); ObReferenceObject( obj );
} }
...@@ -2159,6 +2171,17 @@ void WINAPI ObfDereferenceObject( void *obj ) ...@@ -2159,6 +2171,17 @@ void WINAPI ObfDereferenceObject( void *obj )
/*********************************************************************** /***********************************************************************
* IoGetAttachedDeviceReference (NTOSKRNL.EXE.@)
*/
DEVICE_OBJECT* WINAPI IoGetAttachedDeviceReference( DEVICE_OBJECT *device )
{
DEVICE_OBJECT *result = IoGetAttachedDevice( device );
ObReferenceObject( result );
return result;
}
/***********************************************************************
* PsCreateSystemThread (NTOSKRNL.EXE.@) * PsCreateSystemThread (NTOSKRNL.EXE.@)
*/ */
NTSTATUS WINAPI PsCreateSystemThread(PHANDLE ThreadHandle, ULONG DesiredAccess, NTSTATUS WINAPI PsCreateSystemThread(PHANDLE ThreadHandle, ULONG DesiredAccess,
......
...@@ -374,7 +374,7 @@ ...@@ -374,7 +374,7 @@
@ stdcall IoFreeMdl(ptr) @ stdcall IoFreeMdl(ptr)
@ stub IoFreeWorkItem @ stub IoFreeWorkItem
@ stdcall IoGetAttachedDevice(ptr) @ stdcall IoGetAttachedDevice(ptr)
@ stub IoGetAttachedDeviceReference @ stdcall IoGetAttachedDeviceReference(ptr)
@ stub IoGetBaseFileSystemDeviceObject @ stub IoGetBaseFileSystemDeviceObject
@ stub IoGetBootDiskInformation @ stub IoGetBootDiskInformation
@ stdcall IoGetConfigurationInformation() @ stdcall IoGetConfigurationInformation()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment