1 /***********************************************************************\
2 *                              winspool.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module windows.winspool;
11 pragma(lib, "winspool");
12 nothrow:
13 private import windows.w32api, windows.windef, windows.wingdi;
14 private import windows.winbase; // for SYSTEMTIME
15 
16 // FIXME: clean up Windows version support
17 
18 const DI_CHANNEL=1;
19 const DI_CHANNEL_WRITE=2;
20 const DI_READ_SPOOL_JOB=3;
21 
22 const FORM_BUILTIN=1;
23 
24 const JOB_CONTROL_PAUSE=1;
25 const JOB_CONTROL_RESUME=2;
26 const JOB_CONTROL_CANCEL=3;
27 const JOB_CONTROL_RESTART=4;
28 const JOB_CONTROL_DELETE=5;
29 const JOB_STATUS_PAUSED=1;
30 const JOB_STATUS_ERROR=2;
31 const JOB_STATUS_DELETING=4;
32 const JOB_STATUS_SPOOLING=8;
33 const JOB_STATUS_PRINTING=16;
34 const JOB_STATUS_OFFLINE=32;
35 const JOB_STATUS_PAPEROUT=0x40;
36 const JOB_STATUS_PRINTED=0x80;
37 const JOB_STATUS_DELETED=0x100;
38 const JOB_STATUS_BLOCKED_DEVQ=0x200;
39 const JOB_STATUS_USER_INTERVENTION=0x400;
40 
41 const JOB_POSITION_UNSPECIFIED=0;
42 
43 const JOB_NOTIFY_TYPE=1;
44 
45 const JOB_NOTIFY_FIELD_PRINTER_NAME=0;
46 const JOB_NOTIFY_FIELD_MACHINE_NAME=1;
47 const JOB_NOTIFY_FIELD_PORT_NAME=2;
48 const JOB_NOTIFY_FIELD_USER_NAME=3;
49 const JOB_NOTIFY_FIELD_NOTIFY_NAME=4;
50 const JOB_NOTIFY_FIELD_DATATYPE=5;
51 const JOB_NOTIFY_FIELD_PRINT_PROCESSOR=6;
52 const JOB_NOTIFY_FIELD_PARAMETERS=7;
53 const JOB_NOTIFY_FIELD_DRIVER_NAME=8;
54 const JOB_NOTIFY_FIELD_DEVMODE=9;
55 const JOB_NOTIFY_FIELD_STATUS=10;
56 const JOB_NOTIFY_FIELD_STATUS_STRING=11;
57 const JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR=12;
58 const JOB_NOTIFY_FIELD_DOCUMENT=13;
59 const JOB_NOTIFY_FIELD_PRIORITY=14;
60 const JOB_NOTIFY_FIELD_POSITION=15;
61 const JOB_NOTIFY_FIELD_SUBMITTED=16;
62 const JOB_NOTIFY_FIELD_START_TIME=17;
63 const JOB_NOTIFY_FIELD_UNTIL_TIME=18;
64 const JOB_NOTIFY_FIELD_TIME=19;
65 const JOB_NOTIFY_FIELD_TOTAL_PAGES=20;
66 const JOB_NOTIFY_FIELD_PAGES_PRINTED=21;
67 const JOB_NOTIFY_FIELD_TOTAL_BYTES=22;
68 const JOB_NOTIFY_FIELD_BYTES_PRINTED=23;
69 
70 const JOB_ACCESS_ADMINISTER = 16;
71 const JOB_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | JOB_ACCESS_ADMINISTER;
72 const JOB_READ       = STANDARD_RIGHTS_READ     | JOB_ACCESS_ADMINISTER;
73 const JOB_WRITE      = STANDARD_RIGHTS_WRITE    | JOB_ACCESS_ADMINISTER;
74 const JOB_EXECUTE    = STANDARD_RIGHTS_EXECUTE  | JOB_ACCESS_ADMINISTER;
75 
76 const PRINTER_NOTIFY_OPTIONS_REFRESH=1;
77 const PRINTER_ACCESS_ADMINISTER=4;
78 const PRINTER_ACCESS_USE=8;
79 
80 const PRINTER_ERROR_INFORMATION=0x80000000;
81 const PRINTER_ERROR_WARNING=0x40000000;
82 const PRINTER_ERROR_SEVERE=0x20000000;
83 const PRINTER_ERROR_OUTOFPAPER=1;
84 const PRINTER_ERROR_JAM=2;
85 const PRINTER_ERROR_OUTOFTONER=4;
86 
87 const PRINTER_CONTROL_PAUSE=1;
88 const PRINTER_CONTROL_RESUME=2;
89 const PRINTER_CONTROL_PURGE=3;
90 const PRINTER_CONTROL_SET_STATUS=4;
91 
92 const PRINTER_STATUS_PAUSED = 1;
93 const PRINTER_STATUS_ERROR = 2;
94 const PRINTER_STATUS_PENDING_DELETION = 4;
95 const PRINTER_STATUS_PAPER_JAM = 8;
96 const PRINTER_STATUS_PAPER_OUT = 0x10;
97 const PRINTER_STATUS_MANUAL_FEED = 0x20;
98 const PRINTER_STATUS_PAPER_PROBLEM = 0x40;
99 const PRINTER_STATUS_OFFLINE = 0x80;
100 const PRINTER_STATUS_IO_ACTIVE = 0x100;
101 const PRINTER_STATUS_BUSY = 0x200;
102 const PRINTER_STATUS_PRINTING = 0x400;
103 const PRINTER_STATUS_OUTPUT_BIN_FULL = 0x800;
104 const PRINTER_STATUS_NOT_AVAILABLE = 0x1000;
105 const PRINTER_STATUS_WAITING = 0x2000;
106 const PRINTER_STATUS_PROCESSING = 0x4000;
107 const PRINTER_STATUS_INITIALIZING = 0x8000;
108 const PRINTER_STATUS_WARMING_UP = 0x10000;
109 const PRINTER_STATUS_TONER_LOW = 0x20000;
110 const PRINTER_STATUS_NO_TONER = 0x40000;
111 const PRINTER_STATUS_PAGE_PUNT = 0x80000;
112 const PRINTER_STATUS_USER_INTERVENTION = 0x100000;
113 const PRINTER_STATUS_OUT_OF_MEMORY = 0x200000;
114 const PRINTER_STATUS_DOOR_OPEN = 0x400000;
115 const PRINTER_STATUS_SERVER_UNKNOWN = 0x800000;
116 const PRINTER_STATUS_POWER_SAVE = 0x1000000;
117 
118 const PRINTER_ATTRIBUTE_QUEUED=1;
119 const PRINTER_ATTRIBUTE_DIRECT=2;
120 const PRINTER_ATTRIBUTE_DEFAULT=4;
121 const PRINTER_ATTRIBUTE_SHARED=8;
122 const PRINTER_ATTRIBUTE_NETWORK=0x10;
123 const PRINTER_ATTRIBUTE_HIDDEN=0x20;
124 const PRINTER_ATTRIBUTE_LOCAL=0x40;
125 const PRINTER_ATTRIBUTE_ENABLE_DEVQ=0x80;
126 const PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS=0x100;
127 const PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST=0x200;
128 const PRINTER_ATTRIBUTE_WORK_OFFLINE=0x400;
129 const PRINTER_ATTRIBUTE_ENABLE_BIDI=0x800;
130 const PRINTER_ATTRIBUTE_RAW_ONLY=0x1000;
131 const PRINTER_ATTRIBUTE_PUBLISHED=0x2000;
132 
133 const PRINTER_ENUM_DEFAULT=1;
134 const PRINTER_ENUM_LOCAL=2;
135 const PRINTER_ENUM_CONNECTIONS=4;
136 const PRINTER_ENUM_FAVORITE=4;
137 const PRINTER_ENUM_NAME=8;
138 const PRINTER_ENUM_REMOTE=16;
139 const PRINTER_ENUM_SHARED=32;
140 const PRINTER_ENUM_NETWORK=0x40;
141 const PRINTER_ENUM_EXPAND=0x4000;
142 const PRINTER_ENUM_CONTAINER=0x8000;
143 const PRINTER_ENUM_ICONMASK=0xff0000;
144 const PRINTER_ENUM_ICON1=0x10000;
145 const PRINTER_ENUM_ICON2=0x20000;
146 const PRINTER_ENUM_ICON3=0x40000;
147 const PRINTER_ENUM_ICON4=0x80000;
148 const PRINTER_ENUM_ICON5=0x100000;
149 const PRINTER_ENUM_ICON6=0x200000;
150 const PRINTER_ENUM_ICON7=0x400000;
151 const PRINTER_ENUM_ICON8=0x800000;
152 
153 const PRINTER_NOTIFY_TYPE=0;
154 
155 const PRINTER_NOTIFY_FIELD_SERVER_NAME=0;
156 const PRINTER_NOTIFY_FIELD_PRINTER_NAME=1;
157 const PRINTER_NOTIFY_FIELD_SHARE_NAME=2;
158 const PRINTER_NOTIFY_FIELD_PORT_NAME=3;
159 const PRINTER_NOTIFY_FIELD_DRIVER_NAME=4;
160 const PRINTER_NOTIFY_FIELD_COMMENT=5;
161 const PRINTER_NOTIFY_FIELD_LOCATION=6;
162 const PRINTER_NOTIFY_FIELD_DEVMODE=7;
163 const PRINTER_NOTIFY_FIELD_SEPFILE=8;
164 const PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR=9;
165 const PRINTER_NOTIFY_FIELD_PARAMETERS=10;
166 const PRINTER_NOTIFY_FIELD_DATATYPE=11;
167 const PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR=12;
168 const PRINTER_NOTIFY_FIELD_ATTRIBUTES=13;
169 const PRINTER_NOTIFY_FIELD_PRIORITY=14;
170 const PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY=15;
171 const PRINTER_NOTIFY_FIELD_START_TIME=16;
172 const PRINTER_NOTIFY_FIELD_UNTIL_TIME=17;
173 const PRINTER_NOTIFY_FIELD_STATUS=18;
174 const PRINTER_NOTIFY_FIELD_STATUS_STRING=19;
175 const PRINTER_NOTIFY_FIELD_CJOBS=20;
176 const PRINTER_NOTIFY_FIELD_AVERAGE_PPM=21;
177 const PRINTER_NOTIFY_FIELD_TOTAL_PAGES=22;
178 const PRINTER_NOTIFY_FIELD_PAGES_PRINTED=23;
179 const PRINTER_NOTIFY_FIELD_TOTAL_BYTES=24;
180 const PRINTER_NOTIFY_FIELD_BYTES_PRINTED=25;
181 
182 const PRINTER_CHANGE_ADD_PRINTER=1;
183 const PRINTER_CHANGE_SET_PRINTER=2;
184 const PRINTER_CHANGE_DELETE_PRINTER=4;
185 const PRINTER_CHANGE_FAILED_CONNECTION_PRINTER=8;
186 const PRINTER_CHANGE_PRINTER=0xFF;
187 const PRINTER_CHANGE_ADD_JOB=0x100;
188 const PRINTER_CHANGE_SET_JOB=0x200;
189 const PRINTER_CHANGE_DELETE_JOB=0x400;
190 const PRINTER_CHANGE_WRITE_JOB=0x800;
191 const PRINTER_CHANGE_JOB=0xFF00;
192 const PRINTER_CHANGE_ADD_FORM=0x10000;
193 const PRINTER_CHANGE_SET_FORM=0x20000;
194 const PRINTER_CHANGE_DELETE_FORM=0x40000;
195 const PRINTER_CHANGE_FORM=0x70000;
196 const PRINTER_CHANGE_ADD_PORT=0x100000;
197 const PRINTER_CHANGE_CONFIGURE_PORT=0x200000;
198 const PRINTER_CHANGE_DELETE_PORT=0x400000;
199 const PRINTER_CHANGE_PORT=0x700000;
200 const PRINTER_CHANGE_ADD_PRINT_PROCESSOR=0x1000000;
201 const PRINTER_CHANGE_DELETE_PRINT_PROCESSOR=0x4000000;
202 const PRINTER_CHANGE_PRINT_PROCESSOR=0x7000000;
203 const PRINTER_CHANGE_ADD_PRINTER_DRIVER=0x10000000;
204 const PRINTER_CHANGE_SET_PRINTER_DRIVER=0x20000000;
205 const PRINTER_CHANGE_DELETE_PRINTER_DRIVER=0x40000000;
206 const PRINTER_CHANGE_PRINTER_DRIVER=0x70000000;
207 const PRINTER_CHANGE_TIMEOUT=0x80000000;
208 const PRINTER_CHANGE_ALL=0x7777FFFF;
209 
210 const PRINTER_NOTIFY_INFO_DISCARDED=1;
211 const PRINTER_ALL_ACCESS=(STANDARD_RIGHTS_REQUIRED|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE);
212 const PRINTER_READ=(STANDARD_RIGHTS_READ|PRINTER_ACCESS_USE);
213 const PRINTER_WRITE=(STANDARD_RIGHTS_WRITE|PRINTER_ACCESS_USE);
214 const PRINTER_EXECUTE=(STANDARD_RIGHTS_EXECUTE|PRINTER_ACCESS_USE);
215 const NO_PRIORITY=0;
216 const MAX_PRIORITY=99;
217 const MIN_PRIORITY=1;
218 const DEF_PRIORITY=1;
219 const PORT_TYPE_WRITE=1;
220 const PORT_TYPE_READ=2;
221 const PORT_TYPE_REDIRECTED=4;
222 const PORT_TYPE_NET_ATTACHED=8;
223 const SERVER_ACCESS_ADMINISTER=1;
224 const SERVER_ACCESS_ENUMERATE=2;
225 
226 const SERVER_ALL_ACCESS=(STANDARD_RIGHTS_REQUIRED|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE);
227 const SERVER_READ=(STANDARD_RIGHTS_READ|SERVER_ACCESS_ENUMERATE);
228 const SERVER_WRITE=(STANDARD_RIGHTS_WRITE|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE);
229 const SERVER_EXECUTE=(STANDARD_RIGHTS_EXECUTE|SERVER_ACCESS_ENUMERATE);
230 
231 const PORT_STATUS_TYPE_ERROR=1;
232 const PORT_STATUS_TYPE_WARNING=2;
233 const PORT_STATUS_TYPE_INFO=3;
234 
235 const PORT_STATUS_OFFLINE=1;
236 const PORT_STATUS_PAPER_JAM=2;
237 const PORT_STATUS_PAPER_OUT=3;
238 const PORT_STATUS_OUTPUT_BIN_FULL=4;
239 const PORT_STATUS_PAPER_PROBLEM=5;
240 const PORT_STATUS_NO_TONER=6;
241 const PORT_STATUS_DOOR_OPEN=7;
242 const PORT_STATUS_USER_INTERVENTION=8;
243 const PORT_STATUS_OUT_OF_MEMORY=9;
244 const PORT_STATUS_TONER_LOW=10;
245 const PORT_STATUS_WARMING_UP=11;
246 const PORT_STATUS_POWER_SAVE=12;
247 
248 struct ADDJOB_INFO_1A {
249 	LPSTR Path;
250 	DWORD JobId;
251 }
252 alias ADDJOB_INFO_1A* PADDJOB_INFO_1A, LPADDJOB_INFO_1A;
253 
254 struct ADDJOB_INFO_1W {
255 	LPWSTR Path;
256 	DWORD JobId;
257 }
258 alias ADDJOB_INFO_1W* PADDJOB_INFO_1W, LPADDJOB_INFO_1W;
259 
260 struct DATATYPES_INFO_1A {
261 	LPSTR pName;
262 }
263 alias DATATYPES_INFO_1A* PDATATYPES_INFO_1A, LPDATATYPES_INFO_1A;
264 
265 struct DATATYPES_INFO_1W {
266 	LPWSTR pName;
267 }
268 alias DATATYPES_INFO_1W* PDATATYPES_INFO_1W, LPDATATYPES_INFO_1W;
269 
270 struct JOB_INFO_1A {
271 	DWORD JobId;
272 	LPSTR pPrinterName;
273 	LPSTR pMachineName;
274 	LPSTR pUserName;
275 	LPSTR pDocument;
276 	LPSTR pDatatype;
277 	LPSTR pStatus;
278 	DWORD Status;
279 	DWORD Priority;
280 	DWORD Position;
281 	DWORD TotalPages;
282 	DWORD PagesPrinted;
283 	SYSTEMTIME Submitted;
284 }
285 alias JOB_INFO_1A* PJOB_INFO_1A, LPJOB_INFO_1A;
286 
287 struct JOB_INFO_1W {
288 	DWORD JobId;
289 	LPWSTR pPrinterName;
290 	LPWSTR pMachineName;
291 	LPWSTR pUserName;
292 	LPWSTR pDocument;
293 	LPWSTR pDatatype;
294 	LPWSTR pStatus;
295 	DWORD Status;
296 	DWORD Priority;
297 	DWORD Position;
298 	DWORD TotalPages;
299 	DWORD PagesPrinted;
300 	SYSTEMTIME Submitted;
301 }
302 alias JOB_INFO_1W* PJOB_INFO_1W, LPJOB_INFO_1W;
303 
304 struct JOB_INFO_2A {
305 	DWORD JobId;
306 	LPSTR pPrinterName;
307 	LPSTR pMachineName;
308 	LPSTR pUserName;
309 	LPSTR pDocument;
310 	LPSTR pNotifyName;
311 	LPSTR pDatatype;
312 	LPSTR pPrintProcessor;
313 	LPSTR pParameters;
314 	LPSTR pDriverName;
315 	LPDEVMODEA pDevMode;
316 	LPSTR pStatus;
317 	PSECURITY_DESCRIPTOR pSecurityDescriptor;
318 	DWORD Status;
319 	DWORD Priority;
320 	DWORD Position;
321 	DWORD StartTime;
322 	DWORD UntilTime;
323 	DWORD TotalPages;
324 	DWORD Size;
325 	SYSTEMTIME Submitted;
326 	DWORD Time;
327 	DWORD PagesPrinted;
328 }
329 alias JOB_INFO_2A* PJOB_INFO_2A, LPJOB_INFO_2A;
330 
331 struct JOB_INFO_2W {
332 	DWORD JobId;
333 	LPWSTR pPrinterName;
334 	LPWSTR pMachineName;
335 	LPWSTR pUserName;
336 	LPWSTR pDocument;
337 	LPWSTR pNotifyName;
338 	LPWSTR pDatatype;
339 	LPWSTR pPrintProcessor;
340 	LPWSTR pParameters;
341 	LPWSTR pDriverName;
342 	LPDEVMODEW pDevMode;
343 	LPWSTR pStatus;
344 	PSECURITY_DESCRIPTOR pSecurityDescriptor;
345 	DWORD Status;
346 	DWORD Priority;
347 	DWORD Position;
348 	DWORD StartTime;
349 	DWORD UntilTime;
350 	DWORD TotalPages;
351 	DWORD Size;
352 	SYSTEMTIME Submitted;
353 	DWORD Time;
354 	DWORD PagesPrinted;
355 }
356 alias JOB_INFO_2W* PJOB_INFO_2W, LPJOB_INFO_2W;
357 
358 struct DOC_INFO_1A {
359 	LPSTR pDocName;
360 	LPSTR pOutputFile;
361 	LPSTR pDatatype;
362 }
363 alias DOC_INFO_1A* PDOC_INFO_1A, LPDOC_INFO_1A;
364 
365 struct DOC_INFO_1W {
366 	LPWSTR pDocName;
367 	LPWSTR pOutputFile;
368 	LPWSTR pDatatype;
369 }
370 alias DOC_INFO_1W* PDOC_INFO_1W, LPDOC_INFO_1W;
371 
372 struct DOC_INFO_2A {
373 	LPSTR pDocName;
374 	LPSTR pOutputFile;
375 	LPSTR pDatatype;
376 	DWORD dwMode;
377 	DWORD JobId;
378 }
379 alias DOC_INFO_2A* PDOC_INFO_2A, LPDOC_INFO_2A;
380 
381 struct DOC_INFO_2W {
382 	LPWSTR pDocName;
383 	LPWSTR pOutputFile;
384 	LPWSTR pDatatype;
385 	DWORD  dwMode;
386 	DWORD  JobId;
387 }
388 alias DOC_INFO_2W* PDOC_INFO_2W, LPDOC_INFO_2W;
389 
390 struct DRIVER_INFO_1A {
391 	LPSTR pName;
392 }
393 alias DRIVER_INFO_1A* PDRIVER_INFO_1A, LPDRIVER_INFO_1A;
394 
395 struct DRIVER_INFO_1W {
396 	LPWSTR pName;
397 }
398 alias DRIVER_INFO_1W* PDRIVER_INFO_1W, LPDRIVER_INFO_1W;
399 
400 struct DRIVER_INFO_2A {
401 	DWORD cVersion;
402 	LPSTR pName;
403 	LPSTR pEnvironment;
404 	LPSTR pDriverPath;
405 	LPSTR pDataFile;
406 	LPSTR pConfigFile;
407 }
408 alias DRIVER_INFO_2A* PDRIVER_INFO_2A, LPDRIVER_INFO_2A;
409 
410 struct DRIVER_INFO_2W {
411 	DWORD  cVersion;
412 	LPWSTR pName;
413 	LPWSTR pEnvironment;
414 	LPWSTR pDriverPath;
415 	LPWSTR pDataFile;
416 	LPWSTR pConfigFile;
417 }
418 alias DRIVER_INFO_2W* PDRIVER_INFO_2W, LPDRIVER_INFO_2W;
419 
420 struct DRIVER_INFO_3A {
421 	DWORD cVersion;
422 	LPSTR pName;
423 	LPSTR pEnvironment;
424 	LPSTR pDriverPath;
425 	LPSTR pDataFile;
426 	LPSTR pConfigFile;
427 	LPSTR pHelpFile;
428 	LPSTR pDependentFiles;
429 	LPSTR pMonitorName;
430 	LPSTR pDefaultDataType;
431 }
432 alias DRIVER_INFO_3A* PDRIVER_INFO_3A, LPDRIVER_INFO_3A;
433 
434 struct DRIVER_INFO_3W {
435 	DWORD  cVersion;
436 	LPWSTR pName;
437 	LPWSTR pEnvironment;
438 	LPWSTR pDriverPath;
439 	LPWSTR pDataFile;
440 	LPWSTR pConfigFile;
441 	LPWSTR pHelpFile;
442 	LPWSTR pDependentFiles;
443 	LPWSTR pMonitorName;
444 	LPWSTR pDefaultDataType;
445 }
446 alias DRIVER_INFO_3W* PDRIVER_INFO_3W, LPDRIVER_INFO_3W;
447 
448 struct MONITOR_INFO_1A {
449 	LPSTR pName;
450 }
451 alias MONITOR_INFO_1A* PMONITOR_INFO_1A, LPMONITOR_INFO_1A;
452 
453 struct MONITOR_INFO_1W {
454 	LPWSTR pName;
455 }
456 alias MONITOR_INFO_1W* PMONITOR_INFO_1W, LPMONITOR_INFO_1W;
457 
458 struct PORT_INFO_1A {
459 	LPSTR pName;
460 }
461 alias PORT_INFO_1A* PPORT_INFO_1A, LPPORT_INFO_1A;
462 
463 struct PORT_INFO_1W {
464 	LPWSTR pName;
465 }
466 alias PORT_INFO_1W* PPORT_INFO_1W, LPPORT_INFO_1W;
467 
468 struct MONITOR_INFO_2A {
469 	LPSTR pName;
470 	LPSTR pEnvironment;
471 	LPSTR pDLLName;
472 }
473 alias MONITOR_INFO_2A* PMONITOR_INFO_2A, LPMONITOR_INFO_2A;
474 
475 struct MONITOR_INFO_2W {
476 	LPWSTR pName;
477 	LPWSTR pEnvironment;
478 	LPWSTR pDLLName;
479 }
480 alias MONITOR_INFO_2W* PMONITOR_INFO_2W, LPMONITOR_INFO_2W;
481 
482 struct PORT_INFO_2A {
483 	LPSTR pPortName;
484 	LPSTR pMonitorName;
485 	LPSTR pDescription;
486 	DWORD fPortType;
487 	DWORD Reserved;
488 }
489 alias PORT_INFO_2A* PPORT_INFO_2A, LPPORT_INFO_2A;
490 
491 struct PORT_INFO_2W {
492 	LPWSTR pPortName;
493 	LPWSTR pMonitorName;
494 	LPWSTR pDescription;
495 	DWORD fPortType;
496 	DWORD Reserved;
497 }
498 alias PORT_INFO_2W* PPORT_INFO_2W, LPPORT_INFO_2W;
499 
500 struct PORT_INFO_3A {
501 	DWORD dwStatus;
502 	LPSTR pszStatus;
503 	DWORD dwSeverity;
504 }
505 alias PORT_INFO_3A* PPORT_INFO_3A, LPPORT_INFO_3A;
506 
507 struct PORT_INFO_3W {
508 	DWORD dwStatus;
509 	LPWSTR pszStatus;
510 	DWORD dwSeverity;
511 }
512 alias PORT_INFO_3W* PPORT_INFO_3W, LPPORT_INFO_3W;
513 
514 struct PRINTER_INFO_1A {
515 	DWORD Flags;
516 	LPSTR pDescription;
517 	LPSTR pName;
518 	LPSTR pComment;
519 }
520 alias PRINTER_INFO_1A* PPRINTER_INFO_1A, LPPRINTER_INFO_1A;
521 
522 struct PRINTER_INFO_1W {
523 	DWORD  Flags;
524 	LPWSTR pDescription;
525 	LPWSTR pName;
526 	LPWSTR pComment;
527 }
528 alias PRINTER_INFO_1W* PPRINTER_INFO_1W, LPPRINTER_INFO_1W;
529 
530 struct PRINTER_INFO_2A {
531 	LPSTR pServerName;
532 	LPSTR pPrinterName;
533 	LPSTR pShareName;
534 	LPSTR pPortName;
535 	LPSTR pDriverName;
536 	LPSTR pComment;
537 	LPSTR pLocation;
538 	LPDEVMODEA pDevMode;
539 	LPSTR pSepFile;
540 	LPSTR pPrintProcessor;
541 	LPSTR pDatatype;
542 	LPSTR pParameters;
543 	PSECURITY_DESCRIPTOR pSecurityDescriptor;
544 	DWORD Attributes;
545 	DWORD Priority;
546 	DWORD DefaultPriority;
547 	DWORD StartTime;
548 	DWORD UntilTime;
549 	DWORD Status;
550 	DWORD cJobs;
551 	DWORD AveragePPM;
552 }
553 alias PRINTER_INFO_2A* PPRINTER_INFO_2A, LPPRINTER_INFO_2A;
554 
555 struct PRINTER_INFO_2W {
556 	LPWSTR pServerName;
557 	LPWSTR pPrinterName;
558 	LPWSTR pShareName;
559 	LPWSTR pPortName;
560 	LPWSTR pDriverName;
561 	LPWSTR pComment;
562 	LPWSTR pLocation;
563 	LPDEVMODEW pDevMode;
564 	LPWSTR pSepFile;
565 	LPWSTR pPrintProcessor;
566 	LPWSTR pDatatype;
567 	LPWSTR pParameters;
568 	PSECURITY_DESCRIPTOR pSecurityDescriptor;
569 	DWORD Attributes;
570 	DWORD Priority;
571 	DWORD DefaultPriority;
572 	DWORD StartTime;
573 	DWORD UntilTime;
574 	DWORD Status;
575 	DWORD cJobs;
576 	DWORD AveragePPM;
577 }
578 alias PRINTER_INFO_2W* PPRINTER_INFO_2W, LPPRINTER_INFO_2W;
579 
580 struct PRINTER_INFO_3 {
581 	PSECURITY_DESCRIPTOR pSecurityDescriptor;
582 }
583 alias PRINTER_INFO_3* PPRINTER_INFO_3, LPPRINTER_INFO_3;
584 
585 struct PRINTER_INFO_4A {
586 	LPSTR pPrinterName;
587 	LPSTR pServerName;
588 	DWORD Attributes;
589 }
590 alias PRINTER_INFO_4A* PPRINTER_INFO_4A, LPPRINTER_INFO_4A;
591 
592 struct PRINTER_INFO_4W {
593 	LPWSTR pPrinterName;
594 	LPWSTR pServerName;
595 	DWORD Attributes;
596 }
597 alias PRINTER_INFO_4W* PPRINTER_INFO_4W, LPPRINTER_INFO_4W;
598 
599 struct PRINTER_INFO_5A {
600 	LPSTR pPrinterName;
601 	LPSTR pPortName;
602 	DWORD Attributes;
603 	DWORD DeviceNotSelectedTimeout;
604 	DWORD TransmissionRetryTimeout;
605 }
606 alias PRINTER_INFO_5A* PPRINTER_INFO_5A, LPPRINTER_INFO_5A;
607 
608 struct PRINTER_INFO_5W {
609 	LPWSTR pPrinterName;
610 	LPWSTR pPortName;
611 	DWORD Attributes;
612 	DWORD DeviceNotSelectedTimeout;
613 	DWORD TransmissionRetryTimeout;
614 }
615 alias PRINTER_INFO_5W* PPRINTER_INFO_5W, LPPRINTER_INFO_5W;
616 
617 struct PRINTER_INFO_6 {
618 	DWORD dwStatus;
619 }
620 alias PRINTER_INFO_6* PPRINTER_INFO_6, LPPRINTER_INFO_6;
621 
622 struct PRINTPROCESSOR_INFO_1A {
623 	LPSTR pName;
624 }
625 alias PRINTPROCESSOR_INFO_1A* PPRINTPROCESSOR_INFO_1A, LPPRINTPROCESSOR_INFO_1A;
626 
627 struct PRINTPROCESSOR_INFO_1W {
628 	LPWSTR pName;
629 }
630 alias PRINTPROCESSOR_INFO_1W* PPRINTPROCESSOR_INFO_1W, LPPRINTPROCESSOR_INFO_1W;
631 
632 struct PRINTER_NOTIFY_INFO_DATA {
633 	WORD  Type;
634 	WORD  Field;
635 	DWORD Reserved;
636 	DWORD Id;
637 	union _NotifyData {
638 		DWORD[2] adwData;
639 		struct Data {
640 			DWORD cbBuf;
641 			PVOID pBuf;
642 		}
643 	}
644 	_NotifyData NotifyData;	
645 }
646 alias PRINTER_NOTIFY_INFO_DATA* PPRINTER_NOTIFY_INFO_DATA, LPPRINTER_NOTIFY_INFO_DATA;
647 
648 struct PRINTER_NOTIFY_INFO {
649 	DWORD Version;
650 	DWORD Flags;
651 	DWORD Count;
652 	PRINTER_NOTIFY_INFO_DATA[1] aData;
653 }
654 alias PRINTER_NOTIFY_INFO* PPRINTER_NOTIFY_INFO, LPPRINTER_NOTIFY_INFO;
655 
656 struct FORM_INFO_1A {
657 	DWORD Flags;
658 	LPSTR pName;
659 	SIZEL Size;
660 	RECTL ImageableArea;
661 }
662 alias FORM_INFO_1A* PFORM_INFO_1A, LPFORM_INFO_1A;
663 
664 struct FORM_INFO_1W {
665 	DWORD  Flags;
666 	LPWSTR pName;
667 	SIZEL  Size;
668 	RECTL  ImageableArea;
669 }
670 alias FORM_INFO_1W* PFORM_INFO_1W, LPFORM_INFO_1W;
671 
672 struct PRINTER_DEFAULTSA {
673 	LPSTR       pDatatype;
674 	LPDEVMODE   pDevMode;
675 	ACCESS_MASK DesiredAccess;
676 }
677 alias PRINTER_DEFAULTSA* PPRINTER_DEFAULTSA, LPPRINTER_DEFAULTSA;
678 
679 struct PRINTER_DEFAULTSW {
680 	LPWSTR pDatatype;
681 	LPDEVMODE pDevMode;
682 	ACCESS_MASK DesiredAccess;
683 }
684 alias PRINTER_DEFAULTSW* PPRINTER_DEFAULTSW, LPPRINTER_DEFAULTSW;
685 
686 extern (Windows):
687 BOOL AbortPrinter(HANDLE);
688 BOOL AddFormA(HANDLE, DWORD, PBYTE);
689 BOOL AddFormW(HANDLE, DWORD, PBYTE);
690 BOOL AddJobA(HANDLE, DWORD, PBYTE, DWORD, PDWORD);
691 BOOL AddJobW(HANDLE, DWORD, PBYTE, DWORD, PDWORD);
692 BOOL AddMonitorA(LPSTR, DWORD, PBYTE);
693 BOOL AddMonitorW(LPWSTR, DWORD, PBYTE);
694 BOOL AddPortA(LPSTR, HWND, LPSTR);
695 BOOL AddPortW(LPWSTR, HWND, LPWSTR);
696 HANDLE AddPrinterA(LPSTR, DWORD, PBYTE);
697 HANDLE AddPrinterW(LPWSTR, DWORD, PBYTE);
698 BOOL AddPrinterConnectionA(LPSTR);
699 BOOL AddPrinterConnectionW(LPWSTR);
700 BOOL AddPrinterDriverA(LPSTR, DWORD, PBYTE);
701 BOOL AddPrinterDriverW(LPWSTR, DWORD, PBYTE);
702 BOOL AddPrintProcessorA(LPSTR, LPSTR, LPSTR, LPSTR);
703 BOOL AddPrintProcessorW(LPWSTR, LPWSTR, LPWSTR, LPWSTR);
704 BOOL AddPrintProvidorA(LPSTR, DWORD, PBYTE);
705 BOOL AddPrintProvidorW(LPWSTR, DWORD, PBYTE);
706 LONG AdvancedDocumentPropertiesA(HWND, HANDLE, LPSTR, PDEVMODE, PDEVMODEA);
707 LONG AdvancedDocumentPropertiesW(HWND, HANDLE, LPWSTR, PDEVMODE, PDEVMODEW);
708 BOOL ClosePrinter(HANDLE);
709 BOOL ConfigurePortA(LPSTR, HWND, LPSTR);
710 BOOL ConfigurePortW(LPWSTR, HWND, LPWSTR);
711 HANDLE ConnectToPrinterDlg(HWND, DWORD);
712 BOOL DeleteFormA(HANDLE, LPSTR);
713 BOOL DeleteFormW(HANDLE, LPWSTR);
714 BOOL DeleteMonitorA(LPSTR, LPSTR, LPSTR);
715 BOOL DeleteMonitorW(LPWSTR, LPWSTR, LPWSTR);
716 BOOL DeletePortA(LPSTR, HWND, LPSTR);
717 BOOL DeletePortW(LPWSTR, HWND, LPWSTR);
718 BOOL DeletePrinter(HANDLE);
719 BOOL DeletePrinterConnectionA(LPSTR);
720 BOOL DeletePrinterConnectionW(LPWSTR);
721 DWORD DeletePrinterDataA(HANDLE, LPSTR);
722 DWORD DeletePrinterDataW(HANDLE, LPWSTR);
723 BOOL DeletePrinterDriverA(LPSTR, LPSTR, LPSTR);
724 BOOL DeletePrinterDriverW(LPWSTR, LPWSTR, LPWSTR);
725 BOOL DeletePrintProcessorA(LPSTR, LPSTR, LPSTR);
726 BOOL DeletePrintProcessorW(LPWSTR, LPWSTR, LPWSTR);
727 BOOL DeletePrintProvidorA(LPSTR, LPSTR, LPSTR);
728 BOOL DeletePrintProvidorW(LPWSTR, LPWSTR, LPWSTR);
729 LONG DocumentPropertiesA(HWND, HANDLE, LPSTR, PDEVMODEA, PDEVMODEA, DWORD);
730 LONG DocumentPropertiesW(HWND, HANDLE, LPWSTR, PDEVMODEW, PDEVMODEW, DWORD);
731 BOOL EndDocPrinter(HANDLE);
732 BOOL EndPagePrinter(HANDLE);
733 BOOL EnumFormsA(HANDLE, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
734 BOOL EnumFormsW(HANDLE, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
735 BOOL EnumJobsA(HANDLE, DWORD, DWORD, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
736 BOOL EnumJobsW(HANDLE, DWORD, DWORD, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
737 BOOL EnumMonitorsA(LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
738 BOOL EnumMonitorsW(LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
739 BOOL EnumPortsA(LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
740 BOOL EnumPortsW(LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
741 DWORD EnumPrinterDataA(HANDLE, DWORD, LPSTR, DWORD, PDWORD, PDWORD, PBYTE, DWORD, PDWORD);
742 DWORD EnumPrinterDataW(HANDLE, DWORD, LPWSTR, DWORD, PDWORD, PDWORD, PBYTE, DWORD, PDWORD);
743 BOOL EnumPrinterDriversA(LPSTR, LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
744 BOOL EnumPrinterDriversW(LPWSTR, LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
745 BOOL EnumPrintersA(DWORD, LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
746 BOOL EnumPrintersW(DWORD, LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
747 BOOL EnumPrintProcessorDatatypesA(LPSTR, LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
748 BOOL EnumPrintProcessorDatatypesW(LPWSTR, LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
749 BOOL EnumPrintProcessorsA(LPSTR, LPSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
750 BOOL EnumPrintProcessorsW(LPWSTR, LPWSTR, DWORD, PBYTE, DWORD, PDWORD, PDWORD);
751 BOOL FindClosePrinterChangeNotification(HANDLE);
752 HANDLE FindFirstPrinterChangeNotification(HANDLE, DWORD, DWORD, PVOID);
753 HANDLE FindNextPrinterChangeNotification(HANDLE, PDWORD, PVOID, PVOID*);
754 BOOL FreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO);
755 
756 static if (_WIN32_WINNT >= 0x500) {
757 BOOL GetDefaultPrinterA(LPSTR, LPDWORD);
758 BOOL GetDefaultPrinterW(LPWSTR, LPDWORD);
759 }
760 
761 BOOL GetFormA(HANDLE, LPSTR, DWORD, PBYTE, DWORD, PDWORD);
762 BOOL GetFormW(HANDLE, LPWSTR, DWORD, PBYTE, DWORD, PDWORD);
763 BOOL GetJobA(HANDLE, DWORD, DWORD, PBYTE, DWORD, PDWORD);
764 BOOL GetJobW(HANDLE, DWORD, DWORD, PBYTE, DWORD, PDWORD);
765 BOOL GetPrinterA(HANDLE, DWORD, PBYTE, DWORD, PDWORD);
766 BOOL GetPrinterW(HANDLE, DWORD, PBYTE, DWORD, PDWORD);
767 DWORD GetPrinterDataA(HANDLE, LPSTR, PDWORD, PBYTE, DWORD, PDWORD);
768 DWORD GetPrinterDataW(HANDLE, LPWSTR, PDWORD, PBYTE, DWORD, PDWORD);
769 DWORD GetPrinterDriverA(HANDLE, LPSTR, DWORD, PBYTE, DWORD, PDWORD);
770 DWORD GetPrinterDriverW(HANDLE, LPWSTR, DWORD, PBYTE, DWORD, PDWORD);
771 DWORD GetPrinterDriverDirectoryA(LPSTR, LPSTR, DWORD, PBYTE, DWORD, PDWORD);
772 DWORD GetPrinterDriverDirectoryW(LPWSTR, LPWSTR, DWORD, PBYTE, DWORD, PDWORD);
773 DWORD GetPrintProcessorDirectoryA(LPSTR, LPSTR, DWORD, PBYTE, DWORD, PDWORD);
774 DWORD GetPrintProcessorDirectoryW(LPWSTR, LPWSTR, DWORD, PBYTE, DWORD, PDWORD);
775 BOOL OpenPrinterA(LPSTR, PHANDLE, LPPRINTER_DEFAULTSA);
776 BOOL OpenPrinterW(LPWSTR, PHANDLE, LPPRINTER_DEFAULTSW);
777 DWORD PrinterMessageBoxA(HANDLE, DWORD, HWND, LPSTR, LPSTR, DWORD);
778 DWORD PrinterMessageBoxW(HANDLE, DWORD, HWND, LPWSTR, LPWSTR, DWORD);
779 BOOL PrinterProperties(HWND, HANDLE);
780 BOOL ReadPrinter(HANDLE, PVOID, DWORD, PDWORD);
781 BOOL ResetPrinterA(HANDLE, LPPRINTER_DEFAULTSA);
782 BOOL ResetPrinterW(HANDLE, LPPRINTER_DEFAULTSW);
783 BOOL ScheduleJob(HANDLE, DWORD);
784 BOOL SetFormA(HANDLE, LPSTR, DWORD, PBYTE);
785 BOOL SetFormW(HANDLE, LPWSTR, DWORD, PBYTE);
786 BOOL SetJobA(HANDLE, DWORD, DWORD, PBYTE, DWORD);
787 BOOL SetJobW(HANDLE, DWORD, DWORD, PBYTE, DWORD);
788 BOOL SetPrinterA(HANDLE, DWORD, PBYTE, DWORD);
789 BOOL SetPrinterW(HANDLE, DWORD, PBYTE, DWORD);
790 BOOL SetPrinterDataA(HANDLE, LPSTR, DWORD, PBYTE, DWORD);
791 BOOL SetPrinterDataW(HANDLE, LPWSTR, DWORD, PBYTE, DWORD);
792 DWORD StartDocPrinterA(HANDLE, DWORD, PBYTE);
793 DWORD StartDocPrinterW(HANDLE, DWORD, PBYTE);
794 BOOL StartPagePrinter(HANDLE);
795 DWORD WaitForPrinterChange(HANDLE, DWORD);
796 BOOL WritePrinter(HANDLE, PVOID, DWORD, PDWORD);
797 
798 version(Unicode) {
799 
800 alias JOB_INFO_1W JOB_INFO_1;
801 alias JOB_INFO_2W JOB_INFO_2;
802 alias ADDJOB_INFO_1W ADDJOB_INFO_1;
803 alias DATATYPES_INFO_1W DATATYPES_INFO_1;
804 alias MONITOR_INFO_1W MONITOR_INFO_1;
805 alias MONITOR_INFO_2W MONITOR_INFO_2;
806 alias DOC_INFO_1W DOC_INFO_1;
807 alias DOC_INFO_2W DOC_INFO_2;
808 alias PORT_INFO_1W PORT_INFO_1;
809 alias PORT_INFO_2W PORT_INFO_2;
810 alias PORT_INFO_3W PORT_INFO_3;
811 alias DRIVER_INFO_2W DRIVER_INFO_2;
812 alias PRINTER_INFO_1W PRINTER_INFO_1;
813 alias PRINTER_INFO_2W PRINTER_INFO_2;
814 alias PRINTER_INFO_4W PRINTER_INFO_4;
815 alias PRINTER_INFO_5W PRINTER_INFO_5;
816 alias PRINTPROCESSOR_INFO_1W PRINTPROCESSOR_INFO_1;
817 alias FORM_INFO_1W FORM_INFO_1;
818 alias PRINTER_DEFAULTSW PRINTER_DEFAULTS;
819 
820 alias AddFormW AddForm;
821 alias AddJobW AddJob;
822 alias AddMonitorW AddMonitor;
823 alias AddPortW AddPort;
824 alias AddPrinterW AddPrinter;
825 alias AddPrinterConnectionW AddPrinterConnection;
826 alias AddPrinterDriverW AddPrinterDriver;
827 alias AddPrintProcessorW AddPrintProcessor;
828 alias AddPrintProvidorW AddPrintProvidor;
829 alias AdvancedDocumentPropertiesW AdvancedDocumentProperties;
830 alias ConfigurePortW ConfigurePort;
831 alias DeleteFormW DeleteForm;
832 alias DeleteMonitorW DeleteMonitor;
833 alias DeletePortW DeletePort;
834 alias DeletePrinterConnectionW DeletePrinterConnection;
835 alias DeletePrinterDataW DeletePrinterData;
836 alias DeletePrinterDriverW DeletePrinterDriver;
837 alias DeletePrintProcessorW DeletePrintProcessor;
838 alias DeletePrintProvidorW DeletePrintProvidor;
839 alias DocumentPropertiesW DocumentProperties;
840 alias EnumFormsW EnumForms;
841 alias EnumJobsW EnumJobs;
842 alias EnumMonitorsW EnumMonitors;
843 alias EnumPortsW EnumPorts;
844 alias EnumPrinterDataW EnumPrinterData;
845 alias EnumPrinterDriversW EnumPrinterDrivers;
846 alias EnumPrintersW EnumPrinters;
847 alias EnumPrintProcessorDatatypesW EnumPrintProcessorDatatypes;
848 alias EnumPrintProcessorsW EnumPrintProcessors;
849 
850 static if (_WIN32_WINNT >= 0x500) {
851 alias GetDefaultPrinterW GetDefaultPrinter;
852 }
853 
854 alias GetFormW GetForm;
855 alias GetJobW GetJob;
856 alias GetPrinterW GetPrinter;
857 alias GetPrinterDataW GetPrinterData;
858 alias GetPrinterDriverW GetPrinterDriver;
859 alias GetPrinterDriverDirectoryW GetPrinterDriverDirectory;
860 alias GetPrintProcessorDirectoryW GetPrintProcessorDirectory;
861 alias OpenPrinterW OpenPrinter;
862 alias PrinterMessageBoxW PrinterMessageBox;
863 alias ResetPrinterW ResetPrinter;
864 alias SetFormW SetForm;
865 alias SetJobW SetJob;
866 alias SetPrinterW SetPrinter;
867 alias SetPrinterDataW SetPrinterData;
868 alias StartDocPrinterW StartDocPrinter;
869 
870 } else {
871 
872 alias JOB_INFO_1A JOB_INFO_1;
873 alias JOB_INFO_2A JOB_INFO_2;
874 alias ADDJOB_INFO_1A ADDJOB_INFO_1;
875 alias DATATYPES_INFO_1A DATATYPES_INFO_1;
876 alias MONITOR_INFO_1A MONITOR_INFO_1;
877 alias MONITOR_INFO_2A MONITOR_INFO_2;
878 alias DOC_INFO_1A DOC_INFO_1;
879 alias DOC_INFO_2A DOC_INFO_2;
880 alias PORT_INFO_1A PORT_INFO_1;
881 alias PORT_INFO_2A PORT_INFO_2;
882 alias PORT_INFO_3A PORT_INFO_3;
883 alias DRIVER_INFO_2A DRIVER_INFO_2;
884 alias PRINTER_INFO_1A PRINTER_INFO_1;
885 alias PRINTER_INFO_2A PRINTER_INFO_2;
886 alias PRINTER_INFO_4A PRINTER_INFO_4;
887 alias PRINTER_INFO_5A PRINTER_INFO_5;
888 alias PRINTPROCESSOR_INFO_1A PRINTPROCESSOR_INFO_1;
889 alias FORM_INFO_1A FORM_INFO_1;
890 alias PRINTER_DEFAULTSA PRINTER_DEFAULTS;
891 
892 alias AddFormA AddForm;
893 alias AddJobA AddJob;
894 alias AddMonitorA AddMonitor;
895 alias AddPortA AddPort;
896 alias AddPrinterA AddPrinter;
897 alias AddPrinterConnectionA AddPrinterConnection;
898 alias AddPrinterDriverA AddPrinterDriver;
899 alias AddPrintProcessorA AddPrintProcessor;
900 alias AddPrintProvidorA AddPrintProvidor;
901 alias AdvancedDocumentPropertiesA AdvancedDocumentProperties;
902 alias ConfigurePortA ConfigurePort;
903 alias DeleteFormA DeleteForm;
904 alias DeleteMonitorA DeleteMonitor;
905 alias DeletePortA DeletePort;
906 alias DeletePrinterConnectionA DeletePrinterConnection;
907 alias DeletePrinterDataA DeletePrinterData;
908 alias DeletePrinterDriverA DeletePrinterDriver;
909 alias DeletePrintProcessorA DeletePrintProcessor;
910 alias DeletePrintProvidorA DeletePrintProvidor;
911 alias DocumentPropertiesA DocumentProperties;
912 alias EnumFormsA EnumForms;
913 alias EnumJobsA EnumJobs;
914 alias EnumMonitorsA EnumMonitors;
915 alias EnumPortsA EnumPorts;
916 alias EnumPrinterDataA EnumPrinterData;
917 alias EnumPrinterDriversA EnumPrinterDrivers;
918 alias EnumPrintersA EnumPrinters;
919 alias EnumPrintProcessorDatatypesA EnumPrintProcessorDatatypes;
920 alias EnumPrintProcessorsA EnumPrintProcessors;
921 
922 static if (_WIN32_WINNT >= 0x500) {
923 alias GetDefaultPrinterA GetDefaultPrinter;
924 }
925 
926 alias GetFormA GetForm;
927 alias GetJobA GetJob;
928 alias GetPrinterA GetPrinter;
929 alias GetPrinterDataA GetPrinterData;
930 alias GetPrinterDriverA GetPrinterDriver;
931 alias GetPrinterDriverDirectoryA GetPrinterDriverDirectory;
932 alias GetPrintProcessorDirectoryA GetPrintProcessorDirectory;
933 alias OpenPrinterA OpenPrinter;
934 alias PrinterMessageBoxA PrinterMessageBox;
935 alias ResetPrinterA ResetPrinter;
936 alias SetFormA SetForm;
937 alias SetJobA SetJob;
938 alias SetPrinterA SetPrinter;
939 alias SetPrinterDataA SetPrinterData;
940 alias StartDocPrinterA StartDocPrinter;
941 }
942 
943 alias JOB_INFO_1* PJOB_INFO_1, LPJOB_INFO_1;
944 alias JOB_INFO_2* PJOB_INFO_2, LPJOB_INFO_2;
945 alias ADDJOB_INFO_1* PADDJOB_INFO_1, LPADDJOB_INFO_1;
946 alias DATATYPES_INFO_1* PDATATYPES_INFO_1, LPDATATYPES_INFO_1;
947 alias MONITOR_INFO_1* PMONITOR_INFO_1, LPMONITOR_INFO_1;
948 alias MONITOR_INFO_2* PMONITOR_INFO_2, LPMONITOR_INFO_2;
949 alias DOC_INFO_1* PDOC_INFO_1, LPDOC_INFO_1;
950 alias DOC_INFO_2* PDOC_INFO_2, LPDOC_INFO_2;
951 alias PORT_INFO_1* PPORT_INFO_1, LPPORT_INFO_1;
952 alias PORT_INFO_2* PPORT_INFO_2, LPPORT_INFO_2;
953 alias PORT_INFO_3* PPORT_INFO_3, LPPORT_INFO_3;
954 alias DRIVER_INFO_2* PDRIVER_INFO_2, LPDRIVER_INFO_2;
955 alias PRINTER_INFO_1* PPRINTER_INFO_1, LPPRINTER_INFO_1;
956 alias PRINTER_INFO_2* PPRINTER_INFO_2, LPPRINTER_INFO_2;
957 alias PRINTER_INFO_4* PPRINTER_INFO_4, LPPRINTER_INFO_4;
958 alias PRINTER_INFO_5* PPRINTER_INFO_5, LPPRINTER_INFO_5;
959 alias PRINTPROCESSOR_INFO_1* PPRINTPROCESSOR_INFO_1, LPPRINTPROCESSOR_INFO_1;
960 alias FORM_INFO_1* PFORM_INFO_1, LPFORM_INFO_1;
961 alias PRINTER_DEFAULTS* PPRINTER_DEFAULTS, LPPRINTER_DEFAULTS;