PnP change

Is it possible to detect when a port is disconnected or unplugged? the PC captures it but the port is still open.  

Trying to do communication on a disconnected or unplugged port should normally trigger VaComm.OnError.

When the COM port is idle though, there is no notification mechanism.

Ok Have tried, established coms, and halfway through communication pulled the plug. for whatever reason (Vista) I get no error, no change, the port still show active, any other ideas please

Is there any communication still ongoing when unplugging? When the COM port is idle, I indeed do no expect an error.

If you want notification of USB comports being removed, I recommend the following article:

http://alpha-2006.blogspot.com/2006/09/delphi-how-can-i-detect-if-usb-device.html

Implement an USBRemove event handler an check if your COM-port is still available.

Kind regards
Søren Bech