Page 1 of 1

ReadFile

PostPosted: Mar 13, 2003 @ 12:45pm
by Guest

PostPosted: Mar 13, 2003 @ 12:54pm
by refractor
Here we go again... (there was a thread here recently about reading from the serial port).

You're telling it to only read one byte:

ReadFile (m_hCom, Byte, 1, &dwBytesTransferred, 0);

and dwBytesTransferred is filled for each read - it's not cumulative, so you're making an infinite loop...

(dwBytesTransferred will always be one because you're only asking for one).

Addendum:
http://forums.pocketmatrix.com/viewtopic.php?t=10086