把要调用的C++dll拷贝到编译目录下
添加引用:
using System.Runtime.InteropServices;
声明(类似API的用法):
[DllImport("dll 名称" EntryPoint="接口名称")] 或者 [DllImport("dll 名称" CharSet=CharSet.Unicode,EntryPoint="接口名称")]
public static extern int 接口名称(IntPtr hWnd, ref float xvalue);
添加引用:
using System.Runtime.InteropServices;
声明(类似API的用法):
[DllImport("dll 名称" EntryPoint="接口名称")] 或者 [DllImport("dll 名称" CharSet=CharSet.Unicode,EntryPoint="接口名称")]
public static extern int 接口名称(IntPtr hWnd, ref float xvalue);