Home > Back-end >  Delphi7 use spcomm after shutdown, restart the program always prompt Error opening serial port "
Delphi7 use spcomm after shutdown, restart the program always prompt Error opening serial port "

Time:09-21

The problem is not always came out, such as program in normal work, a serial port can receive data, but if the normal exit the program, then in up program, will be the Error opening serial port, and the system restarts, also sometimes explode this question,

Environment is the Delphi 7.0 xp system and embedded communication,

When I was in form destroy y already stopcomm,
Is what reason, for a long time,

CodePudding user response:

Error opening serial port,

A serial port being used?

CodePudding user response:

Is to use spcomm open error, I use a serial port tool to open is no problem, what problem?

CodePudding user response:

Check your code, don't you use the thread of what, an instance is not entirely before you exit (thread), a serial port is still being used,

CodePudding user response:

3/f, look at the task manager after you exit the program, your program is still in the process list,
  • Related