Fix PRINTER_DEFAULTSA and PRINTER_DEFAULTSW structures
[reactos.git] / reactos / include / psdk / winspool.h
1 #ifndef _WINSPOOL_
2 #define _WINSPOOL_
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #ifdef _MSC_VER
9 #pragma warning(push)
10 #pragma warning(disable:4820)
11 #endif
12
13 #define DI_CHANNEL 1
14 #define DI_CHANNEL_WRITE 2
15 #define DI_READ_SPOOL_JOB 3
16
17 #define FORM_BUILTIN 1
18
19 #define JOB_CONTROL_PAUSE 1
20 #define JOB_CONTROL_RESUME 2
21 #define JOB_CONTROL_CANCEL 3
22 #define JOB_CONTROL_RESTART 4
23 #define JOB_CONTROL_DELETE 5
24
25 #define JOB_STATUS_PAUSED 1
26 #define JOB_STATUS_ERROR 2
27 #define JOB_STATUS_DELETING 4
28 #define JOB_STATUS_SPOOLING 8
29 #define JOB_STATUS_PRINTING 16
30 #define JOB_STATUS_OFFLINE 32
31 #define JOB_STATUS_PAPEROUT 0x40
32 #define JOB_STATUS_PRINTED 0x80
33 #define JOB_STATUS_DELETED 0x100
34 #define JOB_STATUS_BLOCKED_DEVQ 0x200
35 #define JOB_STATUS_USER_INTERVENTION 0x400
36
37 #define JOB_POSITION_UNSPECIFIED 0
38
39 #define JOB_NOTIFY_TYPE 1
40
41 #define JOB_NOTIFY_FIELD_PRINTER_NAME 0
42 #define JOB_NOTIFY_FIELD_MACHINE_NAME 1
43 #define JOB_NOTIFY_FIELD_PORT_NAME 2
44 #define JOB_NOTIFY_FIELD_USER_NAME 3
45 #define JOB_NOTIFY_FIELD_NOTIFY_NAME 4
46 #define JOB_NOTIFY_FIELD_DATATYPE 5
47 #define JOB_NOTIFY_FIELD_PRINT_PROCESSOR 6
48 #define JOB_NOTIFY_FIELD_PARAMETERS 7
49 #define JOB_NOTIFY_FIELD_DRIVER_NAME 8
50 #define JOB_NOTIFY_FIELD_DEVMODE 9
51 #define JOB_NOTIFY_FIELD_STATUS 10
52 #define JOB_NOTIFY_FIELD_STATUS_STRING 11
53 #define JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR 12
54 #define JOB_NOTIFY_FIELD_DOCUMENT 13
55 #define JOB_NOTIFY_FIELD_PRIORITY 14
56 #define JOB_NOTIFY_FIELD_POSITION 15
57 #define JOB_NOTIFY_FIELD_SUBMITTED 16
58 #define JOB_NOTIFY_FIELD_START_TIME 17
59 #define JOB_NOTIFY_FIELD_UNTIL_TIME 18
60 #define JOB_NOTIFY_FIELD_TIME 19
61 #define JOB_NOTIFY_FIELD_TOTAL_PAGES 20
62 #define JOB_NOTIFY_FIELD_PAGES_PRINTED 21
63 #define JOB_NOTIFY_FIELD_TOTAL_BYTES 22
64 #define JOB_NOTIFY_FIELD_BYTES_PRINTED 23
65
66 #define JOB_ACCESS_ADMINISTER 16
67 #define JOB_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|JOB_ACCESS_ADMINISTER)
68 #define JOB_READ (STANDARD_RIGHTS_READ|JOB_ACCESS_ADMINISTER)
69 #define JOB_WRITE (STANDARD_RIGHTS_WRITE|JOB_ACCESS_ADMINISTER)
70 #define JOB_EXECUTE (STANDARD_RIGHTS_EXECUTE|JOB_ACCESS_ADMINISTER)
71
72 #define PRINTER_NOTIFY_OPTIONS_REFRESH 1
73 #define PRINTER_ACCESS_ADMINISTER 4
74 #define PRINTER_ACCESS_USE 8
75
76 #define PRINTER_ERROR_INFORMATION 0x80000000
77 #define PRINTER_ERROR_WARNING 0x40000000
78 #define PRINTER_ERROR_SEVERE 0x20000000
79 #define PRINTER_ERROR_OUTOFPAPER 1
80 #define PRINTER_ERROR_JAM 2
81 #define PRINTER_ERROR_OUTOFTONER 4
82
83 #define PRINTER_CONTROL_PAUSE 1
84 #define PRINTER_CONTROL_RESUME 2
85 #define PRINTER_CONTROL_PURGE 3
86 #define PRINTER_CONTROL_SET_STATUS 4
87
88 #define PRINTER_STATUS_PAUSED 1
89 #define PRINTER_STATUS_ERROR 2
90 #define PRINTER_STATUS_PENDING_DELETION 4
91 #define PRINTER_STATUS_PAPER_JAM 8
92 #define PRINTER_STATUS_PAPER_OUT 0x10
93 #define PRINTER_STATUS_MANUAL_FEED 0x20
94 #define PRINTER_STATUS_PAPER_PROBLEM 0x40
95 #define PRINTER_STATUS_OFFLINE 0x80
96 #define PRINTER_STATUS_IO_ACTIVE 0x100
97 #define PRINTER_STATUS_BUSY 0x200
98 #define PRINTER_STATUS_PRINTING 0x400
99 #define PRINTER_STATUS_OUTPUT_BIN_FULL 0x800
100 #define PRINTER_STATUS_NOT_AVAILABLE 0x1000
101 #define PRINTER_STATUS_WAITING 0x2000
102 #define PRINTER_STATUS_PROCESSING 0x4000
103 #define PRINTER_STATUS_INITIALIZING 0x8000
104 #define PRINTER_STATUS_WARMING_UP 0x10000
105 #define PRINTER_STATUS_TONER_LOW 0x20000
106 #define PRINTER_STATUS_NO_TONER 0x40000
107 #define PRINTER_STATUS_PAGE_PUNT 0x80000
108 #define PRINTER_STATUS_USER_INTERVENTION 0x100000
109 #define PRINTER_STATUS_OUT_OF_MEMORY 0x200000
110 #define PRINTER_STATUS_DOOR_OPEN 0x400000
111 #define PRINTER_STATUS_SERVER_UNKNOWN 0x800000
112 #define PRINTER_STATUS_POWER_SAVE 0x1000000
113
114 #define PRINTER_ATTRIBUTE_QUEUED 1
115 #define PRINTER_ATTRIBUTE_DIRECT 2
116 #define PRINTER_ATTRIBUTE_DEFAULT 4
117 #define PRINTER_ATTRIBUTE_SHARED 8
118 #define PRINTER_ATTRIBUTE_NETWORK 0x10
119 #define PRINTER_ATTRIBUTE_HIDDEN 0x20
120 #define PRINTER_ATTRIBUTE_LOCAL 0x40
121 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x80
122 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x100
123 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x200
124 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x400
125 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x800
126 #define PRINTER_ATTRIBUTE_RAW_ONLY 0x1000
127 #define PRINTER_ATTRIBUTE_PUBLISHED 0x2000
128
129 #define PRINTER_ENUM_DEFAULT 1
130 #define PRINTER_ENUM_LOCAL 2
131 #define PRINTER_ENUM_CONNECTIONS 4
132 #define PRINTER_ENUM_FAVORITE 4
133 #define PRINTER_ENUM_NAME 8
134 #define PRINTER_ENUM_REMOTE 16
135 #define PRINTER_ENUM_SHARED 32
136 #define PRINTER_ENUM_NETWORK 0x40
137 #define PRINTER_ENUM_EXPAND 0x4000
138 #define PRINTER_ENUM_CONTAINER 0x8000
139 #define PRINTER_ENUM_ICONMASK 0xff0000
140 #define PRINTER_ENUM_ICON1 0x10000
141 #define PRINTER_ENUM_ICON2 0x20000
142 #define PRINTER_ENUM_ICON3 0x40000
143 #define PRINTER_ENUM_ICON4 0x80000
144 #define PRINTER_ENUM_ICON5 0x100000
145 #define PRINTER_ENUM_ICON6 0x200000
146 #define PRINTER_ENUM_ICON7 0x400000
147 #define PRINTER_ENUM_ICON8 0x800000
148
149 #define PRINTER_NOTIFY_TYPE 0
150 #define PRINTER_NOTIFY_FIELD_SERVER_NAME 0
151 #define PRINTER_NOTIFY_FIELD_PRINTER_NAME 1
152 #define PRINTER_NOTIFY_FIELD_SHARE_NAME 2
153 #define PRINTER_NOTIFY_FIELD_PORT_NAME 3
154 #define PRINTER_NOTIFY_FIELD_DRIVER_NAME 4
155 #define PRINTER_NOTIFY_FIELD_COMMENT 5
156 #define PRINTER_NOTIFY_FIELD_LOCATION 6
157 #define PRINTER_NOTIFY_FIELD_DEVMODE 7
158 #define PRINTER_NOTIFY_FIELD_SEPFILE 8
159 #define PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR 9
160 #define PRINTER_NOTIFY_FIELD_PARAMETERS 10
161 #define PRINTER_NOTIFY_FIELD_DATATYPE 11
162 #define PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR 12
163 #define PRINTER_NOTIFY_FIELD_ATTRIBUTES 13
164 #define PRINTER_NOTIFY_FIELD_PRIORITY 14
165 #define PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY 15
166 #define PRINTER_NOTIFY_FIELD_START_TIME 16
167 #define PRINTER_NOTIFY_FIELD_UNTIL_TIME 17
168 #define PRINTER_NOTIFY_FIELD_STATUS 18
169 #define PRINTER_NOTIFY_FIELD_STATUS_STRING 19
170 #define PRINTER_NOTIFY_FIELD_CJOBS 20
171 #define PRINTER_NOTIFY_FIELD_AVERAGE_PPM 21
172 #define PRINTER_NOTIFY_FIELD_TOTAL_PAGES 22
173 #define PRINTER_NOTIFY_FIELD_PAGES_PRINTED 23
174 #define PRINTER_NOTIFY_FIELD_TOTAL_BYTES 24
175 #define PRINTER_NOTIFY_FIELD_BYTES_PRINTED 25
176
177 #define PRINTER_CHANGE_ADD_PRINTER 1
178 #define PRINTER_CHANGE_SET_PRINTER 2
179 #define PRINTER_CHANGE_DELETE_PRINTER 4
180 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 8
181 #define PRINTER_CHANGE_PRINTER 0xFF
182 #define PRINTER_CHANGE_ADD_JOB 0x100
183 #define PRINTER_CHANGE_SET_JOB 0x200
184 #define PRINTER_CHANGE_DELETE_JOB 0x400
185 #define PRINTER_CHANGE_WRITE_JOB 0x800
186 #define PRINTER_CHANGE_JOB 0xFF00
187 #define PRINTER_CHANGE_ADD_FORM 0x10000
188 #define PRINTER_CHANGE_SET_FORM 0x20000
189 #define PRINTER_CHANGE_DELETE_FORM 0x40000
190 #define PRINTER_CHANGE_FORM 0x70000
191 #define PRINTER_CHANGE_ADD_PORT 0x100000
192 #define PRINTER_CHANGE_CONFIGURE_PORT 0x200000
193 #define PRINTER_CHANGE_DELETE_PORT 0x400000
194 #define PRINTER_CHANGE_PORT 0x700000
195 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x1000000
196 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x4000000
197 #define PRINTER_CHANGE_PRINT_PROCESSOR 0x7000000
198 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
199 #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
200 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
201 #define PRINTER_CHANGE_PRINTER_DRIVER 0x70000000
202 #define PRINTER_CHANGE_TIMEOUT 0x80000000
203 #define PRINTER_CHANGE_ALL 0x7777FFFF
204
205 #define PRINTER_NOTIFY_INFO_DISCARDED 1
206 #define PRINTER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE)
207 #define PRINTER_READ (STANDARD_RIGHTS_READ|PRINTER_ACCESS_USE)
208 #define PRINTER_WRITE (STANDARD_RIGHTS_WRITE|PRINTER_ACCESS_USE)
209 #define PRINTER_EXECUTE (STANDARD_RIGHTS_EXECUTE|PRINTER_ACCESS_USE)
210
211 #define NO_PRIORITY 0
212 #define MAX_PRIORITY 99
213 #define MIN_PRIORITY 1
214 #define DEF_PRIORITY 1
215
216 #define PORT_TYPE_WRITE 1
217 #define PORT_TYPE_READ 2
218 #define PORT_TYPE_REDIRECTED 4
219 #define PORT_TYPE_NET_ATTACHED 8
220
221 #define SERVER_ACCESS_ADMINISTER 1
222 #define SERVER_ACCESS_ENUMERATE 2
223 #define SERVER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE)
224 #define SERVER_READ (STANDARD_RIGHTS_READ|SERVER_ACCESS_ENUMERATE)
225 #define SERVER_WRITE (STANDARD_RIGHTS_WRITE|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE)
226 #define SERVER_EXECUTE (STANDARD_RIGHTS_EXECUTE|SERVER_ACCESS_ENUMERATE)
227
228 #define PORT_STATUS_TYPE_ERROR 1
229 #define PORT_STATUS_TYPE_WARNING 2
230 #define PORT_STATUS_TYPE_INFO 3
231 #define PORT_STATUS_OFFLINE 1
232 #define PORT_STATUS_PAPER_JAM 2
233 #define PORT_STATUS_PAPER_OUT 3
234 #define PORT_STATUS_OUTPUT_BIN_FULL 4
235 #define PORT_STATUS_PAPER_PROBLEM 5
236 #define PORT_STATUS_NO_TONER 6
237 #define PORT_STATUS_DOOR_OPEN 7
238 #define PORT_STATUS_USER_INTERVENTION 8
239 #define PORT_STATUS_OUT_OF_MEMORY 9
240 #define PORT_STATUS_TONER_LOW 10
241 #define PORT_STATUS_WARMING_UP 11
242 #define PORT_STATUS_POWER_SAVE 12
243
244 typedef struct _PRINTER_NOTIFY_OPTIONS_TYPE {
245 WORD Type;
246 WORD Reserved0;
247 DWORD Reserved1;
248 DWORD Reserved2;
249 DWORD Count;
250 PWORD pFields;
251 } PRINTER_NOTIFY_OPTIONS_TYPE, *PPRINTER_NOTIFY_OPTIONS_TYPE, *LPPRINTER_NOTIFY_OPTIONS_TYPE;
252
253 typedef struct _PRINTER_NOTIFY_OPTIONS {
254 DWORD Version;
255 DWORD Flags;
256 DWORD Count;
257 PPRINTER_NOTIFY_OPTIONS_TYPE pTypes;
258 } PRINTER_NOTIFY_OPTIONS, *PPRINTER_NOTIFY_OPTIONS, *LPPRINTER_NOTIFY_OPTIONS;
259
260 #ifndef RC_INVOKED
261
262 typedef struct _ADDJOB_INFO_1A {
263 LPSTR Path;
264 DWORD JobId;
265 } ADDJOB_INFO_1A, *PADDJOB_INFO_1A, *LPADDJOB_INFO_1A;
266
267 typedef struct _ADDJOB_INFO_1W {
268 LPWSTR Path;
269 DWORD JobId;
270 } ADDJOB_INFO_1W, *PADDJOB_INFO_1W, *LPADDJOB_INFO_1W;
271
272 typedef struct _DATATYPES_INFO_1A {
273 LPSTR pName;
274 } DATATYPES_INFO_1A, *PDATATYPES_INFO_1A, *LPDATATYPES_INFO_1A;
275
276 typedef struct _DATATYPES_INFO_1W {
277 LPWSTR pName;
278 } DATATYPES_INFO_1W, *PDATATYPES_INFO_1W, *LPDATATYPES_INFO_1W;
279
280 typedef struct _JOB_INFO_1A {
281 DWORD JobId;
282 LPSTR pPrinterName;
283 LPSTR pMachineName;
284 LPSTR pUserName;
285 LPSTR pDocument;
286 LPSTR pDatatype;
287 LPSTR pStatus;
288 DWORD Status;
289 DWORD Priority;
290 DWORD Position;
291 DWORD TotalPages;
292 DWORD PagesPrinted;
293 SYSTEMTIME Submitted;
294 } JOB_INFO_1A, *PJOB_INFO_1A, *LPJOB_INFO_1A;
295
296 typedef struct _JOB_INFO_1W {
297 DWORD JobId;
298 LPWSTR pPrinterName;
299 LPWSTR pMachineName;
300 LPWSTR pUserName;
301 LPWSTR pDocument;
302 LPWSTR pDatatype;
303 LPWSTR pStatus;
304 DWORD Status;
305 DWORD Priority;
306 DWORD Position;
307 DWORD TotalPages;
308 DWORD PagesPrinted;
309 SYSTEMTIME Submitted;
310 } JOB_INFO_1W, *PJOB_INFO_1W, *LPJOB_INFO_1W;
311
312 typedef struct _JOB_INFO_2A {
313 DWORD JobId;
314 LPSTR pPrinterName;
315 LPSTR pMachineName;
316 LPSTR pUserName;
317 LPSTR pDocument;
318 LPSTR pNotifyName;
319 LPSTR pDatatype;
320 LPSTR pPrintProcessor;
321 LPSTR pParameters;
322 LPSTR pDriverName;
323 LPDEVMODEA pDevMode;
324 LPSTR pStatus;
325 PSECURITY_DESCRIPTOR pSecurityDescriptor;
326 DWORD Status;
327 DWORD Priority;
328 DWORD Position;
329 DWORD StartTime;
330 DWORD UntilTime;
331 DWORD TotalPages;
332 DWORD Size;
333 SYSTEMTIME Submitted;
334 DWORD Time;
335 DWORD PagesPrinted;
336 } JOB_INFO_2A, *PJOB_INFO_2A, *LPJOB_INFO_2A;
337
338 typedef struct _JOB_INFO_2W {
339 DWORD JobId;
340 LPWSTR pPrinterName;
341 LPWSTR pMachineName;
342 LPWSTR pUserName;
343 LPWSTR pDocument;
344 LPWSTR pNotifyName;
345 LPWSTR pDatatype;
346 LPWSTR pPrintProcessor;
347 LPWSTR pParameters;
348 LPWSTR pDriverName;
349 LPDEVMODEW pDevMode;
350 LPWSTR pStatus;
351 PSECURITY_DESCRIPTOR pSecurityDescriptor;
352 DWORD Status;
353 DWORD Priority;
354 DWORD Position;
355 DWORD StartTime;
356 DWORD UntilTime;
357 DWORD TotalPages;
358 DWORD Size;
359 SYSTEMTIME Submitted;
360 DWORD Time;
361 DWORD PagesPrinted;
362 } JOB_INFO_2W, *PJOB_INFO_2W, *LPJOB_INFO_2W;
363
364 typedef struct _JOB_INFO_3 {
365 DWORD JobId;
366 DWORD NextJobId;
367 DWORD Reserved;
368 } JOB_INFO_3, *PJOB_INFO_3, *LPJOB_INFO_3;
369
370 typedef struct _JOB_INFO_4A {
371 DWORD JobId;
372 LPSTR pPrinterName;
373 LPSTR pMachineName;
374 LPSTR pUserName;
375 LPSTR pDocument;
376 LPSTR pNotifyName;
377 LPSTR pDatatype;
378 LPSTR pPrintProcessor;
379 LPSTR pParameters;
380 LPSTR pDriverName;
381 LPDEVMODEA pDevMode;
382 LPSTR pStatus;
383 PSECURITY_DESCRIPTOR pSecurityDescriptor;
384 DWORD Status;
385 DWORD Priority;
386 DWORD Position;
387 DWORD StartTime;
388 DWORD UntilTime;
389 DWORD TotalPages;
390 DWORD Size;
391 SYSTEMTIME Submitted;
392 DWORD Time;
393 DWORD PagesPrinted;
394 LONG SizeHigh;
395 } JOB_INFO_4A, *PJOB_INFO_4A, *LPJOB_INFO_4A;
396
397 typedef struct _JOB_INFO_4W {
398 DWORD JobId;
399 LPWSTR pPrinterName;
400 LPWSTR pMachineName;
401 LPWSTR pUserName;
402 LPWSTR pDocument;
403 LPWSTR pNotifyName;
404 LPWSTR pDatatype;
405 LPWSTR pPrintProcessor;
406 LPWSTR pParameters;
407 LPWSTR pDriverName;
408 LPDEVMODEW pDevMode;
409 LPWSTR pStatus;
410 PSECURITY_DESCRIPTOR pSecurityDescriptor;
411 DWORD Status;
412 DWORD Priority;
413 DWORD Position;
414 DWORD StartTime;
415 DWORD UntilTime;
416 DWORD TotalPages;
417 DWORD Size;
418 SYSTEMTIME Submitted;
419 DWORD Time;
420 DWORD PagesPrinted;
421 LONG SizeHigh;
422 } JOB_INFO_4W, *PJOB_INFO_4W, *LPJOB_INFO_4W;
423
424 typedef struct _DOC_INFO_1A {
425 LPSTR pDocName;
426 LPSTR pOutputFile;
427 LPSTR pDatatype;
428 } DOC_INFO_1A, *PDOC_INFO_1A, *LPDOC_INFO_1A;
429
430 typedef struct _DOC_INFO_1W {
431 LPWSTR pDocName;
432 LPWSTR pOutputFile;
433 LPWSTR pDatatype;
434 } DOC_INFO_1W, *PDOC_INFO_1W, *LPDOC_INFO_1W;
435
436 typedef struct _DOC_INFO_2A {
437 LPSTR pDocName;
438 LPSTR pOutputFile;
439 LPSTR pDatatype;
440 DWORD dwMode;
441 DWORD JobId;
442 } DOC_INFO_2A, *PDOC_INFO_2A, *LPDOC_INFO_2A;
443
444 typedef struct _DOC_INFO_2W {
445 LPWSTR pDocName;
446 LPWSTR pOutputFile;
447 LPWSTR pDatatype;
448 DWORD dwMode;
449 DWORD JobId;
450 } DOC_INFO_2W, *PDOC_INFO_2W, *LPDOC_INFO_2W;
451
452 typedef struct _DRIVER_INFO_1A {
453 LPSTR pName;
454 } DRIVER_INFO_1A, *PDRIVER_INFO_1A, *LPDRIVER_INFO_1A;
455
456 typedef struct _DRIVER_INFO_1W {
457 LPWSTR pName;
458 } DRIVER_INFO_1W, *PDRIVER_INFO_1W, *LPDRIVER_INFO_1W;
459
460 typedef struct _DRIVER_INFO_2A {
461 DWORD cVersion;
462 LPSTR pName;
463 LPSTR pEnvironment;
464 LPSTR pDriverPath;
465 LPSTR pDataFile;
466 LPSTR pConfigFile;
467 } DRIVER_INFO_2A, *PDRIVER_INFO_2A, *LPDRIVER_INFO_2A;
468
469 typedef struct _DRIVER_INFO_2W {
470 DWORD cVersion;
471 LPWSTR pName;
472 LPWSTR pEnvironment;
473 LPWSTR pDriverPath;
474 LPWSTR pDataFile;
475 LPWSTR pConfigFile;
476 } DRIVER_INFO_2W, *PDRIVER_INFO_2W, *LPDRIVER_INFO_2W;
477
478 typedef struct _DRIVER_INFO_3A {
479 DWORD cVersion;
480 LPSTR pName;
481 LPSTR pEnvironment;
482 LPSTR pDriverPath;
483 LPSTR pDataFile;
484 LPSTR pConfigFile;
485 LPSTR pHelpFile;
486 LPSTR pDependentFiles;
487 LPSTR pMonitorName;
488 LPSTR pDefaultDataType;
489 } DRIVER_INFO_3A, *PDRIVER_INFO_3A, *LPDRIVER_INFO_3A;
490
491 typedef struct _DRIVER_INFO_3W {
492 DWORD cVersion;
493 LPWSTR pName;
494 LPWSTR pEnvironment;
495 LPWSTR pDriverPath;
496 LPWSTR pDataFile;
497 LPWSTR pConfigFile;
498 LPWSTR pHelpFile;
499 LPWSTR pDependentFiles;
500 LPWSTR pMonitorName;
501 LPWSTR pDefaultDataType;
502 } DRIVER_INFO_3W, *PDRIVER_INFO_3W, *LPDRIVER_INFO_3W;
503
504 typedef struct _DRIVER_INFO_4A {
505 DWORD cVersion; // SDK examples:
506 LPSTR pName; // QMS 810
507 LPSTR pEnvironment; // Win32 x86
508 LPSTR pDriverPath; // c:\drivers\pscript.dll
509 LPSTR pDataFile; // c:\drivers\QMS810.PPD
510 LPSTR pConfigFile; // c:\drivers\PSCRPTUI.DLL
511 LPSTR pHelpFile; // c:\drivers\PSCRPTUI.HLP
512 LPSTR pDependentFiles; // PSCRIPT.DLL\0QMS810.PPD\0PSCRIPTUI.DLL\0PSCRIPTUI.HLP\0PSTEST.TXT\0\0
513 LPSTR pMonitorName; // "PJL monitor"
514 LPSTR pDefaultDataType; // "EMF"
515 LPSTR pszzPreviousNames; // "OldName1\0OldName2\0\0
516 } DRIVER_INFO_4A, *PDRIVER_INFO_4A, *LPDRIVER_INFO_4A;
517
518 typedef struct _DRIVER_INFO_4W {
519 DWORD cVersion;
520 LPWSTR pName;
521 LPWSTR pEnvironment;
522 LPWSTR pDriverPath;
523 LPWSTR pDataFile;
524 LPWSTR pConfigFile;
525 LPWSTR pHelpFile;
526 LPWSTR pDependentFiles;
527 LPWSTR pMonitorName;
528 LPWSTR pDefaultDataType;
529 LPWSTR pszzPreviousNames;
530 } DRIVER_INFO_4W, *PDRIVER_INFO_4W, *LPDRIVER_INFO_4W;
531
532 typedef struct _DRIVER_INFO_5A {
533 DWORD cVersion; // SDK examples:
534 LPSTR pName; // QMS 810
535 LPSTR pEnvironment; // Win32 x86
536 LPSTR pDriverPath; // c:\drivers\pscript.dll
537 LPSTR pDataFile; // c:\drivers\QMS810.PPD
538 LPSTR pConfigFile; // c:\drivers\PSCRPTUI.DLL
539 DWORD dwDriverAttributes; // driver attributes (like UMPD/KMPD)
540 DWORD dwConfigVersion; // version number of the config file since reboot
541 DWORD dwDriverVersion; // version number of the driver file since reboot
542 } DRIVER_INFO_5A, *PDRIVER_INFO_5A, *LPDRIVER_INFO_5A;
543
544 typedef struct _DRIVER_INFO_5W {
545 DWORD cVersion;
546 LPWSTR pName;
547 LPWSTR pEnvironment;
548 LPWSTR pDriverPath;
549 LPWSTR pDataFile;
550 LPWSTR pConfigFile;
551 DWORD dwDriverAttributes;
552 DWORD dwConfigVersion;
553 DWORD dwDriverVersion;
554 } DRIVER_INFO_5W, *PDRIVER_INFO_5W, *LPDRIVER_INFO_5W;
555
556 typedef struct _DRIVER_INFO_6A {
557 DWORD cVersion;
558 LPSTR pName;
559 LPSTR pEnvironment;
560 LPSTR pDriverPath;
561 LPSTR pDataFile;
562 LPSTR pConfigFile;
563 LPSTR pHelpFile;
564 LPSTR pDependentFiles;
565 LPSTR pMonitorName;
566 LPSTR pDefaultDataType;
567 LPSTR pszzPreviousNames;
568 FILETIME ftDriverDate;
569 DWORDLONG dwlDriverVersion;
570 LPSTR pszMfgName;
571 LPSTR pszOEMUrl;
572 LPSTR pszHardwareID;
573 LPSTR pszProvider;
574 } DRIVER_INFO_6A, *PDRIVER_INFO_6A, *LPDRIVER_INFO_6A;
575
576 typedef struct _DRIVER_INFO_6W {
577 DWORD cVersion;
578 LPWSTR pName;
579 LPWSTR pEnvironment;
580 LPWSTR pDriverPath;
581 LPWSTR pDataFile;
582 LPWSTR pConfigFile;
583 LPWSTR pHelpFile;
584 LPWSTR pDependentFiles;
585 LPWSTR pMonitorName;
586 LPWSTR pDefaultDataType;
587 LPWSTR pszzPreviousNames;
588 FILETIME ftDriverDate;
589 DWORDLONG dwlDriverVersion;
590 LPWSTR pszMfgName;
591 LPWSTR pszOEMUrl;
592 LPWSTR pszHardwareID;
593 LPWSTR pszProvider;
594 } DRIVER_INFO_6W, *PDRIVER_INFO_6W, *LPDRIVER_INFO_6W;
595
596 #define PRINTER_DRIVER_PACKAGE_AWARE 0x00000001
597
598 typedef struct _DRIVER_INFO_8A {
599 DWORD cVersion;
600 LPSTR pName;
601 LPSTR pEnvironment;
602 LPSTR pDriverPath;
603 LPSTR pDataFile;
604 LPSTR pConfigFile;
605 LPSTR pHelpFile;
606 LPSTR pDependentFiles;
607 LPSTR pMonitorName;
608 LPSTR pDefaultDataType;
609 LPSTR pszzPreviousNames;
610 FILETIME ftDriverDate;
611 DWORDLONG dwlDriverVersion;
612 LPSTR pszMfgName;
613 LPSTR pszOEMUrl;
614 LPSTR pszHardwareID;
615 LPSTR pszProvider;
616 LPSTR pszPrintProcessor;
617 LPSTR pszVendorSetup;
618 LPSTR pszzColorProfiles;
619 LPSTR pszInfPath;
620 DWORD dwPrinterDriverAttributes;
621 LPSTR pszzCoreDriverDependencies;
622 FILETIME ftMinInboxDriverVerDate;
623 DWORDLONG dwlMinInboxDriverVerVersion;
624 } DRIVER_INFO_8A, *PDRIVER_INFO_8A, *LPDRIVER_INFO_8A;
625
626 typedef struct _DRIVER_INFO_8W {
627 DWORD cVersion;
628 LPWSTR pName;
629 LPWSTR pEnvironment;
630 LPWSTR pDriverPath;
631 LPWSTR pDataFile;
632 LPWSTR pConfigFile;
633 LPWSTR pHelpFile;
634 LPWSTR pDependentFiles;
635 LPWSTR pMonitorName;
636 LPWSTR pDefaultDataType;
637 LPWSTR pszzPreviousNames;
638 FILETIME ftDriverDate;
639 DWORDLONG dwlDriverVersion;
640 LPWSTR pszMfgName;
641 LPWSTR pszOEMUrl;
642 LPWSTR pszHardwareID;
643 LPWSTR pszProvider;
644 LPWSTR pszPrintProcessor;
645 LPWSTR pszVendorSetup;
646 LPWSTR pszzColorProfiles;
647 LPWSTR pszInfPath;
648 DWORD dwPrinterDriverAttributes;
649 LPWSTR pszzCoreDriverDependencies;
650 FILETIME ftMinInboxDriverVerDate;
651 DWORDLONG dwlMinInboxDriverVerVersion;
652 } DRIVER_INFO_8W, *PDRIVER_INFO_8W, *LPDRIVER_INFO_8W;
653
654 // FLAGS for dwDriverAttributes
655 #define DRIVER_KERNELMODE 0x00000001
656 #define DRIVER_USERMODE 0x00000002
657
658 // FLAGS for DeletePrinterDriverEx.
659 #define DPD_DELETE_UNUSED_FILES 0x00000001
660 #define DPD_DELETE_SPECIFIC_VERSION 0x00000002
661 #define DPD_DELETE_ALL_FILES 0x00000004
662
663 // FLAGS for AddPrinterDriverEx.
664 #define APD_STRICT_UPGRADE 0x00000001
665 #define APD_STRICT_DOWNGRADE 0x00000002
666 #define APD_COPY_ALL_FILES 0x00000004
667 #define APD_COPY_NEW_FILES 0x00000008
668 #if(_WIN32_WINNT >= 0x0501)
669 #define APD_COPY_FROM_DIRECTORY 0x00000010
670 #endif
671
672 typedef struct _MONITOR_INFO_1A {
673 LPSTR pName;
674 } MONITOR_INFO_1A, *PMONITOR_INFO_1A, *LPMONITOR_INFO_1A;
675
676 typedef struct _MONITOR_INFO_1W {
677 LPWSTR pName;
678 } MONITOR_INFO_1W, *PMONITOR_INFO_1W, *LPMONITOR_INFO_1W;
679
680 typedef struct _PORT_INFO_1A {
681 LPSTR pName;
682 } PORT_INFO_1A, *PPORT_INFO_1A, *LPPORT_INFO_1A;
683
684 typedef struct _PORT_INFO_1W {
685 LPWSTR pName;
686 } PORT_INFO_1W, *PPORT_INFO_1W, *LPPORT_INFO_1W;
687
688 typedef struct _MONITOR_INFO_2A {
689 LPSTR pName;
690 LPSTR pEnvironment;
691 LPSTR pDLLName;
692 } MONITOR_INFO_2A, *PMONITOR_INFO_2A, *LPMONITOR_INFO_2A;
693
694 typedef struct _MONITOR_INFO_2W {
695 LPWSTR pName;
696 LPWSTR pEnvironment;
697 LPWSTR pDLLName;
698 } MONITOR_INFO_2W, *PMONITOR_INFO_2W, *LPMONITOR_INFO_2W;
699
700 typedef struct _PORT_INFO_2A {
701 LPSTR pPortName;
702 LPSTR pMonitorName;
703 LPSTR pDescription;
704 DWORD fPortType;
705 DWORD Reserved;
706 } PORT_INFO_2A, *PPORT_INFO_2A, *LPPORT_INFO_2A;
707
708 typedef struct _PORT_INFO_2W {
709 LPWSTR pPortName;
710 LPWSTR pMonitorName;
711 LPWSTR pDescription;
712 DWORD fPortType;
713 DWORD Reserved;
714 } PORT_INFO_2W, *PPORT_INFO_2W, *LPPORT_INFO_2W;
715
716 typedef struct _PORT_INFO_3A {
717 DWORD dwStatus;
718 LPSTR pszStatus;
719 DWORD dwSeverity;
720 } PORT_INFO_3A, *PPORT_INFO_3A, *LPPORT_INFO_3A;
721
722 typedef struct _PORT_INFO_3W {
723 DWORD dwStatus;
724 LPWSTR pszStatus;
725 DWORD dwSeverity;
726 } PORT_INFO_3W, *PPORT_INFO_3W, *LPPORT_INFO_3W;
727
728 typedef struct _PRINTER_INFO_1A {
729 DWORD Flags;
730 LPSTR pDescription;
731 LPSTR pName;
732 LPSTR pComment;
733 } PRINTER_INFO_1A, *PPRINTER_INFO_1A, *LPPRINTER_INFO_1A;
734
735 typedef struct _PRINTER_INFO_1W {
736 DWORD Flags;
737 LPWSTR pDescription;
738 LPWSTR pName;
739 LPWSTR pComment;
740 } PRINTER_INFO_1W, *PPRINTER_INFO_1W, *LPPRINTER_INFO_1W;
741
742 typedef struct _PRINTER_INFO_2A {
743 LPSTR pServerName;
744 LPSTR pPrinterName;
745 LPSTR pShareName;
746 LPSTR pPortName;
747 LPSTR pDriverName;
748 LPSTR pComment;
749 LPSTR pLocation;
750 LPDEVMODEA pDevMode;
751 LPSTR pSepFile;
752 LPSTR pPrintProcessor;
753 LPSTR pDatatype;
754 LPSTR pParameters;
755 PSECURITY_DESCRIPTOR pSecurityDescriptor;
756 DWORD Attributes;
757 DWORD Priority;
758 DWORD DefaultPriority;
759 DWORD StartTime;
760 DWORD UntilTime;
761 DWORD Status;
762 DWORD cJobs;
763 DWORD AveragePPM;
764 } PRINTER_INFO_2A, *PPRINTER_INFO_2A, *LPPRINTER_INFO_2A;
765
766 typedef struct _PRINTER_INFO_2W {
767 LPWSTR pServerName;
768 LPWSTR pPrinterName;
769 LPWSTR pShareName;
770 LPWSTR pPortName;
771 LPWSTR pDriverName;
772 LPWSTR pComment;
773 LPWSTR pLocation;
774 LPDEVMODEW pDevMode;
775 LPWSTR pSepFile;
776 LPWSTR pPrintProcessor;
777 LPWSTR pDatatype;
778 LPWSTR pParameters;
779 PSECURITY_DESCRIPTOR pSecurityDescriptor;
780 DWORD Attributes;
781 DWORD Priority;
782 DWORD DefaultPriority;
783 DWORD StartTime;
784 DWORD UntilTime;
785 DWORD Status;
786 DWORD cJobs;
787 DWORD AveragePPM;
788 } PRINTER_INFO_2W, *PPRINTER_INFO_2W, *LPPRINTER_INFO_2W;
789
790 typedef struct _PRINTER_INFO_3 {
791 PSECURITY_DESCRIPTOR pSecurityDescriptor;
792 } PRINTER_INFO_3, *PPRINTER_INFO_3, *LPPRINTER_INFO_3;
793
794 typedef struct _PRINTER_INFO_4A {
795 LPSTR pPrinterName;
796 LPSTR pServerName;
797 DWORD Attributes;
798 } PRINTER_INFO_4A, *PPRINTER_INFO_4A, *LPPRINTER_INFO_4A;
799
800 typedef struct _PRINTER_INFO_4W {
801 LPWSTR pPrinterName;
802 LPWSTR pServerName;
803 DWORD Attributes;
804 } PRINTER_INFO_4W, *PPRINTER_INFO_4W, *LPPRINTER_INFO_4W;
805
806 typedef struct _PRINTER_INFO_5A {
807 LPSTR pPrinterName;
808 LPSTR pPortName;
809 DWORD Attributes;
810 DWORD DeviceNotSelectedTimeout;
811 DWORD TransmissionRetryTimeout;
812 } PRINTER_INFO_5A, *PPRINTER_INFO_5A, *LPPRINTER_INFO_5A;
813
814 typedef struct _PRINTER_INFO_5W {
815 LPWSTR pPrinterName;
816 LPWSTR pPortName;
817 DWORD Attributes;
818 DWORD DeviceNotSelectedTimeout;
819 DWORD TransmissionRetryTimeout;
820 } PRINTER_INFO_5W, *PPRINTER_INFO_5W, *LPPRINTER_INFO_5W;
821
822 typedef struct _PRINTER_INFO_6 {
823 DWORD dwStatus;
824 } PRINTER_INFO_6, *PPRINTER_INFO_6, *LPPRINTER_INFO_6;
825
826 typedef struct _PRINTER_INFO_7A {
827 LPSTR pszObjectGUID;
828 DWORD dwAction;
829 } PRINTER_INFO_7A, *PPRINTER_INFO_7A, *LPPRINTER_INFO_7A;
830
831 typedef struct _PRINTER_INFO_7W {
832 LPWSTR pszObjectGUID;
833 DWORD dwAction;
834 } PRINTER_INFO_7W, *PPRINTER_INFO_7W, *LPPRINTER_INFO_7W;
835
836 typedef struct _PRINTER_INFO_8A {
837 LPDEVMODEA pDevMode;
838 } PRINTER_INFO_8A, *PPRINTER_INFO_8A, *LPPRINTER_INFO_8A;
839
840 typedef struct _PRINTER_INFO_8W {
841 LPDEVMODEW pDevMode;
842 } PRINTER_INFO_8W, *PPRINTER_INFO_8W, *LPPRINTER_INFO_8W;
843
844 typedef struct _PRINTER_INFO_9A {
845 LPDEVMODEA pDevMode;
846 } PRINTER_INFO_9A, *PPRINTER_INFO_9A, *LPPRINTER_INFO_9A;
847
848 typedef struct _PRINTER_INFO_9W {
849 LPDEVMODEW pDevMode;
850 } PRINTER_INFO_9W, *PPRINTER_INFO_9W, *LPPRINTER_INFO_9W;
851
852 typedef struct _PRINTPROCESSOR_INFO_1A {
853 LPSTR pName;
854 } PRINTPROCESSOR_INFO_1A, *PPRINTPROCESSOR_INFO_1A, *LPPRINTPROCESSOR_INFO_1A;
855
856 typedef struct _PRINTPROCESSOR_INFO_1W {
857 LPWSTR pName;
858 } PRINTPROCESSOR_INFO_1W, *PPRINTPROCESSOR_INFO_1W, *LPPRINTPROCESSOR_INFO_1W;
859
860 typedef struct _PRINTER_NOTIFY_INFO_DATA {
861 WORD Type;
862 WORD Field;
863 DWORD Reserved;
864 DWORD Id;
865 union {
866 DWORD adwData[2];
867 struct {
868 DWORD cbBuf;
869 PVOID pBuf;
870 } Data;
871 } NotifyData;
872 } PRINTER_NOTIFY_INFO_DATA, *PPRINTER_NOTIFY_INFO_DATA, *LPPRINTER_NOTIFY_INFO_DATA;
873
874 typedef struct _PRINTER_NOTIFY_INFO {
875 DWORD Version;
876 DWORD Flags;
877 DWORD Count;
878 PRINTER_NOTIFY_INFO_DATA aData[1];
879 } PRINTER_NOTIFY_INFO, *PPRINTER_NOTIFY_INFO, *LPPRINTER_NOTIFY_INFO;
880
881 typedef struct _FORM_INFO_1A {
882 DWORD Flags;
883 LPSTR pName;
884 SIZEL Size;
885 RECTL ImageableArea;
886 } FORM_INFO_1A, *PFORM_INFO_1A, *LPFORM_INFO_1A;
887
888 typedef struct _FORM_INFO_1W {
889 DWORD Flags;
890 LPWSTR pName;
891 SIZEL Size;
892 RECTL ImageableArea;
893 } FORM_INFO_1W, *PFORM_INFO_1W, *LPFORM_INFO_1W;
894
895 #if (NTDDI_VERSION >= NTDDI_VISTA)
896
897 typedef struct _FORM_INFO_2A {
898 DWORD Flags;
899 LPCSTR pName;
900 SIZEL Size;
901 RECTL ImageableArea;
902 LPCSTR pKeyword;
903 DWORD StringType;
904 LPCSTR pMuiDll;
905 DWORD dwResourceId;
906 LPCSTR pDisplayName;
907 LANGID wLangId;
908 } FORM_INFO_2A, *PFORM_INFO_2A, *LPFORM_INFO_2A;
909
910 typedef struct _FORM_INFO_2W {
911 DWORD Flags;
912 LPCWSTR pName;
913 SIZEL Size;
914 RECTL ImageableArea;
915 LPCSTR pKeyword;
916 DWORD StringType;
917 LPCWSTR pMuiDll;
918 DWORD dwResourceId;
919 LPCWSTR pDisplayName;
920 LANGID wLangId;
921 } FORM_INFO_2W, *PFORM_INFO_2W, *LPFORM_INFO_2W;
922
923 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
924
925 typedef struct _PRINTER_DEFAULTSA {
926 LPSTR pDatatype;
927 LPDEVMODEA pDevMode;
928 ACCESS_MASK DesiredAccess;
929 } PRINTER_DEFAULTSA, *PPRINTER_DEFAULTSA, *LPPRINTER_DEFAULTSA;
930
931 typedef struct _PRINTER_DEFAULTSW {
932 LPWSTR pDatatype;
933 LPDEVMODEW pDevMode;
934 ACCESS_MASK DesiredAccess;
935 } PRINTER_DEFAULTSW, *PPRINTER_DEFAULTSW, *LPPRINTER_DEFAULTSW;
936
937 typedef struct _PROVIDOR_INFO_1A {
938 LPSTR pName;
939 LPSTR pEnvironment;
940 LPSTR pDLLName;
941 } PROVIDOR_INFO_1A, *PPROVIDOR_INFO_1A, *LPPROVIDOR_INFO_1A;
942
943 typedef struct _PROVIDOR_INFO_1W {
944 LPWSTR pName;
945 LPWSTR pEnvironment;
946 LPWSTR pDLLName;
947 } PROVIDOR_INFO_1W, *LPPROVIDOR_INFO_1W;
948
949 typedef struct _PROVIDOR_INFO_2A {
950 LPSTR pOrder;
951 } PROVIDOR_INFO_2A, *PPROVIDOR_INFO_2A, *LPPROVIDOR_INFO_2A;
952
953 typedef struct _PROVIDOR_INFO_2W {
954 LPWSTR pOrder;
955 } PROVIDOR_INFO_2W, *LPPROVIDOR_INFO_2W;
956
957 typedef struct _BINARY_CONTAINER {
958 DWORD cbBuf;
959 LPBYTE pData;
960 } BINARY_CONTAINER, *PBINARY_CONTAINER;
961
962 typedef struct _BIDI_DATA {
963 DWORD dwBidiType;
964 union {
965 BOOL bData;
966 INT iData;
967 LPWSTR sData;
968 FLOAT fData;
969 BINARY_CONTAINER biData;
970 } u;
971 } BIDI_DATA, *LPBIDI_DATA, *PBIDI_DATA;
972
973 typedef struct _BIDI_REQUEST_DATA {
974 DWORD dwReqNumber;
975 LPWSTR pSchema;
976 BIDI_DATA data;
977 } BIDI_REQUEST_DATA, *LPBIDI_REQUEST_DATA, *PBIDI_REQUEST_DATA;
978
979 typedef struct _BIDI_REQUEST_CONTAINER {
980 DWORD Version;
981 DWORD Flags;
982 DWORD Count;
983 BIDI_REQUEST_DATA aData[1];
984 } BIDI_REQUEST_CONTAINER, *LPBIDI_REQUEST_CONTAINER, *PBIDI_REQUEST_CONTAINER;
985
986 typedef struct _BIDI_RESPONSE_DATA {
987 DWORD dwResult;
988 DWORD dwReqNumber;
989 LPWSTR pSchema;
990 BIDI_DATA data;
991 } BIDI_RESPONSE_DATA, *LPBIDI_RESPONSE_DATA, *PBIDI_RESPONSE_DATA;
992
993 typedef struct _BIDI_RESPONSE_CONTAINER {
994 DWORD Version;
995 DWORD Flags;
996 DWORD Count;
997 BIDI_RESPONSE_DATA aData[1];
998 } BIDI_RESPONSE_CONTAINER, *LPBIDI_RESPONSE_CONTAINER, *PBIDI_RESPONSE_CONTAINER;
999
1000 #ifdef UNICODE
1001
1002 typedef JOB_INFO_1W JOB_INFO_1, *PJOB_INFO_1, *LPJOB_INFO_1;
1003 typedef JOB_INFO_2W JOB_INFO_2, *PJOB_INFO_2, *LPJOB_INFO_2;
1004 typedef JOB_INFO_4W JOB_INFO_4, *PJOB_INFO_4, *LPJOB_INFO_4;
1005 typedef ADDJOB_INFO_1W ADDJOB_INFO_1, *PADDJOB_INFO_1, *LPADDJOB_INFO_1;
1006 typedef DATATYPES_INFO_1W DATATYPES_INFO_1, *PDATATYPES_INFO_1, *LPDATATYPES_INFO_1;
1007 typedef MONITOR_INFO_1W MONITOR_INFO_1, *PMONITOR_INFO_1, *LPMONITOR_INFO_1;
1008 typedef MONITOR_INFO_2W MONITOR_INFO_2, *PMONITOR_INFO_2, *LPMONITOR_INFO_2;
1009 typedef DOC_INFO_1W DOC_INFO_1, *PDOC_INFO_1, *LPDOC_INFO_1;
1010 typedef DOC_INFO_2W DOC_INFO_2, *PDOC_INFO_2, *LPDOC_INFO_2;
1011 typedef PORT_INFO_1W PORT_INFO_1, *PPORT_INFO_1, *LPPORT_INFO_1;
1012 typedef PORT_INFO_2W PORT_INFO_2, *PPORT_INFO_2, *LPPORT_INFO_2;
1013 typedef PORT_INFO_3W PORT_INFO_3, *PPORT_INFO_3, *LPPORT_INFO_3;
1014 typedef DRIVER_INFO_2W DRIVER_INFO_2, *PDRIVER_INFO_2, *LPDRIVER_INFO_2;
1015 typedef DRIVER_INFO_4W DRIVER_INFO_4, *PDRIVER_INFO_4, *LPDRIVER_INFO_4;
1016 typedef DRIVER_INFO_5W DRIVER_INFO_5, *PDRIVER_INFO_5, *LPDRIVER_INFO_5;
1017 typedef DRIVER_INFO_6W DRIVER_INFO_6, *PDRIVER_INFO_6, *LPDRIVER_INFO_6;
1018 typedef DRIVER_INFO_8W DRIVER_INFO_8, *PDRIVER_INFO_8, *LPDRIVER_INFO_8;
1019 typedef PRINTER_INFO_1W PRINTER_INFO_1, *PPRINTER_INFO_1, *LPPRINTER_INFO_1;
1020 typedef PRINTER_INFO_2W PRINTER_INFO_2, *PPRINTER_INFO_2, *LPPRINTER_INFO_2;
1021 typedef PRINTER_INFO_4W PRINTER_INFO_4, *PPRINTER_INFO_4, *LPPRINTER_INFO_4;
1022 typedef PRINTER_INFO_5W PRINTER_INFO_5, *PPRINTER_INFO_5, *LPPRINTER_INFO_5;
1023 typedef PRINTER_INFO_7W PRINTER_INFO_7, *PPRINTER_INFO_7, *LPPRINTER_INFO_7;
1024 typedef PRINTER_INFO_8W PRINTER_INFO_8, *PPRINTER_INFO_8, *LPPRINTER_INFO_8;
1025 typedef PRINTER_INFO_9W PRINTER_INFO_9, *PPRINTER_INFO_9, *LPPRINTER_INFO_9;
1026 typedef PRINTPROCESSOR_INFO_1W PRINTPROCESSOR_INFO_1, *PPRINTPROCESSOR_INFO_1, *LPPRINTPROCESSOR_INFO_1;
1027 typedef FORM_INFO_1W FORM_INFO_1, *PFORM_INFO_1, *LPFORM_INFO_1;
1028 #if (NTDDI_VERSION >= NTDDI_VISTA)
1029 typedef FORM_INFO_2W FORM_INFO_2, *PFORM_INFO_2, *LPFORM_INFO_2;
1030 #endif
1031 typedef PRINTER_DEFAULTSW PRINTER_DEFAULTS, *PPRINTER_DEFAULTS, *LPPRINTER_DEFAULTS;
1032 typedef PROVIDOR_INFO_1W PROVIDOR_INFO_1, *PPROVIDOR_INFO_1, *LPPROVIDOR_INFO_1;
1033 typedef PROVIDOR_INFO_2W PROVIDOR_INFO_2, *PPROVIDOR_INFO_2, *LPPROVIDOR_INFO_2;
1034
1035 #else /* UNICODE */
1036
1037 typedef JOB_INFO_1A JOB_INFO_1, *PJOB_INFO_1, *LPJOB_INFO_1;
1038 typedef JOB_INFO_2A JOB_INFO_2, *PJOB_INFO_2, *LPJOB_INFO_2;
1039 typedef JOB_INFO_4A JOB_INFO_4, *PJOB_INFO_4, *LPJOB_INFO_4;
1040 typedef ADDJOB_INFO_1A ADDJOB_INFO_1, *PADDJOB_INFO_1, *LPADDJOB_INFO_1;
1041 typedef DATATYPES_INFO_1A DATATYPES_INFO_1, *PDATATYPES_INFO_1, *LPDATATYPES_INFO_1;
1042 typedef MONITOR_INFO_1A MONITOR_INFO_1, *PMONITOR_INFO_1, *LPMONITOR_INFO_1;
1043 typedef MONITOR_INFO_2A MONITOR_INFO_2, *PMONITOR_INFO_2, *LPMONITOR_INFO_2;
1044 typedef DOC_INFO_1A DOC_INFO_1, *PDOC_INFO_1, *LPDOC_INFO_1;
1045 typedef DOC_INFO_2A DOC_INFO_2, *PDOC_INFO_2, *LPDOC_INFO_2;
1046 typedef PORT_INFO_1A PORT_INFO_1, *PPORT_INFO_1, *LPPORT_INFO_1;
1047 typedef PORT_INFO_2A PORT_INFO_2, *PPORT_INFO_2, *LPPORT_INFO_2;
1048 typedef PORT_INFO_3A PORT_INFO_3, *PPORT_INFO_3, *LPPORT_INFO_3;
1049 typedef DRIVER_INFO_2A DRIVER_INFO_2, *PDRIVER_INFO_2, *LPDRIVER_INFO_2;
1050 typedef DRIVER_INFO_4A DRIVER_INFO_4, *PDRIVER_INFO_4, *LPDRIVER_INFO_4;
1051 typedef DRIVER_INFO_5A DRIVER_INFO_5, *PDRIVER_INFO_5, *LPDRIVER_INFO_5;
1052 typedef DRIVER_INFO_6A DRIVER_INFO_6, *PDRIVER_INFO_6, *LPDRIVER_INFO_6;
1053 typedef DRIVER_INFO_8A DRIVER_INFO_8, *PDRIVER_INFO_8, *LPDRIVER_INFO_8;
1054 typedef PRINTER_INFO_1A PRINTER_INFO_1, *PPRINTER_INFO_1, *LPPRINTER_INFO_1;
1055 typedef PRINTER_INFO_2A PRINTER_INFO_2, *PPRINTER_INFO_2, *LPPRINTER_INFO_2;
1056 typedef PRINTER_INFO_4A PRINTER_INFO_4, *PPRINTER_INFO_4, *LPPRINTER_INFO_4;
1057 typedef PRINTER_INFO_5A PRINTER_INFO_5, *PPRINTER_INFO_5, *LPPRINTER_INFO_5;
1058 typedef PRINTER_INFO_7A PRINTER_INFO_7, *PPRINTER_INFO_7, *LPPRINTER_INFO_7;
1059 typedef PRINTER_INFO_8A PRINTER_INFO_8, *PPRINTER_INFO_8, *LPPRINTER_INFO_8;
1060 typedef PRINTER_INFO_9A PRINTER_INFO_9, *PPRINTER_INFO_9, *LPPRINTER_INFO_9;
1061 typedef PRINTPROCESSOR_INFO_1A PRINTPROCESSOR_INFO_1, *PPRINTPROCESSOR_INFO_1, *LPPRINTPROCESSOR_INFO_1;
1062 typedef FORM_INFO_1A FORM_INFO_1, *PFORM_INFO_1, *LPFORM_INFO_1;
1063 #if (NTDDI_VERSION >= NTDDI_VISTA)
1064 typedef FORM_INFO_2A FORM_INFO_2, *PFORM_INFO_2, *LPFORM_INFO_2;
1065 #endif
1066 typedef PRINTER_DEFAULTSA PRINTER_DEFAULTS, *PPRINTER_DEFAULTS, *LPPRINTER_DEFAULTS;
1067 typedef PROVIDOR_INFO_1A PROVIDOR_INFO_1, *PPROVIDOR_INFO_1, *LPPROVIDOR_INFO_1;
1068 typedef PROVIDOR_INFO_2A PROVIDOR_INFO_2, *PPROVIDOR_INFO_2, *LPPROVIDOR_INFO_2;
1069
1070 #endif /* UNICODE */
1071
1072 BOOL WINAPI AbortPrinter(_In_ HANDLE);
1073
1074 BOOL
1075 WINAPI
1076 AddFormA(
1077 _In_ HANDLE hPrinter,
1078 _In_range_(1, 2) DWORD Level,
1079 _When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1A)))
1080 #if (NTDDI_VERSION >= NTDDI_VISTA)
1081 _When_(Level == 2, _In_reads_bytes_(sizeof(FORM_INFO_2A)))
1082 #endif
1083 LPBYTE pForm);
1084
1085 BOOL
1086 WINAPI
1087 AddFormW(
1088 _In_ HANDLE hPrinter,
1089 _In_range_(1, 2) DWORD Level,
1090 _When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1W)))
1091 #if (NTDDI_VERSION >= NTDDI_VISTA)
1092 _When_(Level == 2, _In_reads_bytes_(sizeof(FORM_INFO_2W)))
1093 #endif
1094 LPBYTE pForm);
1095
1096 BOOL
1097 WINAPI
1098 AddJobA(
1099 _In_ HANDLE hPrinter,
1100 _In_ DWORD Level,
1101 _Out_writes_bytes_opt_(cbBuf) LPBYTE pData,
1102 _In_ DWORD cbBuf,
1103 _Out_ LPDWORD pcbNeeded);
1104
1105 BOOL
1106 WINAPI
1107 AddJobW(
1108 _In_ HANDLE hPrinter,
1109 _In_ DWORD Level,
1110 _Out_writes_bytes_opt_(cbBuf) LPBYTE pData,
1111 _In_ DWORD cbBuf,
1112 _Out_ LPDWORD pcbNeeded);
1113
1114 BOOL
1115 WINAPI
1116 AddMonitorA(
1117 _In_opt_ LPSTR pName,
1118 _In_ DWORD Level,
1119 _In_reads_bytes_opt_(sizeof(MONITOR_INFO_2)) LPBYTE pMonitors);
1120
1121 BOOL
1122 WINAPI
1123 AddMonitorW(
1124 _In_opt_ LPWSTR pName,
1125 _In_ DWORD Level,
1126 _In_reads_bytes_opt_(sizeof(MONITOR_INFO_2)) LPBYTE pMonitors);
1127
1128 BOOL WINAPI AddPortA(_In_opt_ LPSTR, _In_ HWND, _In_ LPSTR);
1129 BOOL WINAPI AddPortW(_In_opt_ LPWSTR, _In_ HWND, _In_ LPWSTR);
1130
1131 HANDLE
1132 WINAPI
1133 AddPrinterA(
1134 _In_opt_ LPSTR pName,
1135 _In_range_(1, 2) DWORD Level,
1136 _When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
1137 _When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
1138 LPBYTE pPrinter);
1139
1140 HANDLE
1141 WINAPI
1142 AddPrinterW(
1143 _In_opt_ LPWSTR pName,
1144 _In_range_(1, 2) DWORD Level,
1145 _When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
1146 _When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
1147 LPBYTE pPrinter);
1148
1149 BOOL WINAPI AddPrinterConnectionA(_In_ LPSTR);
1150 BOOL WINAPI AddPrinterConnectionW(_In_ LPWSTR);
1151 BOOL WINAPI AddPrinterDriverA(_In_opt_ LPSTR, _In_ DWORD, _In_ PBYTE);
1152 BOOL WINAPI AddPrinterDriverW(_In_opt_ LPWSTR, _In_ DWORD, _In_ PBYTE);
1153
1154 BOOL
1155 WINAPI
1156 AddPrintProcessorA(
1157 _In_opt_ LPSTR pName,
1158 _In_opt_ LPSTR pEnvironment,
1159 _In_ LPSTR pPathName,
1160 _In_ LPSTR pPrintProcessorName);
1161
1162 BOOL
1163 WINAPI
1164 AddPrintProcessorW(
1165 _In_opt_ LPWSTR pName,
1166 _In_opt_ LPWSTR pEnvironment,
1167 _In_ LPWSTR pPathName,
1168 _In_ LPWSTR pPrintProcessorName);
1169
1170 BOOL
1171 WINAPI
1172 AddPrintProvidorA(
1173 _In_opt_ LPSTR pName,
1174 _In_range_(1, 2) DWORD Level,
1175 _When_(Level == 1, _In_reads_bytes_(sizeof(PROVIDOR_INFO_1)))
1176 _When_(Level == 2, _In_reads_bytes_(sizeof(PROVIDOR_INFO_2)))
1177 LPBYTE pProvidorInfo);
1178
1179 BOOL
1180 WINAPI
1181 AddPrintProvidorW(
1182 _In_opt_ LPWSTR pName,
1183 _In_range_(1, 2) DWORD Level,
1184 _When_(Level == 1, _In_reads_bytes_(sizeof(PROVIDOR_INFO_1)))
1185 _When_(Level == 2, _In_reads_bytes_(sizeof(PROVIDOR_INFO_2)))
1186 LPBYTE pProvidorInfo);
1187
1188 LONG
1189 WINAPI
1190 AdvancedDocumentPropertiesA(
1191 _In_ HWND hWnd,
1192 _In_ HANDLE hPrinter,
1193 _In_ LPSTR pDeviceName,
1194 _Inout_opt_ PDEVMODEA pDevModeOutput,
1195 _In_opt_ PDEVMODEA pDevModeInput);
1196
1197 LONG
1198 WINAPI
1199 AdvancedDocumentPropertiesW(
1200 _In_ HWND hWnd,
1201 _In_ HANDLE hPrinter,
1202 _In_ LPWSTR pDeviceName,
1203 _Inout_opt_ PDEVMODEW pDevModeOutput,
1204 _In_opt_ PDEVMODEW pDevModeInput);
1205
1206 BOOL WINAPI ClosePrinter(_In_ HANDLE);
1207 BOOL WINAPI ConfigurePortA(_In_opt_ LPSTR, _In_ HWND, _In_ LPSTR);
1208 BOOL WINAPI ConfigurePortW(_In_opt_ LPWSTR, _In_ HWND, _In_ LPWSTR);
1209 HANDLE WINAPI ConnectToPrinterDlg(_In_ HWND, _In_ DWORD);
1210 BOOL WINAPI DeleteFormA(_In_ HANDLE, _In_ LPSTR);
1211 BOOL WINAPI DeleteFormW(_In_ HANDLE, _In_ LPWSTR);
1212 BOOL WINAPI DeleteMonitorA(_In_opt_ LPSTR, _In_opt_ LPSTR, _In_ LPSTR);
1213 BOOL WINAPI DeleteMonitorW(_In_opt_ LPWSTR, _In_opt_ LPWSTR, _In_ LPWSTR);
1214 BOOL WINAPI DeletePortA(_In_opt_ LPSTR, _In_ HWND, _In_ LPSTR);
1215 BOOL WINAPI DeletePortW(_In_opt_ LPWSTR, _In_ HWND, _In_ LPWSTR);
1216 BOOL WINAPI DeletePrinter(_Inout_ HANDLE);
1217 BOOL WINAPI DeletePrinterConnectionA(_In_ LPSTR);
1218 BOOL WINAPI DeletePrinterConnectionW(_In_ LPWSTR);
1219 DWORD WINAPI DeletePrinterDataA(_In_ HANDLE, _In_ LPSTR);
1220 DWORD WINAPI DeletePrinterDataW(_In_ HANDLE, _In_ LPWSTR);
1221
1222 BOOL
1223 WINAPI
1224 DeletePrinterDriverA(
1225 _In_opt_ LPSTR pName,
1226 _In_opt_ LPSTR pEnvironment,
1227 _In_ LPSTR pDriverName);
1228
1229 BOOL
1230 WINAPI
1231 DeletePrinterDriverW(
1232 _In_opt_ LPWSTR pName,
1233 _In_opt_ LPWSTR pEnvironment,
1234 _In_ LPWSTR pDriverName);
1235
1236 BOOL
1237 WINAPI
1238 DeletePrintProcessorA(
1239 _In_opt_ LPSTR pName,
1240 _In_opt_ LPSTR pEnvironment,
1241 _In_ LPSTR pPrintProcessorName);
1242
1243 BOOL
1244 WINAPI
1245 DeletePrintProcessorW(
1246 _In_opt_ LPWSTR pName,
1247 _In_opt_ LPWSTR pEnvironment,
1248 _In_ LPWSTR pPrintProcessorName);
1249
1250 BOOL
1251 WINAPI
1252 DeletePrintProvidorA(
1253 _In_opt_ LPSTR pName,
1254 _In_opt_ LPSTR pEnvironment,
1255 _In_ LPSTR pPrintProvidorName);
1256
1257 BOOL
1258 WINAPI
1259 DeletePrintProvidorW(
1260 _In_opt_ LPWSTR pName,
1261 _In_opt_ LPWSTR pEnvironment,
1262 _In_ LPWSTR pPrintProvidorName);
1263
1264 LONG
1265 WINAPI
1266 DocumentPropertiesA(
1267 _In_opt_ HWND hWnd,
1268 _In_ HANDLE hPrinter,
1269 _In_ LPSTR pDeviceName,
1270 _Out_opt_ PDEVMODEA pDevModeOutput,
1271 _In_opt_ PDEVMODEA pDevModeInput,
1272 _In_ DWORD fMode);
1273
1274 LONG
1275 WINAPI
1276 DocumentPropertiesW(
1277 _In_opt_ HWND hWnd,
1278 _In_ HANDLE hPrinter,
1279 _In_ LPWSTR pDeviceName,
1280 _Out_opt_ PDEVMODEW pDevModeOutput,
1281 _In_opt_ PDEVMODEW pDevModeInput,
1282 _In_ DWORD fMode);
1283
1284 BOOL WINAPI EndDocPrinter(_In_ HANDLE);
1285 BOOL WINAPI EndPagePrinter(_In_ HANDLE);
1286
1287 BOOL
1288 WINAPI
1289 EnumFormsA(
1290 _In_ HANDLE hPrinter,
1291 _In_ DWORD Level,
1292 _Out_writes_bytes_opt_(cbBuf) LPBYTE pForm,
1293 _In_ DWORD cbBuf,
1294 _Out_ LPDWORD pcbNeeded,
1295 _Out_ LPDWORD pcReturned);
1296
1297 BOOL
1298 WINAPI
1299 EnumFormsW(
1300 _In_ HANDLE hPrinter,
1301 _In_ DWORD Level,
1302 _Out_writes_bytes_opt_(cbBuf) LPBYTE pForm,
1303 _In_ DWORD cbBuf,
1304 _Out_ LPDWORD pcbNeeded,
1305 _Out_ LPDWORD pcReturned);
1306
1307 BOOL
1308 WINAPI
1309 EnumJobsA(
1310 _In_ HANDLE hPrinter,
1311 _In_ DWORD FirstJob,
1312 _In_ DWORD NoJobs,
1313 _In_ DWORD Level,
1314 _Out_writes_bytes_opt_(cbBuf) LPBYTE pJob,
1315 _In_ DWORD cbBuf,
1316 _Out_ LPDWORD pcbNeeded,
1317 _Out_ LPDWORD pcReturned);
1318
1319 BOOL
1320 WINAPI
1321 EnumJobsW(
1322 _In_ HANDLE hPrinter,
1323 _In_ DWORD FirstJob,
1324 _In_ DWORD NoJobs,
1325 _In_ DWORD Level,
1326 _Out_writes_bytes_opt_(cbBuf) LPBYTE pJob,
1327 _In_ DWORD cbBuf,
1328 _Out_ LPDWORD pcbNeeded,
1329 _Out_ LPDWORD pcReturned);
1330
1331 BOOL
1332 WINAPI
1333 EnumMonitorsA(
1334 _In_opt_ LPSTR pName,
1335 _In_ DWORD Level,
1336 _Out_writes_bytes_opt_(cbBuf) LPBYTE pMonitor,
1337 _In_ DWORD cbBuf,
1338 _Out_ LPDWORD pcbNeeded,
1339 _Out_ LPDWORD pcReturned);
1340
1341 BOOL
1342 WINAPI
1343 EnumMonitorsW(
1344 _In_opt_ LPWSTR pName,
1345 _In_ DWORD Level,
1346 _Out_writes_bytes_opt_(cbBuf) LPBYTE pMonitor,
1347 _In_ DWORD cbBuf,
1348 _Out_ LPDWORD pcbNeeded,
1349 _Out_ LPDWORD pcReturned);
1350
1351 BOOL
1352 WINAPI
1353 EnumPortsA(
1354 _In_opt_ LPSTR pName,
1355 _In_ DWORD Level,
1356 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPort,
1357 _In_ DWORD cbBuf,
1358 _Out_ LPDWORD pcbNeeded,
1359 _Out_ LPDWORD pcReturned);
1360
1361 BOOL
1362 WINAPI
1363 EnumPortsW(
1364 _In_opt_ LPWSTR pName,
1365 _In_ DWORD Level,
1366 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPort,
1367 _In_ DWORD cbBuf,
1368 _Out_ LPDWORD pcbNeeded,
1369 _Out_ LPDWORD pcReturned);
1370
1371 DWORD
1372 WINAPI
1373 EnumPrinterDataA(
1374 _In_ HANDLE hPrinter,
1375 _In_ DWORD dwIndex,
1376 _Out_writes_bytes_(cbValueName) LPSTR pValueName,
1377 _In_ DWORD cbValueName,
1378 _Out_ LPDWORD pcbValueName,
1379 _Out_opt_ LPDWORD pType,
1380 _Out_writes_to_opt_(cbData, *pcbData) LPBYTE pData,
1381 _In_ DWORD cbData,
1382 _When_(pData != NULL, _Pre_notnull_) _Out_opt_ LPDWORD pcbData);
1383
1384 DWORD
1385 WINAPI
1386 EnumPrinterDataW(
1387 _In_ HANDLE hPrinter,
1388 _In_ DWORD dwIndex,
1389 _Out_writes_bytes_(cbValueName) LPWSTR pValueName,
1390 _In_ DWORD cbValueName,
1391 _Out_ LPDWORD pcbValueName,
1392 _Out_opt_ LPDWORD pType,
1393 _Out_writes_to_opt_(cbData, *pcbData) LPBYTE pData,
1394 _In_ DWORD cbData,
1395 _When_(pData != NULL, _Pre_notnull_) _Out_opt_ LPDWORD pcbData);
1396
1397 BOOL
1398 WINAPI
1399 EnumPrinterDriversA(
1400 _In_opt_ LPSTR pName,
1401 _In_opt_ LPSTR pEnvironment,
1402 _In_ DWORD Level,
1403 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDriverInfo,
1404 _In_ DWORD cbBuf,
1405 _Out_ LPDWORD pcbNeeded,
1406 _Out_ LPDWORD pcReturned);
1407
1408 BOOL
1409 WINAPI
1410 EnumPrinterDriversW(
1411 _In_opt_ LPWSTR pName,
1412 _In_opt_ LPWSTR pEnvironment,
1413 _In_ DWORD Level,
1414 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDriverInfo,
1415 _In_ DWORD cbBuf,
1416 _Out_ LPDWORD pcbNeeded,
1417 _Out_ LPDWORD pcReturned);
1418
1419 _Success_(return != 0)
1420 BOOL
1421 WINAPI
1422 EnumPrintersA(
1423 _In_ DWORD Flags,
1424 _In_opt_ LPSTR Name,
1425 _In_ DWORD Level,
1426 _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPrinterEnum,
1427 _In_ DWORD cbBuf,
1428 _Out_ LPDWORD pcbNeeded,
1429 _Out_ LPDWORD pcReturned);
1430
1431 _Success_(return != 0)
1432 BOOL
1433 WINAPI
1434 EnumPrintersW(
1435 _In_ DWORD Flags,
1436 _In_opt_ LPWSTR Name,
1437 _In_ DWORD Level,
1438 _Out_writes_bytes_to_opt_(cbBuf, *pcbNeeded) LPBYTE pPrinterEnum,
1439 _In_ DWORD cbBuf,
1440 _Out_ LPDWORD pcbNeeded,
1441 _Out_ LPDWORD pcReturned);
1442
1443 _Success_(return != 0)
1444 BOOL
1445 WINAPI
1446 EnumPrintProcessorDatatypesA(
1447 _In_opt_ LPSTR pName,
1448 _In_ LPSTR pPrintProcessorName,
1449 _In_ DWORD Level,
1450 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDatatypes,
1451 _In_ DWORD cbBuf,
1452 _Out_ LPDWORD pcbNeeded,
1453 _Out_ LPDWORD pcReturned);
1454
1455 _Success_(return != 0)
1456 BOOL
1457 WINAPI
1458 EnumPrintProcessorDatatypesW(
1459 _In_opt_ LPWSTR pName,
1460 _In_ LPWSTR pPrintProcessorName,
1461 _In_ DWORD Level,
1462 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDatatypes,
1463 _In_ DWORD cbBuf,
1464 _Out_ LPDWORD pcbNeeded,
1465 _Out_ LPDWORD pcReturned);
1466
1467 BOOL
1468 WINAPI
1469 EnumPrintProcessorsA(
1470 _In_opt_ LPSTR pName,
1471 _In_opt_ LPSTR pEnvironment,
1472 _In_ DWORD Level,
1473 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPrintProcessorInfo,
1474 _In_ DWORD cbBuf,
1475 _Out_ LPDWORD pcbNeeded,
1476 _Out_ LPDWORD pcReturned);
1477
1478 BOOL
1479 WINAPI
1480 EnumPrintProcessorsW(
1481 _In_opt_ LPWSTR pName,
1482 _In_opt_ LPWSTR pEnvironment,
1483 _In_ DWORD Level,
1484 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPrintProcessorInfo,
1485 _In_ DWORD cbBuf,
1486 _Out_ LPDWORD pcbNeeded,
1487 _Out_ LPDWORD pcReturned);
1488
1489 LONG
1490 WINAPI
1491 ExtDeviceMode(
1492 _In_opt_ HWND hWnd,
1493 _In_opt_ HANDLE hInst,
1494 _Inout_opt_ LPDEVMODEA pDevModeOutput,
1495 _In_opt_ LPSTR pDeviceName,
1496 _In_opt_ LPSTR pPort,
1497 _In_opt_ LPDEVMODEA pDevModeInput,
1498 _In_opt_ LPSTR pProfile,
1499 _In_ DWORD fMode);
1500
1501 BOOL WINAPI FindClosePrinterChangeNotification(_In_ HANDLE);
1502
1503 HANDLE
1504 WINAPI
1505 FindFirstPrinterChangeNotification(
1506 _In_ HANDLE hPrinter,
1507 DWORD fdwFilter,
1508 DWORD fdwOptions,
1509 _In_opt_ PVOID pPrinterNotifyOptions);
1510
1511 BOOL
1512 WINAPI
1513 FindNextPrinterChangeNotification(
1514 _In_ HANDLE hChange,
1515 _Out_opt_ PDWORD pdwChange,
1516 _In_opt_ LPVOID pvReserved,
1517 _Out_opt_ LPVOID *ppPrinterNotifyInfo);
1518
1519 BOOL WINAPI FreePrinterNotifyInfo(_In_ PPRINTER_NOTIFY_INFO);
1520
1521 #if _WIN32_WINNT >= 0x0500
1522
1523 BOOL
1524 WINAPI
1525 GetDefaultPrinterA(
1526 _Out_writes_opt_(*pcchBuffer) LPSTR pszBuffer,
1527 _Inout_ LPDWORD pcchBuffer);
1528
1529 BOOL
1530 WINAPI
1531 GetDefaultPrinterW(
1532 _Out_writes_opt_(*pcchBuffer) LPWSTR pszBuffer,
1533 _Inout_ LPDWORD pcchBuffer);
1534
1535 #endif
1536
1537 BOOL
1538 WINAPI
1539 GetFormA(
1540 _In_ HANDLE hPrinter,
1541 _In_ LPSTR pFormName,
1542 _In_ DWORD Level,
1543 _Out_writes_bytes_opt_(cbBuf) LPBYTE pForm,
1544 _In_ DWORD cbBuf,
1545 _Out_ LPDWORD pcbNeeded);
1546
1547 BOOL
1548 WINAPI
1549 GetFormW(
1550 _In_ HANDLE hPrinter,
1551 _In_ LPWSTR pFormName,
1552 _In_ DWORD Level,
1553 _Out_writes_bytes_opt_(cbBuf) LPBYTE pForm,
1554 _In_ DWORD cbBuf,
1555 _Out_ LPDWORD pcbNeeded);
1556
1557 BOOL
1558 WINAPI
1559 GetJobA(
1560 _In_ HANDLE hPrinter,
1561 _In_ DWORD JobId,
1562 _In_ DWORD Level,
1563 _Out_writes_bytes_opt_(cbBuf) LPBYTE pJob,
1564 _In_ DWORD cbBuf,
1565 _Out_ LPDWORD pcbNeeded);
1566
1567 BOOL
1568 WINAPI
1569 GetJobW(
1570 _In_ HANDLE hPrinter,
1571 _In_ DWORD JobId,
1572 _In_ DWORD Level,
1573 _Out_writes_bytes_opt_(cbBuf) LPBYTE pJob,
1574 _In_ DWORD cbBuf,
1575 _Out_ LPDWORD pcbNeeded);
1576
1577 BOOL
1578 WINAPI
1579 GetPrinterA(
1580 _In_ HANDLE hPrinter,
1581 _In_ DWORD Level,
1582 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPrinter,
1583 _In_ DWORD cbBuf,
1584 _Out_ LPDWORD pcbNeeded);
1585
1586 BOOL
1587 WINAPI
1588 GetPrinterW(
1589 _In_ HANDLE hPrinter,
1590 _In_ DWORD Level,
1591 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPrinter,
1592 _In_ DWORD cbBuf,
1593 _Out_ LPDWORD pcbNeeded);
1594
1595 DWORD
1596 WINAPI
1597 GetPrinterDataA(
1598 _In_ HANDLE hPrinter,
1599 _In_ LPSTR pValueName,
1600 _Out_opt_ LPDWORD pType,
1601 _Out_writes_bytes_opt_(nSize) LPBYTE pData,
1602 _In_ DWORD nSize,
1603 _Out_ LPDWORD pcbNeeded);
1604
1605 DWORD
1606 WINAPI
1607 GetPrinterDataW(
1608 _In_ HANDLE hPrinter,
1609 _In_ LPWSTR pValueName,
1610 _Out_opt_ LPDWORD pType,
1611 _Out_writes_bytes_opt_(nSize) LPBYTE pData,
1612 _In_ DWORD nSize,
1613 _Out_ LPDWORD pcbNeeded);
1614
1615 BOOL
1616 WINAPI
1617 GetPrinterDriverA(
1618 _In_ HANDLE hPrinter,
1619 _In_opt_ LPSTR pEnvironment,
1620 _In_ DWORD Level,
1621 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDriverInfo,
1622 _In_ DWORD cbBuf,
1623 _Out_ LPDWORD pcbNeeded);
1624
1625 BOOL
1626 WINAPI
1627 GetPrinterDriverW(
1628 _In_ HANDLE hPrinter,
1629 _In_opt_ LPWSTR pEnvironment,
1630 _In_ DWORD Level,
1631 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDriverInfo,
1632 _In_ DWORD cbBuf,
1633 _Out_ LPDWORD pcbNeeded);
1634
1635 BOOL
1636 WINAPI
1637 GetPrinterDriverDirectoryA(
1638 _In_opt_ LPSTR pName,
1639 _In_opt_ LPSTR pEnvironment,
1640 _In_ DWORD Level,
1641 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDriverDirectory,
1642 _In_ DWORD cbBuf,
1643 _Out_ LPDWORD pcbNeeded);
1644
1645 BOOL
1646 WINAPI
1647 GetPrinterDriverDirectoryW(
1648 _In_opt_ LPWSTR pName,
1649 _In_opt_ LPWSTR pEnvironment,
1650 _In_ DWORD Level,
1651 _Out_writes_bytes_opt_(cbBuf) LPBYTE pDriverDirectory,
1652 _In_ DWORD cbBuf,
1653 _Out_ LPDWORD pcbNeeded);
1654
1655 BOOL
1656 WINAPI
1657 GetPrintProcessorDirectoryA(
1658 _In_opt_ LPSTR pName,
1659 _In_opt_ LPSTR pEnvironment,
1660 _In_ DWORD Level,
1661 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPrintProcessorInfo,
1662 _In_ DWORD cbBuf,
1663 _Out_ LPDWORD pcbNeeded);
1664
1665 BOOL
1666 WINAPI
1667 GetPrintProcessorDirectoryW(
1668 _In_opt_ LPWSTR pName,
1669 _In_opt_ LPWSTR pEnvironment,
1670 _In_ DWORD Level,
1671 _Out_writes_bytes_opt_(cbBuf) LPBYTE pPrintProcessorInfo,
1672 _In_ DWORD cbBuf,
1673 _Out_ LPDWORD pcbNeeded);
1674
1675 #if NTDDI_VERSION >= NTDDI_WINXPSP2
1676 BOOL WINAPI IsValidDevmodeA(_In_opt_ PDEVMODEA, size_t);
1677 BOOL WINAPI IsValidDevmodeW(_In_opt_ PDEVMODEW, size_t);
1678 #endif
1679
1680 BOOL
1681 WINAPI
1682 OpenPrinterA(
1683 _In_opt_ LPSTR pPrinterName,
1684 _Out_ LPHANDLE phPrinter,
1685 _In_opt_ LPPRINTER_DEFAULTSA pDefault);
1686
1687 BOOL
1688 WINAPI
1689 OpenPrinterW(
1690 _In_opt_ LPWSTR pPrinterName,
1691 _Out_ LPHANDLE phPrinter,
1692 _In_opt_ LPPRINTER_DEFAULTSW pDefault);
1693
1694 DWORD
1695 WINAPI
1696 PrinterMessageBoxA(
1697 _In_ HANDLE hPrinter,
1698 DWORD Error,
1699 _In_ HWND hWnd,
1700 _In_ LPSTR pText,
1701 _In_ LPSTR pCaption,
1702 DWORD dwType);
1703
1704 DWORD
1705 WINAPI
1706 PrinterMessageBoxW(
1707 _In_ HANDLE hPrinter,
1708 DWORD Error,
1709 _In_ HWND hWnd,
1710 _In_ LPWSTR pText,
1711 _In_ LPWSTR pCaption,
1712 DWORD dwType);
1713
1714 BOOL WINAPI PrinterProperties(_In_ HWND, _In_ HANDLE);
1715
1716 BOOL
1717 WINAPI
1718 ReadPrinter(
1719 _In_ HANDLE hPrinter,
1720 _Out_writes_bytes_(cbBuf) LPVOID pBuf,
1721 _In_ DWORD cbBuf,
1722 _Out_ LPDWORD pNoBytesRead);
1723
1724 BOOL WINAPI ResetPrinterA(_In_ HANDLE, _In_opt_ LPPRINTER_DEFAULTSA);
1725 BOOL WINAPI ResetPrinterW(_In_ HANDLE, _In_opt_ LPPRINTER_DEFAULTSW);
1726 BOOL WINAPI ScheduleJob(_In_ HANDLE, _In_ DWORD);
1727
1728 BOOL
1729 WINAPI
1730 SetFormA(
1731 _In_ HANDLE hPrinter,
1732 _In_ LPSTR pFormName,
1733 _In_range_(1, 2) DWORD Level,
1734 _When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1A))) LPBYTE pForm);
1735
1736 BOOL
1737 WINAPI
1738 SetFormW(
1739 _In_ HANDLE hPrinter,
1740 _In_ LPWSTR pFormName,
1741 _In_range_(1, 2) DWORD Level,
1742 _When_(Level == 1, _In_reads_bytes_(sizeof(FORM_INFO_1W))) LPBYTE pForm);
1743
1744 BOOL
1745 WINAPI
1746 SetJobA(
1747 _In_ HANDLE hPrinter,
1748 _In_ DWORD JobId,
1749 _In_range_(0, 4) DWORD Level,
1750 _When_(Level == 0, _Reserved_)
1751 _When_(Level == 1, _In_reads_bytes_opt_(sizeof(JOB_INFO_1)))
1752 _When_(Level == 2, _In_reads_bytes_opt_(sizeof(JOB_INFO_2)))
1753 _When_(Level == 3, _In_reads_bytes_opt_(sizeof(JOB_INFO_3)))
1754 _When_(Level == 4, _In_reads_bytes_opt_(sizeof(JOB_INFO_4)))
1755 LPBYTE pJob,
1756 _In_ DWORD Command);
1757
1758 BOOL
1759 WINAPI
1760 SetJobW(
1761 _In_ HANDLE hPrinter,
1762 _In_ DWORD JobId,
1763 _In_range_(0, 4) DWORD Level,
1764 _When_(Level == 0, _Reserved_)
1765 _When_(Level == 1, _In_reads_bytes_opt_(sizeof(JOB_INFO_1)))
1766 _When_(Level == 2, _In_reads_bytes_opt_(sizeof(JOB_INFO_2)))
1767 _When_(Level == 3, _In_reads_bytes_opt_(sizeof(JOB_INFO_3)))
1768 _When_(Level == 4, _In_reads_bytes_opt_(sizeof(JOB_INFO_4)))
1769 LPBYTE pJob,
1770 _In_ DWORD Command);
1771
1772 BOOL
1773 WINAPI
1774 SetPrinterA(
1775 _In_ HANDLE hPrinter,
1776 _In_range_(0, 9) DWORD Level,
1777 _When_(Level == 0 && Command == PRINTER_CONTROL_SET_STATUS, _In_reads_bytes_(sizeof(DWORD)))
1778 _When_(Level == 0 && Command != PRINTER_CONTROL_SET_STATUS, _In_opt_)
1779 _When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
1780 _When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
1781 _When_(Level == 3, _In_reads_bytes_(sizeof(PRINTER_INFO_3)))
1782 _When_(Level == 4, _In_reads_bytes_(sizeof(PRINTER_INFO_4)))
1783 _When_(Level == 5, _In_reads_bytes_(sizeof(PRINTER_INFO_5)))
1784 _When_(Level == 6, _In_reads_bytes_(sizeof(PRINTER_INFO_6)))
1785 _When_(Level == 7, _In_reads_bytes_(sizeof(PRINTER_INFO_7)))
1786 _When_(Level == 8, _In_reads_bytes_(sizeof(PRINTER_INFO_8)))
1787 _When_(Level == 9, _In_reads_bytes_(sizeof(PRINTER_INFO_9)))
1788 LPBYTE pPrinter,
1789 _In_ DWORD Command);
1790
1791 BOOL
1792 WINAPI
1793 SetPrinterW(
1794 _In_ HANDLE hPrinter,
1795 _In_range_(0, 9) DWORD Level,
1796 _When_(Level == 0 && Command == PRINTER_CONTROL_SET_STATUS, _In_reads_bytes_(sizeof(DWORD)))
1797 _When_(Level == 0 && Command != PRINTER_CONTROL_SET_STATUS, _In_opt_)
1798 _When_(Level == 1, _In_reads_bytes_(sizeof(PRINTER_INFO_1)))
1799 _When_(Level == 2, _In_reads_bytes_(sizeof(PRINTER_INFO_2)))
1800 _When_(Level == 3, _In_reads_bytes_(sizeof(PRINTER_INFO_3)))
1801 _When_(Level == 4, _In_reads_bytes_(sizeof(PRINTER_INFO_4)))
1802 _When_(Level == 5, _In_reads_bytes_(sizeof(PRINTER_INFO_5)))
1803 _When_(Level == 6, _In_reads_bytes_(sizeof(PRINTER_INFO_6)))
1804 _When_(Level == 7, _In_reads_bytes_(sizeof(PRINTER_INFO_7)))
1805 _When_(Level == 8, _In_reads_bytes_(sizeof(PRINTER_INFO_8)))
1806 _When_(Level == 9, _In_reads_bytes_(sizeof(PRINTER_INFO_9)))
1807 LPBYTE pPrinter,
1808 _In_ DWORD Command);
1809
1810 BOOL
1811 WINAPI
1812 SetPrinterDataA(
1813 _In_ HANDLE hPrinter,
1814 _In_ LPSTR pValueName,
1815 _In_ DWORD Type,
1816 _In_reads_bytes_(cbData) LPBYTE pData,
1817 _In_ DWORD cbData);
1818
1819 BOOL
1820 WINAPI
1821 SetPrinterDataW(
1822 _In_ HANDLE hPrinter,
1823 _In_ LPWSTR pValueName,
1824 _In_ DWORD Type,
1825 _In_reads_bytes_(cbData) LPBYTE pData,
1826 _In_ DWORD cbData);
1827
1828 #ifdef _WINE
1829 LPSTR WINAPI StartDocDlgA(HANDLE hPrinter, DOCINFOA *doc);
1830 LPWSTR WINAPI StartDocDlgW(HANDLE hPrinter, DOCINFOW *doc);
1831 #define StartDocDlg WINELIB_NAME_AW(StartDocDlg)
1832 #endif
1833
1834 DWORD
1835 WINAPI
1836 StartDocPrinterA(
1837 _In_ HANDLE hPrinter,
1838 _In_range_(1, 3) DWORD Level,
1839 _When_(Level == 1, _In_reads_bytes_(sizeof(DOC_INFO_1))) LPBYTE pDocInfo);
1840
1841 DWORD
1842 WINAPI
1843 StartDocPrinterW(
1844 _In_ HANDLE hPrinter,
1845 _In_range_(1, 3) DWORD Level,
1846 _When_(Level == 1, _In_reads_bytes_(sizeof(DOC_INFO_1))) LPBYTE pDocInfo);
1847
1848 BOOL WINAPI StartPagePrinter(_In_ HANDLE);
1849 DWORD WINAPI WaitForPrinterChange(_In_ HANDLE, _In_ DWORD);
1850
1851 BOOL
1852 WINAPI
1853 WritePrinter(
1854 _In_ HANDLE hPrinter,
1855 _In_reads_bytes_(cbBuf) LPVOID pBuf,
1856 _In_ DWORD cbBuf,
1857 _Out_ LPDWORD pcWritten);
1858
1859 BOOL
1860 WINAPI
1861 XcvDataW(
1862 _In_ HANDLE hXcv,
1863 _In_ PCWSTR pszDataName,
1864 _In_reads_bytes_opt_(cbInputData) PBYTE pInputData,
1865 DWORD cbInputData,
1866 _Out_writes_bytes_opt_(cbOutputData) PBYTE pOutputData,
1867 DWORD cbOutputData,
1868 _Out_ PDWORD pcbOutputNeeded,
1869 _Out_opt_ PDWORD pdwStatus);
1870
1871 #ifdef UNICODE
1872
1873 #define AddForm AddFormW
1874 #define AddJob AddJobW
1875 #define AddMonitor AddMonitorW
1876 #define AddPort AddPortW
1877 #define AddPrinter AddPrinterW
1878 #define AddPrinterConnection AddPrinterConnectionW
1879 #define AddPrinterDriver AddPrinterDriverW
1880 #define AddPrintProcessor AddPrintProcessorW
1881 #define AddPrintProvidor AddPrintProvidorW
1882 #define AdvancedDocumentProperties AdvancedDocumentPropertiesW
1883 #define ConfigurePort ConfigurePortW
1884 #define DeleteForm DeleteFormW
1885 #define DeleteMonitor DeleteMonitorW
1886 #define DeletePort DeletePortW
1887 #define DeletePrinterConnection DeletePrinterConnectionW
1888 #define DeletePrinterData DeletePrinterDataW
1889 #define DeletePrinterDriver DeletePrinterDriverW
1890 #define DeletePrintProcessor DeletePrinterProcessorW
1891 #define DeletePrintProvidor DeletePrinterProvidorW
1892 #define DocumentProperties DocumentPropertiesW
1893 #define EnumForms EnumFormsW
1894 #define EnumJobs EnumJobsW
1895 #define EnumMonitors EnumMonitorsW
1896 #define EnumPorts EnumPortsW
1897 #define EnumPrinterData EnumPrinterDataW
1898 #define EnumPrinterDrivers EnumPrinterDriversW
1899 #define EnumPrinters EnumPrintersW
1900 #define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesW
1901 #define EnumPrintProcessors EnumPrintProcessorsW
1902 #define GetDefaultPrinter GetDefaultPrinterW
1903 #define GetForm GetFormW
1904 #define GetJob GetJobW
1905 #define GetPrinter GetPrinterW
1906 #define GetPrinterData GetPrinterDataW
1907 #define GetPrinterDriver GetPrinterDriverW
1908 #define GetPrinterDriverDirectory GetPrinterDriverDirectoryW
1909 #define GetPrintProcessorDirectory GetPrintProcessorDirectoryW
1910 #define IsValidDevmode IsValidDevmodeW
1911 #define OpenPrinter OpenPrinterW
1912 #define PrinterMessageBox PrinterMessageBoxW
1913 #define ResetPrinter ResetPrinterW
1914 #define SetForm SetFormW
1915 #define SetJob SetJobW
1916 #define SetPrinter SetPrinterW
1917 #define SetPrinterData SetPrinterDataW
1918 #define StartDocPrinter StartDocPrinterW
1919
1920 #else /* UNICODE */
1921
1922 #define AddForm AddFormA
1923 #define AddJob AddJobA
1924 #define AddMonitor AddMonitorA
1925 #define AddPort AddPortA
1926 #define AddPrinter AddPrinterA
1927 #define AddPrinterConnection AddPrinterConnectionA
1928 #define AddPrinterDriver AddPrinterDriverA
1929 #define AddPrintProcessor AddPrintProcessorA
1930 #define AddPrintProvidor AddPrintProvidorA
1931 #define AdvancedDocumentProperties AdvancedDocumentPropertiesA
1932 #define ConfigurePort ConfigurePortA
1933 #define DeleteForm DeleteFormA
1934 #define DeleteMonitor DeleteMonitorA
1935 #define DeletePort DeletePortA
1936 #define DeletePrinterConnection DeletePrinterConnectionA
1937 #define DeletePrinterData DeletePrinterDataA
1938 #define DeletePrinterDriver DeletePrinterDriverA
1939 #define DeletePrintProcessor DeletePrinterProcessorA
1940 #define DeletePrintProvidor DeletePrinterProvidorA
1941 #define DocumentProperties DocumentPropertiesA
1942 #define EnumForms EnumFormsA
1943 #define EnumJobs EnumJobsA
1944 #define EnumMonitors EnumMonitorsA
1945 #define EnumPorts EnumPortsA
1946 #define EnumPrinterData EnumPrinterDataA
1947 #define EnumPrinterDrivers EnumPrinterDriversA
1948 #define EnumPrinters EnumPrintersA
1949 #define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesA
1950 #define EnumPrintProcessors EnumPrintProcessorsA
1951 #define GetDefaultPrinter GetDefaultPrinterA
1952 #define GetForm GetFormA
1953 #define GetJob GetJobA
1954 #define GetPrinter GetPrinterA
1955 #define GetPrinterData GetPrinterDataA
1956 #define GetPrinterDriver GetPrinterDriverA
1957 #define GetPrinterDriverDirectory GetPrinterDriverDirectoryA
1958 #define GetPrintProcessorDirectory GetPrintProcessorDirectoryA
1959 #define IsValidDevmode IsValidDevmodeA
1960 #define OpenPrinter OpenPrinterA
1961 #define PrinterMessageBox PrinterMessageBoxA
1962 #define ResetPrinter ResetPrinterA
1963 #define SetForm SetFormA
1964 #define SetJob SetJobA
1965 #define SetPrinter SetPrinterA
1966 #define SetPrinterData SetPrinterDataA
1967 #define StartDocPrinter StartDocPrinterA
1968
1969 #endif /* UNICODE */
1970
1971 #endif /* !RC_INVOKED */
1972
1973 #ifdef _MSC_VER
1974 #pragma warning(pop)
1975 #endif
1976
1977 #ifdef __cplusplus
1978 }
1979 #endif
1980
1981 #endif /* _WINSPOOL_ */