[Mono-bugs] [Bug 59909][Wis] Changed - passing classes to C library functions doesn't allow modification
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 10 Jun 2004 23:39:19 -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 mathpup@mylinuxisp.com.
http://bugzilla.ximian.com/show_bug.cgi?id=59909
--- shadow/59909 2004-06-10 16:53:07.000000000 -0400
+++ shadow/59909.tmp.24142 2004-06-10 23:39:19.000000000 -0400
@@ -43,6 +43,17 @@
Created an attachment (id=8100)
an example that doesn't work with mcs
------- Additional Comments From vargaz@freemail.hu 2004-06-10 16:53 -------
-> runtime
+
+------- Additional Comments From mathpup@mylinuxisp.com 2004-06-10 23:39 -------
+I noticed that inserting an OutAttribute in front of the parameter
+for the P/Invoke declaration works around the problem:
+
+private static extern void testfn([Out] RefInt i)
+
+So the mechanism for copying the data back from the temporary copy in
+unmanaged storage to the managed class is there. It just isn't being
+used without the OutAttribute.
+