void COutBuffer::FlushWithCheck() { HRESULT result = FlushPart(); #ifdef _NO_EXCEPTIONS ErrorCode = result; #else if (result != S_OK) throw COutBufferException(result); #endif }
HRESULT COutBuffer::Flush() { #ifdef _NO_EXCEPTIONS if (ErrorCode != S_OK) return ErrorCode; #endif while(_streamPos != _pos) { HRESULT result = FlushPart(); if (result != S_OK) return result; } return S_OK; }