[DllImport ("libtest")]
public static extern int mono_test_marshal_ccw_itest ([MarshalAs (UnmanagedType.Interface)]ITestPresSig itest);
+ [DllImport ("libtest")]
+ public static extern int mono_test_marshal_array_ccw_itest (int count, [MarshalAs (UnmanagedType.LPArray, SizeParamIndex=0)] ITest[] ppUnk);
+
[DllImport("libtest")]
public static extern int mono_test_marshal_safearray_out_1dim_vt_bstr_empty ([MarshalAs (UnmanagedType.SafeArray, SafeArraySubType = VarEnum.VT_VARIANT)]out Array array);
mono_test_marshal_ccw_itest (test_pres_sig);
+ // test for Xamarin-47560
+ var tests = new[] { test.Test };
+ if (mono_test_marshal_array_ccw_itest (1, tests) != 0)
+ return 201;
+
#endregion // COM Callable Wrapper Tests
#region SAFEARRAY tests
return 0;
}
+// Xamarin-47560
+LIBTEST_API int STDCALL
+mono_test_marshal_array_ccw_itest (int count, MonoComObject ** ppUnk)
+{
+ int hr = 0;
+
+ if (!ppUnk)
+ return 1;
+
+ if (count < 1)
+ return 2;
+
+ if (!ppUnk[0])
+ return 3;
+
+ hr = ppUnk[0]->vtbl->SByteIn (ppUnk[0], -100);
+ if (hr != 0)
+ return 4;
+
+ return 0;
+}
+
/*
* mono_method_get_unmanaged_thunk tests
*/