home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_Include / Winspool.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-20  |  13.5 KB  |  348 lines

  1. //--------------------------------------------------------------
  2. //
  3. //  WINSPOOL.H
  4. //
  5. //  This file contains type declarations and constants for
  6. //  the Windows printing API. The function prototypes
  7. //  are stored in the file WINSPOOL.PRG.
  8. //
  9. // 
  10. //  Visual dBASE Samples Group
  11. //
  12. //  $Revision:   1.2  $
  13. //
  14. //  Portions copyright (c) 1990-1995, Microsoft Corp. 
  15. //
  16. //--------------------------------------------------------------
  17. //
  18. // Module Name:
  19. //
  20. //    WinSpool.h
  21. //
  22. // Abstract:
  23. //
  24. //    Header file for Print APIs
  25. //
  26.  
  27. #ifndef _WINSPOOL_
  28. #define _WINSPOOL_
  29.  
  30. #include <WINDEF.H>
  31.  
  32. #define PPRINTER_INFO_1        PSTRUCTURE
  33. #define LPPRINTER_INFO_1       LPSTRUCTURE
  34.  
  35. #define PPRINTER_INFO_2        PSTRUCTURE
  36. #define LPPRINTER_INFO_2       LPSTRUCTURE
  37.  
  38. #define PPRINTER_INFO_3        PSTRUCTURE
  39. #define LPPRINTER_INFO_3       LPSTRUCTURE
  40.  
  41. #define PPRINTER_INFO_4        PSTRUCTURE
  42. #define LPPRINTER_INFO_4       LPSTRUCTURE
  43.  
  44. #define PPRINTER_INFO_5        PSTRUCTURE
  45. #define LPPRINTER_INFO_5       LPSTRUCTURE
  46.  
  47. #define PRINTER_CONTROL_PAUSE            1
  48. #define PRINTER_CONTROL_RESUME           2
  49. #define PRINTER_CONTROL_PURGE            3
  50. #define PRINTER_CONTROL_SET_STATUS       4
  51.  
  52. #define PRINTER_STATUS_PAUSED            0x00000001
  53. #define PRINTER_STATUS_ERROR             0x00000002
  54. #define PRINTER_STATUS_PENDING_DELETION  0x00000004
  55. #define PRINTER_STATUS_PAPER_JAM         0x00000008
  56. #define PRINTER_STATUS_PAPER_OUT         0x00000010
  57. #define PRINTER_STATUS_MANUAL_FEED       0x00000020
  58. #define PRINTER_STATUS_PAPER_PROBLEM     0x00000040
  59. #define PRINTER_STATUS_OFFLINE           0x00000080
  60. #define PRINTER_STATUS_IO_ACTIVE         0x00000100
  61. #define PRINTER_STATUS_BUSY              0x00000200
  62. #define PRINTER_STATUS_PRINTING          0x00000400
  63. #define PRINTER_STATUS_OUTPUT_BIN_FULL   0x00000800
  64. #define PRINTER_STATUS_NOT_AVAILABLE     0x00001000
  65. #define PRINTER_STATUS_WAITING           0x00002000
  66. #define PRINTER_STATUS_PROCESSING        0x00004000
  67. #define PRINTER_STATUS_INITIALIZING      0x00008000
  68. #define PRINTER_STATUS_WARMING_UP        0x00010000
  69. #define PRINTER_STATUS_TONER_LOW         0x00020000
  70. #define PRINTER_STATUS_NO_TONER          0x00040000
  71. #define PRINTER_STATUS_PAGE_PUNT         0x00080000
  72. #define PRINTER_STATUS_USER_INTERVENTION 0x00100000
  73. #define PRINTER_STATUS_OUT_OF_MEMORY     0x00200000
  74. #define PRINTER_STATUS_DOOR_OPEN         0x00400000
  75. #define PRINTER_STATUS_SERVER_UNKNOWN    0x00800000
  76. #define PRINTER_STATUS_POWER_SAVE        0x01000000
  77.  
  78. #define PRINTER_ATTRIBUTE_QUEUED         0x00000001
  79. #define PRINTER_ATTRIBUTE_DIRECT         0x00000002
  80. #define PRINTER_ATTRIBUTE_DEFAULT        0x00000004
  81. #define PRINTER_ATTRIBUTE_SHARED         0x00000008
  82. #define PRINTER_ATTRIBUTE_NETWORK        0x00000010
  83. #define PRINTER_ATTRIBUTE_HIDDEN         0x00000020
  84. #define PRINTER_ATTRIBUTE_LOCAL          0x00000040
  85.  
  86. #define PRINTER_ATTRIBUTE_ENABLE_DEVQ       0x00000080
  87. #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS   0x00000100
  88. #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
  89.  
  90. #define PRINTER_ATTRIBUTE_WORK_OFFLINE   0x00000400
  91. #define PRINTER_ATTRIBUTE_ENABLE_BIDI    0x00000800
  92.  
  93. #define NO_PRIORITY   0
  94. #define MAX_PRIORITY 99
  95. #define MIN_PRIORITY  1
  96. #define DEF_PRIORITY  1
  97.  
  98. #define PJOB_INFO_1         PSTRUCTURE
  99. #define LPJOB_INFO_1        LPSTRUCTURE
  100.  
  101. #define PJOB_INFO_2         PSTRUCTURE
  102. #define LPJOB_INFO_2        LPSTRUCTURE
  103.  
  104. #define JOB_CONTROL_PAUSE              1
  105. #define JOB_CONTROL_RESUME             2
  106. #define JOB_CONTROL_CANCEL             3
  107. #define JOB_CONTROL_RESTART            4
  108. #define JOB_CONTROL_DELETE             5
  109.  
  110. #define JOB_STATUS_PAUSED       0x00000001
  111. #define JOB_STATUS_ERROR        0x00000002
  112. #define JOB_STATUS_DELETING     0x00000004
  113. #define JOB_STATUS_SPOOLING     0x00000008
  114. #define JOB_STATUS_PRINTING     0x00000010
  115. #define JOB_STATUS_OFFLINE      0x00000020
  116. #define JOB_STATUS_PAPEROUT     0x00000040
  117. #define JOB_STATUS_PRINTED      0x00000080
  118. #define JOB_STATUS_DELETED      0x00000100
  119. #define JOB_STATUS_BLOCKED_DEVQ 0x00000200
  120. #define JOB_STATUS_USER_INTERVENTION   0x00000400
  121.  
  122. #define JOB_POSITION_UNSPECIFIED       0
  123.  
  124. #define PADDJOB_INFO_1           PSTRUCTURE
  125. #define LPADDJOB_INFO_1          LPSTRUCTURE
  126.  
  127. #define PDRIVER_INFO_1           PSTRUCTURE
  128. #define LPDRIVER_INFO_1          LPSTRUCTURE
  129.  
  130. #define PDRIVER_INFO_2           PSTRUCTURE
  131. #define LPDRIVER_INFO_2          LPSTRUCTURE
  132.  
  133. #define PDRIVER_INFO_3           PSTRUCTURE
  134. #define LPDRIVER_INFO_3          LPSTRUCTURE
  135.  
  136. #define PDOC_INFO_1              PSTRUCTURE
  137. #define LPDOC_INFO_1             LPSTRUCTURE
  138.  
  139. #define PFORM_INFO_1             PSTRUCTURE
  140. #define LPFORM_INFO_1            LPSTRUCTURE
  141.  
  142. #define PDOC_INFO_2              PSTRUCTURE
  143. #define LPDOC_INFO_2             LPSTRUCTURE
  144.  
  145. #define DI_CHANNEL              1    && start direct read/write channel,
  146. #define DI_CHANNEL_WRITE        2    && Direct write only - background read thread ok
  147. #define DI_READ_SPOOL_JOB       3
  148.  
  149. #define FORM_BUILTIN    0x00000001
  150.  
  151. #define PPRINTPROCESSOR_INFO_1     PSTRUCTURE
  152. #define LPPRINTPROCESSOR_INFO_1    LPSTRUCTURE
  153.  
  154. #define PPORT_INFO_1               PSTRUCTURE
  155. #define LPPORT_INFO_1              LPSTRUCTURE
  156.  
  157. #define PPORT_INFO_2           PSTRUCTURE
  158. #define LPPORT_INFO_2          LPSTRUCTURE
  159.  
  160. #define PORT_TYPE_WRITE         0x0001
  161. #define PORT_TYPE_READ          0x0002
  162. #define PORT_TYPE_REDIRECTED    0x0004
  163. #define PORT_TYPE_NET_ATTACHED  0x0008
  164.  
  165. #define PMONITOR_INFO_1      PSTRUCTURE
  166. #define LPMONITOR_INFO_1     LPSTRUCTURE
  167.  
  168. #define PMONITOR_INFO_2      PSTRUCTURE
  169. #define LPMONITOR_INFO_2     LPSTRUCTURE
  170.  
  171. #define PDATATYPES_INFO_1      PSTRUCTURE
  172. #define LPDATATYPES_INFO_1     LPSTRUCTURE
  173.  
  174. #define PPRINTER_DEFAULTS      PSTRUCTURE
  175. #define LPPRINTER_DEFAULTS     LPSTRUCTURE
  176.  
  177. #define PRINTER_ENUM_DEFAULT     0x00000001
  178. #define PRINTER_ENUM_LOCAL       0x00000002
  179. #define PRINTER_ENUM_CONNECTIONS 0x00000004
  180. #define PRINTER_ENUM_FAVORITE    0x00000004
  181. #define PRINTER_ENUM_NAME        0x00000008
  182. #define PRINTER_ENUM_REMOTE      0x00000010
  183. #define PRINTER_ENUM_SHARED      0x00000020
  184. #define PRINTER_ENUM_NETWORK     0x00000040
  185.  
  186. #define PRINTER_ENUM_EXPAND      0x00004000
  187. #define PRINTER_ENUM_CONTAINER   0x00008000
  188.  
  189. #define PRINTER_ENUM_ICONMASK    0x00ff0000
  190. #define PRINTER_ENUM_ICON1       0x00010000
  191. #define PRINTER_ENUM_ICON2       0x00020000
  192. #define PRINTER_ENUM_ICON3       0x00040000
  193. #define PRINTER_ENUM_ICON4       0x00080000
  194. #define PRINTER_ENUM_ICON5       0x00100000
  195. #define PRINTER_ENUM_ICON6       0x00200000
  196. #define PRINTER_ENUM_ICON7       0x00400000
  197. #define PRINTER_ENUM_ICON8       0x00800000
  198.  
  199. #define PRINTER_NOTIFY_TYPE 0x00
  200. #define JOB_NOTIFY_TYPE     0x01
  201.  
  202. #define PRINTER_NOTIFY_FIELD_SERVER_NAME             0x00
  203. #define PRINTER_NOTIFY_FIELD_PRINTER_NAME            0x01
  204. #define PRINTER_NOTIFY_FIELD_SHARE_NAME              0x02
  205. #define PRINTER_NOTIFY_FIELD_PORT_NAME               0x03
  206. #define PRINTER_NOTIFY_FIELD_DRIVER_NAME             0x04
  207. #define PRINTER_NOTIFY_FIELD_COMMENT                 0x05
  208. #define PRINTER_NOTIFY_FIELD_LOCATION                0x06
  209. #define PRINTER_NOTIFY_FIELD_DEVMODE                 0x07
  210. #define PRINTER_NOTIFY_FIELD_SEPFILE                 0x08
  211. #define PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR         0x09
  212. #define PRINTER_NOTIFY_FIELD_PARAMETERS              0x0A
  213. #define PRINTER_NOTIFY_FIELD_DATATYPE                0x0B
  214. #define PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR     0x0C
  215. #define PRINTER_NOTIFY_FIELD_ATTRIBUTES              0x0D
  216. #define PRINTER_NOTIFY_FIELD_PRIORITY                0x0E
  217. #define PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY        0x0F
  218. #define PRINTER_NOTIFY_FIELD_START_TIME              0x10
  219. #define PRINTER_NOTIFY_FIELD_UNTIL_TIME              0x11
  220. #define PRINTER_NOTIFY_FIELD_STATUS                  0x12
  221. #define PRINTER_NOTIFY_FIELD_STATUS_STRING           0x13
  222. #define PRINTER_NOTIFY_FIELD_CJOBS                   0x14
  223. #define PRINTER_NOTIFY_FIELD_AVERAGE_PPM             0x15
  224. #define PRINTER_NOTIFY_FIELD_TOTAL_PAGES             0x16
  225. #define PRINTER_NOTIFY_FIELD_PAGES_PRINTED           0x17
  226. #define PRINTER_NOTIFY_FIELD_TOTAL_BYTES             0x18
  227. #define PRINTER_NOTIFY_FIELD_BYTES_PRINTED           0x19
  228.  
  229. #define JOB_NOTIFY_FIELD_PRINTER_NAME                0x00
  230. #define JOB_NOTIFY_FIELD_MACHINE_NAME                0x01
  231. #define JOB_NOTIFY_FIELD_PORT_NAME                   0x02
  232. #define JOB_NOTIFY_FIELD_USER_NAME                   0x03
  233. #define JOB_NOTIFY_FIELD_NOTIFY_NAME                 0x04
  234. #define JOB_NOTIFY_FIELD_DATATYPE                    0x05
  235. #define JOB_NOTIFY_FIELD_PRINT_PROCESSOR             0x06
  236. #define JOB_NOTIFY_FIELD_PARAMETERS                  0x07
  237. #define JOB_NOTIFY_FIELD_DRIVER_NAME                 0x08
  238. #define JOB_NOTIFY_FIELD_DEVMODE                     0x09
  239. #define JOB_NOTIFY_FIELD_STATUS                      0x0A
  240. #define JOB_NOTIFY_FIELD_STATUS_STRING               0x0B
  241. #define JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR         0x0C
  242. #define JOB_NOTIFY_FIELD_DOCUMENT                    0x0D
  243. #define JOB_NOTIFY_FIELD_PRIORITY                    0x0E
  244. #define JOB_NOTIFY_FIELD_POSITION                    0x0F
  245. #define JOB_NOTIFY_FIELD_SUBMITTED                   0x10
  246. #define JOB_NOTIFY_FIELD_START_TIME                  0x11
  247. #define JOB_NOTIFY_FIELD_UNTIL_TIME                  0x12
  248. #define JOB_NOTIFY_FIELD_TIME                        0x13
  249. #define JOB_NOTIFY_FIELD_TOTAL_PAGES                 0x14
  250. #define JOB_NOTIFY_FIELD_PAGES_PRINTED               0x15
  251. #define JOB_NOTIFY_FIELD_TOTAL_BYTES                 0x16
  252. #define JOB_NOTIFY_FIELD_BYTES_PRINTED               0x17
  253.  
  254.  
  255. #define PPRINTER_NOTIFY_OPTIONS_TYPE      PSTRUCTURE
  256. #define LPPRINTER_NOTIFY_OPTIONS_TYPE     LPSTRUCTURE
  257.  
  258. #define PRINTER_NOTIFY_OPTIONS_REFRESH  0x01
  259.  
  260. #define PPRINTER_NOTIFY_OPTIONS      PSTRUCTURE
  261. #define LPPRINTER_NOTIFY_OPTIONS     LPSTRUCTURE
  262.  
  263. #define PRINTER_NOTIFY_INFO_DISCARDED       0x01
  264.  
  265. #define PPRINTER_NOTIFY_INFO_DATA      PSTRUCTURE
  266. #define LPPRINTER_NOTIFY_INFO_DATA     LPSTRUCTURE
  267.  
  268. #define PPRINTER_NOTIFY_INFO      PSTRUCTURE
  269. #define LPPRINTER_NOTIFY_INFO     LPSTRUCTURE
  270.  
  271. #define PRINTER_CHANGE_ADD_PRINTER              0x00000001
  272. #define PRINTER_CHANGE_SET_PRINTER              0x00000002
  273. #define PRINTER_CHANGE_DELETE_PRINTER           0x00000004
  274. #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER    0x00000008
  275. #define PRINTER_CHANGE_PRINTER                  0x000000FF
  276. #define PRINTER_CHANGE_ADD_JOB                  0x00000100
  277. #define PRINTER_CHANGE_SET_JOB                  0x00000200
  278. #define PRINTER_CHANGE_DELETE_JOB               0x00000400
  279. #define PRINTER_CHANGE_WRITE_JOB                0x00000800
  280. #define PRINTER_CHANGE_JOB                      0x0000FF00
  281. #define PRINTER_CHANGE_ADD_FORM                 0x00010000
  282. #define PRINTER_CHANGE_SET_FORM                 0x00020000
  283. #define PRINTER_CHANGE_DELETE_FORM              0x00040000
  284. #define PRINTER_CHANGE_FORM                     0x00070000
  285. #define PRINTER_CHANGE_ADD_PORT                 0x00100000
  286. #define PRINTER_CHANGE_CONFIGURE_PORT           0x00200000
  287. #define PRINTER_CHANGE_DELETE_PORT              0x00400000
  288. #define PRINTER_CHANGE_PORT                     0x00700000
  289. #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR      0x01000000
  290. #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR   0x04000000
  291. #define PRINTER_CHANGE_PRINT_PROCESSOR          0x07000000
  292. #define PRINTER_CHANGE_ADD_PRINTER_DRIVER       0x10000000
  293. #define PRINTER_CHANGE_SET_PRINTER_DRIVER       0x20000000
  294. #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER    0x40000000
  295. #define PRINTER_CHANGE_PRINTER_DRIVER           0x70000000
  296. #define PRINTER_CHANGE_TIMEOUT                  0x80000000
  297. #define PRINTER_CHANGE_ALL                      0x7777FFFF
  298.  
  299. #define PRINTER_ERROR_INFORMATION   0x80000000
  300. #define PRINTER_ERROR_WARNING       0x40000000
  301. #define PRINTER_ERROR_SEVERE        0x20000000
  302.  
  303. #define PRINTER_ERROR_OUTOFPAPER    0x00000001
  304. #define PRINTER_ERROR_JAM           0x00000002
  305. #define PRINTER_ERROR_OUTOFTONER    0x00000004
  306.  
  307. #define PPROVIDOR_INFO_1      PSTRUCTURE
  308. #define LPPROVIDOR_INFO_1     LPSTRUCTURE
  309.  
  310. #define SERVER_ACCESS_ADMINISTER    0x00000001
  311. #define SERVER_ACCESS_ENUMERATE     0x00000002
  312.  
  313. #define PRINTER_ACCESS_ADMINISTER   0x00000004
  314. #define PRINTER_ACCESS_USE          0x00000008
  315.  
  316. #define JOB_ACCESS_ADMINISTER       0x00000010
  317.  
  318.  
  319. //
  320. // Access rights for print servers
  321. //
  322.  
  323. #define SERVER_ALL_ACCESS    (bitor(bitor(STANDARD_RIGHTS_REQUIRED, SERVER_ACCESS_ADMINISTER), SERVER_ACCESS_ENUMERATE))
  324. #define SERVER_READ          (bitor(STANDARD_RIGHTS_READ, SERVER_ACCESS_ENUMERATE))
  325. #define SERVER_WRITE         (bitor(bitor(STANDARD_RIGHTS_WRITE, SERVER_ACCESS_ADMINISTER), SERVER_ACCESS_ENUMERATE))
  326. #define SERVER_EXECUTE       (bitor(STANDARD_RIGHTS_EXECUTE, SERVER_ACCESS_ENUMERATE))
  327.  
  328. //
  329. // Access rights for printers
  330. //
  331.  
  332. #define PRINTER_ALL_ACCESS    (bitor(bitor(STANDARD_RIGHTS_REQUIRED, PRINTER_ACCESS_ADMINISTER),PRINTER_ACCESS_USE))
  333. #define PRINTER_READ          (bitor(STANDARD_RIGHTS_READ, PRINTER_ACCESS_USE))
  334. #define PRINTER_WRITE         (bitor(STANDARD_RIGHTS_WRITE, PRINTER_ACCESS_USE))
  335. #define PRINTER_EXECUTE       (bitor(STANDARD_RIGHTS_EXECUTE, PRINTER_ACCESS_USE))
  336.  
  337. //
  338. // Access rights for jobs
  339. //
  340.  
  341. #define JOB_ALL_ACCESS         (bitor(STANDARD_RIGHTS_REQUIRED, JOB_ACCESS_ADMINISTER))
  342. #define JOB_READ               (bitor(STANDARD_RIGHTS_READ, JOB_ACCESS_ADMINISTER))
  343. #define JOB_WRITE              (bitor(STANDARD_RIGHTS_WRITE, JOB_ACCESS_ADMINISTER))
  344. #define JOB_EXECUTE            (bitor(STANDARD_RIGHTS_EXECUTE, JOB_ACCESS_ADMINISTER))
  345. // End winspool.h
  346.  
  347. #endif
  348.