The default print processor provided by Microsoft in Windows 95 is part of the spooler subsystem DLL. If you need to develop another print processor, you need to package it as a separate DLL callable by the spooler subsystem. The "Reference" section names the APIs that your DLL needs to export to be called by the spooler subsystem, and defines the members of the data structures the spooler subsystem uses to share data with a print processor.
Only two APIs need to be exported by a print processor to appear in the .DEF file for the processor: InitializePrintProcessor and DllEntryPoint. The InitializePrintProcessor code loads the addresses (function pointers) of the other print processor functions that the local print provider will call. For an example of such code, see the InitializePrintProcessor function code in the sample print processor provided with the Windows 95 DDK. All the functions that the local print provider expects to call through the function pointer table are defined in the Reference section below.
The sample print processor code is on the path \DDK\PRINTER\SAMPLE after you install the Windows 95 DDK.
The key function in the sample print processor (WINPRINT) shipped with the Windows 95 DDK is the WinprintPrintDocumentOnPrintProcessor function, which initiates sending a spooled print job to the printer. This function uses calls to the GDI 32 function gdiPlaySpoolStream and the local print provider functions ReadPrinter and WritePrinter. The following reference information for these three functions and a pseudo code representation of the sample WinprintPrintDocumentOnPrintProcessor will make it easier for you to understand the sample print processor source code that is part of the Windows 95 DDK. The reference information is presented first, and then the pseudo code. Before you read the rest of this section, review Typical Printing Process Scenario Using an EMF Spool File.