WdfUsbTargetPipeGetIoTarget function (wdfusb.h)

[Applies to KMDF and UMDF]

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

Syntax

WDFIOTARGET WdfUsbTargetPipeGetIoTarget(
  [in] WDFUSBPIPE Pipe
);

Parameters

[in] Pipe

A handle to a framework pipe object that was obtained by calling WdfUsbInterfaceGetConfiguredPipe.

Return value

WdfUsbTargetPipeGetIoTarget returns a handle to the I/O target object that is associated with the specified pipe object.

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

Remarks

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

Examples

The following code example shows how an EvtDeviceD0Entry callback function can start a continuous reader for a USB pipe.

NTSTATUS
MyEvtDeviceD0Entry(
    IN  WDFDEVICE Device,
    IN  WDF_POWER_DEVICE_STATE PreviousState
)
{
    PDEVICE_CONTEXT  pDeviceContext;
    NTSTATUS  status;

    pDeviceContext = GetMyDeviceContext(Device);

    status = WdfIoTargetStart(WdfUsbTargetPipeGetIoTarget(pDeviceContext->InterruptPipe));

    return status;
}

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 Any level
DDI compliance rules DriverCreate(kmdf), FailD0EntryIoTargetState(kmdf)

See also

WdfUsbInterfaceGetConfiguredPipe

WdfUsbTargetDeviceGetIoTarget