如何通过C ++ CRL类库调用我的非托管C ++ DLL [英] How can I call my unmanaged C++ DLL by the C++ CRL class library

查看:220
本文介绍了如何通过C ++ CRL类库调用我的非托管C ++ DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VS2015中,我想在C ++ CRL类库中调用我的标准C ++代码,然后在给定C#的情况下创建DLL。我不知道设置这个文件和交换参数。你能给我一些关于它的例子吗?非常感谢你。



我的尝试:



In VS2015,我想在C ++ CRL类库中调用我的标准C ++代码,然后在给定C#的情况下创建DLL。我不知道设置这个文件和交换参数。你能给我一些关于它的例子吗?非常感谢。

In the VS2015 , I want to call my standard C++ codes in the C++ CRL class library, and then creat DLL given the C# . I don't know to setting this files and exchange parameter. Can you give me some examples about it? thank you very much.

What I have tried:

In the VS2015 , I want to call my standard C++ codes in the C++ CRL class library, and then creat DLL given the C# . I don't know to setting this files and exchange parameter. Can you give me some examples about it? thank you very much.

推荐答案





很简单,用c ++创建你的逻辑dll。只需在c#中使用DLLImport类就可以在c#中使用c ++ dll方法。



了解DllImport以及如何实现它。



快乐编码
Hi,

Its simple , Create your logic dll from c++ . Simply use DLLImport class in c# to use your c++ dll methods in c#.

Read about DllImport and how to implement it.

Happy coding


这篇关于如何通过C ++ CRL类库调用我的非托管C ++ DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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