Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1854 lines
58 KiB

  1. /*++ ;both
  2. ;both
  3. Copyright (c) 1990-1998 Microsoft Corporation ;both
  4. ;both
  5. Module Name: ;both
  6. ;both
  7. WinSpool.h
  8. WinSpolp.h ;internal_NT
  9. ;both
  10. Abstract: ;both
  11. ;both
  12. Header file for Print APIs ;both
  13. ;both
  14. Revision History: ;both
  15. ;both
  16. --*/ ;both
  17. #ifndef _WINSPOOL_
  18. #define _WINSPOOL_
  19. #ifndef _WINSPOLP_ ;internal_NT
  20. #define _WINSPOLP_ ;internal_NT
  21. #ifdef _WINUSER_
  22. #include <prsht.h>
  23. #endif
  24. ;begin_both
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. ;end_both
  29. typedef struct _PRINTER_INFO_1% {
  30. DWORD Flags;
  31. LPTSTR% pDescription;
  32. LPTSTR% pName;
  33. LPTSTR% pComment;
  34. } PRINTER_INFO_1%, *PPRINTER_INFO_1%, *LPPRINTER_INFO_1%;
  35. typedef struct _PRINTER_INFO_2% {
  36. LPTSTR% pServerName;
  37. LPTSTR% pPrinterName;
  38. LPTSTR% pShareName;
  39. LPTSTR% pPortName;
  40. LPTSTR% pDriverName;
  41. LPTSTR% pComment;
  42. LPTSTR% pLocation;
  43. LPDEVMODE% pDevMode;
  44. LPTSTR% pSepFile;
  45. LPTSTR% pPrintProcessor;
  46. LPTSTR% pDatatype;
  47. LPTSTR% pParameters;
  48. PSECURITY_DESCRIPTOR pSecurityDescriptor;
  49. DWORD Attributes;
  50. DWORD Priority;
  51. DWORD DefaultPriority;
  52. DWORD StartTime;
  53. DWORD UntilTime;
  54. DWORD Status;
  55. DWORD cJobs;
  56. DWORD AveragePPM;
  57. } PRINTER_INFO_2%, *PPRINTER_INFO_2%, *LPPRINTER_INFO_2%;
  58. typedef struct _PRINTER_INFO_3 {
  59. PSECURITY_DESCRIPTOR pSecurityDescriptor;
  60. } PRINTER_INFO_3, *PPRINTER_INFO_3, *LPPRINTER_INFO_3;
  61. typedef struct _PRINTER_INFO_4% {
  62. LPTSTR% pPrinterName;
  63. LPTSTR% pServerName;
  64. DWORD Attributes;
  65. } PRINTER_INFO_4%, *PPRINTER_INFO_4%, *LPPRINTER_INFO_4%;
  66. typedef struct _PRINTER_INFO_5% {
  67. LPTSTR% pPrinterName;
  68. LPTSTR% pPortName;
  69. DWORD Attributes;
  70. DWORD DeviceNotSelectedTimeout;
  71. DWORD TransmissionRetryTimeout;
  72. } PRINTER_INFO_5%, *PPRINTER_INFO_5%, *LPPRINTER_INFO_5%;
  73. typedef struct _PRINTER_INFO_6 {
  74. DWORD dwStatus;
  75. } PRINTER_INFO_6, *PPRINTER_INFO_6, *LPPRINTER_INFO_6;
  76. typedef struct _PRINTER_INFO_7% {
  77. LPTSTR% pszObjectGUID;
  78. DWORD dwAction;
  79. } PRINTER_INFO_7%, *PPRINTER_INFO_7%, *LPPRINTER_INFO_7%;
  80. #define DSPRINT_PUBLISH 0x00000001
  81. #define DSPRINT_UPDATE 0x00000002
  82. #define DSPRINT_UNPUBLISH 0x00000004
  83. #define DSPRINT_REPUBLISH 0x00000008
  84. #define DSPRINT_PENDING 0x80000000
  85. typedef struct _PRINTER_INFO_8% {
  86. LPDEVMODE% pDevMode;
  87. } PRINTER_INFO_8%, *PPRINTER_INFO_8%, *LPPRINTER_INFO_8%;
  88. typedef struct _PRINTER_INFO_9% {
  89. LPDEVMODE% pDevMode;
  90. } PRINTER_INFO_9%, *PPRINTER_INFO_9%, *LPPRINTER_INFO_9%;
  91. #define PRINTER_CONTROL_PAUSE 1
  92. #define PRINTER_CONTROL_RESUME 2
  93. #define PRINTER_CONTROL_PURGE 3
  94. #define PRINTER_CONTROL_SET_STATUS 4
  95. #define PRINTER_STATUS_PAUSED 0x00000001
  96. #define PRINTER_STATUS_ERROR 0x00000002
  97. #define PRINTER_STATUS_PENDING_DELETION 0x00000004
  98. #define PRINTER_STATUS_PAPER_JAM 0x00000008
  99. #define PRINTER_STATUS_PAPER_OUT 0x00000010
  100. #define PRINTER_STATUS_MANUAL_FEED 0x00000020
  101. #define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
  102. #define PRINTER_STATUS_OFFLINE 0x00000080
  103. #define PRINTER_STATUS_IO_ACTIVE 0x00000100
  104. #define PRINTER_STATUS_BUSY 0x00000200
  105. #define PRINTER_STATUS_PRINTING 0x00000400
  106. #define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
  107. #define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
  108. #define PRINTER_STATUS_WAITING 0x00002000
  109. #define PRINTER_STATUS_PROCESSING 0x00004000
  110. #define PRINTER_STATUS_INITIALIZING 0x00008000
  111. #define PRINTER_STATUS_WARMING_UP 0x00010000
  112. #define PRINTER_STATUS_TONER_LOW 0x00020000
  113. #define PRINTER_STATUS_NO_TONER 0x00040000
  114. #define PRINTER_STATUS_PAGE_PUNT 0x00080000
  115. #define PRINTER_STATUS_USER_INTERVENTION 0x00100000
  116. #define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
  117. #define PRINTER_STATUS_DOOR_OPEN 0x00400000
  118. #define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
  119. #define PRINTER_STATUS_POWER_SAVE 0x01000000
  120. #define PRINTER_ATTRIBUTE_QUEUED 0x00000001
  121. #define PRINTER_ATTRIBUTE_DIRECT 0x00000002
  122. #define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
  123. #define PRINTER_ATTRIBUTE_SHARED 0x00000008
  124. #define PRINTER_ATTRIBUTE_NETWORK 0x00000010
  125. #define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
  126. #define PRINTER_ATTRIBUTE_LOCAL 0x00000040
  127. #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
  128. #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
  129. #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
  130. #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
  131. #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
  132. #define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
  133. #define PRINTER_ATTRIBUTE_PUBLISHED 0x00002000
  134. #define PRINTER_ATTRIBUTE_FAX 0x00004000
  135. #define PRINTER_ATTRIBUTE_UPDATEWININI 0x80000000 ;internal
  136. #define NO_PRIORITY 0
  137. #define MAX_PRIORITY 99
  138. #define MIN_PRIORITY 1
  139. #define DEF_PRIORITY 1
  140. typedef struct _JOB_INFO_1% {
  141. DWORD JobId;
  142. LPTSTR% pPrinterName;
  143. LPTSTR% pMachineName;
  144. LPTSTR% pUserName;
  145. LPTSTR% pDocument;
  146. LPTSTR% pDatatype;
  147. LPTSTR% pStatus;
  148. DWORD Status;
  149. DWORD Priority;
  150. DWORD Position;
  151. DWORD TotalPages;
  152. DWORD PagesPrinted;
  153. SYSTEMTIME Submitted;
  154. } JOB_INFO_1%, *PJOB_INFO_1%, *LPJOB_INFO_1%;
  155. typedef struct _JOB_INFO_2% {
  156. DWORD JobId;
  157. LPTSTR% pPrinterName;
  158. LPTSTR% pMachineName;
  159. LPTSTR% pUserName;
  160. LPTSTR% pDocument;
  161. LPTSTR% pNotifyName;
  162. LPTSTR% pDatatype;
  163. LPTSTR% pPrintProcessor;
  164. LPTSTR% pParameters;
  165. LPTSTR% pDriverName;
  166. LPDEVMODE% pDevMode;
  167. LPTSTR% pStatus;
  168. PSECURITY_DESCRIPTOR pSecurityDescriptor;
  169. DWORD Status;
  170. DWORD Priority;
  171. DWORD Position;
  172. DWORD StartTime;
  173. DWORD UntilTime;
  174. DWORD TotalPages;
  175. DWORD Size;
  176. SYSTEMTIME Submitted; // Time the job was spooled
  177. DWORD Time; // How many miliseconds the job has been printing
  178. DWORD PagesPrinted;
  179. } JOB_INFO_2%, *PJOB_INFO_2%, *LPJOB_INFO_2%;
  180. typedef struct _JOB_INFO_3 {
  181. DWORD JobId;
  182. DWORD NextJobId;
  183. DWORD Reserved;
  184. } JOB_INFO_3, *PJOB_INFO_3, *LPJOB_INFO_3;
  185. #define JOB_CONTROL_PAUSE 1
  186. #define JOB_CONTROL_RESUME 2
  187. #define JOB_CONTROL_CANCEL 3
  188. #define JOB_CONTROL_RESTART 4
  189. #define JOB_CONTROL_DELETE 5
  190. #define JOB_CONTROL_SENT_TO_PRINTER 6
  191. #define JOB_CONTROL_LAST_PAGE_EJECTED 7
  192. #define JOB_STATUS_PAUSED 0x00000001
  193. #define JOB_STATUS_ERROR 0x00000002
  194. #define JOB_STATUS_DELETING 0x00000004
  195. #define JOB_STATUS_SPOOLING 0x00000008
  196. #define JOB_STATUS_PRINTING 0x00000010
  197. #define JOB_STATUS_OFFLINE 0x00000020
  198. #define JOB_STATUS_PAPEROUT 0x00000040
  199. #define JOB_STATUS_PRINTED 0x00000080
  200. #define JOB_STATUS_DELETED 0x00000100
  201. #define JOB_STATUS_BLOCKED_DEVQ 0x00000200
  202. #define JOB_STATUS_USER_INTERVENTION 0x00000400
  203. #define JOB_STATUS_RESTART 0x00000800
  204. #define JOB_STATUS_COMPLETE 0x00001000
  205. #define JOB_POSITION_UNSPECIFIED 0
  206. typedef struct _ADDJOB_INFO_1% {
  207. LPTSTR% Path;
  208. DWORD JobId;
  209. } ADDJOB_INFO_1%, *PADDJOB_INFO_1%, *LPADDJOB_INFO_1%;
  210. typedef struct _ADDJOB_INFO_2W { ;internal
  211. LPWSTR pData; ;internal
  212. DWORD JobId; ;internal
  213. } ADDJOB_INFO_2W, *PADDJOB_INFO_2W, *LPADDJOB_INFO_2W; ;internal
  214. #define DRIVER_INFO_PRIVATE_LEVEL 100 ;internal
  215. #define DRIVER_INFO_VERSION_LEVEL DRIVER_INFO_PRIVATE_LEVEL + 1 ;internal
  216. typedef struct _DRIVER_INFO_1% {
  217. LPTSTR% pName; // QMS 810
  218. } DRIVER_INFO_1%, *PDRIVER_INFO_1%, *LPDRIVER_INFO_1%;
  219. typedef struct _DRIVER_INFO_2% {
  220. DWORD cVersion;
  221. LPTSTR% pName; // QMS 810
  222. LPTSTR% pEnvironment; // Win32 x86
  223. LPTSTR% pDriverPath; // c:\drivers\pscript.dll
  224. LPTSTR% pDataFile; // c:\drivers\QMS810.PPD
  225. LPTSTR% pConfigFile; // c:\drivers\PSCRPTUI.DLL
  226. } DRIVER_INFO_2%, *PDRIVER_INFO_2%, *LPDRIVER_INFO_2%;
  227. typedef struct _DRIVER_INFO_3% {
  228. DWORD cVersion;
  229. LPTSTR% pName; // QMS 810
  230. LPTSTR% pEnvironment; // Win32 x86
  231. LPTSTR% pDriverPath; // c:\drivers\pscript.dll
  232. LPTSTR% pDataFile; // c:\drivers\QMS810.PPD
  233. LPTSTR% pConfigFile; // c:\drivers\PSCRPTUI.DLL
  234. LPTSTR% pHelpFile; // c:\drivers\PSCRPTUI.HLP
  235. LPTSTR% pDependentFiles; // PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0
  236. LPTSTR% pMonitorName; // "PJL monitor"
  237. LPTSTR% pDefaultDataType; // "EMF"
  238. } DRIVER_INFO_3%, *PDRIVER_INFO_3%, *LPDRIVER_INFO_3%;
  239. typedef struct _DRIVER_INFO_4% {
  240. DWORD cVersion;
  241. LPTSTR% pName; // QMS 810
  242. LPTSTR% pEnvironment; // Win32 x86
  243. LPTSTR% pDriverPath; // c:\drivers\pscript.dll
  244. LPTSTR% pDataFile; // c:\drivers\QMS810.PPD
  245. LPTSTR% pConfigFile; // c:\drivers\PSCRPTUI.DLL
  246. LPTSTR% pHelpFile; // c:\drivers\PSCRPTUI.HLP
  247. LPTSTR% pDependentFiles; // PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0
  248. LPTSTR% pMonitorName; // "PJL monitor"
  249. LPTSTR% pDefaultDataType; // "EMF"
  250. LPTSTR% pszzPreviousNames; // "OldName1\0OldName2\0\0
  251. } DRIVER_INFO_4%, *PDRIVER_INFO_4%, *LPDRIVER_INFO_4%;
  252. typedef struct _DRIVER_INFO_5% {
  253. DWORD cVersion;
  254. LPTSTR% pName; // QMS 810
  255. LPTSTR% pEnvironment; // Win32 x86
  256. LPTSTR% pDriverPath; // c:\drivers\pscript.dll
  257. LPTSTR% pDataFile; // c:\drivers\QMS810.PPD
  258. LPTSTR% pConfigFile; // c:\drivers\PSCRPTUI.DLL
  259. DWORD dwDriverAttributes; // driver attributes (like UMPD/KMPD)
  260. DWORD dwConfigVersion; // version number of the config file since reboot
  261. DWORD dwDriverVersion; // version number of the driver file since reboot
  262. } DRIVER_INFO_5%, *PDRIVER_INFO_5%, *LPDRIVER_INFO_5%;
  263. typedef struct _DRIVER_INFO_6% {
  264. DWORD cVersion;
  265. LPTSTR% pName; // QMS 810
  266. LPTSTR% pEnvironment; // Win32 x86
  267. LPTSTR% pDriverPath; // c:\drivers\pscript.dll
  268. LPTSTR% pDataFile; // c:\drivers\QMS810.PPD
  269. LPTSTR% pConfigFile; // c:\drivers\PSCRPTUI.DLL
  270. LPTSTR% pHelpFile; // c:\drivers\PSCRPTUI.HLP
  271. LPTSTR% pDependentFiles; // PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0
  272. LPTSTR% pMonitorName; // "PJL monitor"
  273. LPTSTR% pDefaultDataType; // "EMF"
  274. LPTSTR% pszzPreviousNames; // "OldName1\0OldName2\0\0
  275. FILETIME ftDriverDate;
  276. DWORDLONG dwlDriverVersion;
  277. LPTSTR% pszMfgName;
  278. LPTSTR% pszOEMUrl;
  279. LPTSTR% pszHardwareID;
  280. LPTSTR% pszProvider;
  281. } DRIVER_INFO_6%, *PDRIVER_INFO_6%, *LPDRIVER_INFO_6%;
  282. // ;internal
  283. // You must change RPC_DRIVER_INFCAT_INFO_1 in winspl.idl if you ;internal
  284. // want to change structure DRIVER_INFCAT_INFO_1 ;internal
  285. // ;internal
  286. typedef struct _DRIVER_FINFCAT_INFO_1 { ;internal
  287. PCWSTR pszCatPath; // full path to the dirver cat file ;internal
  288. PCWSTR pszCatNameOnSystem; // new cat name used under CatRoot ;internal
  289. } DRIVER_INFCAT_INFO_1; ;internal
  290. // ;internal
  291. // You must change RPC_DRIVER_INFCAT_INFO_2 in winspl.idl if you ;internal
  292. // want to change structure DRIVER_INFCAT_INFO_2 ;internal
  293. // ;internal
  294. typedef struct _DRIVER_INFCAT_INFO_2 { ;internal
  295. PCWSTR pszCatPath; // full path to the dirver cat file ;internal
  296. PCWSTR pszInfPath; // full path to the dirver INF file ;internal
  297. PCWSTR pszSrcLoc; // Information abou the Source Inf ;internal
  298. DWORD dwMediaType; // Source Media Type ;internal
  299. DWORD dwCopyStyle; // Copy Style ;internal
  300. } DRIVER_INFCAT_INFO_2; ;internal
  301. typedef enum { ;internal
  302. DRIVER_FILE = 0, ;internal
  303. CONFIG_FILE = 1, ;internal
  304. DATA_FILE = 2, ;internal
  305. HELP_FILE = 3, ;internal
  306. DEPENDENT_FILE = 4 ;internal
  307. } DRIVER_FILE_TYPE; ;internal
  308. typedef struct _DRIVER_FILE_INFO { ;internal
  309. DWORD FileNameOffset; ;internal
  310. DRIVER_FILE_TYPE FileType; ;internal
  311. DWORD FileVersion; ;internal
  312. } DRIVER_FILE_INFO, *PDRIVER_FILE_INFO, *LPDRIVER_FILE_INFO; ;internal
  313. typedef struct _DRIVER_INFO_VERSION { ;internal
  314. DWORD cVersion; ;internal
  315. LPWSTR pName; ;internal
  316. LPWSTR pEnvironment; ;internal
  317. LPDRIVER_FILE_INFO pFileInfo; ;internal
  318. DWORD dwFileCount; ;internal
  319. LPWSTR pMonitorName; ;internal
  320. LPWSTR pDefaultDataType; ;internal
  321. LPWSTR pszzPreviousNames; ;internal
  322. FILETIME ftDriverDate; ;internal
  323. DWORDLONG dwlDriverVersion; ;internal
  324. LPWSTR pszMfgName; ;internal
  325. LPWSTR pszOEMUrl; ;internal
  326. LPWSTR pszHardwareID; ;internal
  327. LPWSTR pszProvider; ;internal
  328. } DRIVER_INFO_VERSION, *PDRIVER_INFO_VERSION, *LPDRIVER_INFO_VERSION; ;internal
  329. // FLAGS for dwDriverAttributes
  330. #define DRIVER_KERNELMODE 0x00000001
  331. #define DRIVER_USERMODE 0x00000002
  332. // FLAGS for DeletePrinterDriverEx.
  333. #define DPD_DELETE_UNUSED_FILES 0x00000001
  334. #define DPD_DELETE_SPECIFIC_VERSION 0x00000002
  335. #define DPD_DELETE_ALL_FILES 0x00000004
  336. // FLAGS for AddPrinterDriverEx.
  337. #define APD_STRICT_UPGRADE 0x00000001
  338. #define APD_STRICT_DOWNGRADE 0x00000002
  339. #define APD_COPY_ALL_FILES 0x00000004
  340. #define APD_COPY_NEW_FILES 0x00000008
  341. #define APD_COPY_FROM_DIRECTORY 0x00000010
  342. #define APD_DONT_COPY_FILES_TO_CLUSTER 0x00001000 ;internal
  343. #define APD_COPY_TO_ALL_SPOOLERS 0x00002000 ;internal
  344. #define APD_NO_UI 0x00004000 ;internal
  345. #define APD_INSTALL_WARNED_DRIVER 0x00008000 ;internal
  346. #define APD_RETURN_BLOCKING_STATUS_CODE 0x00010000 ;internal
  347. #define APD_DONT_SET_CHECKPOINT 0x00020000 ;internal
  348. // FLAGS for AddDriverCatalog ;internal
  349. #define APDC_NONE 0x00000000 ;internal
  350. #define APDC_USE_ORIGINAL_CAT_NAME 0x00000001 ;internal
  351. // String for EnumPrinterDrivers. Used by Windows Update
  352. #define EPD_ALL_LOCAL_AND_CLUSTER TEXT("AllCluster") ;internal
  353. typedef struct _DOC_INFO_1% {
  354. LPTSTR% pDocName;
  355. LPTSTR% pOutputFile;
  356. LPTSTR% pDatatype;
  357. } DOC_INFO_1%, *PDOC_INFO_1%, *LPDOC_INFO_1%;
  358. typedef struct _FORM_INFO_1% {
  359. DWORD Flags;
  360. LPTSTR% pName;
  361. SIZEL Size;
  362. RECTL ImageableArea;
  363. } FORM_INFO_1%, *PFORM_INFO_1%, *LPFORM_INFO_1%;
  364. typedef struct _DOC_INFO_2% {
  365. LPTSTR% pDocName;
  366. LPTSTR% pOutputFile;
  367. LPTSTR% pDatatype;
  368. DWORD dwMode;
  369. DWORD JobId;
  370. } DOC_INFO_2%, *PDOC_INFO_2%, *LPDOC_INFO_2%;
  371. #define DI_CHANNEL 1 // start direct read/write channel,
  372. //Internal for printprocessor interface ;internal
  373. #define DI_CHANNEL_WRITE 2 // Direct write only - background read thread ok ;internal
  374. #define DI_READ_SPOOL_JOB 3
  375. typedef struct _DOC_INFO_3% {
  376. LPTSTR% pDocName;
  377. LPTSTR% pOutputFile;
  378. LPTSTR% pDatatype;
  379. DWORD dwFlags;
  380. } DOC_INFO_3%, *PDOC_INFO_3%, *LPDOC_INFO_3%;
  381. #define DI_MEMORYMAP_WRITE 0x00000001
  382. #define FORM_USER 0x00000000
  383. #define FORM_BUILTIN 0x00000001
  384. #define FORM_PRINTER 0x00000002
  385. typedef struct _PRINTPROCESSOR_INFO_1% {
  386. LPTSTR% pName;
  387. } PRINTPROCESSOR_INFO_1%, *PPRINTPROCESSOR_INFO_1%, *LPPRINTPROCESSOR_INFO_1%;
  388. typedef struct _PRINTPROCESSOR_CAPS_1 {
  389. DWORD dwLevel;
  390. DWORD dwNupOptions;
  391. DWORD dwPageOrderFlags;
  392. DWORD dwNumberOfCopies;
  393. } PRINTPROCESSOR_CAPS_1, *PPRINTPROCESSOR_CAPS_1;
  394. #define NORMAL_PRINT 0x00000000
  395. #define REVERSE_PRINT 0x00000001
  396. typedef struct _PORT_INFO_1% {
  397. LPTSTR% pName;
  398. } PORT_INFO_1%, *PPORT_INFO_1%, *LPPORT_INFO_1%;
  399. typedef struct _PORT_INFO_2% {
  400. LPTSTR% pPortName;
  401. LPTSTR% pMonitorName;
  402. LPTSTR% pDescription;
  403. DWORD fPortType;
  404. DWORD Reserved;
  405. } PORT_INFO_2%, *PPORT_INFO_2%, *LPPORT_INFO_2%;
  406. #define PORT_TYPE_WRITE 0x0001
  407. #define PORT_TYPE_READ 0x0002
  408. #define PORT_TYPE_REDIRECTED 0x0004
  409. #define PORT_TYPE_NET_ATTACHED 0x0008
  410. typedef struct _PORT_INFO_3% {
  411. DWORD dwStatus;
  412. LPTSTR% pszStatus;
  413. DWORD dwSeverity;
  414. } PORT_INFO_3%, *PPORT_INFO_3%, *LPPORT_INFO_3%;
  415. #define PORT_STATUS_TYPE_ERROR 1
  416. #define PORT_STATUS_TYPE_WARNING 2
  417. #define PORT_STATUS_TYPE_INFO 3
  418. #define PORT_STATUS_OFFLINE 1
  419. #define PORT_STATUS_PAPER_JAM 2
  420. #define PORT_STATUS_PAPER_OUT 3
  421. #define PORT_STATUS_OUTPUT_BIN_FULL 4
  422. #define PORT_STATUS_PAPER_PROBLEM 5
  423. #define PORT_STATUS_NO_TONER 6
  424. #define PORT_STATUS_DOOR_OPEN 7
  425. #define PORT_STATUS_USER_INTERVENTION 8
  426. #define PORT_STATUS_OUT_OF_MEMORY 9
  427. #define PORT_STATUS_TONER_LOW 10
  428. #define PORT_STATUS_WARMING_UP 11
  429. #define PORT_STATUS_POWER_SAVE 12
  430. typedef struct _MONITOR_INFO_1%{
  431. LPTSTR% pName;
  432. } MONITOR_INFO_1%, *PMONITOR_INFO_1%, *LPMONITOR_INFO_1%;
  433. typedef struct _MONITOR_INFO_2%{
  434. LPTSTR% pName;
  435. LPTSTR% pEnvironment;
  436. LPTSTR% pDLLName;
  437. } MONITOR_INFO_2%, *PMONITOR_INFO_2%, *LPMONITOR_INFO_2%;
  438. typedef struct _DATATYPES_INFO_1%{
  439. LPTSTR% pName;
  440. } DATATYPES_INFO_1%, *PDATATYPES_INFO_1%, *LPDATATYPES_INFO_1%;
  441. typedef struct _PRINTER_DEFAULTS%{
  442. LPTSTR% pDatatype;
  443. LPDEVMODE% pDevMode;
  444. ACCESS_MASK DesiredAccess;
  445. } PRINTER_DEFAULTS%, *PPRINTER_DEFAULTS%, *LPPRINTER_DEFAULTS%;
  446. typedef struct _PRINTER_ENUM_VALUES% {
  447. LPTSTR% pValueName;
  448. DWORD cbValueName;
  449. DWORD dwType;
  450. LPBYTE pData;
  451. DWORD cbData;
  452. } PRINTER_ENUM_VALUES%, *PPRINTER_ENUM_VALUES%, *LPPRINTER_ENUM_VALUES%;
  453. BOOL
  454. WINAPI
  455. EnumPrinters%(
  456. IN DWORD Flags,
  457. IN LPTSTR% Name,
  458. IN DWORD Level,
  459. OUT LPBYTE pPrinterEnum,
  460. IN DWORD cbBuf,
  461. OUT LPDWORD pcbNeeded,
  462. OUT LPDWORD pcReturned
  463. );
  464. #define PRINTER_ENUM_DEFAULT 0x00000001
  465. #define PRINTER_ENUM_LOCAL 0x00000002
  466. #define PRINTER_ENUM_CONNECTIONS 0x00000004
  467. #define PRINTER_ENUM_FAVORITE 0x00000004
  468. #define PRINTER_ENUM_NAME 0x00000008
  469. #define PRINTER_ENUM_REMOTE 0x00000010
  470. #define PRINTER_ENUM_SHARED 0x00000020
  471. #define PRINTER_ENUM_NETWORK 0x00000040
  472. #define PRINTER_ENUM_CLUSTER 0x00000800 ;internal
  473. #define PRINTER_ENUM_EXPAND 0x00004000
  474. #define PRINTER_ENUM_CONTAINER 0x00008000
  475. #define PRINTER_ENUM_ICONMASK 0x00ff0000
  476. #define PRINTER_ENUM_ICON1 0x00010000
  477. #define PRINTER_ENUM_ICON2 0x00020000
  478. #define PRINTER_ENUM_ICON3 0x00040000
  479. #define PRINTER_ENUM_ICON4 0x00080000
  480. #define PRINTER_ENUM_ICON5 0x00100000
  481. #define PRINTER_ENUM_ICON6 0x00200000
  482. #define PRINTER_ENUM_ICON7 0x00400000
  483. #define PRINTER_ENUM_ICON8 0x00800000
  484. #define PRINTER_ENUM_HIDE 0x01000000
  485. typedef struct _SPOOL_FILE_INFO_1 { ;internal
  486. DWORD dwVersion; ;internal
  487. HANDLE hSpoolFile; ;internal
  488. DWORD dwAttributes; ;internal
  489. } SPOOL_FILE_INFO_1, *PSPOOL_FILE_INFO_1; ;internal
  490. #define SPOOL_FILE_PERSISTENT 0x00000001
  491. #define SPOOL_FILE_TEMPORARY 0x00000002
  492. HANDLE ;internal
  493. WINAPI ;internal
  494. GetSpoolFileHandle( ;internal
  495. HANDLE hPrinter ;internal
  496. ); ;internal
  497. HANDLE ;internal
  498. WINAPI ;internal
  499. CommitSpoolData( ;internal
  500. HANDLE hPrinter, ;internal
  501. HANDLE hSpoolFile, ;internal
  502. DWORD cbCommit ;internal
  503. ); ;internal
  504. BOOL ;internal
  505. WINAPI ;internal
  506. CloseSpoolFileHandle( ;internal
  507. HANDLE hPrinter, ;internal
  508. HANDLE hSpoolFile ;internal
  509. ); ;internal
  510. BOOL
  511. WINAPI
  512. OpenPrinter%(
  513. IN LPTSTR% pPrinterName,
  514. OUT LPHANDLE phPrinter,
  515. IN LPPRINTER_DEFAULTS% pDefault
  516. );
  517. BOOL
  518. WINAPI
  519. ResetPrinter%(
  520. IN HANDLE hPrinter,
  521. IN LPPRINTER_DEFAULTS% pDefault
  522. );
  523. BOOL
  524. WINAPI
  525. SetJob%(
  526. IN HANDLE hPrinter,
  527. IN DWORD JobId,
  528. IN DWORD Level,
  529. IN LPBYTE pJob,
  530. IN DWORD Command
  531. );
  532. BOOL
  533. WINAPI
  534. GetJob%(
  535. IN HANDLE hPrinter,
  536. IN DWORD JobId,
  537. IN DWORD Level,
  538. OUT LPBYTE pJob,
  539. IN DWORD cbBuf,
  540. OUT LPDWORD pcbNeeded
  541. );
  542. BOOL
  543. WINAPI
  544. EnumJobs%(
  545. IN HANDLE hPrinter,
  546. IN DWORD FirstJob,
  547. IN DWORD NoJobs,
  548. IN DWORD Level,
  549. OUT LPBYTE pJob,
  550. IN DWORD cbBuf,
  551. OUT LPDWORD pcbNeeded,
  552. OUT LPDWORD pcReturned
  553. );
  554. HANDLE
  555. WINAPI
  556. AddPrinter%(
  557. IN LPTSTR% pName,
  558. IN DWORD Level,
  559. IN LPBYTE pPrinter
  560. );
  561. BOOL
  562. WINAPI
  563. DeletePrinter(
  564. IN OUT HANDLE hPrinter
  565. );
  566. BOOL
  567. WINAPI
  568. SetPrinter%(
  569. IN HANDLE hPrinter,
  570. IN DWORD Level,
  571. IN LPBYTE pPrinter,
  572. IN DWORD Command
  573. );
  574. BOOL
  575. WINAPI
  576. GetPrinter%(
  577. IN HANDLE hPrinter,
  578. IN DWORD Level,
  579. OUT LPBYTE pPrinter,
  580. IN DWORD cbBuf,
  581. OUT LPDWORD pcbNeeded
  582. );
  583. BOOL
  584. WINAPI
  585. AddPrinterDriver%(
  586. IN LPTSTR% pName,
  587. IN DWORD Level,
  588. OUT LPBYTE pDriverInfo
  589. );
  590. BOOL ;internal
  591. WINAPI ;internal
  592. AddDriverCatalog( ;internal
  593. IN HANDLE hPrinter, ;internal
  594. IN DWORD Level, ;internal
  595. IN VOID *pvDriverInfCatInfo, ;internal
  596. IN DWORD dwCatalogCopyFiles ;internal
  597. ); ;internal
  598. BOOL
  599. WINAPI
  600. AddPrinterDriverEx%(
  601. IN LPTSTR% pName,
  602. IN DWORD Level,
  603. IN OUT LPBYTE pDriverInfo,
  604. IN DWORD dwFileCopyFlags
  605. );
  606. BOOL
  607. WINAPI
  608. EnumPrinterDrivers%(
  609. IN LPTSTR% pName,
  610. IN LPTSTR% pEnvironment,
  611. IN DWORD Level,
  612. OUT LPBYTE pDriverInfo,
  613. IN DWORD cbBuf,
  614. OUT LPDWORD pcbNeeded,
  615. OUT LPDWORD pcReturned
  616. );
  617. BOOL
  618. WINAPI
  619. GetPrinterDriver%(
  620. IN HANDLE hPrinter,
  621. IN LPTSTR% pEnvironment,
  622. IN DWORD Level,
  623. OUT LPBYTE pDriverInfo,
  624. IN DWORD cbBuf,
  625. OUT LPDWORD pcbNeeded
  626. );
  627. BOOL
  628. WINAPI
  629. GetPrinterDriverDirectory%(
  630. IN LPTSTR% pName,
  631. IN LPTSTR% pEnvironment,
  632. IN DWORD Level,
  633. OUT LPBYTE pDriverDirectory,
  634. IN DWORD cbBuf,
  635. OUT LPDWORD pcbNeeded
  636. );
  637. BOOL
  638. WINAPI
  639. DeletePrinterDriver%(
  640. IN LPTSTR% pName,
  641. IN LPTSTR% pEnvironment,
  642. IN LPTSTR% pDriverName
  643. );
  644. BOOL
  645. WINAPI
  646. DeletePrinterDriverEx%(
  647. IN LPTSTR% pName,
  648. IN LPTSTR% pEnvironment,
  649. IN LPTSTR% pDriverName,
  650. IN DWORD dwDeleteFlag,
  651. IN DWORD dwVersionFlag
  652. );
  653. BOOL ;internal
  654. WINAPI ;internal
  655. AddPerMachineConnectionA( ;internal
  656. IN LPCSTR pServer, ;internal
  657. IN LPCSTR pPrinterName, ;internal
  658. IN LPCSTR pPrintServer, ;internal
  659. IN LPCSTR pProvider ;internal
  660. ); ;internal
  661. BOOL ;internal
  662. WINAPI ;internal
  663. AddPerMachineConnectionW( ;internal
  664. IN LPCWSTR pServer, ;internal
  665. IN LPCWSTR pPrinterName, ;internal
  666. IN LPCWSTR pPrintServer, ;internal
  667. IN LPCWSTR pProvider ;internal
  668. ); ;internal
  669. #ifdef UNICODE ;internal
  670. #define AddPerMachineConnection AddPerMachineConnectionW ;internal
  671. #else ;internal
  672. #define AddPerMachineConnection AddPerMachineConnectionA ;internal
  673. #endif // !UNICODE ;internal
  674. BOOL ;internal
  675. WINAPI ;internal
  676. DeletePerMachineConnectionA( ;internal
  677. IN LPCSTR pServer, ;internal
  678. IN LPCSTR pPrinterName ;internal
  679. ); ;internal
  680. BOOL ;internal
  681. WINAPI ;internal
  682. DeletePerMachineConnectionW( ;internal
  683. IN LPCWSTR pServer, ;internal
  684. IN LPCWSTR pPrinterName ;internal
  685. ); ;internal
  686. #ifdef UNICODE ;internal
  687. #define DeletePerMachineConnection DeletePerMachineConnectionW ;internal
  688. #else ;internal
  689. #define DeletePerMachineConnection DeletePerMachineConnectionA ;internal
  690. #endif // !UNICODE ;internal
  691. BOOL ;internal
  692. WINAPI ;internal
  693. EnumPerMachineConnectionsA( ;internal
  694. IN LPCSTR pServer, ;internal
  695. OUT LPBYTE pPrinterEnum, ;internal
  696. IN DWORD cbBuf, ;internal
  697. OUT LPDWORD pcbNeeded, ;internal
  698. OUT LPDWORD pcReturned ;internal
  699. ); ;internal
  700. BOOL ;internal
  701. WINAPI ;internal
  702. EnumPerMachineConnectionsW( ;internal
  703. IN LPCWSTR pServer, ;internal
  704. OUT LPBYTE pPrinterEnum, ;internal
  705. IN DWORD cbBuf, ;internal
  706. OUT LPDWORD pcbNeeded, ;internal
  707. OUT LPDWORD pcReturned ;internal
  708. ); ;internal
  709. #ifdef UNICODE ;internal
  710. #define EnumPerMachineConnections EnumPerMachineConnectionsW ;internal
  711. #else ;internal
  712. #define EnumPerMachineConnections EnumPerMachineConnectionsA ;internal
  713. #endif // !UNICODE ;internal
  714. BOOL
  715. WINAPI
  716. AddPrintProcessor%(
  717. IN LPTSTR% pName,
  718. IN LPTSTR% pEnvironment,
  719. IN LPTSTR% pPathName,
  720. IN LPTSTR% pPrintProcessorName
  721. );
  722. BOOL
  723. WINAPI
  724. EnumPrintProcessors%(
  725. IN LPTSTR% pName,
  726. IN LPTSTR% pEnvironment,
  727. IN DWORD Level,
  728. OUT LPBYTE pPrintProcessorInfo,
  729. IN DWORD cbBuf,
  730. OUT LPDWORD pcbNeeded,
  731. OUT LPDWORD pcReturned
  732. );
  733. BOOL
  734. WINAPI
  735. GetPrintProcessorDirectory%(
  736. IN LPTSTR% pName,
  737. IN LPTSTR% pEnvironment,
  738. IN DWORD Level,
  739. OUT LPBYTE pPrintProcessorInfo,
  740. IN DWORD cbBuf,
  741. OUT LPDWORD pcbNeeded
  742. );
  743. BOOL
  744. WINAPI
  745. EnumPrintProcessorDatatypes%(
  746. IN LPTSTR% pName,
  747. IN LPTSTR% pPrintProcessorName,
  748. IN DWORD Level,
  749. OUT LPBYTE pDatatypes,
  750. IN DWORD cbBuf,
  751. OUT LPDWORD pcbNeeded,
  752. OUT LPDWORD pcReturned
  753. );
  754. BOOL
  755. WINAPI
  756. DeletePrintProcessor%(
  757. IN LPTSTR% pName,
  758. IN LPTSTR% pEnvironment,
  759. IN LPTSTR% pPrintProcessorName
  760. );
  761. DWORD
  762. WINAPI
  763. StartDocPrinter%(
  764. IN HANDLE hPrinter,
  765. IN DWORD Level,
  766. IN LPBYTE pDocInfo
  767. );
  768. BOOL
  769. WINAPI
  770. StartPagePrinter(
  771. IN HANDLE hPrinter
  772. );
  773. BOOL
  774. WINAPI
  775. WritePrinter(
  776. IN HANDLE hPrinter,
  777. IN LPVOID pBuf,
  778. IN DWORD cbBuf,
  779. OUT LPDWORD pcWritten
  780. );
  781. BOOL ;internal
  782. WINAPI ;internal
  783. SeekPrinter( ;internal
  784. IN HANDLE hPrinter, ;internal
  785. IN LARGE_INTEGER liDistanceToMove, ;internal
  786. OUT PLARGE_INTEGER pliNewPointer, ;internal
  787. IN DWORD dwMoveMethod, ;internal
  788. IN BOOL bWrite ;internal
  789. ); ;internal
  790. BOOL
  791. WINAPI
  792. FlushPrinter(
  793. IN HANDLE hPrinter,
  794. IN LPVOID pBuf,
  795. IN DWORD cbBuf,
  796. OUT LPDWORD pcWritten,
  797. IN DWORD cSleep
  798. );
  799. BOOL
  800. WINAPI
  801. EndPagePrinter(
  802. IN HANDLE hPrinter
  803. );
  804. BOOL
  805. WINAPI
  806. AbortPrinter(
  807. IN HANDLE hPrinter
  808. );
  809. BOOL
  810. WINAPI
  811. ReadPrinter(
  812. IN HANDLE hPrinter,
  813. OUT LPVOID pBuf,
  814. IN DWORD cbBuf,
  815. OUT LPDWORD pNoBytesRead
  816. );
  817. BOOL ;internal
  818. WINAPI ;internal
  819. SplReadPrinter( ;internal
  820. HANDLE hPrinter, ;internal
  821. LPBYTE *pBuf, ;internal
  822. DWORD cbBuf ;internal
  823. ); ;internal
  824. BOOL
  825. WINAPI
  826. EndDocPrinter(
  827. IN HANDLE hPrinter
  828. );
  829. BOOL
  830. WINAPI
  831. AddJob%(
  832. IN HANDLE hPrinter,
  833. IN DWORD Level,
  834. OUT LPBYTE pData,
  835. IN DWORD cbBuf,
  836. OUT LPDWORD pcbNeeded
  837. );
  838. BOOL
  839. WINAPI
  840. ScheduleJob(
  841. IN HANDLE hPrinter,
  842. IN DWORD JobId
  843. );
  844. BOOL
  845. WINAPI
  846. PrinterProperties(
  847. IN HWND hWnd,
  848. IN HANDLE hPrinter
  849. );
  850. LONG
  851. WINAPI
  852. DocumentProperties%(
  853. IN HWND hWnd,
  854. IN HANDLE hPrinter,
  855. IN LPTSTR% pDeviceName,
  856. OUT PDEVMODE% pDevModeOutput,
  857. IN PDEVMODE% pDevModeInput,
  858. IN DWORD fMode
  859. );
  860. LONG
  861. WINAPI
  862. AdvancedDocumentProperties%(
  863. IN HWND hWnd,
  864. IN HANDLE hPrinter,
  865. IN LPTSTR% pDeviceName,
  866. OUT PDEVMODE% pDevModeOutput,
  867. IN PDEVMODE% pDevModeInput
  868. );
  869. LONG
  870. ExtDeviceMode(
  871. IN HWND hWnd,
  872. IN HANDLE hInst,
  873. OUT LPDEVMODEA pDevModeOutput,
  874. IN LPSTR pDeviceName,
  875. IN LPSTR pPort,
  876. IN LPDEVMODEA pDevModeInput,
  877. IN LPSTR pProfile,
  878. OUT DWORD fMode
  879. );
  880. BOOL ;internal
  881. WINAPI ;internal
  882. EnumPrinterPropertySheets( ;internal
  883. IN HANDLE hPrinter, ;internal
  884. IN HWND hWnd, ;internal
  885. IN LPFNADDPROPSHEETPAGE lpfnAdd, ;internal
  886. IN LPARAM lParam ;internal
  887. ); ;internal
  888. #define ENUMPRINTERPROPERTYSHEETS_ORD 100 ;internal
  889. DWORD
  890. WINAPI
  891. GetPrinterData%(
  892. IN HANDLE hPrinter,
  893. IN LPTSTR% pValueName,
  894. OUT LPDWORD pType,
  895. OUT LPBYTE pData,
  896. IN DWORD nSize,
  897. OUT LPDWORD pcbNeeded
  898. );
  899. DWORD
  900. WINAPI
  901. GetPrinterDataEx%(
  902. IN HANDLE hPrinter,
  903. IN LPCTSTR% pKeyName,
  904. IN LPCTSTR% pValueName,
  905. OUT LPDWORD pType,
  906. OUT LPBYTE pData,
  907. IN DWORD nSize,
  908. OUT LPDWORD pcbNeeded
  909. );
  910. DWORD
  911. WINAPI
  912. EnumPrinterData%(
  913. IN HANDLE hPrinter,
  914. IN DWORD dwIndex,
  915. OUT LPTSTR% pValueName,
  916. IN DWORD cbValueName,
  917. OUT LPDWORD pcbValueName,
  918. OUT LPDWORD pType,
  919. OUT LPBYTE pData,
  920. IN DWORD cbData,
  921. OUT LPDWORD pcbData
  922. );
  923. DWORD
  924. WINAPI
  925. EnumPrinterDataEx%(
  926. IN HANDLE hPrinter,
  927. IN LPCTSTR% pKeyName,
  928. OUT LPBYTE pEnumValues,
  929. IN DWORD cbEnumValues,
  930. OUT LPDWORD pcbEnumValues,
  931. OUT LPDWORD pnEnumValues
  932. );
  933. DWORD
  934. WINAPI
  935. EnumPrinterKey%(
  936. IN HANDLE hPrinter,
  937. IN LPCTSTR% pKeyName,
  938. OUT LPTSTR% pSubkey,
  939. IN DWORD cbSubkey,
  940. OUT LPDWORD pcbSubkey
  941. );
  942. DWORD
  943. WINAPI
  944. SetPrinterData%(
  945. IN HANDLE hPrinter,
  946. IN LPTSTR% pValueName,
  947. IN DWORD Type,
  948. IN LPBYTE pData,
  949. IN DWORD cbData
  950. );
  951. DWORD
  952. WINAPI
  953. SetPrinterDataEx%(
  954. IN HANDLE hPrinter,
  955. IN LPCTSTR% pKeyName,
  956. IN LPCTSTR% pValueName,
  957. IN DWORD Type,
  958. IN LPBYTE pData,
  959. IN DWORD cbData
  960. );
  961. DWORD
  962. WINAPI
  963. DeletePrinterData%(
  964. IN HANDLE hPrinter,
  965. IN LPTSTR% pValueName
  966. );
  967. DWORD
  968. WINAPI
  969. DeletePrinterDataEx%(
  970. IN HANDLE hPrinter,
  971. IN LPCTSTR% pKeyName,
  972. IN LPCTSTR% pValueName
  973. );
  974. DWORD
  975. WINAPI
  976. DeletePrinterKey%(
  977. IN HANDLE hPrinter,
  978. IN LPCTSTR% pKeyName
  979. );
  980. #define PRINTER_NOTIFY_TYPE 0x00
  981. #define JOB_NOTIFY_TYPE 0x01
  982. #define PRINTER_NOTIFY_FIELD_SERVER_NAME 0x00
  983. #define PRINTER_NOTIFY_FIELD_PRINTER_NAME 0x01
  984. #define PRINTER_NOTIFY_FIELD_SHARE_NAME 0x02
  985. #define PRINTER_NOTIFY_FIELD_PORT_NAME 0x03
  986. #define PRINTER_NOTIFY_FIELD_DRIVER_NAME 0x04
  987. #define PRINTER_NOTIFY_FIELD_COMMENT 0x05
  988. #define PRINTER_NOTIFY_FIELD_LOCATION 0x06
  989. #define PRINTER_NOTIFY_FIELD_DEVMODE 0x07
  990. #define PRINTER_NOTIFY_FIELD_SEPFILE 0x08
  991. #define PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR 0x09
  992. #define PRINTER_NOTIFY_FIELD_PARAMETERS 0x0A
  993. #define PRINTER_NOTIFY_FIELD_DATATYPE 0x0B
  994. #define PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR 0x0C
  995. #define PRINTER_NOTIFY_FIELD_ATTRIBUTES 0x0D
  996. #define PRINTER_NOTIFY_FIELD_PRIORITY 0x0E
  997. #define PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY 0x0F
  998. #define PRINTER_NOTIFY_FIELD_START_TIME 0x10
  999. #define PRINTER_NOTIFY_FIELD_UNTIL_TIME 0x11
  1000. #define PRINTER_NOTIFY_FIELD_STATUS 0x12
  1001. #define PRINTER_NOTIFY_FIELD_STATUS_STRING 0x13
  1002. #define PRINTER_NOTIFY_FIELD_CJOBS 0x14
  1003. #define PRINTER_NOTIFY_FIELD_AVERAGE_PPM 0x15
  1004. #define PRINTER_NOTIFY_FIELD_TOTAL_PAGES 0x16
  1005. #define PRINTER_NOTIFY_FIELD_PAGES_PRINTED 0x17
  1006. #define PRINTER_NOTIFY_FIELD_TOTAL_BYTES 0x18
  1007. #define PRINTER_NOTIFY_FIELD_BYTES_PRINTED 0x19
  1008. #define PRINTER_NOTIFY_FIELD_OBJECT_GUID 0x1A
  1009. #define JOB_NOTIFY_FIELD_PRINTER_NAME 0x00
  1010. #define JOB_NOTIFY_FIELD_MACHINE_NAME 0x01
  1011. #define JOB_NOTIFY_FIELD_PORT_NAME 0x02
  1012. #define JOB_NOTIFY_FIELD_USER_NAME 0x03
  1013. #define JOB_NOTIFY_FIELD_NOTIFY_NAME 0x04
  1014. #define JOB_NOTIFY_FIELD_DATATYPE 0x05
  1015. #define JOB_NOTIFY_FIELD_PRINT_PROCESSOR 0x06
  1016. #define JOB_NOTIFY_FIELD_PARAMETERS 0x07
  1017. #define JOB_NOTIFY_FIELD_DRIVER_NAME 0x08
  1018. #define JOB_NOTIFY_FIELD_DEVMODE 0x09
  1019. #define JOB_NOTIFY_FIELD_STATUS 0x0A
  1020. #define JOB_NOTIFY_FIELD_STATUS_STRING 0x0B
  1021. #define JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR 0x0C
  1022. #define JOB_NOTIFY_FIELD_DOCUMENT 0x0D
  1023. #define JOB_NOTIFY_FIELD_PRIORITY 0x0E
  1024. #define JOB_NOTIFY_FIELD_POSITION 0x0F
  1025. #define JOB_NOTIFY_FIELD_SUBMITTED 0x10
  1026. #define JOB_NOTIFY_FIELD_START_TIME 0x11
  1027. #define JOB_NOTIFY_FIELD_UNTIL_TIME 0x12
  1028. #define JOB_NOTIFY_FIELD_TIME 0x13
  1029. #define JOB_NOTIFY_FIELD_TOTAL_PAGES 0x14
  1030. #define JOB_NOTIFY_FIELD_PAGES_PRINTED 0x15
  1031. #define JOB_NOTIFY_FIELD_TOTAL_BYTES 0x16
  1032. #define JOB_NOTIFY_FIELD_BYTES_PRINTED 0x17
  1033. typedef struct _PRINTER_NOTIFY_OPTIONS_TYPE {
  1034. WORD Type;
  1035. WORD Reserved0;
  1036. DWORD Reserved1;
  1037. DWORD Reserved2;
  1038. DWORD Count;
  1039. PWORD pFields;
  1040. } PRINTER_NOTIFY_OPTIONS_TYPE, *PPRINTER_NOTIFY_OPTIONS_TYPE, *LPPRINTER_NOTIFY_OPTIONS_TYPE;
  1041. #define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01
  1042. typedef struct _PRINTER_NOTIFY_OPTIONS {
  1043. DWORD Version;
  1044. DWORD Flags;
  1045. DWORD Count;
  1046. PPRINTER_NOTIFY_OPTIONS_TYPE pTypes;
  1047. } PRINTER_NOTIFY_OPTIONS, *PPRINTER_NOTIFY_OPTIONS, *LPPRINTER_NOTIFY_OPTIONS;
  1048. #define PRINTER_NOTIFY_INFO_DISCARDED 0x01
  1049. typedef struct _PRINTER_NOTIFY_INFO_DATA {
  1050. WORD Type;
  1051. WORD Field;
  1052. DWORD Reserved;
  1053. DWORD Id;
  1054. union {
  1055. DWORD adwData[2];
  1056. struct {
  1057. DWORD cbBuf;
  1058. LPVOID pBuf;
  1059. } Data;
  1060. } NotifyData;
  1061. } PRINTER_NOTIFY_INFO_DATA, *PPRINTER_NOTIFY_INFO_DATA, *LPPRINTER_NOTIFY_INFO_DATA;
  1062. typedef struct _PRINTER_NOTIFY_INFO {
  1063. DWORD Version;
  1064. DWORD Flags;
  1065. DWORD Count;
  1066. PRINTER_NOTIFY_INFO_DATA aData[1];
  1067. } PRINTER_NOTIFY_INFO, *PPRINTER_NOTIFY_INFO, *LPPRINTER_NOTIFY_INFO;
  1068. typedef struct _BINARY_CONTAINER{
  1069. DWORD cbBuf;
  1070. LPBYTE pData;
  1071. } BINARY_CONTAINER, *PBINARY_CONTAINER;
  1072. typedef struct _BIDI_DATA{
  1073. DWORD dwBidiType;
  1074. union {
  1075. BOOL bData;
  1076. LONG iData;
  1077. LPWSTR sData;
  1078. FLOAT fData;
  1079. BINARY_CONTAINER biData;
  1080. }u;
  1081. } BIDI_DATA, *PBIDI_DATA, *LPBIDI_DATA;
  1082. typedef struct _BIDI_REQUEST_DATA{
  1083. DWORD dwReqNumber;
  1084. LPWSTR pSchema;
  1085. BIDI_DATA data;
  1086. } BIDI_REQUEST_DATA , *PBIDI_REQUEST_DATA , *LPBIDI_REQUEST_DATA;
  1087. typedef struct _BIDI_REQUEST_CONTAINER{
  1088. DWORD Version;
  1089. DWORD Flags;
  1090. DWORD Count;
  1091. BIDI_REQUEST_DATA aData[ 1 ];
  1092. }BIDI_REQUEST_CONTAINER, *PBIDI_REQUEST_CONTAINER, *LPBIDI_REQUEST_CONTAINER;
  1093. typedef struct _BIDI_RESPONSE_DATA{
  1094. DWORD dwResult;
  1095. DWORD dwReqNumber;
  1096. LPWSTR pSchema;
  1097. BIDI_DATA data;
  1098. } BIDI_RESPONSE_DATA, *PBIDI_RESPONSE_DATA, *LPBIDI_RESPONSE_DATA;
  1099. typedef struct _BIDI_RESPONSE_CONTAINER{
  1100. DWORD Version;
  1101. DWORD Flags;
  1102. DWORD Count;
  1103. BIDI_RESPONSE_DATA aData[ 1 ];
  1104. } BIDI_RESPONSE_CONTAINER, *PBIDI_RESPONSE_CONTAINER, *LPBIDI_RESPONSE_CONTAINER;
  1105. #define BIDI_ACTION_ENUM_SCHEMA L"EnumSchema"
  1106. #define BIDI_ACTION_GET L"Get"
  1107. #define BIDI_ACTION_SET L"Set"
  1108. #define BIDI_ACTION_GET_ALL L"GetAll"
  1109. typedef enum {
  1110. BIDI_NULL = 0,
  1111. BIDI_INT = 1,
  1112. BIDI_FLOAT = 2,
  1113. BIDI_BOOL = 3,
  1114. BIDI_STRING = 4,
  1115. BIDI_TEXT = 5,
  1116. BIDI_ENUM = 6,
  1117. BIDI_BLOB = 7
  1118. } BIDI_TYPE;
  1119. #define BIDI_ACCESS_ADMINISTRATOR 0x1
  1120. #define BIDI_ACCESS_USER 0x2
  1121. /*
  1122. Error code for bidi apis
  1123. */
  1124. #define ERROR_BIDI_STATUS_OK 0
  1125. #define ERROR_BIDI_NOT_SUPPORTED ERROR_NOT_SUPPORTED
  1126. #define ERROR_BIDI_ERROR_BASE 13000
  1127. #define ERROR_BIDI_STATUS_WARNING (ERROR_BIDI_ERROR_BASE + 1)
  1128. #define ERROR_BIDI_SCHEMA_READ_ONLY (ERROR_BIDI_ERROR_BASE + 2)
  1129. #define ERROR_BIDI_SERVER_OFFLINE (ERROR_BIDI_ERROR_BASE + 3)
  1130. #define ERROR_BIDI_DEVICE_OFFLINE (ERROR_BIDI_ERROR_BASE + 4)
  1131. #define ERROR_BIDI_SCHEMA_NOT_SUPPORTED (ERROR_BIDI_ERROR_BASE + 5)
  1132. DWORD
  1133. WINAPI
  1134. WaitForPrinterChange(
  1135. IN HANDLE hPrinter,
  1136. IN DWORD Flags
  1137. );
  1138. HANDLE
  1139. WINAPI
  1140. FindFirstPrinterChangeNotification(
  1141. IN HANDLE hPrinter,
  1142. IN DWORD fdwFlags,
  1143. IN DWORD fdwOptions,
  1144. IN LPVOID pPrinterNotifyOptions
  1145. );
  1146. BOOL
  1147. WINAPI
  1148. FindNextPrinterChangeNotification(
  1149. IN HANDLE hChange,
  1150. OUT PDWORD pdwChange,
  1151. IN LPVOID pvReserved,
  1152. OUT LPVOID *ppPrinterNotifyInfo
  1153. );
  1154. BOOL
  1155. WINAPI
  1156. FreePrinterNotifyInfo(
  1157. IN PPRINTER_NOTIFY_INFO pPrinterNotifyInfo
  1158. );
  1159. BOOL
  1160. WINAPI
  1161. FindClosePrinterChangeNotification(
  1162. IN HANDLE hChange
  1163. );
  1164. #define PRINTER_CHANGE_ADD_PRINTER 0x00000001
  1165. #define PRINTER_CHANGE_SET_PRINTER 0x00000002
  1166. #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
  1167. #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
  1168. #define PRINTER_CHANGE_PRINTER 0x000000FF
  1169. #define PRINTER_CHANGE_ADD_JOB 0x00000100
  1170. #define PRINTER_CHANGE_SET_JOB 0x00000200
  1171. #define PRINTER_CHANGE_DELETE_JOB 0x00000400
  1172. #define PRINTER_CHANGE_WRITE_JOB 0x00000800
  1173. #define PRINTER_CHANGE_JOB 0x0000FF00
  1174. #define PRINTER_CHANGE_ADD_FORM 0x00010000
  1175. #define PRINTER_CHANGE_SET_FORM 0x00020000
  1176. #define PRINTER_CHANGE_DELETE_FORM 0x00040000
  1177. #define PRINTER_CHANGE_FORM 0x00070000
  1178. #define PRINTER_CHANGE_ADD_PORT 0x00100000
  1179. #define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
  1180. #define PRINTER_CHANGE_DELETE_PORT 0x00400000
  1181. #define PRINTER_CHANGE_PORT 0x00700000
  1182. #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
  1183. #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
  1184. #define PRINTER_CHANGE_PRINT_PROCESSOR 0x07000000
  1185. #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
  1186. #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
  1187. #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
  1188. #define PRINTER_CHANGE_PRINTER_DRIVER 0x70000000
  1189. #define PRINTER_CHANGE_TIMEOUT 0x80000000
  1190. #define PRINTER_CHANGE_ALL 0x7777FFFF
  1191. DWORD
  1192. WINAPI
  1193. PrinterMessageBox%(
  1194. IN HANDLE hPrinter,
  1195. IN DWORD Error,
  1196. IN HWND hWnd,
  1197. IN LPTSTR% pText,
  1198. IN LPTSTR% pCaption,
  1199. IN DWORD dwType
  1200. );
  1201. #define PRINTER_ERROR_INFORMATION 0x80000000
  1202. #define PRINTER_ERROR_WARNING 0x40000000
  1203. #define PRINTER_ERROR_SEVERE 0x20000000
  1204. #define PRINTER_ERROR_OUTOFPAPER 0x00000001
  1205. #define PRINTER_ERROR_JAM 0x00000002
  1206. #define PRINTER_ERROR_OUTOFTONER 0x00000004
  1207. BOOL
  1208. WINAPI
  1209. ClosePrinter(
  1210. IN HANDLE hPrinter
  1211. );
  1212. BOOL
  1213. WINAPI
  1214. AddForm%(
  1215. IN HANDLE hPrinter,
  1216. IN DWORD Level,
  1217. IN LPBYTE pForm
  1218. );
  1219. BOOL
  1220. WINAPI
  1221. DeleteForm%(
  1222. IN HANDLE hPrinter,
  1223. IN LPTSTR% pFormName
  1224. );
  1225. BOOL
  1226. WINAPI
  1227. GetForm%(
  1228. IN HANDLE hPrinter,
  1229. IN LPTSTR% pFormName,
  1230. IN DWORD Level,
  1231. OUT LPBYTE pForm,
  1232. IN DWORD cbBuf,
  1233. OUT LPDWORD pcbNeeded
  1234. );
  1235. BOOL
  1236. WINAPI
  1237. SetForm%(
  1238. IN HANDLE hPrinter,
  1239. IN LPTSTR% pFormName,
  1240. IN DWORD Level,
  1241. IN LPBYTE pForm
  1242. );
  1243. BOOL
  1244. WINAPI
  1245. EnumForms%(
  1246. IN HANDLE hPrinter,
  1247. IN DWORD Level,
  1248. OUT LPBYTE pForm,
  1249. IN DWORD cbBuf,
  1250. OUT LPDWORD pcbNeeded,
  1251. OUT LPDWORD pcReturned
  1252. );
  1253. BOOL
  1254. WINAPI
  1255. EnumMonitors%(
  1256. IN LPTSTR% pName,
  1257. IN DWORD Level,
  1258. OUT LPBYTE pMonitors,
  1259. IN DWORD cbBuf,
  1260. OUT LPDWORD pcbNeeded,
  1261. OUT LPDWORD pcReturned
  1262. );
  1263. BOOL
  1264. WINAPI
  1265. AddMonitor%(
  1266. IN LPTSTR% pName,
  1267. IN DWORD Level,
  1268. IN LPBYTE pMonitors
  1269. );
  1270. BOOL
  1271. WINAPI
  1272. DeleteMonitor%(
  1273. IN LPTSTR% pName,
  1274. IN LPTSTR% pEnvironment,
  1275. IN LPTSTR% pMonitorName
  1276. );
  1277. BOOL
  1278. WINAPI
  1279. EnumPorts%(
  1280. IN LPTSTR% pName,
  1281. IN DWORD Level,
  1282. OUT LPBYTE pPorts,
  1283. IN DWORD cbBuf,
  1284. OUT LPDWORD pcbNeeded,
  1285. OUT LPDWORD pcReturned
  1286. );
  1287. BOOL
  1288. WINAPI
  1289. AddPort%(
  1290. IN LPTSTR% pName,
  1291. IN HWND hWnd,
  1292. IN LPTSTR% pMonitorName
  1293. );
  1294. BOOL
  1295. WINAPI
  1296. ConfigurePort%(
  1297. IN LPTSTR% pName,
  1298. IN HWND hWnd,
  1299. IN LPTSTR% pPortName
  1300. );
  1301. BOOL
  1302. WINAPI
  1303. DeletePort%(
  1304. IN LPTSTR% pName,
  1305. IN HWND hWnd,
  1306. IN LPTSTR% pPortName
  1307. );
  1308. BOOL
  1309. WINAPI
  1310. XcvDataW(
  1311. IN HANDLE hXcv,
  1312. IN PCWSTR pszDataName,
  1313. IN PBYTE pInputData,
  1314. IN DWORD cbInputData,
  1315. OUT PBYTE pOutputData,
  1316. IN DWORD cbOutputData,
  1317. OUT PDWORD pcbOutputNeeded,
  1318. OUT PDWORD pdwStatus
  1319. );
  1320. #define XcvData XcvDataW
  1321. BOOL
  1322. WINAPI
  1323. GetDefaultPrinter%(
  1324. IN LPTSTR% pszBuffer,
  1325. IN LPDWORD pcchBuffer
  1326. );
  1327. BOOL
  1328. WINAPI
  1329. SetDefaultPrinter%(
  1330. IN LPCTSTR% pszPrinter
  1331. );
  1332. BOOL ;internal
  1333. WINAPI ;internal
  1334. PublishPrinterA( ;internal
  1335. IN HWND hwnd, ;internal
  1336. IN LPCSTR pszUNCName, ;internal
  1337. IN LPCSTR pszDN, ;internal
  1338. IN LPCSTR pszCN, ;internal
  1339. OUT LPSTR *ppszDN, ;internal
  1340. IN DWORD dwAction ;internal
  1341. ); ;internal
  1342. BOOL ;internal
  1343. WINAPI ;internal
  1344. PublishPrinterW( ;internal
  1345. IN HWND hwnd, ;internal
  1346. IN LPCWSTR pszUNCName, ;internal
  1347. IN LPCWSTR pszDN, ;internal
  1348. IN LPCWSTR pszCN, ;internal
  1349. OUT LPWSTR *ppszDN, ;internal
  1350. IN DWORD dwAction ;internal
  1351. ); ;internal
  1352. #define PUBLISHPRINTER_QUERY 1 ;internal
  1353. #define PUBLISHPRINTER_DELETE_DUPLICATES 2 ;internal
  1354. #define PUBLISHPRINTER_FAIL_ON_DUPLICATE 3 ;internal
  1355. #define PUBLISHPRINTER_IGNORE_DUPLICATES 4 ;internal
  1356. BOOL
  1357. WINAPI
  1358. SetPort%(
  1359. IN LPTSTR% pName,
  1360. IN LPTSTR% pPortName,
  1361. IN DWORD dwLevel,
  1362. IN LPBYTE pPortInfo
  1363. );
  1364. BOOL
  1365. WINAPI
  1366. AddPrinterConnection%(
  1367. IN LPTSTR% pName
  1368. );
  1369. BOOL
  1370. WINAPI
  1371. DeletePrinterConnection%(
  1372. IN LPTSTR% pName
  1373. );
  1374. HANDLE
  1375. WINAPI
  1376. ConnectToPrinterDlg(
  1377. IN HWND hwnd,
  1378. IN DWORD Flags
  1379. );
  1380. typedef struct _PROVIDOR_INFO_1%{
  1381. LPTSTR% pName;
  1382. LPTSTR% pEnvironment;
  1383. LPTSTR% pDLLName;
  1384. } PROVIDOR_INFO_1%, *PPROVIDOR_INFO_1%, *LPPROVIDOR_INFO_1%;
  1385. typedef struct _PROVIDOR_INFO_2%{
  1386. LPTSTR% pOrder;
  1387. } PROVIDOR_INFO_2%, *PPROVIDOR_INFO_2%, *LPPROVIDOR_INFO_2%;
  1388. BOOL
  1389. WINAPI
  1390. AddPrintProvidor%(
  1391. IN LPTSTR% pName,
  1392. IN DWORD level,
  1393. IN LPBYTE pProvidorInfo
  1394. );
  1395. BOOL
  1396. WINAPI
  1397. DeletePrintProvidor%(
  1398. IN LPTSTR% pName,
  1399. IN LPTSTR% pEnvironment,
  1400. IN LPTSTR% pPrintProvidorName
  1401. );
  1402. BOOL ;internal
  1403. ClusterSplOpen( ;internal
  1404. IN LPCTSTR pszServer, ;internal
  1405. IN LPCTSTR pszResource, ;internal
  1406. OUT PHANDLE phSpooler, ;internal
  1407. IN LPCTSTR pszName, ;internal
  1408. IN LPCTSTR pszAddress ;internal
  1409. ); ;internal
  1410. ;internal
  1411. BOOL ;internal
  1412. ClusterSplClose( ;internal
  1413. IN HANDLE hSpooler ;internal
  1414. ); ;internal
  1415. ;internal
  1416. BOOL ;internal
  1417. ClusterSplIsAlive( ;internal
  1418. IN HANDLE hSpooler ;internal
  1419. ); ;internal
  1420. /*
  1421. * SetPrinterData and GetPrinterData Server Handle Key values
  1422. */
  1423. #define SPLREG_DEFAULT_SPOOL_DIRECTORY TEXT("DefaultSpoolDirectory")
  1424. #define SPLREG_PORT_THREAD_PRIORITY_DEFAULT TEXT("PortThreadPriorityDefault")
  1425. #define SPLREG_PORT_THREAD_PRIORITY TEXT("PortThreadPriority")
  1426. #define SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT TEXT("SchedulerThreadPriorityDefault")
  1427. #define SPLREG_SCHEDULER_THREAD_PRIORITY TEXT("SchedulerThreadPriority")
  1428. #define SPLREG_BEEP_ENABLED TEXT("BeepEnabled")
  1429. #define SPLREG_NET_POPUP TEXT("NetPopup")
  1430. #define SPLREG_RETRY_POPUP TEXT("RetryPopup")
  1431. #define SPLREG_NET_POPUP_TO_COMPUTER TEXT("NetPopupToComputer")
  1432. #define SPLREG_EVENT_LOG TEXT("EventLog")
  1433. #define SPLREG_MAJOR_VERSION TEXT("MajorVersion")
  1434. #define SPLREG_MINOR_VERSION TEXT("MinorVersion")
  1435. #define SPLREG_ARCHITECTURE TEXT("Architecture")
  1436. #define SPLREG_OS_VERSION TEXT("OSVersion")
  1437. #define SPLREG_OS_VERSIONEX TEXT("OSVersionEx")
  1438. #define SPLREG_DS_PRESENT TEXT("DsPresent")
  1439. #define SPLREG_DS_PRESENT_FOR_USER TEXT("DsPresentForUser")
  1440. #define SPLREG_REMOTE_FAX TEXT("RemoteFax")
  1441. #define SPLREG_NO_REMOTE_PRINTER_DRIVERS TEXT("NoRemotePrinterDrivers") ;internal
  1442. #define SPLREG_NON_RAW_TO_MASQ_PRINTERS TEXT("NonRawToMasqPrinters") ;internal
  1443. #define SPLREG_CHANGE_ID TEXT("ChangeId") ;internal
  1444. #define SPLREG_CLUSTER_LOCAL_ROOT_KEY TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\Print\\Cluster") ;internal
  1445. #define SPLREG_CLUSTER_UPGRADE_KEY TEXT("ClusterUpgrade") ;internal
  1446. #define SPLREG_CLUSTER_DRIVER_DIRECTORY TEXT("ClusterDriverDirectory") ;internal
  1447. #define SPLREG_RESTART_JOB_ON_POOL_ERROR TEXT("RestartJobOnPoolError")
  1448. #define SPLREG_RESTART_JOB_ON_POOL_ENABLED TEXT("RestartJobOnPoolEnabled")
  1449. #define SPLREG_DNS_MACHINE_NAME TEXT("DNSMachineName")
  1450. #define SERVER_ACCESS_ADMINISTER 0x00000001
  1451. #define SERVER_ACCESS_ENUMERATE 0x00000002
  1452. #define PRINTER_ACCESS_ADMINISTER 0x00000004
  1453. #define PRINTER_ACCESS_USE 0x00000008
  1454. #define JOB_ACCESS_ADMINISTER 0x00000010
  1455. #define JOB_ACCESS_READ 0x00000020
  1456. /*
  1457. * Access rights for print servers
  1458. */
  1459. #define SERVER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
  1460. SERVER_ACCESS_ADMINISTER |\
  1461. SERVER_ACCESS_ENUMERATE)
  1462. #define SERVER_READ (STANDARD_RIGHTS_READ |\
  1463. SERVER_ACCESS_ENUMERATE)
  1464. #define SERVER_WRITE (STANDARD_RIGHTS_WRITE |\
  1465. SERVER_ACCESS_ADMINISTER |\
  1466. SERVER_ACCESS_ENUMERATE)
  1467. #define SERVER_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
  1468. SERVER_ACCESS_ENUMERATE)
  1469. /*
  1470. * Access rights for printers
  1471. */
  1472. #define PRINTER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
  1473. PRINTER_ACCESS_ADMINISTER |\
  1474. PRINTER_ACCESS_USE)
  1475. #define PRINTER_READ (STANDARD_RIGHTS_READ |\
  1476. PRINTER_ACCESS_USE)
  1477. #define PRINTER_WRITE (STANDARD_RIGHTS_WRITE |\
  1478. PRINTER_ACCESS_USE)
  1479. #define PRINTER_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
  1480. PRINTER_ACCESS_USE)
  1481. /*
  1482. * Access rights for jobs
  1483. */
  1484. #define JOB_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED |\
  1485. JOB_ACCESS_ADMINISTER |\
  1486. JOB_ACCESS_READ)
  1487. #define JOB_READ (STANDARD_RIGHTS_READ |\
  1488. JOB_ACCESS_READ)
  1489. #define JOB_WRITE (STANDARD_RIGHTS_WRITE |\
  1490. JOB_ACCESS_ADMINISTER)
  1491. #define JOB_EXECUTE (STANDARD_RIGHTS_EXECUTE |\
  1492. JOB_ACCESS_ADMINISTER)
  1493. /*
  1494. * DS Print-Queue property tables
  1495. */
  1496. // Predefined Registry Keys used by Set/GetPrinterDataEx
  1497. #define SPLDS_SPOOLER_KEY TEXT("DsSpooler")
  1498. #define SPLDS_DRIVER_KEY TEXT("DsDriver")
  1499. #define SPLDS_USER_KEY TEXT("DsUser")
  1500. // DS Print-Queue properties
  1501. #define SPLDS_ASSET_NUMBER TEXT("assetNumber")
  1502. #define SPLDS_BYTES_PER_MINUTE TEXT("bytesPerMinute")
  1503. #define SPLDS_DESCRIPTION TEXT("description")
  1504. #define SPLDS_DRIVER_NAME TEXT("driverName")
  1505. #define SPLDS_DRIVER_VERSION TEXT("driverVersion")
  1506. #define SPLDS_LOCATION TEXT("location")
  1507. #define SPLDS_PORT_NAME TEXT("portName")
  1508. #define SPLDS_PRINT_ATTRIBUTES TEXT("printAttributes")
  1509. #define SPLDS_PRINT_BIN_NAMES TEXT("printBinNames")
  1510. #define SPLDS_PRINT_COLLATE TEXT("printCollate")
  1511. #define SPLDS_PRINT_COLOR TEXT("printColor")
  1512. #define SPLDS_PRINT_DUPLEX_SUPPORTED TEXT("printDuplexSupported")
  1513. #define SPLDS_PRINT_END_TIME TEXT("printEndTime")
  1514. #define SPLDS_PRINTER_CLASS TEXT("printQueue")
  1515. #define SPLDS_PRINTER_NAME TEXT("printerName")
  1516. #define SPLDS_PRINT_KEEP_PRINTED_JOBS TEXT("printKeepPrintedJobs")
  1517. #define SPLDS_PRINT_LANGUAGE TEXT("printLanguage")
  1518. #define SPLDS_PRINT_MAC_ADDRESS TEXT("printMACAddress")
  1519. #define SPLDS_PRINT_MAX_X_EXTENT TEXT("printMaxXExtent")
  1520. #define SPLDS_PRINT_MAX_Y_EXTENT TEXT("printMaxYExtent")
  1521. #define SPLDS_PRINT_MAX_RESOLUTION_SUPPORTED TEXT("printMaxResolutionSupported")
  1522. #define SPLDS_PRINT_MEDIA_READY TEXT("printMediaReady")
  1523. #define SPLDS_PRINT_MEDIA_SUPPORTED TEXT("printMediaSupported")
  1524. #define SPLDS_PRINT_MEMORY TEXT("printMemory")
  1525. #define SPLDS_PRINT_MIN_X_EXTENT TEXT("printMinXExtent")
  1526. #define SPLDS_PRINT_MIN_Y_EXTENT TEXT("printMinYExtent")
  1527. #define SPLDS_PRINT_NETWORK_ADDRESS TEXT("printNetworkAddress")
  1528. #define SPLDS_PRINT_NOTIFY TEXT("printNotify")
  1529. #define SPLDS_PRINT_NUMBER_UP TEXT("printNumberUp")
  1530. #define SPLDS_PRINT_ORIENTATIONS_SUPPORTED TEXT("printOrientationsSupported")
  1531. #define SPLDS_PRINT_OWNER TEXT("printOwner")
  1532. #define SPLDS_PRINT_PAGES_PER_MINUTE TEXT("printPagesPerMinute")
  1533. #define SPLDS_PRINT_RATE TEXT("printRate")
  1534. #define SPLDS_PRINT_RATE_UNIT TEXT("printRateUnit")
  1535. #define SPLDS_PRINT_SEPARATOR_FILE TEXT("printSeparatorFile")
  1536. #define SPLDS_PRINT_SHARE_NAME TEXT("printShareName")
  1537. #define SPLDS_PRINT_SPOOLING TEXT("printSpooling")
  1538. #define SPLDS_PRINT_STAPLING_SUPPORTED TEXT("printStaplingSupported")
  1539. #define SPLDS_PRINT_START_TIME TEXT("printStartTime")
  1540. #define SPLDS_PRINT_STATUS TEXT("printStatus")
  1541. #define SPLDS_PRIORITY TEXT("priority")
  1542. #define SPLDS_SERVER_NAME TEXT("serverName")
  1543. #define SPLDS_SHORT_SERVER_NAME TEXT("shortServerName")
  1544. #define SPLDS_UNC_NAME TEXT("uNCName")
  1545. #define SPLDS_URL TEXT("url")
  1546. #define SPLDS_FLAGS TEXT("flags")
  1547. #define SPLDS_VERSION_NUMBER TEXT("versionNumber")
  1548. /*
  1549. -- Additional Print-Queue properties --
  1550. These properties are not defined in the default Directory Services Schema,
  1551. but should be used when extending the Schema so a consistent interface is maintained.
  1552. */
  1553. #define SPLDS_PRINTER_NAME_ALIASES TEXT("printerNameAliases") // MULTI_SZ
  1554. #define SPLDS_PRINTER_LOCATIONS TEXT("printerLocations") // MULTI_SZ
  1555. #define SPLDS_PRINTER_MODEL TEXT("printerModel") // SZ
  1556. BOOL ;internal
  1557. SpoolerInit( ;internal
  1558. VOID ;internal
  1559. ); ;internal
  1560. ;begin_both
  1561. #ifdef __cplusplus
  1562. }
  1563. #endif
  1564. ;end_both
  1565. #endif // _WINSPOOL_
  1566. #endif // _WINSPOLP_ ;internal_NT