The IStream Interface

The IStream interface supports reading and writing data to stream objects. Stream objects contain the data in a structured storage object. Simple data can be written directly to a stream, but most frequently, streams are elements nested within a storage object. They are similar to standard files.

The IStream interface defines methods similar to the MS-DOS file functions. For example, each stream object has its own access rights and a seek pointer. The main difference between a stream object and a DOS file is that streams are not opened using a file handle, but through an IStream interface pointer.

The methods in this interface present your object's data as a contiguous sequence of bytes that you can read or write. There ...

Get COM+ Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.