我在delphi深度历险站看过有一个说是加强版的控件,好像就有你说的那个功能!去看看吧!

解决方案 »

  1.   

    谢谢你,但是我还是想用API阿,不然的话我用MSCOMM也可以了:(
    大家还有什么好主意吗?
      

  2.   

    你所说的控制RTS为高电平实际意义是什么?
    给出几个:1。DISABLE Disables the RTS line when the device is opened and leaves it disabled. 
    2。ENABLE Enables the RTS line when the device is opened and leaves it on. 
    3。HANDSHAKE Enables RTS handshaking. The driver raises the RTS line when the "type-ahead" (input) buffer is less than one-half full and lowers the RTS line when the buffer is more than three-quarters full. If handshaking is enabled, it is an error for the application to adjust the line by using the EscapeCommFunction function. 
    4。TOGGLE Specifies that the RTS line will be high if bytes are available for transmission. After all buffered bytes have been sent, the RTS line will be low. 
      

  3.   

    控制RTS的方法是:DCB.Flags的倒数第4位。
    1.DISABLE=0
    2.ENABLE=1
    3.HANDSHAKE=2
    4.TOGGLE=3
      

  4.   

    抱歉
    控制RTS的方法是:DCB.Flags的第1个字节
    1.DISABLE=0
    2.ENABLE=1
    3.HANDSHAKE=2
    4.TOGGLE=3
      

  5.   

    var
      dcb:tdcb;
    begin
      dcb.flags:=dcb or $1000;
    //dcb.flags占4个字节,用or来改变第个1字节的值
    end;
      

  6.   

    我也用API写过串口通信程序,但总(迟早)是会出错。(如程序连续运行十几个小时之后,总会考虑不周呀。)。其实SPComm控件相当不错的,功能强大,看看去(带源码的)?
    以前用Async32,但现在这控件好像不能用了。另,什么“DCB在DELPHI里少了很多的数据成员”我就不懂了。