WM_COMMNOTIFY
idDevice = wParam; /* communication-device ID */
nNotifyStatus = LOWORD(lParam); /* notification-status flag */
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.
idDevice
Value of wParam. Specifies the identifier of the communication device that is posting the notification message.
nNotifyStatus
Value of the low-order word of lParam. Specifies the notification status in the low-order word. The notification status may be one or more of the following flags:
Value | Meaning |
CN_EVENT | Indicates that an event has occurred that was enabled in the event word of the communication device. This event was enabled by a call to the SetCommEventMask function. The application should call the GetCommEventMask function to determine which event occurred and to clear the event. |
CN_RECEIVE | Indicates that at least cbWriteNotify bytes are in the input queue. The cbWriteNotify parameter is a parameter of the EnableCommNotification function. |
CN_TRANSMIT | Indicates that fewer than cbOutQueue bytes are in the output queue waiting to be transmitted. The cbOutQueue parameter is a parameter of the EnableCommNotification function. |
An application should return zero if it processes this message.
This message is sent only when the event word changes for the communication device. The application that sends WM_COMMNOTIFY must clear each event to be sure of receiving future notifications.