Cover image for COM/DCOM unleashed
Title:
COM/DCOM unleashed
Author:
Abernethy, Randy.
Personal Author:
Publication Information:
[Indianapolis, Ind.?] : Sams, [1999]

©1999
Physical Description:
xviii, 666 pages : illustrations ; 24 cm 1 computer laser optical disc (4 3/4 in.)
General Note:
Includes index.
Language:
English
ISBN:
9780672313523
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Central Library QA76.9.A73 A25 1999 Book and Software Set Central Closed Stacks
Searching...

On Order

Summary

Summary

This guide offers advice on how to build and implement COM and DCOM components. It explains the intricacies of COM and COM servers, shows readers how to build COM objects, and explains how to use DCOM and COM+ to build client/server and web-based enterprise applications.


Author Notes

Randy Abernethy has been a technical professional active in the computer and communications industries for more than 10 years. He has developed software for several mission-critical applications in industries ranging from aerospace to real-time audio processing. In recent years, he has acted as managing principal and technical director at the KeyTek Training and Development Corporation and has authored more than a dozen courses focusing on Windows NT and COM programming. Randy also serves as the Technical Director and Chief Architect for Universal Network Exchange, an up-and coming, online institutional brokerage.


Table of Contents

Introductionp. 1
Part I Windows DNA and COMp. 5
1 Windows DNA and COMp. 7
Windows DNAp. 8
Internet Spoken Here: HTMLp. 9
A Stateless Environmentp. 10
The Windows DNA Servicesp. 10
The Windows DNA Services: COMp. 11
The Windows DNA Services: The DNA Corep. 14
The Windows DNA Services: Toolsp. 15
DNA: A Functional Overviewp. 19
The Browserp. 19
IISp. 20
ASPp. 20
MTSp. 21
MSMQ and SQL Serverp. 22
Visual Studio 6.0p. 23
Visual InterDevp. 23
Visual Basicp. 25
Visual C++p. 25
2 Designing Multitiered Component Architecturesp. 27
Overviewp. 28
Ad-Hoc Designp. 28
Fundamental Application Boundaries: Presentation, Logic, and Data Servicesp. 29
Three-Tiered Designp. 31
Keeping Tiers Balancedp. 33
Multitiered Designp. 35
Local or Distributed?p. 38
Good Design Techniquesp. 38
Abstract the Application into Tiersp. 39
Identify Componentsp. 39
Create Interfacesp. 41
Implement the Componentsp. 41
Design Constraintsp. 41
Design Goalsp. 43
Design Toolsp. 47
Summaryp. 48
Part II Advanced COM Programming Techniquesp. 49
3 Persistent Storagep. 51
The COM Interface for Compound Filesp. 52
IStorage and IStreamp. 52
Functions for Structured Storagep. 54
StgCreateDocfile()p. 54
StgIsStorageFile()p. 54
StgOpenStorage()p. 55
Interfaces for Structured Storagep. 55
IStoragep. 55
IStreamp. 62
IRootStoragep. 66
IPersistp. 66
IPersistStoragep. 67
IPersistStreamp. 68
IPersistFilep. 72
Structured-Storage Viewerp. 73
Microsoft Management Console Examplep. 75
Universal Data Transfer and Notificationp. 76
IDataObjectp. 76
IAdviseSinkp. 81
IDataAdviseHolderp. 82
Sample Advise Implementationp. 84
4 Monikersp. 87
Interfaces for Monikersp. 90
IMonikerp. 90
IRunningObjectTablep. 95
IEnumMonikerp. 99
IBindCtxp. 100
Types of Monikersp. 102
File Monikerp. 103
URL Monikerp. 103
Composite Monikerp. 103
Class Monikerp. 103
Item Monikerp. 103
Pointer Monikerp. 103
Anti-Monikerp. 104
Summaryp. 104
5 Connectable Objectsp. 105
Connection Pointsp. 106
Connection Point Containerp. 108
Connection Point Examplep. 109
The Event Sinkp. 113
Visual Basicp. 120
Rewriting the Event Sourcep. 121
The ATL Proxy Generatorp. 124
Writing the Visual Basic Clientp. 127
How Different Tools Implement Eventsp. 129
Events and Visual Basicp. 129
Events and C++Builderp. 130
Summaryp. 134
6 COM Threadingp. 135
The Evolution of PC Threadingp. 136
Thread Typesp. 137
Worker Threadsp. 137
Message Queue Threadp. 138
Window Thread Typep. 140
Apartment Threadp. 143
Thread Poolsp. 144
COM Threading Modelsp. 146
The Single-Threaded Serverp. 146
The Apartment-Threaded Serverp. 147
The Free-Threaded Serverp. 149
Thread Synchronizationp. 153
Thread Local Storagep. 153
Eliminating Concurrency Problemsp. 154
Summaryp. 161
7 COM and the Registryp. 163
Registry APIp. 164
Regedit and Regedt32p. 165
Importing and Exporting Registration Filesp. 167
COM Registry Structurep. 167
File Extensionsp. 168
ProgIDp. 168
AppIDp. 171
CLSIDp. 175
Interfacep. 178
TypeLibp. 178
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Olep. 180
Enabling and Disabling DCOMp. 181
Default Permissionsp. 181
Legacy Securityp. 181
Registering a COM Serverp. 182
Regsvr32p. 182
Self-Registering Out-of-Process Serversp. 184
Frameworksp. 185
8 COM Optimization, Inheritance, and Aggregationp. 187
Speed of DCOMp. 188
Object Locationp. 189
Network Cyclesp. 189
Mixed Threading Modelsp. 190
Remote Activationp. 195
Remote Reference Countingp. 196
Pingingp. 197
Surrogate Processesp. 197
Custom Surrogatep. 201
IClassFactoryp. 201
Inheritancep. 204
Aggregationp. 204
Summaryp. 210
Part III Distributing Components with DCOMp. 211
9 Using DCOM with the NT Servicesp. 213
NT Service Templatep. 216
main() and WinMain()p. 216
ServiceMain()p. 217
ServiceCtrlHandle()p. 220
ATL and Servicesp. 222
DCOM IPCp. 233
Utilitiesp. 235
Services Control Panel Appletp. 235
Windows NT Diagnostic (WinMsd.exe)p. 236
Service Controller (Sc.exe)p. 237
Event Viewerp. 237
OpenSCManager()p. 237
Service Handlesp. 238
Manipulating Servicesp. 238
Registryp. 239
Event Logp. 240
Message Compiler (Mc)p. 240
RegisterEventSource(), DeregisterEventSource(), and Report Event()p. 243
Event Log Viewerp. 244
Debuggingp. 245
The System Accountp. 245
NT Task Manager: Debugp. 246
Start the Debugger with the AT Commandp. 246
Summaryp. 246
10 Marshalingp. 247
Understanding Marshalingp. 248
Type Library Marshalingp. 249
Standard Marshalingp. 250
Define the DLL Entry Pointsp. 251
The Class Definitionp. 252
Defining the IID, TypeLib GUID, and CLSIDp. 256
The Proxy and Stub Definitionsp. 257
The Registration Filep. 263
Converting the MIDL Output Filesp. 263
Custom Marshalingp. 265
Declaring the Object Classp. 267
Defining the Object Classp. 268
Defining the Proxy Classp. 273
The Clientp. 277
11 Securityp. 281
COM Versus DCOM Securityp. 282
COM Security and SSPIp. 282
NT Securityp. 283
Domainsp. 283
Security Descriptorsp. 283
Authenticationp. 297
Impersonationp. 298
CoImpersonateClient() and CoRevertToSelf()p. 299
Cloakingp. 301
Declarative Securityp. 301
Programmatic Securityp. 301
Security Blanketsp. 302
IClientSecurityp. 302
Access and Launch Securityp. 305
12 Configuration and Error Handlingp. 307
DCOMCNFGp. 308
Legacy COM Serversp. 309
Creating an Automation Serverp. 312
Default Propertiesp. 314
Default Securityp. 316
Configuring a COM Serverp. 320
Server Locationp. 321
Server Securityp. 321
Server Identityp. 324
OLEViewp. 326
Disadvantages of OLEViewp. 326
Configuring a COM Object with OLEViewp. 326
Surrogatep. 327
Access Permissionsp. 329
Error Handlingp. 330
Error-Handling Strategiesp. 331
ISupportErrorInfop. 333
Part IV Component Management and Transactions Using MTSp. 339
13 MTS Architecture and Administrationp. 341
MTS Featuresp. 342
Scalabilityp. 343
Concurrency Managementp. 343
Performancep. 343
Reliabilityp. 344
Securityp. 344
Distributed Transactionsp. 344
Component Framework Integrationp. 345
The History of MTSp. 345
How Do I Use MTS?p. 346
Supporting a Middle-Tier Application Serverp. 346
Simple Applications to Multi-Tier Applicationsp. 346
MTS Architecturep. 347
MTS Componentsp. 348
MTS Objectsp. 349
Packagesp. 349
Proxy Objectsp. 350
Context Objectsp. 350
Activitiesp. 350
MS DTCp. 351
Transaction Objectsp. 351
The MTS Executivep. 351
The MTS Runtime Surrogatep. 351
External Servicesp. 352
Resource Managersp. 352
Resource Dispensersp. 352
System Requirements for Installing MTSp. 354
Managing MTSp. 354
The MTS Explorerp. 355
Automating Administrative Tasksp. 360
Command-Line Toolsp. 360
Summaryp. 361
14 MTS as a Component Managerp. 363
Programming MTS and Other Component-Based Servicesp. 364
MTS Scalability Featuresp. 365
MTS and Standard COM Componentsp. 366
A Standard COM Componentp. 366
Using Standard COM Components with MTSp. 370
MTS Benefits for Standard COM Componentsp. 374
The Road to MTS Componentsp. 374
Software Reusep. 374
Performance, Scalability, and Robustnessp. 376
Statep. 378
Types of Statep. 378
State Storagep. 379
MTS Component Requirementsp. 381
Building MTS Componentsp. 382
Context Objectsp. 383
Object Controlp. 384
Using ATL to Build MTS Componentsp. 386
The Shared Property Managerp. 388
Referencing Objects Within MTSp. 392
Creating Objects Within MTSp. 393
Summaryp. 393
15 MTS as a Transaction Coordinatorp. 395
Transactions Definedp. 396
ACIDp. 397
Transaction Managementp. 397
Resource Managersp. 397
MS DTCp. 398
Resource Dispensersp. 398
Transaction Protocolsp. 398
The MTS Transaction Programming Modelp. 400
Creating Transactionsp. 401
Completing Transactionsp. 406
Data Accessp. 410
Monitoring Transactionsp. 411
Design Considerationsp. 412
Prefer Fine-Grained Componentsp. 412
Locate Components Close to Their Data Sourcep. 413
Package Components Using the Same Resources Togetherp. 413
Summaryp. 413
16 MTS Securityp. 415
MTS Security Conceptsp. 416
Rolesp. 417
Security Responsibilitiesp. 419
Declarative MTS Securityp. 419
Creating Rolesp. 420
Adding Roles to Components and Interfacesp. 421
Enabling Securityp. 421
Authenticationp. 422
Procedural MTS Securityp. 423
Identifying Usersp. 423
Authorizing Usersp. 426
Summaryp. 430
17 The COM Transaction Integrator (COMTI)p. 431
COMTI Requirementsp. 432
Mainframes and Windows DNAp. 433
SNA Serverp. 435
Before COMTIp. 436
COMTIp. 437
COMTI Caveatsp. 438
CICS and CICS-LINKp. 439
The COMTI Component Builderp. 443
CICS TPp. 445
CICS LINKp. 452
The COMTI Management Consolep. 453
Overview of the COMTI Runtimep. 455
Summaryp. 457
Part V Asynchronous Component Programming With Message Queuingp. 459
18 Programming Loosely Coupled Systemsp. 461
What Is Messaging?p. 462
Messaging Strengthsp. 462
Messaging Weaknessesp. 464
Synchronous Versus Asynchronous Programmingp. 465
Scalabilityp. 467
Message-Oriented Middlewarep. 468
MOM APIsp. 469
MOM System Softwarep. 469
Administrative Toolsp. 469
Microsoft Message Queue Server (MSMQ)p. 470
MSMQ Connectorp. 470
MSMQ and Other APIsp. 470
MSMQ and Emailp. 471
Summaryp. 471
19 MSMQ Administration and Architecturep. 473
MSMQ Objects and Propertiesp. 474
Messagesp. 476
Message Propertiesp. 476
Queuesp. 478
Queue Typesp. 479
The MQISp. 481
LQSp. 481
Queue Propertiesp. 481
Prioritiesp. 482
Transactional Queuesp. 482
Identifying Queuesp. 482
Private Queuesp. 485
Machinesp. 485
Machine Propertiesp. 485
The MSMQ Enterprisep. 486
Site Linksp. 486
Connected Networksp. 486
MSMQ Controllersp. 486
MSMQ Clientsp. 487
MSMQ Administrationp. 487
Summaryp. 488
20 Programming the MSMQp. 489
The MSMQ Library APIp. 490
Building an MSMQ Application with the MSMQ Library APIp. 4 91
Format Namesp. 492
Path Namesp. 492
Looking Up Format Namesp. 492
Working with Propertiesp. 493
Creating a Queuep. 494
Destroying a Queuep. 494
Opening a Queuep. 495
Sending a Messagep. 495
Receiving a Messagep. 497
Closing a Queuep. 499
The MSMQ ActiveX Control APIp. 505
MSMQ ActiveX Classesp. 507
Building an MSMQ Application with Raw COM Interfacesp. 507
Defining Interfaces and GUIDsp. 508
Initializing COMp. 509
Creating a Queuep. 509
Destroying a Queuep. 511
Opening a Queuep. 511
Sending a Messagep. 512
Receiving a Messagep. 513
Closing a Queuep. 514
Building an MSMQ Application with Smart Pointersp. 522
Defining Interfaces and GUIDsp. 522
tli Filesp. 526
ATL Dependenciesp. 526
Creating a Queuep. 526
Destroying a Queuep. 527
Opening a Queuep. 527
Sending a Messagep. 528
Receiving a Messagep. 528
Closing a Queuep. 529
Building an MSMQ Application with VBScriptp. 533
Summaryp. 536
21 Advanced MSMQ Programmingp. 537
Cursorsp. 540
MSMQ API Cursorsp. 540
MSMQ ActiveX Component Cursorsp. 543
Finding Queuesp. 545
Machine Propertiesp. 547
Message Acknowledgment, Response, and Journalsp. 548
Administration Queuesp. 549
Transactionsp. 557
ACIDp. 558
Messaging Transactionsp. 558
ITransactionp. 559
Creating Transactional Queuesp. 560
Types of Transactionsp. 560
External Transactionsp. 565
MSMQ Email APIp. 574
Asynchronous Operationsp. 576
Automation Eventsp. 577
System Event Objectsp. 577
Callback Functionsp. 582
Completion Portsp. 587
Queue Securityp. 595
Message Securityp. 596
Summaryp. 596
Part VI The New and Improved COM: COM+p. 597
22 Introducing COM+p. 599
The Evolution of COM+p. 600
MTS Shortcomingsp. 601
COM+ Architecturep. 602
Creating Objectsp. 603
Parameterized Object Constructionp. 603
Monikersp. 604
The Neutral Threaded Apartmentp. 604
Object Poolingp. 605
Dynamic Load Balancingp. 606
COM+ Deployment Servicesp. 606
Resource Managementp. 607
Compensating Resource Managersp. 607
Summaryp. 608
23 Programming COM+ Servicesp. 609
Designing COM+ Componentsp. 610
Queued Componentsp. 610
Queued Transactionsp. 611
Administering Queued Componentsp. 611
Loosely Coupled Eventsp. 612
Loosely Coupled Events (LCE)p. 612
Data Accessp. 613
In-Memory Databasep. 613
COM+ Securityp. 614
Base COM Featuresp. 615
Structured Storagep. 615
Canceling Outstanding COM Callsp. 616
Summaryp. 617
Indexp. 619

Google Preview