[This is preliminary documentation and subject to change.]
Reads a specified number of bytes from the stream object into memory starting at the current seek pointer.
HRESULT Read(
void * pv, //Pointer to buffer into which the stream is read
ULONG cb, //Specifies the number of bytes to read
ULONG * pcbRead
//Pointer to location that contains actual number of
// bytes read
);
This method reads bytes from this stream object into memory. The stream object must be opened in STGM_READ mode. This method adjusts the seek pointer by the actual number of bytes read.
The number of bytes actually read is also returned in the pcbRead parameter.
The actual number of bytes read can be fewer than the number of bytes requested if an error occurs or if the end of the stream is reached during the read operation.
Some implementations might return an error if the end of the stream is reached during the read. You must be prepared to deal with the error return or S_OK return values on end of stream reads.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
ISequentialStream::Write, STGMOVE, IStorage::OpenStream, IStream, IStream - Compound File Implementation