CreateOleAdviseHolder function (ole2.h)

Creates an advise holder object for managing compound document notifications. It returns a pointer to the object's OLE implementation of the IOleAdviseHolder interface.

Syntax

HRESULT CreateOleAdviseHolder(
  [out] LPOLEADVISEHOLDER *ppOAHolder
);

Parameters

[out] ppOAHolder

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

Return value

This function returns S_OK on success and supports the standard return value E_OUTOFMEMORY.

Remarks

The function CreateOleAdviseHolder creates an instance of an advise holder, which supports the OLE implementation of the IOleAdviseHolder interface. The methods of this interface are intended to be used to implement the advisory methods of IOleObject, and, when advisory connections have been set up with objects supporting an advisory sink, to send notifications of changes in the object to the advisory sink. The advise holder returned by CreateOleAdviseHolder will suffice for the great majority of applications. The OLE-provided implementation does not, however, support IOleAdviseHolder::EnumAdvise, so if you need to use this method, you will need to implement your own advise holder.

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
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

IOleAdviseHolder

IOleObject