Implementing a Connection Point
To implement a connection point using the Implement Connection Point Wizard, you must have created a project as an ATL COM application or as an MFC application that contains ATL support. You can use the ATL Project Wizard to create an ATL application, or add an ATL object to your MFC application to implement ATL support for an MFC application.
Note
For information about implementing connection points for an MFC project, see Connection Points.
Once you create the project, to implement a connection point, you must first add an ATL object. See Adding Objects and Controls to an ATL Project for a list of wizards that add objects to your ATL project.
Note
The wizard does not support ATL dialogs, XML Web services created with ATL Server, performance objects, or performance counters.
A connectable object (that is, a source) can expose a connection point for each of its outgoing interfaces. Each outgoing interface can be implemented by a client on an object (that is, a sink). For more information, see ATL Connection Points.
To implement a connection point
In Class View, right-click the class name for your ATL object.
Click Add from the shortcut menu, and then click Add Connection Point to display the Implement Connection Point Wizard.
Select the connection point interfaces to implement from the appropriate type libraries and click Finish.
In Class View, examine the proxy classes created for each connection point. The classes appear as CProxyInterfaceName<T> and are derived from IConnectionPointImpl.
Double-click the connection point class to display the definition of the connection point's class.
If you implement a connection point for your own project's interface, the following definition appears
template< class T > class CProxyInterfaceName : public IConnectionPointImpl< T, &IID_InterfaceName > { public: };
If you implement a local interface, methods and properties appear in the class body.
If you implement a connection point for another interface, the definition includes the interface's methods, each preceded by Fire_.
See Also
Tasks
Adding Connection Points to an Object