Windows Driver Kit: Kernel-Mode Driver Framework
WdfUsbInterfaceGetEndpointInformation
The WdfUsbInterfaceGetEndpointInformation method retrieves information about a specified USB device endpoint and its associated pipe.
VOID
WdfUsbInterfaceGetEndpointInformation(
IN WDFUSBINTERFACE UsbInterface,
IN UCHAR SettingIndex,
IN UCHAR EndpointIndex,
OUT PWDF_USB_PIPE_INFORMATION EndpointInfo
);
Parameters
- UsbInterface
- A handle to a USB interface object that was obtained by calling WdfUsbTargetDeviceGetInterface.
- SettingIndex
- An index value that identifies an alternate setting for the interface. For more information about alternate settings, see the USB specification.
- EndpointIndex
- 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
- A pointer to a caller-allocated WDF_USB_PIPE_INFORMATION structure that the framework fills in.
Return Value
None.
A bug check occurs if a driver-supplied object handle is invalid.
Comments
For more information about the WdfUsbInterfaceGetEndpointInformation method and USB I/O targets, see USB I/O Targets.
Example
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
Versions: The WdfUsbInterfaceGetEndpointInformation method is available in version 1.0 and later versions of KMDF.
IRQL: <=DISPATCH_LEVEL
Headers: Declared in Wdfusb.h. Include Wdfusb.h.
Library: See Framework Library Versions.
See Also
WDF_USB_PIPE_INFORMATION, WdfUsbInterfaceGetNumEndpoints, WdfUsbTargetDeviceGetInterface