Export (0) Print
Expand All
Expand Minimize

QueryControllerType routine

The QueryControllerType routine gets information about the USB host controller to which the USB device is attached.

Syntax


NTSTATUS QueryControllerType(
  _In_   PVOID   BusContext,
  _Out_  PULONG  HcdiOptionFlags,
  _Out_  PUSHORT  PciVendorId,
  _Out_  PUSHORT PciDeviceId,
  _Out_  PUCHAR  PciClass,
  _Out_  PUCHAR  PciSubClass,
  _Out_  PUCHAR  PciRevisionId,
  _Out_  PUCHAR PciProgIf  
);

Parameters

BusContext [in]

Handle returned in the BusContext member of the USB_BUS_INTERFACE_USBDI_V3 structure by an IRP_MN_QUERY_INTERFACE request.

HcdiOptionFlags [out]

Reserved. Do not use.

PciVendorId [out]

Pointer to a USHORT variable that receives the PCI vendor ID for the USB host controller.

PciDeviceId [out]

Pointer to a USHORT variable that receives the PCI device ID for the USB host controller.

PciClass [out]

Pointer to a UCHAR variable that receives the PCI class for the USB host controller.

PciSubClass [out]

Pointer to a UCHAR variable that receives the PCI subclass for the USB host controller.

PciRevisionId [out]

Pointer to a UCHAR variable that receives the PCI revision number for the USB host controller.

PciProgIf [out]

Pointer to a UCHAR variable that receives the PCI programming interface for the USB host controller.

Return value

Returns STATUS_SUCCESS on success, and the appropriate error code on failure.

Remarks

PciClass is typically set to PCI_CLASS_SERIAL_BUS_CTLR (0x0C).

PciSubClass is typically set to PCI_SUBCLASS_SB_USB (0x03).

PciProgif is typically set to one of the following values:

0x00 - Universal Host Controller Interface (UHCI)

0x10 - Open Host Controller Interface (OHCI)

0x20 - Enhanced Host Controller Interface (EHCI)

The function definition that is provided on this reference page is an example function whose parameters are just placeholder names. The actual prototype of the function is declared in usbbusif.h as follows:

typedef NTSTATUS
  (USB_BUSIFFN *PUSB_BUSIFFN_QUERY_CONTROLLER_TYPE) (
    IN PVOID,
    OUT PULONG,
    OUT PUSHORT,
    OUT PUSHORT,
    OUT PUCHAR,
    OUT PUCHAR,
    OUT PUCHAR,
    OUT PUCHAR

Requirements

Header

Usbbusif.h (include Usbbusif.h)

IRQL

< = DISPATCH_LEVEL

See also

USB_BUS_INTERFACE_USBDI_V3
Bus Driver Interface Routines for USB Client Drivers

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft