WdfUsbTargetDeviceGetNumInterfaces function (wdfusb.h)

[Applies to KMDF and UMDF]

The WdfUsbTargetDeviceGetNumInterfaces method returns the number of USB device interfaces that are supported by a specified USB device.


UCHAR WdfUsbTargetDeviceGetNumInterfaces(
  [in] WDFUSBDEVICE UsbDevice


[in] UsbDevice

A handle to a USB device object that was obtained from a previous call to WdfUsbTargetDeviceCreateWithParameters.

Return value

WdfUsbTargetDeviceGetNumInterfaces returns the number of USB interfaces that the device supports.

A bug check occurs if a driver-supplied object handle is invalid.


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


The following code example obtains the number of USB device interfaces that a specified USB device supports.

UCHAR numInterfaces;

numInterfaces = WdfUsbTargetDeviceGetNumInterfaces(UsbDevice);


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)
DDI compliance rules DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf), UsbKmdfIrql(kmdf), UsbKmdfIrql2(kmdf), UsbKmdfIrqlExplicit(kmdf)

See also