michael@0: // LimitedStreams.h michael@0: michael@0: #ifndef __LIMITEDSTREAMS_H michael@0: #define __LIMITEDSTREAMS_H michael@0: michael@0: #include "../../Common/MyCom.h" michael@0: #include "../IStream.h" michael@0: michael@0: class CLimitedSequentialInStream: michael@0: public ISequentialInStream, michael@0: public CMyUnknownImp michael@0: { michael@0: UInt64 _size; michael@0: CMyComPtr _stream; michael@0: public: michael@0: void Init(ISequentialInStream *stream, UInt64 streamSize); michael@0: michael@0: MY_UNKNOWN_IMP michael@0: michael@0: STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); michael@0: }; michael@0: michael@0: #endif