如何将C ++ DLL绑定到我的C#程序-WinCE [英] How to bind c++ dll to my C# program - winCE
本文介绍了如何将C ++ DLL绑定到我的C#程序-WinCE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将C ++ dll绑定到我的C#WinCE程序.(扫描仪dll)
i need to bind C++ dll to my C# WinCE program. (scanner dll)
我该怎么做?
先谢谢
推荐答案
您需要使用Interop来调用非托管代码.
You need to use Interop to call into unmanaged code.
using System.Runtime.InteropServices; // DllImport
public class Win32 {
[DllImport("User32.Dll")]
public static extern void SetWindowText(int h, String s);
}
这是一篇详细讨论该主题的文章(以及代码的来源).
Here is an article that discusses the topic in detail (also where the code is sourced from).
http://msdn中调用非托管DLL.microsoft.com/en-us/magazine/cc301501.aspx
这篇关于如何将C ++ DLL绑定到我的C#程序-WinCE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文