I have an application that connects to a device through the USB port with a USB to Serial Converter. So the Port is treated as a comport say COM 1. Everything works good I can open, close, read and write to the Comport. But the problem comes in if the port gets disconnected and then I try to read from it. The application locks up or shuts down. This happens becuase the USB - Serial converter is viewed as a comport and then disapears when it is unplugged. Is there anything I can do to verify that the comport is still there prior to doing a read/write or what would be the best method to handle this error?
Thanks