IDataAdviseHolder  90FB1L

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 IAdviseSink3F9W.KC interface. Advise sinks are also usually associated with OLE compound document containers.

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 IDataObjectZHWNNR interface, and to send notification of data change as appropriate. It would be necessary to implement IDataAdviseHolder only in the case where there may be a need for a custom data advise holder object, whose methods are to be used to implement the IDataObject methods in a set of servers.

When to use

Your implementation of the advisory methods of IDataObjectZHWNNR can call the methods in IDataAdviseHolder. The first time you receive a call to IDataObject::DAdvise38JBOZP, call the function CreateDataAdviseHolderAP85R9 to create an instance of the OLE-provided advise holder and get a pointer to its IDataAdviseHolder interface. Then, in implementing the IDataObject interface on the data object, you delegate implementations of the DAdvise, DUnadvise, and EnumDAdvise methods to the corresponding methods in IDataAdviseHolder.

When the data of interest to an advise sink actually changes, you call IDataAdviseHolder::SendOnDataChangeXI5CC8 from the data object to carry out the necessary notifications.

Methods in VTable Order

IUnknown1NEM0LU Methods

Description

QueryInterface2Y54585

Returns pointers to supported interfaces.

AddRef1SHW0SS

Increments reference count.

ReleaseDUW01A

Decrements reference count.

 

IDataAdviseHolder Methods

Description

AdviseGBIEY_

Creates a connection between an advise sink and a data object so the advise sink can receive notification of change in the data object.

Unadvise17J8O56

Destroys a notification connection previously set up with the Advise method.

EnumAdvise1X7HEW6

Returns an object that can be used to enumerate the current advisory connections.

SendOnDataChangeXI5CC8

Sends a change notification back to each advise sink that is currently being managed.

 

See Also

IDataObject, IAdviseSink