Sample Port Monitor

The default port monitor provided by Microsoft in Windows 95 is part of the spooler subsystem DLL. If you need to develop another port monitor, you need to package it as a separate DLL callable by the spooler subsystem. The Reference section of this chapter 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 information with a port monitor.

Only two APIs have to be exported by a port monitor such that they appear in the .DEF file for the monitor: InitializeMonitorEx and DllEntryPoint. The InitializeMonitorEx code loads the addresses (function pointers) of the other port monitor functions that the local print provider calls. For an example, see the InitializeMonitorEx function code in the sample port monitor code 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.

The sample port monitor code is located in the SAMPLES directory after you install the Windows 95 DDK.