I'm using an USB server (MyUTN USB Device Server - http://www.myutn.net/home.html) to connect my Windows 2008 Server virtual machine to a USB Modem. The USB modem comes with a COM emulation driver which creates a virtual COM port on the Win2k8 Server. MyUTN also comes with a software that emulates the USB devices on the Win2k8 Server.
On the Win2k8 Server end, I run a modem application (an NT service) that connects to the modem (open port) via the virtual COM port and doesn't release it until the application is closed by the user.
The application and modem works fine on a physical USB port, but when I use it with MyUTN USB device server, I encounter a problem in which if the modem resets or disconnects momentarily, the port is not released. What happens is that my application is locked out of the modem. Even if I were to close my application, the port is not released. However the modem is working as the lights on it are turned on and blinking. The only way is resolve the lock out is to physically remove the modem and plug it back.
I've tried to resolve the problem but to no avail and urgently need to have the solution working by next Monday. One quick way which I can think of is whether I can programmatically release the occupied port. Please let me know if that can be done. Thanks.