Foreword | p. xxii |
Introduction | p. xxiii |
Understanding COM | p. 1 |
Introducing COM | p. 3 |
What Is COM? | p. 4 |
What Is a Component? | p. 4 |
What Is an Object? | p. 6 |
What Is the Component Object Model? | p. 7 |
Why Is COM Important to You? | p. 8 |
From DDE to COM+ | p. 9 |
DDE | p. 9 |
OLE 1 | p. 10 |
Basic Becomes Visual | p. 11 |
VBX | p. 12 |
OLE 2 and COM | p. 14 |
ActiveX | p. 15 |
COM and DCOM | p. 16 |
Transactions and Queues | p. 17 |
COM+ | p. 19 |
Final Thoughts | p. 20 |
Understanding Windows Architecture | p. 23 |
Types of Program Files | p. 24 |
COM Files | p. 24 |
EXE Files | p. 25 |
DLL Files | p. 25 |
Other Types of Files | p. 26 |
Program Execution | p. 26 |
Locating and Loading the Program | p. 26 |
Locating and Loading Runtime Libraries | p. 27 |
Resolving Conflicts | p. 28 |
Initializing Files | p. 28 |
Ending the Program | p. 28 |
Virtual Memory | p. 29 |
Using Virtual Memory | p. 29 |
Allocating Memory | p. 32 |
Program Execution Control | p. 34 |
Processes and Threads | p. 35 |
Multithreading | p. 35 |
Marshaling | p. 36 |
Final Thoughts | p. 37 |
Running COM Objects | p. 39 |
The Life of an Object | p. 40 |
Creating an Object | p. 40 |
Using an Object | p. 41 |
Deleting an Object | p. 42 |
What's Inside a COM Object? | p. 44 |
Interfaces | p. 45 |
Using Standard Interfaces | p. 45 |
Using Custom Interfaces | p. 47 |
Accessing Information through an Interface | p. 48 |
Binding to an Interface | p. 48 |
In-Process COM Objects | p. 49 |
Finding and Loading In-Process COM Objects | p. 49 |
Understanding In-Process Threading Models | p. 51 |
Out-of-Process COM Objects | p. 53 |
Finding and Loading Out-of-Process COM Objects | p. 54 |
Understanding Out-of-Process Threading Models | p. 55 |
Running Out-of-Process COM Objects Remotely | p. 56 |
DCOM Objects | p. 57 |
Finding DCOM Objects | p. 57 |
Running DCOM Objects | p. 57 |
COM+ Objects | p. 58 |
Final Thoughts | p. 58 |
Building Class Modules in Visual Basic | p. 61 |
Programming with Class | p. 62 |
Elements of the Class Module | p. 63 |
The Class Name | p. 64 |
Initialization and Termination Routines | p. 64 |
The Public, Private, and Friend Keywords | p. 64 |
Module Variables | p. 65 |
Public versus Private Variables | p. 65 |
Module Variable Declaration Syntax | p. 66 |
Property Routines | p. 67 |
Property Get Syntax | p. 68 |
Property Let and Property Set Syntax | p. 69 |
Method Routines | p. 70 |
Event Declarations | p. 72 |
Event Declaration Syntax | p. 72 |
RaiseEvent Syntax | p. 73 |
A Classy Little Application | p. 73 |
Setting Up the Stack Interface | p. 74 |
Using the Object Browser | p. 75 |
Building the Stack Class | p. 77 |
Using the Stack Class | p. 81 |
Final Thoughts | p. 83 |
Programming COM with Visual Basic | p. 85 |
Creating ActiveX DLL Objects in Visual Basic | p. 87 |
What Is an ActiveX DLL? | p. 88 |
Why Use an ActiveX DLL? | p. 89 |
Building an ActiveX DLL | p. 90 |
Setting the Project's Properties | p. 91 |
Setting Class Module Properties | p. 97 |
Creating the TimeInfo Class | p. 99 |
Creating the RunMe Class | p. 105 |
Testing the ActiveX DLL | p. 110 |
Adding Another Project | p. 110 |
Building the Test Program | p. 111 |
Using the ActiveX DLL | p. 115 |
Compiling the ActiveX DLL | p. 115 |
Registering Your ActiveX DLL | p. 116 |
Adding Your ActiveX DLL to a New Program | p. 117 |
Final Thoughts | p. 118 |
Creating ActiveX Controls | p. 121 |
What Makes an ActiveX Control Different? | p. 122 |
ActiveX Control Project Properties | p. 122 |
License Keys | p. 123 |
The UserControl Object | p. 124 |
Containers, Constituents, and Other Stuff | p. 125 |
UserControl Properties, Methods, and Events | p. 125 |
Building a Simple ActiveX Control | p. 131 |
Designing the PicView Control | p. 131 |
Drawing the PicView Control | p. 133 |
Coding the PicView Control | p. 134 |
Adding Information about Your Properties, Methods, and Events | p. 141 |
Creating Property Pages | p. 142 |
Using Standard Property Pages | p. 143 |
Designing a Property Page | p. 145 |
Understanding Property Page Properties and Events | p. 146 |
Adding an About Box | p. 150 |
Creating the About Box | p. 150 |
Hooking the Window to the Control | p. 152 |
Final Thoughts | p. 153 |
Creating ActiveX EXE Objects | p. 155 |
What Makes an ActiveX EXE Different? | p. 156 |
Programming with More Class | p. 157 |
Object Creation and Access | p. 157 |
Threading Models | p. 160 |
An ActiveX EXE Can Have Forms, Too | p. 162 |
Building an ActiveX EXE | p. 162 |
How the EchoClient Program Works | p. 162 |
The EchoServer Object | p. 164 |
Missing Object Files | p. 165 |
The EchoText Method | p. 166 |
Asynchronous Processing | p. 167 |
Design Overview | p. 167 |
Starting in the Client | p. 168 |
Then onto the Server | p. 168 |
To Start the Task | p. 169 |
When the Timer Fires | p. 169 |
The AsyncTask Will Run | p. 171 |
And Return via the EchoMessage Event | p. 171 |
While I Was Waiting | p. 172 |
Designing Multipurpose Programs | p. 173 |
Start Mode | p. 173 |
Sub Main and the About Box | p. 174 |
Sub Main and a Real Application | p. 175 |
Finishing Your ActiveX EXE Server | p. 175 |
Compiling Your Server | p. 176 |
Installing Your Server | p. 176 |
Accessing Remote Objects | p. 177 |
Final Thoughts | p. 178 |
Moving from COM to DCOM | p. 181 |
How Is DCOM Different? | p. 182 |
DCOM Configuration | p. 182 |
Design Considerations for DCOM Objects | p. 183 |
Running the DCOM Configuration Utility | p. 184 |
Setting Windows 2000/NT Options | p. 184 |
Setting Windows 95/98 Options | p. 198 |
EchoServer and EchoClient Revisited | p. 205 |
Troubleshooting Common DCOM Errors | p. 208 |
Error 70: Permission Denied | p. 208 |
Error 429: ActiveX Component Can't Create Object | p. 209 |
Error 462: The Remote Server Machine Does Not Exist or Is Unavailable | p. 210 |
Final Thoughts | p. 210 |
Programming Databases with COM Objects | p. 213 |
Using Data Sources and Consumers | p. 214 |
Data Sources | p. 215 |
Data Consumers | p. 215 |
Building Bound Controls | p. 217 |
Database Design | p. 218 |
The DataSpinner Control | p. 218 |
The AddressDisplay Control | p. 224 |
The AddressBook Program | p. 228 |
Final Thoughts | p. 230 |
Programming COM+ with Visual Basic | p. 233 |
Introducing COM+ | p. 235 |
Transaction Processing | p. 236 |
Atomicity | p. 237 |
Consistency | p. 237 |
Isolation | p. 238 |
Durability | p. 238 |
Message Queues | p. 238 |
The In-Memory Database System | p. 239 |
Other COM+ Features | p. 240 |
COM+ and Visual Basic | p. 241 |
COM+ Applications | p. 242 |
Transaction Types | p. 243 |
Transaction Context | p. 244 |
A Simple COM+ Application | p. 247 |
The Database Tables | p. 248 |
The COM+ Application's Properties | p. 250 |
The COM+ Component's Properties | p. 255 |
COM+ Object Construction | p. 259 |
COM+ Component Definition | p. 262 |
Client Program Construction | p. 267 |
Final Thoughts | p. 268 |
Understanding Message Queues | p. 271 |
Understanding How Message Queues Work | p. 272 |
Synchronous versus Asynchronous Processing | p. 272 |
Result Return | p. 274 |
Types of Queues | p. 274 |
Benefits of Message Queues | p. 275 |
Using Message Queues from Visual Basic | p. 277 |
Public and Private Queues | p. 277 |
Message Queue Objects | p. 278 |
Message Queues and COM+ Transactions | p. 288 |
Building COM+ Message Queues | p. 290 |
Design Approach | p. 290 |
Request Processing | p. 292 |
Introducing Queued Components | p. 296 |
How Queued Components Work | p. 296 |
Limitations of Queued Components | p. 297 |
Final Thoughts | p. 297 |
Understanding the In-Memory Database System | p. 301 |
Understanding How IMDB Works | p. 302 |
Deciding If IMDB Is for You | p. 303 |
Volume of Data | p. 303 |
Static versus Dynamic Loading | p. 304 |
The Read-to-Write Ratio | p. 304 |
The Total I/O Rate | p. 305 |
Shared Data | p. 305 |
Preparing to Use IMDB | p. 305 |
IMDB Configuration | p. 306 |
IMDB Security Settings | p. 307 |
Using IMDB in an Application | p. 312 |
Programming Considerations | p. 313 |
A New Collection Object | p. 314 |
ContactManager Object Enhancements | p. 316 |
The User Program | p. 320 |
Final Thoughts | p. 322 |
Understanding Security in COM+ | p. 325 |
Types of Security under COM+ | p. 326 |
Authentication | p. 326 |
Impersonation and Delegation | p. 327 |
Role-Based Security | p. 328 |
Configuring Security | p. 328 |
Planning Security | p. 328 |
Defining Security Roles | p. 330 |
Adding Users to a Role | p. 332 |
Associating Roles with Components | p. 332 |
Associating Roles with Interfaces | p. 333 |
Enabling Security on an Application | p. 335 |
Programming Security | p. 336 |
Gathering Information | p. 337 |
Displaying the Information | p. 339 |
Final Thoughts | p. 340 |
Developing COM+ Transactions | p. 343 |
Developing COM+ Transactions for SQL Server | p. 345 |
Designing the Contact Manager Application | p. 346 |
Middle Tier Design | p. 346 |
Client Application Design | p. 347 |
Communicating Using Objects | p. 349 |
The Contacts Collection | p. 350 |
The Contact Object | p. 352 |
The ContactInfos Collection | p. 353 |
The ContactInfo Object | p. 354 |
The ActionItems Collection | p. 354 |
The ActionItem Object | p. 355 |
Programming the Contact Manager Application | p. 355 |
Getting Information about a Contact | p. 356 |
Connecting to the Database | p. 360 |
Updating the Contact Information | p. 361 |
Finding a Client | p. 364 |
Final Thoughts | p. 369 |
Developing COM+ Transactions for IIS Applications | p. 373 |
Moving ContactManager to the Web | p. 374 |
Understanding IIS Applications | p. 375 |
How IIS Applications Work | p. 375 |
The IIS Application Object Model | p. 376 |
Programming the Main Web Page | p. 377 |
Starting the Application | p. 378 |
Displaying the Main Web Page | p. 379 |
Processing the Main Web Page | p. 384 |
Programming the Details Web Page | p. 386 |
Displaying the Details Web Page | p. 387 |
Processing the Details Web Page | p. 392 |
Using the Contact Manager Transactions | p. 395 |
The PutContactInfos Method | p. 396 |
The PutAContactInfo Method | p. 397 |
The PutActionItems Method | p. 399 |
The PutAnActionItem Method | p. 400 |
Final Thoughts | p. 402 |
Developing COM+ Transactions for MSMQ | p. 405 |
Application Design | p. 406 |
Design Issues | p. 406 |
Design Concept | p. 407 |
Programming the Contact Client | p. 407 |
Keeping Local Information | p. 407 |
Requesting Data | p. 410 |
Receiving Data | p. 414 |
Updating Data | p. 416 |
Programming the ContactQueue Manager | p. 417 |
Processing a Request | p. 417 |
Returning a Response | p. 419 |
Programming ContactTypes | p. 420 |
Using the Request Object | p. 420 |
Making the ActionItems Object Persistent | p. 421 |
Final Thoughts | p. 426 |
Glossary | p. 429 |
Index | p. 441 |
Table of Contents provided by Syndetics. All Rights Reserved. |
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.