如何在C ++中创建DLL以在C#中使用 [英] How to create dll in C++ for using in C#
本文介绍了如何在C ++中创建DLL以在C#中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好.
我有一个小问题要问你.
我有一个C ++源代码和一个头文件. C ++文件使用windows.h库,使用串行端口进行操作(基本操作:read()
,write()
)
我要做的是使用这些文件创建一个库,然后在我的C#解决方案中使用该库.
我需要创建哪种类型的库?如何创建?
最好的问候.
解决方案
请参阅:
创建和使用动态链接库(C ++)
>
Hey everyone.
I''ve a little question to ask you.
I have one C++ source and one header files. The C++ file uses windows.h library, makes operations using serial port(basic operations: read()
, write()
)
What I want to do is, creating a library using these files, and use that library in my C# solution.
What type of lib I need to create and how?
My best regards.
解决方案
See this :
Creating and Using a Dynamic Link Library (C++)
这篇关于如何在C ++中创建DLL以在C#中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文