c#调用非托管代码

using System.Runtime.InteropServices;

[DllImport("mydll.DLL", SetLastError = true)]//引用组件

private static extern bool MyModel(string myparents);//声明要调用的方法,extern 必须加上

private static test()

{

MYModel("");//调用 

}

posted @ 2012-04-13 13:42  HTL  阅读(207)  评论(0编辑  收藏  举报
htl