WM_COMMNOTIFY is Obsolete for Win32-Based Applications (94561)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows NT 3.1
- the operating system: Microsoft Windows NT 3.5
- the operating system: Microsoft Windows NT 3.51
This article was previously published under Q94561 SUMMARY
Under Windows version 3.1, the WM_COMMNOTIFY message is posted by a
communication device driver whenever a COM port event occurs. The message
indicates the status of a window's input or output queue.
This message is not supported for Win32-based applications. However, WOW
supports the EnableCommNotification() API for 16-bit Windows-based
applications running on Windows NT.
MORE INFORMATION
To duplicate the Windows 3.1 functionality for a Win32-based application,
refer to the TTY sample, included with the SDK. The TTY sample is a common
code base sample, which uses EnableCommNotification() under Windows 3.1 to
tell COMM.DRV to post messages to the TTY window.
In Win32, this behavior is simulated with a secondary thread which uses
WaitCommEvent() to block on the port and PostMessage() to indicate
when the desired event has occurred.
TTY.C defines WM_COMMNOTIFY if WIN32 is defined. Using this method,
WM_COMMNOTIFY notifications are simulated but use the same message
definition as Windows 3.1.
The TTY sample is located on the Win32 SDK CD in \MSTOOLS\SAMPLES\COMM.
Modification Type: | Major | Last Reviewed: | 3/15/2004 |
---|
Keywords: | KB94561 |
---|
|