Microsoft Windows CE 3.0  

IOleObject:IUnknown

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This interface is 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 IDataObjectand 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

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

Method Description
IOleObject::Advise Establishes an advisory connection between an OLE object and the calling object's advise sink, through which the calling object receives notification when the compound document object is renamed, save, or closed.
IOleObject::Close Changes an embedded object from the running to the loaded state. It also disconnects a linked object from its link source.
IOleObject::DoVerb Requests an object to perform an action in response to an end-user's action. The possible actions are enumerated for the object in IOleObject::EnumVerbs.
IOleObject::EnumAdvise Retrieves a pointer to an enumerator that can be used to enumerate the advisory connections registered for an object, so a container knows what to release prior to closing down.
IOleObject::EnumVerbs Exposes a pull-down menu listing the verbs available for an object in ascending order by verb number.
IOleObject::GetClientSite Obtains a pointer to an embedded object's client site.
IOleObject::GetClipboardData Retrieves a data object that contains the current contents of the embedded object on which this method is called. Using the pointer to this data object, it is possible to create a new embedded object with the same data as the original.
IOleObject::GetExtent Retrieves a running object's current display size.
IOleObject::GetMiscStatus Returns a value that indicates the status of an object at creation and loading.
IOleObject::GetMoniker Retrieves an embedded object's moniker, which the caller can use to link to the object.
IOleObject::GetUserClassID Returns the object class identifier (CLSID) corresponding to the string identifying the object to an end-user.
IOleObject::GetUserType Retrieves the user type name of an object for display in user interface elements such as menus, list boxes, and dialog boxes.
IOleObject::InitFromData Initializes a newly created object with data from a specified data object, which can reside either in the same container or on the clipboard.
IOleObject::IsUpToDate Checks recursively whether or not an object is current.
IOleObject::SetClientSite Informs an embedded object of its display location, called a "client site," within its container.
IOleObject::SetColorScheme Specifies the color palette that the object application should use when it edits the specified object.
IOleObject::SetExtent Informs an object of how much display space its container has assigned it.
IOleObject::SetHostNames Provides an object with the name of its container application and the compound document in which it is embedded.
IOleObject::SetMoniker Notifies an object of its container's moniker, the object's own moniker relative to the container, or the object's full moniker.
IOleObject::Unadvise Deletes a previously established advisory connection.
IOleObject::Update Updates an object handler's or link object's data to view caches.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 2.0 and later Oleidl.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.