假设d12是buffdata的长度,假设实现如下:
while (d12--)
*(buffData + d12) = 'a';
return 1;
C#中只需要声明如下:
[DllImport("xxx.dll")]
private static extern int ReadCard(byte d12, ref byte buffData);
使用如下:
byte[] d = new byte[10];
ReadCard((byte)d.length, ref d[0]);
温馨提示:答案为网友推荐,仅供参考