for (i = 1; i <= sig->param_count; i++)
mono_mb_emit_ldarg (mb, i);
- if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) {
+ if ((method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) || mono_class_is_interface (method->klass)) {
MonoMethod * native_wrapper = mono_cominterop_get_native_wrapper(method);
mono_mb_emit_managed_call (mb, native_wrapper, NULL);
}
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
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
int (STDCALL *DoubleIn)(MonoComObject* pUnk, double a);
int (STDCALL *ITestIn)(MonoComObject* pUnk, MonoComObject* pUnk2);
int (STDCALL *ITestOut)(MonoComObject* pUnk, MonoComObject* *ppUnk);
+ int (STDCALL *Return22NoICall)(MonoComObject* pUnk);
} MonoIUnknown;
struct MonoComObject
return S_OK;
}
+LIBTEST_API int STDCALL
+Return22NoICall(MonoComObject* pUnk)
+{
+ return 22;
+}
+
+
static void create_com_object (MonoComObject** pOut);
LIBTEST_API int STDCALL
(*pOut)->vtbl->ITestIn = ITestIn;
(*pOut)->vtbl->ITestOut = ITestOut;
(*pOut)->vtbl->get_ITest = get_ITest;
+ (*pOut)->vtbl->Return22NoICall = Return22NoICall;
}
static MonoComObject* same_object = NULL;