StgOpenLayoutDocfile

Opens a compound file on an ILockBytes5AUHTW6 implementation that that is capable of monitoring sector information.

WINOLEAPI StgOpenLayoutDocfile(

    OLECHAR *pwcsName

// Pointer to name of compound file to be opened

    DWORD grfMode

// Access mode for the new storage object.

    DWORD reserved

// Reserved for future use.

    IStorage **ppstgOpen

// Indirect pointer to the new root storage object.

   );

 

 

Parameters

pwcsName

[in] Pointer to the name of  the compound file to be opened.

grfMode

[in] Access mode to use when opening the newly created storage object. Values are taken from the STGMJWLKYA enumeration. Note that priority mode and exclusions are not supported. The most common access mode is likely to be STGM_DIRECT | STGM_READ | STGM_SHARE_EXCLUSIVE.

ppstgOpen

[out] Indirect pointer to the IStorageFS1VT1 interface on the root object of the newly created root storage object.

 

Return Values

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

STG_E_INVALIDPARAMETER

One of the parameters is invalid

STG_E_INVALIDNAME

The name passed to this function is not a valid filename

STG_E_INSUFFICIENTMEMORY

There is insufficient memory to complete this operation.

This function can also return any of the error values returned by the StgOpenStorageOnILockBytes36F._OM function.

Remarks

The compound file implementation created by this function exposes the ILayoutStorageHQFWQ. interface on its root storage. Applications use this interface to express the optimal layout of their compound files for the purpose of more rapidly downloading and rendering data over a slow link. StgOpenLayoutDocfile returns a pointer to the IStorageFS1VT1 interface on the root storage of the newly created compound file. Using this pointer, applications call QueryInterface to obtain a pointer to ILayoutStorage.

See Also

ILockBytes, IStorage, STGM