StgOpenLayoutDocfile function (objbase.h)

Not supported.

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.

Note  Do not use this function. Use the IStorage::CopyTo method instead. CopyTo can be used to layout a docfile, thus improving performance in most scenarios.
 

Syntax

HRESULT StgOpenLayoutDocfile(
  [in]  OLECHAR const *pwcsDfName,
  [in]  DWORD         grfMode,
  [in]  DWORD         reserved,
  [out] IStorage      **ppstgOpen
);

Parameters

[in] pwcsDfName

A pointer to the null-terminated Unicode string name of the compound file to be opened.

[in] grfMode

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.

[in] reserved

Reserved for future use.

[out] ppstgOpen

A pointer to IStorage pointer variable that receives the interface pointer to the root object of the newly created root storage object.

Return value

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.

Remarks

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.

Requirements

Requirement Value
Target Platform Windows
Header objbase.h
Library DfLayout.lib
DLL DfLayout.dll

See also

CopyTo

ILockBytes

IStorage

STGM Constants