IOleAdviseHolder : IUnknown

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

At a Glance

Header file: Oleidl.h
Windows CE versions: 2.0 and later

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 choose to implement this interface. OLE provides an implementation of the OLE advise holder as a convenience to programmers. Few applications will require notification capabilities beyond those which the default advise holder provides. In general, a single server application that requires different notification capabilities would simply implement the advisory functionality in its IOleObject advisory methods. It would be necessary to implement IOleAdviseHolder only in the case where there may 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 wishes to receive.

Method Description
IOleAdviseHolder::Advise 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 Creates an enumerator that can be used to enumerate the advisory connections currently established for an object and supplies a pointer to its IEnumSTATDATA interface.
IOleAdviseHolder::SendOnClose Sends IAdviseSink::OnRename notifications to all advisory sinks currently registered with the advise holder.
IOleAdviseHolder::SendOnRename Sends IAdviseSink::OnSave notifications to all advisory sinks currently registered with the advise holder.
IOleAdviseHolder::SendOnSave Sends notifications to all advisory sinks currently registered with the advise holder.
IOleAdviseHolder::Unadvise Deletes a previously established advisory connection.