ILayoutStorage::LayoutScript method

The LayoutScript method 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.

Syntax


HRESULT LayoutScript(
  [in] StorageLayout *pStorageLayout,
  [in] DWORD         nEntries,
  [in] DWORD         glfInterleavedFlag
);

Parameters

pStorageLayout [in]

Pointer to an array of StorageLayout structures.

nEntries [in]

Number of entries in the array of StorageLayout structures.

glfInterleavedFlag [in]

Reserved for future use.

Return value

This function supports the standard return values E_OUTOFMEMORY, E_UNEXPECTED, E_INVALIDARG, and E_FAIL, as well as the following:

STG_E_INVALIDPOINTER

The storage layout pointer is invalid.

STG_E_INVALIDFLAG

The value of glfInterleavedFlag is invalid.

STG_E_PATHNOTFOUND

The new document file name specified is invalid.

STG_E_INSUFFICIENTMEMORY

There is not enough memory to complete the operation.

STG_E_INVALIDPARAMETER

One of the parameters is invalid.

STG_E_INUSE

The BeginMonitor method was called while ILayoutStorage was already monitoring.

Remarks

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.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Objidl.h

IDL

Objidl.idl

Library

Uuid.lib

DLL

Ole32.dll

IID

IID_ILayoutStorage is defined as 0E6D4D90-6738-11CF-9608-00AA00680DB4

See also

ILayoutStorage::ReLayoutDocfile
ILockBytes
StorageLayout

 

 

Show: