In our system, we get data messages from a HID device, which is implemented as a vendor defined one, through Windows. The way to access the device is very orthodox I think: execute ReadFile in the asynchronous mode, wait its completion by WaitForXXX, and then get input data by GetOverlappedResult when the ReadFile process completes.
We have been using the system for more than ten years since the age of Win2K. But recently, maybe since we have replaced the host to Win7, we have been experiencing a trouble: The GetOverlappedResult fails and GetLastError executed just after the failure returns ERROR_DEVICE_NOT_CONNECTED(=0x0000048F). We traced the USB traffic and found that SOFs and IN tokens were sent continuously even when the failure occurred. We don't have any ideas why Windows determines that the USB connection is disconnected and returns the error code in the situation like that.
We have many systems. But the trouble is not caused in every one. Almost all of them don't cause that.
I'm very pleased if someone who has the same experience gives me some advice or hint to approach its root cause.
Thanks in advance.