WdfUsbTargetPipeGetIoTarget - NtDoc

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

WDFIOTARGET WdfUsbTargetPipeGetIoTarget(
  [in] WDFUSBPIPE Pipe
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfusb-wdfusbtargetpipegetiotarget)

WdfUsbTargetPipeGetIoTarget function

Description

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

Parameters

Pipe [in]

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

See also

WdfUsbInterfaceGetConfiguredPipe

WdfUsbTargetDeviceGetIoTarget