[Mono-bugs] [Bug 75374][Wis] Changed - P/Invoke calls with CharSet=CharSet.Unicode do not properly convert returned string

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Jun 25 11:59:39 EDT 2005

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 chastamar at yahoo.com.


--- shadow/75374	2005-06-25 11:42:05.000000000 -0400
+++ shadow/75374.tmp.13598	2005-06-25 11:59:39.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 75374
 Product: Mono: Runtime
 Version: 1.1
+OS: unknown
 OS Details: Linux 2.6 x86
 Status: NEW   
+Severity: Unknown
 Priority: Wishlist
 Component: interop
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: chastamar at yahoo.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -75,6 +75,26 @@
 ------- Additional Comments From chastamar at yahoo.com  2005-06-25 11:42 -------
 Created an attachment (id=15383)
 A patch to fix the problem... Notes below.
+------- Additional Comments From chastamar at yahoo.com  2005-06-25 11:59 -------
+Attached a patch above.
+The patch changes emit_marshal_string() (in marshal.c) to use
+mono_marshal_get_ptr_to_string_conv() in order to deduce the correct
+conversion when the given action is MARSHAL_ACTION_CONV_RESULT
+(similar to its behaviour when the given action is
+1. The patch is for only one file (marshal.c) that has not changed in
+SVN (rev. 46495) since 1.1.8-1
+2. I hope the behaviour is correct... If there are any win32api
+functions that return strings and are pinvoked by the class library,
+care should be taken not to break any implicitly expected behaviour there.
+3. It seemed to me like there may be some ways to refactor a bit and
+eliminate minor code duplications around the marshalling code. I was
+not  convinced of a right way to do this but a more knowledgable
+person might be.

More information about the mono-bugs mailing list