home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / WINSPOOL.PAS < prev    next >
Pascal/Delphi Source File  |  1997-02-28  |  53KB  |  1,186 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Run-time Library                         }
  5. {       Windows 32bit API Interface Unit                }
  6. {                                                       }
  7. {       Copyright (c) 1996 Borland International        }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit WinSpool;
  12.  
  13. interface
  14.  
  15. uses Windows;
  16.  
  17. type
  18.   PPrinterInfo1A = ^TPrinterInfo1A;
  19.   PPrinterInfo1W = ^TPrinterInfo1W;
  20.   PPrinterInfo1 = PPrinterInfo1A;
  21.   _PRINTER_INFO_1A = record
  22.     Flags: DWORD;
  23.     pDescription: PAnsiChar;
  24.     pName: PAnsiChar;
  25.     pComment: PAnsiChar;
  26.   end;
  27.   {$nonamespace _PRINTER_INFO_1A}
  28.   TPrinterInfo1A = _PRINTER_INFO_1A;
  29.   _PRINTER_INFO_1W = record
  30.     Flags: DWORD;
  31.     pDescription: PWideChar;
  32.     pName: PWideChar;
  33.     pComment: PWideChar;
  34.   end;
  35.   {$nonamespace _PRINTER_INFO_1W}
  36.   TPrinterInfo1W = _PRINTER_INFO_1W;
  37.   TPrinterInfo1 = TPrinterInfo1A;
  38.  
  39.   PPrinterInfo2A = ^TPrinterInfo2A;
  40.   PPrinterInfo2W = ^TPrinterInfo2W;
  41.   PPrinterInfo2 = PPrinterInfo2A;
  42.   _PRINTER_INFO_2A = record
  43.     pServerName: PAnsiChar;
  44.     pPrinterName: PAnsiChar;
  45.     pShareName: PAnsiChar;
  46.     pPortName: PAnsiChar;
  47.     pDriverName: PAnsiChar;
  48.     pComment: PAnsiChar;
  49.     pLocation: PAnsiChar;
  50.     pDevMode: PDeviceModeA;
  51.     pSepFile: PAnsiChar;
  52.     pPrintProcessor: PAnsiChar;
  53.     pDatatype: PAnsiChar;
  54.     pParameters: PAnsiChar;
  55.     pSecurityDescriptor: PSecurityDescriptor;
  56.     Attributes: DWORD;
  57.     Priority: DWORD;
  58.     DefaultPriority: DWORD;
  59.     StartTime: DWORD;
  60.     UntilTime: DWORD;
  61.     Status: DWORD;
  62.     cJobs: DWORD;
  63.     AveragePPM: DWORD;
  64.   end;
  65.   {$nonamespace _PRINTER_INFO_2A}
  66.   TPrinterInfo2A = _PRINTER_INFO_2A;
  67.   _PRINTER_INFO_2W = record
  68.     pServerName: PWideChar;
  69.     pPrinterName: PWideChar;
  70.     pShareName: PWideChar;
  71.     pPortName: PWideChar;
  72.     pDriverName: PWideChar;
  73.     pComment: PWideChar;
  74.     pLocation: PWideChar;
  75.     pDevMode: PDeviceModeW;
  76.     pSepFile: PWideChar;
  77.     pPrintProcessor: PWideChar;
  78.     pDatatype: PWideChar;
  79.     pParameters: PWideChar;
  80.     pSecurityDescriptor: PSecurityDescriptor;
  81.     Attributes: DWORD;
  82.     Priority: DWORD;
  83.     DefaultPriority: DWORD;
  84.     StartTime: DWORD;
  85.     UntilTime: DWORD;
  86.     Status: DWORD;
  87.     cJobs: DWORD;
  88.     AveragePPM: DWORD;
  89.   end;
  90.   {$nonamespace _PRINTER_INFO_2W}
  91.   TPrinterInfo2W = _PRINTER_INFO_2W;
  92.   TPrinterInfo2 = TPrinterInfo2A;
  93.  
  94.   PPrinterInfo3A = ^TPrinterInfo3A;
  95.   PPrinterInfo3W = ^TPrinterInfo3W;
  96.   PPrinterInfo3 = PPrinterInfo3A;
  97.   TPrinterInfo3A = record
  98.     pSecurityDescriptor: PSecurityDescriptor;
  99.   end;
  100.   TPrinterInfo3W = record
  101.     pSecurityDescriptor: PSecurityDescriptor;
  102.   end;
  103.   TPrinterInfo3 = TPrinterInfo3A;
  104.  
  105.   PPrinterInfo4A = ^TPrinterInfo4A;
  106.   PPrinterInfo4W = ^TPrinterInfo4W;
  107.   PPrinterInfo4 = PPrinterInfo4A;
  108.   _PRINTER_INFO_4A = record
  109.     pPrinterName: PAnsiChar;
  110.     pServerName: PAnsiChar;
  111.     Attributes: DWORD;
  112.   end;
  113.   {$nonamespace _PRINTER_INFO_4A}
  114.   TPrinterInfo4A = _PRINTER_INFO_4A;
  115.   _PRINTER_INFO_4W = record
  116.     pPrinterName: PWideChar;
  117.     pServerName: PWideChar;
  118.     Attributes: DWORD;
  119.   end;
  120.   {$nonamespace _PRINTER_INFO_4W}
  121.   TPrinterInfo4W = _PRINTER_INFO_4W;
  122.   TPrinterInfo4 = TPrinterInfo4A;
  123.  
  124.   PPrinterInfo5A = ^TPrinterInfo5A;
  125.   PPrinterInfo5W = ^TPrinterInfo5W;
  126.   PPrinterInfo5 = PPrinterInfo5A;
  127.   _PRINTER_INFO_5A = record
  128.     pPrinterName: PAnsiChar;
  129.     pPortName: PAnsiChar;
  130.     Attributes: DWORD;
  131.     DeviceNotSelectedTimeout: DWORD;
  132.     TransmissionRetryTimeout: DWORD;
  133.   end;
  134.   {$nonamespace _PRINTER_INFO_5A}
  135.   TPrinterInfo5A = _PRINTER_INFO_5A;
  136.   _PRINTER_INFO_5W = record
  137.     pPrinterName: PWideChar;
  138.     pPortName: PWideChar;
  139.     Attributes: DWORD;
  140.     DeviceNotSelectedTimeout: DWORD;
  141.     TransmissionRetryTimeout: DWORD;
  142.   end;
  143.   {$nonamespace _PRINTER_INFO_5W}
  144.   TPrinterInfo5W = _PRINTER_INFO_5W;
  145.   TPrinterInfo5 = TPrinterInfo5A;
  146.  
  147. const
  148.   PRINTER_CONTROL_PAUSE            = 1;
  149.   PRINTER_CONTROL_RESUME           = 2;
  150.   PRINTER_CONTROL_PURGE            = 3;
  151.   PRINTER_CONTROL_SET_STATUS       = 4;
  152.  
  153.   PRINTER_STATUS_PAUSED            = $00000001;
  154.   PRINTER_STATUS_ERROR             = $00000002;
  155.   PRINTER_STATUS_PENDING_DELETION  = $00000004;
  156.   PRINTER_STATUS_PAPER_JAM         = $00000008;
  157.   PRINTER_STATUS_PAPER_OUT         = $00000010;
  158.   PRINTER_STATUS_MANUAL_FEED       = $00000020;
  159.   PRINTER_STATUS_PAPER_PROBLEM     = $00000040;
  160.   PRINTER_STATUS_OFFLINE           = $00000080;
  161.   PRINTER_STATUS_IO_ACTIVE         = $00000100;
  162.   PRINTER_STATUS_BUSY              = $00000200;
  163.   PRINTER_STATUS_PRINTING          = $00000400;
  164.   PRINTER_STATUS_OUTPUT_BIN_FULL   = $00000800;
  165.   PRINTER_STATUS_NOT_AVAILABLE     = $00001000;
  166.   PRINTER_STATUS_WAITING           = $00002000;
  167.   PRINTER_STATUS_PROCESSING        = $00004000;
  168.   PRINTER_STATUS_INITIALIZING      = $00008000;
  169.   PRINTER_STATUS_WARMING_UP        = $00010000;
  170.   PRINTER_STATUS_TONER_LOW         = $00020000;
  171.   PRINTER_STATUS_NO_TONER          = $00040000;
  172.   PRINTER_STATUS_PAGE_PUNT         = $00080000;
  173.   PRINTER_STATUS_USER_INTERVENTION = $00100000;
  174.   PRINTER_STATUS_OUT_OF_MEMORY     = $00200000;
  175.   PRINTER_STATUS_DOOR_OPEN         = $00400000;
  176.   PRINTER_STATUS_SERVER_UNKNOWN    = $00800000;
  177.   PRINTER_STATUS_POWER_SAVE        = $01000000;
  178.  
  179.   PRINTER_ATTRIBUTE_QUEUED         = $00000001;
  180.   PRINTER_ATTRIBUTE_DIRECT         = $00000002;
  181.   PRINTER_ATTRIBUTE_DEFAULT        = $00000004;
  182.   PRINTER_ATTRIBUTE_SHARED         = $00000008;
  183.   PRINTER_ATTRIBUTE_NETWORK        = $00000010;
  184.   PRINTER_ATTRIBUTE_HIDDEN         = $00000020;
  185.   PRINTER_ATTRIBUTE_LOCAL          = $00000040;
  186.  
  187.   PRINTER_ATTRIBUTE_ENABLE_DEVQ       = $00000080;
  188.   PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS   = $00000100;
  189.   PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = $00000200;
  190.  
  191.   PRINTER_ATTRIBUTE_WORK_OFFLINE   = $00000400;
  192.   PRINTER_ATTRIBUTE_ENABLE_BIDI    = $00000800;
  193.  
  194.   NO_PRIORITY   = 0;
  195.   MAX_PRIORITY = 99;
  196.   MIN_PRIORITY  = 1;
  197.   DEF_PRIORITY  = 1;
  198.  
  199. type
  200.   PJobInfo1A = ^TJobInfo1A;
  201.   PJobInfo1W = ^TJobInfo1W;
  202.   PJobInfo1 = PJobInfo1A;
  203.   _JOB_INFO_1A = record
  204.    JobId: DWORD;
  205.    pPrinterName: PAnsiChar;
  206.    pMachineName: PAnsiChar;
  207.    pUserName: PAnsiChar;
  208.    pDocument: PAnsiChar;
  209.    pDatatype: PAnsiChar;
  210.    pStatus: PAnsiChar;
  211.    Status: DWORD;
  212.    Priority: DWORD;
  213.    Position: DWORD;
  214.    TotalPages: DWORD;
  215.    PagesPrinted: DWORD;
  216.    Submitted: TSystemTime;
  217.   end;
  218.   {$nonamespace _JOB_INFO_1A}
  219.   TJobInfo1A = _JOB_INFO_1A;
  220.   _JOB_INFO_1W = record
  221.    JobId: DWORD;
  222.    pPrinterName: PWideChar;
  223.    pMachineName: PWideChar;
  224.    pUserName: PWideChar;
  225.    pDocument: PWideChar;
  226.    pDatatype: PWideChar;
  227.    pStatus: PWideChar;
  228.    Status: DWORD;
  229.    Priority: DWORD;
  230.    Position: DWORD;
  231.    TotalPages: DWORD;
  232.    PagesPrinted: DWORD;
  233.    Submitted: TSystemTime;
  234.   end;
  235.   {$nonamespace _JOB_INFO_1W}
  236.   TJobInfo1W = _JOB_INFO_1W;
  237.   TJobInfo1 = TJobInfo1A;
  238.  
  239.   PJobInfo2A = ^TJobInfo2A;
  240.   PJobInfo2W = ^TJobInfo2W;
  241.   PJobInfo2 = PJobInfo2A;
  242.   _JOB_INFO_2A = record
  243.    JobId: DWORD;
  244.    pPrinterName: PAnsiChar;
  245.    pMachineName: PAnsiChar;
  246.    pUserName: PAnsiChar;
  247.    pDocument: PAnsiChar;
  248.    pNotifyName: PAnsiChar;
  249.    pDatatype: PAnsiChar;
  250.    pPrintProcessor: PAnsiChar;
  251.    pParameters: PAnsiChar;
  252.    pDriverName: PAnsiChar;
  253.    pDevMode: PDeviceModeA;
  254.    pStatus: PAnsiChar;
  255.    pSecurityDescriptor: PSECURITY_DESCRIPTOR;
  256.    Status: DWORD;
  257.    Priority: DWORD;
  258.    Position: DWORD;
  259.    StartTime: DWORD;
  260.    UntilTime: DWORD;
  261.    TotalPages: DWORD;
  262.    Size: DWORD;
  263.    Submitted: TSystemTime;   { Time the job was spooled }
  264.    Time: DWORD;              { How many seconds the job has been printing }
  265.    PagesPrinted: DWORD;
  266.   end;
  267.   {$nonamespace _JOB_INFO_2A}
  268.   TJobInfo2A = _JOB_INFO_2A;
  269.   _JOB_INFO_2W = record
  270.    JobId: DWORD;
  271.    pPrinterName: PWideChar;
  272.    pMachineName: PWideChar;
  273.    pUserName: PWideChar;
  274.    pDocument: PWideChar;
  275.    pNotifyName: PWideChar;
  276.    pDatatype: PWideChar;
  277.    pPrintProcessor: PWideChar;
  278.    pParameters: PWideChar;
  279.    pDriverName: PWideChar;
  280.    pDevMode: PDeviceModeW;
  281.    pStatus: PWideChar;
  282.    pSecurityDescriptor: PSECURITY_DESCRIPTOR;
  283.    Status: DWORD;
  284.    Priority: DWORD;
  285.    Position: DWORD;
  286.    StartTime: DWORD;
  287.    UntilTime: DWORD;
  288.    TotalPages: DWORD;
  289.    Size: DWORD;
  290.    Submitted: TSystemTime;   { Time the job was spooled }
  291.    Time: DWORD;              { How many seconds the job has been printing }
  292.    PagesPrinted: DWORD;
  293.   end;
  294.   {$nonamespace _JOB_INFO_2W}
  295.   TJobInfo2W = _JOB_INFO_2W;
  296.   TJobInfo2 = TJobInfo2A;
  297.  
  298. const
  299.   JOB_CONTROL_PAUSE              = 1;
  300.   JOB_CONTROL_RESUME             = 2;
  301.   JOB_CONTROL_CANCEL             = 3;
  302.   JOB_CONTROL_RESTART            = 4;
  303.   JOB_CONTROL_DELETE             = 5;
  304.  
  305.   JOB_STATUS_PAUSED       = $00000001;
  306.   JOB_STATUS_ERROR        = $00000002;
  307.   JOB_STATUS_DELETING     = $00000004;
  308.   JOB_STATUS_SPOOLING     = $00000008;
  309.   JOB_STATUS_PRINTING     = $00000010;
  310.   JOB_STATUS_OFFLINE      = $00000020;
  311.   JOB_STATUS_PAPEROUT     = $00000040;
  312.   JOB_STATUS_PRINTED      = $00000080;
  313.   JOB_STATUS_DELETED      = $00000100;
  314.   JOB_STATUS_BLOCKED_DEVQ = $00000200;
  315.   JOB_STATUS_USER_INTERVENTION   = $00000400;
  316.  
  317.   JOB_POSITION_UNSPECIFIED       = 0;
  318.  
  319. type
  320.   PAddJobInfo1A = ^TAddJobInfo1A;
  321.   PAddJobInfo1W = ^TAddJobInfo1W;
  322.   PAddJobInfo1 = PAddJobInfo1A;
  323.   _ADDJOB_INFO_1A = record
  324.     Path: PAnsiChar;
  325.     JobId: DWORD;
  326.   end;
  327.   {$nonamespace _ADDJOB_INFO_1A}
  328.   TAddJobInfo1A = _ADDJOB_INFO_1A;
  329.   _ADDJOB_INFO_1W = record
  330.     Path: PWideChar;
  331.     JobId: DWORD;
  332.   end;
  333.   {$nonamespace _ADDJOB_INFO_1W}
  334.   TAddJobInfo1W = _ADDJOB_INFO_1W;
  335.   TAddJobInfo1 = TAddJobInfo1A;
  336.  
  337.   PDriverInfo1A = ^TDriverInfo1A;
  338.   PDriverInfo1W = ^TDriverInfo1W;
  339.   PDriverInfo1 = PDriverInfo1A;
  340.   _DRIVER_INFO_1A = record
  341.     pName: PAnsiChar;              { QMS 810 }
  342.   end;
  343.   {$nonamespace _DRIVER_INFO_1A}
  344.   TDriverInfo1A = _DRIVER_INFO_1A;
  345.   _DRIVER_INFO_1W = record
  346.     pName: PWideChar;              { QMS 810 }
  347.   end;
  348.   {$nonamespace _DRIVER_INFO_1W}
  349.   TDriverInfo1W = _DRIVER_INFO_1W;
  350.   TDriverInfo1 = TDriverInfo1A;
  351.  
  352.   PDriverInfo2A = ^TDriverInfo2A;
  353.   PDriverInfo2W = ^TDriverInfo2W;
  354.   PDriverInfo2 = PDriverInfo2A;
  355.   _DRIVER_INFO_2A = record
  356.     cVersion: DWORD;
  357.     pName: PAnsiChar;              { QMS 810 }
  358.     pEnvironment: PAnsiChar;       { Win32 x86 }
  359.     pDriverPath: PAnsiChar;        { c:\drivers\pscript.dll }
  360.     pDataFile: PAnsiChar;          { c:\drivers\QMS810.PPD }
  361.     pConfigFile: PAnsiChar;        { c:\drivers\PSCRPTUI.DLL }
  362.   end;
  363.   {$nonamespace _DRIVER_INFO_2A}
  364.   TDriverInfo2A = _DRIVER_INFO_2A;
  365.   _DRIVER_INFO_2W = record
  366.     cVersion: DWORD;
  367.     pName: PWideChar;              { QMS 810 }
  368.     pEnvironment: PWideChar;       { Win32 x86 }
  369.     pDriverPath: PWideChar;        { c:\drivers\pscript.dll }
  370.     pDataFile: PWideChar;          { c:\drivers\QMS810.PPD }
  371.     pConfigFile: PWideChar;        { c:\drivers\PSCRPTUI.DLL }
  372.   end;
  373.   {$nonamespace _DRIVER_INFO_2W}
  374.   TDriverInfo2W = _DRIVER_INFO_2W;
  375.   TDriverInfo2 = TDriverInfo2A;
  376.  
  377.   PDriverInfo3A = ^TDriverInfo3A;
  378.   PDriverInfo3W = ^TDriverInfo3W;
  379.   PDriverInfo3 = PDriverInfo3A;
  380.   _DRIVER_INFO_3A = record
  381.     cVersion: DWORD;
  382.     pName: PAnsiChar;                    { QMS 810 }
  383.     pEnvironment: PAnsiChar;             { Win32 x86 }
  384.     pDriverPath: PAnsiChar;              { c:\drivers\pscript.dll }
  385.     pDataFile: PAnsiChar;                { c:\drivers\QMS810.PPD }
  386.     pConfigFile: PAnsiChar;              { c:\drivers\PSCRPTUI.DLL }
  387.     pHelpFile: PAnsiChar;                { c:\drivers\PSCRPTUI.HLP }
  388.     pDependentFiles: PAnsiChar;          { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
  389.     pMonitorName: PAnsiChar;             { "PJL monitor" }
  390.     pDefaultDataType: PAnsiChar;         { "EMF" }
  391.   end;
  392.   {$nonamespace _DRIVER_INFO_3A}
  393.   TDriverInfo3A = _DRIVER_INFO_3A;
  394.   _DRIVER_INFO_3W = record
  395.     cVersion: DWORD;
  396.     pName: PWideChar;                    { QMS 810 }
  397.     pEnvironment: PWideChar;             { Win32 x86 }
  398.     pDriverPath: PWideChar;              { c:\drivers\pscript.dll }
  399.     pDataFile: PWideChar;                { c:\drivers\QMS810.PPD }
  400.     pConfigFile: PWideChar;              { c:\drivers\PSCRPTUI.DLL }
  401.     pHelpFile: PWideChar;                { c:\drivers\PSCRPTUI.HLP }
  402.     pDependentFiles: PWideChar;          { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
  403.     pMonitorName: PWideChar;             { "PJL monitor" }
  404.     pDefaultDataType: PWideChar;         { "EMF" }
  405.   end;
  406.   {$nonamespace _DRIVER_INFO_3W}
  407.   TDriverInfo3W = _DRIVER_INFO_3W;
  408.   TDriverInfo3 = TDriverInfo3A;
  409.  
  410.   PDocInfo1A = ^TDocInfo1A;
  411.   PDocInfo1W = ^TDocInfo1W;
  412.   PDocInfo1 = PDocInfo1A;
  413.   _DOC_INFO_1A = record
  414.     pDocName: PAnsiChar;
  415.     pOutputFile: PAnsiChar;
  416.     pDatatype: PAnsiChar;
  417.   end;
  418.   {$nonamespace _DOC_INFO_1A}
  419.   TDocInfo1A = _DOC_INFO_1A;
  420.   _DOC_INFO_1W = record
  421.     pDocName: PWideChar;
  422.     pOutputFile: PWideChar;
  423.     pDatatype: PWideChar;
  424.   end;
  425.   {$nonamespace _DOC_INFO_1W}
  426.   TDocInfo1W = _DOC_INFO_1W;
  427.   TDocInfo1 = TDocInfo1A;
  428.  
  429.   PFormInfo1A = ^TFormInfo1A;
  430.   PFormInfo1W = ^TFormInfo1W;
  431.   PFormInfo1 = PFormInfo1A;
  432.   _FORM_INFO_1A = record
  433.     Flags: DWORD;
  434.     pName: PAnsiChar;
  435.     Size: TSize;
  436.     ImageableArea: TRect;
  437.   end;
  438.   {$nonamespace _FORM_INFO_1A}
  439.   TFormInfo1A = _FORM_INFO_1A;
  440.   _FORM_INFO_1W = record
  441.     Flags: DWORD;
  442.     pName: PWideChar;
  443.     Size: TSize;
  444.     ImageableArea: TRect;
  445.   end;
  446.   {$nonamespace _FORM_INFO_1W}
  447.   TFormInfo1W = _FORM_INFO_1W;
  448.   TFormInfo1 = TFormInfo1A;
  449.  
  450.   PDocInfo2A = ^TDocInfo2A;
  451.   PDocInfo2W = ^TDocInfo2W;
  452.   PDocInfo2 = PDocInfo2A;
  453.   _DOC_INFO_2A = record
  454.     pDocName: PAnsiChar;
  455.     pOutputFile: PAnsiChar;
  456.     pDatatype: PAnsiChar;
  457.     dwMode: DWORD;
  458.     JobId: DWORD;
  459.   end;
  460.   {$nonamespace _DOC_INFO_2A}
  461.   TDocInfo2A = _DOC_INFO_2A;
  462.   _DOC_INFO_2W = record
  463.     pDocName: PWideChar;
  464.     pOutputFile: PWideChar;
  465.     pDatatype: PWideChar;
  466.     dwMode: DWORD;
  467.     JobId: DWORD;
  468.   end;
  469.   {$nonamespace _DOC_INFO_2W}
  470.   TDocInfo2W = _DOC_INFO_2W;
  471.   TDocInfo2 = TDocInfo2A;
  472.  
  473. const
  474.   DI_CHANNEL              = 1;    { start direct read/write channel, }
  475.   DI_CHANNEL_WRITE        = 2;    { Direct write only - background read thread ok }
  476.   DI_READ_SPOOL_JOB       = 3;
  477.  
  478.   FORM_BUILTIN    = $00000001;
  479.  
  480. type
  481.   PPrintProcessorInfo1A = ^TPrintProcessorInfo1A;
  482.   PPrintProcessorInfo1W = ^TPrintProcessorInfo1W;
  483.   PPrintProcessorInfo1 = PPrintProcessorInfo1A;
  484.   _PRINTPROCESSOR_INFO_1A = record
  485.     pName: PAnsiChar;
  486.   end;
  487.   {$nonamespace _PRINTPROCESSOR_INFO_1A}
  488.   TPrintProcessorInfo1A = _PRINTPROCESSOR_INFO_1A;
  489.   _PRINTPROCESSOR_INFO_1W = record
  490.     pName: PWideChar;
  491.   end;
  492.   {$nonamespace _PRINTPROCESSOR_INFO_1W}
  493.   TPrintProcessorInfo1W = _PRINTPROCESSOR_INFO_1W;
  494.   TPrintProcessorInfo1 = TPrintProcessorInfo1A;
  495.  
  496.   PPortInfo1A = ^TPortInfo1A;
  497.   PPortInfo1W = ^TPortInfo1W;
  498.   PPortInfo1 = PPortInfo1A;
  499.   _PORT_INFO_1A = record
  500.     pName: PAnsiChar;
  501.   end;
  502.   {$nonamespace _PORT_INFO_1A}
  503.   TPortInfo1A = _PORT_INFO_1A;
  504.   _PORT_INFO_1W = record
  505.     pName: PWideChar;
  506.   end;
  507.   {$nonamespace _PORT_INFO_1W}
  508.   TPortInfo1W = _PORT_INFO_1W;
  509.   TPortInfo1 = TPortInfo1A;
  510.  
  511.   PPortInfo2A = ^TPortInfo2A;
  512.   PPortInfo2W = ^TPortInfo2W;
  513.   PPortInfo2 = PPortInfo2A;
  514.   _PORT_INFO_2A = record
  515.     pPortName: PAnsiChar;
  516.     pMonitorName: PAnsiChar;
  517.     pDescription: PAnsiChar;
  518.     fPortType: DWORD;
  519.     Reserved: DWORD;
  520.   end;
  521.   {$nonamespace _PORT_INFO_2A}
  522.   TPortInfo2A = _PORT_INFO_2A;
  523.   _PORT_INFO_2W = record
  524.     pPortName: PWideChar;
  525.     pMonitorName: PWideChar;
  526.     pDescription: PWideChar;
  527.     fPortType: DWORD;
  528.     Reserved: DWORD;
  529.   end;
  530.   {$nonamespace _PORT_INFO_2W}
  531.   TPortInfo2W = _PORT_INFO_2W;
  532.   TPortInfo2 = TPortInfo2A;
  533.  
  534. const
  535.   PORT_TYPE_WRITE         = $0001;
  536.   PORT_TYPE_READ          = $0002;
  537.   PORT_TYPE_REDIRECTED    = $0004;
  538.   PORT_TYPE_NET_ATTACHED  = $0008;
  539.  
  540. type
  541.   PMonitorInfo1A = ^TMonitorInfo1A;
  542.   PMonitorInfo1W = ^TMonitorInfo1W;
  543.   PMonitorInfo1 = PMonitorInfo1A;
  544.   _MONITOR_INFO_1A = record
  545.     pName: PAnsiChar;
  546.   end;
  547.   {$nonamespace _MONITOR_INFO_1A}
  548.   TMonitorInfo1A = _MONITOR_INFO_1A;
  549.   _MONITOR_INFO_1W = record
  550.     pName: PWideChar;
  551.   end;
  552.   {$nonamespace _MONITOR_INFO_1W}
  553.   TMonitorInfo1W = _MONITOR_INFO_1W;
  554.   TMonitorInfo1 = TMonitorInfo1A;
  555.  
  556.   PMonitorInfo2A = ^TMonitorInfo2A;
  557.   PMonitorInfo2W = ^TMonitorInfo2W;
  558.   PMonitorInfo2 = PMonitorInfo2A;
  559.   _MONITOR_INFO_2A = record
  560.     pName: PAnsiChar;
  561.     pEnvironment: PAnsiChar;
  562.     pDLLName: PAnsiChar;
  563.   end;
  564.   {$nonamespace _MONITOR_INFO_2A}
  565.   TMonitorInfo2A = _MONITOR_INFO_2A;
  566.   _MONITOR_INFO_2W = record
  567.     pName: PWideChar;
  568.     pEnvironment: PWideChar;
  569.     pDLLName: PWideChar;
  570.   end;
  571.   {$nonamespace _MONITOR_INFO_2W}
  572.   TMonitorInfo2W = _MONITOR_INFO_2W;
  573.   TMonitorInfo2 = TMonitorInfo2A;
  574.  
  575.   PDatatypesInfo1A = ^TDatatypesInfo1A;
  576.   PDatatypesInfo1W = ^TDatatypesInfo1W;
  577.   PDatatypesInfo1 = PDatatypesInfo1A;
  578.   _DATATYPES_INFO_1A = record
  579.     pName: PAnsiChar;
  580.   end;
  581.   {$nonamespace _DATATYPES_INFO_1A}
  582.   TDatatypesInfo1A = _DATATYPES_INFO_1A;
  583.   _DATATYPES_INFO_1W = record
  584.     pName: PWideChar;
  585.   end;
  586.   {$nonamespace _DATATYPES_INFO_1W}
  587.   TDatatypesInfo1W = _DATATYPES_INFO_1W;
  588.   TDatatypesInfo1 = TDatatypesInfo1A;
  589.  
  590.   PPrinterDefaultsA = ^TPrinterDefaultsA;
  591.   PPrinterDefaultsW = ^TPrinterDefaultsW;
  592.   PPrinterDefaults = PPrinterDefaultsA;
  593.   _PRINTER_DEFAULTSA = record
  594.     pDatatype: PAnsiChar;
  595.     pDevMode: PDeviceModeA;
  596.     DesiredAccess: ACCESS_MASK;
  597.   end;
  598.   {$nonamespace _PRINTER_DEFAULTSA}
  599.   TPrinterDefaultsA = _PRINTER_DEFAULTSA;
  600.   _PRINTER_DEFAULTSW = record
  601.     pDatatype: PWideChar;
  602.     pDevMode: PDeviceModeW;
  603.     DesiredAccess: ACCESS_MASK;
  604.   end;
  605.   {$nonamespace _PRINTER_DEFAULTSW}
  606.   TPrinterDefaultsW = _PRINTER_DEFAULTSW;
  607.   TPrinterDefaults = TPrinterDefaultsA;
  608.  
  609. function EnumPrintersA(Flags: DWORD; Name: PAnsiChar; Level: DWORD;
  610.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  611. function EnumPrintersW(Flags: DWORD; Name: PWideChar; Level: DWORD;
  612.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  613. function EnumPrinters(Flags: DWORD; Name: PChar; Level: DWORD;
  614.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  615.  
  616. const
  617.   PRINTER_ENUM_DEFAULT     = $00000001;
  618.   PRINTER_ENUM_LOCAL       = $00000002;
  619.   PRINTER_ENUM_CONNECTIONS = $00000004;
  620.   PRINTER_ENUM_FAVORITE    = $00000004;
  621.   PRINTER_ENUM_NAME        = $00000008;
  622.   PRINTER_ENUM_REMOTE      = $00000010;
  623.   PRINTER_ENUM_SHARED      = $00000020;
  624.   PRINTER_ENUM_NETWORK     = $00000040;
  625.  
  626.   PRINTER_ENUM_EXPAND      = $00004000;
  627.   PRINTER_ENUM_CONTAINER   = $00008000;
  628.  
  629.   PRINTER_ENUM_ICONMASK    = $00ff0000;
  630.   PRINTER_ENUM_ICON1       = $00010000;
  631.   PRINTER_ENUM_ICON2       = $00020000;
  632.   PRINTER_ENUM_ICON3       = $00040000;
  633.   PRINTER_ENUM_ICON4       = $00080000;
  634.   PRINTER_ENUM_ICON5       = $00100000;
  635.   PRINTER_ENUM_ICON6       = $00200000;
  636.   PRINTER_ENUM_ICON7       = $00400000;
  637.   PRINTER_ENUM_ICON8       = $00800000;
  638.  
  639. function OpenPrinterA(pPrinterName: PAnsiChar; var phPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
  640. function OpenPrinterW(pPrinterName: PWideChar; var phPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
  641. function OpenPrinter(pPrinterName: PChar; var phPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
  642. function ResetPrinterA(hPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
  643. function ResetPrinterW(hPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
  644. function ResetPrinter(hPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
  645. function SetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  646. function SetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  647. function SetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  648. function GetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  649. function GetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  650. function GetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  651. function EnumJobsA(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  652.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  653. function EnumJobsW(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  654.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  655. function EnumJobs(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  656.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  657. function AddPrinterA(pName: PAnsiChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  658. function AddPrinterW(pName: PWideChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  659. function AddPrinter(pName: PChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  660. function DeletePrinter(hPrinter: THandle): BOOL; stdcall;
  661. function SetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  662. function SetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  663. function SetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  664. function GetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  665. function GetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  666. function GetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  667. function AddPrinterDriverA(pName: PAnsiChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  668. function AddPrinterDriverW(pName: PWideChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  669. function AddPrinterDriver(pName: PChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  670. function EnumPrinterDriversA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  671.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  672. function EnumPrinterDriversW(pName, pEnvironment: PWideChar; Level: DWORD;
  673.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  674. function EnumPrinterDrivers(pName, pEnvironment: PChar; Level: DWORD;
  675.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  676. function GetPrinterDriverA(hPrinter: THandle; pEnvironment: PAnsiChar; Level: DWORD;
  677.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  678. function GetPrinterDriverW(hPrinter: THandle; pEnvironment: PWideChar; Level: DWORD;
  679.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  680. function GetPrinterDriver(hPrinter: THandle; pEnvironment: PChar; Level: DWORD;
  681.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  682. function GetPrinterDriverDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  683.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  684. function GetPrinterDriverDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
  685.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  686. function GetPrinterDriverDirectory(pName, pEnvironment: PChar; Level: DWORD;
  687.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  688. function DeletePrinterDriverA(pName, pEnvironment, pDriverName: PAnsiChar): BOOL; stdcall;
  689. function DeletePrinterDriverW(pName, pEnvironment, pDriverName: PWideChar): BOOL; stdcall;
  690. function DeletePrinterDriver(pName, pEnvironment, pDriverName: PChar): BOOL; stdcall;
  691. function AddPrintProcessorA(pName, pEnvironment, pPathName, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
  692. function AddPrintProcessorW(pName, pEnvironment, pPathName, pPrintProcessorName: PWideChar): BOOL; stdcall;
  693. function AddPrintProcessor(pName, pEnvironment, pPathName, pPrintProcessorName: PChar): BOOL; stdcall;
  694. function EnumPrintProcessorsA(pName, pEnvironment: PAnsiChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  695.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  696. function EnumPrintProcessorsW(pName, pEnvironment: PWideChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  697.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  698. function EnumPrintProcessors(pName, pEnvironment: PChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  699.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  700. function GetPrintProcessorDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  701.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  702. function GetPrintProcessorDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
  703.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  704. function GetPrintProcessorDirectory(pName, pEnvironment: PChar; Level: DWORD;
  705.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  706. function EnumPrintProcessorDatatypesA(pName, pPrintProcessorName: PAnsiChar; Level: DWORD;
  707.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  708. function EnumPrintProcessorDatatypesW(pName, pPrintProcessorName: PWideChar; Level: DWORD;
  709.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  710. function EnumPrintProcessorDatatypes(pName, pPrintProcessorName: PChar; Level: DWORD;
  711.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  712. function DeletePrintProcessorA(pName, pEnvironment, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
  713. function DeletePrintProcessorW(pName, pEnvironment, pPrintProcessorName: PWideChar): BOOL; stdcall;
  714. function DeletePrintProcessor(pName, pEnvironment, pPrintProcessorName: PChar): BOOL; stdcall;
  715. function StartDocPrinterA(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  716. function StartDocPrinterW(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  717. function StartDocPrinter(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  718. function StartPagePrinter(hPrinter: THandle): BOOL; stdcall;
  719. function WritePrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pcWritten: DWORD): BOOL; stdcall;
  720. function EndPagePrinter(hPrinter: THandle): BOOL; stdcall;
  721. function AbortPrinter(hPrinter: THandle): BOOL; stdcall;
  722. function ReadPrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pNoBytesRead: DWORD): BOOL; stdcall;
  723. function EndDocPrinter(hPrinter: THandle): BOOL; stdcall;
  724. function AddJobA(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  725. function AddJobW(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  726. function AddJob(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  727. function ScheduleJob(hPrinter: THandle; JobId: DWORD): BOOL; stdcall;
  728. function PrinterProperties(hWnd: HWND; hPrinter: THandle): BOOL; stdcall;
  729. function DocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
  730.   const pDevModeOutput: TDeviceModeA; var pDevModeInput: TDeviceModeA; 
  731.   fMode: DWORD): Longint; stdcall;
  732. function DocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
  733.   const pDevModeOutput: TDeviceModeW; var pDevModeInput: TDeviceModeW; 
  734.   fMode: DWORD): Longint; stdcall;
  735. function DocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
  736.   const pDevModeOutput: TDeviceMode; var pDevModeInput: TDeviceMode; 
  737.   fMode: DWORD): Longint; stdcall;
  738. function AdvancedDocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
  739.   pDevModeOutput, pDevModeInput: PDeviceModeA): Longint; stdcall;
  740. function AdvancedDocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
  741.   pDevModeOutput, pDevModeInput: PDeviceModeW): Longint; stdcall;
  742. function AdvancedDocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
  743.   pDevModeOutput, pDevModeInput: PDeviceMode): Longint; stdcall;
  744. function GetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; pType: PDWORD; pData: Pointer;
  745.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  746. function GetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; pType: PDWORD; pData: Pointer;
  747.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  748. function GetPrinterData(hPrinter: THandle; pValueName: PChar; pType: PDWORD; pData: Pointer;
  749.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  750. function SetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  751. function SetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  752. function SetPrinterData(hPrinter: THandle; pValueName: PChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  753.  
  754. const
  755.   PRINTER_NOTIFY_TYPE = $00;
  756.   JOB_NOTIFY_TYPE     = $01;
  757.  
  758.   PRINTER_NOTIFY_FIELD_SERVER_NAME             = $00;
  759.   PRINTER_NOTIFY_FIELD_PRINTER_NAME            = $01;
  760.   PRINTER_NOTIFY_FIELD_SHARE_NAME              = $02;
  761.   PRINTER_NOTIFY_FIELD_PORT_NAME               = $03;
  762.   PRINTER_NOTIFY_FIELD_DRIVER_NAME             = $04;
  763.   PRINTER_NOTIFY_FIELD_COMMENT                 = $05;
  764.   PRINTER_NOTIFY_FIELD_LOCATION                = $06;
  765.   PRINTER_NOTIFY_FIELD_DEVMODE                 = $07;
  766.   PRINTER_NOTIFY_FIELD_SEPFILE                 = $08;
  767.   PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR         = $09;
  768.   PRINTER_NOTIFY_FIELD_PARAMETERS              = $0A;
  769.   PRINTER_NOTIFY_FIELD_DATATYPE                = $0B;
  770.   PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR     = $0C;
  771.   PRINTER_NOTIFY_FIELD_ATTRIBUTES              = $0D;
  772.   PRINTER_NOTIFY_FIELD_PRIORITY                = $0E;
  773.   PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY        = $0F;
  774.   PRINTER_NOTIFY_FIELD_START_TIME              = $10;
  775.   PRINTER_NOTIFY_FIELD_UNTIL_TIME              = $11;
  776.   PRINTER_NOTIFY_FIELD_STATUS                  = $12;
  777.   PRINTER_NOTIFY_FIELD_STATUS_STRING           = $13;
  778.   PRINTER_NOTIFY_FIELD_CJOBS                   = $14;
  779.   PRINTER_NOTIFY_FIELD_AVERAGE_PPM             = $15;
  780.   PRINTER_NOTIFY_FIELD_TOTAL_PAGES             = $16;
  781.   PRINTER_NOTIFY_FIELD_PAGES_PRINTED           = $17;
  782.   PRINTER_NOTIFY_FIELD_TOTAL_BYTES             = $18;
  783.   PRINTER_NOTIFY_FIELD_BYTES_PRINTED           = $19;
  784.  
  785.   JOB_NOTIFY_FIELD_PRINTER_NAME                = $00;
  786.   JOB_NOTIFY_FIELD_MACHINE_NAME                = $01;
  787.   JOB_NOTIFY_FIELD_PORT_NAME                   = $02;
  788.   JOB_NOTIFY_FIELD_USER_NAME                   = $03;
  789.   JOB_NOTIFY_FIELD_NOTIFY_NAME                 = $04;
  790.   JOB_NOTIFY_FIELD_DATATYPE                    = $05;
  791.   JOB_NOTIFY_FIELD_PRINT_PROCESSOR             = $06;
  792.   JOB_NOTIFY_FIELD_PARAMETERS                  = $07;
  793.   JOB_NOTIFY_FIELD_DRIVER_NAME                 = $08;
  794.   JOB_NOTIFY_FIELD_DEVMODE                     = $09;
  795.   JOB_NOTIFY_FIELD_STATUS                      = $0A;
  796.   JOB_NOTIFY_FIELD_STATUS_STRING               = $0B;
  797.   JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR         = $0C;
  798.   JOB_NOTIFY_FIELD_DOCUMENT                    = $0D;
  799.   JOB_NOTIFY_FIELD_PRIORITY                    = $0E;
  800.   JOB_NOTIFY_FIELD_POSITION                    = $0F;
  801.   JOB_NOTIFY_FIELD_SUBMITTED                   = $10;
  802.   JOB_NOTIFY_FIELD_START_TIME                  = $11;
  803.   JOB_NOTIFY_FIELD_UNTIL_TIME                  = $12;
  804.   JOB_NOTIFY_FIELD_TIME                        = $13;
  805.   JOB_NOTIFY_FIELD_TOTAL_PAGES                 = $14;
  806.   JOB_NOTIFY_FIELD_PAGES_PRINTED               = $15;
  807.   JOB_NOTIFY_FIELD_TOTAL_BYTES                 = $16;
  808.   JOB_NOTIFY_FIELD_BYTES_PRINTED               = $17;
  809.  
  810. type
  811.   PPrinterNotifyOptionsType = ^TPrinterNotifyOptionsType;
  812.   _PRINTER_NOTIFY_OPTIONS_TYPE = record
  813.     wType: Word;
  814.     Reserved0: Word;
  815.     Reserved1: DWORD;
  816.     Reserved2: DWORD;
  817.     Count: DWORD;
  818.     pFields: PWord;
  819.   end;
  820.   {$nonamespace _PRINTER_NOTIFY_OPTIONS_TYPE}
  821.   TPrinterNotifyOptionsType = _PRINTER_NOTIFY_OPTIONS_TYPE;
  822.  
  823. const
  824.   PRINTER_NOTIFY_OPTIONS_REFRESH  = $01;
  825.  
  826. type
  827.   PPrinterNotifyOptions = ^TPrinterNotifyOptions;
  828.   _PRINTER_NOTIFY_OPTIONS = record
  829.     Version: DWORD;
  830.     Flags: DWORD;
  831.     Count: DWORD;
  832.     pTypes: PPrinterNotifyOptionsType;
  833.   end;
  834.   {$nonamespace _PRINTER_NOTIFY_OPTIONS}
  835.   TPrinterNotifyOptions = _PRINTER_NOTIFY_OPTIONS;
  836.  
  837. const
  838.   PRINTER_NOTIFY_INFO_DISCARDED       = $01;
  839.  
  840. type
  841.   PPrinterNotifyInfoData = ^TPrinterNotifyInfoData;
  842.   _PRINTER_NOTIFY_INFO_DATA = record
  843.     wType: Word;
  844.     Field: Word;
  845.     Reserved: DWORD;
  846.     Id: DWORD;
  847.     NotifyData: record
  848.       case Integer of
  849.         0: (adwData: array[0..1] of DWORD);
  850.         1: (Data: record 
  851.               cbBuf: DWORD; 
  852.               pBuf: Pointer; 
  853.             end);
  854.     end;
  855.   end;
  856.   {$nonamespace _PRINTER_NOTIFY_INFO_DATA}
  857.   TPrinterNotifyInfoData = _PRINTER_NOTIFY_INFO_DATA;
  858.  
  859.   PPrinterNotifyInfo = ^TPrinterNotifyInfo;
  860.   _PRINTER_NOTIFY_INFO = record
  861.     Version: DWORD;
  862.     Flags: DWORD;
  863.     Count: DWORD;
  864.     aData: array[0..0] of TPrinterNotifyInfoData;
  865.   end;
  866.   {$nonamespace _PRINTER_NOTIFY_INFO}
  867.   TPrinterNotifyInfo = _PRINTER_NOTIFY_INFO;
  868.  
  869. function WaitForPrinterChange(hPrinter: THandle; Flags: DWORD): DWORD; stdcall;
  870. function FindFirstPrinterChangeNotification(hPrinter: THandle; fdwFlags: DWORD;
  871.   fdwOptions: DWORD; pPrinterNotifyOptions: Pointer): THandle; stdcall;
  872. function FindNextPrinterChangeNotification(hChange: THandle; var pdwChange: DWORD;
  873.   pvReserved: Pointer; var ppPrinterNotifyInfo: Pointer): BOOL; stdcall;
  874. function FreePrinterNotifyInfo(pPrinterNotifyInfo: PPrinterNotifyInfo): BOOL; stdcall;
  875. function FindClosePrinterChangeNotification(hChange: THandle): BOOL; stdcall;
  876.  
  877. const
  878.   PRINTER_CHANGE_ADD_PRINTER              = $00000001;
  879.   PRINTER_CHANGE_SET_PRINTER              = $00000002;
  880.   PRINTER_CHANGE_DELETE_PRINTER           = $00000004;
  881.   PRINTER_CHANGE_FAILED_CONNECTION_PRINTER    = $00000008;
  882.   PRINTER_CHANGE_PRINTER                  = $000000FF;
  883.   PRINTER_CHANGE_ADD_JOB                  = $00000100;
  884.   PRINTER_CHANGE_SET_JOB                  = $00000200;
  885.   PRINTER_CHANGE_DELETE_JOB               = $00000400;
  886.   PRINTER_CHANGE_WRITE_JOB                = $00000800;
  887.   PRINTER_CHANGE_JOB                      = $0000FF00;
  888.   PRINTER_CHANGE_ADD_FORM                 = $00010000;
  889.   PRINTER_CHANGE_SET_FORM                 = $00020000;
  890.   PRINTER_CHANGE_DELETE_FORM              = $00040000;
  891.   PRINTER_CHANGE_FORM                     = $00070000;
  892.   PRINTER_CHANGE_ADD_PORT                 = $00100000;
  893.   PRINTER_CHANGE_CONFIGURE_PORT           = $00200000;
  894.   PRINTER_CHANGE_DELETE_PORT              = $00400000;
  895.   PRINTER_CHANGE_PORT                     = $00700000;
  896.   PRINTER_CHANGE_ADD_PRINT_PROCESSOR      = $01000000;
  897.   PRINTER_CHANGE_DELETE_PRINT_PROCESSOR   = $04000000;
  898.   PRINTER_CHANGE_PRINT_PROCESSOR          = $07000000;
  899.   PRINTER_CHANGE_ADD_PRINTER_DRIVER       = $10000000;
  900.   PRINTER_CHANGE_SET_PRINTER_DRIVER       = $20000000;
  901.   PRINTER_CHANGE_DELETE_PRINTER_DRIVER    = $40000000;
  902.   PRINTER_CHANGE_PRINTER_DRIVER           = $70000000;
  903.   PRINTER_CHANGE_TIMEOUT                  = $80000000;
  904.   PRINTER_CHANGE_ALL                      = $7777FFFF;
  905.  
  906. function PrinterMessageBoxA(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PAnsiChar;
  907.   dwType: DWORD): DWORD; stdcall;
  908. function PrinterMessageBoxW(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PWideChar;
  909.   dwType: DWORD): DWORD; stdcall;
  910. function PrinterMessageBox(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PChar;
  911.   dwType: DWORD): DWORD; stdcall;
  912.  
  913. const
  914.   PRINTER_ERROR_INFORMATION   = $80000000;
  915.   PRINTER_ERROR_WARNING       = $40000000;
  916.   PRINTER_ERROR_SEVERE        = $20000000;
  917.  
  918.   PRINTER_ERROR_OUTOFPAPER    = $00000001;
  919.   PRINTER_ERROR_JAM           = $00000002;
  920.   PRINTER_ERROR_OUTOFTONER    = $00000004;
  921.  
  922. function ClosePrinter(hPrinter: THandle): BOOL; stdcall;
  923. function AddFormA(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  924. function AddFormW(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  925. function AddForm(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  926. function DeleteFormA(hPrinter: THandle; pFormName: PAnsiChar): BOOL; stdcall;
  927. function DeleteFormW(hPrinter: THandle; pFormName: PWideChar): BOOL; stdcall;
  928. function DeleteForm(hPrinter: THandle; pFormName: PChar): BOOL; stdcall;
  929. function GetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer;
  930.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  931. function GetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer;
  932.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  933. function GetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer;
  934.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  935. function SetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  936. function SetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  937. function SetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  938. function EnumFormsA(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  939.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  940. function EnumFormsW(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  941.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  942. function EnumForms(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  943.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  944. function EnumMonitorsA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  945.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  946. function EnumMonitorsW(pName: PWideChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  947.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  948. function EnumMonitors(pName: PChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  949.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  950. function AddMonitorA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  951. function AddMonitorW(pName: PWideChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  952. function AddMonitor(pName: PChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  953. function DeleteMonitorA(pName, pEnvironment, pMonitorName: PAnsiChar): BOOL; stdcall;
  954. function DeleteMonitorW(pName, pEnvironment, pMonitorName: PWideChar): BOOL; stdcall;
  955. function DeleteMonitor(pName, pEnvironment, pMonitorName: PChar): BOOL; stdcall;
  956. function EnumPortsA(pName: PAnsiChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  957.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  958. function EnumPortsW(pName: PWideChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  959.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  960. function EnumPorts(pName: PChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  961.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  962. function AddPortA(pName: PAnsiChar; hWnd: HWND; pMonitorName: PAnsiChar): BOOL; stdcall;
  963. function AddPortW(pName: PWideChar; hWnd: HWND; pMonitorName: PWideChar): BOOL; stdcall;
  964. function AddPort(pName: PChar; hWnd: HWND; pMonitorName: PChar): BOOL; stdcall;
  965. function ConfigurePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
  966. function ConfigurePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
  967. function ConfigurePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
  968. function DeletePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
  969. function DeletePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
  970. function DeletePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
  971. function AddPrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
  972. function AddPrinterConnectionW(pName: PWideChar): BOOL; stdcall;
  973. function AddPrinterConnection(pName: PChar): BOOL; stdcall;
  974. function DeletePrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
  975. function DeletePrinterConnectionW(pName: PWideChar): BOOL; stdcall;
  976. function DeletePrinterConnection(pName: PChar): BOOL; stdcall;
  977. function ConnectToPrinterDlg(hwnd: HWND; Flags: DWORD): THandle; stdcall;
  978.  
  979. type
  980.   PProvidorInfo1A = ^TProvidorInfo1A;
  981.   PProvidorInfo1W = ^TProvidorInfo1W;
  982.   PProvidorInfo1 = PProvidorInfo1A;
  983.   _PROVIDOR_INFO_1A = record
  984.     pName: PAnsiChar;
  985.     pEnvironment: PAnsiChar;
  986.     pDLLName: PAnsiChar;
  987.   end;
  988.   {$nonamespace _PROVIDOR_INFO_1A}
  989.   TProvidorInfo1A = _PROVIDOR_INFO_1A;
  990.   _PROVIDOR_INFO_1W = record
  991.     pName: PWideChar;
  992.     pEnvironment: PWideChar;
  993.     pDLLName: PWideChar;
  994.   end;
  995.   {$nonamespace _PROVIDOR_INFO_1W}
  996.   TProvidorInfo1W = _PROVIDOR_INFO_1W;
  997.   TProvidorInfo1 = TProvidorInfo1A;
  998.  
  999. function AddPrintProvidorA(pName: PAnsiChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1000. function AddPrintProvidorW(pName: PWideChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1001. function AddPrintProvidor(pName: PChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1002. function DeletePrintProvidorA(pName, pEnvironment, pPrintProvidorName: PAnsiChar): BOOL; stdcall;
  1003. function DeletePrintProvidorW(pName, pEnvironment, pPrintProvidorName: PWideChar): BOOL; stdcall;
  1004. function DeletePrintProvidor(pName, pEnvironment, pPrintProvidorName: PChar): BOOL; stdcall;
  1005.  
  1006. const
  1007.   SERVER_ACCESS_ADMINISTER    = $00000001;
  1008.   SERVER_ACCESS_ENUMERATE     = $00000002;
  1009.   PRINTER_ACCESS_ADMINISTER   = $00000004;
  1010.   PRINTER_ACCESS_USE          = $00000008;
  1011.   JOB_ACCESS_ADMINISTER       = $00000010;
  1012.  
  1013. { Access rights for print servers }
  1014.  
  1015.   SERVER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or 
  1016.     SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
  1017.   SERVER_READ = (STANDARD_RIGHTS_READ or SERVER_ACCESS_ENUMERATE);
  1018.   SERVER_WRITE = (STANDARD_RIGHTS_WRITE or 
  1019.     SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
  1020.   SERVER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or SERVER_ACCESS_ENUMERATE);
  1021.  
  1022. { Access rights for printers }
  1023.  
  1024.   PRINTER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or 
  1025.     PRINTER_ACCESS_ADMINISTER or PRINTER_ACCESS_USE);
  1026.   PRINTER_READ = (STANDARD_RIGHTS_READ or PRINTER_ACCESS_USE);
  1027.   PRINTER_WRITE = (STANDARD_RIGHTS_WRITE or PRINTER_ACCESS_USE);
  1028.   PRINTER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or PRINTER_ACCESS_USE);
  1029.  
  1030. { Access rights for jobs }
  1031.  
  1032.   JOB_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or JOB_ACCESS_ADMINISTER);
  1033.   JOB_READ = (STANDARD_RIGHTS_READ or JOB_ACCESS_ADMINISTER);
  1034.   JOB_WRITE = (STANDARD_RIGHTS_WRITE or JOB_ACCESS_ADMINISTER);
  1035.   JOB_EXECUTE = (STANDARD_RIGHTS_EXECUTE or JOB_ACCESS_ADMINISTER);
  1036.  
  1037. const
  1038.   winspl = 'winspool.drv';
  1039.  
  1040. implementation
  1041.  
  1042. function AbortPrinter; external winspl name 'AbortPrinter';
  1043. function AddFormA; external winspl name 'AddFormA';
  1044. function AddFormW; external winspl name 'AddFormW';
  1045. function AddForm; external winspl name 'AddFormA';
  1046. function AddJobA; external winspl name 'AddJobA';
  1047. function AddJobW; external winspl name 'AddJobW';
  1048. function AddJob; external winspl name 'AddJobA';
  1049. function AddMonitorA; external winspl name 'AddMonitorA';
  1050. function AddMonitorW; external winspl name 'AddMonitorW';
  1051. function AddMonitor; external winspl name 'AddMonitorA';
  1052. function AddPortA; external winspl name 'AddPortA';
  1053. function AddPortW; external winspl name 'AddPortW';
  1054. function AddPort; external winspl name 'AddPortA';
  1055. function AddPrinterA; external winspl name 'AddPrinterA';
  1056. function AddPrinterW; external winspl name 'AddPrinterW';
  1057. function AddPrinter; external winspl name 'AddPrinterA';
  1058. function AddPrinterConnectionA; external winspl name 'AddPrinterConnectionA';
  1059. function AddPrinterConnectionW; external winspl name 'AddPrinterConnectionW';
  1060. function AddPrinterConnection; external winspl name 'AddPrinterConnectionA';
  1061. function AddPrinterDriverA; external winspl name 'AddPrinterDriverA';
  1062. function AddPrinterDriverW; external winspl name 'AddPrinterDriverW';
  1063. function AddPrinterDriver; external winspl name 'AddPrinterDriverA';
  1064. function AddPrintProcessorA; external winspl name 'AddPrintProcessorA';
  1065. function AddPrintProcessorW; external winspl name 'AddPrintProcessorW';
  1066. function AddPrintProcessor; external winspl name 'AddPrintProcessorA';
  1067. function AddPrintProvidorA; external winspl name 'AddPrintProvidorA';
  1068. function AddPrintProvidorW; external winspl name 'AddPrintProvidorW';
  1069. function AddPrintProvidor; external winspl name 'AddPrintProvidorA';
  1070. function AdvancedDocumentPropertiesA; external winspl name 'AdvancedDocumentPropertiesA';
  1071. function AdvancedDocumentPropertiesW; external winspl name 'AdvancedDocumentPropertiesW';
  1072. function AdvancedDocumentProperties; external winspl name 'AdvancedDocumentPropertiesA';
  1073. function ClosePrinter; external winspl name 'ClosePrinter';
  1074. function ConfigurePortA; external winspl name 'ConfigurePortA';
  1075. function ConfigurePortW; external winspl name 'ConfigurePortW';
  1076. function ConfigurePort; external winspl name 'ConfigurePortA';
  1077. function ConnectToPrinterDlg; external winspl name 'ConnectToPrinterDlg';
  1078. function DeleteFormA; external winspl name 'DeleteFormA';
  1079. function DeleteFormW; external winspl name 'DeleteFormW';
  1080. function DeleteForm; external winspl name 'DeleteFormA';
  1081. function DeleteMonitorA; external winspl name 'DeleteMonitorA';
  1082. function DeleteMonitorW; external winspl name 'DeleteMonitorW';
  1083. function DeleteMonitor; external winspl name 'DeleteMonitorA';
  1084. function DeletePortA; external winspl name 'DeletePortA';
  1085. function DeletePortW; external winspl name 'DeletePortW';
  1086. function DeletePort; external winspl name 'DeletePortA';
  1087. function DeletePrinter; external winspl name 'DeletePrinter';
  1088. function DeletePrinterConnectionA; external winspl name 'DeletePrinterConnectionA';
  1089. function DeletePrinterConnectionW; external winspl name 'DeletePrinterConnectionW';
  1090. function DeletePrinterConnection; external winspl name 'DeletePrinterConnectionA';
  1091. function DeletePrinterDriverA; external winspl name 'DeletePrinterDriverA';
  1092. function DeletePrinterDriverW; external winspl name 'DeletePrinterDriverW';
  1093. function DeletePrinterDriver; external winspl name 'DeletePrinterDriverA';
  1094. function DeletePrintProcessorA; external winspl name 'DeletePrintProcessorA';
  1095. function DeletePrintProcessorW; external winspl name 'DeletePrintProcessorW';
  1096. function DeletePrintProcessor; external winspl name 'DeletePrintProcessorA';
  1097. function DeletePrintProvidorA; external winspl name 'DeletePrintProvidorA';
  1098. function DeletePrintProvidorW; external winspl name 'DeletePrintProvidorW';
  1099. function DeletePrintProvidor; external winspl name 'DeletePrintProvidorA';
  1100. function DocumentPropertiesA; external winspl name 'DocumentPropertiesA';
  1101. function DocumentPropertiesW; external winspl name 'DocumentPropertiesW';
  1102. function DocumentProperties; external winspl name 'DocumentPropertiesA';
  1103. function EndDocPrinter; external winspl name 'EndDocPrinter';
  1104. function EndPagePrinter; external winspl name 'EndPagePrinter';
  1105. function EnumFormsA; external winspl name 'EnumFormsA';
  1106. function EnumFormsW; external winspl name 'EnumFormsW';
  1107. function EnumForms; external winspl name 'EnumFormsA';
  1108. function EnumJobsA; external winspl name 'EnumJobsA';
  1109. function EnumJobsW; external winspl name 'EnumJobsW';
  1110. function EnumJobs; external winspl name 'EnumJobsA';
  1111. function EnumMonitorsA; external winspl name 'EnumMonitorsA';
  1112. function EnumMonitorsW; external winspl name 'EnumMonitorsW';
  1113. function EnumMonitors; external winspl name 'EnumMonitorsA';
  1114. function EnumPortsA; external winspl name 'EnumPortsA';
  1115. function EnumPortsW; external winspl name 'EnumPortsW';
  1116. function EnumPorts; external winspl name 'EnumPortsA';
  1117. function EnumPrinterDriversA; external winspl name 'EnumPrinterDriversA';
  1118. function EnumPrinterDriversW; external winspl name 'EnumPrinterDriversW';
  1119. function EnumPrinterDrivers; external winspl name 'EnumPrinterDriversA';
  1120. function EnumPrintersA; external winspl name 'EnumPrintersA';
  1121. function EnumPrintersW; external winspl name 'EnumPrintersW';
  1122. function EnumPrinters; external winspl name 'EnumPrintersA';
  1123. function EnumPrintProcessorDatatypesA; external winspl name 'EnumPrintProcessorDatatypesA';
  1124. function EnumPrintProcessorDatatypesW; external winspl name 'EnumPrintProcessorDatatypesW';
  1125. function EnumPrintProcessorDatatypes; external winspl name 'EnumPrintProcessorDatatypesA';
  1126. function EnumPrintProcessorsA; external winspl name 'EnumPrintProcessorsA';
  1127. function EnumPrintProcessorsW; external winspl name 'EnumPrintProcessorsW';
  1128. function EnumPrintProcessors; external winspl name 'EnumPrintProcessorsA';
  1129. function FindClosePrinterChangeNotification; external winspl name 'FindClosePrinterChangeNotification';
  1130. function FindFirstPrinterChangeNotification; external winspl name 'FindFirstPrinterChangeNotification';
  1131. function FindNextPrinterChangeNotification; external winspl name 'FindNextPrinterChangeNotification';
  1132. function FreePrinterNotifyInfo; external winspl name 'FreePrinterNotifyInfo';
  1133. function GetFormA; external winspl name 'GetFormA';
  1134. function GetFormW; external winspl name 'GetFormW';
  1135. function GetForm; external winspl name 'GetFormA';
  1136. function GetJobA; external winspl name 'GetJobA';
  1137. function GetJobW; external winspl name 'GetJobW';
  1138. function GetJob; external winspl name 'GetJobA';
  1139. function GetPrinterA; external winspl name 'GetPrinterA';
  1140. function GetPrinterW; external winspl name 'GetPrinterW';
  1141. function GetPrinter; external winspl name 'GetPrinterA';
  1142. function GetPrinterDataA; external winspl name 'GetPrinterDataA';
  1143. function GetPrinterDataW; external winspl name 'GetPrinterDataW';
  1144. function GetPrinterData; external winspl name 'GetPrinterDataA';
  1145. function GetPrinterDriverA; external winspl name 'GetPrinterDriverA';
  1146. function GetPrinterDriverW; external winspl name 'GetPrinterDriverW';
  1147. function GetPrinterDriver; external winspl name 'GetPrinterDriverA';
  1148. function GetPrinterDriverDirectoryA; external winspl name 'GetPrinterDriverDirectoryA';
  1149. function GetPrinterDriverDirectoryW; external winspl name 'GetPrinterDriverDirectoryW';
  1150. function GetPrinterDriverDirectory; external winspl name 'GetPrinterDriverDirectoryA';
  1151. function GetPrintProcessorDirectoryA; external winspl name 'GetPrintProcessorDirectoryA';
  1152. function GetPrintProcessorDirectoryW; external winspl name 'GetPrintProcessorDirectoryW';
  1153. function GetPrintProcessorDirectory; external winspl name 'GetPrintProcessorDirectoryA';
  1154. function OpenPrinterA; external winspl name 'OpenPrinterA';
  1155. function OpenPrinterW; external winspl name 'OpenPrinterW';
  1156. function OpenPrinter; external winspl name 'OpenPrinterA';
  1157. function PrinterMessageBoxA; external winspl name 'PrinterMessageBoxA';
  1158. function PrinterMessageBoxW; external winspl name 'PrinterMessageBoxW';
  1159. function PrinterMessageBox; external winspl name 'PrinterMessageBoxA';
  1160. function PrinterProperties; external winspl name 'PrinterProperties';
  1161. function ReadPrinter; external winspl name 'ReadPrinter';
  1162. function ResetPrinterA; external winspl name 'ResetPrinterA';
  1163. function ResetPrinterW; external winspl name 'ResetPrinterW';
  1164. function ResetPrinter; external winspl name 'ResetPrinterA';
  1165. function ScheduleJob; external winspl name 'ScheduleJob';
  1166. function SetFormA; external winspl name 'SetFormA';
  1167. function SetFormW; external winspl name 'SetFormW';
  1168. function SetForm; external winspl name 'SetFormA';
  1169. function SetJobA; external winspl name 'SetJobA';
  1170. function SetJobW; external winspl name 'SetJobW';
  1171. function SetJob; external winspl name 'SetJobA';
  1172. function SetPrinterA; external winspl name 'SetPrinterA';
  1173. function SetPrinterW; external winspl name 'SetPrinterW';
  1174. function SetPrinter; external winspl name 'SetPrinterA';
  1175. function SetPrinterDataA; external winspl name 'SetPrinterDataA';
  1176. function SetPrinterDataW; external winspl name 'SetPrinterDataW';
  1177. function SetPrinterData; external winspl name 'SetPrinterDataA';
  1178. function StartDocPrinterA; external winspl name 'StartDocPrinterA';
  1179. function StartDocPrinterW; external winspl name 'StartDocPrinterW';
  1180. function StartDocPrinter; external winspl name 'StartDocPrinterA';
  1181. function StartPagePrinter; external winspl name 'StartPagePrinter';
  1182. function WaitForPrinterChange; external winspl name 'WaitForPrinterChange';
  1183. function WritePrinter; external winspl name 'WritePrinter';
  1184.  
  1185. end.
  1186.