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 code | Description |
|---|---|
|
Insufficient memory for the operation. |
|
One or more parameters are invalid. |
|
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 |
|
|
Library |
|
|
DLL |
|
See also