I'm using PJ Naughter's (www.naughter.com
) CSerialPort v1.11 class for serial port communication on the Windows operating system. I'm wondering if this class or something else (like WIN32 API or MFC) comes with a function that lets me terminate all writes in progress and clear the write buffer. My problem is that I'm doing a write in a loop and the write is started the second time before it finishes the first time. This makes my application preform poorly, and causes many fatal errors. I looked through the documentation and found a few functions that looked like they might do the job but they didn't work (i might have used them wrong). Can someone point me in the right direction?