Index   Commented   Search   About

OleSetContainedObject

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.

STDAPI OleSetContainedObject(

LPUNKNOWN pUnk
//Pointer to embedded object
BOOL fContained
//Indicates if the object is embedded
);

Parameters

pUnk

Specifies a pointer to the IUnknown interface of the object

fContained

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

Return Values

S_OK

Indicates object was notified successfully.

E_OUTOFMEMORY

Indicates insufficient memory to perform the operation.

E_INVALIDARG

Indicates an invalid argument.

E_UNEXPECTED

Indicates an unexpected error.

Comments

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.

Note The implementation of OleSetContainedObject in earlier versions of OLE differs from that described here.

See Also

IRunnableObject::SetContainedObject

Related Links

Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET

More Online Helps

Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp)
Unix Manual Pages

Free Tech Secrets ;) Copyright © 2008 Free Tect Secrets ;) greatis just4fun network just4fun