Professional Dcom Programming (1997)

From the Publisher:
DCOM extends Microsoft's Component Object Model to allow communication between components distributed across a network. This book shows you how you can write components to take advantage of DCOM. Who is this book for? This book is for experienced C++ programmers who want to understand DCOM or further their knowledge of COM. Knowledge of Windows programming is essential, while knowledge of MFC is preferable. Code samples use Visual C++ 5, MFC and ATL. What does it cover? The book starts by examining why we need to be able to implement and distribute code objects, and looks at the various systems of distribution that currently exist. The book then narrows the focus down to sharing data and functionality on Windows. This leads into an examination of COM, and from there, logically, to DCOM. We show how DCOM builds on the foundations of COM and RPC. You'll quickly get to grips with the essentials of DCOM programming and we build on this base with thorough coverage of MIDL, Microsoft's Interface Definition Language. MIDL allows you to define your interfaces, create Type Libraries and provide marshaling support. All of these topics are covered in depth and backed up with strong code examples written using the latest tools. The latter half of the book looks at the design and implementation of distributed applications. Each chapter covers a topic of prime importance to DCOM programmers. Security is fully explained, starting with the NT security model and exploring how it relates to DCOM. You'll then see how to write your DCOM servers as NT services, before being drawn into the murky world of multithreaded applications. The book shows how to use threads in Win32 and in DCOM servers, covers the different threading models and also looks at the issues of passing interface pointers between threads. Finally, you'll see how Microsoft Transaction Server can ease the life of a DCOM developer as well as the new issues introduced by this product. What's special about this book? COM to DCOM explained in full Practical C++ code examples throughout Common pitfalls exposed How DCOM works at the low level Extensive coverage of marshaling MIDL fully explained Practical DCOM security Multithreading issues explored DCOM and Microsoft Transaction Server What You Need to Use This Book Minimum Requirements At the bare minimum, you need a computer with an operating system that supports DCOM and a C++ compiler that supports MFC 4.x and ATL 2.x. Operating System Currently, DCOM has been officially released on Windows NT 4.0 and Windows 95. Beta versions are available for Solaris 2.5 and Digital UNIX 4.0. DCOM development on other platforms is continuing rapidly and releases, most notably for MacOS and Linux, should be available soon. If you are running Windows NT 4.0, you already have access to most of the features of DCOM, but you should also get Service Pack 2 (or later). This service pack features bug fixes and enhancements to DCOM on Windows NT and is freely downloadable from Microsoft's web site (http://www.microsoft.com/). If you are running Windows 95, you will need to obtain DCOM for Windows 95 by downloading it from Microsoft's web site. If you are interested in DCOM on other platforms, you should check out Software AG's web site (http://www.sagus.com/). Software AG is working closely with Microsoft to port DCOM to non-Windows platforms. The beta versions of DCOM for Solaris and Digital UNIX are currently available for free download from the Software AG site. Also keep an eye on the Active Group's web site for further up to the minute information (http://www.activex.org/). Compiler MFC and ATL are supported by a number of different compiler vendors in various versions and at various prices. ATL 2.0 (which seems to be identical to ATL 2.1, which ships with Visual C++ 5.0) is available for free download from Microsoft's web site and is aimed at users of Visual C++ 4.x. Recommended System To get the most out of this book, you should have access to Visual C++ 5.0 and a network of two or more computers, at least one of which is running Windows NT 4.0. Visual C++ 5.0 All of the DCOM servers in this book have been developed with Visual C++ 5.0. Most of the servers have been written using ATL 2.1 and the remaining servers call on the COM API directly using C++. The DCOM clients are almost all written in MFC. Although, you should have no trouble recreating the servers and clients to run under Visual C++ 4.x (or another compiler) with ATL 2.0, I do refer to a few features that are specific to the Visual C++ 5.0 development environment to make things easier for users of Visual C++ 5.0. The source code on the web site is also provided for users of Visual C++ 5.0 only. Windows NT 4.0 Most of the book is as useful to Windows 95 developers as it is to Windows NT developers, but Windows 95 lacks the security features of Windows NT. In Chapter 7, I talk specifically about the security features of Windows NT. Two Computers DCOM is about distributed computing. Although you can run both the client and the server on a single machine to see them in action, you will be missing some of the point of DCOM development! Additional Tools Although the vast majority of the clients are MFC applications, a few are written using Visual Basic 5.0 for variety. Source and executables for these projects will be provided on the Wrox Press web site. The final chapter is on Microsoft Transaction Server (MTS). Microsoft Transaction Server is part of the Enterprise editions of Visual Studio and Visual C++. An evaluation version of MTS is available by download or by requesting a CD from Microsoft's web site.|TOC: Chapter 1: Distributing Objects
Distributed computing fundamentals and a comparison of available distributed systems, including Sockets, Inferno, Java, CORBA and COM.
Chapter 2: Distributed Objects on Windows
An examination of traditional methods of sharing code and data on Windows. Examples include a simple remote server. Builds up the concepts to provide you with a deeper understanding of COM.
Chapter 3: The Component Object Model
The structure of COM. Examines object creation, interfaces, Automation, marshaling and monikers.
Chapter 4: Distributed Component Object Model
Covers the essentials of DCOM - its relationship with RPC, relevant registry entries, its APIs and interfaces.
Chapter 5: Writing DCOM Clients and Servers
Microsoft's Interface Definition Language (MIDL) in detail. Looks at proxy-stub and type library marshaling, and connection points.
Chapter 6: DCOM Under the Hood
An investigation of DCOM internals and a comparison of DCOM with raw RPC.
Chapter 7: Security
A detailed breakdown of NT's security model and its application to DCOM.
Chapter 8: DCOM Servers as NT Services
Creating DCOM servers as NT services. An examination of the APIs and ATL services. Also shows event logging.
Chapter 9: Multithreading
An examination of threading with Win32, synchronization issues, multithreading techniques and DCOM's threading models.
Chapter 10: Microsoft Transaction Server
An overview of Microsoft Transaction Server. Examines MTS components and packages, security, threading and transactions.
Appendix A: Debugging Tips|AUTHORBIO: ATL took hold of Richard while he was part of a team developing a COM-based workflow system. Its elegance and symplicity had a lasting effect on him. Now, although Richard does not live an obsessively pure COM lifestyle, he finds that ATL gives him more time to enjoy his garden. Richard writes and advises on COM and ATL, and can be contacted via email at atl.dev@grimes.demon.co.uk. Other titles by this author: ATL Programmer's Resource KitATL took hold of Richard while he was part of a team developing a COM-based workflow system. Its elegance and symplicity had a lasting effect on him. Now, although Richard does not live an obsessively pure COM lifestyle, he finds that ATL gives him more time to enjoy his garden. Richard writes and advises on COM and ATL, and can be contacted via email at atl.dev@grimes.demon.co.uk. Other titles by this author:
ATL Programmer's Resource Kit
ATL COM Programmer's Reference
Professional ATL COM Programming
Beginning ATL COM Programming