What do I need to do to implement an quot;out of procquot; COM server in C#?(我需要做什么来实现“out of proc?C#中的COM服务器?)
问题描述
我正在尝试实现一个用 C# 编写的out of proc"COM 服务器.我该怎么做?
I am trying to implement an "out of proc" COM server written in C#. How do I do this?
我需要 C# 代码从我的主 C++ 应用程序中脱离 proc",因为我无法将 .NET 运行时加载到我的主进程空间中
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
为什么?
我的 C++ 代码位于加载到许多不同客户 EXE 中的 DLL 中,其中一些使用不同版本的 .NET 运行时.由于只能将一个运行时加载到单个进程中,因此我最好的选择似乎是将我的 C# 代码放入另一个进程中.
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+ 组件.因此,您将能够创建进程外和进程内(客户端)组件激活以及池、远程处理、作为 Windows 服务运行等的所有 COM+ 优势.
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.
这篇关于我需要做什么来实现“out of proc"?C#中的COM服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我需要做什么来实现“out of proc"?C#中的COM服务器?


基础教程推荐
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01