[Mono-bugs] [Bug 339530] New: BSTR convertion doesn't roundtrip

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Nov 6 11:40:04 EST 2007


           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: mono-bugs at ximian.com
        ReportedBy: spouliot at novell.com
         QAContact: mono-bugs at ximian.com
          Found By: ---

The following test fails

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.

         but was:<"mono0">

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

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.

More information about the mono-bugs mailing list