home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / IBMH / PMSPL.H < prev    next >
Text File  |  1995-04-14  |  35KB  |  865 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /****************************** Module Header ******************************\
  13. *
  14. * Module Name: PMSPL.H
  15. *
  16. * OS/2 Presentation Manager Spooler constants, types and function declarations
  17. *
  18. *
  19. * ===========================================================================
  20. *
  21. * The following symbols are used in this file for conditional sections.
  22. *
  23. *   #define:                To include:
  24. *
  25. *   INCL_SPLERRORS          defined if INCL_ERRORS defined
  26. *   INCL_SPLFSE             file system emulation calls
  27. *   INCL_SPLDOSPRINT        DosPrint APIs
  28. *
  29. * ===========================================================================
  30. *
  31. * Comments at the end of each typedef line give the name tags used in
  32. * the assembler include version of this file.
  33. *
  34. * The assembler include version of this file excludes lines between XLATOFF
  35. * and XLATON comments.
  36. *
  37. \***************************************************************************/
  38.  
  39. /* XLATOFF */
  40. #ifdef __IBMC__
  41.    #pragma checkout( suspend )
  42.    #ifndef __CHKHDR__
  43.       #pragma checkout( suspend )
  44.    #endif
  45.    #pragma checkout( resume )
  46. #endif
  47. /* XLATON */
  48.  
  49. /* XLATOFF */
  50. #ifndef PMSPL_INCLUDED
  51.    /* XLATON */
  52.    #define PMSPL_INCLUDED
  53.    
  54.    
  55.    
  56.    /* XLATOFF */
  57.    #define DosPrintDestControl       SplControlDevice
  58.    #define DosPrintDestGetInfo       SplQueryDevice
  59.    #define DosPrintDestEnum          SplEnumDevice
  60.    #define DosPrintJobContinue       SplReleaseJob
  61.    #define DosPrintJobPause          SplHoldJob
  62.    #define DosPrintJobDel            SplDeleteJob
  63.    #define DosPrintJobGetInfo        SplQueryJob
  64.    #define DosPrintJobSetInfo        SplSetJob
  65.    #define DosPrintJobEnum           SplEnumJob
  66.    #define DosPrintQAdd              SplCreateQueue
  67.    #define DosPrintQPause            SplHoldQueue
  68.    #define DosPrintQContinue         SplReleaseQueue
  69.    #define DosPrintQDel              SplDeleteQueue
  70.    #define DosPrintQGetInfo          SplQueryQueue
  71.    #define DosPrintQSetInfo          SplSetQueue
  72.    #define DosPrintQEnum             SplEnumQueue
  73.    #define DosPrintDestAdd           SplCreateDevice
  74.    #define DosPrintDestSetInfo       SplSetDevice
  75.    #define DosPrintDestDel           SplDeleteDevice
  76.    #define DosPrintQPurge            SplPurgeQueue
  77.    #define DosPrintDriverEnum        SplEnumDriver
  78.    #define DosPrintQProcessorEnum    SplEnumQueueProcessor
  79.    #define DosPrintPortEnum          SplEnumPort
  80.    /* XLATON */
  81.    
  82.    /*** if error definitions are required then allow Spooler errors ********/
  83.    #ifdef INCL_ERRORS
  84.       #define INCL_SPLERRORS
  85.    #endif /* INCL_ERRORS */
  86.    
  87.    /*** Names of various OS2SYS.INI spooler variables **********************/
  88.    
  89.    #define SPL_INI_SPOOLER         "PM_SPOOLER"
  90.    #define SPL_INI_QUEUE           "PM_SPOOLER_QUEUE"
  91.    #define SPL_INI_PRINTER         "PM_SPOOLER_PRINTER"
  92.    #define SPL_INI_PRINTERDESCR    "PM_SPOOLER_PRINTER_DESCR"
  93.    #define SPL_INI_QUEUEDESCR      "PM_SPOOLER_QUEUE_DESCR"
  94.    #define SPL_INI_QUEUEDD         "PM_SPOOLER_QUEUE_DD"
  95.    #define SPL_INI_QUEUEDDDATA     "PM_SPOOLER_QUEUE_DDDATA"
  96.    
  97.    /*** General SPL return values ******************************************/
  98.    #define SPL_ERROR     0L
  99.    #define SPL_OK        1L
  100.    
  101.    /*** handle to a spool file *********************************************/
  102.    typedef LHANDLE HSPL;               /* hspl */
  103.    
  104.    /* Used in recording of PM_Q_STD data via SplStdxxx calls */
  105.    typedef LHANDLE HSTD;               /* hstd */
  106.    typedef HSTD *PHSTD;
  107.    
  108.    /*** spooler manager open data ******************************************/
  109.    typedef PSZ *PQMOPENDATA;       /* pqmdop */
  110.    
  111.    
  112.    /*** Spooler Queue Processor interface **********************************/
  113.    
  114.    /* control codes for SplQpControl */
  115.    #define SPLC_ABORT     1
  116.    #define SPLC_PAUSE     2
  117.    #define SPLC_CONTINUE  3
  118.    
  119.    /* flag defines for optional SplQpQueryFlags           */
  120.    /* set this to allow spooler to bypass Queue Processor */
  121.    /* for PM_Q_RAW jobs.  This allows print while a job   */
  122.    /* is still spooling.                                  */
  123.    #define QP_RAWDATA_BYPASS 0x00000001L
  124.    
  125.    /*** handle to a spooler queue processor ********************************/
  126.    typedef LHANDLE HPROC;              /* hproc */
  127.    
  128.    /*** spooler processor open data ****************************************/
  129.    typedef PSZ *PQPOPENDATA;       /* pqpdop */
  130.    
  131.    /*** Spooler Queue Processor interface **********************************/
  132.    /* API's exported by Queue Processor DLL's                              */
  133.    HPROC EXPENTRY SplQpOpen(LONG        cData,
  134.    PQPOPENDATA pQPDataIn);
  135.    
  136.    BOOL  EXPENTRY SplQpPrint(HPROC hproc,
  137.    PSZ   pszFileName);
  138.    
  139.    BOOL  EXPENTRY SplQpClose(HPROC hproc);
  140.    
  141.    BOOL  EXPENTRY SplQpControl(HPROC hproc,
  142.    LONG  cmdCode);
  143.    
  144.    BOOL  EXPENTRY SplQpQueryDt(PLONG    pcDataType,
  145.    PSZ *paszDataTypes);
  146.    
  147.    BOOL  EXPENTRY SplQpInstall(HWND hwnd);
  148.    
  149.    /* The next API is optionally exported by Queue Processors */
  150.    /* The flags may be set to QP_RAWDATA_BYPASS to allow the  */
  151.    /* spooler to print the job while spooling, bypassing this */
  152.    /* queue processor                                         */
  153.    
  154.    BOOL  EXPENTRY SplQpQueryFlags(PULONG pulFlags);
  155.    
  156.    /*************************************************************************
  157.    * There are two definitions governing the QpOpen data block :-
  158.    * 1) the original  QPOPENDATA, which is used as
  159.    *    an array of PSZ and has a list of associated QPDAT defines
  160.    *    for accessing elements of the array. This has been extended
  161.    *    from 6 to 12 elements. The last element is a numeric type
  162.    *    and cannot satisfactorily be accessed via array indexing.
  163.    *
  164.    * 2) a new SQPOPENDATA structure (see below)
  165.    *
  166.    * The old defn has been retained to support existing QProcs.
  167.    *
  168.    *************************************************************************/
  169.    
  170.    /*** Definition for elements within the PQPOPENDATA block ***************/
  171.    #define QPDAT_ADDRESS     0
  172.    #define QPDAT_DRIVER_NAME 1
  173.    #define QPDAT_DRIVER_DATA 2
  174.    #define QPDAT_DATA_TYPE   3
  175.    #define QPDAT_COMMENT     4
  176.    #define QPDAT_PROC_PARAMS 5
  177.    #define QPDAT_SPL_PARAMS  6      /* SplQmOpen Spooler params **       */
  178.    #define QPDAT_NET_PARAMS  7      /* SplQmOpen Network params **       */
  179.    #define QPDAT_DOC_NAME    8      /* SplQmStartDoc name       **       */
  180.    #define QPDAT_QUEUE_NAME  9      /* Queue name for job       **       */
  181.    #define QPDAT_TOKEN      10      /* SplQmOpen token name     **       */
  182.    #define QPDAT_JOBID      11      /* SQM job identity         **       */
  183.    
  184.    typedef struct _SQPOPENDATA       /* SplQpOpenData */
  185.    {
  186.       PSZ       pszLogAddress;     /*                                   */
  187.       PSZ       pszDriverName;     /*                                   */
  188.       PDRIVDATA pdriv;             /*                                   */
  189.       PSZ       pszDataType;       /*                                   */
  190.       PSZ       pszComment;        /*                                   */
  191.       PSZ       pszProcParams;     /*                                   */
  192.       PSZ       pszSpoolParams;    /*                                   */
  193.       PSZ       pszNetworkParams;  /*                                   */
  194.       PSZ       pszDocName;        /*                                   */
  195.       PSZ       pszQueueName;      /*                                   */
  196.       PSZ       pszToken;          /*                                   */
  197.       USHORT    idJobId;           /*                                   */
  198.    } SQPOPENDATA;                   /*                                   */
  199.    typedef SQPOPENDATA *PSQPOPENDATA; /* ptr to SQPOPENDATA */
  200.    
  201.    
  202.    /*************************************************************************
  203.    *** Error information and return codes
  204.    *************************************************************************/
  205.    
  206.    /* Error information for SplMessageBox */
  207.    #define SPLINFO_QPERROR       0x0001
  208.    #define SPLINFO_DDERROR       0x0002
  209.    #define SPLINFO_SPLERROR      0x0004
  210.    #define SPLINFO_OTHERERROR    0x0080
  211.    #define SPLINFO_INFORMATION   0x0100
  212.    #define SPLINFO_WARNING       0x0200
  213.    #define SPLINFO_ERROR         0x0400
  214.    #define SPLINFO_SEVERE        0x0800
  215.    #define SPLINFO_USERINTREQD   0x1000
  216.    
  217.    /* Error Data for SplMessageBox */
  218.    #define SPLDATA_PRINTERJAM    0x0001
  219.    #define SPLDATA_FORMCHGREQD   0x0002
  220.    #define SPLDATA_CARTCHGREQD   0x0004
  221.    #define SPLDATA_PENCHGREQD    0x0008
  222.    #define SPLDATA_DATAERROR     0x0010
  223.    #define SPLDATA_UNEXPECTERROR 0x0020
  224.    #define SPLDATA_OTHER         0x8000
  225.    
  226.    /* return code for fSplStdQueryLength */
  227.    #define SSQL_ERROR (-1L)
  228.    
  229.    #ifdef INCL_SPLERRORS
  230.       #include <pmerr.h>
  231.    #endif /* INCL_SPLERRORS */
  232.    
  233.    typedef unsigned long SPLERR;
  234.    
  235.    #ifdef INCL_SPLDOSPRINT
  236.       /* length for character arrays in structs (excluding zero terminator) */
  237.       #define CNLEN           15             /* Computer name length      */
  238.       #define UNLEN           20             /* Maximum user name length  */
  239.       #define QNLEN           12             /* Queue name maximum length */
  240.       #define PDLEN            8             /* Print destination length  */
  241.       #define DTLEN            9             /* Spool file data type      */
  242.       /* e.g. PM_Q_STD,PM_Q_RAW    */
  243.       #define QP_DATATYPE_SIZE        15     /* returned by SplQpQueryDt  */
  244.       #define DRIV_DEVICENAME_SIZE    31     /* see DRIVDATA struc        */
  245.       #define DRIV_NAME_SIZE           8     /* name of device driver     */
  246.       #define PRINTERNAME_SIZE        32     /* max printer name length   */
  247.       #define FORMNAME_SIZE           31     /* max form name length      */
  248.       #define MAXCOMMENTSZ            48     /* queue comment length      */
  249.       
  250.       typedef struct _DRIVPROPS      /* dprop */
  251.       {
  252.          PSZ     pszKeyName;
  253.          ULONG   cbBuf;
  254.          PVOID   pBuf;
  255.       } DRIVPROPS;
  256.       typedef DRIVPROPS *PDRIVPROPS;
  257.       typedef DRIVPROPS *NPDRIVPROPS;
  258.       
  259.       typedef struct _PRJINFO      /* prj1 */
  260.       {
  261.          USHORT  uJobId;
  262.          CHAR    szUserName[UNLEN+1];
  263.          CHAR    pad_1;
  264.          CHAR    szNotifyName[CNLEN+1];
  265.          CHAR    szDataType[DTLEN+1];
  266.          PSZ     pszParms;
  267.          USHORT  uPosition;
  268.          USHORT  fsStatus;
  269.          PSZ     pszStatus;
  270.          ULONG   ulSubmitted;
  271.          ULONG   ulSize;
  272.          PSZ     pszComment;
  273.       } PRJINFO;
  274.       typedef PRJINFO *PPRJINFO;
  275.       typedef PRJINFO *NPPRJINFO;
  276.       
  277.       typedef struct _PRJINFO2      /* prj2 */
  278.       {
  279.          USHORT  uJobId;
  280.          USHORT  uPriority;
  281.          PSZ     pszUserName;
  282.          USHORT  uPosition;
  283.          USHORT  fsStatus;
  284.          ULONG   ulSubmitted;
  285.          ULONG   ulSize;
  286.          PSZ     pszComment;
  287.          PSZ     pszDocument;
  288.       } PRJINFO2;
  289.       typedef PRJINFO2 *PPRJINFO2;
  290.       typedef PRJINFO2 *NPPRJINFO2;
  291.       
  292.       typedef struct _PRJINFO3      /* prj */
  293.       {
  294.          USHORT  uJobId;
  295.          USHORT  uPriority;
  296.          PSZ     pszUserName;
  297.          USHORT  uPosition;
  298.          USHORT  fsStatus;
  299.          ULONG   ulSubmitted;
  300.          ULONG   ulSize;
  301.          PSZ     pszComment;
  302.          PSZ     pszDocument;
  303.          PSZ     pszNotifyName;
  304.          PSZ     pszDataType;
  305.          PSZ     pszParms;
  306.          PSZ     pszStatus;
  307.          PSZ     pszQueue;
  308.          PSZ     pszQProcName;
  309.          PSZ     pszQProcParms;
  310.          PSZ     pszDriverName;
  311.          PDRIVDATA pDriverData;
  312.          PSZ     pszPrinterName;
  313.       } PRJINFO3;
  314.       typedef PRJINFO3 *PPRJINFO3;
  315.       typedef PRJINFO3 *NPPRJINFO3;
  316.       
  317.       typedef struct _PRDINFO       /* prd1 */
  318.       {
  319.          CHAR    szName[PDLEN+1];
  320.          CHAR    szUserName[UNLEN+1];
  321.          USHORT  uJobId;
  322.          USHORT  fsStatus;
  323.          PSZ     pszStatus;
  324.          USHORT  time;
  325.       } PRDINFO;
  326.       typedef PRDINFO *PPRDINFO;
  327.       typedef PRDINFO *NPPRDINFO;
  328.       
  329.       typedef struct _PRDINFO3      /* prd */
  330.       {
  331.          PSZ     pszPrinterName;
  332.          PSZ     pszUserName;
  333.          PSZ     pszLogAddr;
  334.          USHORT  uJobId;
  335.          USHORT  fsStatus;
  336.          PSZ     pszStatus;
  337.          PSZ     pszComment;
  338.          PSZ     pszDrivers;
  339.          USHORT  time;
  340.          USHORT  usTimeOut;
  341.       } PRDINFO3;
  342.       typedef PRDINFO3 *PPRDINFO3;
  343.       typedef PRDINFO3 *NPPRDINFO3;
  344.       
  345.       typedef struct _PRQINFO      /* prq1 */
  346.       {
  347.          CHAR    szName[QNLEN+1];
  348.          CHAR    pad_1;
  349.          USHORT  uPriority;
  350.          USHORT  uStartTime;
  351.          USHORT  uUntilTime;
  352.          PSZ     pszSepFile;
  353.          PSZ     pszPrProc;
  354.          PSZ     pszDestinations;
  355.          PSZ     pszParms;
  356.          PSZ     pszComment;
  357.          USHORT  fsStatus;
  358.          USHORT  cJobs;
  359.       } PRQINFO;
  360.       typedef PRQINFO *PPRQINFO;
  361.       typedef PRQINFO *NPPRQINFO;
  362.       
  363.       typedef struct _PRQINFO3     /* prq */
  364.       {
  365.          PSZ     pszName;
  366.          USHORT  uPriority;
  367.          USHORT  uStartTime;
  368.          USHORT  uUntilTime;
  369.          USHORT  fsType;
  370.          PSZ     pszSepFile;
  371.          PSZ     pszPrProc;
  372.          PSZ     pszParms;
  373.          PSZ     pszComment;
  374.          USHORT  fsStatus;
  375.          USHORT  cJobs;
  376.          PSZ     pszPrinters;
  377.          PSZ     pszDriverName;
  378.          PDRIVDATA pDriverData;
  379.       } PRQINFO3;
  380.       typedef PRQINFO3 *PPRQINFO3;
  381.       typedef PRQINFO3 *NPPRQINFO3;
  382.       
  383.       typedef struct _PRQINFO6     /* prq6 */
  384.       {
  385.          PSZ     pszName;
  386.          USHORT  uPriority;
  387.          USHORT  uStartTime;
  388.          USHORT  uUntilTime;
  389.          USHORT  fsType;
  390.          PSZ     pszSepFile;
  391.          PSZ     pszPrProc;
  392.          PSZ     pszParms;
  393.          PSZ     pszComment;
  394.          USHORT  fsStatus;
  395.          USHORT  cJobs;
  396.          PSZ     pszPrinters;
  397.          PSZ     pszDriverName;
  398.          PDRIVDATA pDriverData;
  399.          PSZ     pszRemoteComputerName;
  400.          PSZ     pszRemoteQueueName;
  401.       } PRQINFO6;
  402.       typedef PRQINFO6 *PPRQINFO6;
  403.       typedef PRQINFO6 *NPPRQINFO6;
  404.       
  405.       /*
  406.       * structure for DosPrintJobGetId
  407.       */
  408.       typedef struct _PRIDINFO     /* prjid */
  409.       {
  410.          USHORT  uJobId;
  411.          CHAR    szComputerName[CNLEN + 1];
  412.          CHAR    szQueueName[QNLEN+1];
  413.          CHAR    pad_1;
  414.       } PRIDINFO;
  415.       typedef PRIDINFO *PPRIDINFO;
  416.       typedef PRIDINFO *NPPRIDINFO;
  417.       
  418.       /*
  419.       * structure for DosPrintDriverEnum
  420.       */
  421.       typedef struct _PRDRIVINFO    /* prdid */
  422.       {
  423.          CHAR    szDrivName[DRIV_NAME_SIZE+1+DRIV_DEVICENAME_SIZE+1];
  424.       } PRDRIVINFO;
  425.       typedef PRDRIVINFO *PPRDRIVINFO;
  426.       typedef PRDRIVINFO *NPPRDRIVINFO;
  427.       
  428.       /*
  429.       * structure for DosPrintQProcessorEnum
  430.       */
  431.       typedef struct _PRQPROCINFO    /* prqp */
  432.       {
  433.          CHAR    szQProcName[QNLEN+1];
  434.       } PRQPROCINFO;
  435.       typedef PRQPROCINFO *PPRQPROCINFO;
  436.       typedef PRQPROCINFO *NPPRQPROCINFO;
  437.       
  438.       /*
  439.       * structure for DosPrintPortEnum Level 0
  440.       */
  441.       typedef struct _PRPORTINFO    /* prpo */
  442.       {
  443.          CHAR    szPortName[PDLEN+1];
  444.       } PRPORTINFO;
  445.       typedef PRPORTINFO *PPRPORTINFO;
  446.       typedef PRPORTINFO *NPPRPORTINFO;
  447.       
  448.       /*
  449.       * structure for DosPrintPortEnum Level 1
  450.       */
  451.       typedef struct _PRPORTINFO1    /* prpo1 */
  452.       {
  453.          PSZ     pszPortName ;
  454.          PSZ     pszPortDriverName ;
  455.          PSZ     pszPortDriverPathName ;
  456.       } PRPORTINFO1;
  457.       typedef PRPORTINFO1 *PPRPORTINFO1;
  458.       typedef PRPORTINFO1 *NPPRPORTINFO1;
  459.       
  460.       
  461.       /*** Values for parmnum in DosPrintQSetInfo/SplSetQueue  *************/
  462.       #define PRQ_PRIORITY_PARMNUM            2
  463.       #define PRQ_STARTTIME_PARMNUM           3
  464.       #define PRQ_UNTILTIME_PARMNUM           4
  465.       #define PRQ_SEPARATOR_PARMNUM           5
  466.       #define PRQ_PROCESSOR_PARMNUM           6
  467.       #define PRQ_DESTINATIONS_PARMNUM        7
  468.       #define PRQ_PARMS_PARMNUM               8
  469.       #define PRQ_COMMENT_PARMNUM             9
  470.       #define PRQ_TYPE_PARMNUM               10
  471.       #define PRQ_PRINTERS_PARMNUM           12
  472.       #define PRQ_DRIVERNAME_PARMNUM         13
  473.       #define PRQ_DRIVERDATA_PARMNUM         14
  474.       #define PRQ_REMOTE_COMPUTER_PARMNUM    15
  475.       #define PRQ_REMOTE_QUEUE_PARMNUM       16
  476.       #define PRQ_MAXPARMNUM                 16
  477.       
  478.       /*** Print Queue Priority ********************************************/
  479.       #define PRQ_MAX_PRIORITY                1        /* highest priority */
  480.       #define PRQ_DEF_PRIORITY                5
  481.       #define PRQ_MIN_PRIORITY                9        /* lowest priority  */
  482.       #define PRQ_NO_PRIORITY                 0
  483.       
  484.       /*** Print queue status bitmask and values for level 1 ***************/
  485.       #define PRQ_STATUS_MASK                 3
  486.       #define PRQ_ACTIVE                      0
  487.       #define PRQ_PAUSED                      1        /* queue is held    */
  488.       #define PRQ_ERROR                       2
  489.       #define PRQ_PENDING                     3        /* pending deletion */
  490.       
  491.       /*** Print queue status bits for level 3 *****************************/
  492.       #define PRQ3_PAUSED                   0x1        /* queue is held    */
  493.       #define PRQ3_PENDING                  0x2        /* pending deletion */
  494.       
  495.       /*** Print queue type bits for level 3 *******************************/
  496.       #define PRQ3_TYPE_RAW         0x0001 /* spools printer-specific data */
  497.       #define PRQ3_TYPE_BYPASS      0x0002 /* allow print while spooling   */
  498.       #define PRQ3_TYPE_APPDEFAULT  0x0004 /* set for Application default Q*/
  499.       
  500.       /*** Values for parmnum in DosPrintJobSetInfo/SplSetJob **************/
  501.       #define PRJ_NOTIFYNAME_PARMNUM        3
  502.       #define PRJ_DATATYPE_PARMNUM          4
  503.       #define PRJ_PARMS_PARMNUM             5
  504.       #define PRJ_POSITION_PARMNUM          6
  505.       #define PRJ_JOBFILEINUSE_PARMNUM      7
  506.       #define PRJ_COMMENT_PARMNUM          11
  507.       #define PRJ_DOCUMENT_PARMNUM         12
  508.       #define PRJ_STATUSCOMMENT_PARMNUM    13
  509.       #define PRJ_PRIORITY_PARMNUM         14
  510.       #define PRJ_PROCPARMS_PARMNUM        16
  511.       #define PRJ_DRIVERDATA_PARMNUM       18
  512.       #define PRJ_MAXPARMNUM               18
  513.       
  514.       /*** Bitmap masks for status field of PRJINFO. ***********************/
  515.       /* 2-7 bits also used in device status */
  516.       #define PRJ_QSTATUS      0x0003      /* Bits 0,1  */
  517.       #define PRJ_DEVSTATUS    0x0ffc      /* 2-11 bits */
  518.       #define PRJ_COMPLETE     0x0004      /* Bit 2     */
  519.       #define PRJ_INTERV       0x0008      /* Bit 3     */
  520.       #define PRJ_ERROR        0x0010      /* Bit 4     */
  521.       #define PRJ_DESTOFFLINE  0x0020      /* Bit 5     */
  522.       #define PRJ_DESTPAUSED   0x0040      /* Bit 6     */
  523.       #define PRJ_NOTIFY       0x0080      /* Bit 7     */
  524.       #define PRJ_DESTNOPAPER  0x0100      /* Bit 8     */
  525.       #define PRJ_DESTFORMCHG  0x0200      /* BIT 9     */
  526.       #define PRJ_DESTCRTCHG   0x0400      /* BIT 10    */
  527.       #define PRJ_DESTPENCHG   0x0800      /* BIT 11    */
  528.       #define PRJ_JOBFILEINUSE 0x4000      /* Bit 14    */
  529.       #define PRJ_DELETED      0x8000      /* Bit 15    */
  530.       
  531.       /*** Values of PRJ_QSTATUS bits in fsStatus field of PRJINFO. ********/
  532.       #define PRJ_QS_QUEUED                 0
  533.       #define PRJ_QS_PAUSED                 1
  534.       #define PRJ_QS_SPOOLING               2
  535.       #define PRJ_QS_PRINTING               3
  536.       
  537.       /*** Print Job Priority **********************************************/
  538.       #define PRJ_MAX_PRIORITY             99          /* lowest priority  */
  539.       #define PRJ_MIN_PRIORITY              1          /* highest priority */
  540.       #define PRJ_NO_PRIORITY               0
  541.       
  542.       
  543.       /*** Bitmap masks for status field of PRDINFO. ***********************/
  544.       #define PRD_STATUS_MASK       0x0003      /* Bits 0,1 */
  545.       #define PRD_DEVSTATUS         0x0ffc      /* 2-11 bits */
  546.       
  547.       /*** Values of PRD_STATUS_MASK bits in fsStatus field of PRDINFO. ****/
  548.       #define PRD_ACTIVE                 0
  549.       #define PRD_PAUSED                 1
  550.       
  551.       /*** Control codes used in DosPrintDestControl/SplControlDevice ******/
  552.       #define PRD_DELETE                    0
  553.       #define PRD_PAUSE                     1
  554.       #define PRD_CONT                      2
  555.       #define PRD_RESTART                   3
  556.       
  557.       /*** Values for parmnum in DosPrintDestSetInfo/SplSetDevice **********/
  558.       #define PRD_LOGADDR_PARMNUM      3
  559.       #define PRD_COMMENT_PARMNUM      7
  560.       #define PRD_DRIVERS_PARMNUM      8
  561.       #define PRD_TIMEOUT_PARMNUM      10
  562.       
  563.       /*** structure for SplEnumPrinter ************************************/
  564.       typedef struct _PRINTERINFO     /* prtin */
  565.       {
  566.          ULONG   flType;
  567.          PSZ     pszComputerName;
  568.          PSZ     pszPrintDestinationName;
  569.          PSZ     pszDescription;
  570.          PSZ     pszLocalName;
  571.       } PRINTERINFO ;
  572.       typedef PRINTERINFO *PPRINTERINFO;
  573.       
  574.       /*** Flags for flType in  PRINTERINFO and SplEnumPrinter *************/
  575.       #define    SPL_PR_QUEUE            0x00000001 /* include queues */
  576.       #define    SPL_PR_DIRECT_DEVICE    0x00000002 /* unattached devices */
  577.       #define    SPL_PR_QUEUED_DEVICE    0x00000004 /* queued devices */
  578.       #define    SPL_PR_LOCAL_ONLY       0x00000100 /* exclude remote queues */
  579.       
  580.       
  581.    #endif  /* INCL_SPLDOSPRINT */
  582.    
  583.    /*********************************************************************/
  584.    /*                      FUNCTION PROTOTYPES                          */
  585.    /*                                                                   */
  586.    /* In the case of the DosPrintxxx, the API is presented by new name  */
  587.    /* with the old name in parenthesis.                                 */
  588.    /*********************************************************************/
  589.    
  590.    HSPL APIENTRY SplQmOpen(PSZ         pszToken,
  591.                            LONG        lCount,
  592.                            PQMOPENDATA pqmdopData);
  593.    
  594.    BOOL APIENTRY SplQmStartDoc(HSPL  hspl,
  595.                                PSZ pszDocName);
  596.    BOOL APIENTRY SplQmWrite(HSPL    hspl,
  597.                             LONG  lCount,
  598.                             PVOID pData);
  599.    
  600.    BOOL APIENTRY SplQmEndDoc(HSPL hspl);
  601.    
  602.    BOOL APIENTRY SplQmClose(HSPL hspl);
  603.    
  604.    BOOL APIENTRY SplQmAbort(HSPL hspl);
  605.    
  606.    BOOL APIENTRY SplQmAbortDoc(HSPL hspl);
  607.    
  608.    ULONG  APIENTRY SplMessageBox(PSZ   pszLogAddr,
  609.                                  ULONG fErrInfo,
  610.                                  ULONG fErrData,
  611.                                  PSZ   pszText,
  612.                                  PSZ   pszCaption,
  613.                                  ULONG idWindow,
  614.                                  ULONG fStyle);
  615.    
  616.    #ifdef INCL_SPLFSE
  617.       /*** Direct Device File System Interface **************************/
  618.       ULONG  APIENTRY PrtOpen(PSZ    pszDeviceName,
  619.                               PHFILE phDevice,
  620.                               PULONG pActionTaken,
  621.                               ULONG  cbFileSize,
  622.                               ULONG  uFileAttr,
  623.                               ULONG  openFlag,
  624.                               ULONG  openMode,
  625.                               ULONG  reserved);
  626.       
  627.       ULONG  APIENTRY PrtClose(HFILE hDevice);
  628.       
  629.       ULONG  APIENTRY PrtWrite(HFILE  hDevice,
  630.                                PVOID  pchData,
  631.                                ULONG  cbData,
  632.                                PULONG pcbWritten);
  633.       
  634.       ULONG  APIENTRY PrtDevIOCtl(PVOID pData,
  635.                                   PVOID pParms,
  636.                                   ULONG uFunction,
  637.                                   ULONG uCategory,
  638.                                   HFILE hDevice);
  639.       
  640.       VOID   APIENTRY PrtAbort(HFILE hDevice);
  641.    #endif /* include File System Emulation functions */
  642.    
  643.    BOOL APIENTRY SplStdOpen(HDC hdc);
  644.    
  645.    BOOL APIENTRY SplStdClose(HDC hdc);
  646.    
  647.    BOOL APIENTRY SplStdStart(HDC hdc);
  648.    
  649.    HSTD APIENTRY SplStdStop(HDC hdc);
  650.    
  651.    BOOL APIENTRY SplStdDelete(HSTD hMetaFile);
  652.    
  653.    BOOL APIENTRY SplStdGetBits(HSTD hMetaFile,
  654.                                LONG offData,
  655.                                LONG cbData,
  656.                                PCH  pchData);
  657.    
  658.    LONG APIENTRY SplStdQueryLength(HSTD hMetaFile);
  659.    
  660.    
  661.    /*              SplCreateDevice(DosPrintDestAdd) */
  662.    SPLERR APIENTRY SplCreateDevice(PSZ   pszComputerName,
  663.                                    ULONG ulLevel,
  664.                                    PVOID pBuf,
  665.                                    ULONG cbBuf);
  666.    
  667.    /*              SplControlDevice(DosPrintDestControl) */
  668.    SPLERR APIENTRY SplControlDevice(PSZ   pszComputerName,
  669.                                     PSZ   pszPortName,
  670.                                     ULONG ulControl);
  671.    
  672.    /*              SplDeleteDevice(DosPrintDestDel) */
  673.    SPLERR APIENTRY SplDeleteDevice(PSZ pszComputerName,
  674.                                    PSZ pszPrintDeviceName);
  675.    
  676.    
  677.    /*              SplEnumDevice(DosPrintDestEnum) */
  678.    SPLERR APIENTRY SplEnumDevice(PSZ    pszComputerName,
  679.                                  ULONG  ulLevel,
  680.                                  PVOID  pBuf,
  681.                                  ULONG  cbBuf,
  682.                                  PULONG pcReturned,
  683.                                  PULONG pcTotal,
  684.                                  PULONG pcbNeeded,
  685.                                  PVOID  pReserved);
  686.    
  687.    /*              SplQueryDevice(DosPrintDestGetInfo) */
  688.    SPLERR APIENTRY SplQueryDevice(PSZ    pszComputerName,
  689.                                   PSZ    pszPrintDeviceName,
  690.                                   ULONG  ulLevel,
  691.                                   PVOID  pBuf,
  692.                                   ULONG  cbBuf,
  693.                                   PULONG pcbNeeded);
  694.    
  695.    /*              SplSetDevice(DosPrintDestSetInfo) */
  696.    SPLERR APIENTRY SplSetDevice(PSZ   pszComputerName,
  697.                                 PSZ   pszPrintDeviceName,
  698.                                 ULONG ulLevel,
  699.                                 PVOID pBuf,
  700.                                 ULONG cbBuf,
  701.                                 ULONG ulParmNum);
  702.    
  703.    /*              SplReleaseJob(DosPrintJobContinue) */
  704.    SPLERR APIENTRY SplReleaseJob(PSZ   pszComputerName,
  705.                                  PSZ   pszQueueName,
  706.                                  ULONG ulJob);
  707.    
  708.    /*              SplDeleteJob(DosPrintJobDel) */
  709.    SPLERR APIENTRY SplDeleteJob(PSZ   pszComputerName,
  710.                                 PSZ   pszQueueName,
  711.                                 ULONG ulJob);
  712.    
  713.    /*              SplEnumJob(DosPrintJobEnum) */
  714.    SPLERR APIENTRY SplEnumJob(PSZ    pszComputerName,
  715.                               PSZ    pszQueueName,
  716.                               ULONG  ulLevel,
  717.                               PVOID  pBuf,
  718.                               ULONG  cbBuf,
  719.                               PULONG pcReturned,
  720.                               PULONG pcTotal,
  721.                               PULONG pcbNeeded,
  722.                               PVOID  pReserved);
  723.    
  724.    /*** See above for change to PRIDINFO datatype for this API. *********/
  725.    
  726.    /*              SplQueryJob(DosPrintJobGetInfo)  */
  727.    SPLERR APIENTRY SplQueryJob(PSZ    pszComputerName,
  728.                                PSZ    pszQueueName,
  729.                                ULONG  ulJob,
  730.                                ULONG  ulLevel,
  731.                                PVOID  pBuf,
  732.                                ULONG  cbBuf,
  733.                                PULONG pcbNeeded);
  734.    
  735.    /*              SplHoldJob(DosPrintJobPause)   */
  736.    SPLERR APIENTRY SplHoldJob(PSZ   pszComputerName,
  737.                               PSZ   pszQueueName,
  738.                               ULONG ulJob);
  739.    
  740.    /*              SplSetJob(DosPrintJobSetInfo)*/
  741.    SPLERR APIENTRY SplSetJob(PSZ   pszComputerName,
  742.                              PSZ   pszQueueName,
  743.                              ULONG ulJob,
  744.                              ULONG ulLevel,
  745.                              PVOID pBuf,
  746.                              ULONG cbBuf,
  747.                              ULONG ulParmNum);
  748.    
  749.    /*              SplCreateQueue(DosPrintQAdd) */
  750.    SPLERR APIENTRY SplCreateQueue(PSZ   pszComputerName,
  751.                                   ULONG ulLevel,
  752.                                   PVOID pBuf,
  753.                                   ULONG cbBuf);
  754.    
  755.    /*              SplReleaseQueue(DosPrintQContinue) */
  756.    SPLERR APIENTRY SplReleaseQueue(PSZ pszComputerName,
  757.                                    PSZ pszQueueName);
  758.    
  759.    
  760.    /*              SplDeleteQueue(DosPrintQDel) */
  761.    SPLERR APIENTRY SplDeleteQueue(PSZ pszComputerName,
  762.                                   PSZ pszQueueName);
  763.    
  764.    
  765.    /*              SplEnumQueue(DosPrintQEnum) */
  766.    SPLERR APIENTRY SplEnumQueue(PSZ    pszComputerName,
  767.                                 ULONG  ulLevel,
  768.                                 PVOID  pBuf,
  769.                                 ULONG  cbBuf,
  770.                                 PULONG pcReturned,
  771.                                 PULONG pcTotal,
  772.                                 PULONG pcbNeeded,
  773.                                 PVOID  pReserved);
  774.    
  775.    /*               SplQueryQueue(DosPrintQGetInfo) */
  776.    SPLERR APIENTRY  SplQueryQueue(PSZ    pszComputerName,
  777.                                   PSZ    pszQueueName,
  778.                                   ULONG  ulLevel,
  779.                                   PVOID  pBuf,
  780.                                   ULONG  cbBuf,
  781.                                   PULONG pcbNeeded);
  782.    
  783.    /*              SplHoldQueue(DosPrintQPause) */
  784.    SPLERR APIENTRY SplHoldQueue(PSZ pszComputerName,
  785.                                 PSZ pszQueueName);
  786.    
  787.    
  788.    /*              SplPurgeQueue(DosPrintQPurge) */
  789.    SPLERR APIENTRY SplPurgeQueue(PSZ pszComputerName,
  790.                                  PSZ pszQueueName);
  791.    
  792.    
  793.    /*               SplSetQueue(DosPrintQSetInfo) */
  794.    SPLERR APIENTRY  SplSetQueue(PSZ   pszComputerName,
  795.                                 PSZ   pszQueueName,
  796.                                 ULONG ulLevel,
  797.                                 PVOID pBuf,
  798.                                 ULONG cbBuf,
  799.                                 ULONG ulParmNum);
  800.    
  801.    /*               SplEnumDriver(DosPrintDriverEnum) */
  802.    SPLERR APIENTRY  SplEnumDriver(PSZ    pszComputerName,
  803.                                   ULONG  ulLevel,
  804.                                   PVOID  pBuf,
  805.                                   ULONG  cbBuf,
  806.                                   PULONG pcReturned,
  807.                                   PULONG pcTotal,
  808.                                   PULONG pcbNeeded,
  809.                                   PVOID  pReserved);
  810.    
  811.    /*               SplEnumPort(DosPrintPortEnum) */
  812.    SPLERR APIENTRY  SplEnumPort(PSZ    pszComputerName,
  813.                                 ULONG  ulLevel,
  814.                                 PVOID  pBuf,
  815.                                 ULONG  cbBuf,
  816.                                 PULONG pcReturned,
  817.                                 PULONG pcTotal,
  818.                                 PULONG pcbNeeded,
  819.                                 PVOID  pReserved);
  820.    
  821.    /*               SplEnumQueueProcessor(DosPrintQProcessorEnum) */
  822.    SPLERR APIENTRY  SplEnumQueueProcessor(PSZ    pszComputerName,
  823.                                           ULONG  ulLevel,
  824.                                           PVOID  pBuf,
  825.                                           ULONG  cbBuf,
  826.                                           PULONG pcReturned,
  827.                                           PULONG pcTotal,
  828.                                           PULONG pcbNeeded,
  829.                                           PVOID  pReserved);
  830.    
  831.    
  832.    SPLERR APIENTRY SplEnumPrinter(PSZ    pszComputerName,
  833.                                   ULONG  uLevel,
  834.                                   ULONG  flType,
  835.                                   PVOID  pBuf,
  836.                                   ULONG  cbbuf,
  837.                                   PULONG pcReturned,
  838.                                   PULONG pcTotal,
  839.                                   PULONG pcbNeeded,
  840.                                   PVOID  pReserved);
  841.    
  842.    SPLERR APIENTRY SplCopyJob(PSZ    pszSrcComputerName,
  843.                               PSZ    pszSrcQueueName,
  844.                               ULONG  ulSrcJob,
  845.                               PSZ    pszTrgComputerName,
  846.                               PSZ    pszTrgQueueName,
  847.                               PULONG pulTrgJob);
  848.    
  849.    
  850.    /* XLATOFF */
  851. #endif
  852. /* XLATON */
  853.  
  854. /* XLATOFF */
  855. #ifdef __IBMC__
  856.    #pragma checkout( suspend )
  857.    #ifndef __CHKHDR__
  858.       #pragma checkout( resume )
  859.    #endif
  860.    #pragma checkout( resume )
  861. #endif
  862. /* XLATON */
  863.  
  864. /**************************** end of file **********************************/
  865.