HidLibrary
HidLibrary copied to clipboard
ReadReport after Timeout
ReadReport will always fail after a timeout happens the first time. The only way I found to clear the issue is to close the handle and open a new one. I tried CancelIOex, with the handle and a null pointer, when an error during ReadFile or timeout occurs. But the ReadFile still times out while the analyzer shows data available.
Can you please check if this is fixed in the latest?
That helps: CancelIO if not Success:
case NativeMethods.WAIT_TIMEOUT:
status = HidDeviceData.ReadStatus.WaitTimedOut;
NativeMethods.CancelIo(Handle); // !!!
buffer = new byte[] { };
break;
thankyou , it work @teplofizik