mydevice.dll
中有函数如下
public static extern bool SetDeviceMes(bool (CALLBACK *fMessCallBack)(int command,char *pBuf));
如何将这个函数封装成C#的DLL
中有函数如下
public static extern bool SetDeviceMes(bool (CALLBACK *fMessCallBack)(int command,char *pBuf));
如何将这个函数封装成C#的DLL
放到bin目录下
然后添加引用
然后就可以直接用了
[DllImport("mydevice.dll", EntryPoint="SetDeviceMes")]
public static extern bool SetDeviceMes(FMessCallBack fMessCallBack);