I'm writing some communications software for Window NT, and studied
the TTY example from the VC 4.2 CD ROM.
The file 'COMMDEV ( npTTYInfo )' is opened with the FILE_FLAG_OVERLAPPED
value. In the ComWatchProc function (thread) the function
WaitCommEvent() is called:
WaitCommEvent( COMDEV( npTTYInfo ), &dwEvtMask, NULL );
The third parameter is NULL, but according to the books-on-line
the OVERLAPPED (third) parameter should not be NULL for overlapped
(Help for WaitCommEvent)
"If hFile was opened with FILE_FLAG_OVERLAPPED, the lpOverlapped
parameter must not be NULL. It must point to a valid OVERLAPPED
structure. If hFile was opened with FILE_FLAG_OVERLAPPED and
lpOverlapped is NULL, the function can incorrectly report that the
operation is complete."
Anyway, I think the TTY example is hard to understand.
Any reactions ?