Create Out-Of-Process Com in C#/.Net

Create Out-Of-Process COM in C#/.Net?

One option is serviced components - i.e. host it in COM+ as the shell exe. See also the howto here.

What do I need to do to implement an out of proc COM server in C#?

You can create COM+ components using System.EnterpriseServices.ServicedComponent. Consequently, you'll be able to create out-of-proc and in-proc (client) component activation as well as all COM+ benefits of pooling, remoting, run as a windows service etc.

Using 64-bit out of process COM DLL from 32-bit Windows Serivce

The dependencies of MathClass.dll was missed in the path. Now I have added the directory path (where all the dependencies are available) to PATH variable, it started working. I am not sure why this issue didn't come for console application.

.NET out-of-process COM objects sharing static instances in API calls

Whether COM starts new EXE per each COM object, or uses single EXE to instantiate all the object is controlled by flags parameters passed to CoRegisterClassObject. See

http://msdn.microsoft.com/en-us/library/ms693407(v=vs.85).aspx, and

http://msdn.microsoft.com/en-us/library/ms679697(v=vs.85).aspx

You need to pass REGCLS_SINGLEUSE or REGCLS_MULTI_SEPARATE flags.

Now, the trick is to pass this flag, as you might not call this method directly - the details depend on how you implemented the COM EXE.



Related Topics



Leave a reply



Submit