CnPack Forum

#1 关于TCnRS232的建议（其实是spcomm的问题）
其实是spcomm的问题
1.StartComm方法中
hNewCommFile := CreateFile(PChar(CommName), GENERIC_READ or GENERIC_WRITE,
0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL or FILE_FLAG_OVERLAPPED, 0);
修改为
hNewCommFile := CreateFile(PChar('\\.\' + CommName), GENERIC_READ or GENERIC_WRITE,
0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL or FILE_FLAG_OVERLAPPED, 0);
{解决串口号大于10无法识别的问题}

2.CommWndProc中加上默认消息处理
procedure TCnRS232.CommWndP ..

#1 >>Next Page

Forum:CnVCL 组件包
Thread:关于TCnRS232的建议（其 ...
Next Thread:建议cnpack增加多线程 ...

Home
Login

Powered by Discuz!