Understanding Dcom

by ;
Edition: CD
Format: Paperback
Pub. Date: 1998-12-01
Publisher(s): Pearson P T R
Availability: This title is currently not available.
List Price: $52.49

Rent Book

Select for Price
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

eBook

We're Sorry
Not Available

Summary

Finally, there's a book that cuts through Microsoft DCOM's complexity, and shows experienced C++ developers exactly how to build and deploy distributed applications with it. Raoul Rubin and Marshall Brain reduce DCOM to its essentials as a straightforward system for network communication. Using extensive examples and sample code, they demonstrate exactly how to brainstorm, organize, implement and test sophisticated DCOM-based distributed applications. Understand the relationship of DCOM to COM, OLE and competing approaches such as CORBA; learn how to create DCOM servers and clients; use threading models, connection points and Singleton objects; and test your DCOM servers. Understand how DCOM's elements fit together, including DCOM objects, GUID, Proxy/stubs, servers and interfaces; compare implementation with the Win32 API, MFC and ATL; learn the differences between DCOM implementation in Win95/98 and NT; and more.

Table of Contents

Preface xiii
ONE The Basics of COM
1(18)
Classes and Objects
1(2)
How COM Is Different
3(2)
COM can Run Across Processes
3(1)
COM Methods Can Be Called Across a Network
4(1)
COM Objects Must Be Unique Throughout the World
5(1)
COM is Language Independent
5(1)
COM Vocabulary
5(2)
The Interface
7(4)
Interfaces Isolate the Client From the Server
8(2)
Imagine a Component
10(1)
What's in a Name?
10(1)
The Source of All Interfaces - IUnknown
10(1)
A Typical COM Object
11(1)
How to Be Unique -- the GUID
12(2)
A COM Server
14(1)
Interactions Between Client and Server
15(1)
Summary
16(3)
TWO Understanding the Simplest COM Client
19(8)
Four Steps to Client Connectivity
20(5)
Initializing the COM Subsystem:
21(1)
Query COM for a Specific Interface
22(2)
Execute a Method on the Interface
24(1)
Release the Interface
24(1)
Summary
25(2)
THREE Understanding a Simple COM Server
27(16)
Where's the Code?
28(1)
Building a DLL-Based (In-Process) COM Server
29(1)
Creating the Server Using the ATL Wizard
30(3)
Adding a COM Object
33(3)
Adding a Method to the Server
36(4)
Running the Client and the Server
40(1)
Summary
41(2)
FOUR Creating your own COM Clients and Servers
43(12)
Server Side
43(2)
Client Side
45(10)
FIVE Understanding ATL-Generated Code
55(12)
The Main C++ Module
56(2)
Object Maps
58(1)
Export File
58(2)
The COM Object -- "CBeepObj"
60(1)
Object Inheritance
61(1)
The Class Definition
62(1)
The Method
63(1)
Server Registration
64(1)
Registry Scripts
65(1)
Summary
66(1)
SIX Understanding the Client and Server
67(24)
Principles of COM
67(4)
COM is About Interfaces
68(1)
COM is Language-Independent
68(1)
COM is Built Around the Concept of Transparency
69(1)
Interfaces are Contracts Between the Client and Server
69(1)
Software Changes. Interfaces Don't
70(1)
Activation
71(2)
More About Interfaces
73(12)
VTABLES -- Virtual Function Tables
75(2)
The Class Factory
77(2)
Singleton Classes
79(2)
Understanding QueryInterface
81(1)
Reference Counting with AddRef and Release
82(3)
Method Calls
85(3)
COM Identifiers: CLSID AND IID
87(1)
CLSCTX -- Server Context
88(1)
Inheritance
88(1)
Summary
89(2)
SEVEN An Introduction to MIDL
91(16)
Origins of the MIDL Compiler
91(4)
Precisely Defining Interfaces with the IDL Language
92(2)
MIDL Generated Headers
94(1)
Automatically Generated Proxy/Stub Modules
94(1)
Automatic Creation of Type Libraries
95(1)
The IDL Language
95(8)
Interfaces and Methods in IDL
97(3)
The Component Class in IDL
100(2)
Type Libraries in IDL
102(1)
MIDL Post-Processing
103(2)
Summary
105(2)
EIGHT Defining and Using Interfaces
107(18)
Base Types
108(1)
Attributes
109(3)
Double Parameters
112(1)
Boolean Parameters
113(1)
Working with Strings
113(6)
Arrays
119(2)
Structures and Enumerations
121(2)
Summary
123(2)
NINE OLE Automation and Dual Interfaces
125(26)
IDL Definitions
126(1)
The IDispatch Interface
127(6)
Using Invoke
133(3)
Using Type Libraries for Early Binding
136(1)
Dual Interfaces
137(3)
There is no Proxy/Stub DLL for Dispatch Interfaces
140(1)
Properties
140(2)
Adding Properties with the Class Wizard
142(2)
Methods
144(1)
The ISupportErrorInfo Interface
144(5)
Summary
149(2)
TEN COM Threading Models
151(16)
Synchronization and Marshaling
151(2)
Threading Models
153(2)
Apartment, Free, and Single Threads
155(1)
The ATL Wizard and Threading Models
156(2)
Apartment Threads
158(1)
Single Threads
159(1)
Free Threaded Servers
160(1)
Both
161(1)
Marshaling Between Threads
162(1)
Using Apartment Threads
163(1)
Free Threading Model
164(1)
Testing the Different Models
165(1)
Summary
166(1)
ELEVEN The COM Registry
167(14)
The COM Registry Structure
168(3)
Registration of CLSIDs
171(1)
Registration of ProgIDs
172(2)
Registration of AppIDs
174(1)
Self-Registration in ATL Servers
174(1)
The RGS File
175(2)
Automatic Registration of Remote Servers
177(1)
In-Process Servers
178(1)
Using the Registry API
178(1)
Summary
178(3)
TWELVE Callback Interfaces
181(32)
Client and Server Confusion
183(2)
Custom Callback Interfaces
183(2)
A Callback Example
185(2)
Create the Server
185(1)
Add a COM Object to the Server
186(1)
Adding the ICallBack Interface to IDL
187(2)
Modify the Header
187(1)
Adding the Advise Method to the Server
188(1)
Adding the UnAdvise Method
189(2)
Calling the Client from the Server
189(2)
The Client Application
191(5)
Create the Client Dialog Application
191(1)
Adding the Callback COM Object
192(2)
Linking to the Server Headers
194(1)
COM Maps
194(1)
Implementing the Callback Method
195(1)
Adding the Object Map
195(1)
Connecting to the Server
196(5)
Cleaning Up
199(1)
Adding the OnButton Code
199(2)
A Chronology of Events
201(2)
A Multi-Threaded Server
203(2)
Starting the Worker Thread
205(1)
Marshaling the Interface Between Threads
206(1)
Starting the Worker Thread: Part 2
207(4)
A Simple Worker Thread Class
208(1)
Implementing the Worker Thread
209(2)
All Good Threads Eventually Die
211(1)
Summary
211(2)
THIRTEEN Connection Points
213(16)
Modifying the Callback Server
215(5)
Adding Connection Points to the Client Program
220(2)
Add the Callback Object to the Client
221(1)
Modifying the CpClient Application
221(1)
Registering With the Server's Connection Point Interface
222(4)
Adding the Now and Later Buttons
226(1)
Using the Connection Point-the Server Side
226(2)
Adding the Later2 Method
228(1)
Summary
228(1)
FOURTEEN Distributed COM
229(16)
An Overview of Remote Connections
229(2)
Converting a Client for Remote Access
231(3)
Adding Security
234(1)
Security Concepts
234(1)
Access Permissions
235(1)
Launch Permissions
236(1)
Authentication
237(1)
Impersonation
237(1)
Identity
238(1)
Custom Security
239(1)
CoInitializeSecurity
239(3)
Disconnection
242(1)
Using the Registry for Remote Connections
243(1)
Installing the Server on a Remote Computer
244(1)
FIFTEEN ATL and Compiler Support
245(18)
C++ SDK Programming
245(1)
MFC COM
246(1)
ATL -- The Choice for Servers
246(1)
Basic Templates
247(6)
A Simple Template Example
248(2)
Template Classes
250(3)
Native Compiler Directives
253(7)
The #IMPORT Directive
253(1)
Namespace Declarations
254(1)
Smart Interface Pointers
255(1)
Smart Pointer Classes
256(1)
Watch Out for Destructors
257(1)
Smart Pointer Error Handling
258(2)
How the IMPORT Directive Works
260(1)
Raw and Wrapper Methods
260(1)
Summary
261(2)
SIXTEEN Other Topics
263(14)
Errors
263(4)
Information Code
265(1)
Facility Code
265(1)
Customer Code Flag and Reserved bits
266(1)
Severity Code
266(1)
Looking Up HRESULTS
266(1)
SCODES
267(1)
Displaying Error Messages
267(2)
Using FormatMessage
268(1)
Aggregation and Containment
269(2)
Building a COM Object with MFC
271(6)
Adding Code for the Nested Classes
273(2)
Accessing the Nested Class
275(2)
APPENDIX COM Error Handling
277(14)
Sources of Information
278(1)
Common Error Messages
279(6)
DCOM Errors
285(4)
Get It Working Locally
285(1)
Be Sure You Can Connect
286(1)
Try Using a TCP/IP Address
287(1)
Use TRACERT
287(1)
Windows 95/98 Systems Will Not Launch Servers
288(1)
Security is Tough
288(1)
Using the OLE/COM Object Viewer
289(2)
Index 291

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.