问题描述
在我的项目中,我们正在开发不同的平台java,C#.net,VC ++。我的问题与从VC ++代码调用C#代码有关。
我写了plugin.dll(VC ++)来在设备和UI之间进行通信。他们提供了device.dll(C#)[第三方]与设备
以下是我为使其工作所做的步骤,请告诉我哪里错了:
1)我创建了一个wrapper.dll(C#),它引用了device.dll。
2)要从plugin.dll访问wrapper.dll方法,我已将其注册为COM.wrapper.tlb并在plugin.dll(VC ++)中导入
如下所示,它真的很有用:
http://www.codeproject.com/Articles/12673/Calling-Managed-NET-C-COM-Objects-from-Unmanaged-C
3)用.jar可执行文件复制plugin.dll(VC ++)文件夹。
我的系统上的一切正常。当我将这个软件包(.jar + plugin.dll)交给测试团队时,问题开始了。
它不能在任何其他机器上运行
In my project we are working on different platforms java, C#.net, VC++ . My problem is related to calling C# code from VC++ code.
I have written "plugin.dll(VC++)" to communicate between device and UI. They provided "device.dll(C#)"[Third Party] with device
Below are the steps I did to make it working, please tell me where m wrong :
1)I have created one "wrapper.dll(C#)" which refers "device.dll".
2)To access "wrapper.dll" methods from plugin.dll I have registered it as "COM.wrapper.tlb" and imported in plugin.dll(VC++)
Followed below link, it was really useful :
http://www.codeproject.com/Articles/12673/Calling-Managed-NET-C-COM-Objects-from-Unmanaged-C
3)Copied plugin.dll(VC++) in folder with .jar executable.
Everything is working fine on my system.Problem started when I gave this package(.jar + plugin.dll) to testing team.
It is not working on any other machine
推荐答案
这篇关于VC ++代码 - 使用引用另一个VC ++ dll的C#dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!