I have a strange problem with code that I inherited from another programmer who left the company, and you need to be guided by how to even begin to solve it.
The problem is that in semi-regular mode, we find that duplicate virtual USB communication ports are being created. For example, on my PC, when I look at ports in the device manager and select "View hidden devices", I have two entries for the same device: one on COM6 and one on COM8.
Unfortunately, we cannot reliably recreate the problem. We suspect this could happen when someone quickly disconnects and reconnects the USB cable when our software is running, but this must be confirmed.
As far as I can tell, the code was written assuming that no one would ever unplug the cable. I do not see any logic to detect this condition after starting SW. And this does not work when you reconnect the cable - silently generate read and write errors even after the cable is reconnected. You need to restart the program before it will work again.
I have very few serial and USB drives, and I lost a bit, how to even get started on fixing it.
Can anyone guess why this might happen?
Miscellaneous. details if they may be relevant:
USB ++ DLL
VS2008
FTDIBUS USB/
Windows XP Win7
( !)
