问题描述
- 急,求大神帮帮忙,关于C#调用delphi的dll文件抛错问题
- [DllImport(_fileDll EntryPoint = ""JX102R_Read_Card""
CharSet = CharSet.Ansi CallingConvention = CallingConvention.StdCall)]
public static extern int JX102R_Read_Card(ref int ReaderNo ref StringBuilder CardNo ref StringBuilder clientIP);int readerNo = 0;
StringBuilder cardNo = new StringBuilder();
StringBuilder clientIP = new StringBuilder();
int num = JX102R_Read_Card(ref readerNo ref cardNo ref clientIP);调用的时候抛错:C# 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
在Pb上面是能成功调用的
解决方案
http://bbs.csdn.net/topics/370255271
时间: 2024-12-03 04:28:34