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