IDataAdviseHolder::SendOnDataChange method (objidl.h)

Sends notifications to each advise sink for which there is a connection established by calling the IAdviseSink::OnDataChange method for each advise sink currently being handled by this instance of the advise holder object.

Syntax

HRESULT SendOnDataChange(
  [in] IDataObject *pDataObject,
  [in] DWORD       dwReserved,
  [in] DWORD       advf
);

Parameters

[in] pDataObject

A pointer to the IDataObject interface on the data object in which the data has just changed. This pointer is used in subsequent calls to IAdviseSink::OnDataChange.

[in] dwReserved

This parameter is reserved and must be 0.

[in] advf

Container for advise flags that specify how the call to IAdviseSink::OnDataChange is made. These flag values are from the enumeration ADVF. Typically, the value for advf is NULL. The only exception occurs when the data object is shutting down and must send a final notification that includes the actual data to sinks that have specified ADVF_DATAONSTOP and ADVF_NODATA in their call to IDataObject::DAdvise. In this case, advf contains ADVF_DATAONSTOP.

Return value

This method returns S_OK on success.

Remarks

The data object must call this method when it detects a change that would be of interest to an advise sink that has previously requested notification.

Most notifications include the actual data with them. The only exception is if the ADVF_NODATA flag was previously specified when the connection was initially set up in the IDataAdviseHolder::Advise method.

Before calling the IAdviseSink::OnDataChange method for each advise sink, this method obtains the actual data by calling the IDataObject::GetData method through the pointer specified in the pDataObject parameter.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objidl.h

See also

IAdviseSink::OnDataChange

IDataAdviseHolder