search for books and compare prices
Tables of Contents for Professional Visual C++ 5 Activex/Com Control Programming
Chapter/Section Title
Page #
Page Count
Introduction
1
10
Tell Us What You Think
4
1
Source Code
4
1
Errors
5
1
The Requirement Analysis
5
6
Existing Network Topology
6
1
Identified Problematic Areas
6
1
The AW Personnel Directory
6
1
Distribution of Memos Regarding Corporate and Departmental Events
6
1
Automation in Human Resources
6
1
Our Proposal
7
1
Phase I: Proof of Concept
7
1
Phase II: ActiveX Deployment
7
4
Chapter 1: ActiveX Technology and Tools
11
14
COM/ActiveX
11
2
Binary Interoperability
11
1
A World of Interfaces
12
1
Operation Through Discovery
13
1
Prevalent Throughout ActiveX
13
1
Ready for the Networked World
13
1
DCOM
13
1
Where Is DCOM Taking Us
14
1
Security
14
1
Monikers
15
1
Code/Object Downloading
16
1
Development Tools
17
3
Visual Studio 97
17
1
Visual C++ Version 5.0
18
2
Native Compiler Support for COM
18
1
New and Improved ActiveX Code Generation Wizards
18
1
New Version of MFC and ATL Libraries
18
1
Leaner Compiled Executables
18
1
Higher Performance Runtime
18
1
Automating the Development Environment via Scripting
19
1
Class View Now Knows About COM Interfaces
19
1
ANSI C++ Conformance (X3J16)
19
1
Choice of Class Libraries
19
1
Wizards Galore
19
1
Class Libraries
20
5
Microsoft Foundation Classes 4.21
20
1
ActiveX Template Library 2.1
21
4
Chapter 2: An Unusual Introduction to COM
25
48
The IUnknown Interface
28
4
IUnknown::QueryInterface()
30
1
Parameters
30
1
Return Value
30
1
Comments
30
1
IUnknown::AddRef()
31
1
Return Value
31
1
Comments
31
1
IUnknown::Release()
32
1
Return Value
32
1
Comments
32
1
The Chicken and Egg Problem
32
1
A Few Golden Rules
33
5
Building Class Factories and Manufacturing Objects
38
1
IClassFactory Interface
39
3
IClassFactory::CreateInstance()
40
1
Parameters
40
1
Return Values
41
1
Comments
42
1
IClassFactory::LockServer()
41
1
Parameter
41
1
Return Values
42
1
Comments
42
1
A Word on Server Types
42
1
Picture This
43
7
Object Browsing Made Easier: The Object Viewer Tool
50
1
Programmatic Access to the System Registry
51
2
When We Cannot Bind Early
53
2
The IDispatch Interface
55
5
IDispatch::GetTypeInfo()
56
1
Parameters
56
1
Return Values
56
1
Comments
56
1
IDispatch::GetIDsOfNames()
56
2
Parameters
57
1
Return Value
57
1
Comments
57
1
IDispatch::Invoke()
58
2
Parameters
58
1
Return Value
59
1
Comments
60
1
The Need for Type Libraries
60
2
Dual Interfaces
62
11
Chapter 3: Writing An ActiveX Control From Scratch
73
52
RPC Magic
74
2
UUIDs Everywhere
76
2
BSTRs and VARIANT_BOOLs
77
1
The Almighty MIDL
78
3
Proxy and Stub Generation
79
2
IDL Syntax
81
3
To Define an Interface
82
1
To Define a Type Library
82
1
To Define a COM Object
83
1
To Define a Type
83
1
To Define a Structure
83
1
Making Interface Pointers
84
10
Multiple Inheritance
86
1
Nested Classes
86
1
COM Interfaces: vtables in Other Environments
87
1
Assembling vtables: Implementing IUnknown
88
3
Custom Interface Implemented as a Nested Class
91
3
Implementing a Class Factory
94
3
Hacking the Registry
97
8
The DllRegisterServer Function
99
3
The DllUnregisterServer Function
102
1
The DllGetClassObject Function
103
1
The DllCanUnload Function
104
1
Finishing up the Source Code
105
1
Compiling our Creation
105
6
Writing a Simple Client Test Harness
111
4
Giving Our BLOB a Workout
115
10
Chapter 4: ActiveX Controls The Easy Way: ATL 2.1
125
48
Spoon Feeding a COM Interface
138
3
Examining the Code
141
4
The IDL File
141
1
The Class Definition
142
2
The Class Implementation
144
1
Compiling
145
2
Testing Early Binding
147
1
New Features
148
7
New Compiler Directives
148
1
The TLH File
149
3
__declspec(uuid()) and__uuidof()
151
1
__declspec(property())
151
1
The TLI File
152
1
New Wrapper Classes
153
1
_bstr_t
153
1
_variant_t
153
1
Smart Pointers Save the Day
153
2
_com_ptr_t Class
154
1
Multithreaded Test Client Using Smart Pointers
155
18
Chapter 5: Building an Event Calendar Control
173
48
The Problem with OCXs
176
10
OCX Interfaces and Methods
177
9
IConnectionPointContainer
177
1
IEnumConnectionPoints
178
1
IConnectionPoint
178
1
IEnumConnections
179
1
IDataObject
179
1
IEnumSTATDATA
180
1
IEnumFORMATETC
180
1
IOleCache
180
1
IOleControl
180
1
IOleInPlaceActiveObject
181
1
IOleInPlaceObject
181
1
IOleObject
182
1
IPerPropertyBrowsing
183
1
IPersist
184
1
IPersistMemory
184
1
IPersistStorage
184
1
IPersistStreamInit
185
1
IPersistPropertyBag
185
1
IProvideClassInfo
185
1
IProvideClassInfo2
185
1
ISpecifyPropertyPages
185
1
IViewObject
186
1
IViewObject2
186
1
Developing OCXs
186
7
Variety of Controls
191
2
Visual Controls of Today and Nonvisual Controls of Tomorrow
193
1
COM Interfaces That We Don't Have to Implement
194
1
Interfaces Supporting Object Embedding
194
5
Category I: Services Provided by Container to Embedded Object
195
2
The IOleClientSite Interface
195
1
COleControl Handling
196
1
The IAdviseSink Interface
196
1
COleControl Handling
196
1
Category II: Control interfaces provided by the embedded object to the container
197
2
The Interfaces of the Cache Object
198
1
COleControl Handling
198
1
The IViewObject2 Interface
198
1
COleControl Handling
199
1
The IOleObject Interface to COleControl Mapping
199
1
Interfaces Supporting In-Place Activation User Interface
199
2
Interfaces Supporting Control-Specific Functionality
201
1
Interfaces for Persistence
202
1
Interfaces for Properties and Methods Manipulations
203
1
Interfaces for Events
203
2
Interfaces Supporting Windowless Controls
205
3
Interfaces Supporting Inactive Objects
208
2
Interfaces Supporting Optimized Drawing
210
3
The Aberdeen & Wilshire Calendar ActiveX Control
213
2
The CDataMgr Class
215
2
The CCellMgr Class
217
4
Chapter 6: Visual C++ 5.0 for ActiveX Components
221
34
Creating an ActiveX Control Project Using AppWizard
222
1
Add Properties for the Control Using ClassWizard
222
2
Adding Methods and Events to the Calendar Control
224
1
Implementing the Properties and Methods in Visual C++
225
10
The Buttons Visible Property
229
3
The Indispensable and Versatile COleDateTime Class
232
1
Implementing Methods
233
2
Implementing Any Other Support Classes and Logic for the Control
235
9
Implement the OnDraw() Function to Handle Control Drawing
244
6
About VTBL Interfaces, Disp Interfaces, and Dual Interfaces
250
5
Chapter 7: Advanced ATL for ActiveX Components
255
60
Determining Objects, Interfaces, and Server Type
255
1
Creating an ATL Skeletal Project
256
11
Defining the COM Interfaces in IDL
256
4
Mapping Types to VARIANT in IDL
260
3
Implementation of the IATLDept1 Interface
263
4
Working with Enumerations in ATL
267
5
Implementing the CATLCorpEvent Class
272
3
Compiling and Testing the DLL Server
275
1
Implementing the ATLFinder
276
6
The CDataMgr Class
282
7
Adding CDataMgr
289
2
Painting the Control
291
2
Supporting Dialog Boxes
293
8
Initializing with Data
301
2
Unit Testing the Calendar Control in the ActiveX Control Test Container
303
2
Testing the Calendar Control in VB
305
1
Testing Under Internet Explorer 3.0
306
2
Testing Under FrontPage 97
308
3
Complexity Shouldn't Triumph
311
4
Chapter 8: Distributed Objects With DCOM
315
54
Obtaining DCOM
315
1
Installing DCOM
316
1
DCOM Enabling Our ActiveX Controls: A Preview
317
1
Preparing the Network
317
5
For NT Server Administered Domains
317
2
For Peer-to-Peer Windows 95 Networks
319
1
Installing the Software Components
320
2
Making Calls Across Processes
322
3
Calling COM Methods Between Machines
325
1
The Object-Oriented Hype
326
1
Dream of Code Reuse
327
1
Compelling Business Reasons
328
1
Dealing with Legacy Applications
329
1
CoCreateInstanceEx()
330
2
CoInitializeSecurity()
332
1
New CoRegisterPSClsid() API
332
4
Automated Application Download and Install
336
19
CoGetClassObjectFromURL()
336
6
Asynchronous and URL Monikers
338
4
An Applied Example: The `Downloader' Control
342
13
The ILoadlate Interface
342
1
Coding the Downloader Control
343
7
Coding the Test Client
350
4
Testing the Downloader Control
354
1
Problems Still Unsolved: The Missing Links
355
5
Making it Simple: Hide the Details
355
1
Finding Objects: Location Service
356
1
Transforming Chaos into Order: Transaction Service
356
1
Working in an Asynchronous World: Queuing Transport
357
1
Ensuring Uptime: Clustering of Redundant Inexpensive Computers
358
2
Setting up Machine A (the Client Machine)
360
2
Setting up Machine B (the Web Server and Finder Service machine)
362
2
Setting up Machine C, the Departmental Server
364
2
Running an In-Proc Server Remotely
364
1
Testing the Remote Instantiation of ATLDept
365
1
Testing the Three Networked Machines
366
1
Testing DCOM with Windows NT 4.0
366
3
Chapter 9: Security
369
40
The Need for Network Security
369
2
Restricting Access
370
1
Access rights
370
1
Identification and Authentication
370
1
Integrity
370
1
Privacy
371
1
Fitting the Pieces Together
371
2
ActiveX and Windows NT Server Network
372
1
Controlled Access to Web Pages
373
1
A Non-Microsoft Scenario
374
1
Internet Explorer with IIS over an Intranet
375
1
Internet Explorer with IIS over the Internet
376
1
Best Method for Secured Intranet
376
1
The Security Model
376
1
The Elements of Security: Domains, Users, SIDs, and SDs
377
8
Domains
377
1
Authentication Authority
378
1
Users and Groups
378
1
Security Identifier
378
1
Security Descriptors
378
1
Access Control Lists
379
1
Security Access Tokens
379
1
Client Credential
380
1
SSPI and NTLMSP Authentication
380
1
NTFS
381
1
Authenticated RPC
382
1
Windows NT versus Windows 95
383
1
Security Features in Windows 95
383
1
What Is Not There
383
1
What Is Possible
384
1
Anonymous Authentication
385
1
Basic Authentication
386
1
Windows NT Challenge/Response Authentication
386
1
ISAPI Applications Security Issues
387
8
Impersonation
391
4
DCOM Security Blankets
395
1
Security Blanket Negotiation
396
1
DCOM Security Categories
396
1
Security Level Configuration
397
1
Launch Security
397
2
DCOM Security API
399
3
CoCreateInstanceEx() and Client Security Blanket
399
2
The CoIntializeSecurity() Call
401
1
IClientSecurity for Call Security Control
402
1
IServerSecurity Interface
403
1
Client-Side Proxy Copying
403
2
Working with IServerSecurity
405
4
Chapter 10: Fitting ActiveX to the Intranet
409
18
The Events Calendar
410
1
How Has the System Improved?
411
1
Increased User Interactivity
411
1
Made Operation More Efficient
411
1
Shifted Assets from Process to Technology
411
1
The Problem with Our Calendar
412
1
Beware of Systems with Distributed Updates
412
1
Centralized Control Problem Never Goes Away
412
1
Network Traffic and Interface Factoring
413
1
Dealing with Legacy Systems
413
2
Version Control for Distributed Components
415
1
Supporting Heterogeneous Networks
415
2
Working with All Network Transports
417
1
Use and Reuse of Expertise
418
1
Protecting Against Changes In Object/Component Technology
419
1
MFC and Wizards for Building OCX and Visually Oriented ActiveX Controls Painlessly
420
1
Support for OC96 Optimization Simplifies Windowless or Nonrectangular Controls
420
1
Support for Internet Extension of OC96
420
1
Native Client Support for `Low Surface Area' Applications with No `Code-Bloat'
420
1
MFC and Wizard-Based Automation Support, as Easy as Calling C++ Library Functions
421
1
ATL 2.1 to Create `Lean-and-Mean' COM Servers in Any Form: In-Proc, Local, or NT Service
421
1
Simple Dual Interface Support
421
1
Use Data Source and Data-Aware ActiveX Controls in Creating New Controls
421
1
Create Your Own Data-Aware Controls Bound to Data Source for ADC or RDO Operation Today
422
1
A Powerful Language Tool to `Tap' into the ActiveX Client/Platform Stack at Any Level
422
1
Go Down to the Protocol Level
422
1
MFC-Based DocObject Support
422
1
The Ultimate Flexibility in Code Reuse
422
1
Source/Language Level Code Reuse
423
1
Binary/Link Level Code Reuse
423
1
Binary/Component Level Code Reuse
423
1
The Great Rewards
423
1
The Big "Who's On Next?" Question
424
3
Appendix A: The Intranet: The Corporate Communications Conduit
427
20
An Historical Perspective
427
1
Rise of the Internet
428
1
What Is an Intranet?
429
1
Reality of a Competitive Marketplace
430
1
Characteristics of the Intranet
430
1
Leveraging Technology from the Internet
431
1
Physical Network Requirements
431
1
Internet versus Intranet
432
1
Predictability of Topology
432
1
Network Robustness and Dependability
433
1
Access Security
433
1
Speed of Access
433
1
Scope of Access
433
1
What Can I Do with an Intranet?
433
3
Legacy Intranet Functionality
434
1
Enhanced and New Intranet Features
434
2
Enhanced Email
434
1
On-Demand Information Retrieval via Web-Based Navigation
434
1
Free-Form Discussion Groups
434
1
Instant Information Publishing
434
1
Rapid Development and Deployment of Custom Applications Based on Component Technology
435
1
Alternative Point-to-Point and Multipoint Communications
435
1
Intranet and Internet Linkage
436
4
Intranet to Internet Gateways
437
2
Extending the Intranet through the Internet: Virtual Private Networks
439
1
Benefits for the Enterprise
440
2
Improved Internal Communications
440
1
Better Information Sharing
441
1
Quicker Reaction to Change
441
1
Improved manageability of Computing Resources and Assets
441
1
Improved Employee Morale
441
1
Improved Automation, Reduced Operation Cost
441
1
Reduced In-house Development and Maintenance Costs
441
1
Why Use an Intranet for Client-Server Solutions?
442
1
Widely Available Skilled Professional Pool
442
1
Simpler to Solve Complex Problems
442
1
Easier to Adopt to Changing Requirements and Conditions
442
1
Tough System Problems are Left to be Solved by Experts
442
1
System based on Widely Available Commodity Components
442
1
Accommodates Remote Access, Facilitates Telecommuting
442
1
A Compatible, Yet Extensible and Upgradable Communication Infrastructure
442
1
Overall Development Cost Reduction and Faster Concept to Deployment Time
443
1
Benefits to Individuals
443
1
Some Caveats
443
4
Appendix B: HTML Reference
447
22
Index
469