WM_COMMNOTIFY is Obsolete for Win32-Based Applications

ID: Q94561


The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API), included with:
    • Microsoft Windows NT, versions 3.1, 3.5, 3.51
    • Microsoft Windows 95


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.

Additional query words: 3.10 3.50 4.00

Keywords : kbNTOS310 kbNTOS350 kbNTOS351 kbWinOS95
Version :
Platform :
Issue type :


Last Reviewed: September 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.