Call method in already running .NET assembly from different app

后端 未结 3 879
别那么骄傲
别那么骄傲 2021-01-28 12:58

I don\'t know if you can do this, but basicly I need to be able to call a method in already running .NET process from a different assembly that don\'t share the same process.

3条回答
  •  猫巷女王i
    2021-01-28 13:21

    The easiest way is to use ServiceHost to expose a WCF service. You can not directed access an object from a process from another process. The only option is to send a message to the other process interpret the message and execute a action.

    Here you can find a quick example: http://blogs.microsoft.co.il/blogs/davids/archive/2009/05/31/a-hands-on-lab-for-wcf-moc-6461.aspx

    Hope this helps.

提交回复
热议问题