WdfIoTargetGetDevice - NtDoc

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

WDFDEVICE WdfIoTargetGetDevice(
  [in] WDFIOTARGET IoTarget
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfiotarget-wdfiotargetgetdevice)

WdfIoTargetGetDevice function

Description

[Applies to KMDF and UMDF]

The WdfIoTargetGetDevice method returns a handle to the framework device object that is the parent of the specified local or remote I/O target.

Parameters

IoTarget [in]

A handle to an I/O target object. This handle is obtained from WdfDeviceGetIoTarget, WdfIoTargetCreate, or from a method that a specialized I/O target supplies (such as WdfUsbTargetDeviceGetIoTarget).

Return value

WdfIoTargetGetDevice returns a handle to a framework device object.

A bug check occurs if the driver supplies an invalid object handle.

Remarks

For more information about WdfIoTargetGetDevice, see Obtaining Information About a General I/O Target.

For more information about I/O targets, see Using I/O Targets.

Examples

The following code example is shows how an EvtIoTargetQueryRemove callback function can call WdfIoTargetGetDevice.

NTSTATUS
MyEvtIoTargetQueryRemove(
    WDFIOTARGET IoTarget
)
{
WDFDEVICE device;
...
device = WdfIoTargetGetDevice(IoTarget);
...
}

See also

WdfDeviceGetIoTarget

WdfIoTargetCreate

WdfUsbTargetDeviceGetIoTarget