IDataAdviseHolder::SendOnDataChange method

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

pDataObject [in]

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.

dwReserved [in]

This parameter is reserved and must be 0.

advf [in]

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.idl

IID

IID_IDataAdviseHolder is defined as 00000110-0000-0000-C000-000000000046

See also

IAdviseSink::OnDataChange
IDataAdviseHolder

 

 

Community Additions

ADD
Show:
© 2014 Microsoft