https://bugzilla.novell.com/show_bug.cgi?id=339530

           Summary: BSTR convertion doesn't roundtrip
           Product: Mono: Runtime
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: interop
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


The following test fails

[Test]
public void BSTR_Roundtrip ()
{
        string s = "mono";
        IntPtr ptr = Marshal.StringToBSTR (s);
        string s2 = Marshal.PtrToStringBSTR (ptr);
        Assert.AreEqual (s, s2, "string");
}

2) MonoTests.System.Runtime.InteropServices.MarshalTest.BSTR_Roundtrip : string
        String lengths differ.  Expected length=4, but was length=8.
        Strings differ at index 4.

        expected:<"mono">
         but was:<"mono0">
        ---------------^

because the size of the (mono) string should be half of the BSTR size (not
length).


-- 
Configure bugmail: https://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