// wdfusb.h
BYTE WdfUsbInterfaceGetNumEndpoints(
[in] WDFUSBINTERFACE UsbInterface,
[in] UCHAR SettingIndex
);
View the official Windows Driver Kit DDI reference
No description available.
[Applies to KMDF and UMDF]
The WdfUsbInterfaceGetNumEndpoints method returns the number of endpoints that are associated with a specified alternate setting of a specified USB interface.
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.
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 the driver supplies an invalid object handle.
For more information about the WdfUsbInterfaceGetNumEndpoints method and USB I/O targets, see USB I/O Targets.
The following code example obtains the number of endpoints for alternate setting 0 of a specified USB interface.
BYTE numEndpoints;
numEndpoints = WdfUsbInterfaceGetNumEndpoints(
UsbInterface,
0
);
WdfUsbTargetDeviceGetInterface