日期:2014-05-18 浏览次数:20688 次
void fftshift(ref FILE file1,ref FILE file2,int Row,int Column,int flag) {............}
------解决方案--------------------
struct _iobuf {
char *_ptr;
int _cnt;
char *_base;
int _flag;
int _file;
int _charbuf;
int _bufsiz;
char *_tmpfname;
};
typedef struct _iobuf FILE;
这是C++对FILE的定义,我想跟C应该差不多吧,C#需要自己定义结构相同的FILE。
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public struct FILE {
/// char*
[System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)]
public string _ptr;
/// int
public int _cnt;
/// char*
[System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)]
public string _base;
/// int
public int _flag;
/// int
public int _file;
/// int
public int _charbuf;
/// int
public int _bufsiz;
/// char*
[System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)]
public string _tmpfname;
}
试试吧,不一定能解决问题。