Home COM GDI+ WebBrowser Data Access

IOleAdviseHolder Interface

 

IID_IOleAdviseHolder

{00000111-0000-0000-C000-000000000046}

 

 

The IOleAdviseHolder interface contains methods that manage advisory connections and compound document notifications in an object server. Its methods are intended to be used to implement the advisory methods of IOleObject. IOleAdviseHolder is implemented on an advise holder object. Its methods establish and delete advisory connections from the object managed by the server to the object's container, which must contain an advise sink (support the IAdviseSink interface). The advise holder object must also keep track of which advise sinks are interested in which notifications and pass along the notifications as appropriate.

 

Call the methods of IOleAdviseHolder to implement the advisory methods of IOleObject. Applications instantiate an OLE advise holder by calling the OLE function CreateOleAdviseHolder. (OLE also provides a data advise holder to manage data notifications. Applications create a data advise holder by calling the OLE function CreateDataAdviseHolder.)

 

Containers and other objects that need to receive compound document notifications must implement the IAdviseSink interface to receive those notifications, and call the IOleAdviseHolder interface methods to establish an advisory connection and inform the object of what specific notifications it wishes to receive.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IOleAdviseHolder Methods

Description

Advise

Establishes advisory connection with sink.

Unadvise

Deletes advisory connection with sink.

EnumAdvise

Supplies an IEnumSTATDATA pointer to an enumeration object that can be used to determine current advisory connections.

SendOnRename

Advises sink that name of object has changed.

SendOnSave

Advises sink that object has been saved.

SendOnClose

Advises sink that object has been closed.

 

Advise

 

FUNCTION IOleAdviseHolder_Advise ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pAdvise AS DWORD _

, BYREF pdwConnection AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IOleAdviseHolder_Advise (pthis, pAdvise, pdwConnection) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

Unadvise

 

FUNCTION IOleAdviseHolder_Unadvise ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwConnection AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IOleAdviseHolder_Unadvise (pthis, dwConnection) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

EnumAdvise

 

FUNCTION IOleAdviseHolder_EnumAdvise ( _

  BYVAL pthis AS DWORD PTR _

, BYREF ppenumAdvise AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IOleAdviseHolder_Unadvise (pthis, ppenumAdvise) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

SendOnRename

 

FUNCTION IOleAdviseHolder_SendOnRename ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pmk AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IOleAdviseHolder_SendOnRename (pthis, pmk) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

SendOnSave

 

FUNCTION IOleAdviseHolder_SendOnSave ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IOleAdviseHolder_SendOnSave (pthis) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

SendOnClose

 

FUNCTION IOleAdviseHolder_SendOnClose ( _

  BYVAL pthis AS DWORD PTR _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[8] USING IOleAdviseHolder_SendOnClose (pthis) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:30:14 +0200