In-Process vs. Cross-Process

OLE Automation objects are instantiated in two different manners: in-process and cross-process. An in-process Automation object is loaded as a DLL into the process space (the memory of the application) of the controller. This has a distinct performance advantage, since the controller and object are in the same process space and direct function calls may be made between them. However, there are some drawbacks. When loading servers in-process, each controller must load its own copy of the object. There is no sharing of objects between processes. When an object is in-process, a bug in the object can bring down both the controller and the object. Despite the pitfalls, in-process object communication is fastest and is typically the method you want to use.

Cross-process objects load in separate process spaces and use remote procedure calls (RPC) to communicate. There is a certain amount of overhead involved in cross-process RPC, and as a result this method is typically slower than the in-process implementation. It does, however, have the advantage of partitioning the processes, and it allows a single object to be shared by multiple controllers.