首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 嵌入开发 > WinCE >

Wince平台下,使用CSerialPort类的有关问题

2012-03-17 
Wince平台下,使用CSerialPort类的问题Wince平台下,使用CSerialPort类,编译的时候有很多错误。 初学WinCE,不

Wince平台下,使用CSerialPort类的问题
Wince平台下,使用CSerialPort类,编译的时候有很多错误。 初学WinCE,不知如何解决
\SerialPort.cpp(155) : error C3861: 'BuildCommDCB': identifier not found
1>.\SerialPort.cpp(183) : error C2664: 'void ATL::CTraceFileAndLineInfo::operator ()(const wchar_t *,...) const' : cannot convert parameter 1 from 'const char [85]' to 'const wchar_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\SerialPort.cpp(366) : error C2664: 'void ATL::CTraceFileAndLineInfo::operator ()(const wchar_t *,...) const' : cannot convert parameter 1 from 'const char [16]' to 'const wchar_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\SerialPort.cpp(377) : error C2065: '_T' : undeclared identifier
1>.\SerialPort.cpp(377) : error C2143: syntax error : missing ')' before 'string'
1>.\SerialPort.cpp(377) : error C2059: syntax error : ')'
1>.\SerialPort.cpp(377) : error C2059: syntax error : ')'
1>.\SerialPort.cpp(403) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'char *' to 'LPCWSTR'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\SerialPort.cpp(470) : error C3861: 'GetOverlappedResult': identifier not found
1>.\SerialPort.cpp(575) : error C3861: 'GetOverlappedResult': identifier not found
1>.\SerialPort.cpp(630) : error C2664: 'strcpy' : cannot convert parameter 2 from 'LPCTSTR' to 'const char *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\SerialPort.cpp(631) : error C2664: 'strlen' : cannot convert parameter 1 from 'LPCTSTR' to 'const char *'

[解决办法]
好像是类型不匹配的问题,CE 下需要 Unicode
[解决办法]
有CE下的串口类,在网上找一下。
[解决办法]
路过,自己再仔细看下吧

[解决办法]
最好能贴出部分关键代码,便于大伙检查啊!
[解决办法]
CE下的串口类在哪里?

热点排行