WdfUsbInterfaceGetInterfaceNumber function

[Applies to KMDF and UMDF]

The WdfUsbInterfaceGetInterfaceNumber method returns the interface number of a specified USB interface object.

Syntax

BYTE WdfUsbInterfaceGetInterfaceNumber(
  WDFUSBINTERFACE UsbInterface
);

Parameters

UsbInterface

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

Return Value

WdfUsbInterfaceGetInterfaceNumber returns the interface number.

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

Remarks

For more information about interface numbers, see the USB specification.

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

Examples

The following code example obtains the interface number of a specified USB interface object.

BYTE interfaceNumber; 

interfaceNumber = WdfUsbInterfaceGetInterfaceNumber(UsbInterface);

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