calling C# from c++ com add-in(从 c++ com 加载项调用 C#)
问题描述
我有一个用 C++(不是 C++/CLI)编写的 COM 插件.我想从这个 C++ com 库中调用一个 C# 库对象/方法.
I have a COM add-in written in C++ (not C++ / CLI). I want to call a C# library objects/methods from this C++ com library.
我想 CCW 在这里出现了,我目前正在阅读.
I guess the CCW comes into picture here, which i am currently reading about.
根据您的经验,有没有关于这些内容的快速指示?
Are there any quick pointers to this stuff from your experience?
另外,我的 Com 加载项中有一个方法,我希望我的 C# 库代码调用它 - 即方法指针调用.
Also, i have a method in my Com add-in that i would like my C# library code to call - i.e. a method pointer invocation.
你能帮我告诉我该怎么做吗 - 即我如何将方法指针传递给 C# 代码,以便以后可以调用它.
Can you help telling me how i can do this please - i.e. how do i go about passing the method pointer to the C# code so it can call on it later.
谢谢.
推荐答案
我有这个链接给你:
COM 互操作第 1 部分示例
从 .Net 环境中创建 DCOM 应用程序:第五部分
C++ 到 C# 调用
这篇关于从 c++ com 加载项调用 C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从 c++ com 加载项调用 C#
基础教程推荐
- WPF 模态进度窗口 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
