在类中添加引用

using System.Runtime.InteropServices;

 

在程序中写

        //关闭连接
        [DllImport("opapi2.dll", EntryPoint = "op2_close", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Winapi)]
        public static extern void op2_close(IntPtr op);

 所写的方法名称与函数入口点应一样,即  op2_close =op2_close

posted on 2014-10-15 14:22  莫等闲也  阅读(250)  评论(0)    收藏  举报