Export (0) Print
Expand All
Expand Minimize

WdfIoTargetGetDevice method

[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.

Syntax


WDFDEVICE WdfIoTargetGetDevice(
  [in]  WDFIOTARGET IoTarget
);

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);
...
}

Requirements

Minimum KMDF version

1.0

Minimum UMDF version

2.0

Header

Wdfiotarget.h (include Wdf.h)

Library

Wdf01000.sys (KMDF);
WUDFx02000.dll (UMDF)

IRQL

<=DISPATCH_LEVEL

DDI compliance rules

DriverCreate, KmdfIrql, KmdfIrql2

See also

WdfDeviceGetIoTarget
WdfIoTargetCreate
WdfUsbTargetDeviceGetIoTarget

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft