C#中调用VC++的DLL
[DllImport("diaCallBackDll.dll")] public static extern void show(); [DllImport("diaCallBackDll.dll", CallingConvention = CallingConvention.StdCall)] public static extern int add_CallBack_test(int a, int b, cb_func f); public static void cb_funcc(int re) { Console.WriteLine("result=[{0}]", re); return; } static void Main(string[] args) { //show(); int i = add_CallBack_test(7, 2, cb_funcc); Console.Read(); }
- 2015-01-05下载
- 积分:1