COM access to a running instance

D

DM

Hi,

I have a C# aplication which I have exposed some of the classes\interfaces
so that they can be accessed via COM. This works except that it appears not
to connect to the runnign instance of application.

Is this possible and if so, how?

thnaks for your time
DM
 
J

Jeroen Mostert

DM said:
I have a C# aplication which I have exposed some of the classes\interfaces
so that they can be accessed via COM. This works except that it appears not
to connect to the runnign instance of application.

Is this possible and if so, how?
What you're asking for is an out-of-process COM server. .NET doesn't support
those, you can only produce in-process libraries.

You can write such a library and have it communicate with your application
via remoting. You have to decide on a mechanism to discover the application
yourself, and there's a possible performance hit, but it's the closest thing
to your scenario.

You can also write a COM+ component in .NET and have it hosted by MTS, but
then you can't have that as an application with an interface (as far as I
know). You can, of course, have your application communicate with that
component also.

If your client is .NET as well, don't use COM at all and just go for remoting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top