摘要:
WPF运行在CLR上的,它的代码是托管代码。C++编写的DLL代码是非托管的。在WPF中调用C++编写的DLL代码需要使用:using System.Runtime.InteropServices; [DllImport("Dll.dll", EntryPoint = "add",CallingConvention=CallingConvention.Cdecl)] public static extern int add(int a, int b);下面详细说明之。编译生成DLL文件在Visual Studio 2010中,File --> Ne 阅读全文