Export (0) Print
Expand All

IOleObject interface

Serves as the principal means by which an embedded object provides basic functionality to, and communicates with, its container.

When to implement

An object application must implement this interface, along with at least IDataObject and IPersistStorage, for each type of embedded object that it supports. Although this interface contains 21 methods, only three are nontrivial to implement and must be fully implemented: DoVerb, SetHostNames, and Close. Six of the methods provide optional functionality, which, if not desired, can be implemented to return E_NOTIMPL: SetExtent, InitFromData, GetClipboardData, SetColorScheme, SetMoniker, and GetMoniker. The latter two methods are useful mainly for enabling links to embedded objects.

When to use

This interface is not supported for use across computer boundaries.

Call the methods of this interface to enable a container to communicate with an embedded object. A container must call IOleObject::DoVerb to activate an embedded object, IOleObject::SetHostNames to communicate the names of the container application and container document, and IOleObject::Close to move an object from a running to a loaded state. Calls to all other methods are optional.

Members

The IOleObject interface inherits from the IUnknown interface. IOleObject also has these types of members:

Methods

The IOleObject interface has these methods.

MethodDescription
Advise

Establishes an advisory connection between a compound document object and the calling object's advise sink.

Close

Changes an embedded object from the running to the loaded state.

DoVerb

Requests that an object perform an action in response to an end-user's action.

EnumAdvise

Retrieves a pointer to an enumerator that can be used to enumerate the advisory connections registered for an object.

EnumVerbs

Exposes a pull-down menu listing the verbs available for an object in ascending order by verb number.

GetClientSite

Retrieves a pointer to an embedded object's client site.

GetClipboardData

Retrieves a data object containing the current contents of the embedded object on which this method is called.

GetExtent

Retrieves a running object's current display area.

GetMiscStatus

Retrieves the status of an object at creation and loading.

GetMoniker

Retrieves an embedded object's moniker.

GetUserClassID

Retrieves an object's class identifier.

GetUserType

Retrieves the user-type name of an object.

InitFromData

Initializes a newly created object with data from the specified data object.

IsUpToDate

Checks whether an object is up to date.

SetClientSite

Informs an embedded object of its client site within its container.

SetColorScheme

Specifies the color palette that the object application should use when it edits the specified object.

SetExtent

Sets the extent of object's display area.

SetHostNames

Provides an object with the names of its container application and the compound document in which it is embedded.

SetMoniker

Notifies an object of its container's moniker.

Unadvise

Deletes a previously established advisory connection.

Update

Updates an object handler's or link object's data or view caches.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

OleIdl.h

IDL

OleIdl.Idl

IID

IID_IOleObject is defined as 00000112-0000-0000-C000-000000000046

 

 

Community Additions

ADD
Show:
© 2014 Microsoft