[This is preliminary documentation and subject to change.]
The four samples demonstrate the use of COM OEM Printer Customization DLLs.
The OEMPS, OEMUI, and OEMUNI samples do not affect the printer output. They are only examples of how to build OEM Customization DLLs of their respective types: PostScript rendering, User Interface, and Unidrv rendering modules. The OEMUI sample does demonstrate common UI tasks such as adding additional elements to the UI (that is, items and pages). These samples also demonstrate both User Mode and Kernel Mode COM OEM Printer Customization DLLs.
The WaterMark sample demonstrates a PS OEM rendering module used in conjunction with a UI OEM module to produce customizable watermark page simulation by controlling PostScript injected in the printing stream by the PS OEM rendering module. The samples demonstrate the required COM interface, required functions with sample code, and how to use the OEM’s private DEVMODE section to communicate between the UI and rendering modules.
This sample requires that the Microsoft® Windows® 2000 SDK and DDK be installed so that the required headers and libs are available.
To build the samples, run build from this directory. The DLLs will be placed in the appropriate platform directory (that is, i386 or Alpha). To create a version with verbose debug output, add _DEBUG to the compile defines in the sources file.
After building the samples, they may be installed by using the Add Printer Wizard. Select the local printer, then select Have Disk, and point to the directory containing the Oemdll.inf file. The Windows 2000 drivers do not need to be copied to the local directory containing Oemdll.inf.
However, the Windows NT® 4.0 printer driver files will either need to be copied to the local directory containing Oemdll.inf, or during installation, you will need to point to the location where these files may be found. For the kernel-mode samples to work, the kernel-mode drivers (the Windows NT 4.0 drivers) used most support COM OEM Printer Customization DLL extensions, while the driver files in Windows NT 4.0 Service Pack 4 and earlier do not.
Root: Files Description OEMdll.htm The documentation for this sample (this file) Dirs The file the lists the subdirectories to build OEMdll.inf The printer INF that will install the OEM Customization samples once built OEMps.ini The printer ini file that specifies the OEM Customization DLLs for the OEMPS sample OEMui.ini The printer ini file that specifies the OEM Customization DLLs for the OEMUI sample OEMuni.ini The printer ini file that specifies the OEM Customization DLLs for the OEMUNI sample Wmark.ini The printer ini file that specifies the OEM Customization DLLs for the WaterMark sample Koemps.ini The printer ini file that specifies the OEM Customization DLLs for the kernel mode OEMPS sample Koemuni.ini The printer ini file that specifies the OEM Customization DLLs for the kernel mode OEMUNI sample OEM.gpd The generic PCL5 GPD file for the samples that use Unidrv OEM.ppd The generic PostScript PPD file for samples that use PostScript OEMPS The directory that contains the OEMPS sample source code OEMUI The directory that contains the OEMUI sample source code OEMUNI The directory that contains the OEMUNI sample source code WaterMark The directory that contains the WaterMark sample source code OEMPS directory: Files Description Dirs The file the lists the subdirectories to build Sources.inc The generic file for building the code sample Command.cpp Source module for OEM customized Commands Command.h The header for command.cpp DDIHook.cpp Source module for functions that are hooked from the driver Debug.cpp The code for debugging functions Debug.h The header for debug.cpp Devmode.cpp The code for the OEM Devmode functions Devmode.h The header for devmode.cpp DLLEntry.cpp Source module for DLL entry function Intrface.cpp Source module that implements the OEM COM Printer Customization rendering interface Intrface.h The header for Intrface.cpp Kmode.h The header file that allows the source code to build a Kernel mode OEM DLL Oem.h The header that contains common defines between the OEM UI and rendering modules Oemps.rc The resource file for the rendering module Resource.h The header for the rendering module’s resources Precomp.h The header that includes the headers to precompile Umode The directory that contains the User Mode-specific sources file Kmode The directory that contains the Kernel Mode specific sources file OEMPS\UMode Files Description Sources The generic file for building the code sample for User Mode Makefile The generic file for building the code sample Oemps.def The file that list the exported functions OEMPS\KMode Files Description Sources The generic file for building the code sample for Kernel Mode Makefile The generic file for building the code sample Koemps.def The file that list the exported functions OEMUI directory: Files Description Sources The generic file for building the code sample Makefile The generic file for building the code sample Debug.cpp The code for debugging functions Debug.h The header for Debug.cpp Devmode.cpp The code for the OEM Devmode functions Devmode.h The header for Devmode.cpp DLLEntry.cpp Source module for DLL entry function Globals.cpp Source module that implements the global variables for the UI module Globals.h The header for Globals.cpp OEMUI.cpp Source module for the OEM code that customizes the Printer Properties UI OEMui.h The header for OEMui.cpp Intrface.cpp Source module that implements the OEM COM Printer Customization rendering interface Intrface.h The header for Intrface.cpp Oemui.def The file that list the exported functions Oemui.rc The resource file for the rendering module Resource.h The header for the rendering module’s resources. Precomp.h The header that includes the headers to pre-compile. OEMUNI directory: Files Description Dirs The file the lists the subdirectories to build SOURCES.INC The generic file for building the code sample Command.cpp Source module for OEM customized Commands Command.h The header for command.cpp DDIHook.cpp Source module for functions that are hooked from the driver Debug.cpp The code for debugging functions Debug.h The header for debug.cpp Devmode.cpp The code for the OEM Devmode functions Devmode.h The header for devmode.cpp DLLEntry.cpp Source module for DLL entry function Intrface.cpp Source module that implements the OEM COM Printer Customization rendering interface Intrface.h The header for Intrface.cpp Kmode.h The header file that allows the source code to build a Kernel mode OEM DLL Oem.h The header that contains common defines between the OEM UI and rendering modules oemuni.rc The resource file for the rendering module Resource.h The header for the rendering module’s resources Precomp.h The header that includes the headers to precompile Umode The directory that contains the User Mode specific sources file Kmode The directory that contains the Kernel Mode-specific sources file OEMUNI\UMode Files Description Sources The generic file for building the code sample for User Mode Makefile The generic file for building the code sample Oemuni.def The file that list the exported functions OEMUNI\KMode Files Description Sources The generic file for building the code sample for Kernel Mode Makefile The generic file for building the code sample Koemuni.def The file that list the exported functions WaterMark directory: Files Description Dirs The file the lists the subdirectories to build Common The directory that contains common components between OEMPS and OEMPSUI modules WMARKPS The directory that contains the PS WaterMark rendering module source code WMARKUI The directory that contains the WaterMark UI module source code WaterMark\common directory: Files Description Debug.cpp The code for debugging functions Debug.h The header for debug.cpp Devmode.cpp The code for the OEM Devmode functions Devmode.h The header for devmode.cpp Kmode.h The header file that allows the source code to build a Kernel mode OEM DLL Oem.h The header that contains common defines between the OEM UI and rendering modules WaterMark\WMARKPS directory: Files Description Sources.inc The generic file for building the code sample Command.cpp Source module for OEM customized Commands Command.h The header for command.cpp DLLEntry.cpp Source module for DLL entry function Fdebug.cpp Source module that includes debug.cpp from the common directory Fdevmode.cpp Source module that includes devmode.cpp from the common directory Intrface.cpp Source module that implements the OEM COM Printer Customization rendering interface Intrface.h The header for Intrface.cpp Wmarkps.rc The resource file for the rendering module Resource.h The header for the rendering module’s resources Precomp.h The header that includes the headers to pre-compile Drawmark.ps The PostScript to inject at the start of each page to draw the water mark Wmark.ps The PostScript to inject at the header of the document that defines how to draw the water mark Umode The directory that contains the user-mode-specific sources file Kmode The directory that contains the kernel-mode-specific sources file Watermark\WMARKPS\UMode Files Description Sources The generic file for building the code sample for User Mode Makefile The generic file for building the code sample Wmarkps.def The file that list the exported functions Watermark\WMARKPS\KMode Files Description Sources The generic file for building the code sample for kernel mode Makefile The generic file for building the code sample Kwmarkps.def The file that list the exported functions WaterMark\WMARKUI directory: Files Description Sources The generic file for building the code sample Makefile The generic file for building the code sample DLLEntry.cpp Source module for DLL entry function Fdebug.cpp Source module that includes debug.cpp from the common directory Fdevmode.cpp Source module that includes devmode.cpp from the common directory Globals.cpp Source module that implements the global variables for the UI module Globals.h The header for Globals.cpp Wmarkui.cpp Source module for the OEM code that customizes the Printer Properties UI Wmarkui.h The header for Wmarkui.cpp Intrface.cpp Source module that implements the OEM COM Printer Customization rendering interface Intrface.h The header for Intrface.cpp Wmarkui.def The file that list the exported functions Wmarkui.rc The resource file for the rendering module Resource.h The header for the rendering module’s resources Precomp.h The header that includes the headers to pre-compile
© 1999 Microsoft Corporation