資源簡介
自修改的CSerialPort類,在VS2015下調試正常工作,支持unicode字符集,支持字符串和二進制(16進制)收發,串口反復打開關閉正常,支持查詢計算機內可用串口
代碼片段和文件信息
/*
**????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_
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????26907??2015-12-07?22:50??SerialPort.cpp
?????文件???????5458??2015-11-23?22:17??SerialPort.h
-----------?---------??----------?-----??----
????????????????32365????????????????????2
- 上一篇:8255A+8253+8259控制步進電機
- 下一篇:電子商城前端代碼
評論
共有 條評論