Print Providers

The Windows NT local print provider is used to send print jobs to a print device attached locally to the Windows NT-based computer. Remote print providers are used to send print jobs to other computers on the network.

Local Print Provider

A local print provider is used when a Windows NT print server is in charge of printing a job and the output goes to a local device, such as a parallel port or a network-attached printer.

The local print provider, LOCALSPL.DLL, provides the following functions:

Figure 6.4 The Local Print Provider (LOCALSPL.DLL)

Most of the local print provider's options are configurable in Print Manager, by using the Details button from the Printer Properties dialog box. These options are documented thoroughly in online help, but you should be sure to note some options new to Windows NT in version 3.5:

Spool Files and Shadow Files

For each spooled job, the local print provider creates two files:

If the print server is shut down while print jobs are spooled and waiting to print, the spool and shadow files remain on the disk and are used to restart the print job when the print server is restarted. The local print provider uses the information in the shadow file to determine how to print the print job, and the content of the job is contained in the spool file.

The spool file and shadow file for a job are kept in the same directory on disk. By default, these files are written to \systemroot\SYSTEM32\SPOOL\PRINTERS. However, you can set a new default location or override the default location on a per-printer basis, by manually editing the Registry.

To set a new default location by manually editing the Registry

  1. Start the Registry Editor (REGEDT32.EXE) and find the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\Print\Printers.
  2. Add a DefaultSpoolDirectory setting and as its value provide the full path to the spool directory that all printers should use by default.

    The change in the Registry takes effect after you stop and restart the spooler service.

To override the default location for one specific printer

  1. Start the Registry Editor (REGEDT32.EXE), and find the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print
    \Printers.
  2. Find the key for the printer.
  3. Add a new SpoolDirectory setting, and as its value provide the path to the spool directory that this printer should use.

    The change in the Registry takes effect after you stop and restart the Spooler service.

Remote Print Providers

Remote print providers are used when a Windows NT-based computer sends a print job to another print server. This usually happens when your Windows NT-based computer acts as a workstation on the network, but it can also occur if your Windows NT-based computer acts as a print server which forwards incoming jobs to another print server.

Windows NT supplies two remote print providers.

Generally, if you are sending a print job to another print server, you have established the printer in Print Manager using the Connect To option. When a client sends a job to such a printer, the router polls each of the remote print providers in turn, in effect asking each one whether it recognizes the printer name. The router passes control to the first network provider that recognizes the printer name. You can set the polling order by using the Network icon in the Control Panel window. After choosing this icon, choose the Networks button. In the Network Providers Search Order dialog box, choose the Print Provider option in the Show Providers For box. Then select the name of a network and use the Up and Down buttons to change the polling order.

Note Neither of these remote print providers performs spooling. When you send a print job using these remote print providers, the job does not spool locally.

Windows Network Print Provider

If the Windows network print provider, WIN32SPL.DLL, recognizes the printer name, then this print provider makes further decisions based on the type of print server to which the job is going. If the print server is running Windows NT, then WIN32SPL.DLL makes remote procedure calls (RPC) to the router component of the remote server. The remote server's router receives the print job over the network, and then begins processing the job as if one of its own local clients had submitted the job.

If the remote print server is not running Windows NT, then WIN32SPL.DLL contacts the local Windows Network redirector, which forwards the job over the network to the downlevel server. The downlevel server is then responsible for printing the job.

The functions provided by the Windows network print provider are illustrated in the following figure.

Figure 6.5 The Windows Network Print Provider (WIN32SPL.DLL)

NetWare Print Provider

If the NetWare print provider (NWPROVAU.DLL) recognizes the server name when polled by the router, it takes control of the print job. The NetWare print provider then communicates with the NetWare workstation service, NWWKS.DLL, which in turn passes control to the NetWare redirector. The NetWare redirector then transmits the print job over the network to the NetWare print server. This process is illustrated in the following figure.

Figure 6.6 How the NetWare Print Provider Interacts with Other Components