RAD Studio VCL Reference
TConnectionPoint Class

TConnectionPoint implements the IConnectionPoint interface for a single outgoing interface.

TConnectionPoint = class(TContainedObject, IConnectionPoint);
class TConnectionPoint : public TContainedObject, public IConnectionPoint;

TConnectionPoint implements the IConnectionPoint interface, which client applications call to register an interest in a specific outgoing interface. The corresponding outgoing interface defines event handlers that the client implements. The client uses IConnectionPoint to supply its implementation of this interface (called an event sink), so that it can be called when events occur. 

Wizards that generate event support code automatically create a class member of type TConnectionPoint, which maintains a list of event sinks supplied by clients. 

TConnectionPoint 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. 

The IConnectionPoint and IConnectionPointContainer interfaces are used for OLE event handling. Because the wizard automatically sets up events for a control, users only need to use these interfaces directly when they wish to modify the standard VCL implementation or to add events to a COM server whose wizard does not generate event support code. 

GetConnectionInterface, GetConnectionPointContainer, Advise, Unadvise, EnumConnections 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!