111,126
社区成员
发帖
与我相关
我的任务
分享
[DllImport(entryDll)]
public unsafe static extern void getValue(StringBuilder c1);
[DllImport(entryDll, EntryPoint = "ReadCard",
CharSet = CharSet.Auto, //Auto
CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.I4)]
public unsafe static extern void getValue(out IntPtr c1);
再调用 string result = Marshal.PtrToStringAuto(c1); //Auto