FlushComm

2.x

  int FlushComm(idComDev, fnQueue)    
  int idComDev; /* communications-device identifier */
  int fnQueue; /* queue to flush, */  

The FlushComm function flushes all characters from the transmission or receiving queue of the specified communications device.

Parameters

idComDev

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

fnQueue

Specifies the queue to be flushed. If this parameter is zero, the transmission queue is flushed. If the parameter is 1, the receiving queue is flushed.

Return Value

The return value is zero if the function is successful. It is less than zero if idComDev is not a valid device or if fnQueue is not a valid queue. The return value is positive if there is an error for the specified device. For a list of the possible error values, see the GetCommError function.

See Also

GetCommError, OpenComm