IoGetAttachedDevice - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntifs.h

PDEVICE_OBJECT IoGetAttachedDevice(
  [in] PDEVICE_OBJECT DeviceObject
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-iogetattacheddevice)

IoGetAttachedDevice function

Description

The IoGetAttachedDevice routine returns a pointer to the highest-level device object associated with the specified device.

Parameters

DeviceObject [in]

A pointer to the device object for which the topmost attached device is to be returned.

Return value

IoGetAttachedDevice returns the highest-level device attached to the specified device.

Remarks

If the device object specified by DeviceObject has no other device objects attached to it, DeviceObject and the returned pointer are equal.

IoGetAttachedDevice differs from IoGetAttachedDeviceReference in the following respects:

See also

IoGetAttachedDeviceReference

ObDereferenceObject