[Mono-bugs] [Bug 77523][Nor] Changed - PtrToStructure(IntPtr,
object) should throw exception if object is not formatted class
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Feb 10 11:51:13 EST 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 jonathan.chambers at ansys.com.
http://bugzilla.ximian.com/show_bug.cgi?id=77523
--- shadow/77523 2006-02-10 11:45:15.000000000 -0500
+++ shadow/77523.tmp.30671 2006-02-10 11:51:13.000000000 -0500
@@ -69,6 +69,18 @@
font.ToLogFont(log1);
log2 = (LOGFONT)log1;
Thus PtrToStructure can and should work with structures because it
expects an object so it will get a boxed structure that can be
modified.
+
+------- Additional Comments From jonathan.chambers at ansys.com 2006-02-10 11:51 -------
+Kornel, I am not quite sure what you are saying. From the MSDN docs,
+and from the test case it appears that PtrToStructure has to overloads
+that behave differently. One allows for structures or formatted
+classes, the other only allows for formatted classes (not a boxed
+value type). If you are saying something else, sorry.
+
+We are currently using the overload that only allows for formatted
+classes in SD. This actually seems to be correct as the MS ToLogFont
+only worked for me when I used a formatted class to describe the
+LOGFONT structure, not when I used a managed struct.
More information about the mono-bugs
mailing list