Hello Carlos,
A question, are the two applications both written by you or are you trying to interface a commercial application?
I use serial ports for many applications myself and have never needed to ‘pause’ one in order to do anything.
i am interested in the application and what you may be trying to achieve.
de EA5/G0EBB Alicante (i am NOT on QRZ.com).