资源简介
高性能串口异步通信类。
代码片段和文件信息
/*
** FILENAME CSerialPort.cpp
**
** PURPOSE This class can read write and watch one serial port.
** It sends messages to its owner when something happends on the port
** The class creates a thread for reading and writing so the main
** program is not blocked.
**
** CREATION DATE 15-09-1997
** LAST MODIFICATION 12-11-1997
**
** AUTHOR Remon Spekreijse
**
**
*/
#include “stdafx.h“
#include “SerialPort.h“
#include
//
// Constructor
//
CSerialPort::CSerialPort()
{
m_hComm = NULL;
// initialize overlapped structure members to zero
m_ov.Offset = 0;
m_ov.OffsetHigh = 0;
// create events
m_ov.hEvent = NULL;
m_hWriteEvent = NULL;
m_hShutdownEvent = NULL;
m_szWriteBuffer = NULL;
m_bThreadAlive = FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 18508 2011-11-04 16:31 CSerialPort\SerialPort.cpp
文件 3129 2011-11-04 15:17 CSerialPort\SerialPort.h
目录 0 2012-09-27 10:43 CSerialPort
----------- --------- ---------- ----- ----
21637 3
评论
共有 条评论