1 module win32.ansi.winspool;
2
3 // Translated from Microsoft Platform SDK August 2001 Edition
4 // by Y.Tomino (demoonlit@inter7.jp)
5
6 import win32.ansi.winbase, win32.ansi.wingdi;
7
8 // #ifndef _WINSPOOL_
9 // #define _WINSPOOL_
10
11 // #ifdef _WINUSER_
12 // #...
13 // #endif
14
15 // #ifdef __cplusplus
16 // extern "C" {
17 // #endif
18
19 struct _PRINTER_INFO_1A {
20 DWORD Flags;
21 LPSTR pDescription;
22 LPSTR pName;
23 LPSTR pComment;
24 }
25 alias _PRINTER_INFO_1A PRINTER_INFO_1A;
26 alias _PRINTER_INFO_1A* PPRINTER_INFO_1A;
27 alias _PRINTER_INFO_1A* LPPRINTER_INFO_1A;
28
29 struct _PRINTER_INFO_1W {
30 DWORD Flags;
31 LPWSTR pDescription;
32 LPWSTR pName;
33 LPWSTR pComment;
34 }
35 alias _PRINTER_INFO_1W PRINTER_INFO_1W;
36 alias _PRINTER_INFO_1W* PPRINTER_INFO_1W;
37 alias _PRINTER_INFO_1W* LPPRINTER_INFO_1W;
38
39 // #ifdef UNICODE
40 // ...
41 // #else
42 alias PRINTER_INFO_1A PRINTER_INFO_1;
43 alias PPRINTER_INFO_1A PPRINTER_INFO_1;
44 alias LPPRINTER_INFO_1A LPPRINTER_INFO_1;
45 // #endif // UNICODE
46
47 struct _PRINTER_INFO_2A {
48 LPSTR pServerName;
49 LPSTR pPrinterName;
50 LPSTR pShareName;
51 LPSTR pPortName;
52 LPSTR pDriverName;
53 LPSTR pComment;
54 LPSTR pLocation;
55 LPDEVMODEA pDevMode;
56 LPSTR pSepFile;
57 LPSTR pPrintProcessor;
58 LPSTR pDatatype;
59 LPSTR pParameters;
60 PSECURITY_DESCRIPTOR pSecurityDescriptor;
61 DWORD Attributes;
62 DWORD Priority;
63 DWORD DefaultPriority;
64 DWORD StartTime;
65 DWORD UntilTime;
66 DWORD Status;
67 DWORD cJobs;
68 DWORD AveragePPM;
69 }
70 alias _PRINTER_INFO_2A PRINTER_INFO_2A;
71 alias _PRINTER_INFO_2A* PPRINTER_INFO_2A;
72 alias _PRINTER_INFO_2A* LPPRINTER_INFO_2A;
73
74 struct _PRINTER_INFO_2W {
75 LPWSTR pServerName;
76 LPWSTR pPrinterName;
77 LPWSTR pShareName;
78 LPWSTR pPortName;
79 LPWSTR pDriverName;
80 LPWSTR pComment;
81 LPWSTR pLocation;
82 LPDEVMODEW pDevMode;
83 LPWSTR pSepFile;
84 LPWSTR pPrintProcessor;
85 LPWSTR pDatatype;
86 LPWSTR pParameters;
87 PSECURITY_DESCRIPTOR pSecurityDescriptor;
88 DWORD Attributes;
89 DWORD Priority;
90 DWORD DefaultPriority;
91 DWORD StartTime;
92 DWORD UntilTime;
93 DWORD Status;
94 DWORD cJobs;
95 DWORD AveragePPM;
96 }
97 alias _PRINTER_INFO_2W PRINTER_INFO_2W;
98 alias _PRINTER_INFO_2W* PPRINTER_INFO_2W;
99 alias _PRINTER_INFO_2W* LPPRINTER_INFO_2W;
100
101 // #ifdef UNICODE
102 // ...
103 // #else
104 alias PRINTER_INFO_2A PRINTER_INFO_2;
105 alias PPRINTER_INFO_2A PPRINTER_INFO_2;
106 alias LPPRINTER_INFO_2A LPPRINTER_INFO_2;
107 // #endif // UNICODE
108
109 struct _PRINTER_INFO_3 {
110 PSECURITY_DESCRIPTOR pSecurityDescriptor;
111 }
112 alias _PRINTER_INFO_3 PRINTER_INFO_3;
113 alias _PRINTER_INFO_3* PPRINTER_INFO_3;
114 alias _PRINTER_INFO_3* LPPRINTER_INFO_3;
115
116 struct _PRINTER_INFO_4A {
117 LPSTR pPrinterName;
118 LPSTR pServerName;
119 DWORD Attributes;
120 }
121 alias _PRINTER_INFO_4A PRINTER_INFO_4A;
122 alias _PRINTER_INFO_4A* PPRINTER_INFO_4A;
123 alias _PRINTER_INFO_4A* LPPRINTER_INFO_4A;
124
125 struct _PRINTER_INFO_4W {
126 LPWSTR pPrinterName;
127 LPWSTR pServerName;
128 DWORD Attributes;
129 }
130 alias _PRINTER_INFO_4W PRINTER_INFO_4W;
131 alias _PRINTER_INFO_4W* PPRINTER_INFO_4W;
132 alias _PRINTER_INFO_4W* LPPRINTER_INFO_4W;
133
134 // #ifdef UNICODE
135 // ...
136 // #else
137 alias PRINTER_INFO_4A PRINTER_INFO_4;
138 alias PPRINTER_INFO_4A PPRINTER_INFO_4;
139 alias LPPRINTER_INFO_4A LPPRINTER_INFO_4;
140 // #endif // UNICODE
141
142 struct _PRINTER_INFO_5A {
143 LPSTR pPrinterName;
144 LPSTR pPortName;
145 DWORD Attributes;
146 DWORD DeviceNotSelectedTimeout;
147 DWORD TransmissionRetryTimeout;
148 }
149 alias _PRINTER_INFO_5A PRINTER_INFO_5A;
150 alias _PRINTER_INFO_5A* PPRINTER_INFO_5A;
151 alias _PRINTER_INFO_5A* LPPRINTER_INFO_5A;
152
153 struct _PRINTER_INFO_5W {
154 LPWSTR pPrinterName;
155 LPWSTR pPortName;
156 DWORD Attributes;
157 DWORD DeviceNotSelectedTimeout;
158 DWORD TransmissionRetryTimeout;
159 }
160 alias _PRINTER_INFO_5W PRINTER_INFO_5W;
161 alias _PRINTER_INFO_5W* PPRINTER_INFO_5W;
162 alias _PRINTER_INFO_5W* LPPRINTER_INFO_5W;
163
164 // #ifdef UNICODE
165 // ...
166 // #else
167 alias PRINTER_INFO_5A PRINTER_INFO_5;
168 alias PPRINTER_INFO_5A PPRINTER_INFO_5;
169 alias LPPRINTER_INFO_5A LPPRINTER_INFO_5;
170 // #endif // UNICODE
171
172 struct _PRINTER_INFO_6 {
173 DWORD dwStatus;
174 }
175 alias _PRINTER_INFO_6 PRINTER_INFO_6;
176 alias _PRINTER_INFO_6* PPRINTER_INFO_6;
177 alias _PRINTER_INFO_6* LPPRINTER_INFO_6;
178
179 struct _PRINTER_INFO_7A {
180 LPSTR pszObjectGUID;
181 DWORD dwAction;
182 }
183 alias _PRINTER_INFO_7A PRINTER_INFO_7A;
184 alias _PRINTER_INFO_7A* PPRINTER_INFO_7A;
185 alias _PRINTER_INFO_7A* LPPRINTER_INFO_7A;
186
187 struct _PRINTER_INFO_7W {
188 LPWSTR pszObjectGUID;
189 DWORD dwAction;
190 }
191 alias _PRINTER_INFO_7W PRINTER_INFO_7W;
192 alias _PRINTER_INFO_7W* PPRINTER_INFO_7W;
193 alias _PRINTER_INFO_7W* LPPRINTER_INFO_7W;
194
195 // #ifdef UNICODE
196 // ...
197 // #else
198 alias PRINTER_INFO_7A PRINTER_INFO_7;
199 alias PPRINTER_INFO_7A PPRINTER_INFO_7;
200 alias LPPRINTER_INFO_7A LPPRINTER_INFO_7;
201 // #endif // UNICODE
202
203 enum : uint { DSPRINT_PUBLISH = 0x00000001 }
204 enum : uint { DSPRINT_UPDATE = 0x00000002 }
205 enum : uint { DSPRINT_UNPUBLISH = 0x00000004 }
206 enum : uint { DSPRINT_REPUBLISH = 0x00000008 }
207 enum : uint { DSPRINT_PENDING = 0x80000000 }
208
209 struct _PRINTER_INFO_8A {
210 LPDEVMODEA pDevMode;
211 }
212 alias _PRINTER_INFO_8A PRINTER_INFO_8A;
213 alias _PRINTER_INFO_8A* PPRINTER_INFO_8A;
214 alias _PRINTER_INFO_8A* LPPRINTER_INFO_8A;
215
216 struct _PRINTER_INFO_8W {
217 LPDEVMODEW pDevMode;
218 }
219 alias _PRINTER_INFO_8W PRINTER_INFO_8W;
220 alias _PRINTER_INFO_8W* PPRINTER_INFO_8W;
221 alias _PRINTER_INFO_8W* LPPRINTER_INFO_8W;
222
223 // #ifdef UNICODE
224 // ...
225 // #else
226 alias PRINTER_INFO_8A PRINTER_INFO_8;
227 alias PPRINTER_INFO_8A PPRINTER_INFO_8;
228 alias LPPRINTER_INFO_8A LPPRINTER_INFO_8;
229 // #endif // UNICODE
230
231 struct _PRINTER_INFO_9A {
232 LPDEVMODEA pDevMode;
233 }
234 alias _PRINTER_INFO_9A PRINTER_INFO_9A;
235 alias _PRINTER_INFO_9A* PPRINTER_INFO_9A;
236 alias _PRINTER_INFO_9A* LPPRINTER_INFO_9A;
237
238 struct _PRINTER_INFO_9W {
239 LPDEVMODEW pDevMode;
240 }
241 alias _PRINTER_INFO_9W PRINTER_INFO_9W;
242 alias _PRINTER_INFO_9W* PPRINTER_INFO_9W;
243 alias _PRINTER_INFO_9W* LPPRINTER_INFO_9W;
244
245 // #ifdef UNICODE
246 // ...
247 // #else
248 alias PRINTER_INFO_9A PRINTER_INFO_9;
249 alias PPRINTER_INFO_9A PPRINTER_INFO_9;
250 alias LPPRINTER_INFO_9A LPPRINTER_INFO_9;
251 // #endif // UNICODE
252
253 enum : uint { PRINTER_CONTROL_PAUSE = 1 }
254 enum : uint { PRINTER_CONTROL_RESUME = 2 }
255 enum : uint { PRINTER_CONTROL_PURGE = 3 }
256 enum : uint { PRINTER_CONTROL_SET_STATUS = 4 }
257
258 enum : uint { PRINTER_STATUS_PAUSED = 0x00000001 }
259 enum : uint { PRINTER_STATUS_ERROR = 0x00000002 }
260 enum : uint { PRINTER_STATUS_PENDING_DELETION = 0x00000004 }
261 enum : uint { PRINTER_STATUS_PAPER_JAM = 0x00000008 }
262 enum : uint { PRINTER_STATUS_PAPER_OUT = 0x00000010 }
263 enum : uint { PRINTER_STATUS_MANUAL_FEED = 0x00000020 }
264 enum : uint { PRINTER_STATUS_PAPER_PROBLEM = 0x00000040 }
265 enum : uint { PRINTER_STATUS_OFFLINE = 0x00000080 }
266 enum : uint { PRINTER_STATUS_IO_ACTIVE = 0x00000100 }
267 enum : uint { PRINTER_STATUS_BUSY = 0x00000200 }
268 enum : uint { PRINTER_STATUS_PRINTING = 0x00000400 }
269 enum : uint { PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800 }
270 enum : uint { PRINTER_STATUS_NOT_AVAILABLE = 0x00001000 }
271 enum : uint { PRINTER_STATUS_WAITING = 0x00002000 }
272 enum : uint { PRINTER_STATUS_PROCESSING = 0x00004000 }
273 enum : uint { PRINTER_STATUS_INITIALIZING = 0x00008000 }
274 enum : uint { PRINTER_STATUS_WARMING_UP = 0x00010000 }
275 enum : uint { PRINTER_STATUS_TONER_LOW = 0x00020000 }
276 enum : uint { PRINTER_STATUS_NO_TONER = 0x00040000 }
277 enum : uint { PRINTER_STATUS_PAGE_PUNT = 0x00080000 }
278 enum : uint { PRINTER_STATUS_USER_INTERVENTION = 0x00100000 }
279 enum : uint { PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000 }
280 enum : uint { PRINTER_STATUS_DOOR_OPEN = 0x00400000 }
281 enum : uint { PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000 }
282 enum : uint { PRINTER_STATUS_POWER_SAVE = 0x01000000 }
283
284 enum : uint { PRINTER_ATTRIBUTE_QUEUED = 0x00000001 }
285 enum : uint { PRINTER_ATTRIBUTE_DIRECT = 0x00000002 }
286 enum : uint { PRINTER_ATTRIBUTE_DEFAULT = 0x00000004 }
287 enum : uint { PRINTER_ATTRIBUTE_SHARED = 0x00000008 }
288 enum : uint { PRINTER_ATTRIBUTE_NETWORK = 0x00000010 }
289 enum : uint { PRINTER_ATTRIBUTE_HIDDEN = 0x00000020 }
290 enum : uint { PRINTER_ATTRIBUTE_LOCAL = 0x00000040 }
291
292 enum : uint { PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080 }
293 enum : uint { PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100 }
294 enum : uint { PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200 }
295
296 enum : uint { PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400 }
297 enum : uint { PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800 }
298 enum : uint { PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000 }
299 enum : uint { PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000 }
300 enum : uint { PRINTER_ATTRIBUTE_FAX = 0x00004000 }
301
302 enum : uint { NO_PRIORITY = 0 }
303 enum : uint { MAX_PRIORITY = 99 }
304 enum : uint { MIN_PRIORITY = 1 }
305 enum : uint { DEF_PRIORITY = 1 }
306
307 struct _JOB_INFO_1A {
308 DWORD JobId;
309 LPSTR pPrinterName;
310 LPSTR pMachineName;
311 LPSTR pUserName;
312 LPSTR pDocument;
313 LPSTR pDatatype;
314 LPSTR pStatus;
315 DWORD Status;
316 DWORD Priority;
317 DWORD Position;
318 DWORD TotalPages;
319 DWORD PagesPrinted;
320 SYSTEMTIME Submitted;
321 }
322 alias _JOB_INFO_1A JOB_INFO_1A;
323 alias _JOB_INFO_1A* PJOB_INFO_1A;
324 alias _JOB_INFO_1A* LPJOB_INFO_1A;
325
326 struct _JOB_INFO_1W {
327 DWORD JobId;
328 LPWSTR pPrinterName;
329 LPWSTR pMachineName;
330 LPWSTR pUserName;
331 LPWSTR pDocument;
332 LPWSTR pDatatype;
333 LPWSTR pStatus;
334 DWORD Status;
335 DWORD Priority;
336 DWORD Position;
337 DWORD TotalPages;
338 DWORD PagesPrinted;
339 SYSTEMTIME Submitted;
340 }
341 alias _JOB_INFO_1W JOB_INFO_1W;
342 alias _JOB_INFO_1W* PJOB_INFO_1W;
343 alias _JOB_INFO_1W* LPJOB_INFO_1W;
344
345 // #ifdef UNICODE
346 // ...
347 // #else
348 alias JOB_INFO_1A JOB_INFO_1;
349 alias PJOB_INFO_1A PJOB_INFO_1;
350 alias LPJOB_INFO_1A LPJOB_INFO_1;
351 // #endif // UNICODE
352
353 struct _JOB_INFO_2A {
354 DWORD JobId;
355 LPSTR pPrinterName;
356 LPSTR pMachineName;
357 LPSTR pUserName;
358 LPSTR pDocument;
359 LPSTR pNotifyName;
360 LPSTR pDatatype;
361 LPSTR pPrintProcessor;
362 LPSTR pParameters;
363 LPSTR pDriverName;
364 LPDEVMODEA pDevMode;
365 LPSTR pStatus;
366 PSECURITY_DESCRIPTOR pSecurityDescriptor;
367 DWORD Status;
368 DWORD Priority;
369 DWORD Position;
370 DWORD StartTime;
371 DWORD UntilTime;
372 DWORD TotalPages;
373 DWORD Size;
374 SYSTEMTIME Submitted;
375 DWORD Time;
376 DWORD PagesPrinted;
377 }
378 alias _JOB_INFO_2A JOB_INFO_2A;
379 alias _JOB_INFO_2A* PJOB_INFO_2A;
380 alias _JOB_INFO_2A* LPJOB_INFO_2A;
381
382 struct _JOB_INFO_2W {
383 DWORD JobId;
384 LPWSTR pPrinterName;
385 LPWSTR pMachineName;
386 LPWSTR pUserName;
387 LPWSTR pDocument;
388 LPWSTR pNotifyName;
389 LPWSTR pDatatype;
390 LPWSTR pPrintProcessor;
391 LPWSTR pParameters;
392 LPWSTR pDriverName;
393 LPDEVMODEW pDevMode;
394 LPWSTR pStatus;
395 PSECURITY_DESCRIPTOR pSecurityDescriptor;
396 DWORD Status;
397 DWORD Priority;
398 DWORD Position;
399 DWORD StartTime;
400 DWORD UntilTime;
401 DWORD TotalPages;
402 DWORD Size;
403 SYSTEMTIME Submitted;
404 DWORD Time;
405 DWORD PagesPrinted;
406 }
407 alias _JOB_INFO_2W JOB_INFO_2W;
408 alias _JOB_INFO_2W* PJOB_INFO_2W;
409 alias _JOB_INFO_2W* LPJOB_INFO_2W;
410
411 // #ifdef UNICODE
412 // ...
413 // #else
414 alias JOB_INFO_2A JOB_INFO_2;
415 alias PJOB_INFO_2A PJOB_INFO_2;
416 alias LPJOB_INFO_2A LPJOB_INFO_2;
417 // #endif // UNICODE
418
419 struct _JOB_INFO_3 {
420 DWORD JobId;
421 DWORD NextJobId;
422 DWORD Reserved;
423 }
424 alias _JOB_INFO_3 JOB_INFO_3;
425 alias _JOB_INFO_3* PJOB_INFO_3;
426 alias _JOB_INFO_3* LPJOB_INFO_3;
427
428 enum : uint { JOB_CONTROL_PAUSE = 1 }
429 enum : uint { JOB_CONTROL_RESUME = 2 }
430 enum : uint { JOB_CONTROL_CANCEL = 3 }
431 enum : uint { JOB_CONTROL_RESTART = 4 }
432 enum : uint { JOB_CONTROL_DELETE = 5 }
433 enum : uint { JOB_CONTROL_SENT_TO_PRINTER = 6 }
434 enum : uint { JOB_CONTROL_LAST_PAGE_EJECTED = 7 }
435
436 enum : uint { JOB_STATUS_PAUSED = 0x00000001 }
437 enum : uint { JOB_STATUS_ERROR = 0x00000002 }
438 enum : uint { JOB_STATUS_DELETING = 0x00000004 }
439 enum : uint { JOB_STATUS_SPOOLING = 0x00000008 }
440 enum : uint { JOB_STATUS_PRINTING = 0x00000010 }
441 enum : uint { JOB_STATUS_OFFLINE = 0x00000020 }
442 enum : uint { JOB_STATUS_PAPEROUT = 0x00000040 }
443 enum : uint { JOB_STATUS_PRINTED = 0x00000080 }
444 enum : uint { JOB_STATUS_DELETED = 0x00000100 }
445 enum : uint { JOB_STATUS_BLOCKED_DEVQ = 0x00000200 }
446 enum : uint { JOB_STATUS_USER_INTERVENTION = 0x00000400 }
447 enum : uint { JOB_STATUS_RESTART = 0x00000800 }
448 enum : uint { JOB_STATUS_COMPLETE = 0x00001000 }
449
450 enum : uint { JOB_POSITION_UNSPECIFIED = 0 }
451
452 struct _ADDJOB_INFO_1A {
453 LPSTR Path;
454 DWORD JobId;
455 }
456 alias _ADDJOB_INFO_1A ADDJOB_INFO_1A;
457 alias _ADDJOB_INFO_1A* PADDJOB_INFO_1A;
458 alias _ADDJOB_INFO_1A* LPADDJOB_INFO_1A;
459
460 struct _ADDJOB_INFO_1W {
461 LPWSTR Path;
462 DWORD JobId;
463 }
464 alias _ADDJOB_INFO_1W ADDJOB_INFO_1W;
465 alias _ADDJOB_INFO_1W* PADDJOB_INFO_1W;
466 alias _ADDJOB_INFO_1W* LPADDJOB_INFO_1W;
467
468 // #ifdef UNICODE
469 // ...
470 // #else
471 alias ADDJOB_INFO_1A ADDJOB_INFO_1;
472 alias PADDJOB_INFO_1A PADDJOB_INFO_1;
473 alias LPADDJOB_INFO_1A LPADDJOB_INFO_1;
474 // #endif // UNICODE
475
476 struct _DRIVER_INFO_1A {
477 LPSTR pName;
478 }
479 alias _DRIVER_INFO_1A DRIVER_INFO_1A;
480 alias _DRIVER_INFO_1A* PDRIVER_INFO_1A;
481 alias _DRIVER_INFO_1A* LPDRIVER_INFO_1A;
482
483 struct _DRIVER_INFO_1W {
484 LPWSTR pName;
485 }
486 alias _DRIVER_INFO_1W DRIVER_INFO_1W;
487 alias _DRIVER_INFO_1W* PDRIVER_INFO_1W;
488 alias _DRIVER_INFO_1W* LPDRIVER_INFO_1W;
489
490 // #ifdef UNICODE
491 // ...
492 // #else
493 alias DRIVER_INFO_1A DRIVER_INFO_1;
494 alias PDRIVER_INFO_1A PDRIVER_INFO_1;
495 alias LPDRIVER_INFO_1A LPDRIVER_INFO_1;
496 // #endif // UNICODE
497
498 struct _DRIVER_INFO_2A {
499 DWORD cVersion;
500 LPSTR pName;
501 LPSTR pEnvironment;
502 LPSTR pDriverPath;
503 LPSTR pDataFile;
504 LPSTR pConfigFile;
505 }
506 alias _DRIVER_INFO_2A DRIVER_INFO_2A;
507 alias _DRIVER_INFO_2A* PDRIVER_INFO_2A;
508 alias _DRIVER_INFO_2A* LPDRIVER_INFO_2A;
509
510 struct _DRIVER_INFO_2W {
511 DWORD cVersion;
512 LPWSTR pName;
513 LPWSTR pEnvironment;
514 LPWSTR pDriverPath;
515 LPWSTR pDataFile;
516 LPWSTR pConfigFile;
517 }
518 alias _DRIVER_INFO_2W DRIVER_INFO_2W;
519 alias _DRIVER_INFO_2W* PDRIVER_INFO_2W;
520 alias _DRIVER_INFO_2W* LPDRIVER_INFO_2W;
521
522 // #ifdef UNICODE
523 // ...
524 // #else
525 alias DRIVER_INFO_2A DRIVER_INFO_2;
526 alias PDRIVER_INFO_2A PDRIVER_INFO_2;
527 alias LPDRIVER_INFO_2A LPDRIVER_INFO_2;
528 // #endif // UNICODE
529
530 struct _DRIVER_INFO_3A {
531 DWORD cVersion;
532 LPSTR pName;
533 LPSTR pEnvironment;
534 LPSTR pDriverPath;
535 LPSTR pDataFile;
536 LPSTR pConfigFile;
537 LPSTR pHelpFile;
538 LPSTR pDependentFiles;
539 LPSTR pMonitorName;
540 LPSTR pDefaultDataType;
541 }
542 alias _DRIVER_INFO_3A DRIVER_INFO_3A;
543 alias _DRIVER_INFO_3A* PDRIVER_INFO_3A;
544 alias _DRIVER_INFO_3A* LPDRIVER_INFO_3A;
545
546 struct _DRIVER_INFO_3W {
547 DWORD cVersion;
548 LPWSTR pName;
549 LPWSTR pEnvironment;
550 LPWSTR pDriverPath;
551 LPWSTR pDataFile;
552 LPWSTR pConfigFile;
553 LPWSTR pHelpFile;
554 LPWSTR pDependentFiles;
555 LPWSTR pMonitorName;
556 LPWSTR pDefaultDataType;
557 }
558 alias _DRIVER_INFO_3W DRIVER_INFO_3W;
559 alias _DRIVER_INFO_3W* PDRIVER_INFO_3W;
560 alias _DRIVER_INFO_3W* LPDRIVER_INFO_3W;
561
562 // #ifdef UNICODE
563 // ...
564 // #else
565 alias DRIVER_INFO_3A DRIVER_INFO_3;
566 alias PDRIVER_INFO_3A PDRIVER_INFO_3;
567 alias LPDRIVER_INFO_3A LPDRIVER_INFO_3;
568 // #endif // UNICODE
569
570 struct _DRIVER_INFO_4A {
571 DWORD cVersion;
572 LPSTR pName;
573 LPSTR pEnvironment;
574 LPSTR pDriverPath;
575 LPSTR pDataFile;
576 LPSTR pConfigFile;
577 LPSTR pHelpFile;
578 LPSTR pDependentFiles;
579 LPSTR pMonitorName;
580 LPSTR pDefaultDataType;
581 LPSTR pszzPreviousNames;
582 }
583 alias _DRIVER_INFO_4A DRIVER_INFO_4A;
584 alias _DRIVER_INFO_4A* PDRIVER_INFO_4A;
585 alias _DRIVER_INFO_4A* LPDRIVER_INFO_4A;
586
587 struct _DRIVER_INFO_4W {
588 DWORD cVersion;
589 LPWSTR pName;
590 LPWSTR pEnvironment;
591 LPWSTR pDriverPath;
592 LPWSTR pDataFile;
593 LPWSTR pConfigFile;
594 LPWSTR pHelpFile;
595 LPWSTR pDependentFiles;
596 LPWSTR pMonitorName;
597 LPWSTR pDefaultDataType;
598 LPWSTR pszzPreviousNames;
599 }
600 alias _DRIVER_INFO_4W DRIVER_INFO_4W;
601 alias _DRIVER_INFO_4W* PDRIVER_INFO_4W;
602 alias _DRIVER_INFO_4W* LPDRIVER_INFO_4W;
603
604 // #ifdef UNICODE
605 // ...
606 // #else
607 alias DRIVER_INFO_4A DRIVER_INFO_4;
608 alias PDRIVER_INFO_4A PDRIVER_INFO_4;
609 alias LPDRIVER_INFO_4A LPDRIVER_INFO_4;
610 // #endif // UNICODE
611
612 struct _DRIVER_INFO_5A {
613 DWORD cVersion;
614 LPSTR pName;
615 LPSTR pEnvironment;
616 LPSTR pDriverPath;
617 LPSTR pDataFile;
618 LPSTR pConfigFile;
619 DWORD dwDriverAttributes;
620 DWORD dwConfigVersion;
621 DWORD dwDriverVersion;
622 }
623 alias _DRIVER_INFO_5A DRIVER_INFO_5A;
624 alias _DRIVER_INFO_5A* PDRIVER_INFO_5A;
625 alias _DRIVER_INFO_5A* LPDRIVER_INFO_5A;
626
627 struct _DRIVER_INFO_5W {
628 DWORD cVersion;
629 LPWSTR pName;
630 LPWSTR pEnvironment;
631 LPWSTR pDriverPath;
632 LPWSTR pDataFile;
633 LPWSTR pConfigFile;
634 DWORD dwDriverAttributes;
635 DWORD dwConfigVersion;
636 DWORD dwDriverVersion;
637 }
638 alias _DRIVER_INFO_5W DRIVER_INFO_5W;
639 alias _DRIVER_INFO_5W* PDRIVER_INFO_5W;
640 alias _DRIVER_INFO_5W* LPDRIVER_INFO_5W;
641
642 // #ifdef UNICODE
643 // ...
644 // #else
645 alias DRIVER_INFO_5A DRIVER_INFO_5;
646 alias PDRIVER_INFO_5A PDRIVER_INFO_5;
647 alias LPDRIVER_INFO_5A LPDRIVER_INFO_5;
648 // #endif // UNICODE
649
650 struct _DRIVER_INFO_6A {
651 DWORD cVersion;
652 LPSTR pName;
653 LPSTR pEnvironment;
654 LPSTR pDriverPath;
655 LPSTR pDataFile;
656 LPSTR pConfigFile;
657 LPSTR pHelpFile;
658 LPSTR pDependentFiles;
659 LPSTR pMonitorName;
660 LPSTR pDefaultDataType;
661 LPSTR pszzPreviousNames;
662 FILETIME ftDriverDate;
663 DWORDLONG dwlDriverVersion;
664 LPSTR pszMfgName;
665 LPSTR pszOEMUrl;
666 LPSTR pszHardwareID;
667 LPSTR pszProvider;
668 }
669 alias _DRIVER_INFO_6A DRIVER_INFO_6A;
670 alias _DRIVER_INFO_6A* PDRIVER_INFO_6A;
671 alias _DRIVER_INFO_6A* LPDRIVER_INFO_6A;
672
673 struct _DRIVER_INFO_6W {
674 DWORD cVersion;
675 LPWSTR pName;
676 LPWSTR pEnvironment;
677 LPWSTR pDriverPath;
678 LPWSTR pDataFile;
679 LPWSTR pConfigFile;
680 LPWSTR pHelpFile;
681 LPWSTR pDependentFiles;
682 LPWSTR pMonitorName;
683 LPWSTR pDefaultDataType;
684 LPWSTR pszzPreviousNames;
685 FILETIME ftDriverDate;
686 DWORDLONG dwlDriverVersion;
687 LPWSTR pszMfgName;
688 LPWSTR pszOEMUrl;
689 LPWSTR pszHardwareID;
690 LPWSTR pszProvider;
691 }
692 alias _DRIVER_INFO_6W DRIVER_INFO_6W;
693 alias _DRIVER_INFO_6W* PDRIVER_INFO_6W;
694 alias _DRIVER_INFO_6W* LPDRIVER_INFO_6W;
695
696 // #ifdef UNICODE
697 // ...
698 // #else
699 alias DRIVER_INFO_6A DRIVER_INFO_6;
700 alias PDRIVER_INFO_6A PDRIVER_INFO_6;
701 alias LPDRIVER_INFO_6A LPDRIVER_INFO_6;
702 // #endif // UNICODE
703
704 enum : uint { DRIVER_KERNELMODE = 0x00000001 }
705 enum : uint { DRIVER_USERMODE = 0x00000002 }
706
707 enum : uint { DPD_DELETE_UNUSED_FILES = 0x00000001 }
708 enum : uint { DPD_DELETE_SPECIFIC_VERSION = 0x00000002 }
709 enum : uint { DPD_DELETE_ALL_FILES = 0x00000004 }
710
711 enum : uint { APD_STRICT_UPGRADE = 0x00000001 }
712 enum : uint { APD_STRICT_DOWNGRADE = 0x00000002 }
713 enum : uint { APD_COPY_ALL_FILES = 0x00000004 }
714 enum : uint { APD_COPY_NEW_FILES = 0x00000008 }
715 enum : uint { APD_COPY_FROM_DIRECTORY = 0x00000010 }
716
717 struct _DOC_INFO_1A {
718 LPSTR pDocName;
719 LPSTR pOutputFile;
720 LPSTR pDatatype;
721 }
722 alias _DOC_INFO_1A DOC_INFO_1A;
723 alias _DOC_INFO_1A* PDOC_INFO_1A;
724 alias _DOC_INFO_1A* LPDOC_INFO_1A;
725
726 struct _DOC_INFO_1W {
727 LPWSTR pDocName;
728 LPWSTR pOutputFile;
729 LPWSTR pDatatype;
730 }
731 alias _DOC_INFO_1W DOC_INFO_1W;
732 alias _DOC_INFO_1W* PDOC_INFO_1W;
733 alias _DOC_INFO_1W* LPDOC_INFO_1W;
734
735 // #ifdef UNICODE
736 // ...
737 // #else
738 alias DOC_INFO_1A DOC_INFO_1;
739 alias PDOC_INFO_1A PDOC_INFO_1;
740 alias LPDOC_INFO_1A LPDOC_INFO_1;
741 // #endif // UNICODE
742
743 struct _FORM_INFO_1A {
744 DWORD Flags;
745 LPSTR pName;
746 SIZEL Size;
747 RECTL ImageableArea;
748 }
749 alias _FORM_INFO_1A FORM_INFO_1A;
750 alias _FORM_INFO_1A* PFORM_INFO_1A;
751 alias _FORM_INFO_1A* LPFORM_INFO_1A;
752
753 struct _FORM_INFO_1W {
754 DWORD Flags;
755 LPWSTR pName;
756 SIZEL Size;
757 RECTL ImageableArea;
758 }
759 alias _FORM_INFO_1W FORM_INFO_1W;
760 alias _FORM_INFO_1W* PFORM_INFO_1W;
761 alias _FORM_INFO_1W* LPFORM_INFO_1W;
762
763 // #ifdef UNICODE
764 // ...
765 // #else
766 alias FORM_INFO_1A FORM_INFO_1;
767 alias PFORM_INFO_1A PFORM_INFO_1;
768 alias LPFORM_INFO_1A LPFORM_INFO_1;
769 // #endif // UNICODE
770
771 struct _DOC_INFO_2A {
772 LPSTR pDocName;
773 LPSTR pOutputFile;
774 LPSTR pDatatype;
775 DWORD dwMode;
776 DWORD JobId;
777 }
778 alias _DOC_INFO_2A DOC_INFO_2A;
779 alias _DOC_INFO_2A* PDOC_INFO_2A;
780 alias _DOC_INFO_2A* LPDOC_INFO_2A;
781
782 struct _DOC_INFO_2W {
783 LPWSTR pDocName;
784 LPWSTR pOutputFile;
785 LPWSTR pDatatype;
786 DWORD dwMode;
787 DWORD JobId;
788 }
789 alias _DOC_INFO_2W DOC_INFO_2W;
790 alias _DOC_INFO_2W* PDOC_INFO_2W;
791 alias _DOC_INFO_2W* LPDOC_INFO_2W;
792
793 // #ifdef UNICODE
794 // ...
795 // #else
796 alias DOC_INFO_2A DOC_INFO_2;
797 alias PDOC_INFO_2A PDOC_INFO_2;
798 alias LPDOC_INFO_2A LPDOC_INFO_2;
799 // #endif // UNICODE
800
801 enum : uint { DI_CHANNEL = 1 }
802
803 enum : uint { DI_READ_SPOOL_JOB = 3 }
804
805 struct _DOC_INFO_3A {
806 LPSTR pDocName;
807 LPSTR pOutputFile;
808 LPSTR pDatatype;
809 DWORD dwFlags;
810 }
811 alias _DOC_INFO_3A DOC_INFO_3A;
812 alias _DOC_INFO_3A* PDOC_INFO_3A;
813 alias _DOC_INFO_3A* LPDOC_INFO_3A;
814
815 struct _DOC_INFO_3W {
816 LPWSTR pDocName;
817 LPWSTR pOutputFile;
818 LPWSTR pDatatype;
819 DWORD dwFlags;
820 }
821 alias _DOC_INFO_3W DOC_INFO_3W;
822 alias _DOC_INFO_3W* PDOC_INFO_3W;
823 alias _DOC_INFO_3W* LPDOC_INFO_3W;
824
825 // #ifdef UNICODE
826 // ...
827 // #else
828 alias DOC_INFO_3A DOC_INFO_3;
829 alias PDOC_INFO_3A PDOC_INFO_3;
830 alias LPDOC_INFO_3A LPDOC_INFO_3;
831 // #endif // UNICODE
832
833 enum : uint { DI_MEMORYMAP_WRITE = 0x00000001 }
834
835 enum : uint { FORM_USER = 0x00000000 }
836 enum : uint { FORM_BUILTIN = 0x00000001 }
837 enum : uint { FORM_PRINTER = 0x00000002 }
838
839 struct _PRINTPROCESSOR_INFO_1A {
840 LPSTR pName;
841 }
842 alias _PRINTPROCESSOR_INFO_1A PRINTPROCESSOR_INFO_1A;
843 alias _PRINTPROCESSOR_INFO_1A* PPRINTPROCESSOR_INFO_1A;
844 alias _PRINTPROCESSOR_INFO_1A* LPPRINTPROCESSOR_INFO_1A;
845
846 struct _PRINTPROCESSOR_INFO_1W {
847 LPWSTR pName;
848 }
849 alias _PRINTPROCESSOR_INFO_1W PRINTPROCESSOR_INFO_1W;
850 alias _PRINTPROCESSOR_INFO_1W* PPRINTPROCESSOR_INFO_1W;
851 alias _PRINTPROCESSOR_INFO_1W* LPPRINTPROCESSOR_INFO_1W;
852
853 // #ifdef UNICODE
854 // ...
855 // #else
856 alias PRINTPROCESSOR_INFO_1A PRINTPROCESSOR_INFO_1;
857 alias PPRINTPROCESSOR_INFO_1A PPRINTPROCESSOR_INFO_1;
858 alias LPPRINTPROCESSOR_INFO_1A LPPRINTPROCESSOR_INFO_1;
859 // #endif // UNICODE
860
861 struct _PRINTPROCESSOR_CAPS_1 {
862 DWORD dwLevel;
863 DWORD dwNupOptions;
864 DWORD dwPageOrderFlags;
865 DWORD dwNumberOfCopies;
866 }
867 alias _PRINTPROCESSOR_CAPS_1 PRINTPROCESSOR_CAPS_1;
868 alias _PRINTPROCESSOR_CAPS_1* PPRINTPROCESSOR_CAPS_1;
869
870 enum : uint { NORMAL_PRINT = 0x00000000 }
871 enum : uint { REVERSE_PRINT = 0x00000001 }
872
873 struct _PORT_INFO_1A {
874 LPSTR pName;
875 }
876 alias _PORT_INFO_1A PORT_INFO_1A;
877 alias _PORT_INFO_1A* PPORT_INFO_1A;
878 alias _PORT_INFO_1A* LPPORT_INFO_1A;
879
880 struct _PORT_INFO_1W {
881 LPWSTR pName;
882 }
883 alias _PORT_INFO_1W PORT_INFO_1W;
884 alias _PORT_INFO_1W* PPORT_INFO_1W;
885 alias _PORT_INFO_1W* LPPORT_INFO_1W;
886
887 // #ifdef UNICODE
888 // ...
889 // #else
890 alias PORT_INFO_1A PORT_INFO_1;
891 alias PPORT_INFO_1A PPORT_INFO_1;
892 alias LPPORT_INFO_1A LPPORT_INFO_1;
893 // #endif // UNICODE
894
895 struct _PORT_INFO_2A {
896 LPSTR pPortName;
897 LPSTR pMonitorName;
898 LPSTR pDescription;
899 DWORD fPortType;
900 DWORD Reserved;
901 }
902 alias _PORT_INFO_2A PORT_INFO_2A;
903 alias _PORT_INFO_2A* PPORT_INFO_2A;
904 alias _PORT_INFO_2A* LPPORT_INFO_2A;
905
906 struct _PORT_INFO_2W {
907 LPWSTR pPortName;
908 LPWSTR pMonitorName;
909 LPWSTR pDescription;
910 DWORD fPortType;
911 DWORD Reserved;
912 }
913 alias _PORT_INFO_2W PORT_INFO_2W;
914 alias _PORT_INFO_2W* PPORT_INFO_2W;
915 alias _PORT_INFO_2W* LPPORT_INFO_2W;
916
917 // #ifdef UNICODE
918 // ...
919 // #else
920 alias PORT_INFO_2A PORT_INFO_2;
921 alias PPORT_INFO_2A PPORT_INFO_2;
922 alias LPPORT_INFO_2A LPPORT_INFO_2;
923 // #endif // UNICODE
924
925 enum : uint { PORT_TYPE_WRITE = 0x0001 }
926 enum : uint { PORT_TYPE_READ = 0x0002 }
927 enum : uint { PORT_TYPE_REDIRECTED = 0x0004 }
928 enum : uint { PORT_TYPE_NET_ATTACHED = 0x0008 }
929
930 struct _PORT_INFO_3A {
931 DWORD dwStatus;
932 LPSTR pszStatus;
933 DWORD dwSeverity;
934 }
935 alias _PORT_INFO_3A PORT_INFO_3A;
936 alias _PORT_INFO_3A* PPORT_INFO_3A;
937 alias _PORT_INFO_3A* LPPORT_INFO_3A;
938
939 struct _PORT_INFO_3W {
940 DWORD dwStatus;
941 LPWSTR pszStatus;
942 DWORD dwSeverity;
943 }
944 alias _PORT_INFO_3W PORT_INFO_3W;
945 alias _PORT_INFO_3W* PPORT_INFO_3W;
946 alias _PORT_INFO_3W* LPPORT_INFO_3W;
947
948 // #ifdef UNICODE
949 // ...
950 // #else
951 alias PORT_INFO_3A PORT_INFO_3;
952 alias PPORT_INFO_3A PPORT_INFO_3;
953 alias LPPORT_INFO_3A LPPORT_INFO_3;
954 // #endif // UNICODE
955
956 enum : uint { PORT_STATUS_TYPE_ERROR = 1 }
957 enum : uint { PORT_STATUS_TYPE_WARNING = 2 }
958 enum : uint { PORT_STATUS_TYPE_INFO = 3 }
959
960 enum : uint { PORT_STATUS_OFFLINE = 1 }
961 enum : uint { PORT_STATUS_PAPER_JAM = 2 }
962 enum : uint { PORT_STATUS_PAPER_OUT = 3 }
963 enum : uint { PORT_STATUS_OUTPUT_BIN_FULL = 4 }
964 enum : uint { PORT_STATUS_PAPER_PROBLEM = 5 }
965 enum : uint { PORT_STATUS_NO_TONER = 6 }
966 enum : uint { PORT_STATUS_DOOR_OPEN = 7 }
967 enum : uint { PORT_STATUS_USER_INTERVENTION = 8 }
968 enum : uint { PORT_STATUS_OUT_OF_MEMORY = 9 }
969
970 enum : uint { PORT_STATUS_TONER_LOW = 10 }
971
972 enum : uint { PORT_STATUS_WARMING_UP = 11 }
973 enum : uint { PORT_STATUS_POWER_SAVE = 12 }
974
975 struct _MONITOR_INFO_1A {
976 LPSTR pName;
977 }
978 alias _MONITOR_INFO_1A MONITOR_INFO_1A;
979 alias _MONITOR_INFO_1A* PMONITOR_INFO_1A;
980 alias _MONITOR_INFO_1A* LPMONITOR_INFO_1A;
981
982 struct _MONITOR_INFO_1W {
983 LPWSTR pName;
984 }
985 alias _MONITOR_INFO_1W MONITOR_INFO_1W;
986 alias _MONITOR_INFO_1W* PMONITOR_INFO_1W;
987 alias _MONITOR_INFO_1W* LPMONITOR_INFO_1W;
988
989 // #ifdef UNICODE
990 // ...
991 // #else
992 alias MONITOR_INFO_1A MONITOR_INFO_1;
993 alias PMONITOR_INFO_1A PMONITOR_INFO_1;
994 alias LPMONITOR_INFO_1A LPMONITOR_INFO_1;
995 // #endif // UNICODE
996
997 struct _MONITOR_INFO_2A {
998 LPSTR pName;
999 LPSTR pEnvironment;
1000 LPSTR pDLLName;
1001 }
1002 alias _MONITOR_INFO_2A MONITOR_INFO_2A;
1003 alias _MONITOR_INFO_2A* PMONITOR_INFO_2A;
1004 alias _MONITOR_INFO_2A* LPMONITOR_INFO_2A;
1005
1006 struct _MONITOR_INFO_2W {
1007 LPWSTR pName;
1008 LPWSTR pEnvironment;
1009 LPWSTR pDLLName;
1010 }
1011 alias _MONITOR_INFO_2W MONITOR_INFO_2W;
1012 alias _MONITOR_INFO_2W* PMONITOR_INFO_2W;
1013 alias _MONITOR_INFO_2W* LPMONITOR_INFO_2W;
1014
1015 // #ifdef UNICODE
1016 // ...
1017 // #else
1018 alias MONITOR_INFO_2A MONITOR_INFO_2;
1019 alias PMONITOR_INFO_2A PMONITOR_INFO_2;
1020 alias LPMONITOR_INFO_2A LPMONITOR_INFO_2;
1021 // #endif // UNICODE
1022
1023 struct _DATATYPES_INFO_1A {
1024 LPSTR pName;
1025 }
1026 alias _DATATYPES_INFO_1A DATATYPES_INFO_1A;
1027 alias _DATATYPES_INFO_1A* PDATATYPES_INFO_1A;
1028 alias _DATATYPES_INFO_1A* LPDATATYPES_INFO_1A;
1029
1030 struct _DATATYPES_INFO_1W {
1031 LPWSTR pName;
1032 }
1033 alias _DATATYPES_INFO_1W DATATYPES_INFO_1W;
1034 alias _DATATYPES_INFO_1W* PDATATYPES_INFO_1W;
1035 alias _DATATYPES_INFO_1W* LPDATATYPES_INFO_1W;
1036
1037 // #ifdef UNICODE
1038 // ...
1039 // #else
1040 alias DATATYPES_INFO_1A DATATYPES_INFO_1;
1041 alias PDATATYPES_INFO_1A PDATATYPES_INFO_1;
1042 alias LPDATATYPES_INFO_1A LPDATATYPES_INFO_1;
1043 // #endif // UNICODE
1044
1045 struct _PRINTER_DEFAULTSA {
1046 LPSTR pDatatype;
1047 LPDEVMODEA pDevMode;
1048 ACCESS_MASK DesiredAccess;
1049 }
1050 alias _PRINTER_DEFAULTSA PRINTER_DEFAULTSA;
1051 alias _PRINTER_DEFAULTSA* PPRINTER_DEFAULTSA;
1052 alias _PRINTER_DEFAULTSA* LPPRINTER_DEFAULTSA;
1053
1054 struct _PRINTER_DEFAULTSW {
1055 LPWSTR pDatatype;
1056 LPDEVMODEW pDevMode;
1057 ACCESS_MASK DesiredAccess;
1058 }
1059 alias _PRINTER_DEFAULTSW PRINTER_DEFAULTSW;
1060 alias _PRINTER_DEFAULTSW* PPRINTER_DEFAULTSW;
1061 alias _PRINTER_DEFAULTSW* LPPRINTER_DEFAULTSW;
1062
1063 // #ifdef UNICODE
1064 // ...
1065 // #else
1066 alias PRINTER_DEFAULTSA PRINTER_DEFAULTS;
1067 alias PPRINTER_DEFAULTSA PPRINTER_DEFAULTS;
1068 alias LPPRINTER_DEFAULTSA LPPRINTER_DEFAULTS;
1069 // #endif // UNICODE
1070
1071 struct _PRINTER_ENUM_VALUESA {
1072 LPSTR pValueName;
1073 DWORD cbValueName;
1074 DWORD dwType;
1075 LPBYTE pData;
1076 DWORD cbData;
1077 }
1078 alias _PRINTER_ENUM_VALUESA PRINTER_ENUM_VALUESA;
1079 alias _PRINTER_ENUM_VALUESA* PPRINTER_ENUM_VALUESA;
1080 alias _PRINTER_ENUM_VALUESA* LPPRINTER_ENUM_VALUESA;
1081
1082 struct _PRINTER_ENUM_VALUESW {
1083 LPWSTR pValueName;
1084 DWORD cbValueName;
1085 DWORD dwType;
1086 LPBYTE pData;
1087 DWORD cbData;
1088 }
1089 alias _PRINTER_ENUM_VALUESW PRINTER_ENUM_VALUESW;
1090 alias _PRINTER_ENUM_VALUESW* PPRINTER_ENUM_VALUESW;
1091 alias _PRINTER_ENUM_VALUESW* LPPRINTER_ENUM_VALUESW;
1092
1093 // #ifdef UNICODE
1094 // ...
1095 // #else
1096 alias PRINTER_ENUM_VALUESA PRINTER_ENUM_VALUES;
1097 alias PPRINTER_ENUM_VALUESA PPRINTER_ENUM_VALUES;
1098 alias LPPRINTER_ENUM_VALUESA LPPRINTER_ENUM_VALUES;
1099 // #endif // UNICODE
1100
1101 extern(Windows) export BOOL EnumPrintersA(
1102 DWORD Flags,
1103 LPSTR Name,
1104 DWORD Level,
1105 LPBYTE pPrinterEnum,
1106 DWORD cbBuf,
1107 LPDWORD pcbNeeded,
1108 LPDWORD pcReturned
1109 );
1110 extern(Windows) export BOOL EnumPrintersW(
1111 DWORD Flags,
1112 LPWSTR Name,
1113 DWORD Level,
1114 LPBYTE pPrinterEnum,
1115 DWORD cbBuf,
1116 LPDWORD pcbNeeded,
1117 LPDWORD pcReturned
1118 );
1119 // #ifdef UNICODE
1120 // #...
1121 // #else
1122 alias EnumPrintersA EnumPrinters;
1123 // #endif // !UNICODE
1124
1125 enum : uint { PRINTER_ENUM_DEFAULT = 0x00000001 }
1126 enum : uint { PRINTER_ENUM_LOCAL = 0x00000002 }
1127 enum : uint { PRINTER_ENUM_CONNECTIONS = 0x00000004 }
1128 enum : uint { PRINTER_ENUM_FAVORITE = 0x00000004 }
1129 enum : uint { PRINTER_ENUM_NAME = 0x00000008 }
1130 enum : uint { PRINTER_ENUM_REMOTE = 0x00000010 }
1131 enum : uint { PRINTER_ENUM_SHARED = 0x00000020 }
1132 enum : uint { PRINTER_ENUM_NETWORK = 0x00000040 }
1133
1134 enum : uint { PRINTER_ENUM_EXPAND = 0x00004000 }
1135 enum : uint { PRINTER_ENUM_CONTAINER = 0x00008000 }
1136
1137 enum : uint { PRINTER_ENUM_ICONMASK = 0x00ff0000 }
1138 enum : uint { PRINTER_ENUM_ICON1 = 0x00010000 }
1139 enum : uint { PRINTER_ENUM_ICON2 = 0x00020000 }
1140 enum : uint { PRINTER_ENUM_ICON3 = 0x00040000 }
1141 enum : uint { PRINTER_ENUM_ICON4 = 0x00080000 }
1142 enum : uint { PRINTER_ENUM_ICON5 = 0x00100000 }
1143 enum : uint { PRINTER_ENUM_ICON6 = 0x00200000 }
1144 enum : uint { PRINTER_ENUM_ICON7 = 0x00400000 }
1145 enum : uint { PRINTER_ENUM_ICON8 = 0x00800000 }
1146 enum : uint { PRINTER_ENUM_HIDE = 0x01000000 }
1147
1148 enum : uint { SPOOL_FILE_PERSISTENT = 0x00000001 }
1149 enum : uint { SPOOL_FILE_TEMPORARY = 0x00000002 }
1150
1151 extern(Windows) export BOOL OpenPrinterA(
1152 LPSTR pPrinterName,
1153 LPHANDLE phPrinter,
1154 LPPRINTER_DEFAULTSA pDefault
1155 );
1156 extern(Windows) export BOOL OpenPrinterW(
1157 LPWSTR pPrinterName,
1158 LPHANDLE phPrinter,
1159 LPPRINTER_DEFAULTSW pDefault
1160 );
1161 // #ifdef UNICODE
1162 // #...
1163 // #else
1164 alias OpenPrinterA OpenPrinter;
1165 // #endif // !UNICODE
1166
1167 extern(Windows) export BOOL ResetPrinterA(
1168 HANDLE hPrinter,
1169 LPPRINTER_DEFAULTSA pDefault
1170 );
1171 extern(Windows) export BOOL ResetPrinterW(
1172 HANDLE hPrinter,
1173 LPPRINTER_DEFAULTSW pDefault
1174 );
1175 // #ifdef UNICODE
1176 // #...
1177 // #else
1178 alias ResetPrinterA ResetPrinter;
1179 // #endif // !UNICODE
1180
1181 extern(Windows) export BOOL SetJobA(
1182 HANDLE hPrinter,
1183 DWORD JobId,
1184 DWORD Level,
1185 LPBYTE pJob,
1186 DWORD Command
1187 );
1188 extern(Windows) export BOOL SetJobW(
1189 HANDLE hPrinter,
1190 DWORD JobId,
1191 DWORD Level,
1192 LPBYTE pJob,
1193 DWORD Command
1194 );
1195 // #ifdef UNICODE
1196 // #...
1197 // #else
1198 alias SetJobA SetJob;
1199 // #endif // !UNICODE
1200
1201 extern(Windows) export BOOL GetJobA(
1202 HANDLE hPrinter,
1203 DWORD JobId,
1204 DWORD Level,
1205 LPBYTE pJob,
1206 DWORD cbBuf,
1207 LPDWORD pcbNeeded
1208 );
1209 extern(Windows) export BOOL GetJobW(
1210 HANDLE hPrinter,
1211 DWORD JobId,
1212 DWORD Level,
1213 LPBYTE pJob,
1214 DWORD cbBuf,
1215 LPDWORD pcbNeeded
1216 );
1217 // #ifdef UNICODE
1218 // #...
1219 // #else
1220 alias GetJobA GetJob;
1221 // #endif // !UNICODE
1222
1223 extern(Windows) export BOOL EnumJobsA(
1224 HANDLE hPrinter,
1225 DWORD FirstJob,
1226 DWORD NoJobs,
1227 DWORD Level,
1228 LPBYTE pJob,
1229 DWORD cbBuf,
1230 LPDWORD pcbNeeded,
1231 LPDWORD pcReturned
1232 );
1233 extern(Windows) export BOOL EnumJobsW(
1234 HANDLE hPrinter,
1235 DWORD FirstJob,
1236 DWORD NoJobs,
1237 DWORD Level,
1238 LPBYTE pJob,
1239 DWORD cbBuf,
1240 LPDWORD pcbNeeded,
1241 LPDWORD pcReturned
1242 );
1243 // #ifdef UNICODE
1244 // #...
1245 // #else
1246 alias EnumJobsA EnumJobs;
1247 // #endif // !UNICODE
1248
1249 extern(Windows) export HANDLE AddPrinterA(
1250 LPSTR pName,
1251 DWORD Level,
1252 LPBYTE pPrinter
1253 );
1254 extern(Windows) export HANDLE AddPrinterW(
1255 LPWSTR pName,
1256 DWORD Level,
1257 LPBYTE pPrinter
1258 );
1259 // #ifdef UNICODE
1260 // #...
1261 // #else
1262 alias AddPrinterA AddPrinter;
1263 // #endif // !UNICODE
1264
1265 extern(Windows) export BOOL DeletePrinter(
1266 HANDLE hPrinter
1267 );
1268
1269 extern(Windows) export BOOL SetPrinterA(
1270 HANDLE hPrinter,
1271 DWORD Level,
1272 LPBYTE pPrinter,
1273 DWORD Command
1274 );
1275 extern(Windows) export BOOL SetPrinterW(
1276 HANDLE hPrinter,
1277 DWORD Level,
1278 LPBYTE pPrinter,
1279 DWORD Command
1280 );
1281 // #ifdef UNICODE
1282 // #...
1283 // #else
1284 alias SetPrinterA SetPrinter;
1285 // #endif // !UNICODE
1286
1287 extern(Windows) export BOOL GetPrinterA(
1288 HANDLE hPrinter,
1289 DWORD Level,
1290 LPBYTE pPrinter,
1291 DWORD cbBuf,
1292 LPDWORD pcbNeeded
1293 );
1294 extern(Windows) export BOOL GetPrinterW(
1295 HANDLE hPrinter,
1296 DWORD Level,
1297 LPBYTE pPrinter,
1298 DWORD cbBuf,
1299 LPDWORD pcbNeeded
1300 );
1301 // #ifdef UNICODE
1302 // #...
1303 // #else
1304 alias GetPrinterA GetPrinter;
1305 // #endif // !UNICODE
1306
1307 extern(Windows) export BOOL AddPrinterDriverA(
1308 LPSTR pName,
1309 DWORD Level,
1310 LPBYTE pDriverInfo
1311 );
1312 extern(Windows) export BOOL AddPrinterDriverW(
1313 LPWSTR pName,
1314 DWORD Level,
1315 LPBYTE pDriverInfo
1316 );
1317 // #ifdef UNICODE
1318 // #...
1319 // #else
1320 alias AddPrinterDriverA AddPrinterDriver;
1321 // #endif // !UNICODE
1322
1323 extern(Windows) export BOOL AddPrinterDriverExA(
1324 LPSTR pName,
1325 DWORD Level,
1326 LPBYTE pDriverInfo,
1327 DWORD dwFileCopyFlags
1328 );
1329 extern(Windows) export BOOL AddPrinterDriverExW(
1330 LPWSTR pName,
1331 DWORD Level,
1332 LPBYTE pDriverInfo,
1333 DWORD dwFileCopyFlags
1334 );
1335 // #ifdef UNICODE
1336 // #...
1337 // #else
1338 alias AddPrinterDriverExA AddPrinterDriverEx;
1339 // #endif // !UNICODE
1340
1341 extern(Windows) export BOOL EnumPrinterDriversA(
1342 LPSTR pName,
1343 LPSTR pEnvironment,
1344 DWORD Level,
1345 LPBYTE pDriverInfo,
1346 DWORD cbBuf,
1347 LPDWORD pcbNeeded,
1348 LPDWORD pcReturned
1349 );
1350 extern(Windows) export BOOL EnumPrinterDriversW(
1351 LPWSTR pName,
1352 LPWSTR pEnvironment,
1353 DWORD Level,
1354 LPBYTE pDriverInfo,
1355 DWORD cbBuf,
1356 LPDWORD pcbNeeded,
1357 LPDWORD pcReturned
1358 );
1359 // #ifdef UNICODE
1360 // #...
1361 // #else
1362 alias EnumPrinterDriversA EnumPrinterDrivers;
1363 // #endif // !UNICODE
1364
1365 extern(Windows) export BOOL GetPrinterDriverA(
1366 HANDLE hPrinter,
1367 LPSTR pEnvironment,
1368 DWORD Level,
1369 LPBYTE pDriverInfo,
1370 DWORD cbBuf,
1371 LPDWORD pcbNeeded
1372 );
1373 extern(Windows) export BOOL GetPrinterDriverW(
1374 HANDLE hPrinter,
1375 LPWSTR pEnvironment,
1376 DWORD Level,
1377 LPBYTE pDriverInfo,
1378 DWORD cbBuf,
1379 LPDWORD pcbNeeded
1380 );
1381 // #ifdef UNICODE
1382 // #...
1383 // #else
1384 alias GetPrinterDriverA GetPrinterDriver;
1385 // #endif // !UNICODE
1386
1387 extern(Windows) export BOOL GetPrinterDriverDirectoryA(
1388 LPSTR pName,
1389 LPSTR pEnvironment,
1390 DWORD Level,
1391 LPBYTE pDriverDirectory,
1392 DWORD cbBuf,
1393 LPDWORD pcbNeeded
1394 );
1395 extern(Windows) export BOOL GetPrinterDriverDirectoryW(
1396 LPWSTR pName,
1397 LPWSTR pEnvironment,
1398 DWORD Level,
1399 LPBYTE pDriverDirectory,
1400 DWORD cbBuf,
1401 LPDWORD pcbNeeded
1402 );
1403 // #ifdef UNICODE
1404 // #...
1405 // #else
1406 alias GetPrinterDriverDirectoryA GetPrinterDriverDirectory;
1407 // #endif // !UNICODE
1408
1409 extern(Windows) export BOOL DeletePrinterDriverA(
1410 LPSTR pName,
1411 LPSTR pEnvironment,
1412 LPSTR pDriverName
1413 );
1414 extern(Windows) export BOOL DeletePrinterDriverW(
1415 LPWSTR pName,
1416 LPWSTR pEnvironment,
1417 LPWSTR pDriverName
1418 );
1419 // #ifdef UNICODE
1420 // #...
1421 // #else
1422 alias DeletePrinterDriverA DeletePrinterDriver;
1423 // #endif // !UNICODE
1424
1425 extern(Windows) export BOOL DeletePrinterDriverExA(
1426 LPSTR pName,
1427 LPSTR pEnvironment,
1428 LPSTR pDriverName,
1429 DWORD dwDeleteFlag,
1430 DWORD dwVersionFlag
1431 );
1432 extern(Windows) export BOOL DeletePrinterDriverExW(
1433 LPWSTR pName,
1434 LPWSTR pEnvironment,
1435 LPWSTR pDriverName,
1436 DWORD dwDeleteFlag,
1437 DWORD dwVersionFlag
1438 );
1439 // #ifdef UNICODE
1440 // #...
1441 // #else
1442 alias DeletePrinterDriverExA DeletePrinterDriverEx;
1443 // #endif // !UNICODE
1444
1445 extern(Windows) export BOOL AddPrintProcessorA(
1446 LPSTR pName,
1447 LPSTR pEnvironment,
1448 LPSTR pPathName,
1449 LPSTR pPrintProcessorName
1450 );
1451 extern(Windows) export BOOL AddPrintProcessorW(
1452 LPWSTR pName,
1453 LPWSTR pEnvironment,
1454 LPWSTR pPathName,
1455 LPWSTR pPrintProcessorName
1456 );
1457 // #ifdef UNICODE
1458 // #...
1459 // #else
1460 alias AddPrintProcessorA AddPrintProcessor;
1461 // #endif // !UNICODE
1462
1463 extern(Windows) export BOOL EnumPrintProcessorsA(
1464 LPSTR pName,
1465 LPSTR pEnvironment,
1466 DWORD Level,
1467 LPBYTE pPrintProcessorInfo,
1468 DWORD cbBuf,
1469 LPDWORD pcbNeeded,
1470 LPDWORD pcReturned
1471 );
1472 extern(Windows) export BOOL EnumPrintProcessorsW(
1473 LPWSTR pName,
1474 LPWSTR pEnvironment,
1475 DWORD Level,
1476 LPBYTE pPrintProcessorInfo,
1477 DWORD cbBuf,
1478 LPDWORD pcbNeeded,
1479 LPDWORD pcReturned
1480 );
1481 // #ifdef UNICODE
1482 // #...
1483 // #else
1484 alias EnumPrintProcessorsA EnumPrintProcessors;
1485 // #endif // !UNICODE
1486
1487 extern(Windows) export BOOL GetPrintProcessorDirectoryA(
1488 LPSTR pName,
1489 LPSTR pEnvironment,
1490 DWORD Level,
1491 LPBYTE pPrintProcessorInfo,
1492 DWORD cbBuf,
1493 LPDWORD pcbNeeded
1494 );
1495 extern(Windows) export BOOL GetPrintProcessorDirectoryW(
1496 LPWSTR pName,
1497 LPWSTR pEnvironment,
1498 DWORD Level,
1499 LPBYTE pPrintProcessorInfo,
1500 DWORD cbBuf,
1501 LPDWORD pcbNeeded
1502 );
1503 // #ifdef UNICODE
1504 // #...
1505 // #else
1506 alias GetPrintProcessorDirectoryA GetPrintProcessorDirectory;
1507 // #endif // !UNICODE
1508
1509 extern(Windows) export BOOL EnumPrintProcessorDatatypesA(
1510 LPSTR pName,
1511 LPSTR pPrintProcessorName,
1512 DWORD Level,
1513 LPBYTE pDatatypes,
1514 DWORD cbBuf,
1515 LPDWORD pcbNeeded,
1516 LPDWORD pcReturned
1517 );
1518 extern(Windows) export BOOL EnumPrintProcessorDatatypesW(
1519 LPWSTR pName,
1520 LPWSTR pPrintProcessorName,
1521 DWORD Level,
1522 LPBYTE pDatatypes,
1523 DWORD cbBuf,
1524 LPDWORD pcbNeeded,
1525 LPDWORD pcReturned
1526 );
1527 // #ifdef UNICODE
1528 // #...
1529 // #else
1530 alias EnumPrintProcessorDatatypesA EnumPrintProcessorDatatypes;
1531 // #endif // !UNICODE
1532
1533 extern(Windows) export BOOL DeletePrintProcessorA(
1534 LPSTR pName,
1535 LPSTR pEnvironment,
1536 LPSTR pPrintProcessorName
1537 );
1538 extern(Windows) export BOOL DeletePrintProcessorW(
1539 LPWSTR pName,
1540 LPWSTR pEnvironment,
1541 LPWSTR pPrintProcessorName
1542 );
1543 // #ifdef UNICODE
1544 // #...
1545 // #else
1546 alias DeletePrintProcessorA DeletePrintProcessor;
1547 // #endif // !UNICODE
1548
1549 extern(Windows) export DWORD StartDocPrinterA(
1550 HANDLE hPrinter,
1551 DWORD Level,
1552 LPBYTE pDocInfo
1553 );
1554 extern(Windows) export DWORD StartDocPrinterW(
1555 HANDLE hPrinter,
1556 DWORD Level,
1557 LPBYTE pDocInfo
1558 );
1559 // #ifdef UNICODE
1560 // #...
1561 // #else
1562 alias StartDocPrinterA StartDocPrinter;
1563 // #endif // !UNICODE
1564
1565 extern(Windows) export BOOL StartPagePrinter(
1566 HANDLE hPrinter
1567 );
1568
1569 extern(Windows) export BOOL WritePrinter(
1570 HANDLE hPrinter,
1571 LPVOID pBuf,
1572 DWORD cbBuf,
1573 LPDWORD pcWritten
1574 );
1575
1576 extern(Windows) export BOOL FlushPrinter(
1577 HANDLE hPrinter,
1578 LPVOID pBuf,
1579 DWORD cbBuf,
1580 LPDWORD pcWritten,
1581 DWORD cSleep
1582 );
1583
1584 extern(Windows) export BOOL EndPagePrinter(
1585 HANDLE hPrinter
1586 );
1587
1588 extern(Windows) export BOOL AbortPrinter(
1589 HANDLE hPrinter
1590 );
1591
1592 extern(Windows) export BOOL ReadPrinter(
1593 HANDLE hPrinter,
1594 LPVOID pBuf,
1595 DWORD cbBuf,
1596 LPDWORD pNoBytesRead
1597 );
1598
1599 extern(Windows) export BOOL EndDocPrinter(
1600 HANDLE hPrinter
1601 );
1602
1603 extern(Windows) export BOOL AddJobA(
1604 HANDLE hPrinter,
1605 DWORD Level,
1606 LPBYTE pData,
1607 DWORD cbBuf,
1608 LPDWORD pcbNeeded
1609 );
1610 extern(Windows) export BOOL AddJobW(
1611 HANDLE hPrinter,
1612 DWORD Level,
1613 LPBYTE pData,
1614 DWORD cbBuf,
1615 LPDWORD pcbNeeded
1616 );
1617 // #ifdef UNICODE
1618 // #...
1619 // #else
1620 alias AddJobA AddJob;
1621 // #endif // !UNICODE
1622
1623 extern(Windows) export BOOL ScheduleJob(
1624 HANDLE hPrinter,
1625 DWORD JobId
1626 );
1627
1628 extern(Windows) export BOOL PrinterProperties(
1629 HWND hWnd,
1630 HANDLE hPrinter
1631 );
1632
1633 extern(Windows) export LONG DocumentPropertiesA(
1634 HWND hWnd,
1635 HANDLE hPrinter,
1636 LPSTR pDeviceName,
1637 PDEVMODEA pDevModeOutput,
1638 PDEVMODEA pDevModeInput,
1639 DWORD fMode
1640 );
1641 extern(Windows) export LONG DocumentPropertiesW(
1642 HWND hWnd,
1643 HANDLE hPrinter,
1644 LPWSTR pDeviceName,
1645 PDEVMODEW pDevModeOutput,
1646 PDEVMODEW pDevModeInput,
1647 DWORD fMode
1648 );
1649 // #ifdef UNICODE
1650 // #...
1651 // #else
1652 alias DocumentPropertiesA DocumentProperties;
1653 // #endif // !UNICODE
1654
1655 extern(Windows) export LONG AdvancedDocumentPropertiesA(
1656 HWND hWnd,
1657 HANDLE hPrinter,
1658 LPSTR pDeviceName,
1659 PDEVMODEA pDevModeOutput,
1660 PDEVMODEA pDevModeInput
1661 );
1662 extern(Windows) export LONG AdvancedDocumentPropertiesW(
1663 HWND hWnd,
1664 HANDLE hPrinter,
1665 LPWSTR pDeviceName,
1666 PDEVMODEW pDevModeOutput,
1667 PDEVMODEW pDevModeInput
1668 );
1669 // #ifdef UNICODE
1670 // #...
1671 // #else
1672 alias AdvancedDocumentPropertiesA AdvancedDocumentProperties;
1673 // #endif // !UNICODE
1674
1675 extern(Windows) export DWORD GetPrinterDataA(
1676 HANDLE hPrinter,
1677 LPSTR pValueName,
1678 LPDWORD pType,
1679 LPBYTE pData,
1680 DWORD nSize,
1681 LPDWORD pcbNeeded
1682 );
1683 extern(Windows) export DWORD GetPrinterDataW(
1684 HANDLE hPrinter,
1685 LPWSTR pValueName,
1686 LPDWORD pType,
1687 LPBYTE pData,
1688 DWORD nSize,
1689 LPDWORD pcbNeeded
1690 );
1691 // #ifdef UNICODE
1692 // #...
1693 // #else
1694 alias GetPrinterDataA GetPrinterData;
1695 // #endif // !UNICODE
1696
1697 extern(Windows) export DWORD GetPrinterDataExA(
1698 HANDLE hPrinter,
1699 LPCSTR pKeyName,
1700 LPCSTR pValueName,
1701 LPDWORD pType,
1702 LPBYTE pData,
1703 DWORD nSize,
1704 LPDWORD pcbNeeded
1705 );
1706 extern(Windows) export DWORD GetPrinterDataExW(
1707 HANDLE hPrinter,
1708 LPCWSTR pKeyName,
1709 LPCWSTR pValueName,
1710 LPDWORD pType,
1711 LPBYTE pData,
1712 DWORD nSize,
1713 LPDWORD pcbNeeded
1714 );
1715 // #ifdef UNICODE
1716 // #...
1717 // #else
1718 alias GetPrinterDataExA GetPrinterDataEx;
1719 // #endif // !UNICODE
1720
1721 extern(Windows) export DWORD EnumPrinterDataA(
1722 HANDLE hPrinter,
1723 DWORD dwIndex,
1724 LPSTR pValueName,
1725 DWORD cbValueName,
1726 LPDWORD pcbValueName,
1727 LPDWORD pType,
1728 LPBYTE pData,
1729 DWORD cbData,
1730 LPDWORD pcbData
1731 );
1732 extern(Windows) export DWORD EnumPrinterDataW(
1733 HANDLE hPrinter,
1734 DWORD dwIndex,
1735 LPWSTR pValueName,
1736 DWORD cbValueName,
1737 LPDWORD pcbValueName,
1738 LPDWORD pType,
1739 LPBYTE pData,
1740 DWORD cbData,
1741 LPDWORD pcbData
1742 );
1743 // #ifdef UNICODE
1744 // #...
1745 // #else
1746 alias EnumPrinterDataA EnumPrinterData;
1747 // #endif // !UNICODE
1748
1749 extern(Windows) export DWORD EnumPrinterDataExA(
1750 HANDLE hPrinter,
1751 LPCSTR pKeyName,
1752 LPBYTE pEnumValues,
1753 DWORD cbEnumValues,
1754 LPDWORD pcbEnumValues,
1755 LPDWORD pnEnumValues
1756 );
1757 extern(Windows) export DWORD EnumPrinterDataExW(
1758 HANDLE hPrinter,
1759 LPCWSTR pKeyName,
1760 LPBYTE pEnumValues,
1761 DWORD cbEnumValues,
1762 LPDWORD pcbEnumValues,
1763 LPDWORD pnEnumValues
1764 );
1765 // #ifdef UNICODE
1766 // #...
1767 // #else
1768 alias EnumPrinterDataExA EnumPrinterDataEx;
1769 // #endif // !UNICODE
1770
1771 extern(Windows) export DWORD EnumPrinterKeyA(
1772 HANDLE hPrinter,
1773 LPCSTR pKeyName,
1774 LPSTR pSubkey,
1775 DWORD cbSubkey,
1776 LPDWORD pcbSubkey
1777 );
1778 extern(Windows) export DWORD EnumPrinterKeyW(
1779 HANDLE hPrinter,
1780 LPCWSTR pKeyName,
1781 LPWSTR pSubkey,
1782 DWORD cbSubkey,
1783 LPDWORD pcbSubkey
1784 );
1785 // #ifdef UNICODE
1786 // #...
1787 // #else
1788 alias EnumPrinterKeyA EnumPrinterKey;
1789 // #endif // !UNICODE
1790
1791 extern(Windows) export DWORD SetPrinterDataA(
1792 HANDLE hPrinter,
1793 LPSTR pValueName,
1794 DWORD Type,
1795 LPBYTE pData,
1796 DWORD cbData
1797 );
1798 extern(Windows) export DWORD SetPrinterDataW(
1799 HANDLE hPrinter,
1800 LPWSTR pValueName,
1801 DWORD Type,
1802 LPBYTE pData,
1803 DWORD cbData
1804 );
1805 // #ifdef UNICODE
1806 // #...
1807 // #else
1808 alias SetPrinterDataA SetPrinterData;
1809 // #endif // !UNICODE
1810
1811 extern(Windows) export DWORD SetPrinterDataExA(
1812 HANDLE hPrinter,
1813 LPCSTR pKeyName,
1814 LPCSTR pValueName,
1815 DWORD Type,
1816 LPBYTE pData,
1817 DWORD cbData
1818 );
1819 extern(Windows) export DWORD SetPrinterDataExW(
1820 HANDLE hPrinter,
1821 LPCWSTR pKeyName,
1822 LPCWSTR pValueName,
1823 DWORD Type,
1824 LPBYTE pData,
1825 DWORD cbData
1826 );
1827 // #ifdef UNICODE
1828 // #...
1829 // #else
1830 alias SetPrinterDataExA SetPrinterDataEx;
1831 // #endif // !UNICODE
1832
1833 extern(Windows) export DWORD DeletePrinterDataA(
1834 HANDLE hPrinter,
1835 LPSTR pValueName
1836 );
1837 extern(Windows) export DWORD DeletePrinterDataW(
1838 HANDLE hPrinter,
1839 LPWSTR pValueName
1840 );
1841 // #ifdef UNICODE
1842 // #...
1843 // #else
1844 alias DeletePrinterDataA DeletePrinterData;
1845 // #endif // !UNICODE
1846
1847 extern(Windows) export DWORD DeletePrinterDataExA(
1848 HANDLE hPrinter,
1849 LPCSTR pKeyName,
1850 LPCSTR pValueName
1851 );
1852 extern(Windows) export DWORD DeletePrinterDataExW(
1853 HANDLE hPrinter,
1854 LPCWSTR pKeyName,
1855 LPCWSTR pValueName
1856 );
1857 // #ifdef UNICODE
1858 // #...
1859 // #else
1860 alias DeletePrinterDataExA DeletePrinterDataEx;
1861 // #endif // !UNICODE
1862
1863 extern(Windows) export DWORD DeletePrinterKeyA(
1864 HANDLE hPrinter,
1865 LPCSTR pKeyName
1866 );
1867 extern(Windows) export DWORD DeletePrinterKeyW(
1868 HANDLE hPrinter,
1869 LPCWSTR pKeyName
1870 );
1871 // #ifdef UNICODE
1872 // #...
1873 // #else
1874 alias DeletePrinterKeyA DeletePrinterKey;
1875 // #endif // !UNICODE
1876
1877 enum : uint { PRINTER_NOTIFY_TYPE = 0x00 }
1878 enum : uint { JOB_NOTIFY_TYPE = 0x01 }
1879
1880 enum : uint { PRINTER_NOTIFY_FIELD_SERVER_NAME = 0x00 }
1881 enum : uint { PRINTER_NOTIFY_FIELD_PRINTER_NAME = 0x01 }
1882 enum : uint { PRINTER_NOTIFY_FIELD_SHARE_NAME = 0x02 }
1883 enum : uint { PRINTER_NOTIFY_FIELD_PORT_NAME = 0x03 }
1884 enum : uint { PRINTER_NOTIFY_FIELD_DRIVER_NAME = 0x04 }
1885 enum : uint { PRINTER_NOTIFY_FIELD_COMMENT = 0x05 }
1886 enum : uint { PRINTER_NOTIFY_FIELD_LOCATION = 0x06 }
1887 enum : uint { PRINTER_NOTIFY_FIELD_DEVMODE = 0x07 }
1888 enum : uint { PRINTER_NOTIFY_FIELD_SEPFILE = 0x08 }
1889 enum : uint { PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR = 0x09 }
1890 enum : uint { PRINTER_NOTIFY_FIELD_PARAMETERS = 0x0A }
1891 enum : uint { PRINTER_NOTIFY_FIELD_DATATYPE = 0x0B }
1892 enum : uint { PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0C }
1893 enum : uint { PRINTER_NOTIFY_FIELD_ATTRIBUTES = 0x0D }
1894 enum : uint { PRINTER_NOTIFY_FIELD_PRIORITY = 0x0E }
1895 enum : uint { PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY = 0x0F }
1896 enum : uint { PRINTER_NOTIFY_FIELD_START_TIME = 0x10 }
1897 enum : uint { PRINTER_NOTIFY_FIELD_UNTIL_TIME = 0x11 }
1898 enum : uint { PRINTER_NOTIFY_FIELD_STATUS = 0x12 }
1899 enum : uint { PRINTER_NOTIFY_FIELD_STATUS_STRING = 0x13 }
1900 enum : uint { PRINTER_NOTIFY_FIELD_CJOBS = 0x14 }
1901 enum : uint { PRINTER_NOTIFY_FIELD_AVERAGE_PPM = 0x15 }
1902 enum : uint { PRINTER_NOTIFY_FIELD_TOTAL_PAGES = 0x16 }
1903 enum : uint { PRINTER_NOTIFY_FIELD_PAGES_PRINTED = 0x17 }
1904 enum : uint { PRINTER_NOTIFY_FIELD_TOTAL_BYTES = 0x18 }
1905 enum : uint { PRINTER_NOTIFY_FIELD_BYTES_PRINTED = 0x19 }
1906 enum : uint { PRINTER_NOTIFY_FIELD_OBJECT_GUID = 0x1A }
1907
1908 enum : uint { JOB_NOTIFY_FIELD_PRINTER_NAME = 0x00 }
1909 enum : uint { JOB_NOTIFY_FIELD_MACHINE_NAME = 0x01 }
1910 enum : uint { JOB_NOTIFY_FIELD_PORT_NAME = 0x02 }
1911 enum : uint { JOB_NOTIFY_FIELD_USER_NAME = 0x03 }
1912 enum : uint { JOB_NOTIFY_FIELD_NOTIFY_NAME = 0x04 }
1913 enum : uint { JOB_NOTIFY_FIELD_DATATYPE = 0x05 }
1914 enum : uint { JOB_NOTIFY_FIELD_PRINT_PROCESSOR = 0x06 }
1915 enum : uint { JOB_NOTIFY_FIELD_PARAMETERS = 0x07 }
1916 enum : uint { JOB_NOTIFY_FIELD_DRIVER_NAME = 0x08 }
1917 enum : uint { JOB_NOTIFY_FIELD_DEVMODE = 0x09 }
1918 enum : uint { JOB_NOTIFY_FIELD_STATUS = 0x0A }
1919 enum : uint { JOB_NOTIFY_FIELD_STATUS_STRING = 0x0B }
1920 enum : uint { JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0C }
1921 enum : uint { JOB_NOTIFY_FIELD_DOCUMENT = 0x0D }
1922 enum : uint { JOB_NOTIFY_FIELD_PRIORITY = 0x0E }
1923 enum : uint { JOB_NOTIFY_FIELD_POSITION = 0x0F }
1924 enum : uint { JOB_NOTIFY_FIELD_SUBMITTED = 0x10 }
1925 enum : uint { JOB_NOTIFY_FIELD_START_TIME = 0x11 }
1926 enum : uint { JOB_NOTIFY_FIELD_UNTIL_TIME = 0x12 }
1927 enum : uint { JOB_NOTIFY_FIELD_TIME = 0x13 }
1928 enum : uint { JOB_NOTIFY_FIELD_TOTAL_PAGES = 0x14 }
1929 enum : uint { JOB_NOTIFY_FIELD_PAGES_PRINTED = 0x15 }
1930 enum : uint { JOB_NOTIFY_FIELD_TOTAL_BYTES = 0x16 }
1931 enum : uint { JOB_NOTIFY_FIELD_BYTES_PRINTED = 0x17 }
1932
1933 struct _PRINTER_NOTIFY_OPTIONS_TYPE {
1934 WORD Type;
1935 WORD Reserved0;
1936 DWORD Reserved1;
1937 DWORD Reserved2;
1938 DWORD Count;
1939 PWORD pFields;
1940 }
1941 alias _PRINTER_NOTIFY_OPTIONS_TYPE PRINTER_NOTIFY_OPTIONS_TYPE;
1942 alias _PRINTER_NOTIFY_OPTIONS_TYPE* PPRINTER_NOTIFY_OPTIONS_TYPE;
1943 alias _PRINTER_NOTIFY_OPTIONS_TYPE* LPPRINTER_NOTIFY_OPTIONS_TYPE;
1944
1945 enum : uint { PRINTER_NOTIFY_OPTIONS_REFRESH = 0x01 }
1946
1947 struct _PRINTER_NOTIFY_OPTIONS {
1948 DWORD Version;
1949 DWORD Flags;
1950 DWORD Count;
1951 PPRINTER_NOTIFY_OPTIONS_TYPE pTypes;
1952 }
1953 alias _PRINTER_NOTIFY_OPTIONS PRINTER_NOTIFY_OPTIONS;
1954 alias _PRINTER_NOTIFY_OPTIONS* PPRINTER_NOTIFY_OPTIONS;
1955 alias _PRINTER_NOTIFY_OPTIONS* LPPRINTER_NOTIFY_OPTIONS;
1956
1957 enum : uint { PRINTER_NOTIFY_INFO_DISCARDED = 0x01 }
1958
1959 struct _PRINTER_NOTIFY_INFO_DATA {
1960 WORD Type;
1961 WORD Field;
1962 DWORD Reserved;
1963 DWORD Id;
1964 union {
1965 DWORD adwData[2];
1966 struct {
1967 DWORD cbBuf;
1968 LPVOID pBuf;
1969 }
1970
1971 }
1972
1973 }
1974 alias _PRINTER_NOTIFY_INFO_DATA PRINTER_NOTIFY_INFO_DATA;
1975 alias _PRINTER_NOTIFY_INFO_DATA* PPRINTER_NOTIFY_INFO_DATA;
1976 alias _PRINTER_NOTIFY_INFO_DATA* LPPRINTER_NOTIFY_INFO_DATA;
1977
1978 struct _PRINTER_NOTIFY_INFO {
1979 DWORD Version;
1980 DWORD Flags;
1981 DWORD Count;
1982 PRINTER_NOTIFY_INFO_DATA aData[1];
1983 }
1984 alias _PRINTER_NOTIFY_INFO PRINTER_NOTIFY_INFO;
1985 alias _PRINTER_NOTIFY_INFO* PPRINTER_NOTIFY_INFO;
1986 alias _PRINTER_NOTIFY_INFO* LPPRINTER_NOTIFY_INFO;
1987
1988 struct _BINARY_CONTAINER {
1989 DWORD cbBuf;
1990 LPBYTE pData;
1991 }
1992 alias _BINARY_CONTAINER BINARY_CONTAINER;
1993 alias _BINARY_CONTAINER* PBINARY_CONTAINER;
1994
1995 struct _BIDI_DATA {
1996 DWORD dwBidiType;
1997 union {
1998 BOOL bData;
1999 LONG iData;
2000 LPWSTR sData;
2001 FLOAT fData;
2002 BINARY_CONTAINER biData;
2003 }
2004
2005 }
2006 alias _BIDI_DATA BIDI_DATA;
2007 alias _BIDI_DATA* PBIDI_DATA;
2008 alias _BIDI_DATA* LPBIDI_DATA;
2009
2010 struct _BIDI_REQUEST_DATA {
2011 DWORD dwReqNumber;
2012 LPWSTR pSchema;
2013 BIDI_DATA data;
2014 }
2015 alias _BIDI_REQUEST_DATA BIDI_REQUEST_DATA;
2016 alias _BIDI_REQUEST_DATA* PBIDI_REQUEST_DATA;
2017 alias _BIDI_REQUEST_DATA* LPBIDI_REQUEST_DATA;
2018
2019 struct _BIDI_REQUEST_CONTAINER {
2020 DWORD Version;
2021 DWORD Flags;
2022 DWORD Count;
2023 BIDI_REQUEST_DATA aData[ 1 ];
2024 }
2025 alias _BIDI_REQUEST_CONTAINER BIDI_REQUEST_CONTAINER;
2026 alias _BIDI_REQUEST_CONTAINER* PBIDI_REQUEST_CONTAINER;
2027 alias _BIDI_REQUEST_CONTAINER* LPBIDI_REQUEST_CONTAINER;
2028
2029 struct _BIDI_RESPONSE_DATA {
2030 DWORD dwResult;
2031 DWORD dwReqNumber;
2032 LPWSTR pSchema;
2033 BIDI_DATA data;
2034 }
2035 alias _BIDI_RESPONSE_DATA BIDI_RESPONSE_DATA;
2036 alias _BIDI_RESPONSE_DATA* PBIDI_RESPONSE_DATA;
2037 alias _BIDI_RESPONSE_DATA* LPBIDI_RESPONSE_DATA;
2038
2039 struct _BIDI_RESPONSE_CONTAINER {
2040 DWORD Version;
2041 DWORD Flags;
2042 DWORD Count;
2043 BIDI_RESPONSE_DATA aData[ 1 ];
2044 }
2045 alias _BIDI_RESPONSE_CONTAINER BIDI_RESPONSE_CONTAINER;
2046 alias _BIDI_RESPONSE_CONTAINER* PBIDI_RESPONSE_CONTAINER;
2047 alias _BIDI_RESPONSE_CONTAINER* LPBIDI_RESPONSE_CONTAINER;
2048
2049 const wchar[] BIDI_ACTION_ENUM_SCHEMA = "EnumSchema";
2050 const wchar[] BIDI_ACTION_GET = "Get";
2051 const wchar[] BIDI_ACTION_SET = "Set";
2052 const wchar[] BIDI_ACTION_GET_ALL = "GetAll";
2053
2054 enum _0 {
2055 BIDI_NULL = 0,
2056 BIDI_INT = 1,
2057 BIDI_FLOAT = 2,
2058 BIDI_BOOL = 3,
2059 BIDI_STRING = 4,
2060 BIDI_TEXT = 5,
2061 BIDI_ENUM = 6,
2062 BIDI_BLOB = 7,
2063 }
2064 alias _0 BIDI_TYPE;
2065
2066 enum : uint { BIDI_ACCESS_ADMINISTRATOR = 0x1 }
2067 enum : uint { BIDI_ACCESS_USER = 0x2 }
2068
2069 enum : uint { ERROR_BIDI_STATUS_OK = 0 }
2070 alias ERROR_NOT_SUPPORTED ERROR_BIDI_NOT_SUPPORTED;
2071
2072 enum : uint { ERROR_BIDI_ERROR_BASE = 13000 }
2073 enum : uint { ERROR_BIDI_STATUS_WARNING = ERROR_BIDI_ERROR_BASE + 1 }
2074 enum : uint { ERROR_BIDI_SCHEMA_READ_ONLY = ERROR_BIDI_ERROR_BASE + 2 }
2075 enum : uint { ERROR_BIDI_SERVER_OFFLINE = ERROR_BIDI_ERROR_BASE + 3 }
2076 enum : uint { ERROR_BIDI_DEVICE_OFFLINE = ERROR_BIDI_ERROR_BASE + 4 }
2077 enum : uint { ERROR_BIDI_SCHEMA_NOT_SUPPORTED = ERROR_BIDI_ERROR_BASE + 5 }
2078
2079 extern(Windows) export DWORD WaitForPrinterChange(
2080 HANDLE hPrinter,
2081 DWORD Flags
2082 );
2083
2084 extern(Windows) export HANDLE FindFirstPrinterChangeNotification(
2085 HANDLE hPrinter,
2086 DWORD fdwFlags,
2087 DWORD fdwOptions,
2088 LPVOID pPrinterNotifyOptions
2089 );
2090
2091 extern(Windows) export BOOL FindNextPrinterChangeNotification(
2092 HANDLE hChange,
2093 PDWORD pdwChange,
2094 LPVOID pvReserved,
2095 LPVOID *ppPrinterNotifyInfo
2096 );
2097
2098 extern(Windows) export BOOL FreePrinterNotifyInfo(
2099 PPRINTER_NOTIFY_INFO pPrinterNotifyInfo
2100 );
2101
2102 extern(Windows) export BOOL FindClosePrinterChangeNotification(
2103 HANDLE hChange
2104 );
2105
2106 enum : uint { PRINTER_CHANGE_ADD_PRINTER = 0x00000001 }
2107 enum : uint { PRINTER_CHANGE_SET_PRINTER = 0x00000002 }
2108 enum : uint { PRINTER_CHANGE_DELETE_PRINTER = 0x00000004 }
2109 enum : uint { PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008 }
2110 enum : uint { PRINTER_CHANGE_PRINTER = 0x000000FF }
2111 enum : uint { PRINTER_CHANGE_ADD_JOB = 0x00000100 }
2112 enum : uint { PRINTER_CHANGE_SET_JOB = 0x00000200 }
2113 enum : uint { PRINTER_CHANGE_DELETE_JOB = 0x00000400 }
2114 enum : uint { PRINTER_CHANGE_WRITE_JOB = 0x00000800 }
2115 enum : uint { PRINTER_CHANGE_JOB = 0x0000FF00 }
2116 enum : uint { PRINTER_CHANGE_ADD_FORM = 0x00010000 }
2117 enum : uint { PRINTER_CHANGE_SET_FORM = 0x00020000 }
2118 enum : uint { PRINTER_CHANGE_DELETE_FORM = 0x00040000 }
2119 enum : uint { PRINTER_CHANGE_FORM = 0x00070000 }
2120 enum : uint { PRINTER_CHANGE_ADD_PORT = 0x00100000 }
2121 enum : uint { PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000 }
2122 enum : uint { PRINTER_CHANGE_DELETE_PORT = 0x00400000 }
2123 enum : uint { PRINTER_CHANGE_PORT = 0x00700000 }
2124 enum : uint { PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000 }
2125 enum : uint { PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000 }
2126 enum : uint { PRINTER_CHANGE_PRINT_PROCESSOR = 0x07000000 }
2127 enum : uint { PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000 }
2128 enum : uint { PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000 }
2129 enum : uint { PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000 }
2130 enum : uint { PRINTER_CHANGE_PRINTER_DRIVER = 0x70000000 }
2131 enum : uint { PRINTER_CHANGE_TIMEOUT = 0x80000000 }
2132 enum : uint { PRINTER_CHANGE_ALL = 0x7777FFFF }
2133
2134 extern(Windows) export DWORD PrinterMessageBoxA(
2135 HANDLE hPrinter,
2136 DWORD Error,
2137 HWND hWnd,
2138 LPSTR pText,
2139 LPSTR pCaption,
2140 DWORD dwType
2141 );
2142 extern(Windows) export DWORD PrinterMessageBoxW(
2143 HANDLE hPrinter,
2144 DWORD Error,
2145 HWND hWnd,
2146 LPWSTR pText,
2147 LPWSTR pCaption,
2148 DWORD dwType
2149 );
2150 // #ifdef UNICODE
2151 // #...
2152 // #else
2153 alias PrinterMessageBoxA PrinterMessageBox;
2154 // #endif // !UNICODE
2155
2156 enum : uint { PRINTER_ERROR_INFORMATION = 0x80000000 }
2157 enum : uint { PRINTER_ERROR_WARNING = 0x40000000 }
2158 enum : uint { PRINTER_ERROR_SEVERE = 0x20000000 }
2159
2160 enum : uint { PRINTER_ERROR_OUTOFPAPER = 0x00000001 }
2161 enum : uint { PRINTER_ERROR_JAM = 0x00000002 }
2162 enum : uint { PRINTER_ERROR_OUTOFTONER = 0x00000004 }
2163
2164 extern(Windows) export BOOL ClosePrinter(
2165 HANDLE hPrinter
2166 );
2167
2168 extern(Windows) export BOOL AddFormA(
2169 HANDLE hPrinter,
2170 DWORD Level,
2171 LPBYTE pForm
2172 );
2173 extern(Windows) export BOOL AddFormW(
2174 HANDLE hPrinter,
2175 DWORD Level,
2176 LPBYTE pForm
2177 );
2178 // #ifdef UNICODE
2179 // #...
2180 // #else
2181 alias AddFormA AddForm;
2182 // #endif // !UNICODE
2183
2184 extern(Windows) export BOOL DeleteFormA(
2185 HANDLE hPrinter,
2186 LPSTR pFormName
2187 );
2188 extern(Windows) export BOOL DeleteFormW(
2189 HANDLE hPrinter,
2190 LPWSTR pFormName
2191 );
2192 // #ifdef UNICODE
2193 // #...
2194 // #else
2195 alias DeleteFormA DeleteForm;
2196 // #endif // !UNICODE
2197
2198 extern(Windows) export BOOL GetFormA(
2199 HANDLE hPrinter,
2200 LPSTR pFormName,
2201 DWORD Level,
2202 LPBYTE pForm,
2203 DWORD cbBuf,
2204 LPDWORD pcbNeeded
2205 );
2206 extern(Windows) export BOOL GetFormW(
2207 HANDLE hPrinter,
2208 LPWSTR pFormName,
2209 DWORD Level,
2210 LPBYTE pForm,
2211 DWORD cbBuf,
2212 LPDWORD pcbNeeded
2213 );
2214 // #ifdef UNICODE
2215 // #...
2216 // #else
2217 alias GetFormA GetForm;
2218 // #endif // !UNICODE
2219
2220 extern(Windows) export BOOL SetFormA(
2221 HANDLE hPrinter,
2222 LPSTR pFormName,
2223 DWORD Level,
2224 LPBYTE pForm
2225 );
2226 extern(Windows) export BOOL SetFormW(
2227 HANDLE hPrinter,
2228 LPWSTR pFormName,
2229 DWORD Level,
2230 LPBYTE pForm
2231 );
2232 // #ifdef UNICODE
2233 // #...
2234 // #else
2235 alias SetFormA SetForm;
2236 // #endif // !UNICODE
2237
2238 extern(Windows) export BOOL EnumFormsA(
2239 HANDLE hPrinter,
2240 DWORD Level,
2241 LPBYTE pForm,
2242 DWORD cbBuf,
2243 LPDWORD pcbNeeded,
2244 LPDWORD pcReturned
2245 );
2246 extern(Windows) export BOOL EnumFormsW(
2247 HANDLE hPrinter,
2248 DWORD Level,
2249 LPBYTE pForm,
2250 DWORD cbBuf,
2251 LPDWORD pcbNeeded,
2252 LPDWORD pcReturned
2253 );
2254 // #ifdef UNICODE
2255 // #...
2256 // #else
2257 alias EnumFormsA EnumForms;
2258 // #endif // !UNICODE
2259
2260 extern(Windows) export BOOL EnumMonitorsA(
2261 LPSTR pName,
2262 DWORD Level,
2263 LPBYTE pMonitors,
2264 DWORD cbBuf,
2265 LPDWORD pcbNeeded,
2266 LPDWORD pcReturned
2267 );
2268 extern(Windows) export BOOL EnumMonitorsW(
2269 LPWSTR pName,
2270 DWORD Level,
2271 LPBYTE pMonitors,
2272 DWORD cbBuf,
2273 LPDWORD pcbNeeded,
2274 LPDWORD pcReturned
2275 );
2276 // #ifdef UNICODE
2277 // #...
2278 // #else
2279 alias EnumMonitorsA EnumMonitors;
2280 // #endif // !UNICODE
2281
2282 extern(Windows) export BOOL AddMonitorA(
2283 LPSTR pName,
2284 DWORD Level,
2285 LPBYTE pMonitors
2286 );
2287 extern(Windows) export BOOL AddMonitorW(
2288 LPWSTR pName,
2289 DWORD Level,
2290 LPBYTE pMonitors
2291 );
2292 // #ifdef UNICODE
2293 // #...
2294 // #else
2295 alias AddMonitorA AddMonitor;
2296 // #endif // !UNICODE
2297
2298 extern(Windows) export BOOL DeleteMonitorA(
2299 LPSTR pName,
2300 LPSTR pEnvironment,
2301 LPSTR pMonitorName
2302 );
2303 extern(Windows) export BOOL DeleteMonitorW(
2304 LPWSTR pName,
2305 LPWSTR pEnvironment,
2306 LPWSTR pMonitorName
2307 );
2308 // #ifdef UNICODE
2309 // #...
2310 // #else
2311 alias DeleteMonitorA DeleteMonitor;
2312 // #endif // !UNICODE
2313
2314 extern(Windows) export BOOL EnumPortsA(
2315 LPSTR pName,
2316 DWORD Level,
2317 LPBYTE pPorts,
2318 DWORD cbBuf,
2319 LPDWORD pcbNeeded,
2320 LPDWORD pcReturned
2321 );
2322 extern(Windows) export BOOL EnumPortsW(
2323 LPWSTR pName,
2324 DWORD Level,
2325 LPBYTE pPorts,
2326 DWORD cbBuf,
2327 LPDWORD pcbNeeded,
2328 LPDWORD pcReturned
2329 );
2330 // #ifdef UNICODE
2331 // #...
2332 // #else
2333 alias EnumPortsA EnumPorts;
2334 // #endif // !UNICODE
2335
2336 extern(Windows) export BOOL AddPortA(
2337 LPSTR pName,
2338 HWND hWnd,
2339 LPSTR pMonitorName
2340 );
2341 extern(Windows) export BOOL AddPortW(
2342 LPWSTR pName,
2343 HWND hWnd,
2344 LPWSTR pMonitorName
2345 );
2346 // #ifdef UNICODE
2347 // #...
2348 // #else
2349 alias AddPortA AddPort;
2350 // #endif // !UNICODE
2351
2352 extern(Windows) export BOOL ConfigurePortA(
2353 LPSTR pName,
2354 HWND hWnd,
2355 LPSTR pPortName
2356 );
2357 extern(Windows) export BOOL ConfigurePortW(
2358 LPWSTR pName,
2359 HWND hWnd,
2360 LPWSTR pPortName
2361 );
2362 // #ifdef UNICODE
2363 // #...
2364 // #else
2365 alias ConfigurePortA ConfigurePort;
2366 // #endif // !UNICODE
2367
2368 extern(Windows) export BOOL DeletePortA(
2369 LPSTR pName,
2370 HWND hWnd,
2371 LPSTR pPortName
2372 );
2373 extern(Windows) export BOOL DeletePortW(
2374 LPWSTR pName,
2375 HWND hWnd,
2376 LPWSTR pPortName
2377 );
2378 // #ifdef UNICODE
2379 // #...
2380 // #else
2381 alias DeletePortA DeletePort;
2382 // #endif // !UNICODE
2383
2384 extern(Windows) export BOOL XcvDataW(
2385 HANDLE hXcv,
2386 PCWSTR pszDataName,
2387 PBYTE pInputData,
2388 DWORD cbInputData,
2389 PBYTE pOutputData,
2390 DWORD cbOutputData,
2391 PDWORD pcbOutputNeeded,
2392 PDWORD pdwStatus
2393 );
2394 alias XcvDataW XcvData;
2395
2396 extern(Windows) export BOOL GetDefaultPrinterA(
2397 LPSTR pszBuffer,
2398 LPDWORD pcchBuffer);
2399 extern(Windows) export BOOL GetDefaultPrinterW(
2400 LPWSTR pszBuffer,
2401 LPDWORD pcchBuffer);
2402 // #ifdef UNICODE
2403 // #...
2404 // #else
2405 alias GetDefaultPrinterA GetDefaultPrinter;
2406 // #endif // !UNICODE
2407
2408 extern(Windows) export BOOL SetDefaultPrinterA(
2409 LPCSTR pszPrinter);
2410 extern(Windows) export BOOL SetDefaultPrinterW(
2411 LPCWSTR pszPrinter);
2412 // #ifdef UNICODE
2413 // #...
2414 // #else
2415 alias SetDefaultPrinterA SetDefaultPrinter;
2416 // #endif // !UNICODE
2417
2418 extern(Windows) export BOOL SetPortA(
2419 LPSTR pName,
2420 LPSTR pPortName,
2421 DWORD dwLevel,
2422 LPBYTE pPortInfo
2423 );
2424 extern(Windows) export BOOL SetPortW(
2425 LPWSTR pName,
2426 LPWSTR pPortName,
2427 DWORD dwLevel,
2428 LPBYTE pPortInfo
2429 );
2430 // #ifdef UNICODE
2431 // #...
2432 // #else
2433 alias SetPortA SetPort;
2434 // #endif // !UNICODE
2435
2436 extern(Windows) export BOOL AddPrinterConnectionA(
2437 LPSTR pName
2438 );
2439 extern(Windows) export BOOL AddPrinterConnectionW(
2440 LPWSTR pName
2441 );
2442 // #ifdef UNICODE
2443 // #...
2444 // #else
2445 alias AddPrinterConnectionA AddPrinterConnection;
2446 // #endif // !UNICODE
2447
2448 extern(Windows) export BOOL DeletePrinterConnectionA(
2449 LPSTR pName
2450 );
2451 extern(Windows) export BOOL DeletePrinterConnectionW(
2452 LPWSTR pName
2453 );
2454 // #ifdef UNICODE
2455 // #...
2456 // #else
2457 alias DeletePrinterConnectionA DeletePrinterConnection;
2458 // #endif // !UNICODE
2459
2460 extern(Windows) export HANDLE ConnectToPrinterDlg(
2461 HWND hwnd,
2462 DWORD Flags
2463 );
2464
2465 struct _PROVIDOR_INFO_1A {
2466 LPSTR pName;
2467 LPSTR pEnvironment;
2468 LPSTR pDLLName;
2469 }
2470 alias _PROVIDOR_INFO_1A PROVIDOR_INFO_1A;
2471 alias _PROVIDOR_INFO_1A* PPROVIDOR_INFO_1A;
2472 alias _PROVIDOR_INFO_1A* LPPROVIDOR_INFO_1A;
2473
2474 struct _PROVIDOR_INFO_1W {
2475 LPWSTR pName;
2476 LPWSTR pEnvironment;
2477 LPWSTR pDLLName;
2478 }
2479 alias _PROVIDOR_INFO_1W PROVIDOR_INFO_1W;
2480 alias _PROVIDOR_INFO_1W* PPROVIDOR_INFO_1W;
2481 alias _PROVIDOR_INFO_1W* LPPROVIDOR_INFO_1W;
2482
2483 // #ifdef UNICODE
2484 // ...
2485 // #else
2486 alias PROVIDOR_INFO_1A PROVIDOR_INFO_1;
2487 alias PPROVIDOR_INFO_1A PPROVIDOR_INFO_1;
2488 alias LPPROVIDOR_INFO_1A LPPROVIDOR_INFO_1;
2489 // #endif // UNICODE
2490
2491 struct _PROVIDOR_INFO_2A {
2492 LPSTR pOrder;
2493 }
2494 alias _PROVIDOR_INFO_2A PROVIDOR_INFO_2A;
2495 alias _PROVIDOR_INFO_2A* PPROVIDOR_INFO_2A;
2496 alias _PROVIDOR_INFO_2A* LPPROVIDOR_INFO_2A;
2497
2498 struct _PROVIDOR_INFO_2W {
2499 LPWSTR pOrder;
2500 }
2501 alias _PROVIDOR_INFO_2W PROVIDOR_INFO_2W;
2502 alias _PROVIDOR_INFO_2W* PPROVIDOR_INFO_2W;
2503 alias _PROVIDOR_INFO_2W* LPPROVIDOR_INFO_2W;
2504
2505 // #ifdef UNICODE
2506 // ...
2507 // #else
2508 alias PROVIDOR_INFO_2A PROVIDOR_INFO_2;
2509 alias PPROVIDOR_INFO_2A PPROVIDOR_INFO_2;
2510 alias LPPROVIDOR_INFO_2A LPPROVIDOR_INFO_2;
2511 // #endif // UNICODE
2512
2513 extern(Windows) export BOOL AddPrintProvidorA(
2514 LPSTR pName,
2515 DWORD level,
2516 LPBYTE pProvidorInfo
2517 );
2518 extern(Windows) export BOOL AddPrintProvidorW(
2519 LPWSTR pName,
2520 DWORD level,
2521 LPBYTE pProvidorInfo
2522 );
2523 // #ifdef UNICODE
2524 // #...
2525 // #else
2526 alias AddPrintProvidorA AddPrintProvidor;
2527 // #endif // !UNICODE
2528
2529 extern(Windows) export BOOL DeletePrintProvidorA(
2530 LPSTR pName,
2531 LPSTR pEnvironment,
2532 LPSTR pPrintProvidorName
2533 );
2534 extern(Windows) export BOOL DeletePrintProvidorW(
2535 LPWSTR pName,
2536 LPWSTR pEnvironment,
2537 LPWSTR pPrintProvidorName
2538 );
2539 // #ifdef UNICODE
2540 // #...
2541 // #else
2542 alias DeletePrintProvidorA DeletePrintProvidor;
2543 // #endif // !UNICODE
2544
2545 const TCHAR[] SPLREG_DEFAULT_SPOOL_DIRECTORY = "DefaultSpoolDirectory";
2546 const TCHAR[] SPLREG_PORT_THREAD_PRIORITY_DEFAULT = "PortThreadPriorityDefault";
2547 const TCHAR[] SPLREG_PORT_THREAD_PRIORITY = "PortThreadPriority";
2548 const TCHAR[] SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT = "SchedulerThreadPriorityDefault";
2549 const TCHAR[] SPLREG_SCHEDULER_THREAD_PRIORITY = "SchedulerThreadPriority";
2550 const TCHAR[] SPLREG_BEEP_ENABLED = "BeepEnabled";
2551 const TCHAR[] SPLREG_NET_POPUP = "NetPopup";
2552 const TCHAR[] SPLREG_RETRY_POPUP = "RetryPopup";
2553 const TCHAR[] SPLREG_NET_POPUP_TO_COMPUTER = "NetPopupToComputer";
2554 const TCHAR[] SPLREG_EVENT_LOG = "EventLog";
2555 const TCHAR[] SPLREG_MAJOR_VERSION = "MajorVersion";
2556 const TCHAR[] SPLREG_MINOR_VERSION = "MinorVersion";
2557 const TCHAR[] SPLREG_ARCHITECTURE = "Architecture";
2558 const TCHAR[] SPLREG_OS_VERSION = "OSVersion";
2559 const TCHAR[] SPLREG_OS_VERSIONEX = "OSVersionEx";
2560 const TCHAR[] SPLREG_DS_PRESENT = "DsPresent";
2561 const TCHAR[] SPLREG_DS_PRESENT_FOR_USER = "DsPresentForUser";
2562 const TCHAR[] SPLREG_REMOTE_FAX = "RemoteFax";
2563 const TCHAR[] SPLREG_RESTART_JOB_ON_POOL_ERROR = "RestartJobOnPoolError";
2564 const TCHAR[] SPLREG_RESTART_JOB_ON_POOL_ENABLED = "RestartJobOnPoolEnabled";
2565 const TCHAR[] SPLREG_DNS_MACHINE_NAME = "DNSMachineName";
2566
2567 enum : uint { SERVER_ACCESS_ADMINISTER = 0x00000001 }
2568 enum : uint { SERVER_ACCESS_ENUMERATE = 0x00000002 }
2569
2570 enum : uint { PRINTER_ACCESS_ADMINISTER = 0x00000004 }
2571 enum : uint { PRINTER_ACCESS_USE = 0x00000008 }
2572
2573 enum : uint { JOB_ACCESS_ADMINISTER = 0x00000010 }
2574
2575 enum : uint { SERVER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE }
2576
2577 enum : uint { SERVER_READ = STANDARD_RIGHTS_READ | SERVER_ACCESS_ENUMERATE }
2578
2579 enum : uint { SERVER_WRITE = STANDARD_RIGHTS_WRITE | SERVER_ACCESS_ADMINISTER | SERVER_ACCESS_ENUMERATE }
2580
2581 enum : uint { SERVER_EXECUTE = STANDARD_RIGHTS_EXECUTE | SERVER_ACCESS_ENUMERATE }
2582
2583 enum : uint { PRINTER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | PRINTER_ACCESS_ADMINISTER | PRINTER_ACCESS_USE }
2584
2585 enum : uint { PRINTER_READ = STANDARD_RIGHTS_READ | PRINTER_ACCESS_USE }
2586
2587 enum : uint { PRINTER_WRITE = STANDARD_RIGHTS_WRITE | PRINTER_ACCESS_USE }
2588
2589 enum : uint { PRINTER_EXECUTE = STANDARD_RIGHTS_EXECUTE | PRINTER_ACCESS_USE }
2590
2591 enum : uint { JOB_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | JOB_ACCESS_ADMINISTER }
2592
2593 enum : uint { JOB_READ = STANDARD_RIGHTS_READ | JOB_ACCESS_ADMINISTER }
2594
2595 enum : uint { JOB_WRITE = STANDARD_RIGHTS_WRITE | JOB_ACCESS_ADMINISTER }
2596
2597 enum : uint { JOB_EXECUTE = STANDARD_RIGHTS_EXECUTE | JOB_ACCESS_ADMINISTER }
2598
2599 const TCHAR[] SPLDS_SPOOLER_KEY = "DsSpooler";
2600 const TCHAR[] SPLDS_DRIVER_KEY = "DsDriver";
2601 const TCHAR[] SPLDS_USER_KEY = "DsUser";
2602
2603 const TCHAR[] SPLDS_ASSET_NUMBER = "assetNumber";
2604 const TCHAR[] SPLDS_BYTES_PER_MINUTE = "bytesPerMinute";
2605 const TCHAR[] SPLDS_DESCRIPTION = "description";
2606 const TCHAR[] SPLDS_DRIVER_NAME = "driverName";
2607 const TCHAR[] SPLDS_DRIVER_VERSION = "driverVersion";
2608 const TCHAR[] SPLDS_LOCATION = "location";
2609 const TCHAR[] SPLDS_PORT_NAME = "portName";
2610 const TCHAR[] SPLDS_PRINT_ATTRIBUTES = "printAttributes";
2611 const TCHAR[] SPLDS_PRINT_BIN_NAMES = "printBinNames";
2612 const TCHAR[] SPLDS_PRINT_COLLATE = "printCollate";
2613 const TCHAR[] SPLDS_PRINT_COLOR = "printColor";
2614 const TCHAR[] SPLDS_PRINT_DUPLEX_SUPPORTED = "printDuplexSupported";
2615 const TCHAR[] SPLDS_PRINT_END_TIME = "printEndTime";
2616 const TCHAR[] SPLDS_PRINTER_CLASS = "printQueue";
2617 const TCHAR[] SPLDS_PRINTER_NAME = "printerName";
2618 const TCHAR[] SPLDS_PRINT_KEEP_PRINTED_JOBS = "printKeepPrintedJobs";
2619 const TCHAR[] SPLDS_PRINT_LANGUAGE = "printLanguage";
2620 const TCHAR[] SPLDS_PRINT_MAC_ADDRESS = "printMACAddress";
2621 const TCHAR[] SPLDS_PRINT_MAX_X_EXTENT = "printMaxXExtent";
2622 const TCHAR[] SPLDS_PRINT_MAX_Y_EXTENT = "printMaxYExtent";
2623 const TCHAR[] SPLDS_PRINT_MAX_RESOLUTION_SUPPORTED = "printMaxResolutionSupported";
2624 const TCHAR[] SPLDS_PRINT_MEDIA_READY = "printMediaReady";
2625 const TCHAR[] SPLDS_PRINT_MEDIA_SUPPORTED = "printMediaSupported";
2626 const TCHAR[] SPLDS_PRINT_MEMORY = "printMemory";
2627 const TCHAR[] SPLDS_PRINT_MIN_X_EXTENT = "printMinXExtent";
2628 const TCHAR[] SPLDS_PRINT_MIN_Y_EXTENT = "printMinYExtent";
2629 const TCHAR[] SPLDS_PRINT_NETWORK_ADDRESS = "printNetworkAddress";
2630 const TCHAR[] SPLDS_PRINT_NOTIFY = "printNotify";
2631 const TCHAR[] SPLDS_PRINT_NUMBER_UP = "printNumberUp";
2632 const TCHAR[] SPLDS_PRINT_ORIENTATIONS_SUPPORTED = "printOrientationsSupported";
2633 const TCHAR[] SPLDS_PRINT_OWNER = "printOwner";
2634 const TCHAR[] SPLDS_PRINT_PAGES_PER_MINUTE = "printPagesPerMinute";
2635 const TCHAR[] SPLDS_PRINT_RATE = "printRate";
2636 const TCHAR[] SPLDS_PRINT_RATE_UNIT = "printRateUnit";
2637 const TCHAR[] SPLDS_PRINT_SEPARATOR_FILE = "printSeparatorFile";
2638 const TCHAR[] SPLDS_PRINT_SHARE_NAME = "printShareName";
2639 const TCHAR[] SPLDS_PRINT_SPOOLING = "printSpooling";
2640 const TCHAR[] SPLDS_PRINT_STAPLING_SUPPORTED = "printStaplingSupported";
2641 const TCHAR[] SPLDS_PRINT_START_TIME = "printStartTime";
2642 const TCHAR[] SPLDS_PRINT_STATUS = "printStatus";
2643 const TCHAR[] SPLDS_PRIORITY = "priority";
2644 const TCHAR[] SPLDS_SERVER_NAME = "serverName";
2645 const TCHAR[] SPLDS_SHORT_SERVER_NAME = "shortServerName";
2646 const TCHAR[] SPLDS_UNC_NAME = "uNCName";
2647 const TCHAR[] SPLDS_URL = "url";
2648 const TCHAR[] SPLDS_FLAGS = "flags";
2649 const TCHAR[] SPLDS_VERSION_NUMBER = "versionNumber";
2650
2651 const TCHAR[] SPLDS_PRINTER_NAME_ALIASES = "printerNameAliases";
2652 const TCHAR[] SPLDS_PRINTER_LOCATIONS = "printerLocations";
2653 const TCHAR[] SPLDS_PRINTER_MODEL = "printerModel";
2654
2655 // #ifdef __cplusplus
2656 // }
2657 // #endif
2658
2659 // #endif // _WINSPOOL_