Cross-Domain Communication

The ability to load assemblies in a domain is nice but not quite the functionality we need to enable bigger scenarios. Of more use is the capability to create an object instance in the target domain and invoke operations on it. To achieve this, some form of cross-domain communication needs to be provided. As you might expect, all this is built in to the CLR. In fact, different mechanisms exist, as you will see, but first we should take a look at the APIs that allow us to create an object instance in a specified target application domain.

Creating Object Instances

To load an assembly and create an instance of one of the assembly’s types in a target application domain, four methods exist. All of them start with the ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.