BUG: EV_RING Isn't Detected in WaitCommEvent

Last reviewed: October 9, 1995
Article ID: Q137862
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) version 4.0

SYMPTOMS

In a Win32-based environment, an application is supposed to detect a RING indication on a serial communications port by passing EV_RING as one of the flags in SetCommMask. After a RING has occurred, a call to WaitCommEvent should indicate that an EV_RING event has occurred. However, when this is done in Windows 95, WaitCommEvent never indicates that an EV_RING event occurred. In Windows NT, WaitCommEvent does indicate the EV_RING properly.

RESOLUTION

There are two possible resolutions. One solution to this problem is to enable your modem device to indicate a ring by sending the string "RING" to the port. Your application can detect that a RING has occurred by reading the characters coming into the port and determining if the string "RING" has been received.

Another solution is to create a thread that repeatedly calls GetCommModemStatus to look for the MS_RING_ON flag to be set in the returned modem status. This method, however, severely degrades system performance.

The following code demonstrates this method:

   for (;;)
   {
      GetCommModemStatus(hCommPort, &dwModemStatus)
      if (MS_RING_ON & dwModemStatus)
         // RING has occurred
   }


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 4.00 Windows 95
KBCategory: kbprg kbbuglist
KBSubcategory: BseComm


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 9, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.