Tech Support > Microsoft Windows > Development Resources > Problem with serial IO in C program in windows xp
Problem with serial IO in C program in windows xp
Posted by news@rtrussell.co.uk on September 14th, 2006


nleahcim@gmail.com wrote:
If ReadFile() returns without error then you should read and process
the data immediately (it means the data was already waiting in an input
buffer, and the IO_PENDING state was never entered). The code you
listed seems to read the data only after the WaitForSingleObject, which
isn't correct. However, I don't see how that mistake could result in
100% CPU usage.

Richard.
http://www.rtrussell.co.uk/
To reply by email change 'news' to my forename.



Similar Posts