什么我需要做的实施和QUOT;出PROC&QUOT的;在C#中的COM服务器? [英] What do I need to do to implement an "out of proc" COM server in C#?

查看:158
本文介绍了什么我需要做的实施和QUOT;出PROC&QUOT的;在C#中的COM服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现在C#编写的出PROC的COM服务器。我该怎么做呢?

I am trying to implement an "out of proc" COM server written in C#. How do I do this?

我需要的C#code是走出PROC的从我的主要的C ++应用程序,因为我不能.NET运行时加载到我的主要进程空间(为什么?:我的C ++ code是在加载到许多不同的客户EXE的,其中一些使用不同版本的.NET运行库DLL。由于只能有一个运行时加载到一个单一的过程中,我的最好的选择似乎是把我的C#code成另一个进程使用。)

I need the C# code to be "out of proc" from my main C++ application, because I cannot load the .NET runtime into my main process space (WHY?: My C++ code is in a DLL that is loaded into many different customer EXE's, some of which use different versions of the .NET runtime. Since there can only be one runtime loaded into a single process, my best bet seems to be to put my C# code into another process.)

推荐答案

您可以创建一个使用System.EnterpriseServices.ServicedComponent COM +组件。因此,你就可以创建出的进程内和进程内(客户端)组件激活以及所有COM +池,远程调用的好处,运行作为Windows服务等。

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.

这篇关于什么我需要做的实施和QUOT;出PROC&QUOT的;在C#中的COM服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆