資源簡介
用vc 2003 使用com組件方式寫的window下通用的串口通信接口
代碼片段和文件信息
/*@doc
@module?RS232SERIAL.cpp:?Implementation?of?the?communication?channel?CRS232Serial.|
******************************************************************************/
//?MN:?Search?for?MN:
//?MN:?StartReadThread?and?StartWriteThread?used?_beginThreadEx?instead?of
//?????CreateThread?as?a?consquence?this?module?did?not?link?in?non-debug
//?????mode.
//?????I?changed?the?function?call?back?to?CreateThread?but?I?could?not
//?????establish?why?Jeremy?changed?the?function?call?from?originall?CreateThread
//?????to?_beginThreadEx.
#include?“stdafx.h“
//#include?“..\\LogFileCode\\Logger.h“
LPTSTR?FindSubStr(LPTSTR?source?LPTSTR?subStr)
{
int?srcLen?=?_tcslen(source);
int?subLen?=?_tcslen(source);
if?(subLen?>?srcLen)
return?NULL;
int?i?k;
for?(
評論
共有 條評論