StgOpenLayoutDocfile

Opens a compound file on an ILockBytes 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 //Address of output variable that receives 
                       // the IStorage interface pointer
);
 

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 STGM 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] Address of IStorage* pointer variable that receives the interface pointer to 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 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 for the purpose of more rapidly downloading and rendering data 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.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in objbase.h.
  Import Library: Included as a resource in ole32.dll.

See Also

ILockBytes, IStorage, STGM