[Mono-bugs] [Bug 79117][Nor] Changed - Marshal.StringToHGlobalAuto & PtrToStringAuto not working as expected

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Aug 21 14:09:23 EDT 2006

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 robertj at gmx.net.


--- shadow/79117	2006-08-21 13:53:14.000000000 -0400
+++ shadow/79117.tmp.20538	2006-08-21 14:09:23.000000000 -0400
@@ -87,6 +87,25 @@
 I can see how "FormatMessageA" is looked up. That's wrong.
 It should be "FormatMessageW", because I'm running XP.
 Marshal.SystemDefaultCharSize is 2, which is correct.
+------- Additional Comments From robertj at gmx.net  2006-08-21 14:09 -------
+Sorry, I've misunterstood the dump output. It was LoadLibraryA,
+not FormatMessageA. FormatMessageW is looked up correctly :-)
+The problem is the following icall:
+	{"PtrToStringAuto(intptr)",
+	{"PtrToStringAuto(intptr,int)",
+As you see, "Auto" gets mapped to "Ansi".
+Under Windows this is wrong. It should be mapped
+to a function which depending on Marshal.SystemDefaultCharSize
+it calls either *Ansi or *Unicode.

More information about the mono-bugs mailing list