B
OVERLAPPED ist mehr für gleichzeitige Lese- und Schreiboperationen.
ReadFile(Ex) (..) alleine löst das Problem auch nicht.
...
OVERLAPPED o;
o.hEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
SetCommMask (hCom, EV_RXCHAR);
WaitCommEvent (hCom, &dwEvtMask, &o);
if (WAIT_OBJECT_0 == WaitForSingleObject (o.hEvent, 0)) // INFINITE statt 0 wartet unendlich
{
if (dwEvtMask & EV_RXCHAR)
{
...
sind nur fragmente, nicht getestet in dieser Zusammenstellung.
Blackbird