[Mono-bugs] [Bug 81990][Maj] New - Bug with interop marshaling using UTF-16 and delegates
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jul 2 14:07:26 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by dan.maser at inin.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81990
--- shadow/81990 2007-07-02 14:07:26.000000000 -0400
+++ shadow/81990.tmp.8514 2007-07-02 14:07:26.000000000 -0400
@@ -0,0 +1,55 @@
+Bug#: 81990
+Product: Mono: Runtime
+Version: 1.2
+OS:
+OS Details: RHEL WS 4
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: interop
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: Dan.Maser at inin.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Bug with interop marshaling using UTF-16 and delegates
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I have reduced the bug down to a small test project. It works with MS .NET
+but doesn't work with mono. It involves string marshaling using UTF-16
+strings and the MarshalAs:UnmanagedType.LPWStr. It works in most cases,
+but doesn't work in this one case I found.
+
+I will attach two code files, the first is libtest.c which will create a C
+library to use as what to interop to. The command line I used to compile
+it is in a comment block at the top of the file. The second is a C# file
+that interops to the C library. The command line for compiling is also at
+the top of that file.
+
+Steps to reproduce the problem:
+1. Detach the two source files. Compile them both with the command line
+that is in a comment block on the top of each file.
+2. Execute the mono executable with "mono sharptest.exe"
+3. Note the output to stdout.
+
+Actual Results:
+Prior to invoking the 'string callback' function the bytes are displayed,
+in raw form the bytes are ASCII characters like this:
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'...
+and when the 'string callback' function returns it should be the same
+thing, but what really comes back is:
+ 'ba', 'dc', 'fe', 'hg' ...
+
+Expected Results:
+ The string should be marshaled properly and the output of the string
+callback function should just be an echo of the input
+
+How often does this happen?
+every time
+
+Additional Information:
+I'm using RedHat Enterprise Linux WS version 4 and the latest mono from svn
More information about the mono-bugs
mailing list