StgOpenLayoutDocfile function (objbase.h)
The StgOpenLayoutDocfile function opens a compound file on an ILockBytes implementation that is capable of monitoring sector data. To call StgOpenLayoutDocfile, both DfLayout.dll and DfLayout.lib are required.
HRESULT StgOpenLayoutDocfile( [in] OLECHAR const *pwcsDfName, [in] DWORD grfMode, [in] DWORD reserved, [out] IStorage **ppstgOpen );
A pointer to the null-terminated Unicode string name of the compound file to be opened.
Access mode to use when opening the newly created storage object. Values are taken from the STGM Constants. Be aware that priority mode and exclusions are not supported. The most common access mode is likely to be STGM_DIRECT | STGM_READ | STGM_SHARE_EXCLUSIVE.
Reserved for future use.
A pointer to IStorage pointer variable that receives the interface pointer to the root object of the newly created root storage object.
This function supports the standard return values E_OUTOFMEMORY, E_UNEXPECTED, E_INVALIDARG, and E_FAIL, in addition to the following:
The StgOpenLayoutDocfile function can also return any of the error values returned by the StgOpenStorageOnILockBytes function.
The compound file implementation created by this function exposes the ILayoutStorage interface on its root storage. Applications use this interface to express the optimal layout of their compound files in order to download and render data more rapidly over a slow link. StgOpenLayoutDocfile returns a pointer to the IStorage interface on the root storage of the newly created compound file. Using this pointer, applications call QueryInterface to obtain a pointer to ILayoutStorage.