WdfUsbInterfaceGetNumSettings function

[Applies to KMDF and UMDF]

The WdfUsbInterfaceGetNumSettings method returns the number of alternate settings that a specified USB interface supports.

Syntax

BYTE WdfUsbInterfaceGetNumSettings(
  WDFUSBINTERFACE UsbInterface
);

Parameters

UsbInterface

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

Return Value

WdfUsbInterfaceGetNumSettings returns the number of alternate settings that the specified USB interface supports.

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

Remarks

Your driver can call WdfUsbInterfaceGetNumSettings after it has called WdfUsbTargetDeviceCreateWithParameters.

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

Examples

The following code example obtains the number of alternate settings that are available for a specified USB interface.

BYTE altSettings;

altSettings = WdfUsbInterfaceGetNumSettings(UsbInterface);

Requirements

   
Target Platform Universal
Minimum KMDF version 1.5
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

WdfUsbTargetDeviceCreateWithParameters

WdfUsbTargetDeviceGetInterface

WdfUsbTargetDeviceSelectConfig