
Understanding DCOM
Prentice Hall (Publisher)
Published on 10. December 1998
Book
Mixed media product
320 pages
978-0-13-095966-9 (ISBN)
Description
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.
More details
Language
English
Place of publication
Upper Saddle River
United States
Publishing group
Pearson Education (US)
Target group
College/higher education
Dimensions
Height: 235 mm
Width: 180 mm
Thickness: 24 mm
Weight
675 gr
ISBN-13
978-0-13-095966-9 (9780130959669)
Copyright in bibliographic data and cover images is held by Nielsen Book Services Limited or by the publishers or by their respective licensors: all rights reserved.
Schweitzer Classification
Persons
Raoul Rubin is a computer consultant specializing in Microsoft Technologies. He is based in North Carolina.
Marshall Brain is founder and principal of Interface Technologies, Research Triangle, North Carolina. His firm specializes in software training for developers and administrators at leading financial companies such as Morgan Stanley, Lehman Brothers and Goldman Sachs. He is the author of Win32 System Services: The Heart of Windows 95 and Windows NT, and co-author of several books in the Prentice Hall Series on Microsoft Technologies, including Windows CE and Microsoft Network Technology.
Marshall Brain is founder and principal of Interface Technologies, Research Triangle, North Carolina. His firm specializes in software training for developers and administrators at leading financial companies such as Morgan Stanley, Lehman Brothers and Goldman Sachs. He is the author of Win32 System Services: The Heart of Windows 95 and Windows NT, and co-author of several books in the Prentice Hall Series on Microsoft Technologies, including Windows CE and Microsoft Network Technology.
Content
1. Basics of COM. Classes and Objects. How COM Is Different. COM can Run Across Processes. COM Methods Can Be Called Across a Network. COM Objects Must Be Unique Throughout the World . COM is Language Indpendent. COM Vocabulary. The Interface. Interfaces Isolate the Client From the Server. Imagine a Component. What's in a Name? The Source of All Interfaces - Iunknown. A Typical COM Object. How to Be Unique - the GUID. A COM Server. Interactions Between Client and Server. Summary. 2. Understanding the Simplest COM Client. Four Steps to Client Connectivity. Initializing the COM Subsystem. Query COM for a Specific Interface. Execute a Method on the Interface. Release the Interface. Summary. 3. Understanding a Simple COM Server. Where's the Code? Building a DLL-Based (In-Process) COM Server. Creating the Server Using the ATL Wizard. Adding a COM Object. Adding a Method to the Server. Running the Client and the Server. Summary. 4. Creating your own COM Clients and Servers. Server Side. Client Side. 5. Understanding ATL-Generated Code. The Main C++ Module. Object Maps. Export File. The COM Object - "CBeepObj". Object Inheritance. The Class Definition. The Method. Server Registration. Registry Scripts. Summary. 6. Understanding the Client and Server. Principles of COM. COM is About Interfaces. COM is Language-Independent. COM is Built Around the Concept of Transparency. Interfaces are Contracts Between the Client and Server. Software Changes. Interfaces Don't. Activation. More About Interfaces. VTABLES - Virtual Function Tables. The Class Factory. Singleton Classes. Understanding QueryInterface. Reference Counting with AddRef and Release. Method Calls. COM Identifiers: CLSID AND IID. CLSCTX -- Server Context. Inheritance. Summary. 7. An Introduction to MIDL. Origins of the MIDL Compiler. Precisely Defining Interfaces with the IDL Language. MIDL Generated Headers. Automatically Generated Proxy/Stub Modules. Automatic Creation of Type Libraries. The IDL Language. Interfaces and Methods in IDL. The Component Class in IDL. Type Libraries in IDL. MIDL Post-Processing. Summary. 8. Defining and Using Interfaces. Base Types. Attributes. Double Parameters. Boolean Parameters. Working with Strings. Arrays. Structures and Enumerations. Summary. 9. OLE Automation and Dual Interfaces. IDL Definitions. The IDispatch Interface. Using Invoke. Using Type Libraries for Early Binding. Dual Interfaces. There is no Proxy/Stub DLL for Dispatch Interfaces. Properties. Adding Properties with the Class Wizard. Methods. The ISupportErrorInfo Interface. Summary. 10. COM Threading Models. Synchronization and Marshaling. Threading Models. Apartment, Free, and Single Threads. The ATL Wizard and Threading Models. Apartment Threads. Single Threads. Free Threaded Servers. Both. Marshaling Between Threads. Using Apartment Threads. Free Threading Model. Testing the Different Models. Summary. 11. The COM Registry. The COM Registry Structure. Registration of CLSIDs. Registration of ProgIDs. Registration of AppIDs. Self-Registration in ATL Servers. The RGS File. Automatic Registration of Remote Servers. In-Process Servers. Using the Registry API. Summary. 12. Callback Interfaces. Client and Server Confusion. Custom Callback Interfaces. A Callback Example. Create the Server. Add a COM Object to the Server. Adding the ICallBack Interface to IDL. Modify the Header. Adding the Advise Method to the Server. Adding the UnAdvise Method. Calling the Client from the Server. Create the Client Dialog Application. Adding the Callback COM Object. Linking to the Server Headers. COM Maps. Implementing the Callback Method. Adding the Object Map. Connecting to the Server. Cleaning Up. Adding the OnButton Code. A Chronology of Events. A Multi-Threaded Server. Starting the Worker Thread. Marshaling the Interface Between Threads. Starting the Worker Thread: Part 2. A Simple Worker Thread Class. Implementing the Worker Thread. All Good Threads Eventually Die. Summary. 13. Connection Points. Modifying the Callback Server. Adding Connection Points to the Client Program. Add the Callback Object to the Client. Modifying the CpClient Application. Registering With the Server's Connection Point Interface. Adding the Now and Later Buttons. Using the Connection Point - the Server Side. Adding the Later2 Method. Summary. 14. Distributed COM. An Overview of Remote Connections. Converting a Client for Remote Access. Adding Security. Security Concepts. Access Permissions. Launch Permissions. Authentication. Impersonation. Identity. Custom Security. CoInitializeSecurity. Disconnection. Using the Registry for Remote Connections. Installing the Server on a Remote Computer. 15. ATL and Compiler Support. C++ SDK Programming. MFC COM. ATL - The Choice for Servers. Basic Templates. A Simple Template Example. Template Classes. Native Compiler Directives. The #IMPORT Directive. Namespace Declarations. Smart Interface Pointers. Smart Pointer Classes. Watch Out for Destructors. Smart Pointer Error Handling. How the IMPORT Directive Works. Raw and Wrapper Methods. Summary. 16. Other Topics. Errors. Information Code. Facility Code. Customer Code Flag and Reserved bits. Severity Code. Looking Up HRESULTS. SCODES. Displaying Error Messages. Using FormatMessage. Aggregation and Containment. Building a COM Object with MFC. Adding Code for the Nested Classes. Accessing the Nested Class. Appendix. Index.