IConnectionPoint::Unadvise

Terminates an advisory connection previously established through IConnectionPoint::Advise. The dwCookie parameter identifies the connection to terminate.

HRESULT Unadvise(
  DWORD dwCookie  //Connection token
);
 

Parameters

dwCookie
[in] Connection token previously returned from IConnectionPoint::Advise.

Return Values

This method supports the standard return value E_UNEXPECTED, as well as the following:

S_OK
The connection was successfully terminated.
CONNECT_E_NOCONNECTION
The value in dwCookie does not represent a valid connection.

Remarks

When an advisory connection is terminated, the connection point calls the Release method on the pointer that was saved for the connection during the IConnectionPoint::Advise method. This Release reverses the AddRef that was performed during the IConnectionPoint::Advise when the connection point calls the advisory sink's QueryInterface.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in ocidl.h.

See Also

IConnectionPoint::Advise