
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="Microsoft Word 97">
<TITLE>LocalMon</TITLE>
</HEAD>
<BODY LINK="#0000ff">

<FONT FACE="Verdana" SIZE=5><H2>LocalMon: Sample Port Monitor Server DLL</H2>
</FONT><FONT FACE="Verdana" SIZE=2>
<P><span style="color:#FF0000;font-size:10pt;font-family:Arial">[This is preliminary documentation and subject to change.]</span></P>

<H3>SUMMARY</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
A port monitor DLL is a user-mode DLL that is responsible for providing a communications path between the user-mode print spooler and the kernel-mode port drivers that access I/O port hardware. <P>

Please refer to the Windows&#174; DDK documentation for further information about print monitors.<P>
This sample works on both x86 and Alpha platforms and the code is 64-bit compliant.

<H3>BUILDING THE SAMPLE</H3></FONT><FONT FACE="Verdana" SIZE=2><P>

The code must be built using the build environment shipped with the DDK. Microsoft&#174; Visual C&#174; must be present on the machine for the sample to build properly, as build will use some header files. Also, the SDK and the DDK must be installed.<P>
To build the sample, run <B>build</B> from the src\print\monitors\localmon directory. The DLL will be placed in the appropriate platform directory (either i386 or Alpha). <P>

To install a port monitor, an INF file called Monitor.inf is needed. This INF file is based on Printmon.inf, the default INF file for installing port monitors.
A functional Monitor.inf file is provided. However, in order to adapt it to the user's needs, it will be necessary to make changes in certain designated places tagged "User Changes." Examples of these changes are: changing the source media description or adding a help file to the monitor.
<P>

Once built, the sample will produce four binaries: DDKLocalmon.dll, DDKLocalmon.lib (an export lib), DDKLocalmon.exp, and, if the sample is built in a checked environment, DDKLocalmon.pdb.<P>
Before installing this sample monitor, the user needs to build src\print\localui, because DDKLocalui.dll provides the UI for DDKLocalmon and they are installed together. 	

<H3>CODE TOUR</H3>
<H4>File Manifest</H4>
</FONT><U><PRE>File&#9;&#9;Description
</U>
Config.c&#9;Handles spooler entry points for adding, deleting, and configuring localmon ports 
Dialogs.c&#9;Source module that implements dialog boxes 
Dialogs.h&#9;Header for DIALOGS.C 
Lmon.h&#9; 	Header that declares PORT_INFO_FF structure 
Irda.c&#9;	IRDA printing support in localmon
Irda.h&#9;	Header for IRDA
Local.h&#9; 	Header that declares debug functions
Localmon.c&#9;Source module that contains the DLL entry point 
Localmon.def&#9;File that lists the exported functions 
Localmon.prf&#9;Resource file for the dialogs 
Localmon.h&#9;Header for global declarations and function prototypes 
Localmon.rc&#9;Resource file for the module 
Makefile&#9;Generic file for building the code sample
Precomp.h&#9;Generic header
Localmon.htm&#9;Documentation for this sample (this file) 
Resource.rcv&#9;Resource version file
Resource.h&#9;Resource include file
Setlink.c&#9;Utility to display or change the value of a symbolic link 
Sources&#9; 	Generic file for building the code sample
Spltypes.h&#9;Header for Winspool.c 
Util.c&#9; 	Source module for support routines
Winspool.c&#9;Implements the spooler supported APIs for printing
Xcv.c&#9;	Interface for calling  print spooler's XcvData (transceive data) functions. This is the means by which a port monitor UI DLL communicates with its associated port monitor server DLL. 


</FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
<TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
<TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
<P></TD>
</TR>
</TABLE>

<FONT FACE="MS Sans Serif" SIZE=1><P>&copy; 1999 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
</HTML>
