## Printer Device Driver

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

### Driver Section

The final section of the plug-in module will contain the structure that describes your overall driver. This will include all the feature tables you defined and the array of supported devices (DEVICEINFO structures) you defined.

The DRIVERINFO structure is defined in the file device.h. The following is an example of a driver structure:

         DRIVERINFO pSAMPLEDriver[] =
         {
           {
             "Sample Printer Driver",         // pszDriverName;
             "IBM",                           // pszDriverVendor;
             0x0210,                          // usDriverVersion;
             SAMPLE_DEFINED_RESOLUTIONS,      // usNumRes;
             SAMPLE_pRes,                     // pRES; (Print Mode Table)
             0,                               // usNumFonts;
             NULL,                            // pFONTS; (Font Table)
             SAMPLE_DEFINED_TRAYS,            // usNumTrays;
             SAMPLE_pTrays,                   // pTRAYS; (Tray Table)
             SAMPLE_DEFINED_FORMS,            // usNumForms;
             SAMPLE_pForms,                   // pFORMS; (Form Table)
             SAMPLE_DEFINED_MEDIAS,           // ulNumMedias;
             SAMPLE_pMedias,                  // pMEDIAS; (Media Type Table)
             SAMPLE_DEFINED_CONNECTIONS,      // usNumConnects;
             SAMPLE_pConnects,                // pCONNECTS; (Form Connection Table)
             SAMPLE_DEFINED_PRINT_MODES,      // usNumPrintModes;
             SAMPLE_pPrintModes,              // pPrintModes; (Print Mode Table)
             SAMPLE_SUPPORTED_DEVICES,        // usNumDevices;
             SAMPLE_pDevices,                 // pDEVICES;  (Device Array)
             SAMPLE_pGammas,                  // pGammaTables;
           } /* end logical block */

         }; /* end Driver block */