[DllImport("OpenNetStream.dll")] public static extern int OpenSDK_Data_GetDevList(IntPtr szAccessToken, int iPageStart, int iPageSize, ref IntPtr pBuf, ref int iLength); //其中pBuf参数,为返回的一个byte[]数据,现在要将其转换为byte[],然后在转换为string ; byte[] managedArray…
方法一. int转IntPtr int i = 12; IntPtr p = new IntPtr(i); IntPtr转int int myi = (int)p; MessageBox.Show(myi.ToString()); 方法二. int转IntPtr int i = 12; IntPtr p =(IntPtr)i IntPtr转int int myi = (int)p; MessageBox.Show(m…