The final important characteristic of Structured Storage, a characteristic that benefits other OLE technologies, is that storage and stream objects are shareable across process boundaries. This means that multiple processes can write to the same elements on a storage medium at the same time. This enables components to share information without having to load the information into memory or make copies across process boundaries. This improves performance dramatically for technologies such as the Clipboard, Drag and Drop, and OLE Documents.3 This kind of sharing means that the benefits of incremental access are realized across components.
OLE achieves storage and stream sharing through custom marshaling of storage and stream objects, as we saw in Chapter 6. A storage is the perfect example of a component whose entire state is kept on a shareable medium such as a hard disk. Therefore, a proxy and the actual object can work simultaneously with the elements in the storage without any need for interprocess calls or context switches. Custom marshaling is obviously the best possible way to implement this sort of sharing.
3 Structured Storage was originally invented to solve performance problems with OLE 1 compound documents. It grew into a technology in its own right with implications much deeper than simply compound documents. |