[Samba] Differences between Samba and Windows 2000 with respect to printer driver uploading.

Paul Gibbons Paul_Gibbons at sw2000.com
Tue May 27 08:10:24 GMT 2003


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



More information about the samba mailing list