Table of contents
1.
Introduction
2.
ATL
3.
ATL Connection Points
4.
ATL Connection Points Classes
5.
ATL Connection Points Example 
6.
Frequently Asked Question
6.1.
What are ATL applications?
6.2.
What are COM and ATL?
6.3.
What is ATL in windows?
6.4.
What is an ATL file in SAP?
6.5.
What does DLL stand for?
7.
Conclusion
Last Updated: Mar 27, 2024
Easy

ATL connection point classes

Author Muskan Sharma
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Hey Readers!!!

Have you ever wondered how the object will communicate with the client?

For this, we have outgoing interfaces which act as connecting points.

In this article, you'll learn how these connection points work.

Let's begin!!!

ATL connection point classes

ATL

ATL stands for active template library. It is a collection of C++ classes built using templates that make it easier to program the Component Object Model (COM).

ATL Connection Points

An object that supports outgoing interfaces is connectable. An outgoing interface enables interaction between the object and a client. The connectable object exposes a connection point for each outgoing interface. A client on a thing called a sink implements each outgoing interface.

Every connection point supports the IConnectionPoint interface. Through the IConnectionPointContainer interface, the connectable object's connection points are accessible to the client.

ATL Connection Points Classes

ATL uses the following classes to support connection points:

  • IConnectionPointImpl - A connecting point is implemented. The IID of the outgoing interface it represents is supplied as a template argument.
  • IConnectionPointContainerImpl - Maintains the list of IConnectionPointImpl objects and implements the connection point container.
  • IPropertyNotifySinkCP - Creates an implementation of the IPropertyNotifySink interface connection point.
  • CComDynamicUnkArray - Handles any number of connections between the connection point's sinks and the connection point.
  • CComUnkArray - controls the number of connections that the template argument specifies.
  • CFirePropNotifyEvent - It tells the sink of a client that a property of an object has changed or is going to change.
  • IDispEventImpl - It assists with an ATL COM object's connection points. An event sink map is used to map these connection points, and your COM object supplies it.
  • IDispEventSimpleImpl - It enables you to route events to the proper handler function in conjunction with the event sink map in your class.

ATL Connection Points Example 

The following illustration depicts a device that can implement the incoming interface IPropertyNotifySink:

class ATL_NO_VTABLE CConnect1 :
   public CComObjectRootEx<CComSingleThreadModel>,
   public CComCoClass<CConnect1, &CLSID_Connect1>,
   public IConnectionPointContainerImpl<CConnect1>,
   public IConnectionPointImpl<CConnect1, &IID_IPropertyNotifySink>,
   public IConnect1
{
public:
   CConnect1()
   {
   }

DECLARE_REGISTRY_RESOURCEID(IDR_CONNECT1)


BEGIN_COM_MAP(CConnect1)
   COM_INTERFACE_ENTRY(IConnect1)
   COM_INTERFACE_ENTRY(IConnectionPointContainer)
END_COM_MAP()

BEGIN_CONNECTION_POINT_MAP(CConnect1)
   CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink)
END_CONNECTION_POINT_MAP()


   DECLARE_PROTECT_FINAL_CONSTRUCT()

   HRESULT Fi
nalConstruct()
   {
      return S_OK;
   }

   void FinalRelease()
   {
   }

public:

};

You can substitute class IPropertyNotifySinkCP for IConnectionPointImpl when providing IPropertyNotifySink as an outgoing interface. For instance:

class ATL_NO_VTABLE CConnect2 :
   public CComObjectRootEx<CComSingleThreadModel>,
   public CComCoClass<CConnect2, &CLSID_Connect2>,
   public IConnectionPointContainerImpl<CConnect2>,
   public IPropertyNotifySinkCP<CConnect2>

Frequently Asked Question

What are ATL applications?

ActiveX controls are frequently created using the Active Template Library (ATL), a wrapper library that makes COM development easier.

What are COM and ATL?

Microsoft created the Active Template Library (ATL), a collection of template-based C++ classes, to make designing Component Object Model (COM) objects easier.

What is ATL in windows?

Creating compact, quick Component Object Model (COM) objects is made possible by the Active Template Library (ATL) .It is a collection of template-based C++ classes.

What is an ATL file in SAP?

The configuration information for a published cleansing package is located in the Data Services ATL file.

What does DLL stand for?

When necessary, larger applications might load a collection of smaller programs known as a dynamic link library (DLL) to carry out specialised functions.

Conclusion

This blog has extensively discussed ATL connection point classes. We hope this blog has helped you enhance your knowledge about the ATL Connection Points Classes, ATL Connection Points Classes.

Debugging Tips for ATLATL module classesATL Control Containment

If you want to learn more deeply, check out the excellent content on the Coding Ninjas Website:

Refer to our guided paths on the Coding Ninjas Studio platform to learn more about DSA, DBMS, Competitive Programming, Python, Java, JavaScript, etc. 

Refer to the links problemstop 100 SQL problemsresources, and mock tests to enhance your knowledge.

For placement preparations, visit interview experiences and interview bundle.

Thank You

Do upvote our blog to help other ninjas grow. Happy Coding!

Live masterclass