1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Winspool header file
7 use shared::guiddef::GUID;
8 use shared::minwindef::{
9     BOOL, BYTE, DWORD, FILETIME, FLOAT, LPBYTE, LPDWORD, LPHANDLE, LPVOID, MAX_PATH, PBYTE, PDWORD,
10     PULONG, PWORD, UINT, ULONG, WORD,
11 };
12 use shared::windef::{HWND, RECTL, SIZEL};
13 use shared::winerror::ERROR_NOT_SUPPORTED;
14 use um::minwinbase::SYSTEMTIME;
15 use um::wingdi::{LPDEVMODEA, LPDEVMODEW, PDEVMODEA, PDEVMODEW};
16 use um::winnt::{
17     ACCESS_MASK, CHAR, DWORDLONG, HANDLE, HRESULT, LANGID, LONG, LONGLONG, LPCSTR, LPCWSTR, LPSTR,
18     LPWSTR, PCWSTR, PSECURITY_DESCRIPTOR, PVOID, PWSTR, STANDARD_RIGHTS_EXECUTE,
19     STANDARD_RIGHTS_READ, STANDARD_RIGHTS_REQUIRED, STANDARD_RIGHTS_WRITE, WCHAR,
20 };
21 use vc::vcruntime::size_t;
22 STRUCT!{struct PRINTER_INFO_1A {
23     Flags: DWORD,
24     pDescription: LPSTR,
25     pName: LPSTR,
26     pComment: LPSTR,
27 }}
28 pub type PPRINTER_INFO_1A = *mut PRINTER_INFO_1A;
29 pub type LPPRINTER_INFO_1A = *mut PRINTER_INFO_1A;
30 STRUCT!{struct PRINTER_INFO_1W {
31     Flags: DWORD,
32     pDescription: LPWSTR,
33     pName: LPWSTR,
34     pComment: LPWSTR,
35 }}
36 pub type PPRINTER_INFO_1W = *mut PRINTER_INFO_1W;
37 pub type LPPRINTER_INFO_1W = *mut PRINTER_INFO_1W;
38 STRUCT!{struct PRINTER_INFO_2A {
39     pServerName: LPSTR,
40     pPrinterName: LPSTR,
41     pShareName: LPSTR,
42     pPortName: LPSTR,
43     pDriverName: LPSTR,
44     pComment: LPSTR,
45     pLocation: LPSTR,
46     pDevMode: LPDEVMODEA,
47     pSepFile: LPSTR,
48     pPrintProcessor: LPSTR,
49     pDatatype: LPSTR,
50     pParameters: LPSTR,
51     pSecurityDescriptor: PSECURITY_DESCRIPTOR,
52     Attributes: DWORD,
53     Priority: DWORD,
54     DefaultPriority: DWORD,
55     StartTime: DWORD,
56     UntilTime: DWORD,
57     Status: DWORD,
58     cJobs: DWORD,
59     AveragePPM: DWORD,
60 }}
61 pub type PPRINTER_INFO_2A = *mut PRINTER_INFO_2A;
62 pub type LPPRINTER_INFO_2A = *mut PRINTER_INFO_2A;
63 STRUCT!{struct PRINTER_INFO_2W {
64     pServerName: LPWSTR,
65     pPrinterName: LPWSTR,
66     pShareName: LPWSTR,
67     pPortName: LPWSTR,
68     pDriverName: LPWSTR,
69     pComment: LPWSTR,
70     pLocation: LPWSTR,
71     pDevMode: LPDEVMODEW,
72     pSepFile: LPWSTR,
73     pPrintProcessor: LPWSTR,
74     pDatatype: LPWSTR,
75     pParameters: LPWSTR,
76     pSecurityDescriptor: PSECURITY_DESCRIPTOR,
77     Attributes: DWORD,
78     Priority: DWORD,
79     DefaultPriority: DWORD,
80     StartTime: DWORD,
81     UntilTime: DWORD,
82     Status: DWORD,
83     cJobs: DWORD,
84     AveragePPM: DWORD,
85 }}
86 pub type PPRINTER_INFO_2W = *mut PRINTER_INFO_2W;
87 pub type LPPRINTER_INFO_2W = *mut PRINTER_INFO_2W;
88 STRUCT!{struct PRINTER_INFO_3 {
89     pSecurityDescriptor: PSECURITY_DESCRIPTOR,
90 }}
91 pub type PPRINTER_INFO_3 = *mut PRINTER_INFO_3;
92 pub type LPPRINTER_INFO_3 = *mut PRINTER_INFO_3;
93 STRUCT!{struct PRINTER_INFO_4A {
94     pPrinterName: LPSTR,
95     pServerName: LPSTR,
96     Attributes: DWORD,
97 }}
98 pub type PPRINTER_INFO_4A = *mut PRINTER_INFO_4A;
99 pub type LPPRINTER_INFO_4A = *mut PRINTER_INFO_4A;
100 STRUCT!{struct PRINTER_INFO_4W {
101     pPrinterName: LPWSTR,
102     pServerName: LPWSTR,
103     Attributes: DWORD,
104 }}
105 pub type PPRINTER_INFO_4W = *mut PRINTER_INFO_4W;
106 pub type LPPRINTER_INFO_4W = *mut PRINTER_INFO_4W;
107 STRUCT!{struct PRINTER_INFO_5A {
108     pPrinterName: LPSTR,
109     pPortName: LPSTR,
110     Attributes: DWORD,
111     DeviceNotSelectedTimeout: DWORD,
112     TransmissionRetryTimeout: DWORD,
113 }}
114 pub type PPRINTER_INFO_5A = *mut PRINTER_INFO_5A;
115 pub type LPPRINTER_INFO_5A = *mut PRINTER_INFO_5A;
116 STRUCT!{struct PRINTER_INFO_5W {
117     pPrinterName: LPWSTR,
118     pPortName: LPWSTR,
119     Attributes: DWORD,
120     DeviceNotSelectedTimeout: DWORD,
121     TransmissionRetryTimeout: DWORD,
122 }}
123 pub type PPRINTER_INFO_5W = *mut PRINTER_INFO_5W;
124 pub type LPPRINTER_INFO_5W = *mut PRINTER_INFO_5W;
125 STRUCT!{struct PRINTER_INFO_6 {
126     dwStatus: DWORD,
127 }}
128 pub type PPRINTER_INFO_6 = *mut PRINTER_INFO_6;
129 pub type LPPRINTER_INFO_6 = *mut PRINTER_INFO_6;
130 STRUCT!{struct PRINTER_INFO_7A {
131     pszObjectGUID: LPSTR,
132     dwAction: DWORD,
133 }}
134 pub type PPRINTER_INFO_7A = *mut PRINTER_INFO_7A;
135 pub type LPPRINTER_INFO_7A = *mut PRINTER_INFO_7A;
136 STRUCT!{struct PRINTER_INFO_7W {
137     pszObjectGUID: LPWSTR,
138     dwAction: DWORD,
139 }}
140 pub type PPRINTER_INFO_7W = *mut PRINTER_INFO_7W;
141 pub type LPPRINTER_INFO_7W = *mut PRINTER_INFO_7W;
142 pub const DSPRINT_PUBLISH: DWORD = 0x00000001;
143 pub const DSPRINT_UPDATE: DWORD = 0x00000002;
144 pub const DSPRINT_UNPUBLISH: DWORD = 0x00000004;
145 pub const DSPRINT_REPUBLISH: DWORD = 0x00000008;
146 pub const DSPRINT_PENDING: DWORD = 0x80000000;
147 STRUCT!{struct PRINTER_INFO_8A {
148     pDevMode: LPDEVMODEA,
149 }}
150 pub type PPRINTER_INFO_8A = *mut PRINTER_INFO_8A;
151 pub type LPPRINTER_INFO_8A = *mut PRINTER_INFO_8A;
152 STRUCT!{struct PRINTER_INFO_8W {
153     pDevMode: LPDEVMODEW,
154 }}
155 pub type PPRINTER_INFO_8W = *mut PRINTER_INFO_8W;
156 pub type LPPRINTER_INFO_8W = *mut PRINTER_INFO_8W;
157 STRUCT!{struct PRINTER_INFO_9A {
158     pDevMode: LPDEVMODEA,
159 }}
160 pub type PPRINTER_INFO_9A = *mut PRINTER_INFO_9A;
161 pub type LPPRINTER_INFO_9A = *mut PRINTER_INFO_9A;
162 STRUCT!{struct PRINTER_INFO_9W {
163     pDevMode: LPDEVMODEW,
164 }}
165 pub type PPRINTER_INFO_9W = *mut PRINTER_INFO_9W;
166 pub type LPPRINTER_INFO_9W = *mut PRINTER_INFO_9W;
167 pub const PRINTER_CONTROL_PAUSE: DWORD = 1;
168 pub const PRINTER_CONTROL_RESUME: DWORD = 2;
169 pub const PRINTER_CONTROL_PURGE: DWORD = 3;
170 pub const PRINTER_CONTROL_SET_STATUS: DWORD = 4;
171 pub const PRINTER_STATUS_PAUSED: DWORD = 0x00000001;
172 pub const PRINTER_STATUS_ERROR: DWORD = 0x00000002;
173 pub const PRINTER_STATUS_PENDING_DELETION: DWORD = 0x00000004;
174 pub const PRINTER_STATUS_PAPER_JAM: DWORD = 0x00000008;
175 pub const PRINTER_STATUS_PAPER_OUT: DWORD = 0x00000010;
176 pub const PRINTER_STATUS_MANUAL_FEED: DWORD = 0x00000020;
177 pub const PRINTER_STATUS_PAPER_PROBLEM: DWORD = 0x00000040;
178 pub const PRINTER_STATUS_OFFLINE: DWORD = 0x00000080;
179 pub const PRINTER_STATUS_IO_ACTIVE: DWORD = 0x00000100;
180 pub const PRINTER_STATUS_BUSY: DWORD = 0x00000200;
181 pub const PRINTER_STATUS_PRINTING: DWORD = 0x00000400;
182 pub const PRINTER_STATUS_OUTPUT_BIN_FULL: DWORD = 0x00000800;
183 pub const PRINTER_STATUS_NOT_AVAILABLE: DWORD = 0x00001000;
184 pub const PRINTER_STATUS_WAITING: DWORD = 0x00002000;
185 pub const PRINTER_STATUS_PROCESSING: DWORD = 0x00004000;
186 pub const PRINTER_STATUS_INITIALIZING: DWORD = 0x00008000;
187 pub const PRINTER_STATUS_WARMING_UP: DWORD = 0x00010000;
188 pub const PRINTER_STATUS_TONER_LOW: DWORD = 0x00020000;
189 pub const PRINTER_STATUS_NO_TONER: DWORD = 0x00040000;
190 pub const PRINTER_STATUS_PAGE_PUNT: DWORD = 0x00080000;
191 pub const PRINTER_STATUS_USER_INTERVENTION: DWORD = 0x00100000;
192 pub const PRINTER_STATUS_OUT_OF_MEMORY: DWORD = 0x00200000;
193 pub const PRINTER_STATUS_DOOR_OPEN: DWORD = 0x00400000;
194 pub const PRINTER_STATUS_SERVER_UNKNOWN: DWORD = 0x00800000;
195 pub const PRINTER_STATUS_POWER_SAVE: DWORD = 0x01000000;
196 pub const PRINTER_STATUS_SERVER_OFFLINE: DWORD = 0x02000000;
197 pub const PRINTER_STATUS_DRIVER_UPDATE_NEEDED: DWORD = 0x04000000;
198 pub const PRINTER_ATTRIBUTE_QUEUED: DWORD = 0x00000001;
199 pub const PRINTER_ATTRIBUTE_DIRECT: DWORD = 0x00000002;
200 pub const PRINTER_ATTRIBUTE_DEFAULT: DWORD = 0x00000004;
201 pub const PRINTER_ATTRIBUTE_SHARED: DWORD = 0x00000008;
202 pub const PRINTER_ATTRIBUTE_NETWORK: DWORD = 0x00000010;
203 pub const PRINTER_ATTRIBUTE_HIDDEN: DWORD = 0x00000020;
204 pub const PRINTER_ATTRIBUTE_LOCAL: DWORD = 0x00000040;
205 pub const PRINTER_ATTRIBUTE_ENABLE_DEVQ: DWORD = 0x00000080;
206 pub const PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS: DWORD = 0x00000100;
207 pub const PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST: DWORD = 0x00000200;
208 pub const PRINTER_ATTRIBUTE_WORK_OFFLINE: DWORD = 0x00000400;
209 pub const PRINTER_ATTRIBUTE_ENABLE_BIDI: DWORD = 0x00000800;
210 pub const PRINTER_ATTRIBUTE_RAW_ONLY: DWORD = 0x00001000;
211 pub const PRINTER_ATTRIBUTE_PUBLISHED: DWORD = 0x00002000;
212 pub const PRINTER_ATTRIBUTE_FAX: DWORD = 0x00004000;
213 pub const PRINTER_ATTRIBUTE_TS: DWORD = 0x00008000;
214 pub const PRINTER_ATTRIBUTE_PUSHED_USER: DWORD = 0x00020000;
215 pub const PRINTER_ATTRIBUTE_PUSHED_MACHINE: DWORD = 0x00040000;
216 pub const PRINTER_ATTRIBUTE_MACHINE: DWORD = 0x00080000;
217 pub const PRINTER_ATTRIBUTE_FRIENDLY_NAME: DWORD = 0x00100000;
218 pub const PRINTER_ATTRIBUTE_TS_GENERIC_DRIVER: DWORD = 0x00200000;
219 pub const PRINTER_ATTRIBUTE_PER_USER: DWORD = 0x00400000;
220 pub const PRINTER_ATTRIBUTE_ENTERPRISE_CLOUD: DWORD = 0x00800000;
221 pub const NO_PRIORITY: DWORD = 0;
222 pub const MAX_PRIORITY: DWORD = 99;
223 pub const MIN_PRIORITY: DWORD = 1;
224 pub const DEF_PRIORITY: DWORD = 1;
225 STRUCT!{struct JOB_INFO_1A {
226     JobId: DWORD,
227     pPrinterName: LPSTR,
228     pMachineName: LPSTR,
229     pUserName: LPSTR,
230     pDocument: LPSTR,
231     pDatatype: LPSTR,
232     pStatus: LPSTR,
233     Status: DWORD,
234     Priority: DWORD,
235     Position: DWORD,
236     TotalPages: DWORD,
237     PagesPrinted: DWORD,
238     Submitted: SYSTEMTIME,
239 }}
240 pub type PJOB_INFO_1A = *mut JOB_INFO_1A;
241 pub type LPJOB_INFO_1A = *mut JOB_INFO_1A;
242 STRUCT!{struct JOB_INFO_1W {
243     JobId: DWORD,
244     pPrinterName: LPWSTR,
245     pMachineName: LPWSTR,
246     pUserName: LPWSTR,
247     pDocument: LPWSTR,
248     pDatatype: LPWSTR,
249     pStatus: LPWSTR,
250     Status: DWORD,
251     Priority: DWORD,
252     Position: DWORD,
253     TotalPages: DWORD,
254     PagesPrinted: DWORD,
255     Submitted: SYSTEMTIME,
256 }}
257 pub type PJOB_INFO_1W = *mut JOB_INFO_1W;
258 pub type LPJOB_INFO_1W = *mut JOB_INFO_1W;
259 STRUCT!{struct JOB_INFO_2A {
260     JobId: DWORD,
261     pPrinterName: LPSTR,
262     pMachineName: LPSTR,
263     pUserName: LPSTR,
264     pDocument: LPSTR,
265     pNotifyName: LPSTR,
266     pDatatype: LPSTR,
267     pPrintProcessor: LPSTR,
268     pParameters: LPSTR,
269     pDriverName: LPSTR,
270     pDevMode: LPDEVMODEA,
271     pStatus: LPSTR,
272     pSecurityDescriptor: PSECURITY_DESCRIPTOR,
273     Status: DWORD,
274     Priority: DWORD,
275     Position: DWORD,
276     StartTime: DWORD,
277     UntilTime: DWORD,
278     TotalPages: DWORD,
279     Size: DWORD,
280     Submitted: SYSTEMTIME,
281     Time: DWORD,
282     PagesPrinted: DWORD,
283 }}
284 pub type PJOB_INFO_2A = *mut JOB_INFO_2A;
285 pub type LPJOB_INFO_2A = *mut JOB_INFO_2A;
286 STRUCT!{struct JOB_INFO_2W {
287     JobId: DWORD,
288     pPrinterName: LPWSTR,
289     pMachineName: LPWSTR,
290     pUserName: LPWSTR,
291     pDocument: LPWSTR,
292     pNotifyName: LPWSTR,
293     pDatatype: LPWSTR,
294     pPrintProcessor: LPWSTR,
295     pParameters: LPWSTR,
296     pDriverName: LPWSTR,
297     pDevMode: LPDEVMODEW,
298     pStatus: LPWSTR,
299     pSecurityDescriptor: PSECURITY_DESCRIPTOR,
300     Status: DWORD,
301     Priority: DWORD,
302     Position: DWORD,
303     StartTime: DWORD,
304     UntilTime: DWORD,
305     TotalPages: DWORD,
306     Size: DWORD,
307     Submitted: SYSTEMTIME,
308     Time: DWORD,
309     PagesPrinted: DWORD,
310 }}
311 pub type PJOB_INFO_2W = *mut JOB_INFO_2W;
312 pub type LPJOB_INFO_2W = *mut JOB_INFO_2W;
313 STRUCT!{struct JOB_INFO_3 {
314     JobId: DWORD,
315     NextJobId: DWORD,
316     Reserved: DWORD,
317 }}
318 pub type PJOB_INFO_3 = *mut JOB_INFO_3;
319 pub type LPJOB_INFO_3 = *mut JOB_INFO_3;
320 STRUCT!{struct JOB_INFO_4A {
321     JobId: DWORD,
322     pPrinterName: LPSTR,
323     pMachineName: LPSTR,
324     pUserName: LPSTR,
325     pDocument: LPSTR,
326     pNotifyName: LPSTR,
327     pDatatype: LPSTR,
328     pPrintProcessor: LPSTR,
329     pParameters: LPSTR,
330     pDriverName: LPSTR,
331     pDevMode: LPDEVMODEA,
332     pStatus: LPSTR,
333     pSecurityDescriptor: PSECURITY_DESCRIPTOR,
334     Status: DWORD,
335     Priority: DWORD,
336     Position: DWORD,
337     StartTime: DWORD,
338     UntilTime: DWORD,
339     TotalPages: DWORD,
340     Size: DWORD,
341     Submitted: SYSTEMTIME,
342     Time: DWORD,
343     PagesPrinted: DWORD,
344     SizeHigh: LONG,
345 }}
346 pub type PJOB_INFO_4A = *mut JOB_INFO_4A;
347 pub type LPJOB_INFO_4A = *mut JOB_INFO_4A;
348 STRUCT!{struct JOB_INFO_4W {
349     JobId: DWORD,
350     pPrinterName: LPWSTR,
351     pMachineName: LPWSTR,
352     pUserName: LPWSTR,
353     pDocument: LPWSTR,
354     pNotifyName: LPWSTR,
355     pDatatype: LPWSTR,
356     pPrintProcessor: LPWSTR,
357     pParameters: LPWSTR,
358     pDriverName: LPWSTR,
359     pDevMode: LPDEVMODEW,
360     pStatus: LPWSTR,
361     pSecurityDescriptor: PSECURITY_DESCRIPTOR,
362     Status: DWORD,
363     Priority: DWORD,
364     Position: DWORD,
365     StartTime: DWORD,
366     UntilTime: DWORD,
367     TotalPages: DWORD,
368     Size: DWORD,
369     Submitted: SYSTEMTIME,
370     Time: DWORD,
371     PagesPrinted: DWORD,
372     SizeHigh: LONG,
373 }}
374 pub type PJOB_INFO_4W = *mut JOB_INFO_4W;
375 pub type LPJOB_INFO_4W = *mut JOB_INFO_4W;
376 pub const JOB_CONTROL_PAUSE: DWORD = 1;
377 pub const JOB_CONTROL_RESUME: DWORD = 2;
378 pub const JOB_CONTROL_CANCEL: DWORD = 3;
379 pub const JOB_CONTROL_RESTART: DWORD = 4;
380 pub const JOB_CONTROL_DELETE: DWORD = 5;
381 pub const JOB_CONTROL_SENT_TO_PRINTER: DWORD = 6;
382 pub const JOB_CONTROL_LAST_PAGE_EJECTED: DWORD = 7;
383 pub const JOB_STATUS_PAUSED: DWORD = 0x00000001;
384 pub const JOB_STATUS_ERROR: DWORD = 0x00000002;
385 pub const JOB_STATUS_DELETING: DWORD = 0x00000004;
386 pub const JOB_STATUS_SPOOLING: DWORD = 0x00000008;
387 pub const JOB_STATUS_PRINTING: DWORD = 0x00000010;
388 pub const JOB_STATUS_OFFLINE: DWORD = 0x00000020;
389 pub const JOB_STATUS_PAPEROUT: DWORD = 0x00000040;
390 pub const JOB_STATUS_PRINTED: DWORD = 0x00000080;
391 pub const JOB_STATUS_DELETED: DWORD = 0x00000100;
392 pub const JOB_STATUS_BLOCKED_DEVQ: DWORD = 0x00000200;
393 pub const JOB_STATUS_USER_INTERVENTION: DWORD = 0x00000400;
394 pub const JOB_STATUS_RESTART: DWORD = 0x00000800;
395 pub const JOB_POSITION_UNSPECIFIED: DWORD = 0;
396 STRUCT!{struct ADDJOB_INFO_1A {
397     Path: LPSTR,
398     JobId: DWORD,
399 }}
400 pub type PADDJOB_INFO_1A = *mut ADDJOB_INFO_1A;
401 pub type LPADDJOB_INFO_1A = *mut ADDJOB_INFO_1A;
402 STRUCT!{struct ADDJOB_INFO_1W {
403     Path: LPWSTR,
404     JobId: DWORD,
405 }}
406 pub type PADDJOB_INFO_1W = *mut ADDJOB_INFO_1W;
407 pub type LPADDJOB_INFO_1W = *mut ADDJOB_INFO_1W;
408 STRUCT!{struct DRIVER_INFO_1A {
409     pName: LPSTR,
410 }}
411 pub type PDRIVER_INFO_1A = *mut DRIVER_INFO_1A;
412 pub type LPDRIVER_INFO_1A = *mut DRIVER_INFO_1A;
413 STRUCT!{struct DRIVER_INFO_1W {
414     pName: LPWSTR,
415 }}
416 pub type PDRIVER_INFO_1W = *mut DRIVER_INFO_1W;
417 pub type LPDRIVER_INFO_1W = *mut DRIVER_INFO_1W;
418 STRUCT!{struct DRIVER_INFO_2A {
419     cVersion: DWORD,
420     pName: LPSTR,
421     pEnvironment: LPSTR,
422     pDriverPath: LPSTR,
423     pDataFile: LPSTR,
424     pConfigFile: LPSTR,
425 }}
426 pub type PDRIVER_INFO_2A = *mut DRIVER_INFO_2A;
427 pub type LPDRIVER_INFO_2A = *mut DRIVER_INFO_2A;
428 STRUCT!{struct DRIVER_INFO_2W {
429     cVersion: DWORD,
430     pName: LPWSTR,
431     pEnvironment: LPWSTR,
432     pDriverPath: LPWSTR,
433     pDataFile: LPWSTR,
434     pConfigFile: LPWSTR,
435 }}
436 pub type PDRIVER_INFO_2W = *mut DRIVER_INFO_2W;
437 pub type LPDRIVER_INFO_2W = *mut DRIVER_INFO_2W;
438 STRUCT!{struct DRIVER_INFO_3A {
439     cVersion: DWORD,
440     pName: LPSTR,
441     pEnvironment: LPSTR,
442     pDriverPath: LPSTR,
443     pDataFile: LPSTR,
444     pConfigFile: LPSTR,
445     pHelpFile: LPSTR,
446     pDependentFiles: LPSTR,
447     pMonitorName: LPSTR,
448     pDefaultDataType: LPSTR,
449 }}
450 pub type PDRIVER_INFO_3A = *mut DRIVER_INFO_3A;
451 pub type LPDRIVER_INFO_3A = *mut DRIVER_INFO_3A;
452 STRUCT!{struct DRIVER_INFO_3W {
453     cVersion: DWORD,
454     pName: LPWSTR,
455     pEnvironment: LPWSTR,
456     pDriverPath: LPWSTR,
457     pDataFile: LPWSTR,
458     pConfigFile: LPWSTR,
459     pHelpFile: LPWSTR,
460     pDependentFiles: LPWSTR,
461     pMonitorName: LPWSTR,
462     pDefaultDataType: LPWSTR,
463 }}
464 pub type PDRIVER_INFO_3W = *mut DRIVER_INFO_3W;
465 pub type LPDRIVER_INFO_3W = *mut DRIVER_INFO_3W;
466 STRUCT!{struct DRIVER_INFO_4A {
467     cVersion: DWORD,
468     pName: LPSTR,
469     pEnvironment: LPSTR,
470     pDriverPath: LPSTR,
471     pDataFile: LPSTR,
472     pConfigFile: LPSTR,
473     pHelpFile: LPSTR,
474     pDependentFiles: LPSTR,
475     pMonitorName: LPSTR,
476     pDefaultDataType: LPSTR,
477     pszzPreviousNames: LPSTR,
478 }}
479 pub type PDRIVER_INFO_4A = *mut DRIVER_INFO_4A;
480 pub type LPDRIVER_INFO_4A = *mut DRIVER_INFO_4A;
481 STRUCT!{struct DRIVER_INFO_4W {
482     cVersion: DWORD,
483     pName: LPWSTR,
484     pEnvironment: LPWSTR,
485     pDriverPath: LPWSTR,
486     pDataFile: LPWSTR,
487     pConfigFile: LPWSTR,
488     pHelpFile: LPWSTR,
489     pDependentFiles: LPWSTR,
490     pMonitorName: LPWSTR,
491     pDefaultDataType: LPWSTR,
492     pszzPreviousNames: LPWSTR,
493 }}
494 pub type PDRIVER_INFO_4W = *mut DRIVER_INFO_4W;
495 pub type LPDRIVER_INFO_4W = *mut DRIVER_INFO_4W;
496 STRUCT!{struct DRIVER_INFO_5A {
497     cVersion: DWORD,
498     pName: LPSTR,
499     pEnvironment: LPSTR,
500     pDriverPath: LPSTR,
501     pDataFile: LPSTR,
502     pConfigFile: LPSTR,
503     dwDriverAttributes: DWORD,
504     dwConfigVersion: DWORD,
505     dwDriverVersion: DWORD,
506 }}
507 pub type PDRIVER_INFO_5A = *mut DRIVER_INFO_5A;
508 pub type LPDRIVER_INFO_5A = *mut DRIVER_INFO_5A;
509 STRUCT!{struct DRIVER_INFO_5W {
510     cVersion: DWORD,
511     pName: LPWSTR,
512     pEnvironment: LPWSTR,
513     pDriverPath: LPWSTR,
514     pDataFile: LPWSTR,
515     pConfigFile: LPWSTR,
516     dwDriverAttributes: DWORD,
517     dwConfigVersion: DWORD,
518     dwDriverVersion: DWORD,
519 }}
520 pub type PDRIVER_INFO_5W = *mut DRIVER_INFO_5W;
521 pub type LPDRIVER_INFO_5W = *mut DRIVER_INFO_5W;
522 STRUCT!{struct DRIVER_INFO_6A {
523     cVersion: DWORD,
524     pName: LPSTR,
525     pEnvironment: LPSTR,
526     pDriverPath: LPSTR,
527     pDataFile: LPSTR,
528     pConfigFile: LPSTR,
529     pHelpFile: LPSTR,
530     pDependentFiles: LPSTR,
531     pMonitorName: LPSTR,
532     pDefaultDataType: LPSTR,
533     pszzPreviousNames: LPSTR,
534     ftDriverDate: FILETIME,
535     dwlDriverVersion: DWORDLONG,
536     pszMfgName: LPSTR,
537     pszOEMUrl: LPSTR,
538     pszHardwareID: LPSTR,
539     pszProvider: LPSTR,
540 }}
541 pub type PDRIVER_INFO_6A = *mut DRIVER_INFO_6A;
542 pub type LPDRIVER_INFO_6A = *mut DRIVER_INFO_6A;
543 STRUCT!{struct DRIVER_INFO_6W {
544     cVersion: DWORD,
545     pName: LPWSTR,
546     pEnvironment: LPWSTR,
547     pDriverPath: LPWSTR,
548     pDataFile: LPWSTR,
549     pConfigFile: LPWSTR,
550     pHelpFile: LPWSTR,
551     pDependentFiles: LPWSTR,
552     pMonitorName: LPWSTR,
553     pDefaultDataType: LPWSTR,
554     pszzPreviousNames: LPWSTR,
555     ftDriverDate: FILETIME,
556     dwlDriverVersion: DWORDLONG,
557     pszMfgName: LPWSTR,
558     pszOEMUrl: LPWSTR,
559     pszHardwareID: LPWSTR,
560     pszProvider: LPWSTR,
561 }}
562 pub type PDRIVER_INFO_6W = *mut DRIVER_INFO_6W;
563 pub type LPDRIVER_INFO_6W = *mut DRIVER_INFO_6W;
564 pub const PRINTER_DRIVER_PACKAGE_AWARE: DWORD = 0x00000001;
565 pub const PRINTER_DRIVER_XPS: DWORD = 0x00000002;
566 pub const PRINTER_DRIVER_SANDBOX_ENABLED: DWORD = 0x00000004;
567 pub const PRINTER_DRIVER_CLASS: DWORD = 0x00000008;
568 pub const PRINTER_DRIVER_DERIVED: DWORD = 0x00000010;
569 pub const PRINTER_DRIVER_NOT_SHAREABLE: DWORD = 0x00000020;
570 pub const PRINTER_DRIVER_CATEGORY_FAX: DWORD = 0x00000040;
571 pub const PRINTER_DRIVER_CATEGORY_FILE: DWORD = 0x00000080;
572 pub const PRINTER_DRIVER_CATEGORY_VIRTUAL: DWORD = 0x00000100;
573 pub const PRINTER_DRIVER_CATEGORY_SERVICE: DWORD = 0x00000200;
574 pub const PRINTER_DRIVER_SOFT_RESET_REQUIRED: DWORD = 0x00000400;
575 pub const PRINTER_DRIVER_SANDBOX_DISABLED: DWORD = 0x00000800;
576 pub const PRINTER_DRIVER_CATEGORY_3D: DWORD = 0x00001000;
577 pub const PRINTER_DRIVER_CATEGORY_CLOUD: DWORD = 0x00002000;
578 STRUCT!{struct DRIVER_INFO_8A {
579     cVersion: DWORD,
580     pName: LPSTR,
581     pEnvironment: LPSTR,
582     pDriverPath: LPSTR,
583     pDataFile: LPSTR,
584     pConfigFile: LPSTR,
585     pHelpFile: LPSTR,
586     pDependentFiles: LPSTR,
587     pMonitorName: LPSTR,
588     pDefaultDataType: LPSTR,
589     pszzPreviousNames: LPSTR,
590     ftDriverDate: FILETIME,
591     dwlDriverVersion: DWORDLONG,
592     pszMfgName: LPSTR,
593     pszOEMUrl: LPSTR,
594     pszHardwareID: LPSTR,
595     pszProvider: LPSTR,
596     pszPrintProcessor: LPSTR,
597     pszVendorSetup: LPSTR,
598     pszzColorProfiles: LPSTR,
599     pszInfPath: LPSTR,
600     dwPrinterDriverAttributes: DWORD,
601     pszzCoreDriverDependencies: LPSTR,
602     ftMinInboxDriverVerDate: FILETIME,
603     dwlMinInboxDriverVerVersion: DWORDLONG,
604 }}
605 pub type PDRIVER_INFO_8A = *mut DRIVER_INFO_8A;
606 pub type LPDRIVER_INFO_8A = *mut DRIVER_INFO_8A;
607 STRUCT!{struct DRIVER_INFO_8W {
608     cVersion: DWORD,
609     pName: LPWSTR,
610     pEnvironment: LPWSTR,
611     pDriverPath: LPWSTR,
612     pDataFile: LPWSTR,
613     pConfigFile: LPWSTR,
614     pHelpFile: LPWSTR,
615     pDependentFiles: LPWSTR,
616     pMonitorName: LPWSTR,
617     pDefaultDataType: LPWSTR,
618     pszzPreviousNames: LPWSTR,
619     ftDriverDate: FILETIME,
620     dwlDriverVersion: DWORDLONG,
621     pszMfgName: LPWSTR,
622     pszOEMUrl: LPWSTR,
623     pszHardwareID: LPWSTR,
624     pszProvider: LPWSTR,
625     pszPrintProcessor: LPWSTR,
626     pszVendorSetup: LPWSTR,
627     pszzColorProfiles: LPWSTR,
628     pszInfPath: LPWSTR,
629     dwPrinterDriverAttributes: DWORD,
630     pszzCoreDriverDependencies: LPWSTR,
631     ftMinInboxDriverVerDate: FILETIME,
632     dwlMinInboxDriverVerVersion: DWORDLONG,
633 }}
634 pub type PDRIVER_INFO_8W = *mut DRIVER_INFO_8W;
635 pub type LPDRIVER_INFO_8W = *mut DRIVER_INFO_8W;
636 pub const DRIVER_KERNELMODE: DWORD = 0x00000001;
637 pub const DRIVER_USERMODE: DWORD = 0x00000002;
638 pub const DPD_DELETE_UNUSED_FILES: DWORD = 0x00000001;
639 pub const DPD_DELETE_SPECIFIC_VERSION: DWORD = 0x00000002;
640 pub const DPD_DELETE_ALL_FILES: DWORD = 0x00000004;
641 pub const APD_STRICT_UPGRADE: DWORD = 0x00000001;
642 pub const APD_STRICT_DOWNGRADE: DWORD = 0x00000002;
643 pub const APD_COPY_ALL_FILES: DWORD = 0x00000004;
644 pub const APD_COPY_NEW_FILES: DWORD = 0x00000008;
645 pub const APD_COPY_FROM_DIRECTORY: DWORD = 0x00000010;
646 STRUCT!{struct DOC_INFO_1A {
647     pDocName: LPSTR,
648     pOutputFile: LPSTR,
649     pDatatype: LPSTR,
650 }}
651 pub type PDOC_INFO_1A = *mut DOC_INFO_1A;
652 pub type LPDOC_INFO_1A = *mut DOC_INFO_1A;
653 STRUCT!{struct DOC_INFO_1W {
654     pDocName: LPWSTR,
655     pOutputFile: LPWSTR,
656     pDatatype: LPWSTR,
657 }}
658 pub type PDOC_INFO_1W = *mut DOC_INFO_1W;
659 pub type LPDOC_INFO_1W = *mut DOC_INFO_1W;
660 STRUCT!{struct FORM_INFO_1A {
661     Flags: DWORD,
662     pName: LPSTR,
663     Size: SIZEL,
664     ImageableArea: RECTL,
665 }}
666 pub type PFORM_INFO_1A = *mut FORM_INFO_1A;
667 pub type LPFORM_INFO_1A = *mut FORM_INFO_1A;
668 STRUCT!{struct FORM_INFO_1W {
669     Flags: DWORD,
670     pName: LPWSTR,
671     Size: SIZEL,
672     ImageableArea: RECTL,
673 }}
674 pub type PFORM_INFO_1W = *mut FORM_INFO_1W;
675 pub type LPFORM_INFO_1W = *mut FORM_INFO_1W;
676 pub const STRING_NONE: DWORD = 0x00000001;
677 pub const STRING_MUIDLL: DWORD = 0x00000002;
678 pub const STRING_LANGPAIR: DWORD = 0x00000004;
679 pub const MAX_FORM_KEYWORD_LENGTH: usize = 63 + 1;
680 STRUCT!{struct FORM_INFO_2A {
681     Flags: DWORD,
682     pName: LPCSTR,
683     Size: SIZEL,
684     ImageableArea: RECTL,
685     pKeyword: LPCSTR,
686     StringType: DWORD,
687     pMuiDll: LPCSTR,
688     dwResourceId: DWORD,
689     pDisplayName: LPCSTR,
690     wLangId: LANGID,
691 }}
692 pub type PFORM_INFO_2A = *mut FORM_INFO_2A;
693 pub type LPFORM_INFO_2A = *mut FORM_INFO_2A;
694 STRUCT!{struct FORM_INFO_2W {
695     Flags: DWORD,
696     pName: LPCWSTR,
697     Size: SIZEL,
698     ImageableArea: RECTL,
699     pKeyword: LPCSTR,
700     StringType: DWORD,
701     pMuiDll: LPCWSTR,
702     dwResourceId: DWORD,
703     pDisplayName: LPCWSTR,
704     wLangId: LANGID,
705 }}
706 pub type PFORM_INFO_2W = *mut FORM_INFO_2W;
707 pub type LPFORM_INFO_2W = *mut FORM_INFO_2W;
708 STRUCT!{struct DOC_INFO_2A {
709     pDocName: LPSTR,
710     pOutputFile: LPSTR,
711     pDatatype: LPSTR,
712     dwMode: DWORD,
713     JobId: DWORD,
714 }}
715 pub type PDOC_INFO_2A = *mut DOC_INFO_2A;
716 pub type LPDOC_INFO_2A = *mut DOC_INFO_2A;
717 STRUCT!{struct DOC_INFO_2W {
718     pDocName: LPWSTR,
719     pOutputFile: LPWSTR,
720     pDatatype: LPWSTR,
721     dwMode: DWORD,
722     JobId: DWORD,
723 }}
724 pub type PDOC_INFO_2W = *mut DOC_INFO_2W;
725 pub type LPDOC_INFO_2W = *mut DOC_INFO_2W;
726 pub const DI_CHANNEL: DWORD = 1;
727 pub const DI_READ_SPOOL_JOB: DWORD = 3;
728 STRUCT!{struct DOC_INFO_3A {
729     pDocName: LPSTR,
730     pOutputFile: LPSTR,
731     pDatatype: LPSTR,
732     dwFlags: DWORD,
733 }}
734 pub type PDOC_INFO_3A = *mut DOC_INFO_3A;
735 pub type LPDOC_INFO_3A = *mut DOC_INFO_3A;
736 STRUCT!{struct DOC_INFO_3W {
737     pDocName: LPWSTR,
738     pOutputFile: LPWSTR,
739     pDatatype: LPWSTR,
740     dwFlags: DWORD,
741 }}
742 pub type PDOC_INFO_3W = *mut DOC_INFO_3W;
743 pub type LPDOC_INFO_3W = *mut DOC_INFO_3W;
744 pub const DI_MEMORYMAP_WRITE: DWORD = 0x00000001;
745 pub const FORM_USER: DWORD = 0x00000000;
746 pub const FORM_BUILTIN: DWORD = 0x00000001;
747 pub const FORM_PRINTER: DWORD = 0x00000002;
748 STRUCT!{struct PRINTPROCESSOR_INFO_1A {
749     pName: LPSTR,
750 }}
751 pub type PPRINTPROCESSOR_INFO_1A = *mut PRINTPROCESSOR_INFO_1A;
752 pub type LPPRINTPROCESSOR_INFO_1A = *mut PRINTPROCESSOR_INFO_1A;
753 STRUCT!{struct PRINTPROCESSOR_INFO_1W {
754     pName: LPWSTR,
755 }}
756 pub type PPRINTPROCESSOR_INFO_1W = *mut PRINTPROCESSOR_INFO_1W;
757 pub type LPPRINTPROCESSOR_INFO_1W = *mut PRINTPROCESSOR_INFO_1W;
758 STRUCT!{struct PRINTPROCESSOR_CAPS_1 {
759     dwLevel: DWORD,
760     dwNupOptions: DWORD,
761     dwPageOrderFlags: DWORD,
762     dwNumberOfCopies: DWORD,
763 }}
764 pub type PPRINTPROCESSOR_CAPS_1 = *mut PRINTPROCESSOR_CAPS_1;
765 STRUCT!{struct PRINTPROCESSOR_CAPS_2 {
766     dwLevel: DWORD,
767     dwNupOptions: DWORD,
768     dwPageOrderFlags: DWORD,
769     dwNumberOfCopies: DWORD,
770     dwDuplexHandlingCaps: DWORD,
771     dwNupDirectionCaps: DWORD,
772     dwNupBorderCaps: DWORD,
773     dwBookletHandlingCaps: DWORD,
774     dwScalingCaps: DWORD,
775 }}
776 pub type PPRINTPROCESSOR_CAPS_2 = *mut PRINTPROCESSOR_CAPS_2;
777 pub const PPCAPS_RIGHT_THEN_DOWN: DWORD = 0x00000001;
778 pub const PPCAPS_DOWN_THEN_RIGHT: DWORD = 0x00000001 << 1;
779 pub const PPCAPS_LEFT_THEN_DOWN: DWORD = 0x00000001 << 2;
780 pub const PPCAPS_DOWN_THEN_LEFT: DWORD = 0x00000001 << 3;
781 pub const PPCAPS_BORDER_PRINT: DWORD = 0x00000001;
782 pub const PPCAPS_BOOKLET_EDGE: DWORD = 0x00000001;
783 pub const PPCAPS_REVERSE_PAGES_FOR_REVERSE_DUPLEX: DWORD = 0x00000001;
784 pub const PPCAPS_DONT_SEND_EXTRA_PAGES_FOR_DUPLEX: DWORD = 0x00000001 << 1;
785 pub const PPCAPS_SQUARE_SCALING: DWORD = 0x00000001;
786 STRUCT!{struct PORT_INFO_1A {
787     pName: LPSTR,
788 }}
789 pub type PPORT_INFO_1A = *mut PORT_INFO_1A;
790 pub type LPPORT_INFO_1A = *mut PORT_INFO_1A;
791 STRUCT!{struct PORT_INFO_1W {
792     pName: LPWSTR,
793 }}
794 pub type PPORT_INFO_1W = *mut PORT_INFO_1W;
795 pub type LPPORT_INFO_1W = *mut PORT_INFO_1W;
796 STRUCT!{struct PORT_INFO_2A {
797     pPortName: LPSTR,
798     pMonitorName: LPSTR,
799     pDescription: LPSTR,
800     fPortType: DWORD,
801     Reserved: DWORD,
802 }}
803 pub type PPORT_INFO_2A = *mut PORT_INFO_2A;
804 pub type LPPORT_INFO_2A = *mut PORT_INFO_2A;
805 STRUCT!{struct PORT_INFO_2W {
806     pPortName: LPWSTR,
807     pMonitorName: LPWSTR,
808     pDescription: LPWSTR,
809     fPortType: DWORD,
810     Reserved: DWORD,
811 }}
812 pub type PPORT_INFO_2W = *mut PORT_INFO_2W;
813 pub type LPPORT_INFO_2W = *mut PORT_INFO_2W;
814 pub const PORT_TYPE_WRITE: DWORD = 0x0001;
815 pub const PORT_TYPE_READ: DWORD = 0x0002;
816 pub const PORT_TYPE_REDIRECTED: DWORD = 0x0004;
817 pub const PORT_TYPE_NET_ATTACHED: DWORD = 0x0008;
818 STRUCT!{struct PORT_INFO_3A {
819     dwStatus: DWORD,
820     pszStatus: LPSTR,
821     dwSeverity: DWORD,
822 }}
823 pub type PPORT_INFO_3A = *mut PORT_INFO_3A;
824 pub type LPPORT_INFO_3A = *mut PORT_INFO_3A;
825 STRUCT!{struct PORT_INFO_3W {
826     dwStatus: DWORD,
827     pszStatus: LPWSTR,
828     dwSeverity: DWORD,
829 }}
830 pub type PPORT_INFO_3W = *mut PORT_INFO_3W;
831 pub type LPPORT_INFO_3W = *mut PORT_INFO_3W;
832 pub const PORT_STATUS_TYPE_ERROR: DWORD = 1;
833 pub const PORT_STATUS_TYPE_WARNING: DWORD = 2;
834 pub const PORT_STATUS_TYPE_INFO: DWORD = 3;
835 pub const PORT_STATUS_OFFLINE: DWORD = 1;
836 pub const PORT_STATUS_PAPER_JAM: DWORD = 2;
837 pub const PORT_STATUS_PAPER_OUT: DWORD = 3;
838 pub const PORT_STATUS_OUTPUT_BIN_FULL: DWORD = 4;
839 pub const PORT_STATUS_PAPER_PROBLEM: DWORD = 5;
840 pub const PORT_STATUS_NO_TONER: DWORD = 6;
841 pub const PORT_STATUS_DOOR_OPEN: DWORD = 7;
842 pub const PORT_STATUS_USER_INTERVENTION: DWORD = 8;
843 pub const PORT_STATUS_OUT_OF_MEMORY: DWORD = 9;
844 pub const PORT_STATUS_TONER_LOW: DWORD = 10;
845 pub const PORT_STATUS_WARMING_UP: DWORD = 11;
846 pub const PORT_STATUS_POWER_SAVE: DWORD = 12;
847 STRUCT!{struct MONITOR_INFO_1A {
848     pName: LPSTR,
849 }}
850 pub type PMONITOR_INFO_1A = *mut MONITOR_INFO_1A;
851 pub type LPMONITOR_INFO_1A = *mut MONITOR_INFO_1A;
852 STRUCT!{struct MONITOR_INFO_1W {
853     pName: LPWSTR,
854 }}
855 pub type PMONITOR_INFO_1W = *mut MONITOR_INFO_1W;
856 pub type LPMONITOR_INFO_1W = *mut MONITOR_INFO_1W;
857 STRUCT!{struct MONITOR_INFO_2A {
858     pName: LPSTR,
859     pEnvironment: LPSTR,
860     pDLLName: LPSTR,
861 }}
862 pub type PMONITOR_INFO_2A = *mut MONITOR_INFO_2A;
863 pub type LPMONITOR_INFO_2A = *mut MONITOR_INFO_2A;
864 STRUCT!{struct MONITOR_INFO_2W {
865     pName: LPWSTR,
866     pEnvironment: LPWSTR,
867     pDLLName: LPWSTR,
868 }}
869 pub type PMONITOR_INFO_2W = *mut MONITOR_INFO_2W;
870 pub type LPMONITOR_INFO_2W = *mut MONITOR_INFO_2W;
871 STRUCT!{struct DATATYPES_INFO_1A {
872     pName: LPSTR,
873 }}
874 pub type PDATATYPES_INFO_1A = *mut DATATYPES_INFO_1A;
875 pub type LPDATATYPES_INFO_1A = *mut DATATYPES_INFO_1A;
876 STRUCT!{struct DATATYPES_INFO_1W {
877     pName: LPWSTR,
878 }}
879 pub type PDATATYPES_INFO_1W = *mut DATATYPES_INFO_1W;
880 pub type LPDATATYPES_INFO_1W = *mut DATATYPES_INFO_1W;
881 STRUCT!{struct PRINTER_DEFAULTSA {
882     pDataType: LPSTR,
883     pDevMode: LPDEVMODEA,
884     DesiredAccess: ACCESS_MASK,
885 }}
886 pub type PPRINTER_DEFAULTSA = *mut PRINTER_DEFAULTSA;
887 pub type LPPRINTER_DEFAULTSA = *mut PRINTER_DEFAULTSA;
888 STRUCT!{struct PRINTER_DEFAULTSW {
889     pDataType: LPWSTR,
890     pDevMode: LPDEVMODEW,
891     DesiredAccess: ACCESS_MASK,
892 }}
893 pub type PPRINTER_DEFAULTSW = *mut PRINTER_DEFAULTSW;
894 pub type LPPRINTER_DEFAULTSW = *mut PRINTER_DEFAULTSW;
895 STRUCT!{struct PRINTER_ENUM_VALUESA {
896     pValueName: LPSTR,
897     cbValueName: DWORD,
898     dwType: DWORD,
899     pData: LPBYTE,
900     cbData: DWORD,
901 }}
902 pub type PPRINTER_ENUM_VALUESA = *mut PRINTER_ENUM_VALUESA;
903 pub type LPPRINTER_ENUM_VALUESA = *mut PRINTER_ENUM_VALUESA;
904 STRUCT!{struct PRINTER_ENUM_VALUESW {
905     pValueName: LPWSTR,
906     cbValueName: DWORD,
907     dwType: DWORD,
908     pData: LPBYTE,
909     cbData: DWORD,
910 }}
911 pub type PPRINTER_ENUM_VALUESW = *mut PRINTER_ENUM_VALUESW;
912 pub type LPPRINTER_ENUM_VALUESW = *mut PRINTER_ENUM_VALUESW;
913 extern "system" {
EnumPrintersA( Flags: DWORD, Name: LPSTR, Level: DWORD, pPrinterEnum: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL914     pub fn EnumPrintersA(
915         Flags: DWORD,
916         Name: LPSTR,
917         Level: DWORD,
918         pPrinterEnum: LPBYTE,
919         cbBuf: DWORD,
920         pcbNeeded: LPDWORD,
921         pcReturned: LPDWORD,
922     ) -> BOOL;
EnumPrintersW( Flags: DWORD, Name: LPWSTR, Level: DWORD, pPrinterEnum: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL923     pub fn EnumPrintersW(
924         Flags: DWORD,
925         Name: LPWSTR,
926         Level: DWORD,
927         pPrinterEnum: LPBYTE,
928         cbBuf: DWORD,
929         pcbNeeded: LPDWORD,
930         pcReturned: LPDWORD,
931     ) -> BOOL;
932 }
933 pub const PRINTER_ENUM_DEFAULT: DWORD = 0x00000001;
934 pub const PRINTER_ENUM_LOCAL: DWORD = 0x00000002;
935 pub const PRINTER_ENUM_CONNECTIONS: DWORD = 0x00000004;
936 pub const PRINTER_ENUM_FAVORITE: DWORD = 0x00000004;
937 pub const PRINTER_ENUM_NAME: DWORD = 0x00000008;
938 pub const PRINTER_ENUM_REMOTE: DWORD = 0x00000010;
939 pub const PRINTER_ENUM_SHARED: DWORD = 0x00000020;
940 pub const PRINTER_ENUM_NETWORK: DWORD = 0x00000040;
941 pub const PRINTER_ENUM_EXPAND: DWORD = 0x00004000;
942 pub const PRINTER_ENUM_CONTAINER: DWORD = 0x00008000;
943 pub const PRINTER_ENUM_ICONMASK: DWORD = 0x00ff0000;
944 pub const PRINTER_ENUM_ICON1: DWORD = 0x00010000;
945 pub const PRINTER_ENUM_ICON2: DWORD = 0x00020000;
946 pub const PRINTER_ENUM_ICON3: DWORD = 0x00040000;
947 pub const PRINTER_ENUM_ICON4: DWORD = 0x00080000;
948 pub const PRINTER_ENUM_ICON5: DWORD = 0x00100000;
949 pub const PRINTER_ENUM_ICON6: DWORD = 0x00200000;
950 pub const PRINTER_ENUM_ICON7: DWORD = 0x00400000;
951 pub const PRINTER_ENUM_ICON8: DWORD = 0x00800000;
952 pub const PRINTER_ENUM_HIDE: DWORD = 0x01000000;
953 pub const PRINTER_ENUM_CATEGORY_ALL: DWORD = 0x02000000;
954 pub const PRINTER_ENUM_CATEGORY_3D: DWORD = 0x04000000;
955 pub const SPOOL_FILE_PERSISTENT: DWORD = 0x00000001;
956 pub const SPOOL_FILE_TEMPORARY: DWORD = 0x00000002;
957 extern "system" {
GetSpoolFileHandle( hPrinter: HANDLE, ) -> HANDLE958     pub fn GetSpoolFileHandle(
959         hPrinter: HANDLE,
960     ) -> HANDLE;
CommitSpoolData( hPrinter: HANDLE, hSpoolFile: HANDLE, cbCommit: DWORD, ) -> HANDLE961     pub fn CommitSpoolData(
962         hPrinter: HANDLE,
963         hSpoolFile: HANDLE,
964         cbCommit: DWORD,
965     ) -> HANDLE;
CloseSpoolFileHandle( hPrinter: HANDLE, hSpoolFile: HANDLE, ) -> BOOL966     pub fn CloseSpoolFileHandle(
967         hPrinter: HANDLE,
968         hSpoolFile: HANDLE,
969     ) -> BOOL;
OpenPrinterA( pPrinterName: LPSTR, phPrinter: LPHANDLE, pDefault: LPPRINTER_DEFAULTSA, ) -> BOOL970     pub fn OpenPrinterA(
971         pPrinterName: LPSTR,
972         phPrinter: LPHANDLE,
973         pDefault: LPPRINTER_DEFAULTSA,
974     ) -> BOOL;
OpenPrinterW( pPrinterName: LPWSTR, phPrinter: LPHANDLE, pDefault: LPPRINTER_DEFAULTSW, ) -> BOOL975     pub fn OpenPrinterW(
976         pPrinterName: LPWSTR,
977         phPrinter: LPHANDLE,
978         pDefault: LPPRINTER_DEFAULTSW,
979     ) -> BOOL;
ResetPrinterA( hPrinter: HANDLE, pDefault: LPPRINTER_DEFAULTSA, ) -> BOOL980     pub fn ResetPrinterA(
981         hPrinter: HANDLE,
982         pDefault: LPPRINTER_DEFAULTSA,
983     ) -> BOOL;
ResetPrinterW( hPrinter: HANDLE, pDefault: LPPRINTER_DEFAULTSW, ) -> BOOL984     pub fn ResetPrinterW(
985         hPrinter: HANDLE,
986         pDefault: LPPRINTER_DEFAULTSW,
987     ) -> BOOL;
SetJobA( hPrinter: HANDLE, JobId: DWORD, Level: DWORD, pJob: LPBYTE, Command: DWORD, ) -> BOOL988     pub fn SetJobA(
989         hPrinter: HANDLE,
990         JobId: DWORD,
991         Level: DWORD,
992         pJob: LPBYTE,
993         Command: DWORD,
994     ) -> BOOL;
SetJobW( hPrinter: HANDLE, JobId: DWORD, Level: DWORD, pJob: LPBYTE, Command: DWORD, ) -> BOOL995     pub fn SetJobW(
996         hPrinter: HANDLE,
997         JobId: DWORD,
998         Level: DWORD,
999         pJob: LPBYTE,
1000         Command: DWORD,
1001     ) -> BOOL;
GetJobA( hPrinter: HANDLE, JobId: DWORD, Level: DWORD, pJob: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1002     pub fn GetJobA(
1003         hPrinter: HANDLE,
1004         JobId: DWORD,
1005         Level: DWORD,
1006         pJob: LPBYTE,
1007         cbBuf: DWORD,
1008         pcbNeeded: LPDWORD,
1009     ) -> BOOL;
GetJobW( hPrinter: HANDLE, JobId: DWORD, Level: DWORD, pJob: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1010     pub fn GetJobW(
1011         hPrinter: HANDLE,
1012         JobId: DWORD,
1013         Level: DWORD,
1014         pJob: LPBYTE,
1015         cbBuf: DWORD,
1016         pcbNeeded: LPDWORD,
1017     ) -> BOOL;
EnumJobsA( hPrinter: HANDLE, FirstJob: DWORD, NoJobs: DWORD, Level: DWORD, pJob: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1018     pub fn EnumJobsA(
1019         hPrinter: HANDLE,
1020         FirstJob: DWORD,
1021         NoJobs: DWORD,
1022         Level: DWORD,
1023         pJob: LPBYTE,
1024         cbBuf: DWORD,
1025         pcbNeeded: LPDWORD,
1026         pcReturned: LPDWORD,
1027     ) -> BOOL;
EnumJobsW( hPrinter: HANDLE, FirstJob: DWORD, NoJobs: DWORD, Level: DWORD, pJob: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1028     pub fn EnumJobsW(
1029         hPrinter: HANDLE,
1030         FirstJob: DWORD,
1031         NoJobs: DWORD,
1032         Level: DWORD,
1033         pJob: LPBYTE,
1034         cbBuf: DWORD,
1035         pcbNeeded: LPDWORD,
1036         pcReturned: LPDWORD,
1037     ) -> BOOL;
AddPrinterA( pName: LPSTR, Level: DWORD, pPrinter: LPBYTE, ) -> HANDLE1038     pub fn AddPrinterA(
1039         pName: LPSTR,
1040         Level: DWORD,
1041         pPrinter: LPBYTE,
1042     ) -> HANDLE;
AddPrinterW( pName: LPWSTR, Level: DWORD, pPrinter: LPBYTE, ) -> HANDLE1043     pub fn AddPrinterW(
1044         pName: LPWSTR,
1045         Level: DWORD,
1046         pPrinter: LPBYTE,
1047     ) -> HANDLE;
DeletePrinter( hPrinter: HANDLE, ) -> BOOL1048     pub fn DeletePrinter(
1049         hPrinter: HANDLE,
1050     ) -> BOOL;
SetPrinterA( hPrinter: HANDLE, Level: DWORD, pPrinter: LPBYTE, Command: DWORD, ) -> BOOL1051     pub fn SetPrinterA(
1052         hPrinter: HANDLE,
1053         Level: DWORD,
1054         pPrinter: LPBYTE,
1055         Command: DWORD,
1056     ) -> BOOL;
SetPrinterW( hPrinter: HANDLE, Level: DWORD, pPrinter: LPBYTE, Command: DWORD, ) -> BOOL1057     pub fn SetPrinterW(
1058         hPrinter: HANDLE,
1059         Level: DWORD,
1060         pPrinter: LPBYTE,
1061         Command: DWORD,
1062     ) -> BOOL;
GetPrinterA( hPrinter: HANDLE, Level: DWORD, pPrinter: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1063     pub fn GetPrinterA(
1064         hPrinter: HANDLE,
1065         Level: DWORD,
1066         pPrinter: LPBYTE,
1067         cbBuf: DWORD,
1068         pcbNeeded: LPDWORD,
1069     ) -> BOOL;
GetPrinterW( hPrinter: HANDLE, Level: DWORD, pPrinter: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1070     pub fn GetPrinterW(
1071         hPrinter: HANDLE,
1072         Level: DWORD,
1073         pPrinter: LPBYTE,
1074         cbBuf: DWORD,
1075         pcbNeeded: LPDWORD,
1076     ) -> BOOL;
AddPrinterDriverA( pName: LPSTR, Level: DWORD, pDriverInfo: LPBYTE, ) -> BOOL1077     pub fn AddPrinterDriverA(
1078         pName: LPSTR,
1079         Level: DWORD,
1080         pDriverInfo: LPBYTE,
1081     ) -> BOOL;
AddPrinterDriverW( pName: LPWSTR, Level: DWORD, pDriverInfo: LPBYTE, ) -> BOOL1082     pub fn AddPrinterDriverW(
1083         pName: LPWSTR,
1084         Level: DWORD,
1085         pDriverInfo: LPBYTE,
1086     ) -> BOOL;
AddPrinterDriverExA( pName: LPSTR, Level: DWORD, pDriverInfo: PBYTE, dwFileCopyFlags: DWORD, ) -> BOOL1087     pub fn AddPrinterDriverExA(
1088         pName: LPSTR,
1089         Level: DWORD,
1090         pDriverInfo: PBYTE,
1091         dwFileCopyFlags: DWORD,
1092     ) -> BOOL;
AddPrinterDriverExW( pName: LPWSTR, Level: DWORD, pDriverInfo: PBYTE, dwFileCopyFlags: DWORD, ) -> BOOL1093     pub fn AddPrinterDriverExW(
1094         pName: LPWSTR,
1095         Level: DWORD,
1096         pDriverInfo: PBYTE,
1097         dwFileCopyFlags: DWORD,
1098     ) -> BOOL;
EnumPrinterDriversA( pName: LPSTR, pEnvironment: LPSTR, Level: DWORD, pDriverInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1099     pub fn EnumPrinterDriversA(
1100         pName: LPSTR,
1101         pEnvironment: LPSTR,
1102         Level: DWORD,
1103         pDriverInfo: LPBYTE,
1104         cbBuf: DWORD,
1105         pcbNeeded: LPDWORD,
1106         pcReturned: LPDWORD,
1107     ) -> BOOL;
EnumPrinterDriversW( pName: LPWSTR, pEnvironment: LPWSTR, Level: DWORD, pDriverInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1108     pub fn EnumPrinterDriversW(
1109         pName: LPWSTR,
1110         pEnvironment: LPWSTR,
1111         Level: DWORD,
1112         pDriverInfo: LPBYTE,
1113         cbBuf: DWORD,
1114         pcbNeeded: LPDWORD,
1115         pcReturned: LPDWORD,
1116     ) -> BOOL;
GetPrinterDriverA( hPrinter: HANDLE, pEnvironment: LPSTR, Level: DWORD, pDriverInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1117     pub fn GetPrinterDriverA(
1118         hPrinter: HANDLE,
1119         pEnvironment: LPSTR,
1120         Level: DWORD,
1121         pDriverInfo: LPBYTE,
1122         cbBuf: DWORD,
1123         pcbNeeded: LPDWORD,
1124     ) -> BOOL;
GetPrinterDriverW( hPrinter: HANDLE, pEnvironment: LPWSTR, Level: DWORD, pDriverInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1125     pub fn GetPrinterDriverW(
1126         hPrinter: HANDLE,
1127         pEnvironment: LPWSTR,
1128         Level: DWORD,
1129         pDriverInfo: LPBYTE,
1130         cbBuf: DWORD,
1131         pcbNeeded: LPDWORD,
1132     ) -> BOOL;
GetPrinterDriverDirectoryA( pName: LPSTR, pEnvironment: LPSTR, Level: DWORD, pDriverDirectory: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1133     pub fn GetPrinterDriverDirectoryA(
1134         pName: LPSTR,
1135         pEnvironment: LPSTR,
1136         Level: DWORD,
1137         pDriverDirectory: LPBYTE,
1138         cbBuf: DWORD,
1139         pcbNeeded: LPDWORD,
1140     ) -> BOOL;
GetPrinterDriverDirectoryW( pName: LPWSTR, pEnvironment: LPWSTR, Level: DWORD, pDriverDirectory: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1141     pub fn GetPrinterDriverDirectoryW(
1142         pName: LPWSTR,
1143         pEnvironment: LPWSTR,
1144         Level: DWORD,
1145         pDriverDirectory: LPBYTE,
1146         cbBuf: DWORD,
1147         pcbNeeded: LPDWORD,
1148     ) -> BOOL;
DeletePrinterDriverA( pName: LPSTR, pEnvironment: LPSTR, pDriverName: LPSTR, ) -> BOOL1149     pub fn DeletePrinterDriverA(
1150         pName: LPSTR,
1151         pEnvironment: LPSTR,
1152         pDriverName: LPSTR,
1153     ) -> BOOL;
DeletePrinterDriverW( pName: LPWSTR, pEnvironment: LPWSTR, pDriverName: LPWSTR, ) -> BOOL1154     pub fn DeletePrinterDriverW(
1155         pName: LPWSTR,
1156         pEnvironment: LPWSTR,
1157         pDriverName: LPWSTR,
1158     ) -> BOOL;
DeletePrinterDriverExA( pName: LPSTR, pEnvironment: LPSTR, pDriverName: LPSTR, dwDeleteFlag: DWORD, dwVersionFlag: DWORD, ) -> BOOL1159     pub fn DeletePrinterDriverExA(
1160         pName: LPSTR,
1161         pEnvironment: LPSTR,
1162         pDriverName: LPSTR,
1163         dwDeleteFlag: DWORD,
1164         dwVersionFlag: DWORD,
1165     ) -> BOOL;
DeletePrinterDriverExW( pName: LPWSTR, pEnvironment: LPWSTR, pDriverName: LPWSTR, dwDeleteFlag: DWORD, dwVersionFlag: DWORD, ) -> BOOL1166     pub fn DeletePrinterDriverExW(
1167         pName: LPWSTR,
1168         pEnvironment: LPWSTR,
1169         pDriverName: LPWSTR,
1170         dwDeleteFlag: DWORD,
1171         dwVersionFlag: DWORD,
1172     ) -> BOOL;
AddPrintProcessorA( pName: LPSTR, pEnvironment: LPSTR, pPathName: LPSTR, pPrintProcessorName: LPSTR, ) -> BOOL1173     pub fn AddPrintProcessorA(
1174         pName: LPSTR,
1175         pEnvironment: LPSTR,
1176         pPathName: LPSTR,
1177         pPrintProcessorName: LPSTR,
1178     ) -> BOOL;
AddPrintProcessorW( pName: LPWSTR, pEnvironment: LPWSTR, pPathName: LPWSTR, pPrintProcessorName: LPWSTR, ) -> BOOL1179     pub fn AddPrintProcessorW(
1180         pName: LPWSTR,
1181         pEnvironment: LPWSTR,
1182         pPathName: LPWSTR,
1183         pPrintProcessorName: LPWSTR,
1184     ) -> BOOL;
EnumPrintProcessorsA( pName: LPSTR, pEnvironment: LPSTR, Level: DWORD, pPrintProcessorInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1185     pub fn EnumPrintProcessorsA(
1186         pName: LPSTR,
1187         pEnvironment: LPSTR,
1188         Level: DWORD,
1189         pPrintProcessorInfo: LPBYTE,
1190         cbBuf: DWORD,
1191         pcbNeeded: LPDWORD,
1192         pcReturned: LPDWORD,
1193     ) -> BOOL;
EnumPrintProcessorsW( pName: LPWSTR, pEnvironment: LPWSTR, Level: DWORD, pPrintProcessorInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1194     pub fn EnumPrintProcessorsW(
1195         pName: LPWSTR,
1196         pEnvironment: LPWSTR,
1197         Level: DWORD,
1198         pPrintProcessorInfo: LPBYTE,
1199         cbBuf: DWORD,
1200         pcbNeeded: LPDWORD,
1201         pcReturned: LPDWORD,
1202     ) -> BOOL;
GetPrintProcessorDirectoryA( pName: LPSTR, pEnvironment: LPSTR, Level: DWORD, pPrintProcessorInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1203     pub fn GetPrintProcessorDirectoryA(
1204         pName: LPSTR,
1205         pEnvironment: LPSTR,
1206         Level: DWORD,
1207         pPrintProcessorInfo: LPBYTE,
1208         cbBuf: DWORD,
1209         pcbNeeded: LPDWORD,
1210     ) -> BOOL;
GetPrintProcessorDirectoryW( pName: LPWSTR, pEnvironment: LPWSTR, Level: DWORD, pPrintProcessorInfo: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1211     pub fn GetPrintProcessorDirectoryW(
1212         pName: LPWSTR,
1213         pEnvironment: LPWSTR,
1214         Level: DWORD,
1215         pPrintProcessorInfo: LPBYTE,
1216         cbBuf: DWORD,
1217         pcbNeeded: LPDWORD,
1218     ) -> BOOL;
EnumPrintProcessorDatatypesA( pName: LPSTR, pPrintProcessorName: LPSTR, Level: DWORD, pDatatypes: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1219     pub fn EnumPrintProcessorDatatypesA(
1220         pName: LPSTR,
1221         pPrintProcessorName: LPSTR,
1222         Level: DWORD,
1223         pDatatypes: LPBYTE,
1224         cbBuf: DWORD,
1225         pcbNeeded: LPDWORD,
1226         pcReturned: LPDWORD,
1227     ) -> BOOL;
EnumPrintProcessorDatatypesW( pName: LPWSTR, pPrintProcessorName: LPWSTR, Level: DWORD, pDatatypes: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1228     pub fn EnumPrintProcessorDatatypesW(
1229         pName: LPWSTR,
1230         pPrintProcessorName: LPWSTR,
1231         Level: DWORD,
1232         pDatatypes: LPBYTE,
1233         cbBuf: DWORD,
1234         pcbNeeded: LPDWORD,
1235         pcReturned: LPDWORD,
1236     ) -> BOOL;
DeletePrintProcessorA( pName: LPSTR, pEnvironment: LPSTR, pPrintProcessorName: LPSTR, ) -> BOOL1237     pub fn DeletePrintProcessorA(
1238         pName: LPSTR,
1239         pEnvironment: LPSTR,
1240         pPrintProcessorName: LPSTR,
1241     ) -> BOOL;
DeletePrintProcessorW( pName: LPWSTR, pEnvironment: LPWSTR, pPrintProcessorName: LPWSTR, ) -> BOOL1242     pub fn DeletePrintProcessorW(
1243         pName: LPWSTR,
1244         pEnvironment: LPWSTR,
1245         pPrintProcessorName: LPWSTR,
1246     ) -> BOOL;
StartDocPrinterA( hPrinter: HANDLE, Level: DWORD, pDocInfo: LPBYTE, ) -> DWORD1247     pub fn StartDocPrinterA(
1248         hPrinter: HANDLE,
1249         Level: DWORD,
1250         pDocInfo: LPBYTE,
1251     ) -> DWORD;
StartDocPrinterW( hPrinter: HANDLE, Level: DWORD, pDocInfo: LPBYTE, ) -> DWORD1252     pub fn StartDocPrinterW(
1253         hPrinter: HANDLE,
1254         Level: DWORD,
1255         pDocInfo: LPBYTE,
1256     ) -> DWORD;
StartPagePrinter( hPrinter: HANDLE, ) -> BOOL1257     pub fn StartPagePrinter(
1258         hPrinter: HANDLE,
1259     ) -> BOOL;
WritePrinter( hPrinter: HANDLE, pBuf: LPVOID, cbBuf: DWORD, pcWritten: LPDWORD, ) -> BOOL1260     pub fn WritePrinter(
1261         hPrinter: HANDLE,
1262         pBuf: LPVOID,
1263         cbBuf: DWORD,
1264         pcWritten: LPDWORD,
1265     ) -> BOOL;
FlushPrinter( hPrinter: HANDLE, pBuf: LPVOID, cbBuf: DWORD, pcWritten: LPDWORD, cSleep: DWORD, ) -> BOOL1266     pub fn FlushPrinter(
1267         hPrinter: HANDLE,
1268         pBuf: LPVOID,
1269         cbBuf: DWORD,
1270         pcWritten: LPDWORD,
1271         cSleep: DWORD,
1272     ) -> BOOL;
EndPagePrinter( hPrinter: HANDLE, ) -> BOOL1273     pub fn EndPagePrinter(
1274         hPrinter: HANDLE,
1275     ) -> BOOL;
AbortPrinter( hPrinter: HANDLE, ) -> BOOL1276     pub fn AbortPrinter(
1277         hPrinter: HANDLE,
1278     ) -> BOOL;
ReadPrinter( hPrinter: HANDLE, pBuf: LPVOID, cbBuf: DWORD, pNoBytesRead: LPDWORD, ) -> BOOL1279     pub fn ReadPrinter(
1280         hPrinter: HANDLE,
1281         pBuf: LPVOID,
1282         cbBuf: DWORD,
1283         pNoBytesRead: LPDWORD,
1284     ) -> BOOL;
EndDocPrinter( hPrinter: HANDLE, ) -> BOOL1285     pub fn EndDocPrinter(
1286         hPrinter: HANDLE,
1287     ) -> BOOL;
AddJobA( hPrinter: HANDLE, Level: DWORD, pData: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1288     pub fn AddJobA(
1289         hPrinter: HANDLE,
1290         Level: DWORD,
1291         pData: LPBYTE,
1292         cbBuf: DWORD,
1293         pcbNeeded: LPDWORD,
1294     ) -> BOOL;
AddJobW( hPrinter: HANDLE, Level: DWORD, pData: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1295     pub fn AddJobW(
1296         hPrinter: HANDLE,
1297         Level: DWORD,
1298         pData: LPBYTE,
1299         cbBuf: DWORD,
1300         pcbNeeded: LPDWORD,
1301     ) -> BOOL;
ScheduleJob( hPrinter: HANDLE, JobId: DWORD, ) -> BOOL1302     pub fn ScheduleJob(
1303         hPrinter: HANDLE,
1304         JobId: DWORD,
1305     ) -> BOOL;
PrinterProperties( hWnd: HWND, hPrinter: HANDLE, ) -> BOOL1306     pub fn PrinterProperties(
1307         hWnd: HWND,
1308         hPrinter: HANDLE,
1309     ) -> BOOL;
DocumentPropertiesA( hWnd: HWND, hPrinter: HANDLE, pDeviceName: LPSTR, pDevModeOutput: PDEVMODEA, pDevModeInput: PDEVMODEA, fMode: DWORD, ) -> LONG1310     pub fn DocumentPropertiesA(
1311         hWnd: HWND,
1312         hPrinter: HANDLE,
1313         pDeviceName: LPSTR,
1314         pDevModeOutput: PDEVMODEA,
1315         pDevModeInput: PDEVMODEA,
1316         fMode: DWORD,
1317     ) -> LONG;
DocumentPropertiesW( hWnd: HWND, hPrinter: HANDLE, pDeviceName: LPWSTR, pDevModeOutput: PDEVMODEW, pDevModeInput: PDEVMODEW, fMode: DWORD, ) -> LONG1318     pub fn DocumentPropertiesW(
1319         hWnd: HWND,
1320         hPrinter: HANDLE,
1321         pDeviceName: LPWSTR,
1322         pDevModeOutput: PDEVMODEW,
1323         pDevModeInput: PDEVMODEW,
1324         fMode: DWORD,
1325     ) -> LONG;
AdvancedDocumentPropertiesA( hWnd: HWND, hPrinter: HANDLE, pDeviceName: LPSTR, pDevModeOutput: PDEVMODEA, pDevModeInput: PDEVMODEA, ) -> LONG1326     pub fn AdvancedDocumentPropertiesA(
1327         hWnd: HWND,
1328         hPrinter: HANDLE,
1329         pDeviceName: LPSTR,
1330         pDevModeOutput: PDEVMODEA,
1331         pDevModeInput: PDEVMODEA,
1332     ) -> LONG;
AdvancedDocumentPropertiesW( hWnd: HWND, hPrinter: HANDLE, pDeviceName: LPWSTR, pDevModeOutput: PDEVMODEW, pDevModeInput: PDEVMODEW, ) -> LONG1333     pub fn AdvancedDocumentPropertiesW(
1334         hWnd: HWND,
1335         hPrinter: HANDLE,
1336         pDeviceName: LPWSTR,
1337         pDevModeOutput: PDEVMODEW,
1338         pDevModeInput: PDEVMODEW,
1339     ) -> LONG;
ExtDeviceMode( hWnd: HWND, hInst: HANDLE, pDevModeOutput: LPDEVMODEA, pDeviceName: LPSTR, pPort: LPSTR, pDevModeInput: LPDEVMODEA, pProfile: LPSTR, fMode: DWORD, ) -> LONG1340     pub fn ExtDeviceMode(
1341         hWnd: HWND,
1342         hInst: HANDLE,
1343         pDevModeOutput: LPDEVMODEA,
1344         pDeviceName: LPSTR,
1345         pPort: LPSTR,
1346         pDevModeInput: LPDEVMODEA,
1347         pProfile: LPSTR,
1348         fMode: DWORD,
1349     ) -> LONG;
GetPrinterDataA( hPrinter: HANDLE, pValueName: LPSTR, pType: LPDWORD, pData: LPBYTE, nSize: DWORD, pcbNeeded: LPDWORD, ) -> DWORD1350     pub fn GetPrinterDataA(
1351         hPrinter: HANDLE,
1352         pValueName: LPSTR,
1353         pType: LPDWORD,
1354         pData: LPBYTE,
1355         nSize: DWORD,
1356         pcbNeeded: LPDWORD,
1357     ) -> DWORD;
GetPrinterDataW( hPrinter: HANDLE, pValueName: LPWSTR, pType: LPDWORD, pData: LPBYTE, nSize: DWORD, pcbNeeded: LPDWORD, ) -> DWORD1358     pub fn GetPrinterDataW(
1359         hPrinter: HANDLE,
1360         pValueName: LPWSTR,
1361         pType: LPDWORD,
1362         pData: LPBYTE,
1363         nSize: DWORD,
1364         pcbNeeded: LPDWORD,
1365     ) -> DWORD;
GetPrinterDataExA( hPrinter: HANDLE, pKeyName: LPCSTR, pValueName: LPCSTR, pType: LPDWORD, pData: LPBYTE, nSize: DWORD, pcbNeeded: LPDWORD, ) -> DWORD1366     pub fn GetPrinterDataExA(
1367         hPrinter: HANDLE,
1368         pKeyName: LPCSTR,
1369         pValueName: LPCSTR,
1370         pType: LPDWORD,
1371         pData: LPBYTE,
1372         nSize: DWORD,
1373         pcbNeeded: LPDWORD,
1374     ) -> DWORD;
GetPrinterDataExW( hPrinter: HANDLE, pKeyName: LPCWSTR, pValueName: LPCWSTR, pType: LPDWORD, pData: LPBYTE, nSize: DWORD, pcbNeeded: LPDWORD, ) -> DWORD1375     pub fn GetPrinterDataExW(
1376         hPrinter: HANDLE,
1377         pKeyName: LPCWSTR,
1378         pValueName: LPCWSTR,
1379         pType: LPDWORD,
1380         pData: LPBYTE,
1381         nSize: DWORD,
1382         pcbNeeded: LPDWORD,
1383     ) -> DWORD;
EnumPrinterDataA( hPrinter: HANDLE, dwIndex: DWORD, pValueName: LPSTR, cbValueName: DWORD, pcbValueName: LPDWORD, pType: LPDWORD, pData: LPBYTE, cbData: DWORD, pcbData: LPDWORD, ) -> DWORD1384     pub fn EnumPrinterDataA(
1385         hPrinter: HANDLE,
1386         dwIndex: DWORD,
1387         pValueName: LPSTR,
1388         cbValueName: DWORD,
1389         pcbValueName: LPDWORD,
1390         pType: LPDWORD,
1391         pData: LPBYTE,
1392         cbData: DWORD,
1393         pcbData: LPDWORD,
1394     ) -> DWORD;
EnumPrinterDataW( hPrinter: HANDLE, dwIndex: DWORD, pValueName: LPWSTR, cbValueName: DWORD, pcbValueName: LPDWORD, pType: LPDWORD, pData: LPBYTE, cbData: DWORD, pcbData: LPDWORD, ) -> DWORD1395     pub fn EnumPrinterDataW(
1396         hPrinter: HANDLE,
1397         dwIndex: DWORD,
1398         pValueName: LPWSTR,
1399         cbValueName: DWORD,
1400         pcbValueName: LPDWORD,
1401         pType: LPDWORD,
1402         pData: LPBYTE,
1403         cbData: DWORD,
1404         pcbData: LPDWORD,
1405     ) -> DWORD;
EnumPrinterDataExA( hPrinter: HANDLE, pKeyName: LPCSTR, pEnumValues: LPBYTE, cbEnumValues: DWORD, pcbEnumValues: LPDWORD, pnEnumValues: LPDWORD, ) -> DWORD1406     pub fn EnumPrinterDataExA(
1407         hPrinter: HANDLE,
1408         pKeyName: LPCSTR,
1409         pEnumValues: LPBYTE,
1410         cbEnumValues: DWORD,
1411         pcbEnumValues: LPDWORD,
1412         pnEnumValues: LPDWORD,
1413     ) -> DWORD;
EnumPrinterDataExW( hPrinter: HANDLE, pKeyName: LPCWSTR, pEnumValues: LPBYTE, cbEnumValues: DWORD, pcbEnumValues: LPDWORD, pnEnumValues: LPDWORD, ) -> DWORD1414     pub fn EnumPrinterDataExW(
1415         hPrinter: HANDLE,
1416         pKeyName: LPCWSTR,
1417         pEnumValues: LPBYTE,
1418         cbEnumValues: DWORD,
1419         pcbEnumValues: LPDWORD,
1420         pnEnumValues: LPDWORD,
1421     ) -> DWORD;
EnumPrinterKeyA( hPrinter: HANDLE, pKeyName: LPCSTR, pSubKey: LPSTR, cbSubkey: DWORD, pcbSubkey: LPDWORD, ) -> DWORD1422     pub fn EnumPrinterKeyA(
1423         hPrinter: HANDLE,
1424         pKeyName: LPCSTR,
1425         pSubKey: LPSTR,
1426         cbSubkey: DWORD,
1427         pcbSubkey: LPDWORD,
1428     ) -> DWORD;
EnumPrinterKeyW( hPrinter: HANDLE, pKeyName: LPCWSTR, pSubKey: LPWSTR, cbSubkey: DWORD, pcbSubkey: LPDWORD, ) -> DWORD1429     pub fn EnumPrinterKeyW(
1430         hPrinter: HANDLE,
1431         pKeyName: LPCWSTR,
1432         pSubKey: LPWSTR,
1433         cbSubkey: DWORD,
1434         pcbSubkey: LPDWORD,
1435     ) -> DWORD;
SetPrinterDataA( hPrinter: HANDLE, pValueName: LPSTR, Type: DWORD, pData: LPBYTE, cbData: DWORD, ) -> DWORD1436     pub fn SetPrinterDataA(
1437         hPrinter: HANDLE,
1438         pValueName: LPSTR,
1439         Type: DWORD,
1440         pData: LPBYTE,
1441         cbData: DWORD,
1442     ) -> DWORD;
SetPrinterDataW( hPrinter: HANDLE, pValueName: LPWSTR, Type: DWORD, pData: LPBYTE, cbData: DWORD, ) -> DWORD1443     pub fn SetPrinterDataW(
1444         hPrinter: HANDLE,
1445         pValueName: LPWSTR,
1446         Type: DWORD,
1447         pData: LPBYTE,
1448         cbData: DWORD,
1449     ) -> DWORD;
SetPrinterDataExA( hPrinter: HANDLE, pKeyName: LPCSTR, pValueName: LPCSTR, Type: DWORD, pData: LPBYTE, cbData: DWORD, ) -> DWORD1450     pub fn SetPrinterDataExA(
1451         hPrinter: HANDLE,
1452         pKeyName: LPCSTR,
1453         pValueName: LPCSTR,
1454         Type: DWORD,
1455         pData: LPBYTE,
1456         cbData: DWORD,
1457     ) -> DWORD;
SetPrinterDataExW( hPrinter: HANDLE, pKeyName: LPCWSTR, pValueName: LPCWSTR, Type: DWORD, pData: LPBYTE, cbData: DWORD, ) -> DWORD1458     pub fn SetPrinterDataExW(
1459         hPrinter: HANDLE,
1460         pKeyName: LPCWSTR,
1461         pValueName: LPCWSTR,
1462         Type: DWORD,
1463         pData: LPBYTE,
1464         cbData: DWORD,
1465     ) -> DWORD;
DeletePrinterDataA( hPrinter: HANDLE, pValueName: LPSTR, ) -> DWORD1466     pub fn DeletePrinterDataA(
1467         hPrinter: HANDLE,
1468         pValueName: LPSTR,
1469     ) -> DWORD;
DeletePrinterDataW( hPrinter: HANDLE, pValueName: LPWSTR, ) -> DWORD1470     pub fn DeletePrinterDataW(
1471         hPrinter: HANDLE,
1472         pValueName: LPWSTR,
1473     ) -> DWORD;
DeletePrinterDataExA( hPrinter: HANDLE, pKeyName: LPCSTR, pValueName: LPCSTR, ) -> DWORD1474     pub fn DeletePrinterDataExA(
1475         hPrinter: HANDLE,
1476         pKeyName: LPCSTR,
1477         pValueName: LPCSTR,
1478     ) -> DWORD;
DeletePrinterDataExW( hPrinter: HANDLE, pKeyName: LPCWSTR, pValueName: LPCWSTR, ) -> DWORD1479     pub fn DeletePrinterDataExW(
1480         hPrinter: HANDLE,
1481         pKeyName: LPCWSTR,
1482         pValueName: LPCWSTR,
1483     ) -> DWORD;
DeletePrinterKeyA( hPrinter: HANDLE, pKeyName: LPCSTR, ) -> DWORD1484     pub fn DeletePrinterKeyA(
1485         hPrinter: HANDLE,
1486         pKeyName: LPCSTR,
1487     ) -> DWORD;
DeletePrinterKeyW( hPrinter: HANDLE, pKeyName: LPCWSTR, ) -> DWORD1488     pub fn DeletePrinterKeyW(
1489         hPrinter: HANDLE,
1490         pKeyName: LPCWSTR,
1491     ) -> DWORD;
1492 }
1493 pub const PRINTER_NOTIFY_TYPE: DWORD = 0x00;
1494 pub const JOB_NOTIFY_TYPE: DWORD = 0x01;
1495 pub const SERVER_NOTIFY_TYPE: DWORD = 0x02;
1496 pub const PRINTER_NOTIFY_FIELD_SERVER_NAME: DWORD = 0x00;
1497 pub const PRINTER_NOTIFY_FIELD_PRINTER_NAME: DWORD = 0x01;
1498 pub const PRINTER_NOTIFY_FIELD_SHARE_NAME: DWORD = 0x02;
1499 pub const PRINTER_NOTIFY_FIELD_PORT_NAME: DWORD = 0x03;
1500 pub const PRINTER_NOTIFY_FIELD_DRIVER_NAME: DWORD = 0x04;
1501 pub const PRINTER_NOTIFY_FIELD_COMMENT: DWORD = 0x05;
1502 pub const PRINTER_NOTIFY_FIELD_LOCATION: DWORD = 0x06;
1503 pub const PRINTER_NOTIFY_FIELD_DEVMODE: DWORD = 0x07;
1504 pub const PRINTER_NOTIFY_FIELD_SEPFILE: DWORD = 0x08;
1505 pub const PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR: DWORD = 0x09;
1506 pub const PRINTER_NOTIFY_FIELD_PARAMETERS: DWORD = 0x0A;
1507 pub const PRINTER_NOTIFY_FIELD_DATATYPE: DWORD = 0x0B;
1508 pub const PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR: DWORD = 0x0C;
1509 pub const PRINTER_NOTIFY_FIELD_ATTRIBUTES: DWORD = 0x0D;
1510 pub const PRINTER_NOTIFY_FIELD_PRIORITY: DWORD = 0x0E;
1511 pub const PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY: DWORD = 0x0F;
1512 pub const PRINTER_NOTIFY_FIELD_START_TIME: DWORD = 0x10;
1513 pub const PRINTER_NOTIFY_FIELD_UNTIL_TIME: DWORD = 0x11;
1514 pub const PRINTER_NOTIFY_FIELD_STATUS: DWORD = 0x12;
1515 pub const PRINTER_NOTIFY_FIELD_STATUS_STRING: DWORD = 0x13;
1516 pub const PRINTER_NOTIFY_FIELD_CJOBS: DWORD = 0x14;
1517 pub const PRINTER_NOTIFY_FIELD_AVERAGE_PPM: DWORD = 0x15;
1518 pub const PRINTER_NOTIFY_FIELD_TOTAL_PAGES: DWORD = 0x16;
1519 pub const PRINTER_NOTIFY_FIELD_PAGES_PRINTED: DWORD = 0x17;
1520 pub const PRINTER_NOTIFY_FIELD_TOTAL_BYTES: DWORD = 0x18;
1521 pub const PRINTER_NOTIFY_FIELD_BYTES_PRINTED: DWORD = 0x19;
1522 pub const PRINTER_NOTIFY_FIELD_OBJECT_GUID: DWORD = 0x1A;
1523 pub const PRINTER_NOTIFY_FIELD_FRIENDLY_NAME: DWORD = 0x1B;
1524 pub const PRINTER_NOTIFY_FIELD_BRANCH_OFFICE_PRINTING: DWORD = 0x1C;
1525 pub const JOB_NOTIFY_FIELD_PRINTER_NAME: DWORD = 0x00;
1526 pub const JOB_NOTIFY_FIELD_MACHINE_NAME: DWORD = 0x01;
1527 pub const JOB_NOTIFY_FIELD_PORT_NAME: DWORD = 0x02;
1528 pub const JOB_NOTIFY_FIELD_USER_NAME: DWORD = 0x03;
1529 pub const JOB_NOTIFY_FIELD_NOTIFY_NAME: DWORD = 0x04;
1530 pub const JOB_NOTIFY_FIELD_DATATYPE: DWORD = 0x05;
1531 pub const JOB_NOTIFY_FIELD_PRINT_PROCESSOR: DWORD = 0x06;
1532 pub const JOB_NOTIFY_FIELD_PARAMETERS: DWORD = 0x07;
1533 pub const JOB_NOTIFY_FIELD_DRIVER_NAME: DWORD = 0x08;
1534 pub const JOB_NOTIFY_FIELD_DEVMODE: DWORD = 0x09;
1535 pub const JOB_NOTIFY_FIELD_STATUS: DWORD = 0x0A;
1536 pub const JOB_NOTIFY_FIELD_STATUS_STRING: DWORD = 0x0B;
1537 pub const JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR: DWORD = 0x0C;
1538 pub const JOB_NOTIFY_FIELD_DOCUMENT: DWORD = 0x0D;
1539 pub const JOB_NOTIFY_FIELD_PRIORITY: DWORD = 0x0E;
1540 pub const JOB_NOTIFY_FIELD_POSITION: DWORD = 0x0F;
1541 pub const JOB_NOTIFY_FIELD_SUBMITTED: DWORD = 0x10;
1542 pub const JOB_NOTIFY_FIELD_START_TIME: DWORD = 0x11;
1543 pub const JOB_NOTIFY_FIELD_UNTIL_TIME: DWORD = 0x12;
1544 pub const JOB_NOTIFY_FIELD_TIME: DWORD = 0x13;
1545 pub const JOB_NOTIFY_FIELD_TOTAL_PAGES: DWORD = 0x14;
1546 pub const JOB_NOTIFY_FIELD_PAGES_PRINTED: DWORD = 0x15;
1547 pub const JOB_NOTIFY_FIELD_TOTAL_BYTES: DWORD = 0x16;
1548 pub const JOB_NOTIFY_FIELD_BYTES_PRINTED: DWORD = 0x17;
1549 pub const JOB_NOTIFY_FIELD_REMOTE_JOB_ID: DWORD = 0x18;
1550 pub const SERVER_NOTIFY_FIELD_PRINT_DRIVER_ISOLATION_GROUP: DWORD = 0x00;
1551 pub const PRINTER_NOTIFY_CATEGORY_ALL: DWORD = 0x001000;
1552 pub const PRINTER_NOTIFY_CATEGORY_3D: DWORD = 0x002000;
1553 STRUCT!{struct PRINTER_NOTIFY_OPTIONS_TYPE {
1554     Type: WORD,
1555     Reserved0: WORD,
1556     Reserved1: DWORD,
1557     Reserved2: DWORD,
1558     Count: DWORD,
1559     pFields: PWORD,
1560 }}
1561 pub type PPRINTER_NOTIFY_OPTIONS_TYPE = *mut PRINTER_NOTIFY_OPTIONS_TYPE;
1562 pub type LPPRINTER_NOTIFY_OPTIONS_TYPE = *mut PRINTER_NOTIFY_OPTIONS_TYPE;
1563 pub const PRINTER_NOTIFY_OPTIONS_REFRESH: DWORD = 0x01;
1564 STRUCT!{struct PRINTER_NOTIFY_OPTIONS {
1565     Version: DWORD,
1566     Flags: DWORD,
1567     Count: DWORD,
1568     pTypes: PPRINTER_NOTIFY_OPTIONS_TYPE,
1569 }}
1570 pub type PPRINTER_NOTIFY_OPTIONS = *mut PRINTER_NOTIFY_OPTIONS;
1571 pub type LPPRINTER_NOTIFY_OPTIONS = *mut PRINTER_NOTIFY_OPTIONS;
1572 pub const PRINTER_NOTIFY_INFO_DISCARDED: DWORD = 0x01;
1573 STRUCT!{struct PRINTER_NOTIFY_INFO_DATA_NotifyData_Data {
1574     cbBuf: DWORD,
1575     pBuf: LPVOID,
1576 }}
1577 UNION!{union PRINTER_NOTIFY_INFO_DATA_NotifyData {
1578     [usize; 2],
1579     adwData adwData_mut: [DWORD; 2],
1580     Data Data_mut: PRINTER_NOTIFY_INFO_DATA_NotifyData_Data,
1581 }}
1582 STRUCT!{struct PRINTER_NOTIFY_INFO_DATA {
1583     Type: WORD,
1584     Field: WORD,
1585     Reserved: DWORD,
1586     Id: DWORD,
1587     NotifyData: PRINTER_NOTIFY_INFO_DATA_NotifyData,
1588 }}
1589 pub type PPRINTER_NOTIFY_INFO_DATA = *mut PRINTER_NOTIFY_INFO_DATA;
1590 pub type LPPRINTER_NOTIFY_INFO_DATA = *mut PRINTER_NOTIFY_INFO_DATA;
1591 STRUCT!{struct PRINTER_NOTIFY_INFO {
1592     Version: DWORD,
1593     Flags: DWORD,
1594     Count: DWORD,
1595     aData: [PRINTER_NOTIFY_INFO_DATA; 1],
1596 }}
1597 pub type PPRINTER_NOTIFY_INFO = *mut PRINTER_NOTIFY_INFO;
1598 pub type LPPRINTER_NOTIFY_INFO = *mut PRINTER_NOTIFY_INFO;
1599 STRUCT!{struct BINARY_CONTAINER {
1600     cbBuf: DWORD,
1601     pData: LPBYTE,
1602 }}
1603 pub type PBINARY_CONTAINER = *mut BINARY_CONTAINER;
1604 UNION!{union BIDI_DATA_u {
1605     [usize; 2],
1606     bData bData_mut: BOOL,
1607     iData iData_mut: LONG,
1608     sData sData_mut: LPWSTR,
1609     fData fData_mut: FLOAT,
1610     biData biData_mut: BINARY_CONTAINER,
1611 }}
1612 STRUCT!{struct BIDI_DATA {
1613     dwBidiType: DWORD,
1614     u: BIDI_DATA_u,
1615 }}
1616 pub type PBIDI_DATA = *mut BIDI_DATA;
1617 pub type LPBIDI_DATA = *mut BIDI_DATA;
1618 STRUCT!{struct BIDI_REQUEST_DATA {
1619     dwReqNumber: DWORD,
1620     pSchema: LPWSTR,
1621     data: BIDI_DATA,
1622 }}
1623 pub type PBIDI_REQUEST_DATA = *mut BIDI_REQUEST_DATA;
1624 pub type LPBIDI_REQUEST_DATA = *mut BIDI_REQUEST_DATA;
1625 STRUCT!{struct BIDI_REQUEST_CONTAINER {
1626     Version: DWORD,
1627     Flags: DWORD,
1628     Count: DWORD,
1629     aData: [BIDI_REQUEST_DATA; 1],
1630 }}
1631 pub type PBIDI_REQUEST_CONTAINER = *mut BIDI_REQUEST_CONTAINER;
1632 pub type LPBIDI_REQUEST_CONTAINER = *mut BIDI_REQUEST_CONTAINER;
1633 STRUCT!{struct BIDI_RESPONSE_DATA {
1634     dwResult: DWORD,
1635     dwReqNumber: DWORD,
1636     pSchema: LPWSTR,
1637     data: BIDI_DATA,
1638 }}
1639 pub type PBIDI_RESPONSE_DATA = *mut BIDI_RESPONSE_DATA;
1640 pub type LPBIDI_RESPONSE_DATA = *mut BIDI_RESPONSE_DATA;
1641 STRUCT!{struct BIDI_RESPONSE_CONTAINER {
1642     Version: DWORD,
1643     Flags: DWORD,
1644     Count: DWORD,
1645     aData: [BIDI_RESPONSE_DATA; 1],
1646 }}
1647 pub type PBIDI_RESPONSE_CONTAINER = *mut BIDI_RESPONSE_CONTAINER;
1648 pub type LPBIDI_RESPONSE_CONTAINER = *mut BIDI_RESPONSE_CONTAINER;
1649 pub const BIDI_ACTION_ENUM_SCHEMA: &'static str = "EnumSchema";
1650 pub const BIDI_ACTION_GET: &'static str = "Get";
1651 pub const BIDI_ACTION_SET: &'static str = "Set";
1652 pub const BIDI_ACTION_GET_ALL: &'static str = "GetAll";
1653 pub const BIDI_ACTION_GET_WITH_ARGUMENT: &'static str = "GetWithArgument";
1654 ENUM!{enum BIDI_TYPE {
1655     BIDI_NULL = 0,
1656     BIDI_INT = 1,
1657     BIDI_FLOAT = 2,
1658     BIDI_BOOL = 3,
1659     BIDI_STRING = 4,
1660     BIDI_TEXT = 5,
1661     BIDI_ENUM = 6,
1662     BIDI_BLOB = 7,
1663 }}
1664 pub const BIDI_ACCESS_ADMINISTRATOR: DWORD = 0x1;
1665 pub const BIDI_ACCESS_USER: DWORD = 0x2;
1666 pub const ERROR_BIDI_STATUS_OK: DWORD = 0;
1667 pub const ERROR_BIDI_NOT_SUPPORTED: DWORD = ERROR_NOT_SUPPORTED;
1668 pub const ERROR_BIDI_ERROR_BASE: DWORD = 13000;
1669 pub const ERROR_BIDI_STATUS_WARNING: DWORD = ERROR_BIDI_ERROR_BASE + 1;
1670 pub const ERROR_BIDI_SCHEMA_READ_ONLY: DWORD = ERROR_BIDI_ERROR_BASE + 2;
1671 pub const ERROR_BIDI_SERVER_OFFLINE: DWORD = ERROR_BIDI_ERROR_BASE + 3;
1672 pub const ERROR_BIDI_DEVICE_OFFLINE: DWORD = ERROR_BIDI_ERROR_BASE + 4;
1673 pub const ERROR_BIDI_SCHEMA_NOT_SUPPORTED: DWORD = ERROR_BIDI_ERROR_BASE + 5;
1674 pub const ERROR_BIDI_SET_DIFFERENT_TYPE: DWORD = ERROR_BIDI_ERROR_BASE + 6;
1675 pub const ERROR_BIDI_SET_MULTIPLE_SCHEMAPATH: DWORD = ERROR_BIDI_ERROR_BASE + 7;
1676 pub const ERROR_BIDI_SET_INVALID_SCHEMAPATH: DWORD = ERROR_BIDI_ERROR_BASE + 8;
1677 pub const ERROR_BIDI_SET_UNKNOWN_FAILURE: DWORD = ERROR_BIDI_ERROR_BASE + 9;
1678 pub const ERROR_BIDI_SCHEMA_WRITE_ONLY: DWORD = ERROR_BIDI_ERROR_BASE + 10;
1679 pub const ERROR_BIDI_GET_REQUIRES_ARGUMENT: DWORD = ERROR_BIDI_ERROR_BASE + 11;
1680 pub const ERROR_BIDI_GET_ARGUMENT_NOT_SUPPORTED: DWORD = ERROR_BIDI_ERROR_BASE + 12;
1681 pub const ERROR_BIDI_GET_MISSING_ARGUMENT: DWORD = ERROR_BIDI_ERROR_BASE + 13;
1682 pub const ERROR_BIDI_DEVICE_CONFIG_UNCHANGED: DWORD = ERROR_BIDI_ERROR_BASE + 14;
1683 pub const ERROR_BIDI_NO_LOCALIZED_RESOURCES: DWORD = ERROR_BIDI_ERROR_BASE + 15;
1684 pub const ERROR_BIDI_NO_BIDI_SCHEMA_EXTENSIONS: DWORD = ERROR_BIDI_ERROR_BASE + 16;
1685 pub const ERROR_BIDI_UNSUPPORTED_CLIENT_LANGUAGE: DWORD = ERROR_BIDI_ERROR_BASE + 17;
1686 pub const ERROR_BIDI_UNSUPPORTED_RESOURCE_FORMAT: DWORD = ERROR_BIDI_ERROR_BASE + 18;
1687 extern "system" {
WaitForPrinterChange( hPrinter: HANDLE, Flags: DWORD, ) -> DWORD1688     pub fn WaitForPrinterChange(
1689         hPrinter: HANDLE,
1690         Flags: DWORD,
1691     ) -> DWORD;
FindFirstPrinterChangeNotification( hPrinter: HANDLE, fdwFilter: DWORD, fdwOptions: DWORD, pPrinterNotifyOptions: LPVOID, ) -> HANDLE1692     pub fn FindFirstPrinterChangeNotification(
1693         hPrinter: HANDLE,
1694         fdwFilter: DWORD,
1695         fdwOptions: DWORD,
1696         pPrinterNotifyOptions: LPVOID,
1697     ) -> HANDLE;
FindNextPrinterChangeNotification( hChange: HANDLE, pdwChange: PDWORD, pPrinterNotifyOptions: LPVOID, ppPrinterNotifyInfo: *mut LPVOID, ) -> BOOL1698     pub fn FindNextPrinterChangeNotification(
1699         hChange: HANDLE,
1700         pdwChange: PDWORD,
1701         pPrinterNotifyOptions: LPVOID,
1702         ppPrinterNotifyInfo: *mut LPVOID,
1703     ) -> BOOL;
FreePrinterNotifyInfo( pPrinterNotifyInfo: PPRINTER_NOTIFY_INFO, ) -> BOOL1704     pub fn FreePrinterNotifyInfo(
1705         pPrinterNotifyInfo: PPRINTER_NOTIFY_INFO,
1706     ) -> BOOL;
FindClosePrinterChangeNotification( hChange: HANDLE, ) -> BOOL1707     pub fn FindClosePrinterChangeNotification(
1708         hChange: HANDLE,
1709     ) -> BOOL;
1710 }
1711 pub const PRINTER_CHANGE_ADD_PRINTER: DWORD = 0x00000001;
1712 pub const PRINTER_CHANGE_SET_PRINTER: DWORD = 0x00000002;
1713 pub const PRINTER_CHANGE_DELETE_PRINTER: DWORD = 0x00000004;
1714 pub const PRINTER_CHANGE_FAILED_CONNECTION_PRINTER: DWORD = 0x00000008;
1715 pub const PRINTER_CHANGE_PRINTER: DWORD = 0x000000FF;
1716 pub const PRINTER_CHANGE_ADD_JOB: DWORD = 0x00000100;
1717 pub const PRINTER_CHANGE_SET_JOB: DWORD = 0x00000200;
1718 pub const PRINTER_CHANGE_DELETE_JOB: DWORD = 0x00000400;
1719 pub const PRINTER_CHANGE_WRITE_JOB: DWORD = 0x00000800;
1720 pub const PRINTER_CHANGE_JOB: DWORD = 0x0000FF00;
1721 pub const PRINTER_CHANGE_ADD_FORM: DWORD = 0x00010000;
1722 pub const PRINTER_CHANGE_SET_FORM: DWORD = 0x00020000;
1723 pub const PRINTER_CHANGE_DELETE_FORM: DWORD = 0x00040000;
1724 pub const PRINTER_CHANGE_FORM: DWORD = 0x00070000;
1725 pub const PRINTER_CHANGE_ADD_PORT: DWORD = 0x00100000;
1726 pub const PRINTER_CHANGE_CONFIGURE_PORT: DWORD = 0x00200000;
1727 pub const PRINTER_CHANGE_DELETE_PORT: DWORD = 0x00400000;
1728 pub const PRINTER_CHANGE_PORT: DWORD = 0x00700000;
1729 pub const PRINTER_CHANGE_ADD_PRINT_PROCESSOR: DWORD = 0x01000000;
1730 pub const PRINTER_CHANGE_DELETE_PRINT_PROCESSOR: DWORD = 0x04000000;
1731 pub const PRINTER_CHANGE_PRINT_PROCESSOR: DWORD = 0x07000000;
1732 pub const PRINTER_CHANGE_SERVER: DWORD = 0x08000000;
1733 pub const PRINTER_CHANGE_ADD_PRINTER_DRIVER: DWORD = 0x10000000;
1734 pub const PRINTER_CHANGE_SET_PRINTER_DRIVER: DWORD = 0x20000000;
1735 pub const PRINTER_CHANGE_DELETE_PRINTER_DRIVER: DWORD = 0x40000000;
1736 pub const PRINTER_CHANGE_PRINTER_DRIVER: DWORD = 0x70000000;
1737 pub const PRINTER_CHANGE_TIMEOUT: DWORD = 0x80000000;
1738 pub const PRINTER_CHANGE_ALL: DWORD = 0x7F77FFFF;
1739 extern "system" {
PrinterMessageBoxA( hPrinter: HANDLE, Error: DWORD, hWnd: HWND, pText: LPSTR, pCaption: LPSTR, dwType: DWORD, ) -> DWORD1740     pub fn PrinterMessageBoxA(
1741         hPrinter: HANDLE,
1742         Error: DWORD,
1743         hWnd: HWND,
1744         pText: LPSTR,
1745         pCaption: LPSTR,
1746         dwType: DWORD,
1747     ) -> DWORD;
PrinterMessageBoxW( hPrinter: HANDLE, Error: DWORD, hWnd: HWND, pText: LPWSTR, pCaption: LPWSTR, dwType: DWORD, ) -> DWORD1748     pub fn PrinterMessageBoxW(
1749         hPrinter: HANDLE,
1750         Error: DWORD,
1751         hWnd: HWND,
1752         pText: LPWSTR,
1753         pCaption: LPWSTR,
1754         dwType: DWORD,
1755     ) -> DWORD;
1756 }
1757 pub const PRINTER_ERROR_INFORMATION: DWORD = 0x80000000;
1758 pub const PRINTER_ERROR_WARNING: DWORD = 0x40000000;
1759 pub const PRINTER_ERROR_SEVERE: DWORD = 0x20000000;
1760 pub const PRINTER_ERROR_OUTOFPAPER: DWORD = 0x00000001;
1761 pub const PRINTER_ERROR_JAM: DWORD = 0x00000002;
1762 pub const PRINTER_ERROR_OUTOFTONER: DWORD = 0x00000004;
1763 extern "system" {
ClosePrinter( hPrinter: HANDLE, ) -> BOOL1764     pub fn ClosePrinter(
1765         hPrinter: HANDLE,
1766     ) -> BOOL;
AddFormA( hPrinter: HANDLE, Level: DWORD, pForm: LPBYTE, ) -> BOOL1767     pub fn AddFormA(
1768         hPrinter: HANDLE,
1769         Level: DWORD,
1770         pForm: LPBYTE,
1771     ) -> BOOL;
AddFormW( hPrinter: HANDLE, Level: DWORD, pForm: LPBYTE, ) -> BOOL1772     pub fn AddFormW(
1773         hPrinter: HANDLE,
1774         Level: DWORD,
1775         pForm: LPBYTE,
1776     ) -> BOOL;
DeleteFormA( hPrinter: HANDLE, pFormName: LPSTR, ) -> BOOL1777     pub fn DeleteFormA(
1778         hPrinter: HANDLE,
1779         pFormName: LPSTR,
1780     ) -> BOOL;
DeleteFormW( hPrinter: HANDLE, pFormName: LPWSTR, ) -> BOOL1781     pub fn DeleteFormW(
1782         hPrinter: HANDLE,
1783         pFormName: LPWSTR,
1784     ) -> BOOL;
GetFormA( hPrinter: HANDLE, pFormName: LPSTR, Level: DWORD, pForm: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1785     pub fn GetFormA(
1786         hPrinter: HANDLE,
1787         pFormName: LPSTR,
1788         Level: DWORD,
1789         pForm: LPBYTE,
1790         cbBuf: DWORD,
1791         pcbNeeded: LPDWORD,
1792     ) -> BOOL;
GetFormW( hPrinter: HANDLE, pFormName: LPWSTR, Level: DWORD, pForm: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, ) -> BOOL1793     pub fn GetFormW(
1794         hPrinter: HANDLE,
1795         pFormName: LPWSTR,
1796         Level: DWORD,
1797         pForm: LPBYTE,
1798         cbBuf: DWORD,
1799         pcbNeeded: LPDWORD,
1800     ) -> BOOL;
SetFormA( hPrinter: HANDLE, pFormName: LPSTR, Level: DWORD, pForm: LPBYTE, ) -> BOOL1801     pub fn SetFormA(
1802         hPrinter: HANDLE,
1803         pFormName: LPSTR,
1804         Level: DWORD,
1805         pForm: LPBYTE,
1806     ) -> BOOL;
SetFormW( hPrinter: HANDLE, pFormName: LPWSTR, Level: DWORD, pForm: LPBYTE, ) -> BOOL1807     pub fn SetFormW(
1808         hPrinter: HANDLE,
1809         pFormName: LPWSTR,
1810         Level: DWORD,
1811         pForm: LPBYTE,
1812     ) -> BOOL;
EnumFormsA( hPrinter: HANDLE, Level: DWORD, pForm: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1813     pub fn EnumFormsA(
1814         hPrinter: HANDLE,
1815         Level: DWORD,
1816         pForm: LPBYTE,
1817         cbBuf: DWORD,
1818         pcbNeeded: LPDWORD,
1819         pcReturned: LPDWORD,
1820     ) -> BOOL;
EnumFormsW( hPrinter: HANDLE, Level: DWORD, pForm: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1821     pub fn EnumFormsW(
1822         hPrinter: HANDLE,
1823         Level: DWORD,
1824         pForm: LPBYTE,
1825         cbBuf: DWORD,
1826         pcbNeeded: LPDWORD,
1827         pcReturned: LPDWORD,
1828     ) -> BOOL;
EnumMonitorsA( pName: LPSTR, Level: DWORD, pMonitor: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1829     pub fn EnumMonitorsA(
1830         pName: LPSTR,
1831         Level: DWORD,
1832         pMonitor: LPBYTE,
1833         cbBuf: DWORD,
1834         pcbNeeded: LPDWORD,
1835         pcReturned: LPDWORD,
1836     ) -> BOOL;
EnumMonitorsW( pName: LPWSTR, Level: DWORD, pMonitor: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1837     pub fn EnumMonitorsW(
1838         pName: LPWSTR,
1839         Level: DWORD,
1840         pMonitor: LPBYTE,
1841         cbBuf: DWORD,
1842         pcbNeeded: LPDWORD,
1843         pcReturned: LPDWORD,
1844     ) -> BOOL;
AddMonitorA( pName: LPSTR, Level: DWORD, pMonitors: LPBYTE, ) -> BOOL1845     pub fn AddMonitorA(
1846         pName: LPSTR,
1847         Level: DWORD,
1848         pMonitors: LPBYTE,
1849     ) -> BOOL;
AddMonitorW( pName: LPWSTR, Level: DWORD, pMonitors: LPBYTE, ) -> BOOL1850     pub fn AddMonitorW(
1851         pName: LPWSTR,
1852         Level: DWORD,
1853         pMonitors: LPBYTE,
1854     ) -> BOOL;
DeleteMonitorA( pName: LPSTR, pEnvironment: LPSTR, pMonitorName: LPSTR, ) -> BOOL1855     pub fn DeleteMonitorA(
1856         pName: LPSTR,
1857         pEnvironment: LPSTR,
1858         pMonitorName: LPSTR,
1859     ) -> BOOL;
DeleteMonitorW( pName: LPWSTR, pEnvironment: LPWSTR, pMonitorName: LPWSTR, ) -> BOOL1860     pub fn DeleteMonitorW(
1861         pName: LPWSTR,
1862         pEnvironment: LPWSTR,
1863         pMonitorName: LPWSTR,
1864     ) -> BOOL;
EnumPortsA( pName: LPSTR, Level: DWORD, pPort: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1865     pub fn EnumPortsA(
1866         pName: LPSTR,
1867         Level: DWORD,
1868         pPort: LPBYTE,
1869         cbBuf: DWORD,
1870         pcbNeeded: LPDWORD,
1871         pcReturned: LPDWORD,
1872     ) -> BOOL;
EnumPortsW( pName: LPWSTR, Level: DWORD, pPort: LPBYTE, cbBuf: DWORD, pcbNeeded: LPDWORD, pcReturned: LPDWORD, ) -> BOOL1873     pub fn EnumPortsW(
1874         pName: LPWSTR,
1875         Level: DWORD,
1876         pPort: LPBYTE,
1877         cbBuf: DWORD,
1878         pcbNeeded: LPDWORD,
1879         pcReturned: LPDWORD,
1880     ) -> BOOL;
AddPortA( pName: LPSTR, hWnd: HWND, pMonitorName: LPSTR, ) -> BOOL1881     pub fn AddPortA(
1882         pName: LPSTR,
1883         hWnd: HWND,
1884         pMonitorName: LPSTR,
1885     ) -> BOOL;
AddPortW( pName: LPWSTR, hWnd: HWND, pMonitorName: LPWSTR, ) -> BOOL1886     pub fn AddPortW(
1887         pName: LPWSTR,
1888         hWnd: HWND,
1889         pMonitorName: LPWSTR,
1890     ) -> BOOL;
ConfigurePortA( pName: LPSTR, hWnd: HWND, pPortName: LPSTR, ) -> BOOL1891     pub fn ConfigurePortA(
1892         pName: LPSTR,
1893         hWnd: HWND,
1894         pPortName: LPSTR,
1895     ) -> BOOL;
ConfigurePortW( pName: LPWSTR, hWnd: HWND, pPortName: LPWSTR, ) -> BOOL1896     pub fn ConfigurePortW(
1897         pName: LPWSTR,
1898         hWnd: HWND,
1899         pPortName: LPWSTR,
1900     ) -> BOOL;
DeletePortA( pName: LPSTR, hWnd: HWND, pPortName: LPSTR, ) -> BOOL1901     pub fn DeletePortA(
1902         pName: LPSTR,
1903         hWnd: HWND,
1904         pPortName: LPSTR,
1905     ) -> BOOL;
DeletePortW( pName: LPWSTR, hWnd: HWND, pPortName: LPWSTR, ) -> BOOL1906     pub fn DeletePortW(
1907         pName: LPWSTR,
1908         hWnd: HWND,
1909         pPortName: LPWSTR,
1910     ) -> BOOL;
XcvDataW( hXcv: HANDLE, pszDataName: PCWSTR, pInputData: PBYTE, cbInputData: DWORD, pOutputData: PBYTE, cbOutputData: DWORD, pcbOutputNeeded: PDWORD, pdwStatus: PDWORD, ) -> BOOL1911     pub fn XcvDataW(
1912         hXcv: HANDLE,
1913         pszDataName: PCWSTR,
1914         pInputData: PBYTE,
1915         cbInputData: DWORD,
1916         pOutputData: PBYTE,
1917         cbOutputData: DWORD,
1918         pcbOutputNeeded: PDWORD,
1919         pdwStatus: PDWORD,
1920     ) -> BOOL;
GetDefaultPrinterA( pszBuffer: LPSTR, pcchBuffer: LPDWORD, ) -> BOOL1921     pub fn GetDefaultPrinterA(
1922         pszBuffer: LPSTR,
1923         pcchBuffer: LPDWORD,
1924     ) -> BOOL;
GetDefaultPrinterW( pszBuffer: LPWSTR, pcchBuffer: LPDWORD, ) -> BOOL1925     pub fn GetDefaultPrinterW(
1926         pszBuffer: LPWSTR,
1927         pcchBuffer: LPDWORD,
1928     ) -> BOOL;
SetDefaultPrinterA( pszPrinter: LPCSTR, ) -> BOOL1929     pub fn SetDefaultPrinterA(
1930         pszPrinter: LPCSTR,
1931     ) -> BOOL;
SetDefaultPrinterW( pszPrinter: LPCWSTR, ) -> BOOL1932     pub fn SetDefaultPrinterW(
1933         pszPrinter: LPCWSTR,
1934     ) -> BOOL;
SetPortA( pName: LPSTR, pPortName: LPSTR, dwLevel: DWORD, pPortInfo: LPBYTE, ) -> BOOL1935     pub fn SetPortA(
1936         pName: LPSTR,
1937         pPortName: LPSTR,
1938         dwLevel: DWORD,
1939         pPortInfo: LPBYTE,
1940     ) -> BOOL;
SetPortW(pName: LPWSTR, pPortName: LPWSTR, dwLevel: DWORD, pPortInfo: LPBYTE, ) -> BOOL1941     pub fn SetPortW(pName: LPWSTR,
1942         pPortName: LPWSTR,
1943         dwLevel: DWORD,
1944         pPortInfo: LPBYTE,
1945     ) -> BOOL;
AddPrinterConnectionA( pName: LPSTR, ) -> BOOL1946     pub fn AddPrinterConnectionA(
1947         pName: LPSTR,
1948     ) -> BOOL;
AddPrinterConnectionW( pName: LPWSTR, ) -> BOOL1949     pub fn AddPrinterConnectionW(
1950         pName: LPWSTR,
1951     ) -> BOOL;
DeletePrinterConnectionA( pName: LPSTR, ) -> BOOL1952     pub fn DeletePrinterConnectionA(
1953         pName: LPSTR,
1954     ) -> BOOL;
DeletePrinterConnectionW( pName: LPWSTR, ) -> BOOL1955     pub fn DeletePrinterConnectionW(
1956         pName: LPWSTR,
1957     ) -> BOOL;
ConnectToPrinterDlg( hwnd: HWND, Flags: DWORD, ) -> HANDLE1958     pub fn ConnectToPrinterDlg(
1959         hwnd: HWND,
1960         Flags: DWORD,
1961     ) -> HANDLE;
1962 }
1963 STRUCT!{struct PROVIDOR_INFO_1A {
1964     pName: LPSTR,
1965     pEnvironment: LPSTR,
1966     pDLLName: LPSTR,
1967 }}
1968 pub type PPROVIDOR_INFO_1A = *mut PROVIDOR_INFO_1A;
1969 pub type LPPROVIDOR_INFO_1A = *mut PROVIDOR_INFO_1A;
1970 STRUCT!{struct PROVIDOR_INFO_1W {
1971     pName: LPWSTR,
1972     pEnvironment: LPWSTR,
1973     pDLLName: LPWSTR,
1974 }}
1975 pub type PPROVIDOR_INFO_1W = *mut PROVIDOR_INFO_1W;
1976 pub type LPPROVIDOR_INFO_1W = *mut PROVIDOR_INFO_1W;
1977 STRUCT!{struct PROVIDOR_INFO_2A {
1978     pOrder: LPSTR,
1979 }}
1980 pub type PPROVIDOR_INFO_2A = *mut PROVIDOR_INFO_2A;
1981 pub type LPPROVIDOR_INFO_2A = *mut PROVIDOR_INFO_2A;
1982 STRUCT!{struct PROVIDOR_INFO_2W {
1983     pOrder: LPWSTR,
1984 }}
1985 pub type PPROVIDOR_INFO_2W = *mut PROVIDOR_INFO_2W;
1986 pub type LPPROVIDOR_INFO_2W = *mut PROVIDOR_INFO_2W;
1987 extern "system" {
AddPrintProvidorA( pName: LPSTR, Level: DWORD, pProvidorInfo: LPBYTE, ) -> BOOL1988     pub fn AddPrintProvidorA(
1989         pName: LPSTR,
1990         Level: DWORD,
1991         pProvidorInfo: LPBYTE,
1992     ) -> BOOL;
AddPrintProvidorW( pName: LPWSTR, Level: DWORD, pProvidorInfo: LPBYTE, ) -> BOOL1993     pub fn AddPrintProvidorW(
1994         pName: LPWSTR,
1995         Level: DWORD,
1996         pProvidorInfo: LPBYTE,
1997     ) -> BOOL;
DeletePrintProvidorA( pName: LPSTR, pEnvironment: LPSTR, pPrintProvidorName: LPSTR, ) -> BOOL1998     pub fn DeletePrintProvidorA(
1999         pName: LPSTR,
2000         pEnvironment: LPSTR,
2001         pPrintProvidorName: LPSTR,
2002     ) -> BOOL;
DeletePrintProvidorW( pName: LPWSTR, pEnvironment: LPWSTR, pPrintProvidorName: LPWSTR, ) -> BOOL2003     pub fn DeletePrintProvidorW(
2004         pName: LPWSTR,
2005         pEnvironment: LPWSTR,
2006         pPrintProvidorName: LPWSTR,
2007     ) -> BOOL;
IsValidDevmodeA( pDevmode: PDEVMODEA, DevmodeSize: size_t, ) -> BOOL2008     pub fn IsValidDevmodeA(
2009         pDevmode: PDEVMODEA,
2010         DevmodeSize: size_t,
2011     ) -> BOOL;
IsValidDevmodeW( pDevmode: PDEVMODEW, DevmodeSize: size_t, ) -> BOOL2012     pub fn IsValidDevmodeW(
2013         pDevmode: PDEVMODEW,
2014         DevmodeSize: size_t,
2015     ) -> BOOL;
2016 }
2017 pub const SPLREG_DEFAULT_SPOOL_DIRECTORY: &'static str = "DefaultSpoolDirectory";
2018 pub const SPLREG_PORT_THREAD_PRIORITY_DEFAULT: &'static str = "PortThreadPriorityDefault";
2019 pub const SPLREG_PORT_THREAD_PRIORITY: &'static str = "PortThreadPriority";
2020 pub const SPLREG_SCHEDULER_THREAD_PRIORITY_DEFAULT: &'static str
2021     = "SchedulerThreadPriorityDefault";
2022 pub const SPLREG_SCHEDULER_THREAD_PRIORITY: &'static str = "SchedulerThreadPriority";
2023 pub const SPLREG_BEEP_ENABLED: &'static str = "BeepEnabled";
2024 pub const SPLREG_NET_POPUP: &'static str = "NetPopup";
2025 pub const SPLREG_RETRY_POPUP: &'static str = "RetryPopup";
2026 pub const SPLREG_NET_POPUP_TO_COMPUTER: &'static str = "NetPopupToComputer";
2027 pub const SPLREG_EVENT_LOG: &'static str = "EventLog";
2028 pub const SPLREG_MAJOR_VERSION: &'static str = "MajorVersion";
2029 pub const SPLREG_MINOR_VERSION: &'static str = "MinorVersion";
2030 pub const SPLREG_ARCHITECTURE: &'static str = "Architecture";
2031 pub const SPLREG_OS_VERSION: &'static str = "OSVersion";
2032 pub const SPLREG_OS_VERSIONEX: &'static str = "OSVersionEx";
2033 pub const SPLREG_DS_PRESENT: &'static str = "DsPresent";
2034 pub const SPLREG_DS_PRESENT_FOR_USER: &'static str = "DsPresentForUser";
2035 pub const SPLREG_REMOTE_FAX: &'static str = "RemoteFax";
2036 pub const SPLREG_RESTART_JOB_ON_POOL_ERROR: &'static str = "RestartJobOnPoolError";
2037 pub const SPLREG_RESTART_JOB_ON_POOL_ENABLED: &'static str = "RestartJobOnPoolEnabled";
2038 pub const SPLREG_DNS_MACHINE_NAME: &'static str = "DNSMachineName";
2039 pub const SPLREG_ALLOW_USER_MANAGEFORMS: &'static str = "AllowUserManageForms";
2040 pub const SPLREG_WEBSHAREMGMT: &'static str = "WebShareMgmt";
2041 pub const SPLREG_PRINT_DRIVER_ISOLATION_GROUPS_SEPARATOR: &'static str = "\\";
2042 pub const SPLREG_PRINT_DRIVER_ISOLATION_GROUPS: &'static str = "PrintDriverIsolationGroups";
2043 pub const SPLREG_PRINT_DRIVER_ISOLATION_TIME_BEFORE_RECYCLE: &'static str
2044     = "PrintDriverIsolationTimeBeforeRecycle";
2045 pub const SPLREG_PRINT_DRIVER_ISOLATION_MAX_OBJECTS_BEFORE_RECYCLE: &'static str
2046     = "PrintDriverIsolationMaxobjsBeforeRecycle";
2047 pub const SPLREG_PRINT_DRIVER_ISOLATION_IDLE_TIMEOUT: &'static str
2048     = "PrintDriverIsolationIdleTimeout";
2049 pub const SPLREG_PRINT_DRIVER_ISOLATION_EXECUTION_POLICY: &'static str
2050     = "PrintDriverIsolationExecutionPolicy";
2051 pub const SPLREG_PRINT_DRIVER_ISOLATION_OVERRIDE_POLICY: &'static str
2052     = "PrintDriverIsolationOverrideCompat";
2053 pub const SPLREG_PRINT_QUEUE_V4_DRIVER_DIRECTORY: &'static str = "PrintQueueV4DriverDirectory";
2054 pub const SERVER_ACCESS_ADMINISTER: DWORD = 0x00000001;
2055 pub const SERVER_ACCESS_ENUMERATE: DWORD = 0x00000002;
2056 pub const PRINTER_ACCESS_ADMINISTER: DWORD = 0x00000004;
2057 pub const PRINTER_ACCESS_USE: DWORD = 0x00000008;
2058 pub const JOB_ACCESS_ADMINISTER: DWORD = 0x00000010;
2059 pub const JOB_ACCESS_READ: DWORD = 0x00000020;
2060 pub const PRINTER_ACCESS_MANAGE_LIMITED: DWORD = 0x00000040;
2061 pub const SERVER_ALL_ACCESS: DWORD = STANDARD_RIGHTS_REQUIRED | SERVER_ACCESS_ADMINISTER
2062     | SERVER_ACCESS_ENUMERATE;
2063 pub const SERVER_READ: DWORD = STANDARD_RIGHTS_READ | SERVER_ACCESS_ENUMERATE;
2064 pub const SERVER_WRITE: DWORD = STANDARD_RIGHTS_WRITE | SERVER_ACCESS_ADMINISTER
2065     | SERVER_ACCESS_ENUMERATE;
2066 pub const SERVER_EXECUTE: DWORD = STANDARD_RIGHTS_EXECUTE | SERVER_ACCESS_ENUMERATE;
2067 pub const PRINTER_ALL_ACCESS: DWORD = STANDARD_RIGHTS_REQUIRED | PRINTER_ACCESS_ADMINISTER
2068     | PRINTER_ACCESS_USE;
2069 pub const PRINTER_READ: DWORD = STANDARD_RIGHTS_READ | PRINTER_ACCESS_USE;
2070 pub const PRINTER_WRITE: DWORD = STANDARD_RIGHTS_WRITE | PRINTER_ACCESS_USE;
2071 pub const PRINTER_EXECUTE: DWORD = STANDARD_RIGHTS_EXECUTE | PRINTER_ACCESS_USE;
2072 pub const JOB_ALL_ACCESS: DWORD = STANDARD_RIGHTS_REQUIRED | JOB_ACCESS_ADMINISTER
2073     | JOB_ACCESS_READ;
2074 pub const JOB_READ: DWORD = STANDARD_RIGHTS_READ | JOB_ACCESS_READ;
2075 pub const JOB_WRITE: DWORD = STANDARD_RIGHTS_WRITE | JOB_ACCESS_ADMINISTER;
2076 pub const JOB_EXECUTE: DWORD = STANDARD_RIGHTS_EXECUTE | JOB_ACCESS_ADMINISTER;
2077 pub const SPLDS_SPOOLER_KEY: &'static str = "DsSpooler";
2078 pub const SPLDS_DRIVER_KEY: &'static str = "DsDriver";
2079 pub const SPLDS_USER_KEY: &'static str = "DsUser";
2080 pub const SPLDS_ASSET_NUMBER: &'static str = "assetNumber";
2081 pub const SPLDS_BYTES_PER_MINUTE: &'static str = "bytesPerMinute";
2082 pub const SPLDS_DESCRIPTION: &'static str = "description";
2083 pub const SPLDS_DRIVER_NAME: &'static str = "driverName";
2084 pub const SPLDS_DRIVER_VERSION: &'static str = "driverVersion";
2085 pub const SPLDS_LOCATION: &'static str = "location";
2086 pub const SPLDS_PORT_NAME: &'static str = "portName";
2087 pub const SPLDS_PRINT_ATTRIBUTES: &'static str = "printAttributes";
2088 pub const SPLDS_PRINT_BIN_NAMES: &'static str = "printBinNames";
2089 pub const SPLDS_PRINT_COLLATE: &'static str = "printCollate";
2090 pub const SPLDS_PRINT_COLOR: &'static str = "printColor";
2091 pub const SPLDS_PRINT_DUPLEX_SUPPORTED: &'static str = "printDuplexSupported";
2092 pub const SPLDS_PRINT_END_TIME: &'static str = "printEndTime";
2093 pub const SPLDS_PRINTER_CLASS: &'static str = "printQueue";
2094 pub const SPLDS_PRINTER_NAME: &'static str = "printerName";
2095 pub const SPLDS_PRINT_KEEP_PRINTED_JOBS: &'static str = "printKeepPrintedJobs";
2096 pub const SPLDS_PRINT_LANGUAGE: &'static str = "printLanguage";
2097 pub const SPLDS_PRINT_MAC_ADDRESS: &'static str = "printMACAddress";
2098 pub const SPLDS_PRINT_MAX_X_EXTENT: &'static str = "printMaxXExtent";
2099 pub const SPLDS_PRINT_MAX_Y_EXTENT: &'static str = "printMaxYExtent";
2100 pub const SPLDS_PRINT_MAX_RESOLUTION_SUPPORTED: &'static str = "printMaxResolutionSupported";
2101 pub const SPLDS_PRINT_MEDIA_READY: &'static str = "printMediaReady";
2102 pub const SPLDS_PRINT_MEDIA_SUPPORTED: &'static str = "printMediaSupported";
2103 pub const SPLDS_PRINT_MEMORY: &'static str = "printMemory";
2104 pub const SPLDS_PRINT_MIN_X_EXTENT: &'static str = "printMinXExtent";
2105 pub const SPLDS_PRINT_MIN_Y_EXTENT: &'static str = "printMinYExtent";
2106 pub const SPLDS_PRINT_NETWORK_ADDRESS: &'static str = "printNetworkAddress";
2107 pub const SPLDS_PRINT_NOTIFY: &'static str = "printNotify";
2108 pub const SPLDS_PRINT_NUMBER_UP: &'static str = "printNumberUp";
2109 pub const SPLDS_PRINT_ORIENTATIONS_SUPPORTED: &'static str = "printOrientationsSupported";
2110 pub const SPLDS_PRINT_OWNER: &'static str = "printOwner";
2111 pub const SPLDS_PRINT_PAGES_PER_MINUTE: &'static str = "printPagesPerMinute";
2112 pub const SPLDS_PRINT_RATE: &'static str = "printRate";
2113 pub const SPLDS_PRINT_RATE_UNIT: &'static str = "printRateUnit";
2114 pub const SPLDS_PRINT_SEPARATOR_FILE: &'static str = "printSeparatorFile";
2115 pub const SPLDS_PRINT_SHARE_NAME: &'static str = "printShareName";
2116 pub const SPLDS_PRINT_SPOOLING: &'static str = "printSpooling";
2117 pub const SPLDS_PRINT_STAPLING_SUPPORTED: &'static str = "printStaplingSupported";
2118 pub const SPLDS_PRINT_START_TIME: &'static str = "printStartTime";
2119 pub const SPLDS_PRINT_STATUS: &'static str = "printStatus";
2120 pub const SPLDS_PRIORITY: &'static str = "priority";
2121 pub const SPLDS_SERVER_NAME: &'static str = "serverName";
2122 pub const SPLDS_SHORT_SERVER_NAME: &'static str = "shortServerName";
2123 pub const SPLDS_UNC_NAME: &'static str = "uNCName";
2124 pub const SPLDS_URL: &'static str = "url";
2125 pub const SPLDS_FLAGS: &'static str = "flags";
2126 pub const SPLDS_VERSION_NUMBER: &'static str = "versionNumber";
2127 pub const SPLDS_PRINTER_NAME_ALIASES: &'static str = "printerNameAliases";
2128 pub const SPLDS_PRINTER_LOCATIONS: &'static str = "printerLocations";
2129 pub const SPLDS_PRINTER_MODEL: &'static str = "printerModel";
2130 ENUM!{enum PRINTER_OPTION_FLAGS {
2131     PRINTER_OPTION_NO_CACHE = 1 << 0,
2132     PRINTER_OPTION_CACHE = 1 << 1,
2133     PRINTER_OPTION_CLIENT_CHANGE = 1 << 2,
2134     PRINTER_OPTION_NO_CLIENT_DATA = 1 << 3,
2135 }}
2136 STRUCT!{struct PRINTER_OPTIONSA {
2137     cbSize: UINT,
2138     dwFlags: DWORD,
2139 }}
2140 pub type PPRINTER_OPTIONSA = *mut PRINTER_OPTIONSA;
2141 pub type LPPRINTER_OPTIONSA = *mut PRINTER_OPTIONSA;
2142 STRUCT!{struct PRINTER_OPTIONSW {
2143     cbSize: UINT,
2144     dwFlags: DWORD,
2145 }}
2146 pub type PPRINTER_OPTIONSW = *mut PRINTER_OPTIONSW;
2147 pub type LPPRINTER_OPTIONSW = *mut PRINTER_OPTIONSW;
2148 extern "system" {
2149     pub fn OpenPrinter2A(
2150         pPrinterName: LPCSTR,
2151         phPrinter: LPHANDLE,
2152         pDefault: PPRINTER_DEFAULTSA,
2153         pOptions: PPRINTER_OPTIONSA,
2154     ) -> BOOL;
2155     pub fn OpenPrinter2W(
2156         pPrinterName: LPCWSTR,
2157         phPrinter: LPHANDLE,
2158         pDefault: PPRINTER_DEFAULTSW,
2159         pOptions: PPRINTER_OPTIONSW,
2160     ) -> BOOL;
2161 }
2162 pub const PRINTER_CONNECTION_MISMATCH: DWORD = 0x00000020;
2163 pub const PRINTER_CONNECTION_NO_UI: DWORD = 0x00000040;
2164 STRUCT!{struct PRINTER_CONNECTION_INFO_1A {
2165     dwFlags: DWORD,
2166     pszDriverName: LPSTR,
2167 }}
2168 pub type PPRINTER_CONNECTION_INFO_1A = *mut PRINTER_CONNECTION_INFO_1A;
2169 pub type LPPRINTER_CONNECTION_INFO_1A = *mut PRINTER_CONNECTION_INFO_1A;
2170 STRUCT!{struct PRINTER_CONNECTION_INFO_1W {
2171     dwFlags: DWORD,
2172     pszDriverName: LPWSTR,
2173 }}
2174 pub type PPRINTER_CONNECTION_INFO_1W = *mut PRINTER_CONNECTION_INFO_1W;
2175 pub type LPPRINTER_CONNECTION_INFO_1W = *mut PRINTER_CONNECTION_INFO_1W;
2176 extern "system" {
2177     pub fn AddPrinterConnection2A(
2178         hWnd: HWND,
2179         pszName: LPCSTR,
2180         dwLevel: DWORD,
2181         pConnectionInfo: PVOID,
2182     ) -> BOOL;
2183     pub fn AddPrinterConnection2W(
2184         hWnd: HWND,
2185         pszName: LPCWSTR,
2186         dwLevel: DWORD,
2187         pConnectionInfo: PVOID,
2188     ) -> BOOL;
2189 }
2190 pub const IPDFP_COPY_ALL_FILES: DWORD = 0x00000001;
2191 extern "system" {
2192     pub fn InstallPrinterDriverFromPackageA(
2193         pszServer: LPCSTR,
2194         pszInfPath: LPCSTR,
2195         pszDriverName: LPCSTR,
2196         pszEnvironment: LPCSTR,
2197         dwFlags: DWORD,
2198     ) -> HRESULT;
2199     pub fn InstallPrinterDriverFromPackageW(
2200         pszServer: LPCWSTR,
2201         pszInfPath: LPCWSTR,
2202         pszDriverName: LPCWSTR,
2203         pszEnvironment: LPCWSTR,
2204         dwFlags: DWORD,
2205     ) -> HRESULT;
2206 }
2207 pub const UPDP_SILENT_UPLOAD: DWORD = 0x00000001;
2208 pub const UPDP_UPLOAD_ALWAYS: DWORD = 0x00000002;
2209 pub const UPDP_CHECK_DRIVERSTORE: DWORD = 0x00000004;
2210 extern "system" {
2211     pub fn UploadPrinterDriverPackageA(
2212         pszServer: LPCSTR,
2213         pszInfPath: LPCSTR,
2214         pszEnvironment: LPCSTR,
2215         dwFlags: DWORD,
2216         hwnd: HWND,
2217         pszDestInfPath: LPSTR,
2218         pcchDestInfPath: PULONG,
2219     ) -> HRESULT;
2220     pub fn UploadPrinterDriverPackageW(
2221         pszServer: LPCWSTR,
2222         pszInfPath: LPCWSTR,
2223         pszEnvironment: LPCWSTR,
2224         dwFlags: DWORD,
2225         hwnd: HWND,
2226         pszDestInfPath: LPWSTR,
2227         pcchDestInfPath: PULONG,
2228     ) -> HRESULT;
2229 }
2230 STRUCT!{struct CORE_PRINTER_DRIVERA {
2231     CoreDriverGUID: GUID,
2232     ftDriverDate: FILETIME,
2233     dwlDriverVersion: DWORDLONG,
2234     szPackageID: [CHAR; MAX_PATH],
2235 }}
2236 pub type PCORE_PRINTER_DRIVERA = *mut CORE_PRINTER_DRIVERA;
2237 STRUCT!{struct CORE_PRINTER_DRIVERW {
2238     CoreDriverGUID: GUID,
2239     ftDriverDate: FILETIME,
2240     dwlDriverVersion: DWORDLONG,
2241     szPackageID: [WCHAR; MAX_PATH],
2242 }}
2243 pub type PCORE_PRINTER_DRIVERW = *mut CORE_PRINTER_DRIVERW;
2244 extern "system" {
2245     pub fn GetCorePrinterDriversA(
2246         pszServer: LPCSTR,
2247         pszEnvironment: LPCSTR,
2248         pszzCoreDriverDependencies: LPCSTR,
2249         cCorePrinterDrivers: DWORD,
2250         pCorePrinterDrivers: PCORE_PRINTER_DRIVERA,
2251     ) -> HRESULT;
2252     pub fn GetCorePrinterDriversW(
2253         pszServer: LPCWSTR,
2254         pszEnvironment: LPCWSTR,
2255         pszzCoreDriverDependencies: LPCWSTR,
2256         cCorePrinterDrivers: DWORD,
2257         pCorePrinterDrivers: PCORE_PRINTER_DRIVERW,
2258     ) -> HRESULT;
2259     pub fn CorePrinterDriverInstalledA(
2260         pszServer: LPCSTR,
2261         pszEnvironment: LPCSTR,
2262         CoreDriverGUID: GUID,
2263         ftDriverDate: FILETIME,
2264         dwlDriverVersion: DWORDLONG,
2265         pbDriverInstalled: *mut BOOL,
2266     ) -> HRESULT;
2267     pub fn CorePrinterDriverInstalledW(
2268         pszServer: LPCWSTR,
2269         pszEnvironment: LPCWSTR,
2270         CoreDriverGUID: GUID,
2271         ftDriverDate: FILETIME,
2272         dwlDriverVersion: DWORDLONG,
2273         pbDriverInstalled: *mut BOOL,
2274     ) -> HRESULT;
2275     pub fn GetPrinterDriverPackagePathA(
2276         pszServer: LPCSTR,
2277         pszEnvironment: LPCSTR,
2278         pszLanguage: LPCSTR,
2279         pszPackageID: LPCSTR,
2280         pszDriverPackageCab: LPSTR,
2281         cchDriverPackageCab: DWORD,
2282         pcchRequiredSize: LPDWORD,
2283     ) -> HRESULT;
2284     pub fn GetPrinterDriverPackagePathW(
2285         pszServer: LPCWSTR,
2286         pszEnvironment: LPCWSTR,
2287         pszLanguage: LPCWSTR,
2288         pszPackageID: LPCWSTR,
2289         pszDriverPackageCab: LPWSTR,
2290         cchDriverPackageCab: DWORD,
2291         pcchRequiredSize: LPDWORD,
2292     ) -> HRESULT;
2293     pub fn DeletePrinterDriverPackageA(
2294         pszServer: LPCSTR,
2295         pszInfPath: LPCSTR,
2296         pszEnvironment: LPCSTR,
2297     ) -> HRESULT;
2298     pub fn DeletePrinterDriverPackageW(
2299         pszServer: LPCWSTR,
2300         pszInfPath: LPCWSTR,
2301         pszEnvironment: LPCWSTR,
2302     ) -> HRESULT;
2303 }
2304 ENUM!{enum EPrintPropertyType {
2305     kPropertyTypeString = 1,
2306     kPropertyTypeInt32,
2307     kPropertyTypeInt64,
2308     kPropertyTypeByte,
2309     kPropertyTypeTime,
2310     kPropertyTypeDevMode,
2311     kPropertyTypeSD,
2312     kPropertyTypeNotificationReply,
2313     kPropertyTypeNotificationOptions,
2314     kPropertyTypeBuffer,
2315 }}
2316 ENUM!{enum EPrintXPSJobProgress {
2317     kAddingDocumentSequence = 0,
2318     kDocumentSequenceAdded = 1,
2319     kAddingFixedDocument = 2,
2320     kFixedDocumentAdded = 3,
2321     kAddingFixedPage = 4,
2322     kFixedPageAdded = 5,
2323     kResourceAdded = 6,
2324     kFontAdded = 7,
2325     kImageAdded = 8,
2326     kXpsDocumentCommitted = 9,
2327 }}
2328 ENUM!{enum EPrintXPSJobOperation {
2329     kJobProduction = 1,
2330     kJobConsumption,
2331 }}
2332 STRUCT!{struct PrintPropertyValue_value_propertyBlob {
2333     cbBuf: DWORD,
2334     pBuf: LPVOID,
2335 }}
2336 UNION!{union PrintPropertyValue_value {
2337     [u64; 1] [u64; 2],
2338     propertyByte propertyByte_mut: BYTE,
2339     propertyString propertyString_mut: PWSTR,
2340     propertyInt32 propertyInt32_mut: LONG,
2341     propertyInt64 propertyInt64_mut: LONGLONG,
2342     propertyBlob propertyBlob_mut: PrintPropertyValue_value_propertyBlob,
2343 }}
2344 STRUCT!{struct PrintPropertyValue {
2345     ePropertyType: EPrintPropertyType,
2346     value: PrintPropertyValue_value,
2347 }}
2348 STRUCT!{struct PrintNamedProperty {
2349     propertyName: *mut WCHAR,
2350     propertyValue: PrintPropertyValue,
2351 }}
2352 STRUCT!{struct PrintPropertiesCollection {
2353     numberOfProperties: ULONG,
2354     propertiesCollection: *mut PrintNamedProperty,
2355 }}
2356 extern "system" {
2357     pub fn ReportJobProcessingProgress(
2358         printerHandle: HANDLE,
2359         jobId: ULONG,
2360         jobOperation: EPrintXPSJobOperation,
2361         jobProgress: EPrintXPSJobProgress,
2362     ) -> HRESULT;
2363     pub fn GetPrinterDriver2A(
2364         hWnd: HWND,
2365         hPrinter: HANDLE,
2366         pEnvironment: LPSTR,
2367         Level: DWORD,
2368         pDriverInfo: LPBYTE,
2369         cbBuf: DWORD,
2370         pcbNeeded: LPDWORD,
2371     ) -> BOOL;
2372     pub fn GetPrinterDriver2W(
2373         hWnd: HWND,
2374         hPrinter: HANDLE,
2375         pEnvironment: LPWSTR,
2376         Level: DWORD,
2377         pDriverInfo: LPBYTE,
2378         cbBuf: DWORD,
2379         pcbNeeded: LPDWORD,
2380     ) -> BOOL;
2381 }
2382 ENUM!{enum PRINT_EXECUTION_CONTEXT {
2383     PRINT_EXECUTION_CONTEXT_APPLICATION = 0,
2384     PRINT_EXECUTION_CONTEXT_SPOOLER_SERVICE = 1,
2385     PRINT_EXECUTION_CONTEXT_SPOOLER_ISOLATION_HOST = 2,
2386     PRINT_EXECUTION_CONTEXT_FILTER_PIPELINE = 3,
2387     PRINT_EXECUTION_CONTEXT_WOW64 = 4,
2388 }}
2389 STRUCT!{struct PRINT_EXECUTION_DATA {
2390     context: PRINT_EXECUTION_CONTEXT,
2391     clientAppPID: DWORD,
2392 }}
2393 extern "system" {
2394     pub fn GetPrintExecutionData(
2395         pData: *mut PRINT_EXECUTION_DATA,
2396     ) -> BOOL;
2397     pub fn GetJobNamedPropertyValue(
2398         hPrinter: HANDLE,
2399         JobId: DWORD,
2400         pszName: PCWSTR,
2401         pValue: *mut PrintPropertyValue,
2402     ) -> DWORD;
2403     pub fn FreePrintPropertyValue(
2404         pValue: *mut PrintPropertyValue,
2405     );
2406     pub fn FreePrintNamedPropertyArray(
2407         cProperties: DWORD,
2408         ppProperties: *mut *mut PrintNamedProperty,
2409     );
2410     pub fn SetJobNamedProperty(
2411         hPrinter: HANDLE,
2412         JobId: DWORD,
2413         pProperty: *const PrintNamedProperty,
2414     ) -> DWORD;
2415     pub fn DeleteJobNamedProperty(
2416         hPrinter: HANDLE,
2417         JobId: DWORD,
2418         pszName: PCWSTR,
2419     ) -> DWORD;
2420     pub fn EnumJobNamedProperties(
2421         hPrinter: HANDLE,
2422         JobId: DWORD,
2423         pcProperties: *mut DWORD,
2424         ppProperties: *mut *mut PrintNamedProperty,
2425     ) -> DWORD;
2426     pub fn GetPrintOutputInfo(
2427         hWnd: HWND,
2428         pszPrinter: PCWSTR,
2429         phFile: *mut HANDLE,
2430         ppszOutputFile: *mut PWSTR,
2431     ) -> HRESULT;
2432 }
2433 pub const MS_PRINT_JOB_OUTPUT_FILE: &'static str = "MsPrintJobOutputFile";
2434