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