WdfUsbInterfaceGetNumEndpoints function (wdfusb.h)

[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.

Syntax

BYTE WdfUsbInterfaceGetNumEndpoints(
  WDFUSBINTERFACE UsbInterface,
  UCHAR           SettingIndex
);

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.

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 the driver supplies an invalid object handle.

Remarks

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

Examples

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

   
Target Platform Universal
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

WdfUsbTargetDeviceGetInterface