On the second point.
I did watch Gong Jianwei's program:)
But I have read at least five other related codes, and I don't know if they are all imitating each other or really necessary. All I see is ...
if(m_ctrlComm。 GetPortOpen())
m_ctrlComm。 SetPortOpen(FALSE);
m_ctrlComm。 SetCommPort( 1); //select com 1.
This type. I didn't see the same routine as I thought, so I asked.
On the first point:
It was written in WINAPI232 in the early days, and I don't know how to use the event-driven method. I can only create more than 60 threads in turn, and the program seems a little unstable, so I have to use controls.