IDataAdviseHolder
The IDataAdviseHolder
interface contains methods that create and manage advisory connections between
a data object and one or more advise sinks. Its methods are intended to be used
to implement the advisory methods of IDataObject. IDataAdviseHolder
is implemented on an advise holder object. Its methods establish and delete
data advisory connections and send notification of change in data from a data
object to an object that requires this notification, such as an OLE container,
which must contain an advise sink.
Advise sinks
are objects that require notification of change in the data the object contains
and implement the IAdviseSink
When to implement
Typically,
you use the OLE-provided implementation of IDataAdviseHolder to simplify
your implementation of the DAdvise, DUnadvise, and EnumDAdvise
methods in the IDataObject
When to use
Your
implementation of the advisory methods of IDataObject
When the data
of interest to an advise sink actually changes, you call IDataAdviseHolder::SendOnDataChange
Methods in VTable Order
IUnknown Methods |
Description |
QueryInterface |
Returns
pointers to supported interfaces. |
AddRef |
Increments
reference count. |
Release |
Decrements
reference count. |
IDataAdviseHolder
Methods |
Description |
Advise |
Creates a
connection between an advise sink and a data object so the advise sink can
receive notification of change in the data object. |
Unadvise |
Destroys a
notification connection previously set up with the Advise method. |
EnumAdvise |
Returns an
object that can be used to enumerate the current advisory connections. |
SendOnDataChange |
Sends a
change notification back to each advise sink that is currently being managed. |
See Also