/// <summary> /// Gets the device speed. /// </summary> /// <param name="deviceSpeed">The device speed.</param> /// <returns>True on success.</returns> public bool QueryDeviceSpeed(out DeviceSpeedTypes deviceSpeed) { deviceSpeed = DeviceSpeedTypes.Undefined; byte[] buf = new byte[1]; int uTransferLength = 1; bool bSuccess = WinUsbAPI.WinUsb_QueryDeviceInformation(mUsbHandle, DeviceInformationTypes.DeviceSpeed, ref uTransferLength, buf); if (bSuccess) { deviceSpeed = (DeviceSpeedTypes)buf[0]; } else { UsbError.Error(ErrorCode.Win32Error, Marshal.GetLastWin32Error(), "QueryDeviceInformation:QueryDeviceSpeed", this); } return(bSuccess); }
/// <summary> /// Gets the device speed. /// </summary> /// <param name="deviceSpeed">The device speed.</param> /// <returns>True on success.</returns> public bool QueryDeviceSpeed(out DeviceSpeedTypes deviceSpeed) { deviceSpeed = DeviceSpeedTypes.Undefined; byte[] buf = new byte[1]; int uTransferLength = 1; bool bSuccess = WinUsbAPI.WinUsb_QueryDeviceInformation(mUsbHandle, DeviceInformationTypes.DeviceSpeed, ref uTransferLength, buf); if (bSuccess) { deviceSpeed = (DeviceSpeedTypes) buf[0]; } else UsbError.Error(ErrorCode.Win32Error, Marshal.GetLastWin32Error(), "QueryDeviceInformation:QueryDeviceSpeed", this); return bSuccess; }