[Mono-bugs] [Bug 517855] New: Invoking methods via Reflection that have COM objects as parameters throws MissingMethodException in mono.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 30 10:57:37 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=517855


           Summary: Invoking methods via Reflection that have COM objects
                    as parameters throws MissingMethodException in mono.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom_hindle at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=301635)
 --> (http://bugzilla.novell.com/attachment.cgi?id=301635)
Example code showing invoking method via reflection which has COM object as
param

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11)
Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11

Attach a test program as example (which doesn't have COM object dependency
included)

For example:

class MyClass
{
 public string MyMethod(MyCplusplusCOMObject o)
 {
  return "hello world";
 }
}

Essentially if I attempt to call MyMethod via reflection I get a
MissingMethodException

Changing parameter type MyCplusplusCOMObject to object causes things to work.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Actual Results:  
MissingMethodExp 2

Unhandled Exception: System.MissingMethodException: The best match for method
MyMethod has some invalid parameter.
  at System.MonoType.InvokeMember (System.String name, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object target, System.Object[] args,
System.Reflection.ParameterModifier[] modifiers,
System.Globalization.CultureInfo culture, System.String[] namedParameters)
[0x00655] in /home/hindlet/src/monosvn/mcs/class/corlib/System/MonoType.cs:514 
  at System.Type.InvokeMember (System.String name, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object target, System.Object[] args)
[0x00000] in /home/hindlet/src/monosvn/mcs/class/corlib/System/Type.cs:1146 
  at ReflectTest.Program.Main (System.String[] args) [0x00088] in
/home/hindlet/ReflectTest/ReflectTest/Main.cs:37 

Expected Results:  
hello world

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list