CreateDataAdviseHolder function (ole2.h)

Retrieves a pointer to the OLE implementation of IDataAdviseHolder on the data advise holder object.

Syntax

HRESULT CreateDataAdviseHolder(
  [out] LPDATAADVISEHOLDER *ppDAHolder
);

Parameters

[out] ppDAHolder

Address of an IDataAdviseHolder pointer variable that receives the interface pointer to the new advise holder object.

Return value

This function returns S_OK on success. Other possible values include the following.

Return code Description
E_OUTOFMEMORY
Insufficient memory for the operation.

Remarks

Call CreateDataAdviseHolder in your implementation of IDataObject::DAdvise to get a pointer to the OLE implementation of IDataAdviseHolder interface. With this pointer, you can then complete the implementation of IDataObject::DAdvise by calling the IDataAdviseHolder::Advise method, which creates an advisory connection between the calling object and the data object.

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 ole2.h (include ObjBase.h)
Library Ole32.lib
DLL Ole32.dll
API set ext-ms-win-com-ole32-l1-1-3 (introduced in Windows 10, version 10.0.10240)

See also

IDataAdviseHolder