Flushes all characters from the transmiting or receiving queue of the specified COM port.
[ 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. |
Name |
Value |
Description |
aioFlushOutput |
1 |
Flush Output |
aioFlushInput |
2 |
Flush Input |
aioFlushBoth |
3 * |
Flush Input/Output |
The lPort must be opened by calling the ComOpen procedure or by configuring an RS232 driver in the System.
CommFlush(1, aioFlushBoth)