What Is ATL?


Expanding the acronym doesn't completely describe what ATL is or why we have it. The Active part is actually residue from the marketing age at Microsoft, when "ActiveX"[1] meant all of COM. As of this writing, "ActiveX" means controls. And although ATL does provide extensive support for building controls, it offers much more than that.

[1] The original expansion of ATL was ActiveX Template Library.

ATL provides:

  • Class wrappers around high-maintenance data types such as interface pointers, VARIANTs, BSTRs, and HWNDs

  • Classes that provide implementations of basic COM interfaces such as IUnknown, IClassFactory, IDispatch, IPersistXxx, IConnectionPointContainer, and IEnumXxx

  • Classes for managing COM serversthat is, for exposing class objects, performing self-registration, and managing the server lifetime

  • Classes for building COM controls and COM control containers, as well as for building plain old Windows applications

  • An enormous library of classes for building web applications and XML web services

  • Wizards, to save you typing

ATL was inspired by the current model citizen in the world of C++ class libraries, the C++ Standard Library. ATL is meant to be a set of small, efficient, and flexible classes. However, all this power requires a bit of skill to fully harness. As with the standard C++ library, only an experienced C++ programmer can use ATL effectively.

Of course, because we'll be programming COM, experience using and implementing COM objects and servers is absolutely required. For those of you hoping for a way to build your COM objects without COM knowledge, ATL is not for you (nor is Visual Basic, MFC, or anything else, for that matter). In fact, using ATL means being intimately familiar with COM in C++, as well as with some of the implementation details of ATL itself.

Still, ATL is packaged with several wizards that are helpful for generating the initial code. In the rest of this chapter, I present the various wizards available for ATL programmers as of Visual Studio 2005. Feel free to follow along.




ATL Internals. Working with ATL 8
ATL Internals: Working with ATL 8 (2nd Edition)
ISBN: 0321159624
EAN: 2147483647
Year: 2004
Pages: 172

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net