Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Windows Develop Other
Title: CSerialPort-problem- Download
 Description: CSerialPort class is a good serial interface communication, but it has no closing method of the serial port, if you don t understand the implementation principle of this class, to write a serial port closure method may lead to the following questions: 1, close a serial port with the closehandle method: as the call after class methods StartMonitoring generates a serial port communication thread, the thread to keep access to a serial port, this method can bring obvious errors. 2, use StopMonitoring method first stop serial port to monitor, then use closehandle close the serial port: because StopMonitoring just hang up the process, doing so will make the program at the end of the destructors cannot send to suspend the event to the thread, may cause the program can t quit, main window is turned off, can still be seen in the process in task manager. 3, with SetEvent first send the thread to suspend the event, after the waiting thread to use closehandle to close a serial port,
 Downloaders recently: [More information of uploader blacks]
 To Search:
File list (Check if you may need any files):
 

CSerialPort problem .txt
    

CodeBus www.codebus.net