Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  





2 Support classes  





3 Compiler COM support  





4 See also  





5 References  





6 External links  














Active Template Library






Deutsch
Français

Italiano

Oʻzbekcha / ўзбекча
Polski
Português
Русский
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Active Template Library
Developer(s)Microsoft
Written inC++
Operating systemMicrosoft Windows
TypeLibraryorframework
LicenseProprietary

The Active Template Library (ATL) is a set of template-based C++ classes developed by Microsoft, intended to simplify the programming of Component Object Model (COM) objects. The COM support in Microsoft Visual C++ allows developers to create a variety of COM objects, OLE Automation servers, and ActiveX controls.[1][2] ATL includes an object wizard that sets up primary structure of the objects quickly with a minimum of hand coding. On the COM client side ATL provides smart pointers that deal with COM reference counting. The library makes heavy use of the curiously recurring template pattern.

History[edit]

COM objects can also be created with Microsoft Foundation Classes (MFC), but this leads to larger binaries that require support DLLs.[3] ATL, on the other hand, is a more lightweight alternative in situations where the graphical user interface parts of MFC are not required.[4]

In ATL version 7 (Visual Studio 2003), which directly succeeded version 3 (Visual Studio 6.0), a number of MFC classes like CString were made available in ATL, or more precisely moved to an ATLMFC common layer which is shared by both libraries. ATL version 7 also introduced attributes in C++ in an attempt to provide something similar to CLI attributes, however these have not been particularly successful, and have been deemphasized in ATL version 8 (Visual Studio 2005); the various wizards no longer generate them by default. Version 7 also introduced new string conversion classes.

On July 28, 2009, Microsoft released a patch to ATL to fix a bug that could allow ActiveX controls created using ATL to be vulnerable to a remote code execution security flaw.[5]

Since Visual Studio 2013, ATL code in Visual C++ 2013 is static, eliminating the DLL.[6]

Support classes[edit]

ATL includes many RAII classes to simplify management of COM types. The most commonly used classes include:

Compiler COM support[edit]

Although not formally part of ATL, Microsoft Visual C++ also includes additional C++ RAII classes to simplify management of COM types. These compiler COM support classes can be used as replacement for or in combination with ATL, and includes:

Note that as of Visual Studio 2012, the compiler COM support classes does not include a SAFEARRAY wrapper.

See also[edit]

References[edit]

  1. ^ Grimes, Richard (1998). "ATL and COM". ATL COM (1st ed.). Wrox Press. p. 6. ISBN 1-86100-249-1.
  • ^ Grimes, Richard (1999). "Building and calling a COM object using ATL". Beginning ATL 3 COM Programming (1st ed.). Wrox Press. p. 63. ISBN 978-1-86100-120-7.
  • ^ Williams, Mickey (2000). "Active Documents". Visual C++ 6 Unleashed (1st ed.). Sams. p. 733. ISBN 978-0-672-31241-0.
  • ^ Microsoft MSDN: Recommendations for Choosing Between ATL and MFC
  • ^ "ATL Security Update". MSDN. Microsoft. 2009-07-28. Retrieved 2011-09-19.
  • ^ ATL and MFC changes and fixes in Visual Studio 2013 http://blogs.msdn.com/b/vcblog/archive/2013/08/20/atl-and-mfc-changes-and-fixes-in-visual-studio-2013.aspx
  • ^ Microsoft MSDN: CComPtr Class
  • ^ Microsoft MSDN: CComBSTR Class
  • ^ Microsoft MSDN: CComVariant Class
  • ^ Microsoft MSDN: CComSafeArray Class
  • ^ Microsoft MSDN: _com_ptr_t Class
  • ^ Microsoft MSDN: _bstr_t Class
  • ^ Microsoft MSDN: _variant_t Class
  • ^ Microsoft MSDN: _com_error Class
  • External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Active_Template_Library&oldid=1192817623"

    Categories: 
    C++ libraries
    Microsoft application programming interfaces
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    Articles with NKC identifiers
     



    This page was last edited on 31 December 2023, at 13:50 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki