[Mono-bugs] [Bug 79835][Nor] Changed - PageSetupDialog: ArgumentNullException in swf-printing sample

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Dec 2 05:40:15 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 alex.olk at googlemail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79835

--- shadow/79835	2006-12-01 20:30:26.000000000 -0500
+++ shadow/79835.tmp.8869	2006-12-02 05:40:15.000000000 -0500
@@ -1,12 +1,12 @@
 Bug#: 79835
 Product: Mono: Class Libraries
 Version: 1.0
 OS: unknown
 OS Details: 
-Status: NEEDINFO   
+Status: CLOSED   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: Windows.Forms
 AssignedTo: shana.ufie at gmail.com                            
 ReportedBy: alex.olk at googlemail.com               
@@ -284,6 +284,26 @@
   at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg,
 IntPtr wParam, IntPtr lParam) [0x0006b] in
 /home/alex/develop/mcs/class/Managed.Windows.Forms/System.Windows.Forms/NativeWindow.cs:171
 
 ------- Additional Comments From shana.ufie at gmail.com  2006-12-01 20:30 -------
 Test it out please :)
+
+------- Additional Comments From alex.olk at googlemail.com  2006-12-02 05:40 -------
+Good work shana. My printer shows up again :)
+
+Now, the only thing you have to do is to replace:
+ptr_printers = new IntPtr (ptr_printers.ToInt64 () + 20 /*size of
+CUPS_DEST*/);
+
+cupsGetDests gets a pointer to a buffer with cups_dest_s structs returned.
+
+struct cups_dest_s
+{
+  char *name, * instance;
+  int is_default;
+  int num_options;
+  cups_option_t * options;
+};
+
+So on 64 bit systems the size of such a struct may not be 20.
+Marshal.PointerToStructure seems to be a better way :)


More information about the mono-bugs mailing list