ATL Internals
Written for the advanced C++ programmer,ATL Internalsreveals the inner workings of the Active Template Library (ATL), the toolkit of choice for building today's lightweight Internet and server components.The book begins with a tour of the ATL code generated by the Microsoft Visual C++ 6 AppWizard. The authors introduce fundamental ATL programming issues here, but they do not provide a general introduction to COM or ATL; they assume that readers have a good deal of background in both C++ and COM.The book focuses on the extremely useful ATL support classes for managing strings (BSTRs), variants, and smart pointers. It covers the classes that help instantiate COM components (and examines support for different threading models and "creator" classes). The guide continues with object internals--covering object maps and the classes used to manage them--and interfaces, including aggregates and various interface design options. Information on ATL's support for persistence, which lets objects save and restore their state; on how ATL supports basic containers; and on interfaces that work with the Standard Template Library (STL) in C++ is well done.Later sections explain how to work with windows and ActiveX controls. After some material on events (and connection points), the authors reveal ATL support for basic window operations, including dialogs. For building a custom ActiveX control, the authors provide an excellent example of a nicely functional visual control. (This code will prove invaluable since it illustrates all the essentials of ATL component programming.)--Richard Dragan