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