IOleObject::Unadvise

This method deletes a previously established advisory connection.

HRESULT Unadvise( 
  DWORD dwConnection
);

Parameters

Return Values

If the advisory connection deleted successfully, the return value is S_OK.

If the dwConnection parameter does not represent a valid advisory connection, the return value is OLE_E_NOCONNECTION.

Remarks

IOleAdviseHolder::Unadvise is intended to be used to implement IOleObject::Unadvise to delete an advisory connection. In general, you would use the OLE advise holder having obtained a pointer through a call to CreateOleAdviseHolder.

Usually, containers call this method at shutdown or when an object is deleted. In certain cases, containers could call this method on objects that are running but not currently visible, as a way of reducing the overhead of maintaining multiple advisory connections.

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

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleidl.h, Oleidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

IOleObject | CreateOleAdviseHolder | Determining Supported COM APIs | IOleAdviseHolder::Advise

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.