2 using System
.Runtime
.InteropServices
;
6 public static int Main () {
7 byte [] bytesrc
= new byte [20];
8 byte [] bytedest
= new byte [20];
10 IntPtr dest
= Marshal
.AllocHGlobal (1024);
14 Marshal
.Copy (bytesrc
, 2, dest
, 10);
16 if (Marshal
.ReadByte (dest
, 0) != 2)
18 if (Marshal
.ReadByte (dest
, 9) != 11)
21 Marshal
.Copy (dest
, bytedest
, 2, 10);
23 if (bytedest
[2] != 2)
25 if (bytedest
[11] != 11)