GetCommEventMask

2.x

  UINT GetCommEventMask(idComDev, fnEvtClear)    
  int idComDev; /* communications device identifier */
  int fnEvtClear; /* events to clear in the event word */

The GetCommEventMask function retrieves and then clears the event word for a communications device.

Parameters

idComDev

Specifies the communication device to be examined. The OpenComm function returns this value.

fnEvtClear

Specifies which events are to be cleared in the event word. For a list of the event values, see the description of the SetCommEventMask function.

Return Value

The return value specifies the current event-word value for the specified communications device if the function is successful. Each bit in the event word specifies whether a given event has occurred; a bit is set (to 1) if the event has occurred.

Comments

Before the GetCommEventMask function can record the occurrence of an event, an application must enable the event by using the SetCommEventMask function.

If the communication device event is a line-status or printer error, the application should call the GetCommError function after calling GetCommEventMask.

See Also

GetCommError, OpenComm, SetCommEventMask