PUSB_BUSIFFN_QUERY_BUS_INFORMATION callback function (usbbusif.h)

The QueryBusInformation routine gets information about the bus.

Syntax

typedef NTSTATUS
  (USB_BUSIFFN *PUSB_BUSIFFN_QUERY_BUS_INFORMATION) (
    IN PVOID,
    IN ULONG,
    IN OUT PVOID,
    IN OUT PULONG,
    OUT PULONG
  );

Parameters

[in] unnamedParam1

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

[out, optional] unnamedParam2

Specifies the length of the output data.

[in, out] unnamedParam3

Pointer to a buffer that receives the requested bus information.

[out] unnamedParam4

On input, the length of the buffer specified by BusInformationBuffer. On output, the length of the output data.

[in] unnamedParam5

Specifies the level of information to be returned. If Level is 0, the function returns the total bandwidth and the total consumed bandwidth in bits per second. If Level is 1, the function returns the symbolic name of the controller in Unicode, in addition to the total bandwidth and the total consumed bandwidth.

Return value

QueryBusInformation returns one of the following values:

Return code Description
STATUS_SUCCESS The call completed successfully.
STATUS_BUFFER_TOO_SMALL The buffer was too small. This error code is returned in two cases:

Whenever Level == 0, this error code is returned if the size of the buffer pointed to by BusInformationBuffer is less than the size of the USB_BUS_INFORMATION_LEVEL_0 structure.

Whenever Level == 1, this error code is returned if the size of the buffer pointed to by BusInformationBuffer less than the size of the USB_BUS_INFORMATION_LEVEL_1 structure.

Remarks

The exact information returned by this routine depends on the value of the Level parameter. This routine replaces the USBD_QueryBusInformation library function provided by usbd.sys.

Requirements

Requirement Value
Target Platform Desktop
Header usbbusif.h (include Usbbusif.h)
IRQL < = DISPATCH_LEVEL

See also