ComFlush Procedure

Flushes all characters from the transmiting or receiving queue of the specified COM port.

Syntax

[ lStatus = ] ComFlush ( lPort [, enMode] )

The ComFlush procedure syntax has the following parts:

 

Name

Type

Description

lStatus

Long

Status, -1 on failure, 0 on success

lPort

Val Long

Serial port number (1 for COM1, etc.)

enMode

Val enumAIoFlush

Com/Lpt Flush Mode. If no value is given, the default is used.

Where

enumAIoFlush:

 

Name

Value

Description

aioFlushOutput

1

Flush Output

aioFlushInput

2

Flush Input

aioFlushBoth

3 *

Flush Input/Output

Comments

The lPort must be opened by calling the ComOpen procedure or by configuring an RS232 driver in the System.

Example

CommFlush(1, aioFlushBoth)

See Also

ComClose, ComOpen