COM+ Programming with Visual Basic

Book description

The importance of a book like COM+ Programming with Visual Basic lies in the fact that the Visual Basic programming environment is designed to hide as many low-level system details as possible. While this approach can speed development time by letting you focus on the task at hand, it actually hinders the process when it obscures details you need to understand or control. Such is often the case for programmers who are developing components that take advantage of COM+ services. COM+ Programming with Visual Basic takes aim squarely at the information needs of these developers. For instance, despite the marketing hype about COM+ as the new and improved version of COM, classic COM is very much the foundation on which COM+ is built: COM+ components are a particular kind of COM component. Visual Basic hides almost all COM implementation details; yet it is precisely in the area of COM+ programming that these hidden details are most important. Therefore, we've devoted significant content to exploring COM internals:

  • Interface-based programming

  • How COM interfaces work internally

  • How COM components are activated

  • How versioning COM components works in Visual Basic

  • How to use interfaces

  • Passing objects by reference or by value

  • What it means to have multithreaded applications

  • How declarative programming works

  • How to program within a distributed transaction

  • How to add role-based security to applications

  • The second section focuses on incorporating individual COM+ services, like transaction support, security, and asynchronous operations, into applications. The author concludes by discussing what you need to learn to transition to Microsoft's coming .NET framework. Regardless of what lies ahead for .NET, many distributed systems are being built today with COM+. COM+ Programming with Visual Basic focuses on topics relevant to distributed applications that are here to stay:

    There's simply no other documentation available for much of what's in COM+ Programming with Visual Basic. It's destined to be the resource behind the most robust, efficient, high-performance COM+ applications.

    Table of contents

    1. COM+ Programming with Visual Basic
      1. Preface
        1. Who This Book Is For
        2. How This Book Is Organized
        3. Obtaining The Sample Code
        4. Conventions Used in This Book
        5. How to Contact Us
        6. Acknowledgments
      2. 1. COM+ Internals
        1. What Is COM+?
          1. COM
          2. Microsoft Transaction Server (MTS)
          3. COM+
        2. COM and COM+
        3. Knowing the Internals
        4. Introduction to .NET
      3. 2. Interface-Based Programming
        1. Why Interface-Based Programming?
        2. Defining Interfaces in Visual Basic
        3. Using a Class Through an Interface
        4. Polymorphism I (Multiple Components—Single Interface)
        5. Polymorphism II (Single Component—Multiple Interfaces)
          1. Using Polymorphism to Upgrade Classes
        6. Review
      4. 3. How Interfaces Work Internally
        1. Life Without Interfaces
        2. Memory Layout of Interfaces
        3. COM as a Binary Standard
          1. Interface Mappings In C++
          2. Interface Mappings in Visual Basic
        4. Type Libraries
        5. COM Standard Interfaces: IUnknown and IDispatch
          1. IUnknown
          2. IDispatch
        6. Summary
      5. 4. In-Process Servers
        1. Client-Server Communication: A High-Level View
          1. Building an ActiveX DLL
          2. Building a Client
        2. Client-Server Communication: A Low-Level View
          1. GUIDs
          2. ProgIDs
          3. CoCreateInstance and CoCreateInstanceEx
          4. Type Libraries (Revisited)
          5. VB COM Creation Functions
          6. Registry Keys
          7. DLL Exports
          8. Class Factory
          9. Observations About Activation
          10. Summary
      6. 5. Out-of-Process Servers and COM’s Remoting Architecture
        1. ActiveX EXEs
          1. Registering and Unregistering an ActiveX EXE
          2. Getting the Class Objects
          3. Server Lifetime
        2. Threads
          1. Apartments
          2. The Message Filter
          3. Threading Options for DLLs
          4. Cross-Apartment Communication
          5. ByVal and ByRef with Interface Parameters
          6. Marshalers and the Type Library Marshaler
          7. Thread Pools in ActiveX EXEs
        3. Remoting and Location Transparency
        4. Pinging Mechanism
        5. Summary
      7. 6. Versioning
        1. The Goal of COM Versioning
        2. Client Requirements
          1. Scripting Clients
          2. Vtable-Bound Clients
        3. COM’s Versioning Story
        4. How Visual Basic Versions Your COM Objects
          1. Binary Compatibility
          2. Breaking Compatibility
          3. Project Compatibility
          4. No Compatibility
          5. Versioning Wrap-up
        5. Using IDL
          1. Reverse-Engineering Type Libraries
          2. Defining Elements in IDL
            1. Library section
            2. Interfaces
          3. Creating the Type Library
          4. Using the Custom Type Library
        6. Summary
      8. 7. COM+ Applications
        1. Creating a COM+ Application
          1. Adding Components
          2. Deploying COM+ Applications
            1. Server deployment
            2. Client deployment
        2. Services Overview
        3. COM+ Administration Components
          1. Creating a COM+ Application
          2. Adding Components and Setting Their Properties
          3. Exporting and Importing an Application
        4. Summary
      9. 8. Writing and Debugging COM+ Code
        1. COM+ Architecture
          1. Context
          2. Apartments (Revisited)
          3. Activities
            1. Activity lock mechanism
            2. Activities and deadlocks
          4. STA Thread Pool
          5. ObjectContext and CallContext
          6. GetObjectContext
          7. Constructor String
        2. Debugging COM+ Applications
          1. Option 1: Use the VB Debugger
          2. Option 2: Use the VC Debugger
          3. Option 3: Use Trace Messages
          4. Not a Debug Option: MsgBox
          5. Summary
      10. 9. Transaction Services
        1. What Is a Transaction?
          1. Players in a Transaction
          2. Types of Locks
          3. Isolation
            1. Read uncommitted
            2. Read committed
            3. Repeatable read
            4. Serializable
          4. Distributed Versus Local Transactions
            1. Local transactions
            2. Distributed transactions
        2. Declarative Transactions
          1. Transaction Streams
          2. JITA
          3. Voting on a Transaction
            1. Methods for backward compatibility
            2. Coding guidelines
            3. From the client side
            4. Stateless components
            5. Transaction programming scenarios
          4. BYOT
          5. Compensating Resource Managers
            1. The problem
            2. The solution
            3. Recovery phase
        3. Summary
      11. 10. COM+ Security
        1. Security Terminology
          1. Logon Sessions
        2. RPC Security
          1. Authentication Level
          2. Impersonation Level
          3. Identity Tracking
        3. COM/COM+ Security
          1. CoInitializeSecurity
          2. CoSetProxyBlanket
          3. Using Registry Keys
          4. Server-Side Authentication Level
          5. Server-Side Impersonation Level
          6. COM+ Application Tokens
            1. Keeping others from modifying settings
          7. Who Can Use Your Application
            1. Role-based security
            2. Turning on security
            3. Launching access and creation access
            4. Method access
          8. Programmatic Security
            1. IsCallerInRole, IsSecurityEnabled, and IsUserInRole
            2. SecurityCallContext collections
        4. Internet-Based Security
          1. Web Application Overview
            1. Application protection
          2. Web Client Authentication
            1. Anonymous access
            2. Basic authentication and Digest authentication
            3. Integrated Windows authentication
        5. Summary
      12. 11. Introduction to .NET
        1. The .NET Architecture
          1. IL
          2. Assemblies
          3. The Common Type System
          4. Why .NET and Not COM+ 2.0?
        2. Developing Assemblies
          1. Versioning Assemblies
        3. VB.NET Features
          1. Inheritance
          2. Method Overloading
          3. Value Versus Reference Type
          4. Delegates
          5. Constructors and Finalizers
          6. Exception Handlers
        4. Mixing COM+ and .NET
          1. Using VB.NET Components with VB 6
            1. Using VB.NET for versioning VB 6 components
          2. Using VB 6 Components with VB.NET
        5. Using COM+ Services
        6. Summary
      13. Index
      14. Colophon

    Product information

    • Title: COM+ Programming with Visual Basic
    • Author(s):
    • Release date: June 2001
    • Publisher(s): O'Reilly Media, Inc.
    • ISBN: 9781565928404