How Windows 98 Managed Print Spool Files
This article explains the print spooling architecture of Microsoft Windows 98, focusing on how print jobs were routed, processed, and stored as temporary files within the System directory. It details the directory structure used by the 32-bit spooler, the distinction between spool data formats, and how the operating system handled file lifecycle and error recovery during printing operations.
Spool Directory Location and Structure
In Windows 98, print jobs were temporarily written to the hard drive to allow applications to return to normal operation quickly. The primary directory responsible for holding these temporary files was located at:
C:\WINDOWS\SYSTEM\SPOOL\PRINTERS
Unlike Windows NT, which utilized the System32
directory, Windows 98 maintained its 32-bit subsystem components under
the standard System folder. The spooler subsystem monitored
this directory continuously whenever a printer was configured to spool
print jobs rather than print directly to the port.
Spool File Types and Data Formats
When an application initiated a print command, the Graphics Device Interface (GDI) interacted with the printer driver to generate the print data. The spooler typically created two types of files in the spool directory:
- Shadow Files (.SHD): These contained metadata about the print job, including the user name, job status, target printer, and document settings.
- Spool Files (.SPL): These contained the actual graphic or text data to be sent to the physical output device.
Windows 98 supported two primary spool data formats:
- Enhanced Metafile (EMF): A device-independent format used to render data quickly. EMF files allowed the application to offload the print task rapidly, leaving the background spooler to interpret the commands into printer-specific language.
- RAW: A printer-ready format already translated into the specific Page Description Language (PDL), such as PostScript or PCL, required by the printer hardware.
Background Processing and Multithreading
Windows 98 utilized a 32-bit preemptive multitasking architecture for
its print spooler (SPOOL32.EXE). Once the application wrote
the initial print data to the \SYSTEM\SPOOL\PRINTERS
directory, a background thread handled the reading and transmission of
the file.
The spooler read the .SPL file from disk, sent the data
in chunks through the appropriate communications port (typically
LPT1 for parallel ports or a network port), and managed
handshakes with the printer to ensure buffer overruns did not occur.
File Deletion and Error Handling
Under normal operating conditions, the print spooler operated with an automatic cleanup policy:
- Successful Print Jobs: Once the printer
acknowledged the receipt of the final data packet, Windows 98 closed the
file handles and deleted both the
.SPLand.SHDfiles from the disk. - System Crashes and Stalled Jobs: If a system crash
or power failure occurred while a job was in progress, the temporary
files remained in
\WINDOWS\SYSTEM\SPOOL\PRINTERS. Upon restarting, the spooler checked this folder. Depending on file integrity, Windows 98 would either attempt to resume the print job or leave orphaned files behind. Users often had to manually delete locked or corrupt.SPLfiles from this directory via MS-DOS mode or Safe Mode to resolve print queue jams.
Spool Configuration Options
Users could modify how files were handled in the System directory through the Printer Properties interface under the Details tab via Spool Settings:
- Spool print jobs so program finishes printing faster: The default setting that enabled writing files to the disk.
- Start printing after last page is spooled: Kept the
entire job in the
\SPOOL\PRINTERSfolder until the application finished, preventing port conflicts on slower systems. - Start printing after first page is spooled: Began reading and deleting parts of the spool file while later pages were still being generated, saving disk space at the expense of potential communication timeouts.
- Print directly to the printer: Completely bypassed
the
\WINDOWS\SYSTEM\SPOOLdirectory, writing data straight to the port.