Expand Minimize

WdfUsbInterfaceGetEndpointInformation method

[Applies to KMDF and UMDF]

The WdfUsbInterfaceGetEndpointInformation method retrieves information about a specified USB device endpoint and its associated pipe.

Syntax


VOID WdfUsbInterfaceGetEndpointInformation(
  [in]   WDFUSBINTERFACE UsbInterface,
  [in]   UCHAR SettingIndex,
  [in]   UCHAR EndpointIndex,
  [out]  PWDF_USB_PIPE_INFORMATION EndpointInfo
);

Parameters

UsbInterface [in]

A handle to a USB interface object that was obtained by calling WdfUsbTargetDeviceGetInterface.

SettingIndex [in]

An index value that identifies an alternate setting for the interface. For more information about alternate settings, see the USB specification.

EndpointIndex [in]

An index value that identifies an endpoint that is associated with the specified alternate setting of the specified interface. (This index value is not the endpoint address.)

EndpointInfo [out]

A pointer to a caller-allocated WDF_USB_PIPE_INFORMATION structure that the framework fills in.

Return value

None.

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

Remarks

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

Examples

The following code example obtains the number of endpoints that a USB interface supports and then calls WdfUsbInterfaceGetEndpointInformation for each endpoint.


WDF_USB_PIPE_INFORMATION endPointInfo;
BYTE settingIndex, i;

settingIndex = 0;
numEndpoints = WdfUsbInterfaceGetNumEndpoints(
                                          UsbInterface,
                                          settingIndex
                                          );

for (i = 0; i < numEndpoints; i++){
    WDF_USB_PIPE_INFORMATION_INIT(&endPointInfo);
    WdfUsbInterfaceGetEndpointInformation(
                                          UsbInterface,
                                          settingIndex,
                                          i,
                                          &endPointInfo
                                          );

    //
    // Examine endpoint information here.
    //
...
}

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

<=DISPATCH_LEVEL

DDI compliance rules

DriverCreate, KmdfIrql, KmdfIrql2, UsbKmdfIrql, UsbKmdfIrql2

See also

WDF_USB_PIPE_INFORMATION
WdfUsbInterfaceGetNumEndpoints
WdfUsbTargetDeviceGetInterface

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.