X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fpinvoke3.cs;h=075ef08bc48c809174db8e1e6d87f594713fa550;hb=b3901be2f68591e87ca2a9e45961b691de2f12e8;hp=8d5cfb619f0657d5ab751afc0f509ba163b296f9;hpb=a232eb3b84104dfc5cb04481285fa9458db67761;p=mono.git diff --git a/mono/tests/pinvoke3.cs b/mono/tests/pinvoke3.cs index 8d5cfb619f0..075ef08bc48 100644 --- a/mono/tests/pinvoke3.cs +++ b/mono/tests/pinvoke3.cs @@ -746,6 +746,21 @@ public class Tests { return mono_test_marshal_array_delegate1 (null, 0, new ArrayDelegate1 (array_delegate2)); } + public delegate int ArrayDelegateBlittable (int i, string j, + [In, MarshalAs(UnmanagedType.LPArray, + ArraySubType=UnmanagedType.LPStr, SizeParamIndex=0)] int[] arr); + + [DllImport ("libtest", EntryPoint="mono_test_marshal_array_delegate")] + public static extern int mono_test_marshal_array_delegate1 (string[] arr, int len, ArrayDelegateBlittable d); + + public static int array_delegate_null_blittable (int i, string j, int[] arr) { + return (arr == null) ? 0 : 1; + } + + public static int test_0_marshal_array_delegate_null_blittable () { + return mono_test_marshal_array_delegate1 (null, 0, new ArrayDelegateBlittable (array_delegate_null_blittable)); + } + public delegate int ArrayDelegate3 (int i, string j, [In, MarshalAs(UnmanagedType.LPArray,