[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);
#region Runtime Callable Wrapper Tests
+#if !MOBILE
+
IntPtr pUnk;
if (mono_test_marshal_com_object_create (out pUnk) != 0)
return 145;
if (TestITestDelegate (itest) != 0)
return 174;
+ if (TestIfaceNoIcall (itest as ITestPresSig) != 0)
+ return 201;
+
itest = new TestClass ();
if (TestITest (itest) != 0)
if (TestITest (itest) != 0)
return 176;
+
+#endif
+
#endregion // Runtime Callable Wrapper Tests
#region COM Callable Wrapper Tests
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
void ITestIn ([MarshalAs (UnmanagedType.Interface)]ITest val);
[MethodImplAttribute (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void ITestOut ([MarshalAs (UnmanagedType.Interface)]out ITest val);
+ int Return22NoICall();
}
[ComImport ()]
[MethodImplAttribute (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[PreserveSig ()]
int ITestOut ([MarshalAs (UnmanagedType.Interface)]out ITestPresSig val);
+ [PreserveSig ()]
+ int Return22NoICall();
}
[System.Runtime.InteropServices.GuidAttribute ("00000000-0000-0000-0000-000000000002")]
public virtual extern void ITestIn ([MarshalAs (UnmanagedType.Interface)]ITest val);
[MethodImplAttribute (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void ITestOut ([MarshalAs (UnmanagedType.Interface)]out ITest val);
+
+ [MethodImplAttribute (MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
+ public virtual extern int Return22NoICall();
}
[System.Runtime.InteropServices.GuidAttribute ("00000000-0000-0000-0000-000000000002")]
val = new ManagedTestPresSig ();
return 0;
}
+
+ public int Return22NoICall()
+ {
+ return 88;
+ }
}
public class ManagedTest : ITest
return new ManagedTest ();
}
}
+
+ public int Return22NoICall()
+ {
+ return 99;
+ }
}
public static int mono_test_marshal_variant_in_callback (VarEnum vt, object obj)
}
return 0;
}
+
+ public static int TestIfaceNoIcall (ITestPresSig itest) {
+ return itest.Return22NoICall () == 22 ? 0 : 1;
+ }
}
public class TestVisible