2004-03-21 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mono / tests / pinvoke16.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4
5 [StructLayout(LayoutKind.Sequential)]
6 public class VectorList
7 {
8         public int a = 1;
9         public int b = 2;
10 }
11
12
13 public class Test
14 {
15         [DllImport("libtest")]
16         private static extern VectorList TestVectorList (VectorList vl);
17
18         public static int Main()
19         {
20                 VectorList v1 = new VectorList ();
21
22                 VectorList v2 = TestVectorList (v1);
23
24                 if (v1.a != 1 || v1.b != 2)
25                         return 1;
26                 
27                 if (v2.a != 2 || v2.b != 3)
28                         return 2;
29                 
30                 return 0;
31         }
32 }