home *** CD-ROM | disk | FTP | other *** search
/ PC World Plus! (NZ) 2001 June / HDC50.iso / Runimage / Delphi50 / Source / Rtl / Win / WINSPOOL.PAS < prev    next >
Pascal/Delphi Source File  |  1999-08-11  |  80KB  |  1,870 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Borland Delphi Run-time Library                 }
  5. {       Win32 printer API Interface Unit                }
  6. {                                                       }
  7. {       Copyright (c) 1985-1999, Microsoft Corporation  }
  8. {                                                       }
  9. {       Translator: Inprise Corporation                 }
  10. {                                                       }
  11. {*******************************************************}
  12.  
  13. unit WinSpool;
  14.  
  15. {$WEAKPACKAGEUNIT}
  16.  
  17. interface
  18.  
  19. uses Windows;
  20.  
  21. (*$HPPEMIT '' *)
  22. (*$HPPEMIT '#include <winspool.h>' *)
  23. (*$HPPEMIT '' *)
  24.  
  25. type
  26.   PPrinterInfo1A = ^TPrinterInfo1A;
  27.   PPrinterInfo1W = ^TPrinterInfo1W;
  28.   PPrinterInfo1 = PPrinterInfo1A;
  29.   {$EXTERNALSYM _PRINTER_INFO_1A}
  30.   _PRINTER_INFO_1A = record
  31.     Flags: DWORD;
  32.     pDescription: PAnsiChar;
  33.     pName: PAnsiChar;
  34.     pComment: PAnsiChar;
  35.   end;
  36.   {$EXTERNALSYM _PRINTER_INFO_1W}
  37.   _PRINTER_INFO_1W = record
  38.     Flags: DWORD;
  39.     pDescription: PWideChar;
  40.     pName: PWideChar;
  41.     pComment: PWideChar;
  42.   end;
  43.   {$EXTERNALSYM _PRINTER_INFO_1}
  44.   _PRINTER_INFO_1 = _PRINTER_INFO_1A;
  45.   TPrinterInfo1A = _PRINTER_INFO_1A;
  46.   TPrinterInfo1W = _PRINTER_INFO_1W;
  47.   TPrinterInfo1 = TPrinterInfo1A;
  48.   {$EXTERNALSYM PRINTER_INFO_1A}
  49.   PRINTER_INFO_1A = _PRINTER_INFO_1A;
  50.   {$EXTERNALSYM PRINTER_INFO_1W}
  51.   PRINTER_INFO_1W = _PRINTER_INFO_1W;
  52.   {$EXTERNALSYM PRINTER_INFO_1}
  53.   PRINTER_INFO_1 = PRINTER_INFO_1A;
  54.  
  55.   PPrinterInfo2A = ^TPrinterInfo2A;
  56.   PPrinterInfo2W = ^TPrinterInfo2W;
  57.   PPrinterInfo2 = PPrinterInfo2A;
  58.   {$EXTERNALSYM _PRINTER_INFO_2A}
  59.   _PRINTER_INFO_2A = record
  60.     pServerName: PAnsiChar;
  61.     pPrinterName: PAnsiChar;
  62.     pShareName: PAnsiChar;
  63.     pPortName: PAnsiChar;
  64.     pDriverName: PAnsiChar;
  65.     pComment: PAnsiChar;
  66.     pLocation: PAnsiChar;
  67.     pDevMode: PDeviceModeA;
  68.     pSepFile: PAnsiChar;
  69.     pPrintProcessor: PAnsiChar;
  70.     pDatatype: PAnsiChar;
  71.     pParameters: PAnsiChar;
  72.     pSecurityDescriptor: PSecurityDescriptor;
  73.     Attributes: DWORD;
  74.     Priority: DWORD;
  75.     DefaultPriority: DWORD;
  76.     StartTime: DWORD;
  77.     UntilTime: DWORD;
  78.     Status: DWORD;
  79.     cJobs: DWORD;
  80.     AveragePPM: DWORD;
  81.   end;
  82.   {$EXTERNALSYM _PRINTER_INFO_2W}
  83.   _PRINTER_INFO_2W = record
  84.     pServerName: PWideChar;
  85.     pPrinterName: PWideChar;
  86.     pShareName: PWideChar;
  87.     pPortName: PWideChar;
  88.     pDriverName: PWideChar;
  89.     pComment: PWideChar;
  90.     pLocation: PWideChar;
  91.     pDevMode: PDeviceModeW;
  92.     pSepFile: PWideChar;
  93.     pPrintProcessor: PWideChar;
  94.     pDatatype: PWideChar;
  95.     pParameters: PWideChar;
  96.     pSecurityDescriptor: PSecurityDescriptor;
  97.     Attributes: DWORD;
  98.     Priority: DWORD;
  99.     DefaultPriority: DWORD;
  100.     StartTime: DWORD;
  101.     UntilTime: DWORD;
  102.     Status: DWORD;
  103.     cJobs: DWORD;
  104.     AveragePPM: DWORD;
  105.   end;
  106.   {$EXTERNALSYM _PRINTER_INFO_2}
  107.   _PRINTER_INFO_2 = _PRINTER_INFO_2A;
  108.   TPrinterInfo2A = _PRINTER_INFO_2A;
  109.   TPrinterInfo2W = _PRINTER_INFO_2W;
  110.   TPrinterInfo2 = TPrinterInfo2A;
  111.   {$EXTERNALSYM PRINTER_INFO_2A}
  112.   PRINTER_INFO_2A = _PRINTER_INFO_2A;
  113.   {$EXTERNALSYM PRINTER_INFO_2W}
  114.   PRINTER_INFO_2W = _PRINTER_INFO_2W;
  115.   {$EXTERNALSYM PRINTER_INFO_2}
  116.   PRINTER_INFO_2 = PRINTER_INFO_2A;
  117.  
  118.   PPrinterInfo3 = ^TPrinterInfo3;
  119.   {$EXTERNALSYM _PRINTER_INFO_3}
  120.   _PRINTER_INFO_3 = record
  121.     pSecurityDescriptor: PSecurityDescriptor;
  122.   end;
  123.   TPrinterInfo3 = _PRINTER_INFO_3;
  124.   {$EXTERNALSYM PRINTER_INFO_3}
  125.   PRINTER_INFO_3 = _PRINTER_INFO_3;
  126.  
  127.   PPrinterInfo4A = ^TPrinterInfo4A;
  128.   PPrinterInfo4W = ^TPrinterInfo4W;
  129.   PPrinterInfo4 = PPrinterInfo4A;
  130.   {$EXTERNALSYM _PRINTER_INFO_4A}
  131.   _PRINTER_INFO_4A = record
  132.     pPrinterName: PAnsiChar;
  133.     pServerName: PAnsiChar;
  134.     Attributes: DWORD;
  135.   end;
  136.   {$EXTERNALSYM _PRINTER_INFO_4W}
  137.   _PRINTER_INFO_4W = record
  138.     pPrinterName: PWideChar;
  139.     pServerName: PWideChar;
  140.     Attributes: DWORD;
  141.   end;
  142.   {$EXTERNALSYM _PRINTER_INFO_4}
  143.   _PRINTER_INFO_4 = _PRINTER_INFO_4A;
  144.   TPrinterInfo4A = _PRINTER_INFO_4A;
  145.   TPrinterInfo4W = _PRINTER_INFO_4W;
  146.   TPrinterInfo4 = TPrinterInfo4A;
  147.   {$EXTERNALSYM PRINTER_INFO_4A}
  148.   PRINTER_INFO_4A = _PRINTER_INFO_4A;
  149.   {$EXTERNALSYM PRINTER_INFO_4W}
  150.   PRINTER_INFO_4W = _PRINTER_INFO_4W;
  151.   {$EXTERNALSYM PRINTER_INFO_4}
  152.   PRINTER_INFO_4 = PRINTER_INFO_4A;
  153.  
  154.   PPrinterInfo5A = ^TPrinterInfo5A;
  155.   PPrinterInfo5W = ^TPrinterInfo5W;
  156.   PPrinterInfo5 = PPrinterInfo5A;
  157.   {$EXTERNALSYM _PRINTER_INFO_5A}
  158.   _PRINTER_INFO_5A = record
  159.     pPrinterName: PAnsiChar;
  160.     pPortName: PAnsiChar;
  161.     Attributes: DWORD;
  162.     DeviceNotSelectedTimeout: DWORD;
  163.     TransmissionRetryTimeout: DWORD;
  164.   end;
  165.   {$EXTERNALSYM _PRINTER_INFO_5W}
  166.   _PRINTER_INFO_5W = record
  167.     pPrinterName: PWideChar;
  168.     pPortName: PWideChar;
  169.     Attributes: DWORD;
  170.     DeviceNotSelectedTimeout: DWORD;
  171.     TransmissionRetryTimeout: DWORD;
  172.   end;
  173.   {$EXTERNALSYM _PRINTER_INFO_5}
  174.   _PRINTER_INFO_5 = _PRINTER_INFO_5A;
  175.   TPrinterInfo5A = _PRINTER_INFO_5A;
  176.   TPrinterInfo5W = _PRINTER_INFO_5W;
  177.   TPrinterInfo5 = TPrinterInfo5A;
  178.   {$EXTERNALSYM PRINTER_INFO_5A}
  179.   PRINTER_INFO_5A = _PRINTER_INFO_5A;
  180.   {$EXTERNALSYM PRINTER_INFO_5W}
  181.   PRINTER_INFO_5W = _PRINTER_INFO_5W;
  182.   {$EXTERNALSYM PRINTER_INFO_5}
  183.   PRINTER_INFO_5 = PRINTER_INFO_5A;
  184.  
  185.   PPrinterInfo6 = ^TPrinterInfo6;
  186.   {$EXTERNALSYM _PRINTER_INFO_6}
  187.   _PRINTER_INFO_6 = record
  188.     dwStatus: DWORD;
  189.   end;
  190.   TPrinterInfo6 = _PRINTER_INFO_6;
  191.   {$EXTERNALSYM PRINTER_INFO_6}
  192.   PRINTER_INFO_6 = _PRINTER_INFO_6;
  193.  
  194. const
  195.   {$EXTERNALSYM PRINTER_CONTROL_PAUSE}
  196.   PRINTER_CONTROL_PAUSE            = 1;
  197.   {$EXTERNALSYM PRINTER_CONTROL_RESUME}
  198.   PRINTER_CONTROL_RESUME           = 2;
  199.   {$EXTERNALSYM PRINTER_CONTROL_PURGE}
  200.   PRINTER_CONTROL_PURGE            = 3;
  201.   {$EXTERNALSYM PRINTER_CONTROL_SET_STATUS}
  202.   PRINTER_CONTROL_SET_STATUS       = 4;
  203.  
  204.   {$EXTERNALSYM PRINTER_STATUS_PAUSED}
  205.   PRINTER_STATUS_PAUSED            = $00000001;
  206.   {$EXTERNALSYM PRINTER_STATUS_ERROR}
  207.   PRINTER_STATUS_ERROR             = $00000002;
  208.   {$EXTERNALSYM PRINTER_STATUS_PENDING_DELETION}
  209.   PRINTER_STATUS_PENDING_DELETION  = $00000004;
  210.   {$EXTERNALSYM PRINTER_STATUS_PAPER_JAM}
  211.   PRINTER_STATUS_PAPER_JAM         = $00000008;
  212.   {$EXTERNALSYM PRINTER_STATUS_PAPER_OUT}
  213.   PRINTER_STATUS_PAPER_OUT         = $00000010;
  214.   {$EXTERNALSYM PRINTER_STATUS_MANUAL_FEED}
  215.   PRINTER_STATUS_MANUAL_FEED       = $00000020;
  216.   {$EXTERNALSYM PRINTER_STATUS_PAPER_PROBLEM}
  217.   PRINTER_STATUS_PAPER_PROBLEM     = $00000040;
  218.   {$EXTERNALSYM PRINTER_STATUS_OFFLINE}
  219.   PRINTER_STATUS_OFFLINE           = $00000080;
  220.   {$EXTERNALSYM PRINTER_STATUS_IO_ACTIVE}
  221.   PRINTER_STATUS_IO_ACTIVE         = $00000100;
  222.   {$EXTERNALSYM PRINTER_STATUS_BUSY}
  223.   PRINTER_STATUS_BUSY              = $00000200;
  224.   {$EXTERNALSYM PRINTER_STATUS_PRINTING}
  225.   PRINTER_STATUS_PRINTING          = $00000400;
  226.   {$EXTERNALSYM PRINTER_STATUS_OUTPUT_BIN_FULL}
  227.   PRINTER_STATUS_OUTPUT_BIN_FULL   = $00000800;
  228.   {$EXTERNALSYM PRINTER_STATUS_NOT_AVAILABLE}
  229.   PRINTER_STATUS_NOT_AVAILABLE     = $00001000;
  230.   {$EXTERNALSYM PRINTER_STATUS_WAITING}
  231.   PRINTER_STATUS_WAITING           = $00002000;
  232.   {$EXTERNALSYM PRINTER_STATUS_PROCESSING}
  233.   PRINTER_STATUS_PROCESSING        = $00004000;
  234.   {$EXTERNALSYM PRINTER_STATUS_INITIALIZING}
  235.   PRINTER_STATUS_INITIALIZING      = $00008000;
  236.   {$EXTERNALSYM PRINTER_STATUS_WARMING_UP}
  237.   PRINTER_STATUS_WARMING_UP        = $00010000;
  238.   {$EXTERNALSYM PRINTER_STATUS_TONER_LOW}
  239.   PRINTER_STATUS_TONER_LOW         = $00020000;
  240.   {$EXTERNALSYM PRINTER_STATUS_NO_TONER}
  241.   PRINTER_STATUS_NO_TONER          = $00040000;
  242.   {$EXTERNALSYM PRINTER_STATUS_PAGE_PUNT}
  243.   PRINTER_STATUS_PAGE_PUNT         = $00080000;
  244.   {$EXTERNALSYM PRINTER_STATUS_USER_INTERVENTION}
  245.   PRINTER_STATUS_USER_INTERVENTION = $00100000;
  246.   {$EXTERNALSYM PRINTER_STATUS_OUT_OF_MEMORY}
  247.   PRINTER_STATUS_OUT_OF_MEMORY     = $00200000;
  248.   {$EXTERNALSYM PRINTER_STATUS_DOOR_OPEN}
  249.   PRINTER_STATUS_DOOR_OPEN         = $00400000;
  250.   {$EXTERNALSYM PRINTER_STATUS_SERVER_UNKNOWN}
  251.   PRINTER_STATUS_SERVER_UNKNOWN    = $00800000;
  252.   {$EXTERNALSYM PRINTER_STATUS_POWER_SAVE}
  253.   PRINTER_STATUS_POWER_SAVE        = $01000000;
  254.  
  255.   {$EXTERNALSYM PRINTER_ATTRIBUTE_QUEUED}
  256.   PRINTER_ATTRIBUTE_QUEUED         = $00000001;
  257.   {$EXTERNALSYM PRINTER_ATTRIBUTE_DIRECT}
  258.   PRINTER_ATTRIBUTE_DIRECT         = $00000002;
  259.   {$EXTERNALSYM PRINTER_ATTRIBUTE_DEFAULT}
  260.   PRINTER_ATTRIBUTE_DEFAULT        = $00000004;
  261.   {$EXTERNALSYM PRINTER_ATTRIBUTE_SHARED}
  262.   PRINTER_ATTRIBUTE_SHARED         = $00000008;
  263.   {$EXTERNALSYM PRINTER_ATTRIBUTE_NETWORK}
  264.   PRINTER_ATTRIBUTE_NETWORK        = $00000010;
  265.   {$EXTERNALSYM PRINTER_ATTRIBUTE_HIDDEN}
  266.   PRINTER_ATTRIBUTE_HIDDEN         = $00000020;
  267.   {$EXTERNALSYM PRINTER_ATTRIBUTE_LOCAL}
  268.   PRINTER_ATTRIBUTE_LOCAL          = $00000040;
  269.  
  270.   {$EXTERNALSYM PRINTER_ATTRIBUTE_ENABLE_DEVQ}
  271.   PRINTER_ATTRIBUTE_ENABLE_DEVQ       = $00000080;
  272.   {$EXTERNALSYM PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS}
  273.   PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS   = $00000100;
  274.   {$EXTERNALSYM PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST}
  275.   PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = $00000200;
  276.  
  277.   {$EXTERNALSYM PRINTER_ATTRIBUTE_WORK_OFFLINE}
  278.   PRINTER_ATTRIBUTE_WORK_OFFLINE   = $00000400;
  279.   {$EXTERNALSYM PRINTER_ATTRIBUTE_ENABLE_BIDI}
  280.   PRINTER_ATTRIBUTE_ENABLE_BIDI    = $00000800;
  281.   {$EXTERNALSYM PRINTER_ATTRIBUTE_RAW_ONLY}
  282.   PRINTER_ATTRIBUTE_RAW_ONLY       = $00001000;
  283.  
  284.  
  285.   {$EXTERNALSYM NO_PRIORITY}
  286.   NO_PRIORITY   = 0;
  287.   {$EXTERNALSYM MAX_PRIORITY}
  288.   MAX_PRIORITY = 99;
  289.   {$EXTERNALSYM MIN_PRIORITY}
  290.   MIN_PRIORITY  = 1;
  291.   {$EXTERNALSYM DEF_PRIORITY}
  292.   DEF_PRIORITY  = 1;
  293.  
  294. type
  295.   PJobInfo1A = ^TJobInfo1A;
  296.   PJobInfo1W = ^TJobInfo1W;
  297.   PJobInfo1 = PJobInfo1A;
  298.   {$EXTERNALSYM _JOB_INFO_1A}
  299.   _JOB_INFO_1A = record
  300.    JobId: DWORD;
  301.    pPrinterName: PAnsiChar;
  302.    pMachineName: PAnsiChar;
  303.    pUserName: PAnsiChar;
  304.    pDocument: PAnsiChar;
  305.    pDatatype: PAnsiChar;
  306.    pStatus: PAnsiChar;
  307.    Status: DWORD;
  308.    Priority: DWORD;
  309.    Position: DWORD;
  310.    TotalPages: DWORD;
  311.    PagesPrinted: DWORD;
  312.    Submitted: TSystemTime;
  313.   end;
  314.   {$EXTERNALSYM _JOB_INFO_1W}
  315.   _JOB_INFO_1W = record
  316.    JobId: DWORD;
  317.    pPrinterName: PWideChar;
  318.    pMachineName: PWideChar;
  319.    pUserName: PWideChar;
  320.    pDocument: PWideChar;
  321.    pDatatype: PWideChar;
  322.    pStatus: PWideChar;
  323.    Status: DWORD;
  324.    Priority: DWORD;
  325.    Position: DWORD;
  326.    TotalPages: DWORD;
  327.    PagesPrinted: DWORD;
  328.    Submitted: TSystemTime;
  329.   end;
  330.   {$EXTERNALSYM _JOB_INFO_1}
  331.   _JOB_INFO_1 = _JOB_INFO_1A;
  332.   TJobInfo1A = _JOB_INFO_1A;
  333.   TJobInfo1W = _JOB_INFO_1W;
  334.   TJobInfo1 = TJobInfo1A;
  335.   {$EXTERNALSYM JOB_INFO_1A}
  336.   JOB_INFO_1A = _JOB_INFO_1A;
  337.   {$EXTERNALSYM JOB_INFO_1W}
  338.   JOB_INFO_1W = _JOB_INFO_1W;
  339.   {$EXTERNALSYM JOB_INFO_1}
  340.   JOB_INFO_1 = JOB_INFO_1A;
  341.  
  342.   PJobInfo2A = ^TJobInfo2A;
  343.   PJobInfo2W = ^TJobInfo2W;
  344.   PJobInfo2 = PJobInfo2A;
  345.   {$EXTERNALSYM _JOB_INFO_2A}
  346.   _JOB_INFO_2A = record
  347.    JobId: DWORD;
  348.    pPrinterName: PAnsiChar;
  349.    pMachineName: PAnsiChar;
  350.    pUserName: PAnsiChar;
  351.    pDocument: PAnsiChar;
  352.    pNotifyName: PAnsiChar;
  353.    pDatatype: PAnsiChar;
  354.    pPrintProcessor: PAnsiChar;
  355.    pParameters: PAnsiChar;
  356.    pDriverName: PAnsiChar;
  357.    pDevMode: PDeviceModeA;
  358.    pStatus: PAnsiChar;
  359.    pSecurityDescriptor: PSECURITY_DESCRIPTOR;
  360.    Status: DWORD;
  361.    Priority: DWORD;
  362.    Position: DWORD;
  363.    StartTime: DWORD;
  364.    UntilTime: DWORD;
  365.    TotalPages: DWORD;
  366.    Size: DWORD;
  367.    Submitted: TSystemTime;   { Time the job was spooled }
  368.    Time: DWORD;              { How many seconds the job has been printing }
  369.    PagesPrinted: DWORD;
  370.   end;
  371.   {$EXTERNALSYM _JOB_INFO_2W}
  372.   _JOB_INFO_2W = record
  373.    JobId: DWORD;
  374.    pPrinterName: PWideChar;
  375.    pMachineName: PWideChar;
  376.    pUserName: PWideChar;
  377.    pDocument: PWideChar;
  378.    pNotifyName: PWideChar;
  379.    pDatatype: PWideChar;
  380.    pPrintProcessor: PWideChar;
  381.    pParameters: PWideChar;
  382.    pDriverName: PWideChar;
  383.    pDevMode: PDeviceModeW;
  384.    pStatus: PWideChar;
  385.    pSecurityDescriptor: PSECURITY_DESCRIPTOR;
  386.    Status: DWORD;
  387.    Priority: DWORD;
  388.    Position: DWORD;
  389.    StartTime: DWORD;
  390.    UntilTime: DWORD;
  391.    TotalPages: DWORD;
  392.    Size: DWORD;
  393.    Submitted: TSystemTime;   { Time the job was spooled }
  394.    Time: DWORD;              { How many seconds the job has been printing }
  395.    PagesPrinted: DWORD;
  396.   end;
  397.   {$EXTERNALSYM _JOB_INFO_2}
  398.   _JOB_INFO_2 = _JOB_INFO_2A;
  399.   TJobInfo2A = _JOB_INFO_2A;
  400.   TJobInfo2W = _JOB_INFO_2W;
  401.   TJobInfo2 = TJobInfo2A;
  402.   {$EXTERNALSYM JOB_INFO_2A}
  403.   JOB_INFO_2A = _JOB_INFO_2A;
  404.   {$EXTERNALSYM JOB_INFO_2W}
  405.   JOB_INFO_2W = _JOB_INFO_2W;
  406.   {$EXTERNALSYM JOB_INFO_2}
  407.   JOB_INFO_2 = JOB_INFO_2A;
  408.  
  409.   PJobInfo3 = ^TJobInfo3;
  410.   {$EXTERNALSYM _JOB_INFO_3}
  411.   _JOB_INFO_3 = record
  412.     JobId: DWORD;
  413.     NextJobId: DWORD;
  414.     Reserved: DWORD;
  415.   end;
  416.   TJobInfo3 = _JOB_INFO_3;
  417.   {$EXTERNALSYM JOB_INFO_3}
  418.   JOB_INFO_3 = _JOB_INFO_3;
  419.  
  420. const
  421.   {$EXTERNALSYM JOB_CONTROL_PAUSE}
  422.   JOB_CONTROL_PAUSE              = 1;
  423.   {$EXTERNALSYM JOB_CONTROL_RESUME}
  424.   JOB_CONTROL_RESUME             = 2;
  425.   {$EXTERNALSYM JOB_CONTROL_CANCEL}
  426.   JOB_CONTROL_CANCEL             = 3;
  427.   {$EXTERNALSYM JOB_CONTROL_RESTART}
  428.   JOB_CONTROL_RESTART            = 4;
  429.   {$EXTERNALSYM JOB_CONTROL_DELETE}
  430.   JOB_CONTROL_DELETE             = 5;
  431.   {$EXTERNALSYM JOB_CONTROL_SENT_TO_PRINTER}
  432.   JOB_CONTROL_SENT_TO_PRINTER    = 6;
  433.   {$EXTERNALSYM JOB_CONTROL_LAST_PAGE_EJECTED}
  434.   JOB_CONTROL_LAST_PAGE_EJECTED  = 7;
  435.  
  436.   {$EXTERNALSYM JOB_STATUS_PAUSED}
  437.   JOB_STATUS_PAUSED                   = $00000001;
  438.   {$EXTERNALSYM JOB_STATUS_ERROR}
  439.   JOB_STATUS_ERROR                    = $00000002;
  440.   {$EXTERNALSYM JOB_STATUS_DELETING}
  441.   JOB_STATUS_DELETING                 = $00000004;
  442.   {$EXTERNALSYM JOB_STATUS_SPOOLING}
  443.   JOB_STATUS_SPOOLING                 = $00000008;
  444.   {$EXTERNALSYM JOB_STATUS_PRINTING}
  445.   JOB_STATUS_PRINTING                 = $00000010;
  446.   {$EXTERNALSYM JOB_STATUS_OFFLINE}
  447.   JOB_STATUS_OFFLINE                  = $00000020;
  448.   {$EXTERNALSYM JOB_STATUS_PAPEROUT}
  449.   JOB_STATUS_PAPEROUT                 = $00000040;
  450.   {$EXTERNALSYM JOB_STATUS_PRINTED}
  451.   JOB_STATUS_PRINTED                  = $00000080;
  452.   {$EXTERNALSYM JOB_STATUS_DELETED}
  453.   JOB_STATUS_DELETED                  = $00000100;
  454.   {$EXTERNALSYM JOB_STATUS_BLOCKED_DEVQ}
  455.   JOB_STATUS_BLOCKED_DEVQ             = $00000200;
  456.   {$EXTERNALSYM JOB_STATUS_USER_INTERVENTION}
  457.   JOB_STATUS_USER_INTERVENTION        = $00000400;
  458.   {$EXTERNALSYM JOB_STATUS_RESTART}
  459.   JOB_STATUS_RESTART                  = $00000800;
  460.  
  461.   {$EXTERNALSYM JOB_POSITION_UNSPECIFIED}
  462.   JOB_POSITION_UNSPECIFIED       = 0;
  463.  
  464. type
  465.   PAddJobInfo1A = ^TAddJobInfo1A;
  466.   PAddJobInfo1W = ^TAddJobInfo1W;
  467.   PAddJobInfo1 = PAddJobInfo1A;
  468.   {$EXTERNALSYM _ADDJOB_INFO_1A}
  469.   _ADDJOB_INFO_1A = record
  470.     Path: PAnsiChar;
  471.     JobId: DWORD;
  472.   end;
  473.   {$EXTERNALSYM _ADDJOB_INFO_1W}
  474.   _ADDJOB_INFO_1W = record
  475.     Path: PWideChar;
  476.     JobId: DWORD;
  477.   end;
  478.   {$EXTERNALSYM _ADDJOB_INFO_1}
  479.   _ADDJOB_INFO_1 = _ADDJOB_INFO_1A;
  480.   TAddJobInfo1A = _ADDJOB_INFO_1A;
  481.   TAddJobInfo1W = _ADDJOB_INFO_1W;
  482.   TAddJobInfo1 = TAddJobInfo1A;
  483.   {$EXTERNALSYM ADDJOB_INFO_1A}
  484.   ADDJOB_INFO_1A = _ADDJOB_INFO_1A;
  485.   {$EXTERNALSYM ADDJOB_INFO_1W}
  486.   ADDJOB_INFO_1W = _ADDJOB_INFO_1W;
  487.   {$EXTERNALSYM ADDJOB_INFO_1}
  488.   ADDJOB_INFO_1 = ADDJOB_INFO_1A;
  489.  
  490.   PDriverInfo1A = ^TDriverInfo1A;
  491.   PDriverInfo1W = ^TDriverInfo1W;
  492.   PDriverInfo1 = PDriverInfo1A;
  493.   {$EXTERNALSYM _DRIVER_INFO_1A}
  494.   _DRIVER_INFO_1A = record
  495.     pName: PAnsiChar;              { QMS 810 }
  496.   end;
  497.   {$EXTERNALSYM _DRIVER_INFO_1W}
  498.   _DRIVER_INFO_1W = record
  499.     pName: PWideChar;              { QMS 810 }
  500.   end;
  501.   {$EXTERNALSYM _DRIVER_INFO_1}
  502.   _DRIVER_INFO_1 = _DRIVER_INFO_1A;
  503.   TDriverInfo1A = _DRIVER_INFO_1A;
  504.   TDriverInfo1W = _DRIVER_INFO_1W;
  505.   TDriverInfo1 = TDriverInfo1A;
  506.   {$EXTERNALSYM DRIVER_INFO_1A}
  507.   DRIVER_INFO_1A = _DRIVER_INFO_1A;
  508.   {$EXTERNALSYM DRIVER_INFO_1W}
  509.   DRIVER_INFO_1W = _DRIVER_INFO_1W;
  510.   {$EXTERNALSYM DRIVER_INFO_1}
  511.   DRIVER_INFO_1 = DRIVER_INFO_1A;
  512.  
  513.   PDriverInfo2A = ^TDriverInfo2A;
  514.   PDriverInfo2W = ^TDriverInfo2W;
  515.   PDriverInfo2 = PDriverInfo2A;
  516.   {$EXTERNALSYM _DRIVER_INFO_2A}
  517.   _DRIVER_INFO_2A = record
  518.     cVersion: DWORD;
  519.     pName: PAnsiChar;              { QMS 810 }
  520.     pEnvironment: PAnsiChar;       { Win32 x86 }
  521.     pDriverPath: PAnsiChar;        { c:\drivers\pscript.dll }
  522.     pDataFile: PAnsiChar;          { c:\drivers\QMS810.PPD }
  523.     pConfigFile: PAnsiChar;        { c:\drivers\PSCRPTUI.DLL }
  524.   end;
  525.   {$EXTERNALSYM _DRIVER_INFO_2W}
  526.   _DRIVER_INFO_2W = record
  527.     cVersion: DWORD;
  528.     pName: PWideChar;              { QMS 810 }
  529.     pEnvironment: PWideChar;       { Win32 x86 }
  530.     pDriverPath: PWideChar;        { c:\drivers\pscript.dll }
  531.     pDataFile: PWideChar;          { c:\drivers\QMS810.PPD }
  532.     pConfigFile: PWideChar;        { c:\drivers\PSCRPTUI.DLL }
  533.   end;
  534.   {$EXTERNALSYM _DRIVER_INFO_2}
  535.   _DRIVER_INFO_2 = _DRIVER_INFO_2A;
  536.   TDriverInfo2A = _DRIVER_INFO_2A;
  537.   TDriverInfo2W = _DRIVER_INFO_2W;
  538.   TDriverInfo2 = TDriverInfo2A;
  539.   {$EXTERNALSYM DRIVER_INFO_2A}
  540.   DRIVER_INFO_2A = _DRIVER_INFO_2A;
  541.   {$EXTERNALSYM DRIVER_INFO_2W}
  542.   DRIVER_INFO_2W = _DRIVER_INFO_2W;
  543.   {$EXTERNALSYM DRIVER_INFO_2}
  544.   DRIVER_INFO_2 = DRIVER_INFO_2A;
  545.  
  546.   PDriverInfo3A = ^TDriverInfo3A;
  547.   PDriverInfo3W = ^TDriverInfo3W;
  548.   PDriverInfo3 = PDriverInfo3A;
  549.   {$EXTERNALSYM _DRIVER_INFO_3A}
  550.   _DRIVER_INFO_3A = record
  551.     cVersion: DWORD;
  552.     pName: PAnsiChar;                    { QMS 810 }
  553.     pEnvironment: PAnsiChar;             { Win32 x86 }
  554.     pDriverPath: PAnsiChar;              { c:\drivers\pscript.dll }
  555.     pDataFile: PAnsiChar;                { c:\drivers\QMS810.PPD }
  556.     pConfigFile: PAnsiChar;              { c:\drivers\PSCRPTUI.DLL }
  557.     pHelpFile: PAnsiChar;                { c:\drivers\PSCRPTUI.HLP }
  558.     pDependentFiles: PAnsiChar;          { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
  559.     pMonitorName: PAnsiChar;             { "PJL monitor" }
  560.     pDefaultDataType: PAnsiChar;         { "EMF" }
  561.   end;
  562.   {$EXTERNALSYM _DRIVER_INFO_3W}
  563.   _DRIVER_INFO_3W = record
  564.     cVersion: DWORD;
  565.     pName: PWideChar;                    { QMS 810 }
  566.     pEnvironment: PWideChar;             { Win32 x86 }
  567.     pDriverPath: PWideChar;              { c:\drivers\pscript.dll }
  568.     pDataFile: PWideChar;                { c:\drivers\QMS810.PPD }
  569.     pConfigFile: PWideChar;              { c:\drivers\PSCRPTUI.DLL }
  570.     pHelpFile: PWideChar;                { c:\drivers\PSCRPTUI.HLP }
  571.     pDependentFiles: PWideChar;          { PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0 }
  572.     pMonitorName: PWideChar;             { "PJL monitor" }
  573.     pDefaultDataType: PWideChar;         { "EMF" }
  574.   end;
  575.   {$EXTERNALSYM _DRIVER_INFO_3}
  576.   _DRIVER_INFO_3 = _DRIVER_INFO_3A;
  577.   TDriverInfo3A = _DRIVER_INFO_3A;
  578.   TDriverInfo3W = _DRIVER_INFO_3W;
  579.   TDriverInfo3 = TDriverInfo3A;
  580.   {$EXTERNALSYM DRIVER_INFO_3A}
  581.   DRIVER_INFO_3A = _DRIVER_INFO_3A;
  582.   {$EXTERNALSYM DRIVER_INFO_3W}
  583.   DRIVER_INFO_3W = _DRIVER_INFO_3W;
  584.   {$EXTERNALSYM DRIVER_INFO_3}
  585.   DRIVER_INFO_3 = DRIVER_INFO_3A;
  586.  
  587.   PDocInfo1A = ^TDocInfo1A;
  588.   PDocInfo1W = ^TDocInfo1W;
  589.   PDocInfo1 = PDocInfo1A;
  590.   {$EXTERNALSYM _DOC_INFO_1A}
  591.   _DOC_INFO_1A = record
  592.     pDocName: PAnsiChar;
  593.     pOutputFile: PAnsiChar;
  594.     pDatatype: PAnsiChar;
  595.   end;
  596.   {$EXTERNALSYM _DOC_INFO_1W}
  597.   _DOC_INFO_1W = record
  598.     pDocName: PWideChar;
  599.     pOutputFile: PWideChar;
  600.     pDatatype: PWideChar;
  601.   end;
  602.   {$EXTERNALSYM _DOC_INFO_1}
  603.   _DOC_INFO_1 = _DOC_INFO_1A;
  604.   TDocInfo1A = _DOC_INFO_1A;
  605.   TDocInfo1W = _DOC_INFO_1W;
  606.   TDocInfo1 = TDocInfo1A;
  607.   {$EXTERNALSYM DOC_INFO_1A}
  608.   DOC_INFO_1A = _DOC_INFO_1A;
  609.   {$EXTERNALSYM DOC_INFO_1W}
  610.   DOC_INFO_1W = _DOC_INFO_1W;
  611.   {$EXTERNALSYM DOC_INFO_1}
  612.   DOC_INFO_1 = DOC_INFO_1A;
  613.  
  614.   PFormInfo1A = ^TFormInfo1A;
  615.   PFormInfo1W = ^TFormInfo1W;
  616.   PFormInfo1 = PFormInfo1A;
  617.   {$EXTERNALSYM _FORM_INFO_1A}
  618.   _FORM_INFO_1A = record
  619.     Flags: DWORD;
  620.     pName: PAnsiChar;
  621.     Size: TSize;
  622.     ImageableArea: TRect;
  623.   end;
  624.   {$EXTERNALSYM _FORM_INFO_1W}
  625.   _FORM_INFO_1W = record
  626.     Flags: DWORD;
  627.     pName: PWideChar;
  628.     Size: TSize;
  629.     ImageableArea: TRect;
  630.   end;
  631.   {$EXTERNALSYM _FORM_INFO_1}
  632.   _FORM_INFO_1 = _FORM_INFO_1A;
  633.   TFormInfo1A = _FORM_INFO_1A;
  634.   TFormInfo1W = _FORM_INFO_1W;
  635.   TFormInfo1 = TFormInfo1A;
  636.   {$EXTERNALSYM FORM_INFO_1A}
  637.   FORM_INFO_1A = _FORM_INFO_1A;
  638.   {$EXTERNALSYM FORM_INFO_1W}
  639.   FORM_INFO_1W = _FORM_INFO_1W;
  640.   {$EXTERNALSYM FORM_INFO_1}
  641.   FORM_INFO_1 = FORM_INFO_1A;
  642.  
  643.   PDocInfo2A = ^TDocInfo2A;
  644.   PDocInfo2W = ^TDocInfo2W;
  645.   PDocInfo2 = PDocInfo2A;
  646.   {$EXTERNALSYM _DOC_INFO_2A}
  647.   _DOC_INFO_2A = record
  648.     pDocName: PAnsiChar;
  649.     pOutputFile: PAnsiChar;
  650.     pDatatype: PAnsiChar;
  651.     dwMode: DWORD;
  652.     JobId: DWORD;
  653.   end;
  654.   {$EXTERNALSYM _DOC_INFO_2W}
  655.   _DOC_INFO_2W = record
  656.     pDocName: PWideChar;
  657.     pOutputFile: PWideChar;
  658.     pDatatype: PWideChar;
  659.     dwMode: DWORD;
  660.     JobId: DWORD;
  661.   end;
  662.   {$EXTERNALSYM _DOC_INFO_2}
  663.   _DOC_INFO_2 = _DOC_INFO_2A;
  664.   TDocInfo2A = _DOC_INFO_2A;
  665.   TDocInfo2W = _DOC_INFO_2W;
  666.   TDocInfo2 = TDocInfo2A;
  667.   {$EXTERNALSYM DOC_INFO_2A}
  668.   DOC_INFO_2A = _DOC_INFO_2A;
  669.   {$EXTERNALSYM DOC_INFO_2W}
  670.   DOC_INFO_2W = _DOC_INFO_2W;
  671.   {$EXTERNALSYM DOC_INFO_2}
  672.   DOC_INFO_2 = DOC_INFO_2A;
  673.  
  674. const
  675.   {$EXTERNALSYM DI_CHANNEL}
  676.   DI_CHANNEL              = 1;    { start direct read/write channel, }
  677.   {$EXTERNALSYM DI_READ_SPOOL_JOB}
  678.   DI_READ_SPOOL_JOB       = 3;
  679.  
  680.   {$EXTERNALSYM FORM_USER}
  681.   FORM_USER           = $00000000;
  682.   {$EXTERNALSYM FORM_BUILTIN}
  683.   FORM_BUILTIN        = $00000001;
  684.   {$EXTERNALSYM FORM_PRINTER}
  685.   FORM_PRINTER        = $00000002;
  686.  
  687. type
  688.   PPrintProcessorInfo1A = ^TPrintProcessorInfo1A;
  689.   PPrintProcessorInfo1W = ^TPrintProcessorInfo1W;
  690.   PPrintProcessorInfo1 = PPrintProcessorInfo1A;
  691.   {$EXTERNALSYM _PRINTPROCESSOR_INFO_1A}
  692.   _PRINTPROCESSOR_INFO_1A = record
  693.     pName: PAnsiChar;
  694.   end;
  695.   {$EXTERNALSYM _PRINTPROCESSOR_INFO_1W}
  696.   _PRINTPROCESSOR_INFO_1W = record
  697.     pName: PWideChar;
  698.   end;
  699.   {$EXTERNALSYM _PRINTPROCESSOR_INFO_1}
  700.   _PRINTPROCESSOR_INFO_1 = _PRINTPROCESSOR_INFO_1A;
  701.   TPrintProcessorInfo1A = _PRINTPROCESSOR_INFO_1A;
  702.   TPrintProcessorInfo1W = _PRINTPROCESSOR_INFO_1W;
  703.   TPrintProcessorInfo1 = TPrintProcessorInfo1A;
  704.   {$EXTERNALSYM PRINTPROCESSOR_INFO_1A}
  705.   PRINTPROCESSOR_INFO_1A = _PRINTPROCESSOR_INFO_1A;
  706.   {$EXTERNALSYM PRINTPROCESSOR_INFO_1W}
  707.   PRINTPROCESSOR_INFO_1W = _PRINTPROCESSOR_INFO_1W;
  708.   {$EXTERNALSYM PRINTPROCESSOR_INFO_1}
  709.   PRINTPROCESSOR_INFO_1 = PRINTPROCESSOR_INFO_1A;
  710.  
  711.   PPortInfo1A = ^TPortInfo1A;
  712.   PPortInfo1W = ^TPortInfo1W;
  713.   PPortInfo1 = PPortInfo1A;
  714.   {$EXTERNALSYM _PORT_INFO_1A}
  715.   _PORT_INFO_1A = record
  716.     pName: PAnsiChar;
  717.   end;
  718.   {$EXTERNALSYM _PORT_INFO_1W}
  719.   _PORT_INFO_1W = record
  720.     pName: PWideChar;
  721.   end;
  722.   {$EXTERNALSYM _PORT_INFO_1}
  723.   _PORT_INFO_1 = _PORT_INFO_1A;
  724.   TPortInfo1A = _PORT_INFO_1A;
  725.   TPortInfo1W = _PORT_INFO_1W;
  726.   TPortInfo1 = TPortInfo1A;
  727.   {$EXTERNALSYM PORT_INFO_1A}
  728.   PORT_INFO_1A = _PORT_INFO_1A;
  729.   {$EXTERNALSYM PORT_INFO_1W}
  730.   PORT_INFO_1W = _PORT_INFO_1W;
  731.   {$EXTERNALSYM PORT_INFO_1}
  732.   PORT_INFO_1 = PORT_INFO_1A;
  733.  
  734.   PPortInfo2A = ^TPortInfo2A;
  735.   PPortInfo2W = ^TPortInfo2W;
  736.   PPortInfo2 = PPortInfo2A;
  737.   {$EXTERNALSYM _PORT_INFO_2A}
  738.   _PORT_INFO_2A = record
  739.     pPortName: PAnsiChar;
  740.     pMonitorName: PAnsiChar;
  741.     pDescription: PAnsiChar;
  742.     fPortType: DWORD;
  743.     Reserved: DWORD;
  744.   end;
  745.   {$EXTERNALSYM _PORT_INFO_2W}
  746.   _PORT_INFO_2W = record
  747.     pPortName: PWideChar;
  748.     pMonitorName: PWideChar;
  749.     pDescription: PWideChar;
  750.     fPortType: DWORD;
  751.     Reserved: DWORD;
  752.   end;
  753.   {$EXTERNALSYM _PORT_INFO_2}
  754.   _PORT_INFO_2 = _PORT_INFO_2A;
  755.   TPortInfo2A = _PORT_INFO_2A;
  756.   TPortInfo2W = _PORT_INFO_2W;
  757.   TPortInfo2 = TPortInfo2A;
  758.   {$EXTERNALSYM PORT_INFO_2A}
  759.   PORT_INFO_2A = _PORT_INFO_2A;
  760.   {$EXTERNALSYM PORT_INFO_2W}
  761.   PORT_INFO_2W = _PORT_INFO_2W;
  762.   {$EXTERNALSYM PORT_INFO_2}
  763.   PORT_INFO_2 = PORT_INFO_2A;
  764.  
  765. const
  766.   {$EXTERNALSYM PORT_TYPE_WRITE}
  767.   PORT_TYPE_WRITE         = $0001;
  768.   {$EXTERNALSYM PORT_TYPE_READ}
  769.   PORT_TYPE_READ          = $0002;
  770.   {$EXTERNALSYM PORT_TYPE_REDIRECTED}
  771.   PORT_TYPE_REDIRECTED    = $0004;
  772.   {$EXTERNALSYM PORT_TYPE_NET_ATTACHED}
  773.   PORT_TYPE_NET_ATTACHED  = $0008;
  774.  
  775. type
  776.   PPortInfo3A = ^TPortInfo3A;
  777.   PPortInfo3W = ^TPortInfo3W;
  778.   PPortInfo3 = PPortInfo3A;
  779.   {$EXTERNALSYM _PORT_INFO_3A}
  780.   _PORT_INFO_3A = record
  781.     dwStatus: DWORD;
  782.     pszStatus: PAnsiChar;
  783.     dwSeverity: DWORD;
  784.   end;
  785.   {$EXTERNALSYM _PORT_INFO_3W}
  786.   _PORT_INFO_3W = record
  787.     dwStatus: DWORD;
  788.     pszStatus: PWideChar;
  789.     dwSeverity: DWORD;
  790.   end;
  791.   {$EXTERNALSYM _PORT_INFO_3}
  792.   _PORT_INFO_3 = _PORT_INFO_3A;
  793.   TPortInfo3A = _PORT_INFO_3A;
  794.   TPortInfo3W = _PORT_INFO_3W;
  795.   TPortInfo3 = TPortInfo3A;
  796.   {$EXTERNALSYM PORT_INFO_3A}
  797.   PORT_INFO_3A = _PORT_INFO_3A;
  798.   {$EXTERNALSYM PORT_INFO_3W}
  799.   PORT_INFO_3W = _PORT_INFO_3W;
  800.   {$EXTERNALSYM PORT_INFO_3}
  801.   PORT_INFO_3 = PORT_INFO_3A;
  802.  
  803. const
  804.   {$EXTERNALSYM PORT_STATUS_TYPE_ERROR}
  805.   PORT_STATUS_TYPE_ERROR          = 1;
  806.   {$EXTERNALSYM PORT_STATUS_TYPE_WARNING}
  807.   PORT_STATUS_TYPE_WARNING        = 2;
  808.   {$EXTERNALSYM PORT_STATUS_TYPE_INFO}
  809.   PORT_STATUS_TYPE_INFO           = 3;
  810.  
  811.   {$EXTERNALSYM PORT_STATUS_OFFLINE}
  812.   PORT_STATUS_OFFLINE             = 1;
  813.   {$EXTERNALSYM PORT_STATUS_PAPER_JAM}
  814.   PORT_STATUS_PAPER_JAM           = 2;
  815.   {$EXTERNALSYM PORT_STATUS_PAPER_OUT}
  816.   PORT_STATUS_PAPER_OUT           = 3;
  817.   {$EXTERNALSYM PORT_STATUS_OUTPUT_BIN_FULL}
  818.   PORT_STATUS_OUTPUT_BIN_FULL     = 4;
  819.   {$EXTERNALSYM PORT_STATUS_PAPER_PROBLEM}
  820.   PORT_STATUS_PAPER_PROBLEM       = 5;
  821.   {$EXTERNALSYM PORT_STATUS_NO_TONER}
  822.   PORT_STATUS_NO_TONER            = 6;
  823.   {$EXTERNALSYM PORT_STATUS_DOOR_OPEN}
  824.   PORT_STATUS_DOOR_OPEN           = 7;
  825.   {$EXTERNALSYM PORT_STATUS_USER_INTERVENTION}
  826.   PORT_STATUS_USER_INTERVENTION   = 8;
  827.   {$EXTERNALSYM PORT_STATUS_OUT_OF_MEMORY}
  828.   PORT_STATUS_OUT_OF_MEMORY       = 9;
  829.  
  830.   {$EXTERNALSYM PORT_STATUS_TONER_LOW}
  831.   PORT_STATUS_TONER_LOW           = 10;
  832.  
  833.   {$EXTERNALSYM PORT_STATUS_WARMING_UP}
  834.   PORT_STATUS_WARMING_UP          = 11;
  835.   {$EXTERNALSYM PORT_STATUS_POWER_SAVE}
  836.   PORT_STATUS_POWER_SAVE          = 12;
  837.  
  838. type
  839.   PMonitorInfo1A = ^TMonitorInfo1A;
  840.   PMonitorInfo1W = ^TMonitorInfo1W;
  841.   PMonitorInfo1 = PMonitorInfo1A;
  842.   {$EXTERNALSYM _MONITOR_INFO_1A}
  843.   _MONITOR_INFO_1A = record
  844.     pName: PAnsiChar;
  845.   end;
  846.   {$EXTERNALSYM _MONITOR_INFO_1W}
  847.   _MONITOR_INFO_1W = record
  848.     pName: PWideChar;
  849.   end;
  850.   {$EXTERNALSYM _MONITOR_INFO_1}
  851.   _MONITOR_INFO_1 = _MONITOR_INFO_1A;
  852.   TMonitorInfo1A = _MONITOR_INFO_1A;
  853.   TMonitorInfo1W = _MONITOR_INFO_1W;
  854.   TMonitorInfo1 = TMonitorInfo1A;
  855.   {$EXTERNALSYM MONITOR_INFO_1A}
  856.   MONITOR_INFO_1A = _MONITOR_INFO_1A;
  857.   {$EXTERNALSYM MONITOR_INFO_1W}
  858.   MONITOR_INFO_1W = _MONITOR_INFO_1W;
  859.   {$EXTERNALSYM MONITOR_INFO_1}
  860.   MONITOR_INFO_1 = MONITOR_INFO_1A;
  861.  
  862.   PMonitorInfo2A = ^TMonitorInfo2A;
  863.   PMonitorInfo2W = ^TMonitorInfo2W;
  864.   PMonitorInfo2 = PMonitorInfo2A;
  865.   {$EXTERNALSYM _MONITOR_INFO_2A}
  866.   _MONITOR_INFO_2A = record
  867.     pName: PAnsiChar;
  868.     pEnvironment: PAnsiChar;
  869.     pDLLName: PAnsiChar;
  870.   end;
  871.   {$EXTERNALSYM _MONITOR_INFO_2W}
  872.   _MONITOR_INFO_2W = record
  873.     pName: PWideChar;
  874.     pEnvironment: PWideChar;
  875.     pDLLName: PWideChar;
  876.   end;
  877.   {$EXTERNALSYM _MONITOR_INFO_2}
  878.   _MONITOR_INFO_2 = _MONITOR_INFO_2A;
  879.   TMonitorInfo2A = _MONITOR_INFO_2A;
  880.   TMonitorInfo2W = _MONITOR_INFO_2W;
  881.   TMonitorInfo2 = TMonitorInfo2A;
  882.   {$EXTERNALSYM MONITOR_INFO_2A}
  883.   MONITOR_INFO_2A = _MONITOR_INFO_2A;
  884.   {$EXTERNALSYM MONITOR_INFO_2W}
  885.   MONITOR_INFO_2W = _MONITOR_INFO_2W;
  886.   {$EXTERNALSYM MONITOR_INFO_2}
  887.   MONITOR_INFO_2 = MONITOR_INFO_2A;
  888.  
  889.   PDatatypesInfo1A = ^TDatatypesInfo1A;
  890.   PDatatypesInfo1W = ^TDatatypesInfo1W;
  891.   PDatatypesInfo1 = PDatatypesInfo1A;
  892.   {$EXTERNALSYM _DATATYPES_INFO_1A}
  893.   _DATATYPES_INFO_1A = record
  894.     pName: PAnsiChar;
  895.   end;
  896.   {$EXTERNALSYM _DATATYPES_INFO_1W}
  897.   _DATATYPES_INFO_1W = record
  898.     pName: PWideChar;
  899.   end;
  900.   {$EXTERNALSYM _DATATYPES_INFO_1}
  901.   _DATATYPES_INFO_1 = _DATATYPES_INFO_1A;
  902.   TDatatypesInfo1A = _DATATYPES_INFO_1A;
  903.   TDatatypesInfo1W = _DATATYPES_INFO_1W;
  904.   TDatatypesInfo1 = TDatatypesInfo1A;
  905.   {$EXTERNALSYM DATATYPES_INFO_1A}
  906.   DATATYPES_INFO_1A = _DATATYPES_INFO_1A;
  907.   {$EXTERNALSYM DATATYPES_INFO_1W}
  908.   DATATYPES_INFO_1W = _DATATYPES_INFO_1W;
  909.   {$EXTERNALSYM DATATYPES_INFO_1}
  910.   DATATYPES_INFO_1 = DATATYPES_INFO_1A;
  911.  
  912.   PPrinterDefaultsA = ^TPrinterDefaultsA;
  913.   PPrinterDefaultsW = ^TPrinterDefaultsW;
  914.   PPrinterDefaults = PPrinterDefaultsA;
  915.   {$EXTERNALSYM _PRINTER_DEFAULTSA}
  916.   _PRINTER_DEFAULTSA = record
  917.     pDatatype: PAnsiChar;
  918.     pDevMode: PDeviceModeA;
  919.     DesiredAccess: ACCESS_MASK;
  920.   end;
  921.   {$EXTERNALSYM _PRINTER_DEFAULTSW}
  922.   _PRINTER_DEFAULTSW = record
  923.     pDatatype: PWideChar;
  924.     pDevMode: PDeviceModeW;
  925.     DesiredAccess: ACCESS_MASK;
  926.   end;
  927.   {$EXTERNALSYM _PRINTER_DEFAULTS}
  928.   _PRINTER_DEFAULTS = _PRINTER_DEFAULTSA;
  929.   TPrinterDefaultsA = _PRINTER_DEFAULTSA;
  930.   TPrinterDefaultsW = _PRINTER_DEFAULTSW;
  931.   TPrinterDefaults = TPrinterDefaultsA;
  932.   {$EXTERNALSYM PRINTER_DEFAULTSA}
  933.   PRINTER_DEFAULTSA = _PRINTER_DEFAULTSA;
  934.   {$EXTERNALSYM PRINTER_DEFAULTSW}
  935.   PRINTER_DEFAULTSW = _PRINTER_DEFAULTSW;
  936.   {$EXTERNALSYM PRINTER_DEFAULTS}
  937.   PRINTER_DEFAULTS = PRINTER_DEFAULTSA;
  938.  
  939. {$EXTERNALSYM EnumPrintersA}
  940. function EnumPrintersA(Flags: DWORD; Name: PAnsiChar; Level: DWORD;
  941.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  942. {$EXTERNALSYM EnumPrintersW}
  943. function EnumPrintersW(Flags: DWORD; Name: PWideChar; Level: DWORD;
  944.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  945. {$EXTERNALSYM EnumPrinters}
  946. function EnumPrinters(Flags: DWORD; Name: PChar; Level: DWORD;
  947.   pPrinterEnum: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  948.  
  949. const
  950.   {$EXTERNALSYM PRINTER_ENUM_DEFAULT}
  951.   PRINTER_ENUM_DEFAULT     = $00000001;
  952.   {$EXTERNALSYM PRINTER_ENUM_LOCAL}
  953.   PRINTER_ENUM_LOCAL       = $00000002;
  954.   {$EXTERNALSYM PRINTER_ENUM_CONNECTIONS}
  955.   PRINTER_ENUM_CONNECTIONS = $00000004;
  956.   {$EXTERNALSYM PRINTER_ENUM_FAVORITE}
  957.   PRINTER_ENUM_FAVORITE    = $00000004;
  958.   {$EXTERNALSYM PRINTER_ENUM_NAME}
  959.   PRINTER_ENUM_NAME        = $00000008;
  960.   {$EXTERNALSYM PRINTER_ENUM_REMOTE}
  961.   PRINTER_ENUM_REMOTE      = $00000010;
  962.   {$EXTERNALSYM PRINTER_ENUM_SHARED}
  963.   PRINTER_ENUM_SHARED      = $00000020;
  964.   {$EXTERNALSYM PRINTER_ENUM_NETWORK}
  965.   PRINTER_ENUM_NETWORK     = $00000040;
  966.  
  967.   {$EXTERNALSYM PRINTER_ENUM_EXPAND}
  968.   PRINTER_ENUM_EXPAND      = $00004000;
  969.   {$EXTERNALSYM PRINTER_ENUM_CONTAINER}
  970.   PRINTER_ENUM_CONTAINER   = $00008000;
  971.  
  972.   {$EXTERNALSYM PRINTER_ENUM_ICONMASK}
  973.   PRINTER_ENUM_ICONMASK    = $00ff0000;
  974.   {$EXTERNALSYM PRINTER_ENUM_ICON1}
  975.   PRINTER_ENUM_ICON1       = $00010000;
  976.   {$EXTERNALSYM PRINTER_ENUM_ICON2}
  977.   PRINTER_ENUM_ICON2       = $00020000;
  978.   {$EXTERNALSYM PRINTER_ENUM_ICON3}
  979.   PRINTER_ENUM_ICON3       = $00040000;
  980.   {$EXTERNALSYM PRINTER_ENUM_ICON4}
  981.   PRINTER_ENUM_ICON4       = $00080000;
  982.   {$EXTERNALSYM PRINTER_ENUM_ICON5}
  983.   PRINTER_ENUM_ICON5       = $00100000;
  984.   {$EXTERNALSYM PRINTER_ENUM_ICON6}
  985.   PRINTER_ENUM_ICON6       = $00200000;
  986.   {$EXTERNALSYM PRINTER_ENUM_ICON7}
  987.   PRINTER_ENUM_ICON7       = $00400000;
  988.   {$EXTERNALSYM PRINTER_ENUM_ICON8}
  989.   PRINTER_ENUM_ICON8       = $00800000;
  990.  
  991. {$EXTERNALSYM OpenPrinterA}
  992. function OpenPrinterA(pPrinterName: PAnsiChar; var phPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
  993. {$EXTERNALSYM OpenPrinterW}
  994. function OpenPrinterW(pPrinterName: PWideChar; var phPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
  995. {$EXTERNALSYM OpenPrinter}
  996. function OpenPrinter(pPrinterName: PChar; var phPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
  997. {$EXTERNALSYM ResetPrinterA}
  998. function ResetPrinterA(hPrinter: THandle; pDefault: PPrinterDefaultsA): BOOL; stdcall;
  999. {$EXTERNALSYM ResetPrinterW}
  1000. function ResetPrinterW(hPrinter: THandle; pDefault: PPrinterDefaultsW): BOOL; stdcall;
  1001. {$EXTERNALSYM ResetPrinter}
  1002. function ResetPrinter(hPrinter: THandle; pDefault: PPrinterDefaults): BOOL; stdcall;
  1003. {$EXTERNALSYM SetJobA}
  1004. function SetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  1005. {$EXTERNALSYM SetJobW}
  1006. function SetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  1007. {$EXTERNALSYM SetJob}
  1008. function SetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; Command: DWORD): BOOL; stdcall;
  1009. {$EXTERNALSYM GetJobA}
  1010. function GetJobA(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1011. {$EXTERNALSYM GetJobW}
  1012. function GetJobW(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1013. {$EXTERNALSYM GetJob}
  1014. function GetJob(hPrinter: THandle; JobId: DWORD; Level: DWORD; pJob: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1015. {$EXTERNALSYM EnumJobsA}
  1016. function EnumJobsA(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  1017.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1018. {$EXTERNALSYM EnumJobsW}
  1019. function EnumJobsW(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  1020.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1021. {$EXTERNALSYM EnumJobs}
  1022. function EnumJobs(hPrinter: THandle; FirstJob, NoJobs, Level: DWORD; pJob: Pointer; cbBuf: DWORD;
  1023.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1024. {$EXTERNALSYM AddPrinterA}
  1025. function AddPrinterA(pName: PAnsiChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  1026. {$EXTERNALSYM AddPrinterW}
  1027. function AddPrinterW(pName: PWideChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  1028. {$EXTERNALSYM AddPrinter}
  1029. function AddPrinter(pName: PChar; Level: DWORD; pPrinter: Pointer): THandle; stdcall;
  1030. {$EXTERNALSYM DeletePrinter}
  1031. function DeletePrinter(hPrinter: THandle): BOOL; stdcall;
  1032. {$EXTERNALSYM SetPrinterA}
  1033. function SetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  1034. {$EXTERNALSYM SetPrinterW}
  1035. function SetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  1036. {$EXTERNALSYM SetPrinter}
  1037. function SetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; Command: DWORD): BOOL; stdcall;
  1038. {$EXTERNALSYM GetPrinterA}
  1039. function GetPrinterA(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1040. {$EXTERNALSYM GetPrinterW}
  1041. function GetPrinterW(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1042. {$EXTERNALSYM GetPrinter}
  1043. function GetPrinter(hPrinter: THandle; Level: DWORD; pPrinter: Pointer; cbBuf: DWORD; pcbNeeded: PDWORD): BOOL; stdcall;
  1044. {$EXTERNALSYM AddPrinterDriverA}
  1045. function AddPrinterDriverA(pName: PAnsiChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  1046. {$EXTERNALSYM AddPrinterDriverW}
  1047. function AddPrinterDriverW(pName: PWideChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  1048. {$EXTERNALSYM AddPrinterDriver}
  1049. function AddPrinterDriver(pName: PChar; Level: DWORD; pDriverInfo: Pointer): BOOL; stdcall;
  1050. {$EXTERNALSYM EnumPrinterDriversA}
  1051. function EnumPrinterDriversA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  1052.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1053. {$EXTERNALSYM EnumPrinterDriversW}
  1054. function EnumPrinterDriversW(pName, pEnvironment: PWideChar; Level: DWORD;
  1055.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1056. {$EXTERNALSYM EnumPrinterDrivers}
  1057. function EnumPrinterDrivers(pName, pEnvironment: PChar; Level: DWORD;
  1058.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1059. {$EXTERNALSYM GetPrinterDriverA}
  1060. function GetPrinterDriverA(hPrinter: THandle; pEnvironment: PAnsiChar; Level: DWORD;
  1061.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1062. {$EXTERNALSYM GetPrinterDriverW}
  1063. function GetPrinterDriverW(hPrinter: THandle; pEnvironment: PWideChar; Level: DWORD;
  1064.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1065. {$EXTERNALSYM GetPrinterDriver}
  1066. function GetPrinterDriver(hPrinter: THandle; pEnvironment: PChar; Level: DWORD;
  1067.   pDriverInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1068. {$EXTERNALSYM GetPrinterDriverDirectoryA}
  1069. function GetPrinterDriverDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  1070.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1071. {$EXTERNALSYM GetPrinterDriverDirectoryW}
  1072. function GetPrinterDriverDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
  1073.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1074. {$EXTERNALSYM GetPrinterDriverDirectory}
  1075. function GetPrinterDriverDirectory(pName, pEnvironment: PChar; Level: DWORD;
  1076.   pDriverDirectory: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1077. {$EXTERNALSYM DeletePrinterDriverA}
  1078. function DeletePrinterDriverA(pName, pEnvironment, pDriverName: PAnsiChar): BOOL; stdcall;
  1079. {$EXTERNALSYM DeletePrinterDriverW}
  1080. function DeletePrinterDriverW(pName, pEnvironment, pDriverName: PWideChar): BOOL; stdcall;
  1081. {$EXTERNALSYM DeletePrinterDriver}
  1082. function DeletePrinterDriver(pName, pEnvironment, pDriverName: PChar): BOOL; stdcall;
  1083. {$EXTERNALSYM AddPrintProcessorA}
  1084. function AddPrintProcessorA(pName, pEnvironment, pPathName, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
  1085. {$EXTERNALSYM AddPrintProcessorW}
  1086. function AddPrintProcessorW(pName, pEnvironment, pPathName, pPrintProcessorName: PWideChar): BOOL; stdcall;
  1087. {$EXTERNALSYM AddPrintProcessor}
  1088. function AddPrintProcessor(pName, pEnvironment, pPathName, pPrintProcessorName: PChar): BOOL; stdcall;
  1089. {$EXTERNALSYM EnumPrintProcessorsA}
  1090. function EnumPrintProcessorsA(pName, pEnvironment: PAnsiChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  1091.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1092. {$EXTERNALSYM EnumPrintProcessorsW}
  1093. function EnumPrintProcessorsW(pName, pEnvironment: PWideChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  1094.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1095. {$EXTERNALSYM EnumPrintProcessors}
  1096. function EnumPrintProcessors(pName, pEnvironment: PChar; Level: DWORD; pPrintProcessorInfo: Pointer;
  1097.   cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1098. {$EXTERNALSYM GetPrintProcessorDirectoryA}
  1099. function GetPrintProcessorDirectoryA(pName, pEnvironment: PAnsiChar; Level: DWORD;
  1100.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1101. {$EXTERNALSYM GetPrintProcessorDirectoryW}
  1102. function GetPrintProcessorDirectoryW(pName, pEnvironment: PWideChar; Level: DWORD;
  1103.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1104. {$EXTERNALSYM GetPrintProcessorDirectory}
  1105. function GetPrintProcessorDirectory(pName, pEnvironment: PChar; Level: DWORD;
  1106.   pPrintProcessorInfo: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1107. {$EXTERNALSYM EnumPrintProcessorDatatypesA}
  1108. function EnumPrintProcessorDatatypesA(pName, pPrintProcessorName: PAnsiChar; Level: DWORD;
  1109.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1110. {$EXTERNALSYM EnumPrintProcessorDatatypesW}
  1111. function EnumPrintProcessorDatatypesW(pName, pPrintProcessorName: PWideChar; Level: DWORD;
  1112.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1113. {$EXTERNALSYM EnumPrintProcessorDatatypes}
  1114. function EnumPrintProcessorDatatypes(pName, pPrintProcessorName: PChar; Level: DWORD;
  1115.   pDatatypes: Pointer; cbBuf: DWORD; var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1116. {$EXTERNALSYM DeletePrintProcessorA}
  1117. function DeletePrintProcessorA(pName, pEnvironment, pPrintProcessorName: PAnsiChar): BOOL; stdcall;
  1118. {$EXTERNALSYM DeletePrintProcessorW}
  1119. function DeletePrintProcessorW(pName, pEnvironment, pPrintProcessorName: PWideChar): BOOL; stdcall;
  1120. {$EXTERNALSYM DeletePrintProcessor}
  1121. function DeletePrintProcessor(pName, pEnvironment, pPrintProcessorName: PChar): BOOL; stdcall;
  1122. {$EXTERNALSYM StartDocPrinterA}
  1123. function StartDocPrinterA(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  1124. {$EXTERNALSYM StartDocPrinterW}
  1125. function StartDocPrinterW(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  1126. {$EXTERNALSYM StartDocPrinter}
  1127. function StartDocPrinter(hPrinter: THandle; Level: DWORD; pDocInfo: Pointer): DWORD; stdcall;
  1128. {$EXTERNALSYM StartPagePrinter}
  1129. function StartPagePrinter(hPrinter: THandle): BOOL; stdcall;
  1130. {$EXTERNALSYM WritePrinter}
  1131. function WritePrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pcWritten: DWORD): BOOL; stdcall;
  1132. {$EXTERNALSYM EndPagePrinter}
  1133. function EndPagePrinter(hPrinter: THandle): BOOL; stdcall;
  1134. {$EXTERNALSYM AbortPrinter}
  1135. function AbortPrinter(hPrinter: THandle): BOOL; stdcall;
  1136. {$EXTERNALSYM ReadPrinter}
  1137. function ReadPrinter(hPrinter: THandle; pBuf: Pointer; cbBuf: DWORD; var pNoBytesRead: DWORD): BOOL; stdcall;
  1138. {$EXTERNALSYM EndDocPrinter}
  1139. function EndDocPrinter(hPrinter: THandle): BOOL; stdcall;
  1140. {$EXTERNALSYM AddJobA}
  1141. function AddJobA(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1142. {$EXTERNALSYM AddJobW}
  1143. function AddJobW(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1144. {$EXTERNALSYM AddJob}
  1145. function AddJob(hPrinter: THandle; Level: DWORD; pData: Pointer; cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1146. {$EXTERNALSYM ScheduleJob}
  1147. function ScheduleJob(hPrinter: THandle; JobId: DWORD): BOOL; stdcall;
  1148. {$EXTERNALSYM PrinterProperties}
  1149. function PrinterProperties(hWnd: HWND; hPrinter: THandle): BOOL; stdcall;
  1150. {$EXTERNALSYM DocumentPropertiesA}
  1151. function DocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
  1152.   const pDevModeOutput: TDeviceModeA; var pDevModeInput: TDeviceModeA;
  1153.   fMode: DWORD): Longint; stdcall;
  1154. {$EXTERNALSYM DocumentPropertiesW}
  1155. function DocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
  1156.   const pDevModeOutput: TDeviceModeW; var pDevModeInput: TDeviceModeW;
  1157.   fMode: DWORD): Longint; stdcall;
  1158. {$EXTERNALSYM DocumentProperties}
  1159. function DocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
  1160.   const pDevModeOutput: TDeviceMode; var pDevModeInput: TDeviceMode;
  1161.   fMode: DWORD): Longint; stdcall;
  1162. {$EXTERNALSYM AdvancedDocumentPropertiesA}
  1163. function AdvancedDocumentPropertiesA(hWnd: HWND; hPrinter: THandle; pDeviceName: PAnsiChar;
  1164.   pDevModeOutput, pDevModeInput: PDeviceModeA): Longint; stdcall;
  1165. {$EXTERNALSYM AdvancedDocumentPropertiesW}
  1166. function AdvancedDocumentPropertiesW(hWnd: HWND; hPrinter: THandle; pDeviceName: PWideChar;
  1167.   pDevModeOutput, pDevModeInput: PDeviceModeW): Longint; stdcall;
  1168. {$EXTERNALSYM AdvancedDocumentProperties}
  1169. function AdvancedDocumentProperties(hWnd: HWND; hPrinter: THandle; pDeviceName: PChar;
  1170.   pDevModeOutput, pDevModeInput: PDeviceMode): Longint; stdcall;
  1171. {$EXTERNALSYM GetPrinterDataA}
  1172. function GetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; pType: PDWORD; pData: Pointer;
  1173.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  1174. {$EXTERNALSYM GetPrinterDataW}
  1175. function GetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; pType: PDWORD; pData: Pointer;
  1176.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  1177. {$EXTERNALSYM GetPrinterData}
  1178. function GetPrinterData(hPrinter: THandle; pValueName: PChar; pType: PDWORD; pData: Pointer;
  1179.   nSize: DWORD; var pcbNeeded: DWORD): DWORD; stdcall;
  1180. function EnumPrinterDataA(hPrinter: THandle; dwIndex: DWORD; pValueName: PAnsiChar;
  1181.   cbValueName: DWORD; var pcbValueName, pType: DWORD; pData: PByte;
  1182.   cbData: DWORD; pcbData: PDWORD): DWORD; stdcall;
  1183. {$EXTERNALSYM EnumPrinterDataA}
  1184. function EnumPrinterDataW(hPrinter: THandle; dwIndex: DWORD; pValueName: PWideChar;
  1185.   cbValueName: DWORD; var pcbValueName, pType: DWORD; pData: PByte;
  1186.   cbData: DWORD; pcbData: PDWORD): DWORD; stdcall;
  1187. {$EXTERNALSYM EnumPrinterDataW}
  1188. function EnumPrinterData(hPrinter: THandle; dwIndex: DWORD; pValueName: PChar;
  1189.   cbValueName: DWORD; var pcbValueName, pType: DWORD; pData: PByte;
  1190.   cbData: DWORD; pcbData: PDWORD): DWORD; stdcall;
  1191. {$EXTERNALSYM EnumPrinterData}
  1192. {$EXTERNALSYM SetPrinterDataA}
  1193. function SetPrinterDataA(hPrinter: THandle; pValueName: PAnsiChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  1194. {$EXTERNALSYM SetPrinterDataW}
  1195. function SetPrinterDataW(hPrinter: THandle; pValueName: PWideChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  1196. {$EXTERNALSYM SetPrinterData}
  1197. function SetPrinterData(hPrinter: THandle; pValueName: PChar; dwType: DWORD; pData: Pointer; cbData: DWORD): DWORD; stdcall;
  1198. function DeletePrinterDataA(hPrinter: THandle; pValueName: PAnsiChar): DWORD; stdcall;
  1199. {$EXTERNALSYM DeletePrinterDataA}
  1200. function DeletePrinterDataW(hPrinter: THandle; pValueName: PWideChar): DWORD; stdcall;
  1201. {$EXTERNALSYM DeletePrinterDataW}
  1202. function DeletePrinterData(hPrinter: THandle; pValueName: PChar): DWORD; stdcall;
  1203. {$EXTERNALSYM DeletePrinterData}
  1204.  
  1205. const
  1206.   {$EXTERNALSYM PRINTER_NOTIFY_TYPE}
  1207.   PRINTER_NOTIFY_TYPE = $00;
  1208.   {$EXTERNALSYM JOB_NOTIFY_TYPE}
  1209.   JOB_NOTIFY_TYPE     = $01;
  1210.  
  1211.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SERVER_NAME}
  1212.   PRINTER_NOTIFY_FIELD_SERVER_NAME             = $00;
  1213.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PRINTER_NAME}
  1214.   PRINTER_NOTIFY_FIELD_PRINTER_NAME            = $01;
  1215.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SHARE_NAME}
  1216.   PRINTER_NOTIFY_FIELD_SHARE_NAME              = $02;
  1217.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PORT_NAME}
  1218.   PRINTER_NOTIFY_FIELD_PORT_NAME               = $03;
  1219.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DRIVER_NAME}
  1220.   PRINTER_NOTIFY_FIELD_DRIVER_NAME             = $04;
  1221.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_COMMENT}
  1222.   PRINTER_NOTIFY_FIELD_COMMENT                 = $05;
  1223.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_LOCATION}
  1224.   PRINTER_NOTIFY_FIELD_LOCATION                = $06;
  1225.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DEVMODE}
  1226.   PRINTER_NOTIFY_FIELD_DEVMODE                 = $07;
  1227.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SEPFILE}
  1228.   PRINTER_NOTIFY_FIELD_SEPFILE                 = $08;
  1229.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR}
  1230.   PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR         = $09;
  1231.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PARAMETERS}
  1232.   PRINTER_NOTIFY_FIELD_PARAMETERS              = $0A;
  1233.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DATATYPE}
  1234.   PRINTER_NOTIFY_FIELD_DATATYPE                = $0B;
  1235.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR}
  1236.   PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR     = $0C;
  1237.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_ATTRIBUTES}
  1238.   PRINTER_NOTIFY_FIELD_ATTRIBUTES              = $0D;
  1239.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PRIORITY}
  1240.   PRINTER_NOTIFY_FIELD_PRIORITY                = $0E;
  1241.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY}
  1242.   PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY        = $0F;
  1243.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_START_TIME}
  1244.   PRINTER_NOTIFY_FIELD_START_TIME              = $10;
  1245.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_UNTIL_TIME}
  1246.   PRINTER_NOTIFY_FIELD_UNTIL_TIME              = $11;
  1247.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_STATUS}
  1248.   PRINTER_NOTIFY_FIELD_STATUS                  = $12;
  1249.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_STATUS_STRING}
  1250.   PRINTER_NOTIFY_FIELD_STATUS_STRING           = $13;
  1251.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_CJOBS}
  1252.   PRINTER_NOTIFY_FIELD_CJOBS                   = $14;
  1253.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_AVERAGE_PPM}
  1254.   PRINTER_NOTIFY_FIELD_AVERAGE_PPM             = $15;
  1255.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_TOTAL_PAGES}
  1256.   PRINTER_NOTIFY_FIELD_TOTAL_PAGES             = $16;
  1257.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_PAGES_PRINTED}
  1258.   PRINTER_NOTIFY_FIELD_PAGES_PRINTED           = $17;
  1259.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_TOTAL_BYTES}
  1260.   PRINTER_NOTIFY_FIELD_TOTAL_BYTES             = $18;
  1261.   {$EXTERNALSYM PRINTER_NOTIFY_FIELD_BYTES_PRINTED}
  1262.   PRINTER_NOTIFY_FIELD_BYTES_PRINTED           = $19;
  1263.  
  1264.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PRINTER_NAME}
  1265.   JOB_NOTIFY_FIELD_PRINTER_NAME                = $00;
  1266.   {$EXTERNALSYM JOB_NOTIFY_FIELD_MACHINE_NAME}
  1267.   JOB_NOTIFY_FIELD_MACHINE_NAME                = $01;
  1268.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PORT_NAME}
  1269.   JOB_NOTIFY_FIELD_PORT_NAME                   = $02;
  1270.   {$EXTERNALSYM JOB_NOTIFY_FIELD_USER_NAME}
  1271.   JOB_NOTIFY_FIELD_USER_NAME                   = $03;
  1272.   {$EXTERNALSYM JOB_NOTIFY_FIELD_NOTIFY_NAME}
  1273.   JOB_NOTIFY_FIELD_NOTIFY_NAME                 = $04;
  1274.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DATATYPE}
  1275.   JOB_NOTIFY_FIELD_DATATYPE                    = $05;
  1276.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PRINT_PROCESSOR}
  1277.   JOB_NOTIFY_FIELD_PRINT_PROCESSOR             = $06;
  1278.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PARAMETERS}
  1279.   JOB_NOTIFY_FIELD_PARAMETERS                  = $07;
  1280.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DRIVER_NAME}
  1281.   JOB_NOTIFY_FIELD_DRIVER_NAME                 = $08;
  1282.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DEVMODE}
  1283.   JOB_NOTIFY_FIELD_DEVMODE                     = $09;
  1284.   {$EXTERNALSYM JOB_NOTIFY_FIELD_STATUS}
  1285.   JOB_NOTIFY_FIELD_STATUS                      = $0A;
  1286.   {$EXTERNALSYM JOB_NOTIFY_FIELD_STATUS_STRING}
  1287.   JOB_NOTIFY_FIELD_STATUS_STRING               = $0B;
  1288.   {$EXTERNALSYM JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR}
  1289.   JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR         = $0C;
  1290.   {$EXTERNALSYM JOB_NOTIFY_FIELD_DOCUMENT}
  1291.   JOB_NOTIFY_FIELD_DOCUMENT                    = $0D;
  1292.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PRIORITY}
  1293.   JOB_NOTIFY_FIELD_PRIORITY                    = $0E;
  1294.   {$EXTERNALSYM JOB_NOTIFY_FIELD_POSITION}
  1295.   JOB_NOTIFY_FIELD_POSITION                    = $0F;
  1296.   {$EXTERNALSYM JOB_NOTIFY_FIELD_SUBMITTED}
  1297.   JOB_NOTIFY_FIELD_SUBMITTED                   = $10;
  1298.   {$EXTERNALSYM JOB_NOTIFY_FIELD_START_TIME}
  1299.   JOB_NOTIFY_FIELD_START_TIME                  = $11;
  1300.   {$EXTERNALSYM JOB_NOTIFY_FIELD_UNTIL_TIME}
  1301.   JOB_NOTIFY_FIELD_UNTIL_TIME                  = $12;
  1302.   {$EXTERNALSYM JOB_NOTIFY_FIELD_TIME}
  1303.   JOB_NOTIFY_FIELD_TIME                        = $13;
  1304.   {$EXTERNALSYM JOB_NOTIFY_FIELD_TOTAL_PAGES}
  1305.   JOB_NOTIFY_FIELD_TOTAL_PAGES                 = $14;
  1306.   {$EXTERNALSYM JOB_NOTIFY_FIELD_PAGES_PRINTED}
  1307.   JOB_NOTIFY_FIELD_PAGES_PRINTED               = $15;
  1308.   {$EXTERNALSYM JOB_NOTIFY_FIELD_TOTAL_BYTES}
  1309.   JOB_NOTIFY_FIELD_TOTAL_BYTES                 = $16;
  1310.   {$EXTERNALSYM JOB_NOTIFY_FIELD_BYTES_PRINTED}
  1311.   JOB_NOTIFY_FIELD_BYTES_PRINTED               = $17;
  1312.  
  1313.  
  1314. type
  1315.   PPrinterNotifyOptionsType = ^TPrinterNotifyOptionsType;
  1316.   {$EXTERNALSYM _PRINTER_NOTIFY_OPTIONS_TYPE}
  1317.   _PRINTER_NOTIFY_OPTIONS_TYPE = record
  1318.     wType: Word;
  1319.     Reserved0: Word;
  1320.     Reserved1: DWORD;
  1321.     Reserved2: DWORD;
  1322.     Count: DWORD;
  1323.     pFields: PWord;
  1324.   end;
  1325.   TPrinterNotifyOptionsType = _PRINTER_NOTIFY_OPTIONS_TYPE;
  1326.   {$EXTERNALSYM PRINTER_NOTIFY_OPTIONS_TYPE}
  1327.   PRINTER_NOTIFY_OPTIONS_TYPE = _PRINTER_NOTIFY_OPTIONS_TYPE;
  1328.  
  1329. const
  1330.   {$EXTERNALSYM PRINTER_NOTIFY_OPTIONS_REFRESH}
  1331.   PRINTER_NOTIFY_OPTIONS_REFRESH  = $01;
  1332.  
  1333. type
  1334.   PPrinterNotifyOptions = ^TPrinterNotifyOptions;
  1335.   {$EXTERNALSYM _PRINTER_NOTIFY_OPTIONS}
  1336.   _PRINTER_NOTIFY_OPTIONS = record
  1337.     Version: DWORD;
  1338.     Flags: DWORD;
  1339.     Count: DWORD;
  1340.     pTypes: PPrinterNotifyOptionsType;
  1341.   end;
  1342.   TPrinterNotifyOptions = _PRINTER_NOTIFY_OPTIONS;
  1343.   {$EXTERNALSYM PRINTER_NOTIFY_OPTIONS}
  1344.   PRINTER_NOTIFY_OPTIONS = _PRINTER_NOTIFY_OPTIONS;
  1345.  
  1346. const
  1347.   {$EXTERNALSYM PRINTER_NOTIFY_INFO_DISCARDED}
  1348.   PRINTER_NOTIFY_INFO_DISCARDED       = $01;
  1349.  
  1350. type
  1351.   PPrinterNotifyInfoData = ^TPrinterNotifyInfoData;
  1352.   {$EXTERNALSYM _PRINTER_NOTIFY_INFO_DATA}
  1353.   _PRINTER_NOTIFY_INFO_DATA = record
  1354.     wType: Word;
  1355.     Field: Word;
  1356.     Reserved: DWORD;
  1357.     Id: DWORD;
  1358.     NotifyData: record
  1359.       case Integer of
  1360.         0: (adwData: array[0..1] of DWORD);
  1361.         1: (Data: record
  1362.               cbBuf: DWORD;
  1363.               pBuf: Pointer;
  1364.             end);
  1365.     end;
  1366.   end;
  1367.   TPrinterNotifyInfoData = _PRINTER_NOTIFY_INFO_DATA;
  1368.   {$EXTERNALSYM PRINTER_NOTIFY_INFO_DATA}
  1369.   PRINTER_NOTIFY_INFO_DATA = _PRINTER_NOTIFY_INFO_DATA;
  1370.  
  1371.   PPrinterNotifyInfo = ^TPrinterNotifyInfo;
  1372.   {$EXTERNALSYM _PRINTER_NOTIFY_INFO}
  1373.   _PRINTER_NOTIFY_INFO = record
  1374.     Version: DWORD;
  1375.     Flags: DWORD;
  1376.     Count: DWORD;
  1377.     aData: array[0..0] of TPrinterNotifyInfoData;
  1378.   end;
  1379.   TPrinterNotifyInfo = _PRINTER_NOTIFY_INFO;
  1380.   {$EXTERNALSYM PRINTER_NOTIFY_INFO}
  1381.   PRINTER_NOTIFY_INFO = _PRINTER_NOTIFY_INFO;
  1382.  
  1383. {$EXTERNALSYM WaitForPrinterChange}
  1384. function WaitForPrinterChange(hPrinter: THandle; Flags: DWORD): DWORD; stdcall;
  1385. {$EXTERNALSYM FindFirstPrinterChangeNotification}
  1386. function FindFirstPrinterChangeNotification(hPrinter: THandle; fdwFlags: DWORD;
  1387.   fdwOptions: DWORD; pPrinterNotifyOptions: Pointer): THandle; stdcall;
  1388. {$EXTERNALSYM FindNextPrinterChangeNotification}
  1389. function FindNextPrinterChangeNotification(hChange: THandle; var pdwChange: DWORD;
  1390.   pvReserved: Pointer; var ppPrinterNotifyInfo: Pointer): BOOL; stdcall;
  1391. {$EXTERNALSYM FreePrinterNotifyInfo}
  1392. function FreePrinterNotifyInfo(pPrinterNotifyInfo: PPrinterNotifyInfo): BOOL; stdcall;
  1393. {$EXTERNALSYM FindClosePrinterChangeNotification}
  1394. function FindClosePrinterChangeNotification(hChange: THandle): BOOL; stdcall;
  1395.  
  1396. const
  1397.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PRINTER}
  1398.   PRINTER_CHANGE_ADD_PRINTER              = $00000001;
  1399.   {$EXTERNALSYM PRINTER_CHANGE_SET_PRINTER}
  1400.   PRINTER_CHANGE_SET_PRINTER              = $00000002;
  1401.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PRINTER}
  1402.   PRINTER_CHANGE_DELETE_PRINTER           = $00000004;
  1403.   {$EXTERNALSYM PRINTER_CHANGE_FAILED_CONNECTION_PRINTER}
  1404.   PRINTER_CHANGE_FAILED_CONNECTION_PRINTER    = $00000008;
  1405.   {$EXTERNALSYM PRINTER_CHANGE_PRINTER}
  1406.   PRINTER_CHANGE_PRINTER                  = $000000FF;
  1407.   {$EXTERNALSYM PRINTER_CHANGE_ADD_JOB}
  1408.   PRINTER_CHANGE_ADD_JOB                  = $00000100;
  1409.   {$EXTERNALSYM PRINTER_CHANGE_SET_JOB}
  1410.   PRINTER_CHANGE_SET_JOB                  = $00000200;
  1411.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_JOB}
  1412.   PRINTER_CHANGE_DELETE_JOB               = $00000400;
  1413.   {$EXTERNALSYM PRINTER_CHANGE_WRITE_JOB}
  1414.   PRINTER_CHANGE_WRITE_JOB                = $00000800;
  1415.   {$EXTERNALSYM PRINTER_CHANGE_JOB}
  1416.   PRINTER_CHANGE_JOB                      = $0000FF00;
  1417.   {$EXTERNALSYM PRINTER_CHANGE_ADD_FORM}
  1418.   PRINTER_CHANGE_ADD_FORM                 = $00010000;
  1419.   {$EXTERNALSYM PRINTER_CHANGE_SET_FORM}
  1420.   PRINTER_CHANGE_SET_FORM                 = $00020000;
  1421.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_FORM}
  1422.   PRINTER_CHANGE_DELETE_FORM              = $00040000;
  1423.   {$EXTERNALSYM PRINTER_CHANGE_FORM}
  1424.   PRINTER_CHANGE_FORM                     = $00070000;
  1425.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PORT}
  1426.   PRINTER_CHANGE_ADD_PORT                 = $00100000;
  1427.   {$EXTERNALSYM PRINTER_CHANGE_CONFIGURE_PORT}
  1428.   PRINTER_CHANGE_CONFIGURE_PORT           = $00200000;
  1429.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PORT}
  1430.   PRINTER_CHANGE_DELETE_PORT              = $00400000;
  1431.   {$EXTERNALSYM PRINTER_CHANGE_PORT}
  1432.   PRINTER_CHANGE_PORT                     = $00700000;
  1433.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PRINT_PROCESSOR}
  1434.   PRINTER_CHANGE_ADD_PRINT_PROCESSOR      = $01000000;
  1435.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PRINT_PROCESSOR}
  1436.   PRINTER_CHANGE_DELETE_PRINT_PROCESSOR   = $04000000;
  1437.   {$EXTERNALSYM PRINTER_CHANGE_PRINT_PROCESSOR}
  1438.   PRINTER_CHANGE_PRINT_PROCESSOR          = $07000000;
  1439.   {$EXTERNALSYM PRINTER_CHANGE_ADD_PRINTER_DRIVER}
  1440.   PRINTER_CHANGE_ADD_PRINTER_DRIVER       = $10000000;
  1441.   {$EXTERNALSYM PRINTER_CHANGE_SET_PRINTER_DRIVER}
  1442.   PRINTER_CHANGE_SET_PRINTER_DRIVER       = $20000000;
  1443.   {$EXTERNALSYM PRINTER_CHANGE_DELETE_PRINTER_DRIVER}
  1444.   PRINTER_CHANGE_DELETE_PRINTER_DRIVER    = $40000000;
  1445.   {$EXTERNALSYM PRINTER_CHANGE_PRINTER_DRIVER}
  1446.   PRINTER_CHANGE_PRINTER_DRIVER           = $70000000;
  1447.   {$EXTERNALSYM PRINTER_CHANGE_TIMEOUT}
  1448.   PRINTER_CHANGE_TIMEOUT                  = $80000000;
  1449.   {$EXTERNALSYM PRINTER_CHANGE_ALL}
  1450.   PRINTER_CHANGE_ALL                      = $7777FFFF;
  1451.  
  1452. {$EXTERNALSYM PrinterMessageBoxA}
  1453. function PrinterMessageBoxA(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PAnsiChar;
  1454.   dwType: DWORD): DWORD; stdcall;
  1455. {$EXTERNALSYM PrinterMessageBoxW}
  1456. function PrinterMessageBoxW(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PWideChar;
  1457.   dwType: DWORD): DWORD; stdcall;
  1458. {$EXTERNALSYM PrinterMessageBox}
  1459. function PrinterMessageBox(hPrinter: THandle; Error: DWORD; hWnd: HWND; pText, pCaption: PChar;
  1460.   dwType: DWORD): DWORD; stdcall;
  1461.  
  1462. const
  1463.   {$EXTERNALSYM PRINTER_ERROR_INFORMATION}
  1464.   PRINTER_ERROR_INFORMATION   = $80000000;
  1465.   {$EXTERNALSYM PRINTER_ERROR_WARNING}
  1466.   PRINTER_ERROR_WARNING       = $40000000;
  1467.   {$EXTERNALSYM PRINTER_ERROR_SEVERE}
  1468.   PRINTER_ERROR_SEVERE        = $20000000;
  1469.  
  1470.   {$EXTERNALSYM PRINTER_ERROR_OUTOFPAPER}
  1471.   PRINTER_ERROR_OUTOFPAPER    = $00000001;
  1472.   {$EXTERNALSYM PRINTER_ERROR_JAM}
  1473.   PRINTER_ERROR_JAM           = $00000002;
  1474.   {$EXTERNALSYM PRINTER_ERROR_OUTOFTONER}
  1475.   PRINTER_ERROR_OUTOFTONER    = $00000004;
  1476.  
  1477. {$EXTERNALSYM ClosePrinter}
  1478. function ClosePrinter(hPrinter: THandle): BOOL; stdcall;
  1479. {$EXTERNALSYM AddFormA}
  1480. function AddFormA(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1481. {$EXTERNALSYM AddFormW}
  1482. function AddFormW(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1483. {$EXTERNALSYM AddForm}
  1484. function AddForm(hPrinter: THandle; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1485. {$EXTERNALSYM DeleteFormA}
  1486. function DeleteFormA(hPrinter: THandle; pFormName: PAnsiChar): BOOL; stdcall;
  1487. {$EXTERNALSYM DeleteFormW}
  1488. function DeleteFormW(hPrinter: THandle; pFormName: PWideChar): BOOL; stdcall;
  1489. {$EXTERNALSYM DeleteForm}
  1490. function DeleteForm(hPrinter: THandle; pFormName: PChar): BOOL; stdcall;
  1491. {$EXTERNALSYM GetFormA}
  1492. function GetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer;
  1493.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1494. {$EXTERNALSYM GetFormW}
  1495. function GetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer;
  1496.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1497. {$EXTERNALSYM GetForm}
  1498. function GetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer;
  1499.   cbBuf: DWORD; var pcbNeeded: DWORD): BOOL; stdcall;
  1500. {$EXTERNALSYM SetFormA}
  1501. function SetFormA(hPrinter: THandle; pFormName: PAnsiChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1502. {$EXTERNALSYM SetFormW}
  1503. function SetFormW(hPrinter: THandle; pFormName: PWideChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1504. {$EXTERNALSYM SetForm}
  1505. function SetForm(hPrinter: THandle; pFormName: PChar; Level: DWORD; pForm: Pointer): BOOL; stdcall;
  1506. {$EXTERNALSYM EnumFormsA}
  1507. function EnumFormsA(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  1508.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1509. {$EXTERNALSYM EnumFormsW}
  1510. function EnumFormsW(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  1511.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1512. {$EXTERNALSYM EnumForms}
  1513. function EnumForms(hPrinter: THandle; Level: DWORD; pForm: Pointer; cbBuf: DWORD;
  1514.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1515. {$EXTERNALSYM EnumMonitorsA}
  1516. function EnumMonitorsA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  1517.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1518. {$EXTERNALSYM EnumMonitorsW}
  1519. function EnumMonitorsW(pName: PWideChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  1520.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1521. {$EXTERNALSYM EnumMonitors}
  1522. function EnumMonitors(pName: PChar; Level: DWORD; pMonitors: Pointer; cbBuf: DWORD;
  1523.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1524. {$EXTERNALSYM AddMonitorA}
  1525. function AddMonitorA(pName: PAnsiChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  1526. {$EXTERNALSYM AddMonitorW}
  1527. function AddMonitorW(pName: PWideChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  1528. {$EXTERNALSYM AddMonitor}
  1529. function AddMonitor(pName: PChar; Level: DWORD; pMonitors: Pointer): BOOL; stdcall;
  1530. {$EXTERNALSYM DeleteMonitorA}
  1531. function DeleteMonitorA(pName, pEnvironment, pMonitorName: PAnsiChar): BOOL; stdcall;
  1532. {$EXTERNALSYM DeleteMonitorW}
  1533. function DeleteMonitorW(pName, pEnvironment, pMonitorName: PWideChar): BOOL; stdcall;
  1534. {$EXTERNALSYM DeleteMonitor}
  1535. function DeleteMonitor(pName, pEnvironment, pMonitorName: PChar): BOOL; stdcall;
  1536. {$EXTERNALSYM EnumPortsA}
  1537. function EnumPortsA(pName: PAnsiChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  1538.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1539. {$EXTERNALSYM EnumPortsW}
  1540. function EnumPortsW(pName: PWideChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  1541.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1542. {$EXTERNALSYM EnumPorts}
  1543. function EnumPorts(pName: PChar; Level: DWORD; pPorts: Pointer; cbBuf: DWORD;
  1544.   var pcbNeeded, pcReturned: DWORD): BOOL; stdcall;
  1545. {$EXTERNALSYM AddPortA}
  1546. function AddPortA(pName: PAnsiChar; hWnd: HWND; pMonitorName: PAnsiChar): BOOL; stdcall;
  1547. {$EXTERNALSYM AddPortW}
  1548. function AddPortW(pName: PWideChar; hWnd: HWND; pMonitorName: PWideChar): BOOL; stdcall;
  1549. {$EXTERNALSYM AddPort}
  1550. function AddPort(pName: PChar; hWnd: HWND; pMonitorName: PChar): BOOL; stdcall;
  1551. {$EXTERNALSYM ConfigurePortA}
  1552. function ConfigurePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
  1553. {$EXTERNALSYM ConfigurePortW}
  1554. function ConfigurePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
  1555. {$EXTERNALSYM ConfigurePort}
  1556. function ConfigurePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
  1557. {$EXTERNALSYM DeletePortA}
  1558. function DeletePortA(pName: PAnsiChar; hWnd: HWND; pPortName: PAnsiChar): BOOL; stdcall;
  1559. {$EXTERNALSYM DeletePortW}
  1560. function DeletePortW(pName: PWideChar; hWnd: HWND; pPortName: PWideChar): BOOL; stdcall;
  1561. {$EXTERNALSYM DeletePort}
  1562. function DeletePort(pName: PChar; hWnd: HWND; pPortName: PChar): BOOL; stdcall;
  1563. function SetPortA(pName, pPortName: PAnsiChar; dwLevel: DWORD; pPortInfo: Pointer): BOOL; stdcall;
  1564. {$EXTERNALSYM SetPortA}
  1565. function SetPortW(pName, pPortName: PWideChar; dwLevel: DWORD; pPortInfo: Pointer): BOOL; stdcall;
  1566. {$EXTERNALSYM SetPortW}
  1567. function SetPort(pName, pPortName: PChar; dwLevel: DWORD; pPortInfo: Pointer): BOOL; stdcall;
  1568. {$EXTERNALSYM SetPort}
  1569. {$EXTERNALSYM AddPrinterConnectionA}
  1570. function AddPrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
  1571. {$EXTERNALSYM AddPrinterConnectionW}
  1572. function AddPrinterConnectionW(pName: PWideChar): BOOL; stdcall;
  1573. {$EXTERNALSYM AddPrinterConnection}
  1574. function AddPrinterConnection(pName: PChar): BOOL; stdcall;
  1575. {$EXTERNALSYM DeletePrinterConnectionA}
  1576. function DeletePrinterConnectionA(pName: PAnsiChar): BOOL; stdcall;
  1577. {$EXTERNALSYM DeletePrinterConnectionW}
  1578. function DeletePrinterConnectionW(pName: PWideChar): BOOL; stdcall;
  1579. {$EXTERNALSYM DeletePrinterConnection}
  1580. function DeletePrinterConnection(pName: PChar): BOOL; stdcall;
  1581. {$EXTERNALSYM ConnectToPrinterDlg}
  1582. function ConnectToPrinterDlg(hwnd: HWND; Flags: DWORD): THandle; stdcall;
  1583.  
  1584. type
  1585.   PProvidorInfo1A = ^TProvidorInfo1A;
  1586.   PProvidorInfo1W = ^TProvidorInfo1W;
  1587.   PProvidorInfo1 = PProvidorInfo1A;
  1588.   {$EXTERNALSYM _PROVIDOR_INFO_1A}
  1589.   _PROVIDOR_INFO_1A = record
  1590.     pName: PAnsiChar;
  1591.     pEnvironment: PAnsiChar;
  1592.     pDLLName: PAnsiChar;
  1593.   end;
  1594.   {$EXTERNALSYM _PROVIDOR_INFO_1W}
  1595.   _PROVIDOR_INFO_1W = record
  1596.     pName: PWideChar;
  1597.     pEnvironment: PWideChar;
  1598.     pDLLName: PWideChar;
  1599.   end;
  1600.   {$EXTERNALSYM _PROVIDOR_INFO_1}
  1601.   _PROVIDOR_INFO_1 = _PROVIDOR_INFO_1A;
  1602.   TProvidorInfo1A = _PROVIDOR_INFO_1A;
  1603.   TProvidorInfo1W = _PROVIDOR_INFO_1W;
  1604.   TProvidorInfo1 = TProvidorInfo1A;
  1605.   {$EXTERNALSYM PROVIDOR_INFO_1A}
  1606.   PROVIDOR_INFO_1A = _PROVIDOR_INFO_1A;
  1607.   {$EXTERNALSYM PROVIDOR_INFO_1W}
  1608.   PROVIDOR_INFO_1W = _PROVIDOR_INFO_1W;
  1609.   {$EXTERNALSYM PROVIDOR_INFO_1}
  1610.   PROVIDOR_INFO_1 = PROVIDOR_INFO_1A;
  1611.  
  1612. {$EXTERNALSYM AddPrintProvidorA}
  1613. function AddPrintProvidorA(pName: PAnsiChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1614. {$EXTERNALSYM AddPrintProvidorW}
  1615. function AddPrintProvidorW(pName: PWideChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1616. {$EXTERNALSYM AddPrintProvidor}
  1617. function AddPrintProvidor(pName: PChar; level: DWORD; pProvidorInfo: Pointer): BOOL; stdcall;
  1618. {$EXTERNALSYM DeletePrintProvidorA}
  1619. function DeletePrintProvidorA(pName, pEnvironment, pPrintProvidorName: PAnsiChar): BOOL; stdcall;
  1620. {$EXTERNALSYM DeletePrintProvidorW}
  1621. function DeletePrintProvidorW(pName, pEnvironment, pPrintProvidorName: PWideChar): BOOL; stdcall;
  1622. {$EXTERNALSYM DeletePrintProvidor}
  1623. function DeletePrintProvidor(pName, pEnvironment, pPrintProvidorName: PChar): BOOL; stdcall;
  1624.  
  1625. { SetPrinterData and GetPrinterData Server Handle Key values }
  1626.  
  1627. const
  1628.   {$EXTERNALSYM SPLREG_DEFAULT_SPOOL_DIRECTORY}
  1629.   SPLREG_DEFAULT_SPOOL_DIRECTORY                    = 'DefaultSpoolDirectory';
  1630.   {$EXTERNALSYM SPLREG_PORT_THREAD_PRIORITY_DEFAULT}
  1631.   SPLREG_PORT_THREAD_PRIORITY_DEFAULT               = 'PortThreadPriorityDefault';
  1632.   {$EXTERNALSYM SPLREG_PORT_THREAD_PRIORITY}
  1633.   SPLREG_PORT_THREAD_PRIORITY                       = 'PortThreadPriority';
  1634.   {$EXTERNALSYM SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT}
  1635.   SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT          = 'SchedulerThreadPriorityDefault';
  1636.   {$EXTERNALSYM SPLREG_SCHEDULER_THREAD_PRIORITY}
  1637.   SPLREG_SCHEDULER_THREAD_PRIORITY                  = 'SchedulerThreadPriority';
  1638.   {$EXTERNALSYM SPLREG_BEEP_ENABLED}
  1639.   SPLREG_BEEP_ENABLED                               = 'BeepEnabled';
  1640.   {$EXTERNALSYM SPLREG_NET_POPUP}
  1641.   SPLREG_NET_POPUP                                  = 'NetPopup';
  1642.   {$EXTERNALSYM SPLREG_EVENT_LOG}
  1643.   SPLREG_EVENT_LOG                                  = 'EventLog';
  1644.   {$EXTERNALSYM SPLREG_MAJOR_VERSION}
  1645.   SPLREG_MAJOR_VERSION                              = 'MajorVersion';
  1646.   {$EXTERNALSYM SPLREG_MINOR_VERSION}
  1647.   SPLREG_MINOR_VERSION                              = 'MinorVersion';
  1648.   {$EXTERNALSYM SPLREG_ARCHITECTURE}
  1649.   SPLREG_ARCHITECTURE                               = 'Architecture';
  1650.  
  1651.  
  1652.   {$EXTERNALSYM SERVER_ACCESS_ADMINISTER}
  1653.   SERVER_ACCESS_ADMINISTER    = $00000001;
  1654.   {$EXTERNALSYM SERVER_ACCESS_ENUMERATE}
  1655.   SERVER_ACCESS_ENUMERATE     = $00000002;
  1656.   {$EXTERNALSYM PRINTER_ACCESS_ADMINISTER}
  1657.   PRINTER_ACCESS_ADMINISTER   = $00000004;
  1658.   {$EXTERNALSYM PRINTER_ACCESS_USE}
  1659.   PRINTER_ACCESS_USE          = $00000008;
  1660.   {$EXTERNALSYM JOB_ACCESS_ADMINISTER}
  1661.   JOB_ACCESS_ADMINISTER       = $00000010;
  1662.  
  1663. { Access rights for print servers }
  1664.  
  1665.   {$EXTERNALSYM SERVER_ALL_ACCESS}
  1666.   SERVER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
  1667.     SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
  1668.   {$EXTERNALSYM SERVER_READ}
  1669.   SERVER_READ = (STANDARD_RIGHTS_READ or SERVER_ACCESS_ENUMERATE);
  1670.   {$EXTERNALSYM SERVER_WRITE}
  1671.   SERVER_WRITE = (STANDARD_RIGHTS_WRITE or
  1672.     SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE);
  1673.   {$EXTERNALSYM SERVER_EXECUTE}
  1674.   SERVER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or SERVER_ACCESS_ENUMERATE);
  1675.  
  1676. { Access rights for printers }
  1677.  
  1678.   {$EXTERNALSYM PRINTER_ALL_ACCESS}
  1679.   PRINTER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or
  1680.     PRINTER_ACCESS_ADMINISTER or PRINTER_ACCESS_USE);
  1681.   {$EXTERNALSYM PRINTER_READ}
  1682.   PRINTER_READ = (STANDARD_RIGHTS_READ or PRINTER_ACCESS_USE);
  1683.   {$EXTERNALSYM PRINTER_WRITE}
  1684.   PRINTER_WRITE = (STANDARD_RIGHTS_WRITE or PRINTER_ACCESS_USE);
  1685.   {$EXTERNALSYM PRINTER_EXECUTE}
  1686.   PRINTER_EXECUTE = (STANDARD_RIGHTS_EXECUTE or PRINTER_ACCESS_USE);
  1687.  
  1688. { Access rights for jobs }
  1689.  
  1690.   {$EXTERNALSYM JOB_ALL_ACCESS}
  1691.   JOB_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED or JOB_ACCESS_ADMINISTER);
  1692.   {$EXTERNALSYM JOB_READ}
  1693.   JOB_READ = (STANDARD_RIGHTS_READ or JOB_ACCESS_ADMINISTER);
  1694.   {$EXTERNALSYM JOB_WRITE}
  1695.   JOB_WRITE = (STANDARD_RIGHTS_WRITE or JOB_ACCESS_ADMINISTER);
  1696.   {$EXTERNALSYM JOB_EXECUTE}
  1697.   JOB_EXECUTE = (STANDARD_RIGHTS_EXECUTE or JOB_ACCESS_ADMINISTER);
  1698.  
  1699. {$EXTERNALSYM DeviceCapabilitiesA}
  1700. function DeviceCapabilitiesA(pDevice, pPort: PAnsiChar; fwCapability: Word;
  1701.   pOutput: PAnsiChar; DevMode: PDeviceModeA): Integer; stdcall;
  1702. {$EXTERNALSYM DeviceCapabilitiesW}
  1703. function DeviceCapabilitiesW(pDevice, pPort: PWideChar; fwCapability: Word;
  1704.   pOutput: PWideChar; DevMode: PDeviceModeW): Integer; stdcall;
  1705. {$EXTERNALSYM DeviceCapabilities}
  1706. function DeviceCapabilities(pDevice, pPort: PChar; fwCapability: Word;
  1707.   pOutput: PChar; DevMode: PDeviceMode): Integer; stdcall;
  1708.  
  1709. const
  1710.   winspl = 'winspool.drv';
  1711.  
  1712. implementation
  1713.  
  1714. function AbortPrinter; external winspl name 'AbortPrinter';
  1715. function AddFormA; external winspl name 'AddFormA';
  1716. function AddFormW; external winspl name 'AddFormW';
  1717. function AddForm; external winspl name 'AddFormA';
  1718. function AddJobA; external winspl name 'AddJobA';
  1719. function AddJobW; external winspl name 'AddJobW';
  1720. function AddJob; external winspl name 'AddJobA';
  1721. function AddMonitorA; external winspl name 'AddMonitorA';
  1722. function AddMonitorW; external winspl name 'AddMonitorW';
  1723. function AddMonitor; external winspl name 'AddMonitorA';
  1724. function AddPortA; external winspl name 'AddPortA';
  1725. function AddPortW; external winspl name 'AddPortW';
  1726. function AddPort; external winspl name 'AddPortA';
  1727. function AddPrinterA; external winspl name 'AddPrinterA';
  1728. function AddPrinterW; external winspl name 'AddPrinterW';
  1729. function AddPrinter; external winspl name 'AddPrinterA';
  1730. function AddPrinterConnectionA; external winspl name 'AddPrinterConnectionA';
  1731. function AddPrinterConnectionW; external winspl name 'AddPrinterConnectionW';
  1732. function AddPrinterConnection; external winspl name 'AddPrinterConnectionA';
  1733. function AddPrinterDriverA; external winspl name 'AddPrinterDriverA';
  1734. function AddPrinterDriverW; external winspl name 'AddPrinterDriverW';
  1735. function AddPrinterDriver; external winspl name 'AddPrinterDriverA';
  1736. function AddPrintProcessorA; external winspl name 'AddPrintProcessorA';
  1737. function AddPrintProcessorW; external winspl name 'AddPrintProcessorW';
  1738. function AddPrintProcessor; external winspl name 'AddPrintProcessorA';
  1739. function AddPrintProvidorA; external winspl name 'AddPrintProvidorA';
  1740. function AddPrintProvidorW; external winspl name 'AddPrintProvidorW';
  1741. function AddPrintProvidor; external winspl name 'AddPrintProvidorA';
  1742. function AdvancedDocumentPropertiesA; external winspl name 'AdvancedDocumentPropertiesA';
  1743. function AdvancedDocumentPropertiesW; external winspl name 'AdvancedDocumentPropertiesW';
  1744. function AdvancedDocumentProperties; external winspl name 'AdvancedDocumentPropertiesA';
  1745. function ClosePrinter; external winspl name 'ClosePrinter';
  1746. function ConfigurePortA; external winspl name 'ConfigurePortA';
  1747. function ConfigurePortW; external winspl name 'ConfigurePortW';
  1748. function ConfigurePort; external winspl name 'ConfigurePortA';
  1749. function ConnectToPrinterDlg; external winspl name 'ConnectToPrinterDlg';
  1750. function DeleteFormA; external winspl name 'DeleteFormA';
  1751. function DeleteFormW; external winspl name 'DeleteFormW';
  1752. function DeleteForm; external winspl name 'DeleteFormA';
  1753. function DeleteMonitorA; external winspl name 'DeleteMonitorA';
  1754. function DeleteMonitorW; external winspl name 'DeleteMonitorW';
  1755. function DeleteMonitor; external winspl name 'DeleteMonitorA';
  1756. function DeletePortA; external winspl name 'DeletePortA';
  1757. function DeletePortW; external winspl name 'DeletePortW';
  1758. function DeletePort; external winspl name 'DeletePortA';
  1759. function DeletePrinter; external winspl name 'DeletePrinter';
  1760. function DeletePrinterConnectionA; external winspl name 'DeletePrinterConnectionA';
  1761. function DeletePrinterConnectionW; external winspl name 'DeletePrinterConnectionW';
  1762. function DeletePrinterConnection; external winspl name 'DeletePrinterConnectionA';
  1763. function DeletePrinterDataA; external winspl name 'DeletePrinterDataA';
  1764. function DeletePrinterDataW; external winspl name 'DeletePrinterDataW';
  1765. function DeletePrinterData; external winspl name 'DeletePrinterDataA';
  1766. function DeletePrinterDriverA; external winspl name 'DeletePrinterDriverA';
  1767. function DeletePrinterDriverW; external winspl name 'DeletePrinterDriverW';
  1768. function DeletePrinterDriver; external winspl name 'DeletePrinterDriverA';
  1769. function DeletePrintProcessorA; external winspl name 'DeletePrintProcessorA';
  1770. function DeletePrintProcessorW; external winspl name 'DeletePrintProcessorW';
  1771. function DeletePrintProcessor; external winspl name 'DeletePrintProcessorA';
  1772. function DeletePrintProvidorA; external winspl name 'DeletePrintProvidorA';
  1773. function DeletePrintProvidorW; external winspl name 'DeletePrintProvidorW';
  1774. function DeletePrintProvidor; external winspl name 'DeletePrintProvidorA';
  1775. function DeviceCapabilitiesA; external winspl name 'DeviceCapabilitiesA';
  1776. function DeviceCapabilitiesW; external winspl name 'DeviceCapabilitiesW';
  1777. function DeviceCapabilities; external winspl name 'DeviceCapabilitiesA';
  1778. function DocumentPropertiesA; external winspl name 'DocumentPropertiesA';
  1779. function DocumentPropertiesW; external winspl name 'DocumentPropertiesW';
  1780. function DocumentProperties; external winspl name 'DocumentPropertiesA';
  1781. function EndDocPrinter; external winspl name 'EndDocPrinter';
  1782. function EndPagePrinter; external winspl name 'EndPagePrinter';
  1783. function EnumFormsA; external winspl name 'EnumFormsA';
  1784. function EnumFormsW; external winspl name 'EnumFormsW';
  1785. function EnumForms; external winspl name 'EnumFormsA';
  1786. function EnumJobsA; external winspl name 'EnumJobsA';
  1787. function EnumJobsW; external winspl name 'EnumJobsW';
  1788. function EnumJobs; external winspl name 'EnumJobsA';
  1789. function EnumMonitorsA; external winspl name 'EnumMonitorsA';
  1790. function EnumMonitorsW; external winspl name 'EnumMonitorsW';
  1791. function EnumMonitors; external winspl name 'EnumMonitorsA';
  1792. function EnumPortsA; external winspl name 'EnumPortsA';
  1793. function EnumPortsW; external winspl name 'EnumPortsW';
  1794. function EnumPorts; external winspl name 'EnumPortsA';
  1795. function EnumPrinterDataA; external winspl name 'EnumPrinterDataA';
  1796. function EnumPrinterDataW; external winspl name 'EnumPrinterDataW';
  1797. function EnumPrinterData; external winspl name 'EnumPrinterDataA';
  1798. function EnumPrinterDriversA; external winspl name 'EnumPrinterDriversA';
  1799. function EnumPrinterDriversW; external winspl name 'EnumPrinterDriversW';
  1800. function EnumPrinterDrivers; external winspl name 'EnumPrinterDriversA';
  1801. function EnumPrintersA; external winspl name 'EnumPrintersA';
  1802. function EnumPrintersW; external winspl name 'EnumPrintersW';
  1803. function EnumPrinters; external winspl name 'EnumPrintersA';
  1804. function EnumPrintProcessorDatatypesA; external winspl name 'EnumPrintProcessorDatatypesA';
  1805. function EnumPrintProcessorDatatypesW; external winspl name 'EnumPrintProcessorDatatypesW';
  1806. function EnumPrintProcessorDatatypes; external winspl name 'EnumPrintProcessorDatatypesA';
  1807. function EnumPrintProcessorsA; external winspl name 'EnumPrintProcessorsA';
  1808. function EnumPrintProcessorsW; external winspl name 'EnumPrintProcessorsW';
  1809. function EnumPrintProcessors; external winspl name 'EnumPrintProcessorsA';
  1810. function FindClosePrinterChangeNotification; external winspl name 'FindClosePrinterChangeNotification';
  1811. function FindFirstPrinterChangeNotification; external winspl name 'FindFirstPrinterChangeNotification';
  1812. function FindNextPrinterChangeNotification; external winspl name 'FindNextPrinterChangeNotification';
  1813. function FreePrinterNotifyInfo; external winspl name 'FreePrinterNotifyInfo';
  1814. function GetFormA; external winspl name 'GetFormA';
  1815. function GetFormW; external winspl name 'GetFormW';
  1816. function GetForm; external winspl name 'GetFormA';
  1817. function GetJobA; external winspl name 'GetJobA';
  1818. function GetJobW; external winspl name 'GetJobW';
  1819. function GetJob; external winspl name 'GetJobA';
  1820. function GetPrinterA; external winspl name 'GetPrinterA';
  1821. function GetPrinterW; external winspl name 'GetPrinterW';
  1822. function GetPrinter; external winspl name 'GetPrinterA';
  1823. function GetPrinterDataA; external winspl name 'GetPrinterDataA';
  1824. function GetPrinterDataW; external winspl name 'GetPrinterDataW';
  1825. function GetPrinterData; external winspl name 'GetPrinterDataA';
  1826. function GetPrinterDriverA; external winspl name 'GetPrinterDriverA';
  1827. function GetPrinterDriverW; external winspl name 'GetPrinterDriverW';
  1828. function GetPrinterDriver; external winspl name 'GetPrinterDriverA';
  1829. function GetPrinterDriverDirectoryA; external winspl name 'GetPrinterDriverDirectoryA';
  1830. function GetPrinterDriverDirectoryW; external winspl name 'GetPrinterDriverDirectoryW';
  1831. function GetPrinterDriverDirectory; external winspl name 'GetPrinterDriverDirectoryA';
  1832. function GetPrintProcessorDirectoryA; external winspl name 'GetPrintProcessorDirectoryA';
  1833. function GetPrintProcessorDirectoryW; external winspl name 'GetPrintProcessorDirectoryW';
  1834. function GetPrintProcessorDirectory; external winspl name 'GetPrintProcessorDirectoryA';
  1835. function OpenPrinterA; external winspl name 'OpenPrinterA';
  1836. function OpenPrinterW; external winspl name 'OpenPrinterW';
  1837. function OpenPrinter; external winspl name 'OpenPrinterA';
  1838. function PrinterMessageBoxA; external winspl name 'PrinterMessageBoxA';
  1839. function PrinterMessageBoxW; external winspl name 'PrinterMessageBoxW';
  1840. function PrinterMessageBox; external winspl name 'PrinterMessageBoxA';
  1841. function PrinterProperties; external winspl name 'PrinterProperties';
  1842. function ReadPrinter; external winspl name 'ReadPrinter';
  1843. function ResetPrinterA; external winspl name 'ResetPrinterA';
  1844. function ResetPrinterW; external winspl name 'ResetPrinterW';
  1845. function ResetPrinter; external winspl name 'ResetPrinterA';
  1846. function ScheduleJob; external winspl name 'ScheduleJob';
  1847. function SetFormA; external winspl name 'SetFormA';
  1848. function SetFormW; external winspl name 'SetFormW';
  1849. function SetForm; external winspl name 'SetFormA';
  1850. function SetJobA; external winspl name 'SetJobA';
  1851. function SetJobW; external winspl name 'SetJobW';
  1852. function SetJob; external winspl name 'SetJobA';
  1853. function SetPortA; external winspl name 'SetPortA';
  1854. function SetPortW; external winspl name 'SetPortW';
  1855. function SetPort; external winspl name 'SetPortA';
  1856. function SetPrinterA; external winspl name 'SetPrinterA';
  1857. function SetPrinterW; external winspl name 'SetPrinterW';
  1858. function SetPrinter; external winspl name 'SetPrinterA';
  1859. function SetPrinterDataA; external winspl name 'SetPrinterDataA';
  1860. function SetPrinterDataW; external winspl name 'SetPrinterDataW';
  1861. function SetPrinterData; external winspl name 'SetPrinterDataA';
  1862. function StartDocPrinterA; external winspl name 'StartDocPrinterA';
  1863. function StartDocPrinterW; external winspl name 'StartDocPrinterW';
  1864. function StartDocPrinter; external winspl name 'StartDocPrinterA';
  1865. function StartPagePrinter; external winspl name 'StartPagePrinter';
  1866. function WaitForPrinterChange; external winspl name 'WaitForPrinterChange';
  1867. function WritePrinter; external winspl name 'WritePrinter';
  1868.  
  1869. end.
  1870.