Basics of ATL
What you will Learn Here…
- Definition of ATL
- ATL Features
- Basic Definitions of ATL
- ATL's Component Class Hierarchy
- FAQ
1. Definition of ATL The Active Template Library (ATL) is a set of template-based C++ classes that allows to create small, fast Component Object Model (COM) objects.
2. ATL Features
- ATL provides two types of wizards
a. AppWizard: AppWizard creates the initial ATL project. b. Object Wizard: Object Wizard produces code for basic COM components.
-
Built-in support for basic COM functionality such as IUnknown, class factories, IDispatch (automation), dual interfaces and self-registration.
-
Inbuilt Support for Microsoft’s Interface Definition Language (IDL) which provides marshaling support for custom Vtable interfaces as well as component self-description through a type library.
-
Aggregation of objects and Automation support
-
Support for developing ActiveX controls.
3. Basic Definitions of ATL
-
Marshaling: Marshaling is the process of transferring function arguments and return values across process and machine boundaries.
-
The proxy/stub DLL implements standard marshaling for each of the component interfaces.
COM will use the IPC to communicate between client and server.
-
LPC is used when both reside on the same machine.
-
RPC is used in a distributed networked environment
4. ATL's Component Class Hierarchy
ATL never Creates the instance of the CoClass Directly. Instead ATL uses CComObject template class with 'CMathComp' object type as a parameter to create our Object.
CComObject * pMath = new ComObject
CComObjectRootEx - Handles object reference count management. CComCoClass - Provides methods for creating instances of a class and obtaining its properties it has createInstance() method which creates the instance of a COM Object through ClassFactory CComObject - Implements IUnknown for an COM object.
5. FAQ
-
What is ATL ? check - 1. Definition of ATL
-
What is MIDL ? check - 2. ATL Features - 3 point
-
What are the featurs of ATL ? check - 2. ATL Feature
-
What is Marshiling ? check - 3. Basic Definitions of ATL - 1 point
-
Explain about ATL's Class Hierarchy? check - 4.ATL's Component Class Hierarchy