[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:02:22 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.


--- shadow/77523	2006-02-10 10:11:09.000000000 -0500
+++ shadow/77523.tmp.30067	2006-02-10 11:02:22.000000000 -0500
@@ -48,6 +48,12 @@
 Note, once this is fixed, System.Drawing.Font.ToHfont() is going to
 throw this exception on Windows (bug was found running mono SD under
 MS.Net runtime). System.Drawing.Font.ToLogFont (object logFont,
 Graphics graphics) either needs to use the other PtrToStructure 
 overload, or the LOGFONTW/LOGFONTA structs need to be changed to
 formatted classes (I believe the former is the correct solution).
+------- Additional Comments From jonathan.chambers at ansys.com  2006-02-10 11:02 -------
+Actually, LOGFONTA/LOGFONTW should be a formatted class, not a struct.
+Here is an MSDN article about using ToLogFont.

More information about the mono-bugs mailing list