c# 调用 c++,delphi dll动态库

using System.Runtime.InteropServices; //引用



 [DllImport("Project2.dll", EntryPoint = "dadd", ExactSpelling = false, CallingConvention = CallingConvention.StdCall)]
        public static extern int dadd(int a, int b); //DllImport请参照MSDN

        [DllImport("Project2.dll", EntryPoint = "SynAPP", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
        public static extern string SynAPP(IntPtr i);

        [DllImport("Project2.dll", EntryPoint = "dshowmessage", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
        public static extern void dshowmessage(string vmsg); //DllImport请参照MSDN

        [DllImport("Project2.dll", EntryPoint = "showform", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
        public static extern void showform(); //DllImport请参照MSDN
发布了90 篇原创文章 · 获赞 33 · 访问量 21万+

猜你喜欢

转载自blog.csdn.net/y281252548/article/details/102838493
今日推荐