C++的原函数是
unsigned char __stdcall RC500USB_select(unsigned long snr,unsigned char &size);
VB调用DLL文件不会出现问题
Declare Function RC500USB_select Lib "RC500USB.dll" (ByVal snr As Long, ByRef size As Byte) As Byte
用C#我是这么调用的
public static extern byte RC500USB_select(ulong snr, ref byte size);
运行的时候报错尝试读取或写入受保护的内存。这通常指示其他内存已损坏。不知道怎么回事 是不是我数据格式转换错误了。C++C#