Paul Gibbons
2003-May-27 08:10 UTC
[Samba] Differences between Samba and Windows 2000 with respect to printer driver uploading.
I have discovered a difference between Samba and Windows which I think is of interest to the Samba team as it prevents printer driver from being uploaded correctly. I would appreciate some comment on this subject please. The difference is that following uploading of the dlls to the Windows 2000 server the driver is loaded on the Server itself and the driver recieves notification of the fact by a call to DrvPrinterEvent with event=PRINTER_EVENT_INITIALIZE to which the driver responds by setting the PrinterDriverData keys correctly; as a result the printer is fully installed and a test page is produced correctly however one requests its creation. In comparison following uploading of the dlls to the Samba server no action takes place on the Samba server itself ( of course it is not able to laod the driver being Linux) and so the driver is not given the opportunity to set the PrinterDriverData keys; in this case installation is not complete and so the test page fails. To compensate for the inability for the Samba server to run the driver one therefore needs to do a further step having uploaded the driver to Samba which is to open a connection to it from a Windows 2000 client ; this action causes the driver to the loaded and the driver to receive notification of the fact by a call to DrvPrinterEvent with event=PRINTER_EVENT_ADD_CONNECTION to which the driver can respond by setting the PrinterDriverData keys correctly. Further investigations show that during execution of the Add Printer to the Server process the driver is not loaded on the client machine that initiated the Add Printer process. After loading of the driver the user on the client can browse to the Server and see the new printer queue and the printer in the Server Printers folder. If the user then double-clicks on the printer queue ( not the item in the Servers Printers folder) he is told that the driver must be downloaded - on confirmation of this the driver is downloaded and added to the collection of printers on the client. Following downloading of the driver the DrvPrinterEvent function is called with event PRINTER_EVENT_ADD_CONNECTION which allows the driver to initialise the PrinterDriverData key on the server. If on the other hand the user simply double-clicks on the printer in the Servers Printers folder he is not told that the driver must be downloaded. However the driver files are copied to the client in order to display the properties. The difference from the first case is that in this case the printer is not added to the printers folder on the client. Following downloading of the driver the DrvPrinterEvent function is called with event PRINTER_EVENT_CACHE_REFRESH and later PRINTER_EVENT_CACHE_DELETE. As these events occur every time the driver is loaded responding to them by writing to PrinterDriverData could be detrimental on performance and may not lead to permanent changes to the PrinterDriverData on the Server. Paul Gibbons
Gerald (Jerry) Carter
2003-May-27 14:59 UTC
[Samba] Differences between Samba and Windows 2000 with respect to printer driver uploading.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 27 May 2003, Paul Gibbons wrote:> The difference is that following uploading of the dlls to the Windows > 2000 server the driver is loaded on the Server itself and the driver > recieves notification of the fact by a call to DrvPrinterEvent with > event=PRINTER_EVENT_INITIALIZE to which the driver responds by setting > the PrinterDriverData keys correctly; as a result the printer is fully > installed and a test page is produced correctly however one requests its > creation. > > In comparison following uploading of the dlls to the Samba server no > action takes place on the Samba server itself ( of course it is not able > to laod the driver being Linux) and so the driver is not given the > opportunity to set the PrinterDriverData keys; in this case installation > is not complete and so the test page fails. To compensate for the > inability for the Samba server to run the driver one therefore needs to > do a further step having uploaded the driver to Samba which is to open a > connection to it from a Windows 2000 client ; this action causes the > driver to the loaded and the driver to receive notification of the fact > by a call to DrvPrinterEvent with event=PRINTER_EVENT_ADD_CONNECTION to > which the driver can respond by setting the PrinterDriverData keys > correctly.This is old news really. But your analysis is correct. Some drivers are better about this than others. The best solution I have seen is to set the page orientation as this always initializes the driver data correctly. Also the 'default devmode' paraneter for another possible workaround. I've snipped the rest of the message, but it was pretty much right on as well. cheers, jerry ---------------------------------------------------------------------- Hewlett-Packard ------------------------- http://www.hp.com SAMBA Team ---------------------- http://www.samba.org GnuPG Key ---- http://www.plainjoe.org/gpg_public.asc "You can never go home again, Oatman, but I guess you can shop there." --John Cusack - "Grosse Point Blank" (1997) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQE+031hIR7qMdg1EfYRAl1BAJ49tDm/FYs3Dqru4BnntycsY1DuuQCfQpPv G7ixtiuC6S4uHgv05nNBrS4=h+Eb -----END PGP SIGNATURE-----
Seemingly Similar Threads
- Unable to print - fixme:psdrv:PSDRV_EndPage Already ended a page?
- Printer Driver Delivery - Printing Preferences Error
- Unable to print with the Wine PS driver
- Questions about some Ethereal/log output and spoolss
- PATCH: downloading drivers from Solaris [was Re: So SAMBA no longer ...]