[Mono-bugs] [Bug 82591][Min] New - Win32 PrinterSettings.InstalledPrinters missing connected network printers
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Aug 25 06:28:54 EDT 2007
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 andyhume32 at yahoo.co.uk.
http://bugzilla.ximian.com/show_bug.cgi?id=82591
--- shadow/82591 2007-08-25 06:28:54.000000000 -0400
+++ shadow/82591.tmp.7957 2007-08-25 06:28:54.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 82591
+Product: Mono: Class Libraries
+Version: 1.2
+OS:
+OS Details: XP SP 2
+Status: NEW
+Resolution:
+Severity:
+Priority: Minor
+Component: Sys.Drawing.
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: andyhume32 at yahoo.co.uk
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Win32 PrinterSettings.InstalledPrinters missing connected network printers
+
+On Windows XP my default printer is a network printer, and it does not
+appear in the drop-down-list in the Mono WinForms PrintDialog. Initially
+I thought it was a issue in PrintDialog, but on investigation found it
+was a issue with printer enumeration. (Even though the printer didn't
+appear in the list it /was/ though returned by the dialog if the user
+made no selection).
+
+The list returned by Mono PrinterSettings.InstalledPrinters does not
+include such network printers. On MSFT CLR the list it returns here is:
+
+\\pc99\Lexmark X1100 Series
+Microsoft XPS Document Writer
+Microsoft Office Document Image Writer
+Lexmark X1100 Series
+Canon S300 via IrDA
+Canon S300
+
+But the Mono equivalent is missing the first item.
+
+It appears that flag PRINTER_ENUM_CONNECTIONS should be added to the
+flags passed to Win32EnumPrinters in
+PrintingServicesWin32.InstalledPrinters.
+
+From the EnumPrinters MSDN page:
+PRINTER_ENUM_CONNECTIONS: "All connected remote printers"
+PRINTER_ENUM_LOCAL: "All local printers. Windows 95/98/Me: Also
+enumerates network printers because they are installed locally."
+
+Which shows that the 'connections' flag should be added. The text in the
+first table there gives a more confusing description of both making one
+thing the 'local' flag is enough.
+
+With that change I see the printer in the dialog and it is pre-selected
+at open.
+
+I wonder if PrintDialog should complain somehow (?debug output,
+MessageBox) when it doesn't find the default printer in the displayed
+list. It would make such omissions immediately apparent.
More information about the mono-bugs
mailing list