![]() | FlushRead |
Flushes the contents of the I/O read buffer.
virtual HRESULT FlushRead(long lTimeout = CUR_TIMEOUT) sealed override;
[in] I/O timeout value in milliseconds.
Returns S_OK if successful, otherwise a failure HRESULT.
Any existing data in the I/O read buffer is discarded. In addition, if the read buffer is non-empty and no EOI was read during the last read operation, then data is read from the device until an EOI is encountered.
The following example demonstrates use of the FlushRead function.
// CoAcme4321.cpp HRESULT Acme4321::Configure() { HRESULT hr = S_OK; // Discard contents of the I/O read buffer and read from the device until EOI hr = io.FlushRead(); return hr; }