What Is the Active Template Library?
Active Template Library ( ATL ) is a collection of classes based on C ++ template technology. It was released by Microsoft in order to simplify the programming of the Component Object Model (COM). COM is designed to allow developers to use Visual C ++ to create a variety of components, including OLE Automation servers, and ActiveX controls. Patterned after the Standard Template Library (STL), ATL includes an object wizard. When the main object structure is set, it can produce fast and smaller programs.
- _ATL_MIN_CRT The server does not link to the standard C / C ++ runtime, and ATL provides an implementation of the functions malloc, realloc, new, and delete. You cannot call any other C / C ++ runtime functions. The ATL project generated by the _mainATL wizard defines _ATL_MIN_CRT for all Release versions, but this symbol macro is not defined for the Debug version.
- _ATL_DLL server dynamic link tool library atl.dll
- _ATL_STATIC_REGISTRY server static link support for component registration
- ATL version 3.0 (Visual Studio 6.0)
- ATL version 7.0 (Visual Studio 2003)
- ATL version 8.0 (Visual Studio 2005)
- _com_ptr_t decorates the smart governance of the COM interface, prefixed with "Ptr".
- _bstr_tBSTR wrapper
- _variant_tVARIANT wrapper
- _com_errorHRESULT wrapper
- afximpl.h implements a set of template libraries, such as CArray, CList, CMap, etc. Because at launch
- ATL defines three macros to influence the optimization of the generated COM server.
- Debug configuration does not define the above three symbol macros. The Release MinSize configuration defines _ATL_MIN_CRT and _ATL_DLL. The Release MinDependency configuration defines _ATL_MIN_CRT and _ATL_STATIC_REGISTRY. [1]
- ATL contains many
- Although not an official part of ATL, Microsoft Visual C ++ includes additional C ++ RAII classes to simplify the management of COM types, which can replace or cooperate with the corresponding parts in ATL:
- Note that as of Visual Studio 2012, the compiler COM support classes no longer include the SAFEARRAY wrapper. [2]