The WinUsb_QueryDeviceInformation function gets information about the physical device that is associated with a WinUSB interface handle.
BOOL WinUsb_QueryDeviceInformation( WINUSB_INTERFACE_HANDLE InterfaceHandle, ULONG InformationType, PULONG BufferLength, PVOID Buffer );
An opaque handle to the first interface on the device, which is returned by WinUsb_Initialize.
A value that specifies which interface information value to retrieve.
On input, InformationType must have the following value: DEVICE_SPEED (0x01).
The maximum number of bytes to read. This number must be less than or equal to the size, in bytes, of Buffer. On output, BufferLength is set to the actual number of bytes that were copied into Buffer.
A caller-allocated buffer that receives the requested value.
If InformationType is DEVICE_SPEED, on successful return, Buffer indicates the operating speed of the device. 0x03 indicates high-speed or higher; 0x01 indicates full-speed or lower.
WinUsb_QueryDeviceInformation returns TRUE if the operation succeeds. Otherwise, this routine returns FALSE, and the caller can retrieve the logged error by calling GetLastError.
GetLastError can return the following error code.
||The caller passed NULL in the InterfaceHandle parameter.|
|Header||winusb.h (include Winusb.h)|