Windows Driver Kit: Kernel-Mode Driver Framework
WdfUsbTargetDeviceGetNumInterfaces

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

UCHAR
  WdfUsbTargetDeviceGetNumInterfaces(
    IN WDFUSBDEVICE  UsbDevice
    );

Parameters

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

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.

Comments

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

Example

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

UCHAR numInterfaces;

numInterfaces = WdfUsbTargetDeviceGetNumInterfaces(UsbDevice);

Requirements

Versions: The WdfUsbTargetDeviceGetNumInterfaces method is available in version 1.0 and later versions of KMDF.

IRQL: <=DISPATCH_LEVEL

Headers: Declared in Wdfusb.h. Include Wdfusb.h.

See Also

WdfUsbTargetDeviceCreate


Send feedback on this topic
Built on October 01, 2009
Page view tracker