如题 Byte[] 类型 怎么转化成 IntPtr类型
------解决方案--------------------------------------------------------
- C# code
using System.Runtime.InteropServices;byte[] test = new byte[5];GCHandle hObject = GCHandle.Alloc(test, GCHandleType.Pinned);IntPtr pObject = hObject.AddrOfPinnedObject();if(hObject.IsAllocated) hObject.Free();
------解决方案--------------------------------------------------------