Asynch Serial Comms - IO Completion
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi there, How can one allow the program to effectively wait until all the data has been received. I have used the HasOverlappedIOCompleted and GetOverlappedResult function so far. But data is still incomplete. Only when I use Sleep(50) then I get all the data at once. Code used to far : while (!HasOverlappedIOCompleted (&ovRead)); and, GetOverlappedResult(m_hComm, &ovRead, &BytesRead, TRUE); Are there any other ways to wait? I am reading 50 bytes at 9600 baud. Thanks