WdfUsbTargetDeviceGetIoTarget function (wdfusb.h)

[Applies to KMDF and UMDF]

The WdfUsbTargetDeviceGetIoTarget method returns a handle to the I/O target object that is associated with a specified USB device.

Syntax

WDFIOTARGET WdfUsbTargetDeviceGetIoTarget(
  [in] WDFUSBDEVICE UsbDevice
);

Parameters

[in] UsbDevice

A handle to a USB device object that was obtained from a previous call to WdfUsbTargetDeviceCreateWithParameters.

Return value

The WdfUsbTargetDeviceGetIoTarget method returns a handle to an I/O target object.

A bug check occurs if a driver-supplied object handle is invalid.

Remarks

For more information about the WdfUsbTargetDeviceGetIoTarget method and USB I/O targets, see USB I/O Targets.

Examples

The following code example creates a request object and verifies that the framework can send a request to the I/O target object that is associated with a specified USB device.

status = WdfRequestCreate(
                          &attributes,
                          WdfUsbTargetDeviceGetIoTarget(deviceContext->UsbTargetDevice),
                          &request
                          );

Requirements

Requirement Value
Target Platform Universal
Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfusb.h (include Wdfusb.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL <=DISPATCH_LEVEL

See also

WdfUsbTargetDeviceCreateWithParameters

WdfUsbTargetPipeGetIoTarget