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#


- 在 C# 中异步处理项目队列 2022-01-01
- 为什么 C# 中的堆栈大小正好是 1 MB? 2022-01-01
- Windows 喜欢在 LINUX 中使用 MONO 进行服务开发? 2022-01-01
- 使用 rss + c# 2022-01-01
- Azure Active Directory 与 MVC,客户端和资源标识同一 2022-01-01
- 是否可以在 .Net 3.5 中进行通用控件? 2022-01-01
- 带问号的 nvarchar 列结果 2022-01-01
- 在 LINQ to SQL 中使用 contains() 2022-01-01
- C# 通过连接字符串检索正确的 DbConnection 对象 2022-01-01
- CanBeNull和ReSharper-将其用于异步任务? 2022-01-01