dll中定义了
int sendOperatorInfo(FILE* in)在C#中如何申明
[DllImport("xxx.dll")]
public static extern bool sendOperatorInfo(ref ff);报错另外调用的时候如何传递值
int sendOperatorInfo(FILE* in)在C#中如何申明
[DllImport("xxx.dll")]
public static extern bool sendOperatorInfo(ref ff);报错另外调用的时候如何传递值
直接传进去就可以
#include <stdio.h>extern "C" _declspec(dllexport) int sendOperatorInfo(FILE*);问题是首先如何在c#中申明,在就是如何调用,该传递什么值进去
有机会还是改写DLL接口,比如传入文件名。
FILE* fopen()是C运行期函数。在C#中不好生成,另外做个DLL来获得FILE*显得很麻烦。