IOCTL_ADAPT_GET_DEVICE_SPEED |
Description
This command attempts to report the current operating speed of the USB device. It uses the IsDeviceHighSpeed routine, but this routine is only supported in Version 1 of the USBD interface. Windows 2K SP4, Windows XP and later all support Version 1 of the USBD interface. If the IsDeviceHighSpeed routine is not available, DEVICE_SPEED_UNKNOWN is returned. The possible return value of this IOCTL is defined in the cyioctl.h header file.
A pointer to a 4-byte variable is passed as both the lpInBuffer and lpOutBuffer parameters to the DeviceIoControl( ) function.
The size of the variable (4) is passed in the nInBufferSize and nOutBufferSize parameters.
Defines (cyioctl.h)
#define DEVICE_SPEED_UNKNOWN 0x00000000 #define DEVICE_SPEED_LOW_FULL 0x00000001 #define DEVICE_SPEED_HIGH 0x00000002 #define DEVICE_SPEED_SUPER 0x00000004
Example
DWORD dwBytes = 0; ULONG DevSpeed; DeviceIoControl(hDevice, IOCTL_ADAPT_GET_DEVICE_SPEED, &DevSpeed, sizeof (ULONG), &DevSpeed, sizeof (ULONG), &dwBytes, NULL);
|