The Read method reads data from a stream and copies it to an application-defined buffer. If no buffer is supplied, it determines the buffer size needed to retrieve the next buffer of data. Called when an application uses the AVIStreamRead function.
HRESULT Read(
PAVISTREAM ps,
LONG lStart,
LONG lSamples,
LPVOID lpBuffer,
LONG cbBuffer,
LONG *plBytes,
LONG *plSamples
);
Returns AVIERR_OK if successful or AVIERR_BUFFERTOOSMALL if the buffer is not large enough to hold the data. If successful, Read also returns either a buffer of data with the number of frames (samples) included in the buffer or the required buffer size, in bytes.
For handlers written in C++, Read has the following syntax:
HRESULT Read(LONG lStart, LONG lSamples,
LPVOID lpBuffer, LONG cbBuffer,
LONG *plBytes, LONG *plSamples);
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in vfw.h.
Import Library: Use vfw32.lib.
Custom File and Stream Handlers Overview, Custom File and Stream Handler Interfaces, AVIStreamRead