Click to Rate and Give Feedback
MSDN
MSDN Library
COM
COM Fundamentals
Reference
Interfaces
IConnectionPoint

  Switch on low bandwidth view
IConnectionPoint Interface

Supports connection points for connectable objects.

When To Implement

Implement this interface as part of support for connectable objects.

To support connectable objects, you need to implement four related interfaces:

The IConnectionPointContainer interface is implemented on the connectable object to indicate the existence of the outgoing interfaces. It provides access to an enumerator sub-object with the IEnumConnectionPoints interface. It also provides access to all the connection point sub-objects, each of which implements the IConnectionPoint interface. The IConnectionPoint interface provides access to an enumerator sub-object with the IEnumConnections interface.

Each connection point is a separate sub-object to avoid circular reference counting problems.

A connection point controls how many connections (one or more) it will allow in its implementation of IConnectionPoint::Advise. A connection point that allows only one interface can return E_NOTIMPL from the IConnectionPoint::EnumConnections method.

When To Use

A client can use the IConnectionPointContainer interface as follows:

  • To obtain access to an enumerator sub-object with the IEnumConnectionPoints interface. The IEnumConnectionPoints interface can then be used to enumerate connection points for each outgoing IID.
  • To obtain access to connection point sub-objects with the IConnectionPoint interface for each outgoing IID. Through the IConnectionPoint interface, a client starts or terminates an advisory loop with the connectable object and the client's own sink. The client can also use the IConnectionPoint interface to obtain an enumerator object with the IEnumConnections interface to enumerate the connections that it knows about.

Methods

The IConnectionPoint interface inherits the methods of the IUnknown interface.

In addition, IConnectionPoint defines the following methods.

MethodDescription

GetConnectionInterface

Retrieves the IID of the outgoing interface managed by this connection point.

GetConnectionPointContainer

Retrieves the IConnectionPointContainer interface pointer for the parent connectable object.

Advise

Establishes a connection between a connection point object and a client's sink.

Unadvise

Terminates an advisory connection previously established between a connection point object and a client's sink.

EnumConnections

Creates an enumerator object to iterate through the current connections for this connection point.

 

Remarks

Connectable objects support the following features:

  • Outgoing interfaces, such as event sets
  • The ability to enumerate the IIDs of the outgoing interfaces
  • The ability to connect and disconnect sinks to the object for those outgoing IIDs
  • The ability to enumerate the connections that exist to a particular outgoing interface

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderOCIdl.h
IDLOCIdl.idl
IIDIID_IConnectionPoint is defined as B196B286-BAB4-101A-B69C-00AA00341D07

See Also

IConnectionPointContainer
IEnumConnectionPoints
IEnumConnections

Send comments about this topic to Microsoft

Build date: 7/9/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker