The ILayoutStorage interface enables an application to optimize the layout of its compound files for efficient downloading across a slow link. The goal is to enable a browser or other application to download data in the order in which it will actually be needed.
To optimize a compound file an application first saves it, then calls StgOpenLayoutDocfile to reopen the file using a special Compound Files implementation that exposes ILayoutStorage on its root storage. Once the storage is open, the application queries for a pointer to ILayoutStorage.
Using this pointer, the application can either provide explicit layout instructions or obtain them by monitoring the pattern of access to the compound file as it is loaded into memory.
However the desired layout information is obtained, the application calls ILayoutStorage::ReLayoutDocfile to rewrite the compound file using either the explicit layout instructions or the monitored layout access patterns.
You do not need to implement this interface. A special implementation of Compound Files exposes ILayoutStorage on the root storage object.
Use ILayoutStorage to optimize your application's compound files. The interface is exposed in dflayout.dll, which is included with the Win32 SDK. If you are a web master, you can optimize compound files exposed in your web site by using the Docfile Layout Tool (dflayout.exe), which is also included with the Win32 SDK.
IUnknown Methods | Description |
---|---|
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments reference count. |
Release | Decrements reference count. |
ILayout Storage Method | Description |
---|---|
LayoutScript | Provides explicit layout instructions. |
BeginMonitor | Monitors data access to a file. |
EndMonitor | Ends monitoring of data access. |
ReLayoutDocfile | Rewrites file using layout information. |
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.