Platform SDK: COM |
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 less 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 operation. You must be prepared to deal with the error return or S_OK return values on end-of-stream read operations.
Windows NT/2000: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Objidl.idl.
ISequentialStream::Write, STGMOVE, IStorage::OpenStream, IStream, IStream - Compound File Implementation