[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
Thu Jul 9 16:16:10 EDT 2009


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

User robertj at gmx.net added comment
http://bugzilla.novell.com/show_bug.cgi?id=520437#c1


Robert Jordan <robertj at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robertj at gmx.net




--- Comment #1 from Robert Jordan <robertj at gmx.net>  2009-07-09 14:16:09 MDT ---
I've ran this test with mono under Windows and both COM objects are equal
(reference wise):

using System;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;

class Test
{
    [DllImport("ole32")]
    static extern int GetRunningObjectTable(int reserved,
[MarshalAs(UnmanagedType.Interface)]out IRunningObjectTable rt);

    static void Main ()
    {
        IRunningObjectTable rt1, rt2;
        Console.WriteLine (GetRunningObjectTable (0, out rt1));
        Console.WriteLine (GetRunningObjectTable (0, out rt2));
        Console.WriteLine ("==: {0}", rt1 == rt2);
        Console.WriteLine ("Equals: {0}", rt2.Equals (rt1));
        Console.WriteLine ("ReferenceEquals: {0}", object.ReferenceEquals (rt1,
rt2)); 
    }
}


Please show the code of LgWritingSystemFactoryClass.Create(), preferably a
complete test case.

-- 
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