Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function instantiates an advise holder object for managing compound document notifications. It passes out a pointer to the object's OLE implementation of the IOleAdviseHolderinterface.

Syntax

WINOLEAPI CreateOleAdviseHolder(
  IOleAdviseHolder FAR* FAR*  
ppOAHolder
);

Parameters

ppOAHolder

[out] Pointer to IOleAdviseHolder* pointer variable that receives the interface pointer to the new advise holder object.

Return Value

This function returns S_OK if it is successful.

This function returns E_OUTOFMEMORY if it fails.

Remarks

The function CreateOleAdviseHoldercreates an instance of an advise holder, which supports the OLE implementation of the IOleAdviseHolderinterface.

The methods of this interface are intended to be used to implement the advisory methods of IOleObjectand, when advisory connections are 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 CreateOleAdviseHoldersuffices for most applications.

However, the OLE-provided implementation does not support IOleAdviseHolder::EnumAdvise. If you need to use this method, implement your own advise holder.

Passing invalid (and under some circumstances NULL) pointers into this function causes an unexpected termination of the application.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

Header ole2.h
Library ole32.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also