Posted on 1997-03-10
I am writing in Borland C Win16, and I have a problem when sending and recieving files over the comport.
I have opened the comport and then filled the complete DCB structure and then used SetCommState to set the struct.
Then I have a small loop where I reads data from a file
and then sends the same data to the comport.
It looks more or less like this
IOStatus = _lread(hFile,(void _huge*)pBuf,fSize);
/* This is the only control I does when sending */
/* Is that correct ? */
WriteComm(PortResult,(const void FAR*)pBuf,IOStatus);
But it seems like the handshaking does not work with higher baudrates, or maybe not at all, with lower baudrates maybe the handshaking is not needed.. And if I understood everything right I don't need to take care of the handshaking only not to send more then is room in the outque.
It does not matter whether I use software or hardware flow control.
Would be very happy if someone could help me or explane to me what can be the problem or what I do wrong.