GetCommMask

  BOOL GetCommMask(hCommDev, lpdwEvtMask)    
  HANDLE hCommDev; /* identifies the comm device */
  LPDWORD lpdwEvtMask; /* address of the event mask */

The GetCommMask function retrieves the value of the event mask for the specified communications device.

Parameters

hCommDev

Identifies the communications device whose event mask is to be retrieved. The CreateFile function returns this value.

lpdwEvtMask

Points to the variable to be filled in with mask of events which are currently enabled. The mask is some combination of the following values:

Value Meaning

EV_BREAK Sets when a break is detected on input.
EV_CTS Sets when the clear-to-send (CTS) signal changes state.
EV_DSR Sets when the data-set-ready (DSR) signal changes state.
EV_ERR Sets when a line-status error occurs. Line-status errors are CE_FRAME, CE_OVERRUN, and CE_RXPARITY.
EV_RING Sets when a ring indicator is detected.
EV_RLSD Sets when the receive-line-signal-detect (RLSD) signal changes state.
EV_RXCHAR Sets when any character is received and placed in the receive queue.
EV_RXFLAG Sets when the event character is received and placed in the receive queue. The event character is specified in the device's control block.
EV_TXEMPTY Sets when the last character in the transmit queue is sent.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

See Also

SetCommMask