Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
OleSetContainedObject

OleSetContainedObject function

Notifies an object that it is embedded in an OLE container, which ensures that reference counting is done correctly for containers that support links to embedded objects.

Syntax


HRESULT OleSetContainedObject(
  _In_ LPUNKNOWN pUnknown,
  _In_ BOOL      fContained
);

Parameters

pUnknown [in]

Pointer to the IUnknown interface of the object.

fContained [in]

TRUE if the object is an embedded object; FALSE otherwise.

Return value

This function returns S_OK on success. Other possible values include the following.

Return codeDescription
E_OUTOFMEMORY

Insufficient memory for the operation.

E_INVALIDARG

One or more parameters are invalid.

E_UNEXPECTED

An unexpected error occurred.

 

Remarks

The OleSetContainedObject function notifies an object that it is embedded in an OLE container. The implementation of OleSetContainedObject was changed in OLE 2.01 to coincide with the publication of the IRunnableObject interface. You can use OleSetContainedObject and the IRunnableObject::SetContainedObject method interchangeably. The OleSetContainedObject function queries the object for a pointer to the IRunnableObject interface. If successful, the function returns the results of calling IRunnableObject::SetContainedObject.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ole2.h

Library

Ole32.lib

DLL

Ole32.dll

See also

IRunnableObject::SetContainedObject

 

 

Community Additions

ADD
Show:
© 2015 Microsoft