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


           Summary: MarshalNativeToManaged and CleanUpManagedData Not Called
                    When Using ICustomMarshaler
           Product: Mono: Class Libraries
           Version: 1.9
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: Customer


Created an attachment (id=238746)
 --> (https://bugzilla.novell.com/attachment.cgi?id=238746)
Test case

This bug is based on trying to code a work-around to Bug 422564.

To replicate, use the attached testcase to link to a C Shared Object that
returns ANSI strings.

When run, watching the Debug trace output shows that the MarshalNativeToManaged
and CleanUpManagedData functions of ICustomMarshaler are not being called when
using the CustomMarshaler with the delegate.

Example trace is:

// P/Invoke starts

MarshalManagedToNative
Pointer value: 0x144665600
Allocation size: 513 bytes
CleanUpNativeData

// P/Invoke done

Tracing this using MS .NET 2.0 shows that the StringBuilder is correctly
populated in the MarshalNativeToManaged method.  However, it seems that this
method is not being called at all in Mono, preventing use of the
CustomMarshaler to get any data back from the native code.

I would expect MarshalNativeToManaged to be called after
MarshalManagedToNative, and before CleanUpNativeData, and CleanUpManagedData
after CleanUpNativeData.


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