ATL Internals
暫譯: ATL 內部原理

Brent E. Rector, Chris Sells

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

買這商品的人也買了...

商品描述


Table Of Contents

Foreword.
Preface.
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.
Summary.

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.
Summary.

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.
Debugging.
Summary.

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.
Summary.

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

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.
Summary.

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

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.
Summary.

9. Windowing.
The Structure of a Windows Application.
CWindow.
CWindowImpl.
CDialogImpl.
Windows Control Wrappers.
CContainedWindow.
Summary.

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.
Summary.

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.
Summary.

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

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

商品描述(中文翻譯)

目錄

前言
序言
1. 你好,ATL
ATL 是什麼?
創建 COM 伺服器。
插入 COM 類別。
添加屬性和方法。
實現額外的介面。
支援腳本。
添加持久性。
添加和觸發事件。
使用窗口。
實現元件類別。
添加使用者介面。
托管控制項。
總結。

2. ATL 智能類型:字串、BSTR、VARIANT 和介面指標
字串資料類型、轉換宏和輔助函數。
CComBSTR 智能 BSTR 類別。
CComBSTR 類別。
ComVariant 智能 VARIANT 類別。
CComPtr、CComQIPtr 和 CComDispatchDriver 智能指標類別。
總結。

3. ATL 中的物件
回顧:COM 公寓。
實現 IUnknown。
ATL 的層次。
執行緒模型支援。
IUnknown 的核心。
你的類別。
CComObject 等。
ATL 創建者。
除錯。
總結。

4. COM 伺服器
COM 伺服器回顧。
物件映射和 CComModule 類別。
物件映射。
物件映射類別所需的方法。
CComModule 類別。
CComCoClass 再探。
伺服器優化編譯選項。
總結。

5. 介面映射
回顧:COM 身分。
表驅動的 QueryInterface。
多重繼承。
可拆卸介面。
聚合:控制外部。
介面映射技巧。
總結。

6. ATL 中的持久性
COM 持久性回顧。
ATL 持久性實現類別。
屬性映射。
持久性實現。
額外的持久性實現。
使用持久性添加按值序列化語義。
總結。

7. 集合和列舉器
COM 集合和列舉介面。
列舉陣列。
列舉 STL 集合。
集合。
ATL 資料類型的 STL 集合。
簡單集合。
物件模型。
總結。

8. 連接點
連接點回顧。
創建基於 ATL 的可連接物件。
創建一個事件接收者物件。
一切如何運作:混亂的實現細節。
總結。

9. 窗口管理
Windows 應用程式的結構。
CWindow。
CWindowImpl。
CDialogImpl。
Windows 控制包裝器。
CContainedWindow。
總結。

10. ActiveX 控制項
ActiveX 控制項回顧。
BullsEye 控制項要求。
使用 ATL 向導創建初始控制項。
初始 BullsEye 原始檔案。
逐步開發 BullsEye 控制項。
總結。

11. 控制項包含
控制項是如何被包含的。
基本控制項包含。
在對話框中托管控制項。
複合控制項。
HTML 控制項。
ATL 的控制項包含限制。
總結。

附錄 A:C++ 模板範例
模板的需求。
模板基礎。
一種不同的多型性。
函數模板。
成員函數模板。
總結。

附錄 B:ATL 類別和標頭
索引

讀者評價
「我常常想我應該寫一本關於 ATL 如何運作的書。在閱讀了《ATL Internals》之後,我覺得我幾乎沒有什麼可以寫的了。」— Jim Springfield, 《ATL 發明者,微軟公司》
「這本書是 ATL 程式設計師的權威參考。關於 CComObject 的章節就值得這個價格。」— Don Box, 《COM 專家,DevelopMentor》
「Brent 和 Chris 總是技術準確,並以易於理解的方式呈現資訊……我買了這本書,而我就是 ATL 開發負責人!」— Christian Beaumont, 《ATL 開發負責人,微軟公司》