Leaked source code of windows server 2003
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.

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