18 Feb 04 22:58
See if this might help... I was scanning the API list and stumbled upon PurgeComm and remembered your proplem. I've never used this, so I did a quick search on Yahoo and found the following information about it:
Public Declare Function PurgeComm Lib "kernel32" Alias "PurgeComm" (ByVal hFile As Long, ByVal dwFlags As Long) As Long
hFile - descriptor of the open communication port file;
dwFlags - task to be performed.
This function can perform two tasks: clear the I/O queue in the driver or finish all the I/O operations. The tasks to be performed are specified by the following parameters:
PURGE_TXABORT — immediately stops all write operations even if they are not finished;
PURGE_RXABORT — immediately stops all read operations even if they are not finished;
PURGE_TXCLEAR — clears the out -queue in the driver;
PURGE_RXCLEAR — clears the in -queue in the driver.
These values can be combined with the help of bitwise OR operation. It is recommended to clear the buffers when I/O errors occur and after the work with the port is finished.
No Dolphins were harmed in the posting of this message... Dolphin Friendly Tuna!
Ever feel like you're banging your head against a tree? I did, so I cut down the tree.