DummyOutStream.cpp 469 B

12345678910111213141516171819202122
  1. // DummyOutStream.cpp
  2. #include "StdAfx.h"
  3. #include "DummyOutStream.h"
  4. STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
  5. {
  6. UInt32 realProcessedSize;
  7. HRESULT result;
  8. if(!_stream)
  9. {
  10. realProcessedSize = size;
  11. result = S_OK;
  12. }
  13. else
  14. result = _stream->Write(data, size, &realProcessedSize);
  15. _size += realProcessedSize;
  16. if(processedSize != NULL)
  17. *processedSize = realProcessedSize;
  18. return result;
  19. }