The QueryBusInformation routine gets information about the bus.
NTSTATUS QueryBusInformation( _In_ PVOID BusContext, _In_ ULONG Level, _Inout_ PVOID BusInformationBuffer, _Out_ PULONG BusInformationBufferLength, _Out_opt_ PULONG BusInformationActualLength );
- BusContext [in]
Handle returned in the BusContext member of the USB_BUS_INTERFACE_USBDI_V0 structure by an IRP_MN_QUERY_INTERFACE request.
- Level [in]
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.
- BusInformationBuffer [in, out]
Pointer to a buffer that receives the requested bus information.
- BusInformationBufferLength [out]
On input, the length of the buffer specified by BusInformationBuffer. On output, the length of the output data.
- BusInformationActualLength [out, optional]
Specifies the length of the output data.
QueryBusInformation returns one of the following values:
The call completed successfully.
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.
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.
The function definition that is provided on this reference page is an example routine 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_BUS_INFORMATION) ( IN PVOID, IN ULONG, IN OUT PVOID, IN OUT PULONG, OUT PULONG );
|< = DISPATCH_LEVEL|
- Bus Driver Interface Routines for USB Client Drivers