Provides explicit directions for reordering the storages, streams, and controls in a compound file to match the order in which they are accessed during the download.
HRESULT LayoutScript(
StorageLayout *pStorageLayout, //Pointer to first element in an
//array of structures.
DWORD nEntries, //Number of elements in the array
DWORD glfInterleavedFlag //Reserved for future use
);
This function supports the standard return values E_OUTOFMEMORY, E_UNEXPECTED, E_INVALIDARG, and E_FAIL, as well as the following:
To provide explicit layout instructions, the application calls ILayoutStorage::LayoutScript, passing an array of StorageLayout structures. Each structure defines a single storage or stream data block and specifies where the block is to be written in the ILockBytes byte array.
An application can combine scripted layout with monitoring, as the structure of a particular compound file may dictate.
When the optimal data-layout pattern of an entire compound file has been determined, the application calls ILayoutStorage::ReLayoutDocfile to restructure the compound file to match the order in which its data sectors were accessed.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
ILayoutStorage::ReLayoutDocfile, ILockBytes, StorageLayout