DCOM was my favourite technology and I have given many training on this topic. This is around nine years back; now things changed, Microsoft introduce .NET, I can write distributed objects using C# in less than 10 minutes.

Recently we had many questions from field asking, can we isolate DCOM components. The answer is Yes, more precisely Yes with “certain conditions”. Citrix Offline Application isolation system cannot isolate network endpoints; we are not part of network stack. We have a separate product line for network virtualization.

I am using my original ‘Hello Word’ component written years back to demonstrate how we isolate DCOM. It’s a singleton component written using ATL. Multiple clients can use the same object who manage lifetime using reference count. The client is a simple exe which create the instance of the component and calls interface method SayHello() which print “Hello Word” with server process ID. I am profiling this DCOM server and client to see how it interacts in Citrix Offline isolation environment.

I am launching the profiled client app from Offline plug-in client. Clicking “Launch DCOM Server” button trigger DCOMServer process creation and call SayHello() which eventually print “Hello Word <Process ID>” from the server. This is the output I got,

Now I am launching multiple instances of streamed client app and click “Launch DCOM Server”, it print “Hello Word” with same process ID.

The DCOMServer process is inside of isolation, this is what Sysinternals process explorer says at this moment,

Now I am installing server and client locally on the same box (outside of streaming isolation engine, using ‘DCOMServer.exe /regserver’ to install DCOM component). I am executing DCOMClient.exe from outside of isolation engine, and clicking “Launch DCOM Server” button, the output I got,

Here the process ID (PID 748) is different, from process explorer I can see a new instance of DCOMServer.exe process created outside of isolation system. COM subsystem is not aware of the original DCOMServer process which is instantiated inside of isolation. I am executing DCOMClient.exe multiple times from outside of isolation and every time it refers to the same DCOMServer process outside of isolation (PID 748).

This shows both instance of my DCOM component, inside and outside of isolation engine coexists on the same box without any crosstalk. Go ahead and profile your DCOM apps, get back to us if you are facing issues.

Check Isolation of Out-of-Process COM servers – Part 2 to see how isolated app interact with out-of-process COM servers hosted on a remote machine.

Sisimon Soman
Citrix Offline Plugin