September 24, 2021, 12:41:34 pm


SMF - Just Installed!

Open Error

Started by jeremyk, September 04, 2014, 03:55:59 pm

Previous topic - Next topic


I'm getting some curious happenings in an app, which works fine for almost all the time, then for some (as yet unidentified) reason, things stop working correctly, and we get this error when re-connecting to the device:

Device "COM11" Open Error !!!
Access is denied

It's using TnrComm via serial, and if another part of the system is seen to stop working (one we are communicating with over tcp/ip) then we restart our serial comms. This happens by initially doing the following (fComPort is the TnrComm )


Then we recreate fComPort with the relevant parameters and try fComPort.Active:=True but this is when the above error happens.

It is as if the previous object didn't somehow release the com port when it closed. Is this likely at all ?

Customer is using XP embedded, and the app is built with XE6 (latest TnrComm)


Roman Novgorodov


You can try to add time delay after closing port. Something like that:


Also possible problem is in long data handling and serial port thread is not finished before you close port.
You need check that OnAfterReceive event finished before close port.

Roman Novgorodov
DeepSoftware llc
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.


Many thanks, that seems to have resolved it.