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

User [email protected] added comment
http://bugzilla.novell.com/show_bug.cgi?id=517855#c4





--- Comment #4 from tom hindle <[email protected]>  2009-11-11 13:18:02 MST ---
Ok, attempted to do this in two different ways both seem to work equally well
and pass my tests.

#if true
    if (objArgs != null &&(objArgs[j] is __ComObject))
    {
        IntPtr comInterface;
        Guid g = Marshal.GenerateGuidForType(args [j].ParameterType);
        if (g != Guid.Empty &&
Marshal.QueryInterface(Marshal.GetIUnknownForObject(objArgs[j]), ref g, out
comInterface) == 0 /* S_OK */) 
        {
            Marshal.Release(comInterface);
            continue; // Parameter is implemented by ComObject
        }
    }
#else
    if (objArgs != null && (objArgs[j] is __ComObject))
    {                         
        IntPtr comInterface = Marshal.GetComInterfaceForObject(objArgs[j], args
[j].ParameterType);
        if (comInterface != null)
        {
            Marshal.Release(comInterface);
            continue; // ParameterType is implemented by ComObject
        }
    }
#endif

I think I am going to pick the first implementation with QueryInterface as I
guess its quicker.

Attaching patch shortly as soon as rebuilt and retested everything.

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to