5 #include "LimitedStreams.h"
6 #include "../../Common/Defs.h"
8 STDMETHODIMP CLimitedSequentialInStream::Read(void *data, UInt32 size, UInt32 *processedSize)
10 UInt32 realProcessedSize = 0;
11 UInt32 sizeToRead = (UInt32)MyMin((_size - _pos), (UInt64)size);
12 HRESULT result = S_OK;
15 result = _stream->Read(data, sizeToRead, &realProcessedSize);
16 _pos += realProcessedSize;
17 if (realProcessedSize == 0)
20 if(processedSize != NULL)
21 *processedSize = realProcessedSize;