home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v5.zip / TOOLKT21 / C / OS2H / PMSPL.H < prev    next >
Text File  |  1993-04-22  |  34KB  |  855 lines

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