[Mono-bugs] [Bug 520437] using == operator when comparing too difference refs to the same native COM object returns false .NET difference

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jul 10 21:28:44 EDT 2009


User robertj at gmx.net added comment

--- Comment #5 from Robert Jordan <robertj at gmx.net>  2009-07-10 19:28:41 MDT ---
Thanks for the test case. I'll try to find the right words to explain this

Mono's COM interop support is based on the remoting infrastructure. This means
that whenever a COM object is to be created (with "new" or "newobj" in IL), the
runtime is first creating a proxy and a transparent proxy. The latter is the
actual reference of the newly created object.

At the time "newobj" is called, there is no way to know in advance that the
same IUnknown ptr will be wrapped later on, because the code that would be able
to check this (__ComObj..ctor) is called later.

When a COM object is returned by a p/invoke method, the runtime does not have
the constraints imposed by "newobj".

I'll try to come up with a hack for this issue.

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