I was wondering if you could answer to this question. I’m writing a class that incorporate all FPGA controls and exceptions for my application (I would like to avoid using WM_DEVICECHANGE at this level).
When I unplug the XEM my software reports 0 as result of a GetDeviceCount(). So far so good. When I plug the XEM again (without deallocating my okUsbXEM3001v2 instance), GetDeviceCount() returns 1. At this point the communication doesn’t work anymore. If I deallocate/allocate the instance of okUsbXEM3001v2 I use to communicate, I obtain the same result. If i quit the application and start over, no result. No connection. Finally if I unplug/plug the XEM and start again the application, everything goes well.
What can I do to avoid this behavior? Any advice?