OffsetStream.h 518 B

12345678910111213141516171819202122232425
  1. // OffsetStream.h
  2. #ifndef __OFFSETSTREAM_H
  3. #define __OFFSETSTREAM_H
  4. #include "Common/MyCom.h"
  5. #include "../IStream.h"
  6. class COffsetOutStream:
  7. public IOutStream,
  8. public CMyUnknownImp
  9. {
  10. UInt64 _offset;
  11. CMyComPtr<IOutStream> _stream;
  12. public:
  13. HRESULT Init(IOutStream *stream, UInt64 offset);
  14. MY_UNKNOWN_IMP
  15. STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
  16. STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition);
  17. STDMETHOD(SetSize)(Int64 newSize);
  18. };
  19. #endif