BUG: EV_RING Isn't Detected in WaitCommEventID: Q137862
|
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.
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
}
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 query words: 4.00 Windows 95
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 3, 1999