Topic: errors from catch (Exception ex)
First I could not get the examples to compile using vars.. It kept complaining about tryOpen not being a member. So I have to use read class types. Now I get this... See comments in try catch. I can use HID.dll from my command line C application with a report ID of 18 using 4 and 2 as a write. So I know the device is good.
HidDeviceLoader loader = new HidDeviceLoader();
HidDevice device = loader.GetDevices(0x16d0, 0x0d04).First();
var bytes = new byte[device.MaxOutputReportLength];
bytes = 18;
bytes = 4;
bytes = 1;
int retry = 10;
catch (Exception ex)
MessageBox.Show("Timeout waiting for API to respond: " + ex.Message);
// ex.InnerException - The parameter is incorrect.
// ex.message operation failed early