我必须将非托管动态链接库导入到我的C#应用程序中,我想知道IntPtr和ref有什么不同,您推荐我使用的是什么,为什么?请注意,这两种方法对我都有效。例如:static extern Result Init(IntPtrDllImport("mydll.dll", CallingConvention=CallingConvention.Cdecl)
CallStartDiscovery(IntPtr pZbTransportObject, ref int length, ref int result); public CollectionCallStartDiscovery(IntPtr pZbTransportObject, out IntPtr devs, ref int length, ref int result);
我也尝试过IntPtr[]开发者,&