Free mag vol1 | Page 28

 CONTENTS COM interop Without C# Dynamic Data ................................................................................................ 620 Summary .......................................................................................................................621  Chapter 17: Processes, AppDomains, and Object Contexts ................................623 The Role of a Windows Process.....................................................................................623 The Role of Threads.............................................................................................................................. 624 Interacting with Processes Under the .NET Platform.....................................................625 Enumerating Running Processes.......................................................................................................... 628 Investigating a Specific Process........................................................................................................... 629 Investigating a Process’s Thread Set ................................................................................................... 629 Investigating a Process’s Module Set................................................................................................... 632 Starting and Stopping Processes Programmatically ............................................................................ 633 Controlling Process Startup Using the ProcessStartInfo Class............................................................. 634 Understanding .NET Application Domains .....................................................................635 The System.AppDomain Class.............................................................................................................. 636 Interacting with the Default Application Domain ...........................................................638 Enumerating Loaded Assemblies ......................................................................................................... 639 Receiving Assembly Load Notifications................................................................................................ 640 Creating New Application Domains ...............................................................................641 Loading Assemblies into Custom Application Domains........................................................................ 643 Programmatically Unloading AppDomains ........................................................................................... 644 Understanding Object Context Boundaries ....................................................................646 Context-Agile and Context-Bound Types.............................................................................................. 646 Defining a Context-Bound Object ......................................................................................................... 647 Inspecting an Object’s Context ............................................................................................................. 647 Summarizing Processes, AppDomains, and Context .....................................................649 Summary .......................................................