从c ++ com加载项调用C# [英] calling C# from c++ com add-in

查看:170
本文介绍了从c ++ com加载项调用C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C ++编写的COM加载项(而不是C ++ / CLI)。我想从这个C ++ com库调用一个C#库对象/方法。



我想CCW在这里,我正在读的图片。 >

从你的经验来看,这些东西有什么快速指针吗?



因为我想要我的C#库代码调用 - 即方法指针调用。



你能帮我告诉我怎么能这样做 - 关于将方法指针传递给C#代码,以便稍后可以调用。



感谢。

解决方案

我有这个链接:

COM Interop Part 1示例

在.Net环境中创建DCO​​M应用程序:第V部分

C ++ to C#call


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.

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?

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.

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.

Thanks.

解决方案

I have this links for you:
COM Interop Part 1 Sample
Create DCOM application from within .Net environment: Part V
C++ to C# call

这篇关于从c ++ com加载项调用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆