The OLE 2 architecture and, specifically, OLE's
Structured Storage model
enable many of the most powerful features gracing the new wave of Windows 95 applications. The Office Binder, the "stencil" metaphor of both Visio and TriSpectives, and the componentware market all depend on the Windows 95 implementation of Structured Storage.
Application developers are accustomed to assigning file handles and reserving files for a single application, but compound documents allow many applications to write to a single file. Without an OS-level mechanism for handling compound files, the developer must keep track of multiple seek pointers and, in effect, build an internal file system.
A Structured Storage implementa
tion solves the problem of compound files by supporting a file system within a file. OLE 2 specifies a file structure that can contain two distinct types of objects -- storage objects and stream objects. Streams hold data (such as the text in a Word file), while storage objects can hold within them any number of substorage objects or streams. Substorage objects (like subdirectories of a root directory) can, in turn, hold other substorages or streams. Each of these object types expose interfaces (in this context, an interface is an array of functions that other objects or applications can call).
Structured Storage frees an OLE container application from managing its own file structure. Instead, the OLE container provides a storage object to any compound document (or other embedded object) that it hosts. The object then manages the streams and substorages under its control. The application container no longer has to manage the complexity of multiple file pointers. In fact, the application doesn't have to
do any work at all. The storage object writes directly into the piece of storage under its control without any interaction with the container itself.
OLE Structured Storage also makes data exchange more robust. Under OLE 1, data was transferred through DDE's mechanism of global memory. OLE 2 applications simply pass a pointer to a data object from the source application to the data recipient. This mechanism is implemented through the OLE 2 interfaces to storages and streams. Future versions of NT (Cairo) will use Structured Storage as its native file system.
illustration_link (7 Kbytes)

To support compound files, OLE implements a
file system within a file.