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服务器?
基础教程推荐
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
