SMComm

所属分类:通讯编程
开发工具:Visual C++
文件大小:9KB
下载次数:9
上传日期:2008-07-29 10:56:12
上 传 者鬼屋天使
说明:  本库名为 Simple Multiple Communication 简称SMCOMM,本库作用是实现多串口同步的读写操作。
(The library called Simple Multiple Communication referred to SMCOMM, the library role is to realize the serial number of the read and write operations simultaneously.)

文件列表:
SMComm (0, 2008-07-08)
SMComm\SMComm.h (572, 2008-07-14)
SMComm\SMComm.lib (26670, 2008-07-12)

================================================================================ 静态库:SMComm 项目概述 ================================================================================ 本库名为 Simple Multiple Communication 简称SMCOMM,本库作用是实现多串口同步的读写操作。 具体方法在 SMComm.h中有介绍,以下是使用伪码: #include "SMComm.h" HANDLE hCom; int bufSize; int iWriteState; int iReadState; void CommTest() { hCom = InitializationComm(hCom , "COM1" , 19200 , 8 , 2 , 1 ,1000); iWriteState = WriteComm(hCom ,(char *)sendbuf , bufSize , 0); if(!iWriteState) { ::OUTPUTDEBUGSTRINGA("Write Com error!\n"); } iReadState = ReadComm(hCom , (char *)recvbuf , bufSize , 0); if(!iReadState) { ::OUTPUTDEBUGSTRINGA("Read Com error!\n"); } if(!CloseComm(hCom)) { ::OUTPUTDEBUGSTRINGA("COM Close error!\n"); } } 现功能不是很完善,日后会继续完善此项目直至实现所有串口功能 望大家支持 !^.^

近期下载者

相关文件


收藏者