如何将C#编写的dll文件添加到C ++ Builder中 [英] how to add the dll file written by C# into C++Builder

查看:138
本文介绍了如何将C#编写的dll文件添加到C ++ Builder中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用C#写了一个dll文件,想添加到C ++ Builder中,不知道哪位高手给指点一下?最好是有步骤!感谢万分!! /div>

请参阅我对问题的评论.我会假设您的意思是:是否可以在非托管项目中使用.NET程序集?".

这不是那么容易.甚至有人说这是不可能的. (我并不是说在两者之间使用COM;这是一个不同的选择;您可以自己阅读.)但是,即使无法通过C#编程直接实现,CLR标准也允许使用它. .我可以从我在过去的答案中引用的一些CodeProject文章中学到它,并在其中解释基础知识.请参阅:

在MFC中加载C#DLL [如何使用在Visual Basic 6.0中的Visual Basic 2008中创建的dll [从Unmanged Code VC ++用C#调用托管DLL [ ^ ],
.a中的 API:托管或非托管代码 [ ^ ].

—SA


用C#写了一个dll文件,想添加到C++Builder中,不知道哪位高手给指点一下?最好是有步骤!感谢万分!!

解决方案

Please see my comment to the question. I would assume what you mean is: "is it possible to use a .NET assembly in an unmanaged project?".

This is not so easy. Some even say it''s not possible. (I don''t mean using COM in between; this is a different option; you can read about it by yourself.) However, CLR standard does allow it, even though it''s not possible to do it directly through C# programming. I learn it from some CodeProject articles I reference in my past answers where I also explain the basics. Please see:

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


这篇关于如何将C#编写的dll文件添加到C ++ Builder中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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