Compartir a través de


IConnectionPoint::Unadvise

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

HRESULT Unadvise(
  DWORD dwCookie 
);

Parameters

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

Return Value

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.

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

Requirements

Header ocidl.h, ocidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IConnectionPoint::Advise