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. |
This method deletes a previously established advisory connection.
Syntax
HRESULT Unadvise( DWORD dwConnection ); |
Parameters
- dwConnection
-
[in] Contains a nonzero DWORDpreviously returned by IOleAdviseHolder::Advisein pdwConnection.
Return Value
If the advisory connection deleted, the return value is S_OK.
If the dwConnectionparameter does not represent a valid advisory connection, the return value is OLE_E_NOCONNECTION.
Remarks
IOleAdviseHolder::Unadviseis intended to be used to implement IOleObject::Unadviseto 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 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
Header | Oleidl.h, oleidl.idl |
Library | oleaut32.lib, uuid.lib |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
IOleObjectCreateOleAdviseHolder
IOleAdviseHolder::Advise