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 |
); |
Parameters
Return Values
Remarks
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 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.
See Also
IStream - Compound File Implementation, STGMOVE, IStorage::OpenStream, IStream::Write