使用FFMPEG+LIVE555,Windows下实现屏幕录制+RTSP服务器
1、使用FFMPEG进行编码(ffmpeg版本为ffmpeg-5.0)
2、使用LIVE555建立RTSP服务器(live555版本为live.2022.02.07)
实现实时桌面视频流,Visual Studio为Visual Studio 2022版本
Visual Studio 2012 所有图标
包含Visual Studio 2012几乎所有图标包括工具栏上的,例如编译按钮都有呀,可以通过这些图标可以重建一个一样的Visual Studio 2012,图标个数为7783个
Windows程序设计(第五版) 上册
Windows程序设计(第五版)-上册.pdf
JLinkARM V432a
JLink V432a 驱动程序 Setup_JLinkARM_V432a.exe
JLinkARM V428
JLink V428 驱动程序 Setup_JLinkARM_V428.exe
重构——改善既有代码的设计
Chapter 1:Refactoring,a First Example 重构,第一个例子
The Starting Point 起点
The First Step in Refactoring 重构第一步
Decomposing and Redistributing the Statement Method 分解并重组slalemenl方法
Replacing the Conditional Logic on Price Code with Polymorphism 用多态代替价格条件逻辑代码
Final Thoughts 结语
Chapter 2:Principles in Refactoring 重构原则
Defining Refactoring 何谓重构
Why Should You Refactor? 为何重构
When Should You Refactor? 何时重构
What Do I Tell My Manager? 怎样说服经理
Problems with Refactoring 重构的问题
Refactoring and Design 重构与设计
Refactoring and Performance 重构与性能
Where Did Refactoring Come From? 重构的起源
Chapter 3:Bad Smells in Code(by Kent Beck and Martin Fowler) 代码坏昧
Duplicated Code 重复代码
Long Method 过长方法
Large Class 过长类
Long Parameter List 过长参数列表
Divergent Change 发散式变化
Shotgun Surgery 霰弹式修改
Feature Envy 特性依恋
Data Clumps 数据泥团
Primitive Obsession 基本类型偏执
Switch Statements switch语句
Parallel Inheritance Hierarchies 平行继承体系
Lazy Class 冗余类
Speculative Generality 理论上的一般性
Temporary Field 临时字段
Message Chains 消息链
Middle Man 中间人
Inappropriate Intimacy 过度亲密
Alternative Classes with Different Interfaces 接口不同的等效类
Incomplete Library Class 不完整的库类
Data Class 数据类
Refused Bequest 拒绝继承
Comments 注释过多
Chapter 4:Building Tests 构建测试
The Value of Self-testing Code 自测试代码的重要性
The JUnit Testing Framework Junit测试框架
Adding More Tests 添加更多测试
Chapter 5:Toward a Catalog of Refactorings 重构目录
Format of the Refactorings 重构描述的格式
Finding References 寻找引用
How Mature Are These Refactorings? 这些重构的成熟度如何
Chapter 6:Composing Methods 组合方法
Extract Method 提取方法
Inline Method 内联方法
Inline Temp 内联临时变量
*Replace Temp with Query 用查询方法代替临时变量
Introduce Explaining Variable 引入解释性变量
Split Temporary Variable 分离临时变量
*Remove Assignments to Parameters 去除参数赋值
Replace Method with Method Object 用方法对象代替方法
Substitute Algorithm 替换算法
Chapter 7:Moving Features Between Objects 在对象之间移动特性
*Move Method 移动方法
Move Field 移动字段
Extract Class 提取类
Inline Class 内联类
Hide Delegate 隐藏委托类
Remove Middle Man 去除中间人
Introduce Foreign Method 引入外加方法
*Introduce Local Extension 引入本地扩展类
Chapter 8:Organizing Data 组织数据
Self Encapsulate Field 自封装字段
Replace Data Value with Object 用对象代替数据值
Change Value to Reference 将值对象改为引用对象
Change Reference to Value 将引用对象改为值对象
Replace Array with Object 用对象代替数组
Duplicate Observed Data 重复被观察数据
*Change Unidirectional Associationto Bidirectional 将单向关联改为双向
Change Bidirectional Association to Unidirectional 将双向关联改为单向
*Replace Magic Number with Symbolic Constant 用字面常量代替魔数
Encapsulate Field 封装字段
Encapsulate Collection 封装集合
Replace Record with Data Class 用数据类代替记录
*ReplaceType Code with Class 用类代替类型码
Replace Type Code with Subclasses 用子类代替类型码
Replace Type Code with State/Strategy用State/Strategy 代替类型码
Replace Subclass with Fields 用字段代替子类
Chapter 9:Simplifying Conditional Expressions 简化条件语句
Decompose Conditional 分解条件语句
Consolidate Conditional Expression 合并条件语句
Consolidate Duplicate Conditional Fragments 合并重复的条件片段
Remove Control Flag 去除控制标志
Replace Nested Conditional with Guard Clauses 用守卫语句代替嵌套条件语句
Replace Conditional with Polymorphism 用多态代替条件语句
Introduce Null Object 引入Null对象
Introduce Assertion 引入断言
Chapter 10:Making Method Calls Simpler 简化方法调用
Rename Method 重命名方法
Add Parameter 添加参数
Remove Parameter 去除参数
Separate query from Modifier 将查询方法与修改方法分离
Parameterize Method 参数化方法
Replace Parameter with Explicit Methods 用显式方法代替参数
Preserve Whole Object 保持对象完整
Replace Parameter with Method 用方法代替参数
Introduce Parameter Object 引入参数对象
Remove Setting Method 去除设置方法
Hide Method 隐藏方法
Replace Constructor with Factory Method 用工厂方法代替构造器
Encapsulate Downcast 封装向下转型
Replace Error Code with Exception 用异常代替错误码
Replace Exception with Test 用测试代替异常
Chapter 11:Dealing with Generalization 处理泛化关系
Pull Up Field 上移字段
Pull UP Method 上移方法
Pull Up Constructor Body 上移构造器主体
Push Down Method 下移方法
Push Down Field 下移字段
Extract Subclass 提取子类
Extract Superclass 提取超类
Extract Interface 提取接口
Collapse Hierarchy 合并继承层次
Form Template Method 形成Template Method
Replace Inheritance with Delegation 用委托代替继承
Replace Delegation with Inheritance 用继承代替委托
Chapter 12:Big Refactorings(by Kent Beck and Martin Fowler) 大型重构
Tease Apart Inheritance 分解继承层次
Convert Procedural Design to Objects 将过程式设计转换为面向对象
Separate Domain from Presentation 将领域逻辑与表现分离
Extract Hierarchy 提取继承层次
Chapter 13:Refactoring,Reuse,and Reality(by William Opdyke) 重构,复用与现实
A Reality Check 现实的检验
Whv Are Developers Reluctant to Refactor Their Programs? 开发人员为何不愿重构程序
A Reality Check(Revisited) 再谈现实的检验
Resources and References for Refactoring 重构的资源和参考文献
Implications Regarding Software Reuse and Technology Transfer 对软件复用与技术传播的意义
A Final Note 结语
References 参考文献
Chapter 14:Refactoring Tools(by Don Roberts and John Brant) 重构工具
Refactoring with a Tool 使用工具重构
Technical Criteria for a Refactoring Tool 重构工具的技术标准
Practical Criteria for a Refactoring Tool 重构工具的实用标准
Wrap Up 结语
Chapter 15:Putting It All Together(by Kent Beck) 集大成
References参考文献
List of Soundbites 要点列表
Updates 更新内容
Index 索引
PVS Studio v4.21 注册版
PVS Studio v4.21 注册版
PVS-Studio
Static Code Analyzer for C/C++/C++0x
是visual studio 的插件,可用于代码质量分析,帮助你改进你的代码
JLinkARM V426b
JLink V426b 驱动程序 Setup_JLinkARM_V426b.exe
PVS Studio v4.14 注册版
PVS Studio v4.14 注册版
PVS-Studio
Static Code Analyzer for C/C++/C++0x
是visual studio 的插件,可用于代码质量分析,帮助你改进你的代码
MODBUS TCP SPECIFICATION v1.0
Contents
Contents ............................................................................................................................................................................2
1. Status of this specification .........................................................................................................................................3
2. Overview........................................................................................................................................................................3
2.1 Connection-oriented..............................................................................................................................................3
2.2 Data encoding ........................................................................................................................................................4
2.3 Interpretation of reference numbers .....................................................................................................................4
2.4 Implied length philosophy....................................................................................................................................5
3. Conformance class summary ......................................................................................................................................5
3.1 Class 0......................................................................................................................................................................5
3.2 Class 1......................................................................................................................................................................5
3.3 Class 2......................................................................................................................................................................6
3.4 Machine/vendor/network specific functions .....................................................................................................7
4. Protocol structure.........................................................................................................................................................7
5. Protocol reference by conformance class..................................................................................................................8
5.1 Class 0 commands detail.......................................................................................................................................9
5.1.1 Read multiple registers (FC 3)........................................................................................................................9
5.1.2 Write multiple registers (FC 16).....................................................................................................................9
5.2 Class 1 commands detail.....................................................................................................................................10
5.2.1 Read coils (FC 1)...........................................................................................................................................10
5.2.2 Read input discretes (FC 2)..........................................................................................................................10
5.2.3 Read input registers (FC 4) ..........................................................................................................................11
5.2.4 Write coil (FC 5)............................................................................................................................................11
5.2.5 Write single register (FC 6)..........................................................................................................................12
5.2.6 Read exception status (FC 7).......................................................................................................................13
5.3 Class 2 commands detail.....................................................................................................................................13
5.3.1 Force multiple coils (FC 15)..........................................................................................................................13
5.3.2 Read general reference (FC 20)....................................................................................................................14
5.3.3 Write general reference (FC 21)...................................................................................................................15
5.3.4 Mask write register (FC 22)..........................................................................................................................16
5.3.5 Read/write registers (FC 23).........................................................................................................................16
5.3.6 Read FIFO queue (FC 24) .............................................................................................................................17
6. Exception codes..........................................................................................................................................................17
Appendices .....................................................................................................................................................................19
A. Client and Server Implementation Guidance..........................................................................................................19
A.1 Client design........................................................................................................................................................19
A.2 Server design.......................................................................................................................................................20
A.2.1 Multithreaded server..................................................................................................................................20
A.2.2 Single -threaded server...............................................................................................................................21
A.3 Required and expected performance.................................................................................................................22
B. Data Encoding for non-word data...........................................................................................................................23
B.1 Bit numbers within a word .................................................................................................................................23
B.2 Multi-word quantities.........................................................................................................................................24
B.2.1 984 Data Types ............................................................................................................................................24
B.2.2 IEC-1131 data types.....................................................................................................................................25
WPF图形化编程实用手册
Contents
Introduction .................................................................xix
Overview.......................................................................... xix
What this Book Includes.................................................. xxi
Is This Book for You?...................................................... xxi
What Do You Need to Use This Book?.......................... xxii
How the Book Is Organized............................................ xxii
Using Code Examples.................................................... xxiv
Customer Support .......................................................... xxiv
Chapter 1 Overview of WPF Programming................1
New Features in WPF ..........................................................1
XAML basics.......................................................................2
Why XAML Needed? ............................................... 2
Creating XAML Files................................................ 3
Code-Behind Files..................................................... 4
Your first WPF Program......................................................5
Properties in XAML.................................................. 6
Event Handlers in Code-Behind Files....................... 7
Code-Only Example.............................................................8
XAML-Only Example .......................................................10
Chapter 2 WPF Graphics Basics in 2D ......................13
2D Coordinate Systems in WPF ........................................13
Default Coordinates................................................. 13
Custom Coordinates ................................................ 16
Custom Coordinates for 2D Charts ......................... 22
2D Viewport .................................................. 27
Zooming and Panning.................................... 29
x | Contents
Basic 2D Graphics Shapes .................................................31
Lines ........................................................................ 31
Rectangles and Ellipses........................................... 33
Polylines .................................................................. 37
Polygons .................................................................. 38
Chapter 3 2D Transformations...................................43
Basics of Matrices and Transforms....................................43
Vectors and Points................................................... 44
Scaling..................................................................... 44
Reflection ................................................................ 45
Rotation ................................................................... 46
Translation............................................................... 47
Homogeneous Coordinates ................................................47
Translation in Homogeneous Coordinates .............. 48
Scaling in Homogeneous Coordinates .................... 48
Rotation in Homogeneous Coordinates................... 49
Combining Transforms ........................................... 50
Vector and Matrix in WPF.................................................51
Vector Structure ...................................................... 51
Matrix Structure ...................................................... 53
Matrix Operations ................................................... 54
Matrix Transforms................................................... 57
Creating Perpendicular Lines .................................. 64
Object Transforms in WPF ................................................69
MatrixTransform Class ........................................... 71
ScaleTransform Class.............................................. 75
TranslateTransform Class ....................................... 79
RotateTransform Class............................................ 80
SkewTransform Class ............................................. 81
Composite Transforms ............................................ 83
Chapter 4 Geometry and 2D Drawing .......................87
Path and Geometry Classes................................................87
Line, Rectangle, and Ellipse Geometries ................ 88
GeometryGroup Class ............................................. 89
CombinedGeometry Class....................................... 92
PathGeometry Class ................................................ 96
Lines and Polylines........................................ 97
Contents | xi
Arcs................................................................ 97
Bezier Curves................................................. 98
Geometry and Mini-Language .............................. 100
Interactive 2D Drawing....................................................103
Mouse Events ........................................................ 114
Creating and Combining Shapes ........................... 115
Dragging and Moving Shapes ............................... 116
Hit Testing............................................................. 117
Custom Shapes.................................................................121
Star Shape.............................................................. 121
Arrow Line ............................................................ 125
Testing Custom Shapes ......................................... 131
Chapter 5 Colors and Brushes ..................................137
Colors...............................................................................137
System Colors ....................................................... 138
Color Picker........................................................... 142
Brushes.............................................................................150
SolidColorBrush.................................................... 151
LinearGradientBrush............................................. 153
Custom Colormap Brush....................................... 158
RadialGradientBrush............................................. 165
Custom Radial Colormap Brush ........................... 169
ImageBrush ........................................................... 175
DrawingBrush ....................................................... 181
VisualBrush........................................................... 187
Bitmap Effects....................................................... 189
Opacity Masks....................................................... 194
Brush Transforms.............................................................196
LinearGradientBrush Transform ........................... 204
RadialGradientBrush Transform ........................... 206
ImageBrush Transform ......................................... 207
Drawing and Visual Brush Transform .................. 207
Chapter 6 Animation .................................................209
WPF Animation Basics....................................................209
Property-Based Animation.................................... 210
A Simple Animation in Code ................................ 211
Animation and Storyboard...............................................213
xii | Contents
Storyboard and Event Trigger ............................... 213
Storyboard Animation in Code ............................. 215
Animation and Timing Behavior........................... 217
Duration ....................................................... 218
RepeatBehavior............................................ 220
AutoReverse ................................................ 220
BeginTime ................................................... 221
Speed Controls............................................. 221
Interactive Control................................................. 224
Animation and Transform................................................228
Animating Translation........................................... 228
Rolling Balls.......................................................... 231
Combining Transform Animations ....................... 236
Path Animation ................................................................240
Frame-Based Animation ..................................................244
Key-Frame Animation........................................... 244
Spline Key-Frame Animation ............................... 247
Custom Animation ...........................................................249
Custom Animation Class....................................... 250
Per-Frame Animation............................................ 254
Animation Using Timer ........................................ 256
Chapter 7 Physics and Games in WPF ....................263
Ordinary Differiential Equations .....................................263
Fourth-Order Runge-Kutta Method ...................... 264
Higher-Order ODEs .............................................. 265
ODE Solver ........................................................... 265
Pendulum .........................................................................267
Equation of Motion ............................................... 267
Pendulum Simulator.............................................. 268
Coupled-Spring System ...................................................274
Equations of Motion.............................................. 275
Coupled Spring Simulator..................................... 275
Projectiles.........................................................................287
Aerodynamic Drag Force ...................................... 287
Projectile Equations of Motion ............................. 288
Golf Game ............................................................. 289
Collision...........................................................................296
Bouncing Ball Physics .......................................... 297
Contents | xiii
Bouncing Ball Simulator....................................... 299
Fractals.............................................................................306
Binary Tree............................................................ 307
Snowflake.............................................................. 310
Mandelbrot Set ...................................................... 315
Julia Set ................................................................. 323
Chapter 8 Charts in WPF..........................................331
Simple Line Charts ..........................................................331
Creating Simple Line Charts ................................. 332
How It Works ........................................................ 334
Line Charts with Data Collection ....................................334
Chart Style............................................................. 335
Data Collection...................................................... 336
Data Series............................................................. 337
Creating Charts...................................................... 339
Gridlines and Labels ........................................................342
XAML Layout....................................................... 342
ChartStyleGridlines Class ..................................... 344
Testing Project....................................................... 349
Legend..............................................................................351
Legend Class ......................................................... 352
Testing Project....................................................... 355
Chart User Control...........................................................358
Creating Chart Control .......................................... 359
Defining Dependency Properties................. 361
Chart Style for Chart Control ...................... 366
Data Collection and Data Series .................. 371
Using Chart Control .............................................. 372
Creating Simple Chart ................................. 373
Creating Multiple Charts ............................. 375
Chapter 9 3D Transformations.................................379
3D Matrices in WPF ........................................................379
3D Points and Vectors........................................... 379
Matrix3D Structure ............................................... 382
Matrix3D Operations............................................. 383
Matrix3D Transforms............................................ 387
Rotation and Quaternion ....................................... 391
xiv | Contents
Projections........................................................................394
Orthographic Projections....................................... 395
Multi-View Projections ............................... 395
Axonometric Projections ............................. 396
Perspective Projections ......................................... 399
One-Point Perspective Projections .............. 400
Two-Point Perspective Projections.............. 400
Three-Point Perspective Projections............ 401
Perspective Projection Matrix...................... 401
Views and Projections in WPF ........................................402
View Transform .................................................... 403
Perspective Projection ........................................... 406
View Frustum .............................................. 406
Perspective Transform Matrix ..................... 406
Implementing Perspective Transforms ........ 409
Testing Perspective Projections................... 411
Orthographic Projection ........................................ 415
Orthographic Transform Matrix .................. 416
Implementing Orthographic Transforms ..... 417
Testing Orthographic Projections ................ 418
Object Transforms in WPF ..............................................420
ScaleTransform3D Class....................................... 421
TranslateTransform3D class ................................. 425
RotateTransform3D Class ..................................... 426
MatrixTransform3D Class..................................... 428
Combining Transforms ......................................... 429
Chapter 10 WPF Graphics Basics in 3D..................433
3D Graphics Basics..........................................................433
Viewport3D........................................................... 434
3D Objects in WPF ............................................... 435
Geometry and Mesh .............................................. 436
GeometryModel3D and Surfaces .......................... 438
Illuminating the Scene........................................... 440
Camera Position .................................................... 441
Simple Triangle in 3D ........................................... 442
Basic 3D Shapes ..............................................................444
Coordinate Axes and Wireframe........................... 445
Creating Cube........................................................ 447
Contents | xv
Creating Sphere ..................................................... 453
Creating Cylinder .................................................. 456
Creating Cone........................................................ 461
Creating Torus....................................................... 464
Chapter 11 Custom 3D Geometries..........................469
Cube Geometry ................................................................469
CubeGeometry Class............................................. 469
Tesing CubeGeometry........................................... 473
Ellipsoid Geometry ..........................................................477
EllipsoidGeometry Class....................................... 477
Testing EllipsoidGeometry ................................... 480
Cylindrical Geometry.......................................................482
CylinderGeometry Class ....................................... 483
Testing CylinderGeometry.................................... 486
Cone Geometry ................................................................489
ConeGeometry Class............................................. 490
Testing ConeGeometry ......................................... 493
Torus Geometry ...............................................................497
TorusGeometry Class............................................ 497
Testing TorusGeometry......................................... 501
Icosahedron Geometry .....................................................505
IcosahedronGeometry Class.................................. 506
Testing IcosahedronGeometry .............................. 509
Dodecahedron Geometry .................................................512
DodecahedronGeometry Class.............................. 513
Testing DodecahedronGeometry........................... 519
Soccer Ball Geometry ......................................................521
SoccerGeometry Class .......................................... 522
Testing SoccerGeometry ....................................... 529
Chapter 12 Custom 3D Shapes .................................535
Deriving from UIElement3D ...........................................535
Cube Shape ......................................................................538
Cube Shape Class .................................................. 538
Testing Cube Shape............................................... 540
Ellipsoid Shape ................................................................544
Ellipsoid Shape Class ............................................ 544
Testing Ellipsoid Shape......................................... 547
xvi | Contents
Cylinder Shape.................................................................548
Cylinder Shape Class ............................................ 549
Testing Cylinder Shape ......................................... 551
Cone Shape ......................................................................552
Cone Shape Class .................................................. 553
Testing Cone Shape............................................... 555
Torus Shape .....................................................................556
Torus Shape Class ................................................. 557
Testing Torus Shape.............................................. 559
Icosahedron Shape ...........................................................560
Icosahedron Shape Class....................................... 561
Testing Icosahedron Shape.................................... 563
Dodecahedron Shape .......................................................563
Dodecahedron Shape Class ................................... 563
Testing Dodecahedron Shape................................ 564
Soccer Shape....................................................................565
Soccer Shape Class................................................ 565
Testing Soccer Shape ............................................ 569
Combining Shape.............................................................569
Combining Shape Class ........................................ 570
Testing Combining Shape ..................................... 573
Chapter 13 3D Surfaces .............................................575
Simple Surfaces ...............................................................575
Rectangular Meshes .............................................. 576
SimpleSurface Class.............................................. 577
Creating Simple Surfaces ...................................... 581
Parametric Surfaces .........................................................584
ParametricSurface Class........................................ 585
Creating Parametric Surfaces ................................ 589
Helicoid Surface .......................................... 589
Sphere Surface ............................................. 590
Torus Surface............................................... 591
Quadric Surfaces.......................................... 592
Extruded Surfaces ............................................................593
ExtrudeSurface Class ............................................ 594
Creating Extruded Surfaces................................... 598
Surfaces of Revolution.....................................................599
RotateSurface Class............................................... 600
Contents | xvii
Creating Surfaces of Revelution............................ 604
Surface Shading ...............................................................606
SurfaceShading Class............................................ 606
Creating Shaded Surfaces...................................... 610
Chapter 14 3D Model Manipulation ........................615
Lighting and Shading.......................................................615
Light Sources......................................................... 616
Testing Light Sources............................................ 617
Shading.................................................................. 620
Materials ..........................................................................621
Diffuse Materials................................................... 622
Specular and Emissive Materials .......................... 624
Texture Mapping..............................................................627
Using LinearGradientBrush......................... 627
Using RadialGradientBrush......................... 630
Using Image and Tile Brushes..................... 633
2D Elements on 3D Surfaces ...........................................634
Viewport2DVisual3D Class ........................ 635
Using Viewport2DVisual3D ....................... 635
Interacting with 3D Models .............................................641
Hit-Testing for 3D Geometries.................... 642
Hit-Testing for 3D Shapes ........................... 645
Rotating 3D Objects with Mouse ................ 649
Index ............................................................................653
ATL开发指南(第2版) 中文版
内容简介
本书是介绍使用ATL进行软件开发的参考用书。全书分为十三章:第一章引入了C++模板的概念;第二章详细介绍了组件对象模型(COM);第三章介绍了活动模板库(ATL)的概念和使用方法;第四章涉及接口的实现和线程之间的参数调度等细节问题;第五章探讨了代码复用的两种方法――包容和集合;第六章讨论了关于自动化的问题;第七章说明了事件和连接点的管理;第八章围绕ActiveX控件展开了详细的论述;第九章介绍了COM中的两种实体――枚举器和集合;第十章研究了COM里的线程管理;第十一章讨论了OLE DB同ATL之间的关系;第十二章介绍了两种GUI接口――对话框和视窗;最后一章解释了COM+的一些基本概念。
由于书中的内容非常庞杂,并且涉及到Visual C++开发的一些问题,所以本书对读者有一定的要求。我们希望你在开始阅读之前,已经了解COM、ActiveX控件的基本知识,并且具有使用Visual C++开发应用程序的实践经验。本书的主要对象是程序设计或开发人员,同时也可以作为大专院校计算机专业师生和计算机爱好者的参考资料。
目录:
第一章 使用C++模板开发应用程序
1.1 模板简介
1.1.1 函数模板
1.1.2 类模板
1.2 基于模板的堆栈类
1.3 成员函数的实现
1.4 不定类型的模板参数
1.5 基于模板的复用技术
1.6 ATL如何使用模板
1.7 小结
第二章 组件对象模型(COM)简介
2.1 软件组件及其属性
2.1.1 同语言的无关性:二进制的设计标准
2.1.2 版本升级的各律性
2.1.3 位置的透明性
2.1.4 面向对象的特性
2.2 COM模型的原始实现
2.2.1 客户程序和服务器程序
2.2.2 OLE和ActiveX
2.2.3 Microsoft Transaction Server(MTS)
2.3 COM的精髓:接口
2.3.1 C++的虚函数表
2.3.2 COM的接口
2.4 对COM接口的访问
2.5 组件的多接口特性
2.5.1 标准COM接口
2.5.2 TRESULT
2.5.3 IUnknown的实现
2.5.4 组件的生存期
2.5.5 全局特有标识符
2.5.6 标题标识符
2.5.7 注册表
2.5.8 组件的类别
2.5.9 OLEWEW
2.5.10 组件的宿主文件
2.5.11 类工厂
2.6 基于COM的复用技术
2.6.1 包容(Containment)
2.6.2 集合(Aggregation)
2.7 COM的API函数
2.7.1 CoInitialize和CoInitializeEx
2.7.2 CoUninitialize
2.7.3 CoRegisterClassObject
2.7.4 CoGetClassObject
2.7.5 CoCreateInstance
2.7.6 DllCanUnloadNow
2.7.7 DllGetClassObject
2.8 其他涉及COM的问题
2.8.1 C++里关于COM的宏:STEMETHOD和SIDMETHODIMP
2.8.2 COM和Unicode
2.8.3 COM和多态性
2.9 示例:建立一个简单的COM客户程序和服务器程序
2.9.1 第一步:创建Visual C++工程
2.9.2 第二步:创建IMATH.H文件
2.9.3 第三步:声明组件和类工厂
2.9.4 第四步:组件类和类工厂类的实现
2.9.5 第五步:创建组件的宿主(SERVER.CPP)
2.9.6 第六步:添加对自注册和组件类别的支持
2.9.7 第七步:标准入四点的导出
2.9.8 第八步:将文件插入到工程里并建立该工程
2.9.9 第九步:使用OLEVIEW测试Math组件
2.9.10 第十步:建立一个简单的COM客户
2.9.11 第十一步:建立客户工程
2.9.12 对服务器程序进行调试
2.9.13 示例中忽略的东西
2.10 小结
第三章 活动模板库
3.1 ATL的基本特征
3.2 ATL和MFC
3.3 ATL框架结构概述
3.3.1 ATL的实现
3.3.2 组件的宿主支持
3.3.3 对IUnknown的支持
3.3.4 对类工厂的支持
3.3.5 对COM程序开发的其他方面的支持
3.4 ATL向导程序的使用
3.4.1 ATL COM AppWizard
3.4.2 ATL对象向导程序
3.4.3 线程管理模型
3.4.4 接口
3.4.5 集合
3.4.6 对ISupporErrorInfo的支持
3.4.7 对连接点的支持
3.4.8 自由线程调度器
3.5 Object Wizard里的其他选项
3.6 一个服务器程序示例
3.6.1 ATL工程的结构
3.6.2 SYDM.H和SIDAFX.CPP
3.6.3 RESOURCE.H和ProjectName.rc
3.6.4 ProjectName.CPP、ProjectName.H和ProjectName.DEF
3.6.5 ProjectName.IDL
3.7 接口定义语言
3.8 ATL工程的建立
3.8.1 ATL的基本宿主支持:CComModule
3.8.2 BEGIN_OBJECT_MAP和OBJECT_ENTRY宏
3.8.3 CComModule
3.8.4 ATL对组件的支持
3.8.5 AddRef和Release所在的位置
3.8.6 CComObject
3.8.7 接口和多重继承
3.8.8 ATL_NO_VTABLE
3.8.9 ATL的类工厂支持:CComCoClass
3.8.10 自注册功能与注册器
3.8.11 ATL和组件的类别
3.9 使用ATL实现Math组件
3.9.1 创建Visual C++工程
3.9.2 ATL COM AppWizard
3.9.3 ATL Object Wizard
3.9.4 Object Wizard里的Names(名称项)
3.9.5 Object Wizard里的Attributes(属性项)
3.10 IMath接口的实现
3.11 添加IAdvancedMath及方法
3.11.1 MATH.H文件的改动
3.11.2 MATH.CPP文件的改动
3.12 工程的创建
3.12.1 建立另外一个COM客户程序
3.12.2 测试服务器
3.13 小结
第四章 接口、接口定义语言和调度
4.1 COM接口类型概述
4.1.1 Vtabe接口
4.1.2 IDispatch接口:Dispinterfaces
4.1.3 双向接口
4.2 组件及其接口的描述
4.2.1 类型信息
4.2.2 调度
4.3 分布式COM
4.4 标准调度
4.4.1 类型库(通用)调度
4.4.2 自定义调度
4.5 创建Proxy/Stub DLL
4.6 接口定义语言
4.6.1 基本语法和布局
4.6.2 接口的声明:方法和属性
4.7 IDL数据类型
4.7.1 数组
4.7.2 字符串
4.7.3 结构
4.7.4 ENUM类型
4.8 ATL及COM数据类型
4.8.1 接口指针
4.8.2 C++智能指针
4.8.3 CComPtr
4.8.4 CComQIPtr
4.8.5 BSTR
4.8.6 CComBSTR
4.9 COM的内存管理
4.9.1 COTastMemAlloc和CoTaskMemFree
4.9.2 IDL和内存管理
4.10 COM中的错误处理
4.10.1 ISupportErrorInfo
4.10.2 CreateErrorInfo和ICreateErrorInfo
4.10.3 SetErrorInfo和IErrorInfo
4.11 客户机和GetErrorInfo
4.12 ATL对错误处理的支持
4.12.1 CComCoClass::Error
4.12.2 ISupportErrorInfoImpl
4.13 示例:在一个EXE宿主程序中创建Math组件
4.13.1 步骤一:创建Visual C++工程
4.13.2 步骤二:使用ATL Object Wizard
4.13.3 步骤三:添加IMath和IAdvancedMath接口
4.13.4 步骤四:处理被零除的问题
4.13.5 步骤五:添加IMath2接口
4.13.6 步骤六:添加IComponentInfo接口
4.13.7 步骤七:工程的编译连接
4.13.8 步骤八:编连并注册Proxy/Stub DLL
4.14 示例:创建COM客户机程序
4.15 示例:创建Visual Basic客户机程序
4.15.1 步骤一:创建应用程序窗体
4.15.2 步骤二:为Math组件插入引用
4.15.3 步骤三:添加代码
4.16 小结
第五章 包容与集合
5.1 二进制复用
5 2 COM包干手
5.3 COM集合
5.4 ATL对集合的支持
5.5 创建集合组件
5.5.1 选择性集合
5.5.2 盲目集合
5.6 ATL对包容的支持
5.6.1 FinalConstruct和FinalRelease
5.7 ATL对集合的支持
5.7.1 可集合组件的实现
5.7.2 DECLARE_AGGREGATABLE宏
5.7.3 DECLARE_NOT_AGGREGATABLE宏
5.7.4 DECLARE_ONLY_AGGREGATARLE宏
5.7.5 DECLARE_POLY_AGGREGATABLE宏
5.8 集合的实现
5.8.1 COM_INTERFACE_ENTRY_AGGREGATE
5.8.2 COM_INTERFACE_ENTRY_AGGREGATE_BLIND
5.8.3 COM_INTERFACE_ENTRY_AUTOAGGREGATE宏和COM_INTERFACE_ENTRY_AUTOAGGREGATE_BLIND宏
5.8.4 DECLARE_GET_CONTROLLING_UNKNOWN宏
5.9 示例:创建一个简单的Math组件
5.9.1 步骤一:创建实现IMath接口的简单Math组件
5.9.2 步骤二:实现IMath接口
5.9.3 步骤三:工程的编译连接(简单示例)
5.10 示例:使用集合实现高级Math组件
5.10.1 步骤一:实现IAdvancedMath接口
5.10.2 步骤二:与简单的Math组件集合
5.10.3 步骤三:纳入集合的CLSID和IID定义的头文件
5.10.4 步骤四:向类中添加IUnknown指针
5.10.5 步骤五:覆盖FinalConstruct接口
5.10.6 步骤六:将被集合组件的接口添加到接口映射中
5.10.7 步骤七:释放被集合的组件
5.10.8 步骤八:测试集合组件
5.11 示例:通过包容实现高级Math组件
5.11.1 步骤一:为IMath添加实现代码
5.11.2 步骤二:测试包容组件
5.12 小结
第六章 自动化
6.1 后绑定
6.2 Dispinterface
6.3 双向接口
6.4 自动化数据类型
6.4.1 VARIANT数据类型
6.4.2 SafeArray数据类型
6.5 实现一个派发接口
6.5.1 实现IDispatch接口
6.5.21 IDispatch API函数
6.6 双向接口的实现
6.7 访问基于IDispatch的接口
6.7.1 后绑定(动态绑定)
6.7.2 ID绑定(前绑定)
6.8 前绑定的需求信息
6.9 ATL对自动化的支持
6.9.1 IDispatchImpl
6.9.2 CComTypeInfoHolder
6.9.3 CComVariant
6.10 自动化与接口版本更新
6.10.1 IDispatch的版本更新
6.10.2 双向接口的版本更新
6.11 示例:使用自动化实现Math组件
6.11.1 步骤一:创建Math组件
6.11.2 步骤二:实现IMath接口
6.11.3 步骤三:设置IDL属性
6.11.4 步骤四:编连(Build)所生成的工程
6.12 添加第二个IDispatch接口
6.13 实现第三个双向接口
6.14 创建C++双向接口客户机程序
6.15 创建Visual Basic客户机程序
6.15.1 后绑定
6.15.2 前绑定
6.16 小结
第七章 事件和连接点
7.1 接口的回调
7.2 引入和引出接口
7.2.1 Advise方法
7.2.2 Visual Base中的Implements关键字
7.3 回调示例
7.3.1 步骤一:创建Chapter7_Server工程和Math组件
7.3.2 步骤二:实现IMath接口
7.3.3 步骤三:添加Advise方法
7.3.4 步骤四:定义引出接口
7.3.5 步骤五:通知客户机程序
7.4 Visual Basic客户机程序
7.4.1 步骤一:引用Chapter7_CallBackServer的类型库
7.4.2 步骤二:添加CallBack类
7.4.3 步骤三:通知并传送组件
7.5 可连接对象
7.5.1 IConnectionPointContainer
7.5.2 IConnectionPoint
7.5.3 连接点、自动化和IProvideClassInfo2
7.5.4 IProvideClassInfo2Impl
7.6 ATL与连接点
7.6.1 Implement Connecting Point Wizard向导程序
7.6.2 连接映射
7.6.3 IConnectionPointImpl
7.6.4 IConnectionPointContainerImpl
7.6.5 AtlAdvise
7.6.6 Visual Basic的WithEvents关键字
7.7 使用连接点的一个示例
7.7.1 步骤一:创建Math组件
7.7.2 步骤二:实现IMath接口
7.7.3 步骤三:定义Event接口
7.7.4 步骤四:运行Implement Connection Point Wizard
7.7.5 步骤五:创建一个C++连接点客户程序
7.7.6 步骤六:编写Visual Basic连接点客户机程序
7.8 小结
第八章 ActiveX控件
8.1 ActiveX控件和容器
8.1.1 容器模式
8.1.2 控件和容器接口
8.2 什么是ActiveX控件
8.2.1 OLE Controls’94规范
8.2.2 OLE Controls’96规范
8.2.3 控件和容器设计指南
8.3 ActiveX控件功能类属
8.3.1 基本的COM支持
8.3.2 自注册
8.4 控件注册表项
8.4.1 Control
8.4.2 Programmable
8.4.3 Insertable
8.4.4 MiscStatus
8.4.5 Verb
8.4.6 ToolboxBitmap32
8.4.7 TypeLib
8.5 组件类属
8.6 OLE文档接口
8.7 自动化支持:IDispatch
8.7.1 标准属性和固有属性
8.7.2 Ambient属性
8.7.3 ATL和Ambient属性
8.7.4 标准控件接口
8.8 可连接对象与控件事件
8.8.1 标准事件
8.8.2 属性页
8.9 属性的持续性
8.9.1 IPersistStream
8.9.2 IPersistStreamInit
8.9.3 IPersistPropertyBag
8.10 ATL对ActiveX控件的支持
8.10.1 ATL的ActiveX控件支持文件
8.10.2 ATL Object Wizard
8.10.3 Names和Attributes选项卡
8.10.4 Miscellaneous选项卡
8.10.5 View Status选项和透明控件
8.10.6 Misc Status选项
8.10.7 Add Control Based On选项
8.10.8 对话框中的Other选项区
8.10.9 Stock Properties选项卡
8.11 ATL Object Wizard创建的文件
8.11.1 CComControl
8.11.2 CComControlBase
8.11.3 CWindowImpl
8.11.4 CStockPropImpl
8.12 初始化固有字体属性
8.13 IOleObjectImpl
8.14 限制控件的大小
8.15 IViewObjectImpl
8.16 CComControl::OnDraw
8.17 IDataObjectImpl
8.18 IOleInPlaceObjectImpl
8.19 IOleInPlaceActiveObjectImpl
8.20 IOleControlImpl
8.21 IPersistStreamInitImpl和IPersistStorageImpl
8.22 属性映射
8.23 ATL对属性页的支持
8.23.1 CDialogImpl类
8.23.2 IpropertyPageImpl类
8.24 创建一个示例控件
8.24.1 创建控件的宿主程序
8.24.2 ATL Object Wizard的使用
8.24.3 ATL Object Wizard的Names和Attributes选项卡
8.24.4 ATL Object Wizard的Miscellaneous选项卡
8.24.5 ATL Object Wizard的Stock Properties选项卡
8.25 创建一个基本的控件
8.25.1 初始化固有属性
8.25.2 CComControl::OnDraw
8.25.3 实现控件属性的持久性:Property Map
8.26 添加固有属性页
8.27 添加自定义属性页
8.28向 控件中添加事件
8.29 使用Connection Point Wizard
8.30 小结
第九章 COM的枚举器和集会
9.1 COM枚举器
9.1.1 内部枚举器接口
9.1.2 IEnumString接口
9.2 客户枚举器的访问
9.3 ATL的枚举器支持
9.4 CComEnum的应用
9.5 建立一个简单的枚举器客户应用程序
9.6 实现一个简单的枚举器对象
9.6.1 步骤1:创建ATL服务器工程
9.6.2 步骤 2:实现枚举器对象
9.6.3 步骤3:访问这一简单的枚举器服务器
9.7 COM集合技术
9.7.1 集合对象的实现
9.7.2 ATL对集合的支持
9.8 movie集合的实现
9.8.1 步骤1:创建ATL集合服务器工程
9.8.2 步骤2:实现movie组件
9.8.3 步骤3:修改IDL文件
9.8.4 步骤4:实现movie的集合组件
9.8.5 步骤5:定义IMovieCollection接口
9.8.6 步骤6:实现IApplication接口
9.8.7 步骤7:创建工程
9.9 创建Visual Basic客户程序
9.10 创建C++客户程序
9.11 小结
第十章 COM的线程管理
10.1 COM线程管理概述
10.1.1 单线程单元
10.1.2 多线程单元
10.1.3 单元
10.1.4 进程内组件
10.2 单线程单元
10.2.1 主STA
10.2.2 STA组件的需求(概要)
10.3 多线程单元
10.3.1 MTA组件的需求(概要)
10.3.2 混合模型组件的需求
10.4 自由线程管理的调度器
10.5 CoMarshalInterThreadInterfaceInStream
10.6 代码示例
10.7 ATL和COM的线程管理
10.7.1 Single和Apartment选项
10.7.2 CComSingleThreadModel
10.7.3 Free和Both选项
10.7.4 Free-Threaded Marshaler选项
10.7.5 CComObjectRoot
10.8 线程管理的示例
10.8.1 步骤1:创建math组件
10.8.2 步骤2:IMath接口的实现
10.8.3 步骤3:定义事件接口
10.8.4 步骤4:实现Advise方法
10.8.5 步骤5:在线程内执行计算
10.8.6 步骤6:工程的创建
10.9 一个C++客户应用程序
10.10 小结
第十一章 OLE DB和ATL
11.1 Microsoft数据访问技术的历史回顾
11.1.1 ODBC
11.1.2 OLE DB
11.2 ATL和OLE DB
11.2.1 ATL OLE DB Provider模板
11.2.2 数据源类
11.2.3 对话类
11.2.4 行集合类
11.2.5 命令类
11.3 ATL OLE DB Consumer模板
11.3.1 通用数据源支持
11.3.2 行集合和绑定支持
11.3.3 表格和命令支持
11.3.4 用户记录
11.4 活动数据对象
11.5 示例
11.5.1 通用工程概述
11.5.2 数据源文件
11.5.3 表格文件
11.5.4 创建Provider工程
11.5.5 模式信息的提供
11.5.6 数据管理器的建立
11.5.7 通过ADO访问OLE DB Providers
11.5.8 MFC/ATL Consumer的例子
11.6 小结
第十二章 对话框和窗口
12.1 ATL的窗口创建类
12.1.1 CWindow
12.1.2 CWindowImpl和消息映射
12.1.3 CWinTraits
12.1.4 CSimpleDialog
12.1.5 CDialogImpl
12.2 建立一个简单的Window GUI
12.2.1 步骤1:创建一个简单的窗口
12.1.2 步骤2:创建模态对话框
12.2.3 步骤3:创建非模态对话框
12.3 小结
第十三章 COM+入门
13.1 Windows DNA
13.2 COM+MTS=COM+
13.3 COM+提供的服务
13.4 COM+的目录(Catalog)
13.5 COM+的装载均衡服务
13.6 COM+的IMDB服务
13.7 COM+的对象缓存服务
13.8 COM+的队列组件
13.9 COM+事件
13.10 COM+的安全性服务
13.11 Visual C++未来的变化
13.11.1 基于属性的编程思路
13.11.2 属性语法
13.11.3 编译器的变化
13.11.4 接口描述符
13.12 最后一个例子
13.13 迈向COM+环境
13.14 小结
附录 Visual C++自带的COM支持
A.1 智能指针:_com_ptr_t
A.2 BSTR(_bstr_t)
A.3 Variant(_variant_t)
A.4 COM的错误处理(.corn.error)
A.5 #import指令
A.6 TLI和TLH文件
A.7 应该使用哪一种技术
A.8 客户应用程序示例
A.9 Chapter 6_NativeClient示例