читай мсдн: If a process attempts to change the device handle's event mask by using the SetCommMask function while an overlapped WaitCommEvent operation is in progress, WaitCommEvent returns immediately. The variable pointed to by the lpEvtMask parameter is set to zero.
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)