ntoskrnl.exe: Implement IoGetAttachedDevice and IoGetAttachedDeviceReference.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Aric Stewart 2016-09-07 11:21:22 +02:00 committed by Alexandre Julliard
parent b5f95498a9
commit 562ce28d1b
2 changed files with 28 additions and 5 deletions

View File

@ -1105,13 +1105,19 @@ NTSTATUS WINAPI IoGetDeviceObjectPointer( UNICODE_STRING *name, ACCESS_MASK acc
/***********************************************************************
* 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.@)
*/
@ -2121,6 +2127,12 @@ NTSTATUS WINAPI ObReferenceObjectByName( UNICODE_STRING *ObjectName,
}
static void ObReferenceObject( void *obj )
{
TRACE( "(%p): stub\n", obj );
}
/***********************************************************************
* ObDereferenceObject (NTOSKRNL.EXE.@)
*/
@ -2140,7 +2152,7 @@ void WINAPI __regs_ObfReferenceObject( void *obj )
void WINAPI ObfReferenceObject( void *obj )
#endif
{
FIXME( "(%p): stub\n", obj );
ObReferenceObject( obj );
}
@ -2158,6 +2170,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.@)
*/

View File

@ -374,7 +374,7 @@
@ stdcall IoFreeMdl(ptr)
@ stub IoFreeWorkItem
@ stdcall IoGetAttachedDevice(ptr)
@ stub IoGetAttachedDeviceReference
@ stdcall IoGetAttachedDeviceReference(ptr)
@ stub IoGetBaseFileSystemDeviceObject
@ stub IoGetBootDiskInformation
@ stdcall IoGetConfigurationInformation()