StgGetIFillLockBytesOnFile

Opens a wrapper object on a temporary file.

WINOLEAPI StgGetIFillLockBytes(
  OLECHAR *pwcsName,   //Pointer to file specified by filename
  IFillLockBytes **ppflb
                       //Address of output variable that receives 
                       // the IFillLockBytes interface pointer
);
 

Parameters

pwcsName
[in] Pointer to the name of the file for which a wrapper object is created.
pflb
[out] Address of IFillLockBytes* pointer variable that receives the interface pointer to the new byte array wrapper object.

Return Values

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

S_OK
Indicates the wrapper object was successfully created.
STG_E_FILENOTFOUND
Indicates that the file specifed by pwcsName could not be found.
STG_E_INSUFFICIENTMEMORY
There is not enough memory to perform this operation.
STG_E_INVALIDPOINTER
Indicates bad pointer in the ppflb parameter.

This function can also return any file system errors.

Remarks

The moniker that manages the downloading of the file specified in pwcsName calls this function in the course of creating the asynchronous storage necessary to manage the asynchronous downloading of data. The moniker first creates a temporary file, then calls this function to create the wrapper object on that file. Finally, the moniker calls StgOpenAsyncDocfileOnIFillLockBytes to open the root storage of the compound file that is to be downloaded into the temporary file.

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

IFillLockBytes, ILockBytes, StgOpenAsyncDocfileOnIFillLockBytes