COM access to a running instance

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DM

    COM access to a running instance

    Hi,

    I have a C# aplication which I have exposed some of the classes\interfa ces
    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


  • Jeroen Mostert

    #2
    Re: COM access to a running instance

    DM wrote:
    I have a C# aplication which I have exposed some of the classes\interfa ces
    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.

    --
    J.

    Comment

    Working...