Expand Minimize

WdfUsbInterfaceGetNumSettings method

[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

UsbInterface [in]

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

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

 

 

Send comments about this topic to Microsoft

顯示:
© 2015 Microsoft