Bewerken

Delen via


WdfUsbInterfaceGetNumSettings function (wdfusb.h)

[Applies to KMDF and UMDF]

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

Syntax

BYTE WdfUsbInterfaceGetNumSettings(
  [in] WDFUSBINTERFACE UsbInterface
);

Parameters

[in] 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

Requirement Value
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(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf), UsbKmdfIrql(kmdf), UsbKmdfIrql2(kmdf), UsbKmdfIrqlExplicit(kmdf)

See also

WdfUsbTargetDeviceCreateWithParameters

WdfUsbTargetDeviceGetInterface

WdfUsbTargetDeviceSelectConfig