WORD FAR * SetCommEventMask(nCid,nEvtMask)
This function enables and retrieves the event mask of the communication device specified by the nCid parameter. The bits of the nEvtMask parameter define which events are to be enabled. The return value points to the current state of the event mask.
Parameter | Type/Description |
nCid | int Specifies the communication device to be enabled. The OpenComm function returns this value. | |
nEvtMask | int Specifies which events are to be enabled. It can be any combination of the values shown in Table R.14, “Event Values.” |
The return value points to an integer event mask. Each bit in the event mask specifies whether or not a given event has occurred. A bit is 1 if the event has occurred.
Table R.14 lists the event values for the nEvtMask parameter:
Table R.14 Event 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_PERR | Sets when a printer error is detected on a parallel device. Errors are CE_DNS, CE_IOE, CE_LOOP, and CE_PTO. |
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. |