ATL Internals

Brent E. Rector, Chris Sells

  • 出版商: Addison Wesley
  • 出版日期: 1999-03-31
  • 售價: $2,048
  • 貴賓價: 9.5$1,946
  • 語言: 英文
  • 頁數: 656
  • 裝訂: Paperback
  • ISBN: 0201695898
  • ISBN-13: 9780201695892




Table Of Contents

1. Hello, ATL.
What Is ATL?
Creating a COM Server.
Inserting a COM Class.
Adding Properties and Methods.
Implementing Additional Interfaces.
Support for Scripting.
Adding Persistence.
Adding and Firing Events.
Using a Window.
Implementing Component Categories.
Adding a User Interface.
Hosting a Control.

2. ATL Smart Types: Strings, BSTRs, VARIANTs, and Interface Pointers.
String Data Types, Conversion Macros, and Helper Functions.
The CComBSTR Smart BSTR Class.
The CComBSTR Class.
The ComVariant Smart VARIANT Class.
The CComPtr, CComQIPtr, and CComDispatchDriver Smart Pointer Classes.

3. Objects in ATL.
Recall: COM Apartments.
Implementing IUnknown.
The Layers of ATL.
Threading Model Support.
The Core of IUnknown.
Your Class.
CComObject et al.
ATL Creators.

4. COM Servers.
A Review of COM Servers.
The Object Map and the CComModule Class.
The Object Map.
Methods Required of an Object Map Class.
The CComModule Class.
CComCoClass Revisited.
Server Optimization Compilation Options.

5. Interface Maps.
Recall: COM Identity.
Table-Driven QueryInterface.
Multiple Inheritance.
Tear-off Interfaces.
Aggregation: The Controlling Outer.
Interface Map Tricks.

6. Persistence in ATL.
A Review of COM Persistence.
ATL Persistence Implementation Classes.
The Property Map.
The Persistence Implementations.
Additional Persistence Implementations.
Adding Marshal-by-Value Semantics Using Persistence.

7. Collections and Enumerators.
COM Collection and Enumeration Interfaces.
Enumerating Arrays.
Enumerating STL Collections.
STL Collections of ATL Data Types.
Simple Collections.
Object Models.

8. Connection Points.
A Review of Connection Points.
Creating an ATL-Based Connectable Object.
Creating an Object That Is an Event Recipient.
How It All Works: The Messy Implementation Details.

9. Windowing.
The Structure of a Windows Application.
Windows Control Wrappers.

10. ActiveX Controls.
A Review of ActiveX Controls.
The BullsEye Control Requirements.
Creating the Initial Control Using the ATL Wizard.
The Initial BullsEye Source Files.
Developing the BullsEye Control Step by Step.

11. Control Containment.
How Controls Are Contained.
Basic Control Containment.
Hosting a Control in a Dialog.
Composite Controls.
HTML Controls.
ATL's Control Containment Limitations.

Appendix A: C++ Templates by Example.
The Need for Templates.
Template Basics.
A Different Kind of Polymorphism.
Function Templates.
Member Function Templates.

Appendix B: ATL Classes and Headers.
Index. 0201695898T04062001

Back to Top

Reader Reviews

"I've often thought that I should write a book on how ATL works. After reading ATL Internals, I don't think there would be much left for me to write about." — Jim Springfield, Inventor of ATL, Microsoft Corporation"This book is the definitive reference for ATL programmers. The chapter on CcomObject is worth the price alone." — Don Box, COM guy, DevelopMentor"Brent and Chris are always technically accurate and present the information in a well written, easy to understand manner... I bought it and I'm the ATL Development Lead! " — Christian Beaumont, ATL Development Lead, Microsoft Corporation

Back to Top