// wdfiotarget.h
WDFDEVICE WdfIoTargetGetDevice(
[in] WDFIOTARGET IoTarget
);
View the official Windows Driver Kit DDI referenceNo description available.
[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.
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).
WdfIoTargetGetDevice returns a handle to a framework device object.
A bug check occurs if the driver supplies an invalid object handle.
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.
The following code example is shows how an EvtIoTargetQueryRemove callback function can call WdfIoTargetGetDevice.
NTSTATUS
MyEvtIoTargetQueryRemove(
WDFIOTARGET IoTarget
)
{
WDFDEVICE device;
...
device = WdfIoTargetGetDevice(IoTarget);
...
}