IOleAdviseHolder  1AVQC6P

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 IOleObject2WLX9VE. 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 IAdviseSink3F9W.KC 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 CreateOleAdviseHolder21F74AP. (OLE also provides a data advise holder to manage data notifications. Applications create a data advise holder by calling the OLE function CreateDataAdviseHolderAP85R9.)

Containers and other objects that need to receive compound document notifications must implement the IAdviseSink3F9W.KC 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.

Methods in VTable Order

IUnknown Methods

Description

QueryInterface2Y54585

Returns pointers to supported interfaces.

AddRef1SHW0SS

Increments reference count.

ReleaseDUW01A

Decrements reference count.

 

IOleAdviseHolder Methods

Description

Advise0YALS2

Establishes advisory connection with sink.

Unadvise13123YO

Deletes advisory connection with sink.

EnumAdviseCMO1C_

Supplies an IEnumSTATDATA pointer to an enumeration object that can be used to determine current advisory connections.

SendOnRenameFKP98T

Advises sink that name of object has changed.

SendOnSaveGKVAX

Advises sink that object has been saved.

SendOnClose19EB0RU

Advises sink that object has been closed.

 

See Also

CreateOleAdviseHolder, IDataAdviseHolder, CreateDataAdviseHolder, IAdviseSink, IOleObject