在Clarion中使用.NET中的dll [英] Use a dll from .NET IN Clarion

查看:72
本文介绍了在Clarion中使用.NET中的dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好
我之前问过类似的问题,但我还有另一个问题
我在Visual Studio 2010中将一个项目做成一个类库,并制作一个COM组件,现在我想从Clarion调用此方法,我将dll放在Clarion项目文件夹中,但不起作用,我必须使用哪些文件,我该怎么做?

这是我在声明中使用的代码,但是什么也没做


 WorkOpenWin例程
   数据
Interop01长
   代码
   Interop01 = CREATE(0,CREATE:OLE)
   Interop01 {PROP:Create} ='Interop01.Interop01Class'
   Interop01 {'CallDotnet(来自号角的消息")'} 



谢谢

根据我的问题,我只能说出dll放在文件夹中并期望它能正常工作.您需要通过右键单击引用"文件夹,然后选择添加引用..."来添加对dll的引用.然后单击浏览..."按钮,然后在对话框中选择dll.然后,您需要在添加到...的引用"上单击添加"按钮.这应该可以解决您的问题.


首先,请考虑使用Clarion.NET:
http://www.softvelocity.com/ClarionNet/ClarionNET.htm [在MFC中加载C#DLL [如何使用在Visual Basic 6.0中的Visual Basic 2008中创建的dll [从Unmanged Code VC ++用C#调用托管DLL [ ^ ],
.a中的 API:托管或非托管代码 [ ^ ].

—SA


Hello
I ask something like this before but i have another problem
I made a project in Visual Studio 2010 a class library and make a COM component, now i want to call this methods from Clarion, i put the dll in the Clarion project folder but doesn''t work, Which files i have to use, how i do that?

this is the code i use in clarion but don''t do anything


WorkOpenWin                routine
   data
Interop01                  long
   code
   Interop01 = CREATE(0, CREATE:OLE)
   Interop01{PROP:Create} = 'Interop01.Interop01Class'
   Interop01{'CallDotnet("Message from Clarion")'}



thanks

解决方案

From what little I can tell by your question, you just put the dll in the folder and expected it to work. You need to add a reference to the dll by right clicking on the References folder, and selecting "Add Reference...". Then click "Browe..." button and select the dll in the dialog. Then you need to click the "Add" button on teh Add Reference to .... That should solve your problem.


First of all, consider using Clarion.NET:
http://www.softvelocity.com/ClarionNet/ClarionNET.htm[^].

Using .NET assemblies by native code is not easy, and I don''t like COM way as intrusive and kind of obsolete. Please see my past answer and CodeProject articles I reference in them:
loading C# DLL in MFC[^],
How can I use a dll created in Visual Basic 2008 in Visual Basic 6.0[^],
Call Managed DLL written in C# from Unmanged Code VC++[^],
API''s in .Net: Managed or UnManaged Code[^].

—SA


这篇关于在Clarion中使用.NET中的dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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