merge -r 60814:60815
[mono.git] / mono / tests / pinvoke2.cs
index e74e23f36f5214511806cb7ba370ed3b3b9b3aeb..555846e8ac7dde4c0268ab7ca5c857caddb46598 100644 (file)
@@ -204,6 +204,9 @@ public class Tests {
        [DllImport ("libtest", EntryPoint="mono_test_marshal_lpstruct")]
        public static extern int mono_test_marshal_lpstruct ([In, MarshalAs(UnmanagedType.LPStruct)] SimpleStruct ss);
 
+       [DllImport ("libtest", EntryPoint="mono_test_marshal_lpstruct_blittable")]
+       public static extern int mono_test_marshal_lpstruct_blittable ([In, MarshalAs(UnmanagedType.LPStruct)] Point p);
+
        [DllImport ("libtest", EntryPoint="mono_test_marshal_struct_array")]
        public static extern int mono_test_marshal_struct_array (SimpleStruct2[] ss);
 
@@ -394,6 +397,14 @@ public class Tests {
                return mono_test_marshal_lpstruct (ss);
        }
 
+       public static int test_0_marshal_lpstruct_blittable () {
+               Point p = new Point ();
+               p.x = 1.0;
+               p.y = 2.0;
+               
+               return mono_test_marshal_lpstruct_blittable (p);
+       }
+
        public static int test_0_marshal_struct_array () {
                SimpleStruct2[] ss_arr = new SimpleStruct2 [2];