日期:2014-05-17 浏览次数:20965 次
//C++函数原型:
int cbFun(int *pOutData, int * outDataLen)
//C#调用接口函数
public delegate int LPONGETMSG(ref IntPtr pOutData, ref int outDataLen);
byte[] pBuf = new byte[maxSize];
public int cbFun(ref IntPtr pOutData, ref int outDataLen)
{
Marshal.Copy(pOutData, pBuf ,0 ,outDataLen);
// Marshal.FreeHGlobal(pBuf);
return 0;
}