为用C ++开发的其他应用程序开发一个DLL [英] Developing a dll for other application developed in C++

查看:63
本文介绍了为用C ++开发的其他应用程序开发一个DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,



我想为一个应用程序(Amibroker)开发一个c#dll。官方C ++ SDK可以在他们的网站上找到。

任何人都可以指导我如何开始(从哪里开始)。



RAO

Hello friends,

I would like to develop a c# dll for an application (Amibroker). The official C++ SDK is available on their site.
Can anybody guide me how to start (from where to start).

RAO

推荐答案

检查其中一种方式:

        
创建最简单的示例DLL在C ++中根据官方C ++ SDK并检查它是否有效。

·         Create a simplest sample DLL in C++ according to official C++ SDK and check that it works.

< span lang ="EN-GB"style ="margin:0px; font-family:Symbol"> < span style ="font:7pt'Times New Roman'; margin:0px">        
设置"公共语言"运行时支持"公共语言运行时支持(/ clr)的项目选项",重新编译并检查它是否仍然有效。

·         Set the "Common Language Runtime Support" project option to "Common Language Runtime Support (/clr)", recompile and check that it still works.

·         
创建C#DLL。将项目添加到同一解决方案。选择"x64"或"x86"平台以对应C ++ DLL的平台。

·         Create the C# DLL. Add the project to the same solution. Select the "x64" or "x86" platform to correspond to the platform of C++ DLL.

        
在C ++项目中,添加对C#项目的引用。

·         In the C++ project, add a reference to C# project.

        
然后你可以添加公共C#DLL的类和函数,并从C ++访问它们。 C ++ DLL将简单地转换数据并与C#dll交互。
主要实现将在C#中,但也需要一些"托管C ++"知识。

·         Then you can add public classes and functions to C# DLL and access them from C++. The C++ DLL will simply convert the data and interact with C# dll. The main implementation will be in C#, but some knowledge of "managed C++" is required too.

因此,您将拥有一个C#DLL和一个中间C ++ DLL。


这篇关于为用C ++开发的其他应用程序开发一个DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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