Windows Driver Kit: Kernel-Mode Driver Framework
WdfUsbInterfaceGetNumEndpoints
The WdfUsbInterfaceGetNumEndpoints method returns the number of endpoints that are associated with a specified alternate setting of a specified USB interface.
BYTE
WdfUsbInterfaceGetNumEndpoints(
IN WDFUSBINTERFACE UsbInterface,
IN UCHAR SettingIndex
);
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.
Return Value
If the specified index is valid, WdfUsbInterfaceGetNumEndpoints returns the number of endpoints that are associated with the specified interface's alternate setting. Otherwise, the method returns zero.
A bug check occurs if a driver-supplied object handle is invalid.
Comments
For more information about the WdfUsbInterfaceGetNumEndpoints method and USB I/O targets, see USB I/O Targets.
Example
The following code example obtains the number of endpoints for alternate setting 0 of a specified USB interface.
BYTE numEndpoints;
numEndpoints = WdfUsbInterfaceGetNumEndpoints(
UsbInterface,
0
);
Requirements
Versions: The WdfUsbInterfaceGetNumEndpoints 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
WdfUsbTargetDeviceGetInterface