我的c#程序里动态调用了c++ dll, 用了两个回调函数;
程序在执行的时候经常报出这样的错误:Application Error: the instruction at'xxx 'referenced memory at 'xxx ', The memory could not be 'read', 非常奇怪,无法debug到,请问大家这是怎么回事?
程序在执行的时候经常报出这样的错误:Application Error: the instruction at'xxx 'referenced memory at 'xxx ', The memory could not be 'read', 非常奇怪,无法debug到,请问大家这是怎么回事?
AMC_RETURN WINAPI (DLL_EXP Mesg_Send)(USHORT usMesgID_, UCHAR ucMesgSrcDest_, UCHAR ucMesgSize_, UCHAR *pucMesg_, ULONG ulTimeOut_ = 0);
c#
public delegate AMC_RETURN Mesg_Send(ushort usMesgID_, byte ucMesgSrcDest_, byte ucMesgSize_, byte[] pucMesg_, uint ulTimeOut_);
前面加个[in,out]试试