lang:csharp:unmanaged
Convertir un tableau en IntPtr
byte[] tableauByte = new byte[] { 0x99 }; IntPtr unmanagedPointer = Marshal.AllocHGlobal(tableauByte.Length); Marshal.Copy(tableauByte, 0, unmanagedPointer, tableauByte.Length); try { // Utilisation de unmanagedPointer } finally { Marshal.FreeHGlobal(unmanagedPointer); }
lang/csharp/unmanaged.txt · Dernière modification : 2018/12/07 16:19 de root