Expand Minimize

WdfUsbTargetPipeGetIoTarget method

[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

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

Requirements

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, FailD0EntryIoTargetState

See also

WdfUsbInterfaceGetConfiguredPipe
WdfUsbTargetDeviceGetIoTarget

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.