I'm currently using the latest version of comport with Delphi 2010 and I was wondering if anyone can tell me how I could go about detecting or exception handling a Write to comport where the device has just been disconnected (removed) when a port connection has already been established.
I tried using a try except for when writing to an open port as well as OnException and OnError but the application said there's an Error 5 with message WriteFile Function failed.
Can anybody help me.
That's your detection technique. :-) Error 5 is all Windows tells you.
Then how would I go about adding an exception handling method to say when there is an error -> disconnect the comport and do not allow any more write until a connections is established again?
Do you find any solutions to this issue ?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.