[Mono-bugs] [Bug 59306][Maj] New - Marshalling broken

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 29 May 2004 19:16:06 -0400 (EDT)

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 edd@usefulinc.com.


--- shadow/59306	2004-05-29 19:16:06.000000000 -0400
+++ shadow/59306.tmp.30507	2004-05-29 19:16:06.000000000 -0400
@@ -0,0 +1,34 @@
+Bug#: 59306
+Product: Mono: Runtime
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: edd@usefulinc.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Marshalling broken 
+The automatic marshalling of strings to P/invoked code is broken in the CVS
+instead of     
+static extern IntPtr gettext (String instring);
+i have to do 
+static extern IntPtr gettext (IntPtr instring);
+and hand-marshal the instring using StringToHGLobalAuto, in order for the
+underlying string to be marshalled properly.
+I'll attach two example classes: one that doesn't work but should, and one
+that's the workaround.