CreateOleAdviseHolder

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

WINOLEAPI CreateOleAdviseHolder(
  LPOLEADVISEHOLDER FAR* ppOAHolder  //Address of output variable 
                                     // that receives the 
                                     // IOleAdviseHolder interface 
                                     // pointer
);
 

Parameter

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

Return Values

This function supports the standard return value E_OUTOFMEMORY, as well as the following:

S_OK
The new OLE advise holder returned successfully.

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.

Windows CE: Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application. For more information about handling exceptions, see Programming Considerations.

QuickInfo

  Windows NT: Use version 3.1 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Use version 2.0 or later.
  Header: Declared in ole2.h.
  Import Library: Included as a resource in ole32.dll.

See Also

IOleAdviseHolder, IOleObject