BUG: EV_RING Isn't Detected in WaitCommEvent (137862)
The information in this article applies to:
- Microsoft Win32 Software Development Kit (SDK) 4.0
This article was previously published under Q137862 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.
Modification Type: | Major | Last Reviewed: | 3/5/1999 |
---|
Keywords: | KB137862 |
---|
|