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#


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