USB转串口(使用spcomm)问题
使用usb转串口的设备,用spcomm控件直接向串口发送、接收数据。
打开串口时出现错误“File handle is not a comm handle”;
我将spcomm源代码中的以下语句封掉
if GetFileType( hNewCommFile ) <> FILE_TYPE_CHAR then
begin
CloseHandle( hNewCommFile );
raise ECommsError.Create( 'File handle is not a comm handle ' )
end;
此后,startcomm可以通过,使用WriteCommData发送数据也没有报错,但是却无法接收到数据。
请问是什么问题呀!