inputReady(): using MsgWaitForMultipleObjects() instead of
WaitForMultipleObjects() on file handles is nicer from within a
message pump, but here it is less confusing to use the latter (and
simply just block message delivery for its duration.)
DWORD rc;
HANDLE hFile = (HANDLE)_get_osfhandle(fd);
- rc = MsgWaitForMultipleObjects( 1,
- &hFile,
- FALSE, /* wait all */
- msecs, /*millisecs*/
- QS_ALLEVENTS);
+ rc = WaitForMultipleObjects( 1,
+ &hFile,
+ TRUE, /* wait all */
+ msecs); /*millisecs*/
/* 1 => Input ready, 0 => not ready, -1 => error */
switch (rc) {