## PJLMon: Sample Language Monitor

[This is preliminary documentation and subject to change.]

### SUMMARY

A language monitor provides a full duplex communications path between the print spooler and bi-directional printers that are capable of providing software-accessible status information and adds printer control information, such as commands defined by a printer job language, to the data stream.

PJLMon.dll supports Printer Job Language (PJL) and provides bi-directional communication for PJL printers.

Please refer to the Windows® 2000 DDK documentation for more information about print monitors.

This sample works on both x86 and Alpha platforms and is 64-bit compliant.

### BUILDING THE SAMPLE

The code must be built using the build environment shipped with the DDK. Microsoft® Visual C® must be present on the machine for the sample to build properly, as build will use some header files. Also, both the SDK and the DDK must be installed.

To build the sample, run build from the src\print\monitors\pjlmon directory. The DLL will be placed in the appropriate platform directory (either i386 or Alpha).

A language monitor is installed together with a driver. Its filename must be listed in the printer driver INF file by using a LanguageMonitor entry. This entry must be included for every printer driver that controls a printer requiring the use of the language monitor. The DDK has an INF sample file in src\print\infs\driver5\oemprint.inf. After the user makes the necessary changes in the INF file to accomodate the driver, it will be necessary to modify the LanguageMonitor entry to specify the desired language monitor the driver will use. For example, LanguageMonitor=Pjlmon.dll for this sample.

Once built, the sample will produce four binaries: Pjlmon.dll, Pjlmon.lib (an export lib), Pjlmon.exp, and, if the sample is built in a checked environment, Pjlmon.pdb.

### CODE TOUR

#### File Manifest

    File		Description

Local.h Header for global declarations and function prototypes Makefile Generic file for building the code sample Parsepjl.c Source module that handles parsing of PJL printer response streams Parsepjl.h Header for PARSEPJL.C Pjlmon.c Source module that contains the exported functions Pjlmon.def File that list the exported functions Pjlmon.rc Resource file for the module Precomp.h Header that includes the headers to pre-compile Pjlmon.htm Documentation for this sample (this file) Sources Generic file for building the code sample Spltypes.h Header for PJLMON.C Util.c The source module for utility routines

Top of page

© 1999 Microsoft Corporation