* ILParser.jay: de-bacwardificate values passed to add method,
[mono.git] / mono / tests / pinvoke4.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 public class Test {
5
6         [StructLayout (LayoutKind.Sequential)]
7         public struct SimpleStruct {
8                 public bool a;
9                 public bool b;
10                 public bool c;
11                 public string d;
12         }
13
14         [DllImport ("libtest.so", EntryPoint="mono_test_return_vtype")]
15         public static extern SimpleStruct mono_test_return_vtype ();
16
17
18         public static int Main () {
19                 SimpleStruct ss = mono_test_return_vtype ();
20
21                 Console.WriteLine ("A: " + ss.a);
22                 Console.WriteLine ("B: " + ss.b);
23                 Console.WriteLine ("C: " + ss.c);
24                 Console.WriteLine ("D: " + ss.d);
25
26                 if (!ss.a && ss.b && !ss.c && ss.d == "TEST")
27                         return 0;
28                 
29                 return 1;
30         }
31 }