## Printer Device Driver

[prev][next][parent][TOC]

### GenPLib Architecture

The GenPLib is a 32-bit static linking library, GENPLIB.LIB. Developers use LINK386.EXE to link the GPL with their 32-bit printer drivers.

Several C language include files (*.H) are associated with GENPLIB.LIB and define the function names and prototypes in the library. The main include file is GENPLIB.H.

GENPLIB.H includes other relevant library H files based on symbolics (INCLs ) defined to the compiler. For example, the following symbolics have a special meaning to the operation of GENPLIB.H when included by a C program:

    INCL_GENPLIB_ASSERT

    INCL_GENPLIB_ERROR

    INCL_GENPLIB_HANDLER

    INCL_GENPLIB_JOURNAL

    INCL_GENPLIB_MEMORY

    INCL_GENPLIB_SEMAPHORES

    INCL_GENPLIB_STRINGSORT

    INCL_GENPLIB_THREAD

    INCL_GENPLIB_UTIL

    INCL_GENPLIB_PATTERNS

To include all functions, use:

    INCL_GENPLIB_ALL

When a developer uses GenPLib memory-management routines, the C source file that requires GenPLib memory management would include a set of code resembling the following:

    #define INCL_GENPLIB_MEMORY

    #include <genplib.h>

This code is included before any GenPLib memory-management functions or structures are referenced. The compiler automatically includes GPLMEM.H within GENPLIB.H.