EN
Este contenido no se encuentra disponible en su idioma, pero aquí tiene la versión en inglés.

IOleAdviseHolder interface

Manages 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. (OLE also provides a data advise holder to manage data notifications. Applications create a data advise holder by calling the OLE function CreateDataAdviseHolder.)

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.

Members

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

Methods

The IOleAdviseHolder interface has these methods.

MethodDescription
Advise

Establishes an advisory connection between an OLE object and the calling object's advise sink.

EnumAdvise

Creates an enumerator that can be used to enumerate the advisory connections currently established for an object.

SendOnClose

Sends notification to all advisory sinks currently registered with the advise holder that the object has closed.

SendOnRename

Sends notification to all advisory sinks currently registered with the advise holder that the name of object has changed.

SendOnSave

Sends notification to all advisory sinks currently registered with the advise holder that the object has been saved.

Unadvise

Deletes a previously established advisory connection.

 

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_IOleAdviseHolder is defined as 00000111-0000-0000-C000-000000000046

See also

CreateOleAdviseHolder
IAdviseSink
IDataAdviseHolder
IOleObject

 

 

Adiciones de comunidad

AGREGAR
Mostrar:
© 2014 Microsoft