| OLE DB Programmer's Reference |
|
ISequentialStream
is the preferred minimal interface for reading and writing binary large object (BLOB) data in OLE DB.
ISequentialStream
is a subset of the COM
IStream
interface and provides forward-only reading and writing of data. The
IStream
interface inherits its
Read
and
Write
You can implement ISequentialStream on an object if you require simple sequential access to a stream object. If you implement IStream , you must provide an implementation of the Read and Write methods from ISequentialStream .
Note Most applications do not implement ISequentialStream as a separate interface, and it is not required to provide it separately even when an IStream implementation is provided. For example, the compound file implementation of structured storage does not succeed on a QueryInterface for ISequentialStream but it includes the Read and Write methods through the IStream interface pointer.
Call the methods of the
ISequentialStream
interface from a container or application to perform sequential reads and
| IUnknown Methods | Description |
|---|---|
| QueryInterface | Returns pointers to supported interfaces. |
| AddRef | Increments the reference count. |
| Release | Decrements the reference count. |
| ISequentialStream Methods | Description |
|---|---|
| ISequentialStream::Read | Reads a specified number of bytes from the stream object into memory, starting at the current seek pointer. |
| ISequentialStream::Write | Writes a specified number of bytes to the stream object, starting at the current seek pointer. |
1998-2001 Microsoft Corporation. All rights reserved.
| OLE DB Programmer's Reference |
|
ISequentialStream
is a simplified version of
IStream
that provides
| Method | Description |
|---|---|
| ISequentialStream::Read | Reads a specified number of bytes from the stream. |
| ISequentialStream::Write | Writes a specified number of bytes to the stream. |
1998-2001 Microsoft Corporation. All rights reserved.
| OLE DB Programmer's Reference |
|
Reads a specified number of bytes from the stream object into memory starting at the current read/write location within the stream.
HRESULT Read(void *pv, ULONG cb, ULONG *pcbRead);
Parameters
Return Code
Comments
This method reads bytes from this stream object into memory. The stream object must be opened in STGM_READ mode. This method
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
Some
1998-2001 Microsoft Corporation. All rights reserved.