Sample Programs for SNA Print Server Data Filter
The source code for a sample program that illustrates using the SNA Print Server Data Filter API is included on the Microsoft® Host Integration Server 2000 CD-ROM and as part of the Microsoft Developer Network (MSDN) Platform SDK. The sample program illustrates features of the SNA Print Server Data Filter API that can be used to extend the capabilities of the Host Print Service in Host Integration Server 2000 and SNA Server. The sample code illustrates how to write a print data filter DLL that will be called by Host Print Service when a print job is initiated, when data is sent to the printer, and when the print job is completed.
The SNA Print Server Data Filter sample program is located in the \SDK\Samples\SNA\PrnFltr subdirectory on the Host Integration Server 2000 CD-ROM. These files are copied to your hard drive during Host Integration Server software or Host Integration Client software installation when the Host Integration Server Software Development Kit option is selected. These samples are installed in the Samples\SNA\PrnFltr subdirectory below where the Host Integration Server SDK software is installed (C:\Program Files\Host Integration Server SDK, by default).
When installed as part of the MSDN Platform SDK, these samples are located under the Samples\NetDS\HIS\SNA\PrnFltr subdirectory below where the MSDN Platform SDK has been installed (C:\Program Files\Microsoft SDK, by default).
This sample program include the following files:
| Subdirectory | Description |
|---|---|
| NTFilter.c | The sample program written in Visual C that illustrates use of the SNA Print Server Data Filter API. |
| NTFilter.h | An include file with function defines. |
| NTFilter.def | A DEF file for use by the compiler and linker. Note that exported functions from the SNA Print Server Data Filter DLL must not be decorated. |
| NTFIlter.rc | A resource file. |
| Makefile | A command-line Makefile that can be used with nmake. This Makefile can be used with Microsoft® Visual Studio .NET or Microsoft® Visual Studio 6.0. |
| prnfltr.vcproj | A project file for use with Visual C++ 7.0 and the Visual Studio .NET IDE. |
The PrnFltr sample is designed to be built using Microsoft® Visual C/C++ 6.0 or later using the command-line compiler or using the Microsoft® Visual Studio 6.0 or Microsoft® Visual Studio .NET interactive development environment (IDE).
To build the PrnFltr sample using the command-line compiler, set up your build environment as follows:
- Open an MS-DOS Command Prompt window.
- Run VCVARS32.bat (for VS6) or VSVARS32.bat (for VS.NET) from the Visual Studio bin directory(by default, C:\Program Files\Microsoft Visual Studio\VC98\Bin for VS6 or C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools for VS.NET))
- Navigate to SNA\PrnFltr subdirectory, and invoke NMAKE.
To build the PrnFltr sample using the Visual Studio .NET IDE, start Microsoft Visual Studio .NET 7.0 and open the appropriate Visual C++ 7.0 project file (SNA\PrnFltr\ntfilter.vcproj) from the File menu. Select a configuration and build the sample from the Build menu. Each VC7 project file has two configurations, one for a DEBUG build and one for a RETAIL build.