Compartilhar via


IOleAdviseHolder:IUnknown (Windows CE 5.0)

Send Feedback

This interface manages advisory connections and compound document notifications in an object server.

The IOleAdviseHolder interface contains methods that manage advisory connections and compound document notifications in an object server. Its methods are intended to be used to implement the advisory methods of IOleObject.

IOleAdviseHolder is implemented on an advise holder object. Its methods establish and delete advisory connections from the object managed by the server to the object's container, which must contain an advise sink (support the IAdviseSink interface).

The advise holder object must also keep track of which advise sinks are interested in which notifications and pass along the notifications as appropriate.

When to Implement

It is unlikely that you would implement this interface. OLE provides an implementation of the OLE advise holder as a convenience to programmers. Few applications require notification capabilities beyond those that the default advise holder provides.

In general, a single server application that requires different notification capabilities would implement the advisory functionality in its IOleObject advisory methods.

It is necessary to implement IOleAdviseHolder only in the case where there might be a need for a custom advise holder object, whose methods are to be used to implement the IOleObject methods in a set of servers.

When to Use

Call the methods of IOleAdviseHolder to implement the advisory methods of IOleObject. Applications instantiate an OLE advise holder by calling the OLE function CreateOleAdviseHolder.

Containers and other objects that need to receive compound document notifications must implement the IAdviseSink interface to receive those notifications, and call the IOleAdviseHolder interface methods to establish an advisory connection and inform the object of what specific notifications it wants to receive.

Methods

The following table shows the methods for this interface in alphabetical order. Like all COM interfaces, this interface inherits the methods for the IUnknown interface.

Method Description
IOleAdviseHolder::Advise This method establishes an advisory connection between an OLE object and the calling object's advise sink.

Through that sink, the calling object can receive notification when the OLE object is renamed, saved, or closed.

IOleAdviseHolder::EnumAdvise This method creates an enumerator that can be used to enumerate the advisory connections established for an object and supplies a pointer to its IEnumSTATDATA interface.
IOleAdviseHolder::SendOnClose This method sends IAdviseSink::OnRename notifications to all advisory sinks registered with the advise holder.
IOleAdviseHolder::SendOnRename This method sends IAdviseSink::OnSave notifications to all advisory sinks registered with the advise holder.
IOleAdviseHolder::SendOnSave This method sends notifications to all advisory sinks registered with the advise holder.
IOleAdviseHolder::Unadvise This method deletes a previously established advisory connection.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleidl.h, Oleidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

OLE Interfaces | CreateOleAdviseHolder | Determining Supported COM APIs | IAdviseSink | IOleObject | IUnknown

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.