StgGetIFillLockBytesOnILockBytes

Creates a new wrapper object on a byte array object provided by the caller.

WINOLEAPI StgOpenAsyncDocFileOnIFillLockBytes(
  ILockBytes *pilb,   //Pointer to existing byte array object
  IFillLockBytes **ppflb
                      //Address of output variable that receives the 
                      // IFillLockBytes interface pointer
);
 

Parameters

pilb
[in] Pointer to an existing byte array object.
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_UNEXPECTED and E_FAIL, as well as the following:

S_OK
Indicates the wrapper object was successfully created.
STG_E_INSUFFICIENTMEMORY
There is not enough memory to perform this operation.
STG_E_INVALIDPOINTER
Indicates bad pointer in the pilb parameter.

Remarks

The StgGetIFillLockBytesOnILockBytes function makes it possible to create an asynchronous storage wrapper object on a custom byte array object. For example, if you wanted to implement asynchronous storage on a database for which you have already created a byte array object, you would call this function to create the wrapper object for the byte array. To do so, the function creates a new wrapper object and then initializes it by passing it a pointer to the existing byte array object.

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