-
Notifications
You must be signed in to change notification settings - Fork 231
Description
I am using a .NetFramework 4.8 Windows application where I have installed the HidLibrary version 3.3.40 from NuGet package manager. My operating system is Windows 10 pro 64-bit with build version 10.0.19045.
I am using System.Windows.Forms for my main form that includes Close button to close the device. Whenever, I trigger device close, the software execution triggers the CloseDevice() in the HidLibrary. I debugged the issue and the library is frozen exactly when trying to close one of the handles (ReadHandle) in CLoseDeviceIO(ReadHandle). More specifically, the indefinite blockage is happening in NativeMethods.CloseHandle(handle)
I can see that NativeMethods.CancelIoEx(handle, IntPtr.Zero) is triggered fine and returned successfully.
I tried cloning the library and point to latest master branch, and tried using different versions of .NetFramework 4.5 but nothing worked.
To be fair I have managed to close the device successfully but this wasn't stable at all. It was completely in deterministic behavior in that regards