Author Topic: Determine that comport opening/closing procedure is finished  (Read 1679 times)

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Determine that comport opening/closing procedure is finished
« on: April 08, 2008, 11:54:49 am »
Hello

The opening/closing serial port process is synchronous operation.
Methods do not return while this process is not complete.

If you need be sure that serial port is ready, especial in case virtual port over Bluetooth, IrDA and etc.
You can monitor control lines (TraceState = [tsCTS,tsDSR, tsRLSD] and OnTraceStates event)
for additional detection of current port state.

Also you can use simple timeout delay - sleep() API function.

Roman

Quote
....
3.
How I can determine that comport opening/closing procedure is finished
after setting Active to true or false respectivelly ?
....

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