急急急!!C#调用C++的回调函数时,出现“0x0000”指令引用的"0x00000“内存。该内存不能为"read"
qqvbn 2012-05-10 01:04:59 C++:
typedef void(WINAPI *CallbackServerFind)(
DVS_MACHINE_TYPE nDeviceType,
char *pDeviceName,
char *pIP,
BYTE macAddr[6],
WORD wPortWeb,
WORD wPortListen,
char *pSubMask,
char *pGateway,
char *pMultiAddr,
char *pDnsAddr,
WORD wMultiPort,
int nChannelNum,
int nFindCount)
C#:[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void CallbackServerFind(DVS_MACHINE_TYPE nDeviceType, string pDeviceName, string pIP,[MarshalAs(UnmanagedType.LPArray,SizeConst=6)] byte[] macAddr, short wPortWeb,
short wPortListen, string pSubMask, string pGateway, string pMultiAddr, string pDnsAddr, short wMultiPort, int nChannelNum,
int nFindCount);
为什么最后调用成功了,但是出现 “0x0000”指令引用的"0x00000“内存。该内存不能为"read" 错误。
那位高手可以帮忙解决一下。