did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780072120455

COM+ Programming: From the Ground Up

by ;
  • ISBN13:

    9780072120455

  • ISBN10:

    0072120452

  • Format: Paperback
  • Copyright: 2000-07-01
  • Publisher: McGraw-Hill Osborne Media
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99
We're Sorry.
No Options Available at This Time.

Summary

(Osborne) Provides step-by-step techniques for building reusable software components with COM+. Learn every aspect of COM+, from the foundational IUnknown interface, class factories, and type libraries to connection points, transactions, and Event Services. Details on oleautomation data type, error handling, and COM+ threading models. are included. Softcover.

Author Biography

Mark Michaelis is a senior software engineer at Real World Technology.

Table of Contents

Foreword xiii
Acknowledgments xv
Introduction xvii
Introducing COM+
1(22)
The Component Revolution
2(4)
Two Goals
3(1)
The Monolith vs. the Component Model
4(2)
The Creation of COM
6(1)
What Is COM?
6(4)
COM Attributes
7(3)
Component Objects
10(1)
Servers and Clients
10(1)
How COM Works: Interfaces and Vtables
11(6)
Interfaces
12(3)
Vtables
15(2)
IUnknown
17(2)
QueryInterface()
17(1)
Reference Counting with AddRef() and Release()
17(1)
IUnknown: Root of All COM Interfaces
18(1)
The Interface Definition Language and Type Libraries
19(1)
Globally Unique IDs
20(1)
The COM API
21(2)
COM Fundamentals: Building a Simple Component and Client
23(56)
How We Will Proceed
24(1)
A Traditional Stopwatch Implementation
25(11)
The Initial Stopwatch Design
26(1)
Building the Timers.dll Library
27(9)
Building the StopwatchClient.exe
36(4)
Creating a Win32 Console Application Project
37(3)
Reviewing the Starting Point
40(1)
Adding IUnknown
40(5)
Two Ways to Implement IUnknown
41(2)
IUnknown Must Be Fully Implemented
43(1)
Add IUnknown
43(2)
Implementing QueryInterface()
45(7)
QueryInterface() Rules
45(2)
Generating a GUID
47(3)
Add QueryInterface()
50(1)
Calling QueryInterface()
51(1)
Reference Counting
52(8)
Implementing Reference Counting
53(2)
Using COM Reference Counting
55(5)
Building a Class Factory
60(11)
Update the Client and Test
68(3)
Using the COM API
71(5)
Registering the Server
71(1)
Initializing and Uninitializing COM
72(1)
Instantiating Component Objects with CoCreateInstance()
73(3)
Reviewing the Key Elements of a COM Component
76(3)
Introducing the ATL
79(36)
Creating a COM Server Using the ATL AppWizard
80(10)
Running the ATL AppWizard
80(6)
Finishing the Wizard
86(4)
Adding a COM Object
90(12)
Threading Model
91(5)
Interface
96(1)
Aggregation
97(1)
Support ISupportErrorInfo
98(1)
Support Connection Points
99(1)
Finishing the Wizard
99(3)
Adding the Stopwatch Methods and Properties
102(9)
Declaring the Methods and Properties
102(4)
Adding the Timing Code
106(4)
Registering a Component
110(1)
Accessing the Stopwatch Component from the Client
111(4)
Introducing the IDL
115(36)
Output from the MIDL Compiler
116(1)
IDL Basics
116(2)
Interfaces
118(5)
Interface Header Attributes
119(3)
Interface Declaration
122(1)
C++ Interface Definition
123(4)
MIDL_Interface
124(1)
IStopwatch
125(1)
EXTERN_C
125(1)
MIDL-Generated UUID File
126(1)
Methods
127(4)
Method Attributes
130(1)
Parameters
131(3)
in
132(1)
out
132(1)
retval
133(1)
Properties
134(4)
Propety Attributes
135(1)
Read-Write Properties
136(1)
Additional Parameters on Properties
137(1)
Defining the Type Library
138(3)
Defining the CoClass
140(1)
Adding the Overhead Property to the Stopwatch
141(10)
The Client Side of COM and Using Smart Pointers
151(36)
Client Overview
152(1)
Initializing and Uninitializing the COM Subsystem
152(2)
OleInitialize() and OleUninitialize()
154(1)
Instantiating COM Objects
154(3)
Creating Multiple Objects
154(3)
CoCreateInstanceEx()
157(1)
Importing a COM Server Definition into the Client
157(3)
Smart Pointers
160(1)
The_com_ptr_t Template Class
161(6)
Construction
164(2)
Destruction
166(1)
The Member Selection Operator, ->
166(1)
A New Kind of IStopwatch
167(3)
Error Handling Using Exceptions
170(3)
Mixing Smart Pointers with Raw Interfaces
173(2)
Passing Interfaces Across COM Boundaries
175(4)
Another COM Client Example
179(8)
Working with the COM String Known as BSTR
187(34)
COM String Fundamentals
188(16)
Unicode vs. ANSI Data Types
188(1)
OLecher, Lpolestr, and Lpcolestr
189(1)
Working with Lpolestrs
189(1)
To Unicode Compile or Not to Unicode Compile?
190(1)
Tchar
191(1)
Handling Varying String Sizes with BSTR
192(2)
Common API Functions for Handling BSTRs
194(2)
String Memory Management Across COM Boundaries
196(6)
String Conversion Functions
202(2)
CComBSTR
204(7)
_bstr_t
211(6)
Choosing a String Wrapper
217(4)
More COM Data Types
221(30)
Valid COM Data Types
222(3)
Boolean Values Using Variant_Bool
225(1)
Variant Data Types
226(15)
The Variant Structure
227(3)
Common Variant-Handling API Functions
230(3)
CCom Variant
233(4)
_variant_t
237(4)
Enumerations
241(2)
Optional Parameters
243(1)
Specifying Default Values
244(1)
Passing Arrays
245(4)
Passing a Variable Number of Arguments
249(1)
Passing COM Objects
249(2)
Exploring IDispatch
251(32)
Creating a Stopwatch Component that Supports a Dual Interface
253(10)
Declaring a Dual Interface Inside the IDL
253(7)
Interface Inheritance and IDispatch
260(1)
Implementing IDispatch Inside Your Component
261(1)
Updating the COM Map
262(1)
Versioning Your Component
263(4)
Updating the File Version
265(1)
Updating the Registry for the New CLSID and Type Library Versions
266(1)
Testing the IDispatch Interface
267(1)
Calling the IDispatch Interface from a C++ COM Client
268(15)
CComDispatchDriver
277(6)
Error Handling and Component Debugging
283(26)
The Hresult Structure
284(1)
Error Handling with Custom Hresults
285(4)
Creating a Custom Hresult
285(4)
Rich Error Handling
289(14)
The IErrorInfo Interface
289(1)
The ISupportErrorInfo Interface
289(2)
Adding ISupportErrorInfo to the Stopwatch Project
291(9)
Using Rich Error Handling at the Client
300(1)
_com_error
301(2)
Debugging Your ATL Code
303(3)
Writing Messages to the Debug Windows
303(1)
Verifying All Is Well Using Atlassert()
304(1)
Debugging QueryInterface() and Reference Counting
305(1)
Running Both a Client and a Server in the Debugger
306(3)
Events
309(68)
An Event Overview
310(2)
Connection Points
312(5)
The Connection Point Interfaces
314(3)
Creating a COM Server That Supports Events
317(25)
Interface Design
317(4)
Adding the Countdown Component and Defining Its Interfaces
321(8)
Implementing the ICountdown Interface
329(6)
Implementing a Connection Point and Firing Events
335(6)
Implementing IProvideClassInfo2
341(1)
Receiving Event Notification from a Component
342(35)
Creating an ATL Executable
343(8)
Adding a Dialog
351(1)
Declaring the Source Interface Implementation
352(5)
Connecting the Connection Point
357(5)
Reference Counting and Connection Points
362(2)
Avoiding Circular Reference Counts with an Embedded Listener Class
364(10)
IDispEventImpl and IDispEventSimpleImpl
374(3)
ActiveX
377(46)
ActiveX Controls
378(1)
Developing an ActiveX Control
378(45)
Creating an Empty ATL Project
379(1)
Adding a Control Template
379(6)
The StopwatchControl Object
385(13)
Compiling and Debugging the Stopwatch Control
398(3)
Adding Functionality to the Default Control
401(7)
Adding a Button
408(4)
Adding a Custom Property Page
412(10)
Persistence and Property Bags
422(1)
DCOM
423(36)
Configuring the DCOM Default Settings for All Applications
424(7)
Default Properties
426(3)
Default Security
429(1)
Default Protocols
430(1)
Configuring a Particular Application for DCOM
431(5)
Configuring the Client Computer
431(2)
Configuring the Server Computer
433(3)
Running the Client
436(1)
Using DCOM Programmatically
436(11)
CoCreateInstanceEx()
437(3)
A DCOM Client Sample
440(7)
Troubleshooting DCOM
447(3)
Get Things Working Locally
447(1)
Be Sure the Remote Machine Is Available
447(1)
Lower the Security Settings as Much as Possible
448(1)
Try the Real Thing
448(1)
Interpreting Error Results
449(1)
COM Security API Functions
450(4)
Configuring Security Permissions Using CoInitializeSecurity()
450(2)
Impersonating the Client Identity: CoImpersonateClient()
452(1)
Determining the Security Settings with CoQueryClientBlanket()
453(1)
Marshalling
454(4)
Proxies and Stubs
454(2)
Custom Marshalling
456(1)
Type Library Marshalling
456(1)
The MIDL-Generated Proxy/Stub
457(1)
DCOM Summary
458(1)
Threading
459(42)
A Threading Model Analogy
461(15)
Single Threading Model
461(3)
Apartment Threading Model
464(3)
Free Threading Model
467(2)
Threading Model Both
469(3)
Thread Neutral Model
472(2)
The Free Threaded Marshaller
474(2)
Marshalling Across Apartments
476(9)
Interceptors---Proxies and Stubs
477(2)
Working with Worker Threads
479(6)
Synchronization with ATL
485(5)
Asynchronous COM Calls
490(11)
Defining the Asynchronous Interface Inside the Component Server
490(4)
Calling Asynchronously
494(4)
Asynchronous Method Completion Notification
498(1)
Implementing Asynchronous COM Servers
499(2)
The COM+ Evolution
501(32)
Why COM+?
502(1)
Introducing COM+ Services and Terminology
503(4)
Component Services
504(1)
COM+ Services
505(2)
Configured Components
507(1)
Overview of How COM+ Works
507(4)
Object Context Details
509(2)
Concurrency and Activity
511(1)
COM+ Transactions
511(11)
Data Consistency
513(1)
Invoking Transaction Support
514(1)
Transaction Flow
515(4)
Resource Managers and Resource Dispensers
519(2)
Compensating Resource Managers (CRMs)
521(1)
Writing Disconnected Applications with Queued Components
522(3)
The Publish and Subscribe Event Service
525(1)
Controlling Object Lifetime to Increase Scalability
526(3)
Object Pooling
526(1)
Just-In-Time (JIT) Activation
527(1)
The IObectControl Interface
528(1)
The Shared Property Manager (SPM)
529(1)
Role-Based Security
530(1)
The Stage Is Set
531(2)
Building a COM+ System
533(100)
Sample Scenario
534(4)
Creating a Component That Can Be Persisted
538(5)
Building the HotelReservation.exe Client
543(5)
COM+ Applications
548(11)
Two Types of COM+ Applications
548(1)
Creating a COM+ Application
549(4)
Configuring a COM+ Application
553(6)
Utilizing the COM+ Event Services
559(14)
Creating the Event Class
559(3)
Adding a Component to Component Services
562(1)
Configuring an Event Class Inside Component Services
563(2)
Creating an Event Subscriber
565(3)
Configuring the Subscriber Inside Component Services
568(4)
Publishing Events to the Subscribers
572(1)
Queued Components
573(12)
Creating a Queueable Component
574(3)
Configuring a Component to Be a Queued Component
577(2)
Instantiating and Calling into a Queued Component
579(5)
Disconnected, Asynchronous Subscribers via Queued Events
584(1)
COM+ Transactions
585(20)
Creating a Component That Supports Transactions
586(5)
Participating in a Transaction Using the ObjectContext Interfaces
591(4)
Configuring a Component for Transaction Support
595(7)
Programmatically Enlisting an Executable in a Transaction
602(3)
Configuring Component Activation
605(10)
Object Pooling
606(4)
Just-in-Time Activation
610(2)
Utilizing the Construction String Inside Your Component
612(2)
Additional Activation Settings
614(1)
Role-Based Security
615(3)
Debugging Server Components
618(2)
Debugging a Server Component Configured as a Library Application
618(1)
Configured as Server Application/Debugging from the Active Workspace
619(1)
Deploying an Application
620(3)
Application Proxies
620(2)
Server Applications
622(1)
Building an MTS-Compatible Application Using the ATL COM AppWizard
623(8)
Final Thoughts
631(2)
Index 633

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program