Revert "pidl: Use non-existent function dissect_ndr_int64()"
[Samba.git] / librpc / idl / spoolss.idl
blob81605879d3c6375701a901f69ea4142789932e81
1 #include "idl_types.h"
3 /*
4 spoolss interface definitions
5 */
6 import "misc.idl", "security.idl", "winreg.idl";
9 cpp_quote("#define spoolss_security_descriptor security_descriptor")
11 [ uuid("12345678-1234-abcd-ef00-0123456789ab"),
12 version(1.0),
13 endpoint("ncacn_np:[\\pipe\\spoolss]", "ncalrpc:"),
14 pointer_default(unique),
15 helpstring("Spooler SubSystem"),
16 helper("../librpc/ndr/ndr_spoolss_buf.h")
17 ] interface spoolss
19 typedef [v1_enum] enum winreg_Type winreg_Type;
20 typedef [gensize,noprint] struct {
21 uint16 year;
22 uint16 month;
23 uint16 day_of_week;
24 uint16 day;
25 uint16 hour;
26 uint16 minute;
27 uint16 second;
28 uint16 millisecond;
29 } spoolss_Time;
31 typedef [public] struct {
32 [value(ndr_size_spoolss_Time(time, ndr->flags))] uint32 size;
33 [unique] spoolss_Time *time;
34 } spoolss_TimeCtr;
36 typedef enum {
37 PROCESSOR_ARCHITECTURE_INTEL = 0x0000,
38 PROCESSOR_ARCHITECTURE_MIPS = 0x0001,
39 PROCESSOR_ARCHITECTURE_ALPHA = 0x0002,
40 PROCESSOR_ARCHITECTURE_PPC = 0x0003,
41 PROCESSOR_ARCHITECTURE_SHX = 0x0004,
42 PROCESSOR_ARCHITECTURE_ARM = 0x0005,
43 PROCESSOR_ARCHITECTURE_IA64 = 0x0006,
44 PROCESSOR_ARCHITECTURE_ALPHA64 = 0x0007,
45 PROCESSOR_ARCHITECTURE_MSIL = 0x0008,
46 PROCESSOR_ARCHITECTURE_AMD64 = 0x0009,
47 PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 0x000A, /* 10 */
48 PROCESSOR_ARCHITECTURE_NEUTRAL = 0x000B, /* 11 */
49 PROCESSOR_ARCHITECTURE_ARM64 = 0x000C, /* 12 */
50 PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64 = 0x000D, /* 13 */
51 PROCESSOR_ARCHITECTURE_IA32_ON_ARM64 = 0x000E, /* 14 */
52 PROCESSOR_ARCHITECTURE_UNKNOWN = 0xFFFF
53 } spoolss_ProcessorArchitecture;
55 typedef [v1_enum] enum {
56 PROCESSOR_INTEL_386 = 0x00000182, /* 386 */
57 PROCESSOR_INTEL_486 = 0x000001E6, /* 486 */
58 PROCESSOR_INTEL_PENTIUM = 0x0000024A, /* 586 */
59 PROCESSOR_INTEL_860 = 0x0000035C, /* 860 */
60 PROCESSOR_INTEL_IA64 = 0x00000898, /* 2200 */
61 PROCESSOR_AMD_X8664 = 0x000021D8, /* 8664 */
62 PROCESSOR_MIPS_R2000 = 0x000007D0, /* 2000 */
63 PROCESSOR_MIPS_R3000 = 0x00000BB8, /* 3000 */
64 PROCESSOR_ALPHA_21064 = 0x00005248, /* 21064 */
65 PROCESSOR_PPC_601 = 0x00000259, /* 601 */
66 PROCESSOR_PPC_603 = 0x0000025B, /* 603 */
67 PROCESSOR_PPC_604 = 0x0000025C, /* 604 */
68 PROCESSOR_PPC_620 = 0x0000026C, /* 620 */
69 PROCESSOR_HITACHI_SH3 = 0x00002713, /* 10003 */
70 PROCESSOR_HITACHI_SH3E = 0x00002714, /* 10004 */
71 PROCESSOR_HITACHI_SH4 = 0x00002715, /* 10005 */
72 PROCESSOR_MOTOROLA_821 = 0x00000335, /* 821 */
73 PROCESSOR_STRONGARM = 0x00000A11, /* 2577 */
74 PROCESSOR_ARM720 = 0x00000720, /* 1824 */
75 PROCESSOR_ARM820 = 0x00000820, /* 2080 */
76 PROCESSOR_ARM920 = 0x00000920, /* 2336 */
77 PROCESSOR_ARM_7TDMI = 0x00011171, /* 70001 */
78 PROCESSOR_OPTIL = 0x0000494F /* 18767 */
79 } spoolss_ProcessorType;
81 typedef [v1_enum] enum {
82 /* Windows 95, Windows 98, Windows Me, Windows NT4 */
83 SPOOLSS_MAJOR_VERSION_NT4_95_98_ME = 0x00000004,
84 /* Windows 2000, Windows 2003, Windows XP */
85 SPOOLSS_MAJOR_VERSION_2000_2003_XP = 0x00000005,
86 /* Windows Vista, Windows 2008 */
87 SPOOLSS_MAJOR_VERSION_2008_VISTA = 0x00000006
88 } spoolss_MajorVersion;
90 typedef [v1_enum] enum {
91 /* Windows 2008, Windows Vista, Windows 2000, Windows NT4, Windows 95 */
92 SPOOLSS_MINOR_VERSION_0 = 0x00000000,
93 /* Windows XP */
94 SPOOLSS_MINOR_VERSION_XP = 0x00000001,
95 /* Windows 2003, Windows XP x64 */
96 SPOOLSS_MINOR_VERSION_2003_XP64 = 0x00000002,
97 /* Windows 98 */
98 SPOOLSS_MINOR_VERSION_98 = 0x0000000a,
99 /* Windows Me */
100 SPOOLSS_MINOR_VERSION_ME = 0x0000005a
101 } spoolss_MinorVersion;
103 const int PRINTER_STATUS_OK = 0x00000000;
105 typedef [public] bitmap {
106 PRINTER_STATUS_PAUSED = 0x00000001,
107 PRINTER_STATUS_ERROR = 0x00000002,
108 PRINTER_STATUS_PENDING_DELETION = 0x00000004,
109 PRINTER_STATUS_PAPER_JAM = 0x00000008,
110 PRINTER_STATUS_PAPER_OUT = 0x00000010,
111 PRINTER_STATUS_MANUAL_FEED = 0x00000020,
112 PRINTER_STATUS_PAPER_PROBLEM = 0x00000040,
113 PRINTER_STATUS_OFFLINE = 0x00000080,
114 PRINTER_STATUS_IO_ACTIVE = 0x00000100,
115 PRINTER_STATUS_BUSY = 0x00000200,
116 PRINTER_STATUS_PRINTING = 0x00000400,
117 PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800,
118 PRINTER_STATUS_NOT_AVAILABLE = 0x00001000,
119 PRINTER_STATUS_WAITING = 0x00002000,
120 PRINTER_STATUS_PROCESSING = 0x00004000,
121 PRINTER_STATUS_INITIALIZING = 0x00008000,
122 PRINTER_STATUS_WARMING_UP = 0x00010000,
123 PRINTER_STATUS_TONER_LOW = 0x00020000,
124 PRINTER_STATUS_NO_TONER = 0x00040000,
125 PRINTER_STATUS_PAGE_PUNT = 0x00080000,
126 PRINTER_STATUS_USER_INTERVENTION= 0x00100000,
127 PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000,
128 PRINTER_STATUS_DOOR_OPEN = 0x00400000,
129 PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000,
130 PRINTER_STATUS_POWER_SAVE = 0x01000000
131 } spoolss_PrinterStatus;
133 /* JOB status codes. */
135 const int JOB_STATUS_QUEUED = 0x0000;
137 typedef [bitmap32bit] bitmap {
138 JOB_STATUS_PAUSED = 0x00000001,
139 JOB_STATUS_ERROR = 0x00000002,
140 JOB_STATUS_DELETING = 0x00000004,
141 JOB_STATUS_SPOOLING = 0x00000008,
142 JOB_STATUS_PRINTING = 0x00000010,
143 JOB_STATUS_OFFLINE = 0x00000020,
144 JOB_STATUS_PAPEROUT = 0x00000040,
145 JOB_STATUS_PRINTED = 0x00000080,
146 JOB_STATUS_DELETED = 0x00000100,
147 JOB_STATUS_BLOCKED_DEVQ = 0x00000200,
148 JOB_STATUS_USER_INTERVENTION = 0x00000400,
149 JOB_STATUS_RESTART = 0x00000800,
150 JOB_STATUS_COMPLETE = 0x00001000
151 } spoolss_JobStatus;
153 typedef [v1_enum] enum {
154 SPOOLSS_DEBUGGING_BUILD = 0x00000000,
155 SPOOLSS_RELEASE_BUILD = 0x00000001
156 } spoolss_Build;
158 typedef [public,gensize] struct {
159 [relative] nstring *printername;
160 [relative] nstring *servername;
161 uint32 cjobs;
162 uint32 total_jobs;
163 uint32 total_bytes;
164 spoolss_Time time;
165 uint32 global_counter;
166 uint32 total_pages;
167 uint32 version;
168 spoolss_Build free_build;
169 uint32 spooling;
170 uint32 max_spooling;
171 uint32 session_counter;
172 uint32 num_error_out_of_paper;
173 uint32 num_error_not_ready;
174 spoolss_JobStatus job_error;
175 uint32 number_of_processors;
176 spoolss_ProcessorType processor_type;
177 uint32 high_part_total_bytes;
178 uint32 change_id;
179 WERROR last_error;
180 spoolss_PrinterStatus status;
181 uint32 enumerate_network_printers;
182 uint32 c_setprinter;
183 spoolss_ProcessorArchitecture processor_architecture;
184 uint16 processor_level;
185 uint32 ref_ic;
186 uint32 reserved2;
187 uint32 reserved3;
188 } spoolss_PrinterInfo0;
190 /* Device Mode Extra Data */
192 typedef [v1_enum] enum {
193 SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA = 0x554e4944, /* 0x44494e55 */
194 SPOOLSS_DM_SIGNATURE_JTEXP = 0x4a544d53, /* 0x534d544a */
195 SPOOLSS_DM_SIGNATURE_PSEXTRA = 0x50524956 /* 0x56495250 */
196 } spoolss_DM_Signature;
198 typedef [v1_enum] enum {
199 SPOOLSS_DM_LAYOUT_NUP_DISABLED = 0x00000000,
200 SPOOLSS_DM_LAYOUT_NUP_2 = 0x00000001,
201 SPOOLSS_DM_LAYOUT_NUP_4 = 0x00000002,
202 SPOOLSS_DM_LAYOUT_NUP_6 = 0x00000003,
203 SPOOLSS_DM_LAYOUT_NUP_9 = 0x00000004,
204 SPOOLSS_DM_LAYOUT_NUP_16 = 0x00000005,
205 SPOOLSS_DM_LAYOUT_BOOKLET = 0x00000006
206 } spoolss_DM_Layout;
208 typedef [v1_enum] enum {
209 SPOOLSS_DM_NUP_DIRECTION_L2R_T2B = 0x00000001,
210 SPOOLSS_DM_NUP_DIRECTION_T2B_L2R = 0x00000002,
211 SPOOLSS_DM_NUP_DIRECTION_R2L_T2B = 0x00000004,
212 SPOOLSS_DM_NUP_DIRECTION_T2B_R2L = 0x00000008
213 } spoolss_DM_NupDirection;
215 typedef [v1_enum] enum {
216 SPOOLSS_DM_NUP_BORDER_PRINT = 0x00000000,
217 SPOOLSS_DM_NUP_BORDER_NONE = 0x00000001
218 } spoolss_DM_NupBorderFlags;
220 typedef [v1_enum] enum {
221 SPOOLSS_DM_BOOKLET_LEFT_FLIP = 0x00000000,
222 SPOOLSS_DM_BOOKLET_RIGHT_FLIP = 0x00000001
223 } spoolss_DM_BookletFlags;
225 /* Device Mode Extra Data: PostScript */
227 /* NT 3.51 */
229 typedef [bitmap32bit] bitmap {
230 SPOOLSS_DM_PS_FLAGS_DRV_ERROR_HANDLER = 0x00000002,
231 SPOOLSS_DM_PS_FLAGS_PRINT_MIRROR = 0x00000004,
232 SPOOLSS_DM_PS_FLAGS_PRINT_NEGATIVE = 0x00000010,
233 SPOOLSS_DM_PS_FLAGS_COMPRESS_BITMAP = 0x00000040,
234 SPOOLSS_DM_PS_FLAGS_ROTATE_180 = 0x00000200,
235 SPOOLSS_DM_PS_FLAGS_GDI_METAFILE_SPOOL = 0x00002000
236 } spoolss_DMPS_Flags;
238 typedef struct {
239 [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
240 spoolss_DMPS_Flags dwFlags;
241 uint32 wchEPSFile[12];
242 [value(24)] uint16 caSize;
243 uint16 caFlags;
244 uint16 caIlluminantIndex;
245 uint16 caRedGamma;
246 uint16 caGreenGamma;
247 uint16 caBlueGamma;
248 uint16 caReferenceBlack;
249 uint16 caReferenceWhite;
250 uint16 caContrast;
251 uint16 caBrightness;
252 uint16 caColorfulness;
253 uint16 caRedGreenTint;
254 } spoolss_PSDRVEXTRA351;
256 /* NT 4.0 */
258 typedef struct {
259 [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
260 spoolss_DMPS_Flags dwFlags;
261 uint32 wchEPSFile[12];
262 [value(24)] uint16 caSize;
263 uint16 caFlags;
264 uint16 caIlluminantIndex;
265 uint16 caRedGamma;
266 uint16 caGreenGamma;
267 uint16 caBlueGamma;
268 uint16 caReferenceBlack;
269 uint16 caReferenceWhite;
270 uint16 caContrast;
271 uint16 caBrightness;
272 uint16 caColorfulness;
273 uint16 caRedGreenTint;
274 uint16 wChecksum;
275 uint16 wOptions;
276 uint32 aubOptions[8];
277 } spoolss_PSDRVEXTRA400;
279 /* 2000 & XP */
281 typedef [v1_enum] enum {
282 SPOOLSS_DM_PS_OPTIMIZE_SPEED = 0x00000000,
283 SPOOLSS_DM_PS_OPTIMIZE_PORTABILITY = 0x00000001,
284 SPOOLSS_DM_PS_OPTIMIZE_EPS = 0x00000002,
285 SPOOLSS_DM_PS_OPTIMIZE_ARCHIVAL = 0x00000003
286 } spoolss_DMPS_Dialect;
288 typedef [v1_enum] enum {
289 SPOOLSS_DM_PS_TTDLFMT_DEFAULT = 0x00000000,
290 SPOOLSS_DM_PS_TTDLFMT_TYPE_1 = 0x00000001,
291 SPOOLSS_DM_PS_TTDLFMT_TYPE_3 = 0x00000002,
292 SPOOLSS_DM_PS_TTDLFMT_TYPE_42 = 0x00000003
293 } spoolss_DMPS_TTDLFmt;
295 typedef [v1_enum] enum {
296 SPOOLSS_DM_PS_PSLEVEL_1 = 0x00000001,
297 SPOOLSS_DM_PS_PSLEVEL_2 = 0x00000002,
298 SPOOLSS_DM_PS_PSLEVEL_3 = 0x00000003
299 } spoolss_DMPS_PSLevel;
301 typedef enum {
302 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST = 0x0000,
303 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST = 0x0001,
304 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST_UPSIDEDOWN = 0x0002,
305 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST_UPSIDEDOWN= 0x0003
306 } spoolss_DMPS_FeedDirection;
308 typedef struct {
309 [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
310 spoolss_DMPS_Flags dwFlags;
311 uint32 wchEPSFile[12];
312 [value(24)] uint16 caSize;
313 uint16 caFlags;
314 uint16 caIlluminantIndex;
315 uint16 caRedGamma;
316 uint16 caGreenGamma;
317 uint16 caBlueGamma;
318 uint16 caReferenceBlack;
319 uint16 caReferenceWhite;
320 uint16 caContrast;
321 uint16 caBrightness;
322 uint16 caColorfulness;
323 uint16 caRedGreenTint;
324 uint16 wReserved1;
325 uint16 wSize;
326 uint32 fxScrFreq;
327 uint32 fxScrAngle;
328 spoolss_DMPS_Dialect iDialect;
329 spoolss_DMPS_TTDLFmt iTTDLFmt;
330 boolean32 bReversePrint;
331 spoolss_DM_Layout iLayout;
332 spoolss_DMPS_PSLevel iPSLevel;
333 uint32 dwReserved2;
334 uint16 wOEMExtra;
335 [value(0x0010)] uint16 wVer;
336 uint32 dwX;
337 uint32 dwY;
338 uint32 dwWidthOffset;
339 uint32 dwHeightOffset;
340 spoolss_DMPS_FeedDirection wFeedDirection;
341 uint16 wCutSheet;
342 uint32 dwReserved3[4];
343 uint32 dwChecksum32;
344 uint32 dwOptions;
345 uint32 aOptions[128];
346 } spoolss_PSDRVEXTRA500;
348 /* Vista, 2008, 7 */
350 typedef struct {
351 [value(SPOOLSS_DM_SIGNATURE_PSEXTRA)] spoolss_DM_Signature dwSignature;
352 spoolss_DMPS_Flags dwFlags;
353 uint32 wchEPSFile[12];
354 [value(24)] uint16 caSize;
355 uint16 caFlags;
356 uint16 caIlluminantIndex;
357 uint16 caRedGamma;
358 uint16 caGreenGamma;
359 uint16 caBlueGamma;
360 uint16 caReferenceBlack;
361 uint16 caReferenceWhite;
362 uint16 caContrast;
363 uint16 caBrightness;
364 uint16 caColorfulness;
365 uint16 caRedGreenTint;
366 uint16 wCoreJTExpSize;
367 [value(ndr_size_spoolss_PSDRVEXTRA(r, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
368 uint32 fxScrFreq;
369 uint32 fxScrAngle;
370 spoolss_DMPS_Dialect iDialect;
371 spoolss_DMPS_TTDLFmt iTTDLFmt;
372 boolean32 bReversePrint;
373 spoolss_DM_Layout iLayout;
374 spoolss_DMPS_PSLevel iPSLevel;
375 uint32 dwReserved2;
376 uint16 wOEMExtra;
377 [value(0x0010)] uint16 wVer;
378 uint32 dwX;
379 uint32 dwY;
380 uint32 dwWidthOffset;
381 uint32 dwHeightOffset;
382 spoolss_DMPS_FeedDirection wFeedDirection;
383 uint16 wCutSheet;
384 uint32 dwReserved3[4];
385 uint32 dwChecksum32;
386 uint32 dwOptions;
387 uint32 aOptions[128];
388 spoolss_DM_NupDirection dwNupDirection;
389 spoolss_DM_NupBorderFlags dwNupBorderFlags;
390 spoolss_DM_BookletFlags dwBookletFlags;
391 uint32 dwPadding;
392 } spoolss_PSDRVEXTRA;
394 /* Device Mode Extra Data: UniDriver */
396 /* NT 3.5, NT 4.0 */
398 typedef struct {
399 uint16 wReserved[56];
400 } spoolss_UNIDRVEXTRA3_4;
402 /* 2000, XP */
404 typedef [v1_enum] enum {
405 SPOOLSS_DM_UNI_QUALITY_BEST = 0x00000000,
406 SPOOLSS_DM_UNI_QUALITY_MEDIUM = 0x00000001,
407 SPOOLSS_DM_UNI_QUALITY_DRAFT = 0x00000002
408 } spoolss_DMUNI_Quality;
410 typedef [bitmap32bit] bitmap {
411 SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS = 0x00000002,
412 SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL = 0x00000010,
413 SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING = 0x00000080
414 } spoolss_DMUNI_Flags;
416 typedef struct {
417 [value(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA)] spoolss_DM_Signature dwSignature;
418 [value(0x0022)] uint16 wVer;
419 uint16 sPadding;
420 uint16 wSize;
421 uint16 wOEMExtra;
422 uint32 dwChecksum32;
423 spoolss_DMUNI_Flags dwFlags;
424 boolean32 bReversePrint;
425 spoolss_DM_Layout iLayout;
426 spoolss_DMUNI_Quality iQuality;
427 uint16 wReserved[6];
428 uint32 dwOptions;
429 uint32 aOptions[128];
430 } spoolss_UNIDRVEXTRA500;
432 /* Vista, 2008, 7 */
434 typedef [public,gensize] struct {
435 [value(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA)] spoolss_DM_Signature dwSignature;
436 [value(0x0022)] uint16 wVer;
437 uint16 wCoreJTExpSize;
438 [value(ndr_size_spoolss_UNIDRVEXTRA(r, ndr->flags) + wCoreJTExpSize)] uint16 wCoreFullSize;
439 uint16 wOEMExtra;
440 uint32 dwChecksum32;
441 spoolss_DMUNI_Flags dwFlags;
442 boolean32 bReversePrint;
443 spoolss_DM_Layout iLayout;
444 spoolss_DMUNI_Quality iQuality;
445 uint16 wReserved[6];
446 uint32 dwOptions;
447 uint32 aOptions[128];
448 spoolss_DM_NupDirection dwNupDirection;
449 spoolss_DM_NupBorderFlags dwNupBorderFlags;
450 spoolss_DM_BookletFlags dwBookletFlags;
451 } spoolss_UNIDRVEXTRA;
453 /* Device Mode Extra Data: JTEXP */
455 typedef struct {
456 uint32 dwSize;
457 [value(SPOOLSS_DM_SIGNATURE_JTEXP)] spoolss_DM_Signature dwSignature;
458 [value(0)] uint32 dwVersion;
459 [value(16)] uint16 wJTHdrSize;
460 uint16 wCoreMFOSize; /* must be sizeof the two following elements, must be dwSize - 16*/
461 nstring ModelName;
462 [flag(STR_UTF8|STR_NULLTERM|NDR_REMAINING)] string_array FeatureOptionPairs;
463 } spoolss_JTEXP;
465 /* Device Mode Extra Data: OEM_DMEXTRA */
467 typedef struct {
468 uint32 dwSize;
469 spoolss_DM_Signature dwSignature;
470 uint32 dwVersion;
471 [flag(NDR_REMAINING)] DATA_BLOB Data;
472 } spoolss_OEM_DMEXTRA;
474 typedef [nodiscriminant] union {
475 [case(0x0350)] spoolss_PSDRVEXTRA351 psdrvextra351;
476 [case(0x0400)] spoolss_PSDRVEXTRA400 psdrvextra400;
477 [case(0x0501)] spoolss_PSDRVEXTRA500 psdrvextra500;
478 [case(0x0600)] spoolss_PSDRVEXTRA psdrvextra;
479 [default] [flag(NDR_REMAINING)] DATA_BLOB psblob;
480 } spoolss_DeviceModeExtraDataPostScript;
482 typedef [nodiscriminant] union {
483 [case(0x0301)] spoolss_UNIDRVEXTRA3_4 unidrvextra3_4;
484 [case(0x0500)] spoolss_UNIDRVEXTRA500 unidrvextra500;
485 [case(0x0600)] spoolss_UNIDRVEXTRA unidrvextra;
486 [default] [flag(NDR_REMAINING)] DATA_BLOB uniblob;
487 } spoolss_DeviceModeExtraDataUniDriver;
489 typedef [bitmap32bit] bitmap {
490 DEVMODE_ORIENTATION = 0x00000001,
491 DEVMODE_PAPERSIZE = 0x00000002,
492 DEVMODE_PAPERLENGTH = 0x00000004,
493 DEVMODE_PAPERWIDTH = 0x00000008,
494 DEVMODE_SCALE = 0x00000010,
495 DEVMODE_POSITION = 0x00000020,
496 DEVMODE_NUP = 0x00000040,
497 DEVMODE_COPIES = 0x00000100,
498 DEVMODE_DEFAULTSOURCE = 0x00000200,
499 DEVMODE_PRINTQUALITY = 0x00000400,
500 DEVMODE_COLOR = 0x00000800,
501 DEVMODE_DUPLEX = 0x00001000,
502 DEVMODE_YRESOLUTION = 0x00002000,
503 DEVMODE_TTOPTION = 0x00004000,
504 DEVMODE_COLLATE = 0x00008000,
505 DEVMODE_FORMNAME = 0x00010000,
506 DEVMODE_LOGPIXELS = 0x00020000,
507 DEVMODE_BITSPERPEL = 0x00040000,
508 DEVMODE_PELSWIDTH = 0x00080000,
509 DEVMODE_PELSHEIGHT = 0x00100000,
510 DEVMODE_DISPLAYFLAGS = 0x00200000,
511 DEVMODE_DISPLAYFREQUENCY = 0x00400000,
512 DEVMODE_ICMMETHOD = 0x00800000,
513 DEVMODE_ICMINTENT = 0x01000000,
514 DEVMODE_MEDIATYPE = 0x02000000,
515 DEVMODE_DITHERTYPE = 0x04000000,
516 DEVMODE_PANNINGWIDTH = 0x08000000,
517 DEVMODE_PANNINGHEIGHT = 0x10000000
518 } spoolss_DeviceModeFields;
520 typedef [enum16bit] enum {
521 DMSPEC_NT3 = 0x320,
522 DMSPEC_WIN95_98_ME = 0x400,
523 DMSPEC_NT4_AND_ABOVE = 0x401
524 } spoolss_DeviceModeSpecVersion;
526 typedef [enum16bit] enum {
527 DMORIENT_PORTRAIT = 0x0001,
528 DMORIENT_LANDSCAPE = 0x0002
529 } spoolss_DeviceModeOrientation;
531 typedef [enum16bit] enum {
532 DMPAPER_LETTER = 0x0001, /* Letter, 8 1/2 x 11 inches */
533 DMPAPER_LETTERSMALL = 0x0002, /* Letter Small, 8 1/2 x 11 inches */
534 DMPAPER_TABLOID = 0x0003, /* Tabloid, 11 x 17 inches */
535 DMPAPER_LEDGER = 0x0004, /* Ledger, 17 x 11 inches */
536 DMPAPER_LEGAL = 0x0005, /* Legal, 8 1/2 x 14 inches */
537 DMPAPER_STATEMENT = 0x0006, /* Statement, 5 1/2 x 8 1/2 inches */
538 DMPAPER_EXECUTIVE = 0x0007, /* Executive, 7 1/4 x 10 1/2 inches */
539 DMPAPER_A3 = 0x0008, /* A3 sheet, 297 x 420 millimeters */
540 DMPAPER_A4 = 0x0009, /* A4 sheet, 210 x 297 millimeters */
541 DMPAPER_A4SMALL = 0x000A, /* A4 small sheet, 210 x 297 millimeters */
542 DMPAPER_A5 = 0x000B, /* A5 sheet, 148 x 210 millimeters */
543 DMPAPER_B4 = 0x000C, /* B4 sheet, 250 x 354 millimeters */
544 DMPAPER_B5 = 0x000D, /* B5 sheet, 182 x 257-millimeter paper */
545 DMPAPER_FOLIO = 0x000E, /* Folio, 8 1/2 x 13-inch paper */
546 DMPAPER_QUARTO = 0x000F, /* Quarto, 215 x 275 millimeter paper */
547 DMPAPER_10X14 = 0x0010, /* 10 x 14-inch sheet */
548 DMPAPER_11X17 = 0x0011, /* 11 x 17-inch sheet */
549 DMPAPER_NOTE = 0x0012, /* Note, 8 1/2 x 11-inches */
550 DMPAPER_ENV_9 = 0x0013, /* #9 Envelope, 3 7/8 x 8 7/8 inches */
551 DMPAPER_ENV_10 = 0x0014, /* #10 Envelope, 4 1/8 x 9 1/2 inches */
552 DMPAPER_ENV_11 = 0x0015, /* #11 Envelope, 4 1/2 x 10 3/8 inches */
553 DMPAPER_ENV_12 = 0x0016, /* #12 Envelope, 4 3/4 x 11 inches */
554 DMPAPER_ENV_14 = 0x0017, /* #14 Envelope, 5 x 11 1/2 inches */
555 DMPAPER_CSHEET = 0x0018, /* C Sheet, 17 x 22 inches */
556 DMPAPER_DSHEET = 0x0019, /* D Sheet, 22 x 34 inches */
557 DMPAPER_ESHEET = 0x001A, /* E Sheet, 34 x 44 inches */
558 DMPAPER_ENV_DL = 0x001B, /* DL Envelope, 110 x 220 millimeters */
559 DMPAPER_ENV_C5 = 0x001C, /* C5 Envelope, 162 x 229 millimeters */
560 DMPAPER_ENV_C3 = 0x001D, /* C3 Envelope, 324 x 458 millimeters */
561 DMPAPER_ENV_C4 = 0x001E, /* C4 Envelope, 229 x 324 millimeters */
562 DMPAPER_ENV_C6 = 0x001F, /* C6 Envelope, 114 x 162 millimeters */
563 DMPAPER_ENV_C65 = 0x0020, /* C65 Envelope, 114 x 229 millimeters */
564 DMPAPER_ENV_B4 = 0x0021, /* B4 Envelope, 250 x 353 millimeters */
565 DMPAPER_ENV_B5 = 0x0022, /* B5 Envelope, 176 x 250 millimeters */
566 DMPAPER_ENV_B6 = 0x0023, /* B6 Envelope, 176 x 125 millimeters */
567 DMPAPER_ENV_ITALY = 0x0024, /* Italy Envelope, 110 x 230 millimeters */
568 DMPAPER_ENV_MONARCH = 0x0025, /* Monarch Envelope, 3 7/8 x 7 1/2 inches */
569 DMPAPER_ENV_PERSONAL = 0x0026, /* 6 3/4 Envelope, 3 5/8 x 6 1/2 inches */
570 DMPAPER_FANFOLD_US = 0x0027, /* US Std Fanfold, 14 7/8 x 11 inches */
571 DMPAPER_FANFOLD_STD_GERMAN = 0x0028, /* German Std Fanfold, 8 1/2 x 12 inches */
572 DMPAPER_FANFOLD_LGL_GERMAN = 0x0029, /* German Legal Fanfold, 8 x 13 inches */
573 DMPAPER_DBL_JAPANESE_POSTCARD = 0x0045, /* Double Japanese Postcard, 200 x 148 millimeters */
574 DMPAPER_A6 = 0x0046, /* A6 sheet, 105 x 148 millimeters */
575 DMPAPER_JENV_KAKU2 = 0x0047, /* Japanese Envelope Kaku #2 */
576 DMPAPER_JENV_KAKU3 = 0x0048, /* Japanese Envelope Kaku #3 */
577 DMPAPER_JENV_CHOU3 = 0x0049, /* Japanese Envelope Chou #3 */
578 DMPAPER_JENV_CHOU4 = 0x004A, /* Japanese Envelope Chou #4 */
579 DMPAPER_LETTER_ROTATED = 0x004B, /* Letter Rotated, 11 by 8 1/2 inches */
580 DMPAPER_A3_ROTATED = 0x004C, /* A3 rotated sheet, 420 x 297 millimeters */
581 DMPAPER_A4_ROTATED = 0x004D, /* A4 rotated sheet, 297 x 210 millimeters */
582 DMPAPER_A5_ROTATED = 0x004E, /* A5 rotated sheet, 210 x 148 millimeters */
583 DMPAPER_B4_JIS_ROTATED = 0x004F, /* B4 (JIS) rotated sheet, 364 x 257 millimeters */
584 DMPAPER_B5_JIS_ROTATED = 0x0050, /* B5 (JIS) rotated sheet, 257 x 182 millimeters */
585 DMPAPER_JAPANESE_POSTCARD_ROTATED = 0x0051, /* Japanese Postcard Rotated, 148 x 100 millimeters */
586 DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 0x0052, /* Double Japanese Postcard Rotated, 148 x 200 millimeters */
587 DMPAPER_A6_ROTATED = 0x0053, /* A6 rotated sheet, 148 x 105 millimeters */
588 DMPAPER_JENV_KAKU2_ROTATED = 0x0054, /* Japanese Envelope Kaku #2 Rotated */
589 DMPAPER_JENV_KAKU3_ROTATED = 0x0055, /* Japanese Envelope Kaku #3 Rotated */
590 DMPAPER_JENV_CHOU3_ROTATED = 0x0056, /* Japanese Envelope Chou #3 Rotated */
591 DMPAPER_JENV_CHOU4_ROTATED = 0x0057, /* Japanese Envelope Chou #4 Rotated */
592 DMPAPER_B6_JIS = 0x0058, /* B6 (JIS) sheet, 128 x 182 millimeters */
593 DMPAPER_B6_JIS_ROTATED = 0x0059, /* B6 (JIS) rotated sheet, 182 x 128 millimeters */
594 DMPAPER_12X11 = 0x005A, /* 12 x 11-inch sheet */
595 DMPAPER_JENV_YOU4 = 0x005B, /* Japanese Envelope You #4 */
596 DMPAPER_JENV_YOU4_ROTATED = 0x005C, /* Japanese Envelope You #4 */
597 DMPAPER_P16K = 0x005D, /* PRC 16K, 146 x 215 millimeters */
598 DMPAPER_P32K = 0x005E, /* PRC 32K, 97 x 151 millimeters */
599 DMPAPER_P32KBIG = 0x005F, /* PRC 32K(Big) 97 x 151 millimeters */
600 DMPAPER_PENV_1 = 0x0060, /* PRC Envelope #1, 102 by 165 millimeters */
601 DMPAPER_PENV_2 = 0x0061, /* PRC Envelope #2, 102 x 176 millimeters */
602 DMPAPER_PENV_3 = 0x0062, /* PRC Envelope #3, 125 x 176 millimeters */
603 DMPAPER_PENV_4 = 0x0063, /* PRC Envelope #4, 110 x 208 millimeters */
604 DMPAPER_PENV_5 = 0x0064, /* PRC Envelope #5, 110 x 220 millimeters */
605 DMPAPER_PENV_6 = 0x0065, /* PRC Envelope #6, 120 x 230 millimeters */
606 DMPAPER_PENV_7 = 0x0066, /* PRC Envelope #7, 160 x 230 millimeters */
607 DMPAPER_PENV_8 = 0x0067, /* PRC Envelope #8, 120 x 309 millimeters */
608 DMPAPER_PENV_9 = 0x0068, /* PRC Envelope #9, 229 x 324 millimeters */
609 DMPAPER_PENV_10 = 0x0069, /* PRC Envelope #10, 324 x 458 millimeters */
610 DMPAPER_P16K_ROTATED = 0x006A, /* PRC 16K Rotated, 215 x 146 millimeters */
611 DMPAPER_P32K_ROTATED = 0x006B, /* PRC 32K Rotated, 151 x 97 millimeters */
612 DMPAPER_P32KBIG_ROTATED = 0x006C, /* PRC 32K(Big) Rotated, 151 x 97 millimeters */
613 DMPAPER_PENV_1_ROTATED = 0x006D, /* PRC Envelope #1 Rotated, 165 x 102 millimeters */
614 DMPAPER_PENV_2_ROTATED = 0x006E, /* PRC Envelope #2 Rotated, 176 x 102 millimeters */
615 DMPAPER_PENV_3_ROTATED = 0x006F, /* PRC Envelope #3 Rotated, 176 x 125 millimeters */
616 DMPAPER_PENV_4_ROTATED = 0x0070, /* PRC Envelope #4 Rotated, 208 x 110 millimeters */
617 DMPAPER_PENV_5_ROTATED = 0x0071, /* PRC Envelope #5 Rotated, 220 x 110 millimeters */
618 DMPAPER_PENV_6_ROTATED = 0x0072, /* PRC Envelope #6 Rotated, 230 x 120 millimeters */
619 DMPAPER_PENV_7_ROTATED = 0x0073, /* PRC Envelope #7 Rotated, 230 x 160 millimeters */
620 DMPAPER_PENV_8_ROTATED = 0x0074, /* PRC Envelope #8 Rotated, 309 x 120 millimeters */
621 DMPAPER_PENV_9_ROTATED = 0x0075, /* PRC Envelope #9 Rotated, 324 x 229 millimeters */
622 DMPAPER_PENV_10_ROTATED = 0x0076 /* PRC Envelope #10 Rotated, 458 x 324 millimeters */
623 } spoolss_DeviceModePaperSize;
625 typedef [enum16bit] enum {
626 DMBIN_UPPER = 0x0001,
627 DMBIN_LOWER = 0x0002,
628 DMBIN_MIDDLE = 0x0003,
629 DMBIN_MANUAL = 0x0004,
630 DMBIN_ENVELOPE = 0x0005,
631 DMBIN_ENVMANUAL = 0x0006,
632 DMBIN_AUTO = 0x0007,
633 DMBIN_TRACTOR = 0x0008,
634 DMBIN_SMALLFMT = 0x0009,
635 DMBIN_LARGEFMT = 0x000a,
636 DMBIN_LARGECAPACITY = 0x000b,
637 DMBIN_CASSETTE = 0x000e,
638 DMBIN_FORMSOURCE = 0x000f
639 } spoolss_DeviceModeDefaultSource;
641 typedef [enum16bit] enum {
642 DMRES_HIGH = 0xfffc,
643 DMRES_MEDIUM = 0xfffd,
644 DMRES_LOW = 0xfffe,
645 DMRES_DRAFT = 0xffff
646 } spoolss_DeviceModePrintQuality;
648 typedef [enum16bit] enum {
649 DMRES_MONOCHROME = 0x0001,
650 DMRES_COLOR = 0x0002
651 } spoolss_DeviceModeColor;
653 typedef [enum16bit] enum {
654 DMDUP_SIMPLEX = 0x0001,
655 DMDUP_VERTICAL = 0x0002,
656 DMDUP_HORIZONTAL = 0x0003
657 } spoolss_DeviceModeDuplex;
659 typedef [enum16bit] enum {
660 DMTT_BITMAP = 0x0001,
661 DMTT_DOWNLOAD = 0x0002,
662 DMTT_SUBDEV = 0x0003,
663 DMTT_DOWNLOAD_OUTLINE = 0x0004
664 } spoolss_DeviceModeTTOption;
666 typedef [enum16bit] enum {
667 DMCOLLATE_FALSE = 0x0000,
668 DMCOLLATE_TRUE = 0x0001
669 } spoolss_DeviceModeCollate;
671 typedef [v1_enum] enum {
672 DMNUP_SYSTEM = 0x00000001,
673 DMNUP_ONEUP = 0x00000002
674 } spoolss_DeviceModeNUp;
676 typedef [v1_enum] enum {
677 DMICMMETHOD_NONE = 0x00000001,
678 DMICMMETHOD_SYSTEM = 0x00000002,
679 DMICMMETHOD_DRIVER = 0x00000003,
680 DMICMMETHOD_DEVICE = 0x00000004
681 } spoolss_DeviceModeICMMethod;
683 typedef [v1_enum] enum {
684 DMICM_SATURATE = 0x00000001,
685 DMICM_CONTRAST = 0x00000002,
686 DMICM_COLORIMETRIC = 0x00000003,
687 DMICM_ABS_COLORIMETRIC = 0x00000004
688 } spoolss_DeviceModeICMIntent;
690 typedef [v1_enum] enum {
691 DMMEDIA_STANDARD = 0x00000001,
692 DMMEDIA_TRANSPARENCY = 0x00000002,
693 DMMEDIA_GLOSSY = 0x00000003
694 } spoolss_DeviceModeMediaType;
696 typedef [v1_enum] enum {
697 DMDITHER_NONE = 0x00000001,
698 DMDITHER_COARSE = 0x00000002,
699 DMDITHER_FINE = 0x00000003,
700 DMDITHER_LINEART = 0x00000004,
701 DMDITHER_ERRORDIFFUSION = 0x00000005,
702 DMDITHER_RESERVED6 = 0x00000006,
703 DMDITHER_RESERVED7 = 0x00000007,
704 DMDITHER_RESERVED8 = 0x00000008,
705 DMDITHER_RESERVED9 = 0x00000009,
706 DMDITHER_GRAYSCALE = 0x0000000A
707 } spoolss_DeviceModeDitherType;
709 const int MAXDEVICENAME = 32;
711 typedef [public,gensize] struct {
712 [charset(UTF16),to_null] uint16 devicename[MAXDEVICENAME];
713 spoolss_DeviceModeSpecVersion specversion;
714 uint16 driverversion;
715 uint16 size;
716 [value(r->driverextra_data.length)] uint16 __driverextra_length;
717 spoolss_DeviceModeFields fields;
718 spoolss_DeviceModeOrientation orientation;
719 spoolss_DeviceModePaperSize papersize;
720 uint16 paperlength;
721 uint16 paperwidth;
722 uint16 scale;
723 uint16 copies;
724 spoolss_DeviceModeDefaultSource defaultsource;
725 spoolss_DeviceModePrintQuality printquality;
726 spoolss_DeviceModeColor color;
727 spoolss_DeviceModeDuplex duplex;
728 uint16 yresolution;
729 spoolss_DeviceModeTTOption ttoption;
730 spoolss_DeviceModeCollate collate;
731 [charset(UTF16),to_null] uint16 formname[MAXDEVICENAME];
732 uint16 logpixels; /* reserved */
733 uint32 bitsperpel; /* reserved */
734 uint32 pelswidth; /* reserved */
735 uint32 pelsheight; /* reserved */
736 spoolss_DeviceModeNUp displayflags;
737 uint32 displayfrequency; /* reserved */
738 spoolss_DeviceModeICMMethod icmmethod;
739 spoolss_DeviceModeICMIntent icmintent;
740 spoolss_DeviceModeMediaType mediatype;
741 spoolss_DeviceModeDitherType dithertype;
742 uint32 reserved1;
743 uint32 reserved2;
744 uint32 panningwidth; /* reserved */
745 uint32 panningheight; /* reserved */
746 [subcontext_size(__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data;
747 } spoolss_DeviceMode;
749 typedef [public] bitmap {
750 PRINTER_ENUM_DEFAULT = 0x00000001,
751 PRINTER_ENUM_LOCAL = 0x00000002,
752 PRINTER_ENUM_CONNECTIONS = 0x00000004,
753 PRINTER_ENUM_FAVORITE = 0x00000004,
754 PRINTER_ENUM_NAME = 0x00000008,
755 PRINTER_ENUM_REMOTE = 0x00000010,
756 PRINTER_ENUM_SHARED = 0x00000020,
757 PRINTER_ENUM_NETWORK = 0x00000040,
758 PRINTER_ENUM_EXPAND = 0x00004000,
759 PRINTER_ENUM_CONTAINER = 0x00008000,
760 PRINTER_ENUM_ICON1 = 0x00010000,
761 PRINTER_ENUM_ICON2 = 0x00020000,
762 PRINTER_ENUM_ICON3 = 0x00040000,
763 PRINTER_ENUM_ICON4 = 0x00080000,
764 PRINTER_ENUM_ICON5 = 0x00100000,
765 PRINTER_ENUM_ICON6 = 0x00200000,
766 PRINTER_ENUM_ICON7 = 0x00400000,
767 PRINTER_ENUM_ICON8 = 0x00800000,
768 PRINTER_ENUM_HIDE = 0x01000000
769 } spoolss_EnumPrinterFlags;
771 const int PRINTER_ENUM_ICONMASK = (PRINTER_ENUM_ICON1 |
772 PRINTER_ENUM_ICON2 |
773 PRINTER_ENUM_ICON3 |
774 PRINTER_ENUM_ICON4 |
775 PRINTER_ENUM_ICON5 |
776 PRINTER_ENUM_ICON6 |
777 PRINTER_ENUM_ICON7 |
778 PRINTER_ENUM_ICON8); /* 0x00ff0000 */
780 typedef [public] bitmap {
781 PRINTER_ATTRIBUTE_QUEUED = 0x00000001,
782 PRINTER_ATTRIBUTE_DIRECT = 0x00000002,
783 PRINTER_ATTRIBUTE_DEFAULT = 0x00000004,
784 PRINTER_ATTRIBUTE_SHARED = 0x00000008,
785 PRINTER_ATTRIBUTE_NETWORK = 0x00000010,
786 PRINTER_ATTRIBUTE_HIDDEN = 0x00000020,
787 PRINTER_ATTRIBUTE_LOCAL = 0x00000040,
788 PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080,
789 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100,
790 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200,
791 PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400,
792 PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800,
793 PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000,
794 PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000,
795 PRINTER_ATTRIBUTE_FAX = 0x00004000,
796 PRINTER_ATTRIBUTE_TS = 0x00008000
797 } spoolss_PrinterAttributes;
799 typedef [public,gensize] struct {
800 spoolss_EnumPrinterFlags flags;
801 [relative] nstring *description;
802 [relative] nstring *name;
803 [relative] nstring *comment;
804 } spoolss_PrinterInfo1;
806 typedef [public,gensize,nopush] struct {
807 [relative] nstring *servername;
808 [relative] nstring *printername;
809 [relative] nstring *sharename;
810 [relative] nstring *portname;
811 [relative] nstring *drivername;
812 [relative] nstring *comment;
813 [relative] nstring *location;
814 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_DeviceMode *devmode;
815 [relative] nstring *sepfile;
816 [relative] nstring *printprocessor;
817 [relative] nstring *datatype;
818 [relative] nstring *parameters;
819 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_security_descriptor *secdesc;
820 spoolss_PrinterAttributes attributes;
821 [range(0,99)] uint32 priority;
822 uint32 defaultpriority;
823 uint32 starttime;
824 uint32 untiltime;
825 spoolss_PrinterStatus status;
826 uint32 cjobs;
827 uint32 averageppm;
828 } spoolss_PrinterInfo2;
830 typedef [public,gensize] struct {
831 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_security_descriptor *secdesc;
832 } spoolss_PrinterInfo3;
834 typedef [public,gensize] struct {
835 [relative] nstring *printername;
836 [relative] nstring *servername;
837 spoolss_PrinterAttributes attributes;
838 } spoolss_PrinterInfo4;
840 typedef [public,gensize] struct {
841 [relative] nstring *printername;
842 [relative] nstring *portname;
843 spoolss_PrinterAttributes attributes;
844 uint32 device_not_selected_timeout;
845 uint32 transmission_retry_timeout;
846 } spoolss_PrinterInfo5;
848 typedef [public,gensize] struct {
849 spoolss_PrinterStatus status;
850 } spoolss_PrinterInfo6;
852 typedef bitmap {
853 DSPRINT_PUBLISH = 0x00000001,
854 DSPRINT_UPDATE = 0x00000002,
855 DSPRINT_UNPUBLISH = 0x00000004,
856 DSPRINT_REPUBLISH = 0x00000008,
857 DSPRINT_PENDING = 0x80000000
858 } spoolss_DsPrintAction;
860 typedef [public,gensize] struct {
861 [relative] nstring *guid; /* text form of printer guid */
862 spoolss_DsPrintAction action;
863 } spoolss_PrinterInfo7;
865 typedef struct {
866 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_DeviceMode *devmode;
867 } spoolss_DeviceModeInfo;
869 typedef [nodiscriminant,relative_base,public,gensize,flag(NDR_RELATIVE_REVERSE)] union {
870 [case(0)] spoolss_PrinterInfo0 info0;
871 [case(1)] spoolss_PrinterInfo1 info1;
872 [case(2)] spoolss_PrinterInfo2 info2;
873 [case(3)] spoolss_PrinterInfo3 info3;
874 [case(4)] spoolss_PrinterInfo4 info4;
875 [case(5)] spoolss_PrinterInfo5 info5;
876 [case(6)] spoolss_PrinterInfo6 info6;
877 [case(7)] spoolss_PrinterInfo7 info7;
878 [case(8)] spoolss_DeviceModeInfo info8;
879 [case(9)] spoolss_DeviceModeInfo info9;
880 [default];
881 } spoolss_PrinterInfo;
883 /******************/
884 /* Function: 0x00 */
885 /* we are using this as internal parsing code */
886 [public,noopnum,noprint] WERROR _spoolss_EnumPrinters(
887 [in] spoolss_EnumPrinterFlags flags,
888 [in,unique] [string,charset(UTF16)] uint16 *server,
889 [in] uint32 level,
890 [in,unique] DATA_BLOB *buffer,
891 [in] uint32 offered,
892 [out,unique] DATA_BLOB *info,
893 [out,ref] uint32 *needed,
894 [out,ref] uint32 *count
896 [public,noopnum,noprint] void __spoolss_EnumPrinters(
897 [in] uint32 level,
898 [in] uint32 count,
899 [out,switch_is(level)] spoolss_PrinterInfo info[count]
901 [nopull,nopush] WERROR spoolss_EnumPrinters(
902 [in] spoolss_EnumPrinterFlags flags,
903 [in,unique] [string,charset(UTF16)] uint16 *server,
904 [in] uint32 level,
905 [in,unique] DATA_BLOB *buffer,
906 [in] uint32 offered,
907 /* what we have here is a subcontext containing an array of no discriminant unions
908 * and the array has no size in front
910 [out,ref] uint32 *count,
911 [out,ref,switch_is(level),size_is(,*count)] spoolss_PrinterInfo **info,
912 [out,ref] uint32 *needed
915 /******************/
916 /* Function: 0x01 */
917 typedef [public] struct {
918 [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size;
919 [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
920 } spoolss_DevmodeContainer;
922 [public] WERROR spoolss_OpenPrinter(
923 [in,unique] [string,charset(UTF16)] uint16 *printername,
924 [in,unique] [string,charset(UTF16)] uint16 *datatype,
925 [in] spoolss_DevmodeContainer devmode_ctr,
926 [in] spoolss_AccessRights access_mask,
927 [out,ref] policy_handle *handle
930 /******************/
931 /* Function: 0x02 */
933 typedef [public,gensize] struct {
934 uint32 job_id;
935 [relative] nstring *printer_name;
936 [relative] nstring *server_name;
937 [relative] nstring *user_name;
938 [relative] nstring *document_name;
939 [relative] nstring *data_type;
940 [relative] nstring *text_status;
941 spoolss_JobStatus status;
942 [range(0,99)] uint32 priority;
943 uint32 position;
944 uint32 total_pages;
945 uint32 pages_printed;
946 spoolss_Time submitted;
947 } spoolss_JobInfo1;
949 typedef [public,gensize] struct {
950 uint32 job_id;
951 [relative] nstring *printer_name;
952 [relative] nstring *server_name;
953 [relative] nstring *user_name;
954 [relative] nstring *document_name;
955 [relative] nstring *notify_name;
956 [relative] nstring *data_type;
957 [relative] nstring *print_processor;
958 [relative] nstring *parameters;
959 [relative] nstring *driver_name;
960 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_DeviceMode *devmode;
961 [relative] nstring *text_status;
962 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_security_descriptor *secdesc;
963 spoolss_JobStatus status;
964 [range(0,99)] uint32 priority;
965 uint32 position;
966 uint32 start_time;
967 uint32 until_time;
968 uint32 total_pages;
969 uint32 size;
970 spoolss_Time submitted;
971 uint32 time;
972 uint32 pages_printed;
973 } spoolss_JobInfo2;
975 typedef [public,gensize] struct {
976 uint32 job_id;
977 uint32 next_job_id;
978 uint32 reserved;
979 } spoolss_JobInfo3;
981 typedef [public,gensize] struct {
982 uint32 job_id;
983 [relative] nstring *printer_name;
984 [relative] nstring *server_name;
985 [relative] nstring *user_name;
986 [relative] nstring *document_name;
987 [relative] nstring *notify_name;
988 [relative] nstring *data_type;
989 [relative] nstring *print_processor;
990 [relative] nstring *parameters;
991 [relative] nstring *driver_name;
992 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_DeviceMode *devmode;
993 [relative] nstring *text_status;
994 [relative,subcontext(0),flag(NDR_ALIGN4)] spoolss_security_descriptor *secdesc;
995 spoolss_JobStatus status;
996 [range(0,99)] uint32 priority;
997 uint32 position;
998 uint32 start_time;
999 uint32 until_time;
1000 uint32 total_pages;
1001 uint32 size;
1002 spoolss_Time submitted;
1003 uint32 time;
1004 uint32 pages_printed;
1005 uint32 size_high;
1006 } spoolss_JobInfo4;
1008 typedef [nodiscriminant,relative_base,public,gensize,flag(NDR_RELATIVE_REVERSE)] union {
1009 [case(1)] spoolss_JobInfo1 info1;
1010 [case(2)] spoolss_JobInfo2 info2;
1011 [case(3)] spoolss_JobInfo3 info3;
1012 [case(4)] spoolss_JobInfo4 info4;
1013 [default];
1014 } spoolss_JobInfo;
1016 typedef struct {
1017 uint32 job_id;
1018 [string,charset(UTF16)] uint16 *printer_name;
1019 [string,charset(UTF16)] uint16 *server_name;
1020 [string,charset(UTF16)] uint16 *user_name;
1021 [string,charset(UTF16)] uint16 *document_name;
1022 [string,charset(UTF16)] uint16 *data_type;
1023 [string,charset(UTF16)] uint16 *text_status;
1024 spoolss_JobStatus status;
1025 [range(0,99)] uint32 priority;
1026 uint32 position;
1027 uint32 total_pages;
1028 uint32 pages_printed;
1029 spoolss_Time submitted;
1030 } spoolss_SetJobInfo1;
1032 typedef struct {
1033 uint32 job_id;
1034 [string,charset(UTF16)] uint16 *printer_name;
1035 [string,charset(UTF16)] uint16 *server_name;
1036 [string,charset(UTF16)] uint16 *user_name;
1037 [string,charset(UTF16)] uint16 *document_name;
1038 [string,charset(UTF16)] uint16 *notify_name;
1039 [string,charset(UTF16)] uint16 *data_type;
1040 [string,charset(UTF16)] uint16 *print_processor;
1041 [string,charset(UTF16)] uint16 *parameters;
1042 [string,charset(UTF16)] uint16 *driver_name;
1043 uint3264 _devmode_ptr; /* ULONG_PTR */
1044 [string,charset(UTF16)] uint16 *text_status;
1045 uint3264 _secdesc_ptr; /* ULONG_PTR */
1046 spoolss_JobStatus status;
1047 [range(0,99)] uint32 priority;
1048 uint32 position;
1049 uint32 start_time;
1050 uint32 until_time;
1051 uint32 total_pages;
1052 uint32 size;
1053 spoolss_Time submitted;
1054 uint32 time;
1055 uint32 pages_printed;
1056 } spoolss_SetJobInfo2;
1058 typedef struct {
1059 uint32 job_id;
1060 [string,charset(UTF16)] uint16 *printer_name;
1061 [string,charset(UTF16)] uint16 *server_name;
1062 [string,charset(UTF16)] uint16 *user_name;
1063 [string,charset(UTF16)] uint16 *document_name;
1064 [string,charset(UTF16)] uint16 *notify_name;
1065 [string,charset(UTF16)] uint16 *data_type;
1066 [string,charset(UTF16)] uint16 *print_processor;
1067 [string,charset(UTF16)] uint16 *parameters;
1068 [string,charset(UTF16)] uint16 *driver_name;
1069 uint3264 _devmode_ptr; /* ULONG_PTR */
1070 [string,charset(UTF16)] uint16 *text_status;
1071 uint3264 _secdesc_ptr; /* ULONG_PTR */
1072 spoolss_JobStatus status;
1073 [range(0,99)] uint32 priority;
1074 uint32 position;
1075 uint32 start_time;
1076 uint32 until_time;
1077 uint32 total_pages;
1078 uint32 size;
1079 spoolss_Time submitted;
1080 uint32 time;
1081 uint32 pages_printed;
1082 uint32 size_high;
1083 } spoolss_SetJobInfo4;
1085 typedef [ms_union,public] union {
1086 [case(1)] spoolss_SetJobInfo1 *info1;
1087 [case(2)] spoolss_SetJobInfo2 *info2;
1088 [case(3)] spoolss_JobInfo3 *info3;
1089 [case(4)] spoolss_SetJobInfo4 *info4;
1090 [default];
1091 } spoolss_SetJobInfo;
1093 typedef [public] struct {
1094 uint32 level;
1095 [switch_is(level)] spoolss_SetJobInfo info;
1096 } spoolss_JobInfoContainer;
1098 typedef [v1_enum] enum {
1099 SPOOLSS_JOB_CONTROL_NOOP = 0,
1100 SPOOLSS_JOB_CONTROL_PAUSE = 1,
1101 SPOOLSS_JOB_CONTROL_RESUME = 2,
1102 SPOOLSS_JOB_CONTROL_CANCEL = 3,
1103 SPOOLSS_JOB_CONTROL_RESTART = 4,
1104 SPOOLSS_JOB_CONTROL_DELETE = 5,
1105 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER = 6,
1106 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED = 7,
1107 SPOOLSS_JOB_CONTROL_RETAIN = 8,
1108 SPOOLSS_JOB_CONTROL_RELEASE = 9
1109 } spoolss_JobControl;
1111 WERROR spoolss_SetJob(
1112 [in,ref] policy_handle *handle,
1113 [in] uint32 job_id,
1114 [in,unique] spoolss_JobInfoContainer *ctr,
1115 [in] spoolss_JobControl command
1118 /******************/
1119 /* Function: 0x03 */
1120 WERROR spoolss_GetJob(
1121 [in,ref] policy_handle *handle,
1122 [in] uint32 job_id,
1123 [in] uint32 level,
1124 [in,unique] DATA_BLOB *buffer,
1125 [in] uint32 offered,
1126 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
1127 [out,ref] uint32 *needed
1130 /******************/
1131 /* Function: 0x04 */
1132 [public,noopnum,noprint] WERROR _spoolss_EnumJobs(
1133 [in,ref] policy_handle *handle,
1134 [in] uint32 firstjob,
1135 [in] uint32 numjobs,
1136 [in] uint32 level,
1137 [in,unique] DATA_BLOB *buffer,
1138 [in] uint32 offered,
1139 [out,unique] DATA_BLOB *info,
1140 [out,ref] uint32 *needed,
1141 [out,ref] uint32 *count
1143 [public,noopnum,noprint] void __spoolss_EnumJobs(
1144 [in] uint32 level,
1145 [in] uint32 count,
1146 [out,switch_is(level)] spoolss_JobInfo info[count]
1148 [nopull,nopush] WERROR spoolss_EnumJobs(
1149 [in,ref] policy_handle *handle,
1150 [in] uint32 firstjob,
1151 [in] uint32 numjobs,
1152 [in] uint32 level,
1153 [in,unique] DATA_BLOB *buffer,
1154 [in] uint32 offered,
1155 [out,ref] uint32 *count,
1156 [out,ref,switch_is(level),size_is(,*count)] spoolss_JobInfo **info,
1157 [out,ref] uint32 *needed
1160 /******************/
1161 /* Function: 0x05 */
1162 WERROR spoolss_AddPrinter(
1163 [in,unique] [string,charset(UTF16)] uint16 *server,
1164 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
1165 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
1166 [in,ref] sec_desc_buf *secdesc_ctr,
1167 [out,ref] policy_handle *handle
1170 /******************/
1171 /* Function: 0x06 */
1172 WERROR spoolss_DeletePrinter(
1173 [in] policy_handle *handle
1176 /******************/
1177 /* Function: 0x07 */
1178 typedef [v1_enum] enum {
1179 SPOOLSS_PRINTER_CONTROL_UNPAUSE = 0,
1180 SPOOLSS_PRINTER_CONTROL_PAUSE = 1,
1181 SPOOLSS_PRINTER_CONTROL_RESUME = 2,
1182 SPOOLSS_PRINTER_CONTROL_PURGE = 3,
1183 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
1184 } spoolss_PrinterControl;
1186 typedef struct {
1187 [string,charset(UTF16)] uint16 *servername;
1188 [string,charset(UTF16)] uint16 *printername;
1189 uint32 cjobs;
1190 uint32 total_jobs;
1191 uint32 total_bytes;
1192 spoolss_Time time;
1193 uint32 global_counter;
1194 uint32 total_pages;
1195 uint32 version;
1196 spoolss_Build free_build;
1197 uint32 spooling;
1198 uint32 max_spooling;
1199 uint32 session_counter;
1200 uint32 num_error_out_of_paper;
1201 uint32 num_error_not_ready;
1202 spoolss_JobStatus job_error;
1203 uint32 number_of_processors;
1204 spoolss_ProcessorType processor_type;
1205 uint32 high_part_total_bytes;
1206 uint32 change_id;
1207 WERROR last_error;
1208 spoolss_PrinterStatus status;
1209 uint32 enumerate_network_printers;
1210 uint32 c_setprinter;
1211 spoolss_ProcessorArchitecture processor_architecture;
1212 uint16 processor_level;
1213 uint32 ref_ic;
1214 uint32 reserved2;
1215 uint32 reserved3;
1216 } spoolss_SetPrinterInfo0;
1218 typedef struct {
1219 spoolss_PrinterAttributes flags;
1220 [string,charset(UTF16)] uint16 *description;
1221 [string,charset(UTF16)] uint16 *name;
1222 [string,charset(UTF16)] uint16 *comment;
1223 } spoolss_SetPrinterInfo1;
1225 typedef struct {
1226 [string,charset(UTF16)] uint16 *servername;
1227 [string,charset(UTF16)] uint16 *printername;
1228 [string,charset(UTF16)] uint16 *sharename;
1229 [string,charset(UTF16)] uint16 *portname;
1230 [string,charset(UTF16)] uint16 *drivername;
1231 [string,charset(UTF16)] uint16 *comment;
1232 [string,charset(UTF16)] uint16 *location;
1233 uint3264 devmode_ptr; /* ULONG_PTR */
1234 [string,charset(UTF16)] uint16 *sepfile;
1235 [string,charset(UTF16)] uint16 *printprocessor;
1236 [string,charset(UTF16)] uint16 *datatype;
1237 [string,charset(UTF16)] uint16 *parameters;
1238 uint3264 secdesc_ptr; /* ULONG_PTR */
1239 spoolss_PrinterAttributes attributes;
1240 [range(0,99)] uint32 priority;
1241 uint32 defaultpriority;
1242 uint32 starttime;
1243 uint32 untiltime;
1244 spoolss_PrinterStatus status;
1245 uint32 cjobs;
1246 uint32 averageppm;
1247 } spoolss_SetPrinterInfo2;
1249 typedef struct {
1250 uint3264 sec_desc_ptr; /* ULONG_PTR */
1251 } spoolss_SetPrinterInfo3;
1253 typedef struct {
1254 [string,charset(UTF16)] uint16 *printername;
1255 [string,charset(UTF16)] uint16 *servername;
1256 spoolss_PrinterAttributes attributes;
1257 } spoolss_SetPrinterInfo4;
1259 typedef struct {
1260 [string,charset(UTF16)] uint16 *printername;
1261 [string,charset(UTF16)] uint16 *portname;
1262 spoolss_PrinterAttributes attributes;
1263 uint32 device_not_selected_timeout;
1264 uint32 transmission_retry_timeout;
1265 } spoolss_SetPrinterInfo5;
1267 typedef struct {
1268 spoolss_PrinterStatus status;
1269 } spoolss_SetPrinterInfo6;
1271 typedef struct {
1272 [string,charset(UTF16)] uint16 *guid; /* text form of printer guid */
1273 spoolss_DsPrintAction action;
1274 } spoolss_SetPrinterInfo7;
1276 typedef struct {
1277 uint3264 devmode_ptr; /* ULONG_PTR */
1278 } spoolss_SetPrinterInfo8;
1280 typedef struct {
1281 uint3264 devmode_ptr; /* ULONG_PTR */
1282 } spoolss_SetPrinterInfo9;
1284 typedef [ms_union,switch_type(uint32)] union {
1285 [case(0)] spoolss_SetPrinterInfo0 *info0;
1286 [case(1)] spoolss_SetPrinterInfo1 *info1;
1287 [case(2)] spoolss_SetPrinterInfo2 *info2;
1288 [case(3)] spoolss_SetPrinterInfo3 *info3;
1289 [case(4)] spoolss_SetPrinterInfo4 *info4;
1290 [case(5)] spoolss_SetPrinterInfo5 *info5;
1291 [case(6)] spoolss_SetPrinterInfo6 *info6;
1292 [case(7)] spoolss_SetPrinterInfo7 *info7;
1293 [case(8)] spoolss_SetPrinterInfo8 *info8;
1294 [case(9)] spoolss_SetPrinterInfo9 *info9;
1295 [default];
1296 } spoolss_SetPrinterInfo;
1298 typedef [public] struct {
1299 uint32 level;
1300 [switch_is(level)] spoolss_SetPrinterInfo info;
1301 } spoolss_SetPrinterInfoCtr;
1303 [public] WERROR spoolss_SetPrinter(
1304 [in,ref] policy_handle *handle,
1305 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
1306 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
1307 [in,ref] sec_desc_buf *secdesc_ctr,
1308 [in] spoolss_PrinterControl command
1311 /******************/
1312 /* Function: 0x08 */
1313 [public] WERROR spoolss_GetPrinter(
1314 [in,ref] policy_handle *handle,
1315 [in] uint32 level,
1316 [in,unique] DATA_BLOB *buffer,
1317 [in] uint32 offered,
1318 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
1319 [out,ref] uint32 *needed
1322 /******************/
1323 /* Function: 0x09 */
1325 typedef [public] struct {
1326 [value((ndr_size_spoolss_StringArray(r, ndr->flags)-4)/2)] uint32 _ndr_size;
1327 /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array string;
1328 } spoolss_StringArray;
1330 typedef struct {
1331 [string,charset(UTF16)] uint16 *driver_name;
1332 } spoolss_AddDriverInfo1;
1334 typedef [v1_enum,public] enum {
1335 SPOOLSS_DRIVER_VERSION_9X = 0,
1336 SPOOLSS_DRIVER_VERSION_NT35 = 1,
1337 SPOOLSS_DRIVER_VERSION_NT4 = 2,
1338 SPOOLSS_DRIVER_VERSION_200X = 3,
1339 SPOOLSS_DRIVER_VERSION_2012 = 4
1340 } spoolss_DriverOSVersion;
1342 typedef struct {
1343 spoolss_DriverOSVersion version;
1344 [string,charset(UTF16)] uint16 *driver_name;
1345 [string,charset(UTF16)] uint16 *architecture;
1346 [string,charset(UTF16)] uint16 *driver_path;
1347 [string,charset(UTF16)] uint16 *data_file;
1348 [string,charset(UTF16)] uint16 *config_file;
1349 } spoolss_AddDriverInfo2;
1351 typedef struct {
1352 spoolss_DriverOSVersion version;
1353 [string,charset(UTF16)] uint16 *driver_name;
1354 [string,charset(UTF16)] uint16 *architecture;
1355 [string,charset(UTF16)] uint16 *driver_path;
1356 [string,charset(UTF16)] uint16 *data_file;
1357 [string,charset(UTF16)] uint16 *config_file;
1358 [string,charset(UTF16)] uint16 *help_file;
1359 [string,charset(UTF16)] uint16 *monitor_name;
1360 [string,charset(UTF16)] uint16 *default_datatype;
1361 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
1362 spoolss_StringArray *dependent_files;
1363 } spoolss_AddDriverInfo3;
1365 typedef struct {
1366 spoolss_DriverOSVersion version;
1367 [string,charset(UTF16)] uint16 *driver_name;
1368 [string,charset(UTF16)] uint16 *architecture;
1369 [string,charset(UTF16)] uint16 *driver_path;
1370 [string,charset(UTF16)] uint16 *data_file;
1371 [string,charset(UTF16)] uint16 *config_file;
1372 [string,charset(UTF16)] uint16 *help_file;
1373 [string,charset(UTF16)] uint16 *monitor_name;
1374 [string,charset(UTF16)] uint16 *default_datatype;
1375 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
1376 spoolss_StringArray *dependent_files;
1377 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
1378 spoolss_StringArray *previous_names;
1379 } spoolss_AddDriverInfo4;
1381 typedef [bitmap32bit] bitmap {
1382 PRINTER_DRIVER_PACKAGE_AWARE = 0x00000001,
1383 PRINTER_DRIVER_XPS = 0x00000002,
1384 PRINTER_DRIVER_SANDBOX_ENABLED = 0x00000004,
1385 PRINTER_DRIVER_CLASS = 0x00000008,
1386 PRINTER_DRIVER_DERIVED = 0x00000010,
1387 PRINTER_DRIVER_NOT_SHAREABLE = 0x00000020,
1388 PRINTER_DRIVER_CATEGORY_FAX = 0x00000040,
1389 PRINTER_DRIVER_CATEGORY_FILE = 0x00000080,
1390 PRINTER_DRIVER_CATEGORY_VIRTUAL = 0x00000100,
1391 PRINTER_DRIVER_CATEGORY_SERVICE = 0x00000200,
1392 PRINTER_DRIVER_SOFT_RESET_REQUIRED = 0x00000400,
1393 PRINTER_DRIVER_CATEGORY_3D = 0x00001000
1394 } spoolss_DriverAttributes;
1396 typedef struct {
1397 spoolss_DriverOSVersion version;
1398 [string,charset(UTF16)] uint16 *driver_name;
1399 [string,charset(UTF16)] uint16 *architecture;
1400 [string,charset(UTF16)] uint16 *driver_path;
1401 [string,charset(UTF16)] uint16 *data_file;
1402 [string,charset(UTF16)] uint16 *config_file;
1403 spoolss_DriverAttributes driver_attributes;
1404 uint32 config_version;
1405 uint32 driver_version;
1406 } spoolss_AddDriverInfo5;
1408 typedef struct {
1409 spoolss_DriverOSVersion version;
1410 [string,charset(UTF16)] uint16 *driver_name;
1411 [string,charset(UTF16)] uint16 *architecture;
1412 [string,charset(UTF16)] uint16 *driver_path;
1413 [string,charset(UTF16)] uint16 *data_file;
1414 [string,charset(UTF16)] uint16 *config_file;
1415 [string,charset(UTF16)] uint16 *help_file;
1416 [string,charset(UTF16)] uint16 *monitor_name;
1417 [string,charset(UTF16)] uint16 *default_datatype;
1418 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
1419 spoolss_StringArray *dependent_files;
1420 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
1421 spoolss_StringArray *previous_names;
1422 NTTIME driver_date;
1423 hyper driver_version;
1424 [string,charset(UTF16)] uint16 *manufacturer_name;
1425 [string,charset(UTF16)] uint16 *manufacturer_url;
1426 [string,charset(UTF16)] uint16 *hardware_id;
1427 [string,charset(UTF16)] uint16 *provider;
1428 } spoolss_AddDriverInfo6;
1430 typedef struct {
1431 spoolss_DriverOSVersion version;
1432 [string,charset(UTF16)] uint16 *driver_name;
1433 [string,charset(UTF16)] uint16 *architecture;
1434 [string,charset(UTF16)] uint16 *driver_path;
1435 [string,charset(UTF16)] uint16 *data_file;
1436 [string,charset(UTF16)] uint16 *config_file;
1437 [string,charset(UTF16)] uint16 *help_file;
1438 [string,charset(UTF16)] uint16 *monitor_name;
1439 [string,charset(UTF16)] uint16 *default_datatype;
1440 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
1441 spoolss_StringArray *dependent_files;
1442 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
1443 spoolss_StringArray *previous_names;
1444 NTTIME driver_date;
1445 hyper driver_version;
1446 [string,charset(UTF16)] uint16 *manufacturer_name;
1447 [string,charset(UTF16)] uint16 *manufacturer_url;
1448 [string,charset(UTF16)] uint16 *hardware_id;
1449 [string,charset(UTF16)] uint16 *provider;
1450 [string,charset(UTF16)] uint16 *print_processor;
1451 [string,charset(UTF16)] uint16 *vendor_setup;
1452 [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
1453 spoolss_StringArray *color_profiles;
1454 [string,charset(UTF16)] uint16 *inf_path;
1455 spoolss_DriverAttributes printer_driver_attributes;
1456 [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
1457 spoolss_StringArray *core_driver_dependencies;
1458 NTTIME min_inbox_driver_ver_date;
1459 hyper min_inbox_driver_ver_version;
1460 } spoolss_AddDriverInfo8;
1462 typedef [ms_union,switch_type(uint32)] union {
1463 [case(1)] spoolss_AddDriverInfo1 *info1;
1464 [case(2)] spoolss_AddDriverInfo2 *info2;
1465 [case(3)] spoolss_AddDriverInfo3 *info3;
1466 [case(4)] spoolss_AddDriverInfo4 *info4;
1467 [case(6)] spoolss_AddDriverInfo6 *info6;
1468 [case(8)] spoolss_AddDriverInfo8 *info8;
1469 } spoolss_AddDriverInfo;
1471 typedef [public] struct {
1472 uint32 level;
1473 [switch_is(level)] spoolss_AddDriverInfo info;
1474 } spoolss_AddDriverInfoCtr;
1476 WERROR spoolss_AddPrinterDriver(
1477 [in,unique] [string,charset(UTF16)] uint16 *servername,
1478 [in,ref] spoolss_AddDriverInfoCtr *info_ctr
1481 typedef [public,gensize] struct {
1482 [relative] nstring *driver_name;
1483 } spoolss_DriverInfo1;
1485 typedef [public,gensize] struct {
1486 spoolss_DriverOSVersion version;
1487 [relative] nstring *driver_name;
1488 [relative] nstring *architecture;
1489 [relative] nstring *driver_path;
1490 [relative] nstring *data_file;
1491 [relative] nstring *config_file;
1492 } spoolss_DriverInfo2;
1494 typedef [public,gensize] struct {
1495 spoolss_DriverOSVersion version;
1496 [relative] nstring *driver_name;
1497 [relative] nstring *architecture;
1498 [relative] nstring *driver_path;
1499 [relative] nstring *data_file;
1500 [relative] nstring *config_file;
1501 [relative] nstring *help_file;
1502 [relative] nstring_array *dependent_files;
1503 [relative] nstring *monitor_name;
1504 [relative] nstring *default_datatype;
1505 } spoolss_DriverInfo3;
1507 typedef [public,gensize] struct {
1508 spoolss_DriverOSVersion version;
1509 [relative] nstring *driver_name;
1510 [relative] nstring *architecture;
1511 [relative] nstring *driver_path;
1512 [relative] nstring *data_file;
1513 [relative] nstring *config_file;
1514 [relative] nstring *help_file;
1515 [relative] nstring_array *dependent_files;
1516 [relative] nstring *monitor_name;
1517 [relative] nstring *default_datatype;
1518 [relative] nstring_array *previous_names;
1519 } spoolss_DriverInfo4;
1521 typedef [public,gensize] struct {
1522 spoolss_DriverOSVersion version;
1523 [relative] nstring *driver_name;
1524 [relative] nstring *architecture;
1525 [relative] nstring *driver_path;
1526 [relative] nstring *data_file;
1527 [relative] nstring *config_file;
1528 spoolss_DriverAttributes driver_attributes;
1529 uint32 config_version;
1530 uint32 driver_version;
1531 } spoolss_DriverInfo5;
1533 typedef [public,gensize] struct {
1534 spoolss_DriverOSVersion version;
1535 [relative] nstring *driver_name;
1536 [relative] nstring *architecture;
1537 [relative] nstring *driver_path;
1538 [relative] nstring *data_file;
1539 [relative] nstring *config_file;
1540 [relative] nstring *help_file;
1541 [relative] nstring_array *dependent_files;
1542 [relative] nstring *monitor_name;
1543 [relative] nstring *default_datatype;
1544 [relative] nstring_array *previous_names;
1545 NTTIME driver_date;
1546 hyper driver_version;
1547 [relative] nstring *manufacturer_name;
1548 [relative] nstring *manufacturer_url;
1549 [relative] nstring *hardware_id;
1550 [relative] nstring *provider;
1551 } spoolss_DriverInfo6;
1553 typedef [public,gensize] struct {
1554 uint32 size;
1555 spoolss_DriverOSVersion version;
1556 [relative] nstring *driver_name;
1557 [relative] nstring *inf_name;
1558 [relative] nstring *install_source_root;
1559 } spoolss_DriverInfo7;
1561 typedef [public,gensize] struct {
1562 spoolss_DriverOSVersion version;
1563 [relative] nstring *driver_name;
1564 [relative] nstring *architecture;
1565 [relative] nstring *driver_path;
1566 [relative] nstring *data_file;
1567 [relative] nstring *config_file;
1568 [relative] nstring *help_file;
1569 [relative] nstring_array *dependent_files;
1570 [relative] nstring *monitor_name;
1571 [relative] nstring *default_datatype;
1572 [relative] nstring_array *previous_names;
1573 NTTIME driver_date;
1574 hyper driver_version;
1575 [relative] nstring *manufacturer_name;
1576 [relative] nstring *manufacturer_url;
1577 [relative] nstring *hardware_id;
1578 [relative] nstring *provider;
1579 [relative] nstring *print_processor;
1580 [relative] nstring *vendor_setup;
1581 [relative] nstring_array *color_profiles;
1582 [relative] nstring *inf_path;
1583 spoolss_DriverAttributes printer_driver_attributes;
1584 [relative] nstring_array *core_driver_dependencies;
1585 NTTIME min_inbox_driver_ver_date;
1586 hyper min_inbox_driver_ver_version;
1587 } spoolss_DriverInfo8;
1589 typedef [v1_enum] enum {
1590 SPOOLSS_DRIVER_FILE_TYPE_RENDERING = 0x00000000,
1591 SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION = 0x00000001,
1592 SPOOLSS_DRIVER_FILE_TYPE_DATA = 0x00000002,
1593 SPOOLSS_DRIVER_FILE_TYPE_HELP = 0x00000003,
1594 SPOOLSS_DRIVER_FILE_TYPE_OTHER = 0x00000004
1595 } spoolss_DriverFileType;
1597 typedef [public] struct {
1598 [relative] nstring *file_name;
1599 spoolss_DriverFileType file_type;
1600 uint32 file_version;
1601 } spoolss_DriverFileInfo;
1603 typedef [public,gensize,nopush,nopull] struct {
1604 spoolss_DriverOSVersion version;
1605 [relative] nstring *driver_name;
1606 [relative] nstring *architecture;
1607 [relative,size_is(file_count),flag(NDR_ALIGN4)] spoolss_DriverFileInfo *file_info;
1608 uint32 file_count;
1609 [relative] nstring *monitor_name;
1610 [relative] nstring *default_datatype;
1611 [relative] nstring_array *previous_names;
1612 NTTIME driver_date;
1613 hyper driver_version;
1614 [relative] nstring *manufacturer_name;
1615 [relative] nstring *manufacturer_url;
1616 [relative] nstring *hardware_id;
1617 [relative] nstring *provider;
1618 } spoolss_DriverInfo101;
1620 typedef [nodiscriminant,relative_base,public,gensize,flag(NDR_RELATIVE_REVERSE)] union {
1621 [case(1)] spoolss_DriverInfo1 info1;
1622 [case(2)] spoolss_DriverInfo2 info2;
1623 [case(3)] spoolss_DriverInfo3 info3;
1624 [case(4)] spoolss_DriverInfo4 info4;
1625 [case(5)] spoolss_DriverInfo5 info5;
1626 [case(6)] spoolss_DriverInfo6 info6;
1627 [case(7)] spoolss_DriverInfo7 info7;
1628 [case(8)] spoolss_DriverInfo8 info8;
1629 [case(101)] spoolss_DriverInfo101 info101;
1630 [default];
1631 } spoolss_DriverInfo;
1633 /******************/
1634 /* Function: 0x0a */
1635 [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
1636 [in,unique] [string,charset(UTF16)] uint16 *server,
1637 [in,unique] [string,charset(UTF16)] uint16 *environment,
1638 [in] uint32 level,
1639 [in,unique] DATA_BLOB *buffer,
1640 [in] uint32 offered,
1641 [out,unique] DATA_BLOB *info,
1642 [out,ref] uint32 *needed,
1643 [out,ref] uint32 *count
1645 [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
1646 [in] uint32 level,
1647 [in] uint32 count,
1648 [out,switch_is(level)] spoolss_DriverInfo info[count]
1650 [nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
1651 [in,unique] [string,charset(UTF16)] uint16 *server,
1652 [in,unique] [string,charset(UTF16)] uint16 *environment,
1653 [in] uint32 level,
1654 [in,unique] DATA_BLOB *buffer,
1655 [in] uint32 offered,
1656 [out,ref] uint32 *count,
1657 [out,ref,switch_is(level),size_is(,*count)] spoolss_DriverInfo **info,
1658 [out,ref] uint32 *needed
1661 /******************/
1662 /* Function: 0x0b */
1663 WERROR spoolss_GetPrinterDriver(
1664 [in,ref] policy_handle *handle,
1665 [in,unique] [string,charset(UTF16)] uint16 *architecture,
1666 [in] uint32 level,
1667 [in,unique] DATA_BLOB *buffer,
1668 [in] uint32 offered,
1669 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverInfo *info,
1670 [out,ref] uint32 *needed
1673 /******************/
1674 /* Function: 0x0c */
1675 typedef [public,gensize] struct {
1676 nstring directory_name;
1677 } spoolss_DriverDirectoryInfo1;
1679 /* NOTE: It seems that w2k3 completely ignores the level
1680 in its server code
1682 typedef [nodiscriminant,relative_base,public,gensize,flag(NDR_RELATIVE_REVERSE)] union {
1683 [case(1)] spoolss_DriverDirectoryInfo1 info1;
1684 [default] spoolss_DriverDirectoryInfo1 info1;
1685 } spoolss_DriverDirectoryInfo;
1687 [public] WERROR spoolss_GetPrinterDriverDirectory(
1688 [in,unique] [string,charset(UTF16)] uint16 *server,
1689 [in,unique] [string,charset(UTF16)] uint16 *environment,
1690 [in] uint32 level,
1691 [in,unique] DATA_BLOB *buffer,
1692 [in] uint32 offered,
1693 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
1694 [out,ref] uint32 *needed
1697 /******************/
1698 /* Function: 0x0d */
1699 WERROR spoolss_DeletePrinterDriver(
1700 [in,unique] [string,charset(UTF16)] uint16 *server,
1701 [in] [string,charset(UTF16)] uint16 architecture[],
1702 [in] [string,charset(UTF16)] uint16 driver[]
1705 /******************/
1706 /* Function: 0x0e */
1707 WERROR spoolss_AddPrintProcessor(
1708 [in,unique] [string,charset(UTF16)] uint16 *server,
1709 [in] [string,charset(UTF16)] uint16 architecture[],
1710 [in] [string,charset(UTF16)] uint16 path_name[],
1711 [in] [string,charset(UTF16)] uint16 print_processor_name[]
1714 /******************/
1715 /* Function: 0x0f */
1716 typedef [public,gensize] struct {
1717 [relative] nstring *print_processor_name;
1718 } spoolss_PrintProcessorInfo1;
1720 typedef [nodiscriminant,relative_base,public,flag(NDR_RELATIVE_REVERSE)] union {
1721 [case(1)] spoolss_PrintProcessorInfo1 info1;
1722 [default];
1723 } spoolss_PrintProcessorInfo;
1725 [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
1726 [in,unique] [string,charset(UTF16)] uint16 *servername,
1727 [in,unique] [string,charset(UTF16)] uint16 *environment,
1728 [in] uint32 level,
1729 [in,unique] DATA_BLOB *buffer,
1730 [in] uint32 offered,
1731 [out,unique] DATA_BLOB *info,
1732 [out,ref] uint32 *needed,
1733 [out,ref] uint32 *count
1735 [public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
1736 [in] uint32 level,
1737 [in] uint32 count,
1738 [out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
1740 [nopull,nopush] WERROR spoolss_EnumPrintProcessors(
1741 [in,unique] [string,charset(UTF16)] uint16 *servername,
1742 [in,unique] [string,charset(UTF16)] uint16 *environment,
1743 [in] uint32 level,
1744 [in,unique] DATA_BLOB *buffer,
1745 [in] uint32 offered,
1746 [out,ref] uint32 *count,
1747 [out,ref,switch_is(level),size_is(,*count)] spoolss_PrintProcessorInfo **info,
1748 [out,ref] uint32 *needed
1751 /******************/
1752 /* Function: 0x10 */
1753 typedef [public,gensize] struct {
1754 nstring directory_name;
1755 } spoolss_PrintProcessorDirectoryInfo1;
1757 typedef [nodiscriminant,relative_base,public,gensize,flag(NDR_RELATIVE_REVERSE)] union {
1758 [case(1)] spoolss_PrintProcessorDirectoryInfo1 info1;
1759 [default] spoolss_PrintProcessorDirectoryInfo1 info1;
1760 } spoolss_PrintProcessorDirectoryInfo;
1762 WERROR spoolss_GetPrintProcessorDirectory(
1763 [in,unique] [string,charset(UTF16)] uint16 *server,
1764 [in,unique] [string,charset(UTF16)] uint16 *environment,
1765 [in] uint32 level,
1766 [in,unique] DATA_BLOB *buffer,
1767 [in] uint32 offered,
1768 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrintProcessorDirectoryInfo *info,
1769 [out,ref] uint32 *needed
1772 /******************/
1773 /* Function: 0x11 */
1774 typedef struct {
1775 [string,charset(UTF16)] uint16 *document_name;
1776 [string,charset(UTF16)] uint16 *output_file;
1777 [string,charset(UTF16)] uint16 *datatype;
1778 } spoolss_DocumentInfo1;
1780 typedef [ms_union,switch_type(uint32)] union {
1781 [case(1)] spoolss_DocumentInfo1 *info1;
1782 [case(2)]; /* TODO */
1783 [case(3)]; /* TODO */
1784 [default];
1785 } spoolss_DocumentInfo;
1787 typedef [public] struct {
1788 uint32 level;
1789 [switch_is(level)] spoolss_DocumentInfo info;
1790 } spoolss_DocumentInfoCtr;
1792 WERROR spoolss_StartDocPrinter(
1793 [in,ref] policy_handle *handle,
1794 [in,ref] spoolss_DocumentInfoCtr *info_ctr,
1795 [out,ref] uint32 *job_id
1798 /******************/
1799 /* Function: 0x12 */
1800 WERROR spoolss_StartPagePrinter(
1801 [in,ref] policy_handle *handle
1804 /******************/
1805 /* Function: 0x13 */
1806 WERROR spoolss_WritePrinter(
1807 [in,ref] policy_handle *handle,
1808 [in] DATA_BLOB data,
1809 [in,value(r->in.data.length)] uint32 _data_size,
1810 [out,ref] uint32 *num_written
1813 /******************/
1814 /* Function: 0x14 */
1815 WERROR spoolss_EndPagePrinter(
1816 [in,ref] policy_handle *handle
1819 /******************/
1820 /* Function: 0x15 */
1821 WERROR spoolss_AbortPrinter(
1822 [in,ref] policy_handle *handle
1825 /******************/
1826 /* Function: 0x16 */
1827 WERROR spoolss_ReadPrinter(
1828 [in,ref] policy_handle *handle,
1829 [out,ref] [size_is(data_size)] uint8 *data,
1830 [in] uint32 data_size,
1831 [out,ref] uint32 *_data_size
1834 /******************/
1835 /* Function: 0x17 */
1836 WERROR spoolss_EndDocPrinter(
1837 [in,ref] policy_handle *handle
1840 /******************/
1841 /* Function: 0x18 */
1842 WERROR spoolss_AddJob(
1843 [in,ref] policy_handle *handle,
1844 [in] uint32 level,
1845 [in,out,unique] [size_is(offered)] uint8 *buffer,
1846 [in] uint32 offered,
1847 [out,ref] uint32 *needed
1850 /******************/
1851 /* Function: 0x19 */
1852 WERROR spoolss_ScheduleJob(
1853 [in,ref] policy_handle *handle,
1854 [in] uint32 jobid
1857 /******************/
1858 /* Function: 0x1a */
1860 const string SPL_ARCH_WIN40 = "WIN40";
1861 const string SPL_ARCH_W32X86 = "W32X86";
1862 const string SPL_ARCH_W32MIPS = "W32MIPS";
1863 const string SPL_ARCH_W32ALPHA = "W32ALPHA";
1864 const string SPL_ARCH_W32PPC = "W32PPC";
1865 const string SPL_ARCH_IA64 = "IA64";
1866 const string SPL_ARCH_X64 = "x64";
1867 const string SPL_ARCH_ARM = "ARM";
1868 const string SPL_ARCH_ARM64 = "ARM64";
1870 const string SPOOLSS_ARCHITECTURE_ALL = "All";
1871 const string SPOOLSS_ARCHITECTURE_ALL_CLUSTER = "AllCluster";
1872 const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86";
1873 const string SPOOLSS_ARCHITECTURE_IA_64 = "Windows IA64";
1874 const string SPOOLSS_ARCHITECTURE_x64 = "Windows x64";
1875 const string SPOOLSS_ARCHITECTURE_4_0 = "Windows 4.0";
1876 const string SPOOLSS_ARCHITECTURE_W32MIPS = "Windows NT R4000";
1877 const string SPOOLSS_ARCHITECTURE_W32PPC = "Windows NT PowerPC";
1878 const string SPOOLSS_ARCHITECTURE_W32ALPHA = "Windows NT Alpha AXP";
1879 const string SPOOLSS_ARCHITECTURE_ARM = "Windows ARM";
1880 const string SPOOLSS_ARCHITECTURE_ARM64 = "Windows ARM64";
1881 const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool";
1883 typedef [public,gensize] struct {
1884 [value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size;
1885 uint32 major;
1886 uint32 minor;
1887 uint32 build;
1888 [value(2)] uint32 platform_id;
1889 [subcontext(0),subcontext_size(256)] nstring extra_string;
1890 } spoolss_OSVersion;
1892 typedef [public,gensize] struct {
1893 [value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size;
1894 uint32 major;
1895 uint32 minor;
1896 uint32 build;
1897 [value(2)] uint32 platform_id;
1898 [subcontext(0),subcontext_size(256)] nstring extra_string;
1899 uint16 service_pack_major;
1900 uint16 service_pack_minor;
1901 uint16 suite_mask;
1902 uint8 product_type;
1903 uint8 reserved;
1904 } spoolss_OSVersionEx;
1906 typedef [nodiscriminant,public] union {
1907 [case(REG_NONE)];
1908 [case(REG_SZ)] nstring string;
1909 [case(REG_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
1910 [case(REG_DWORD)] uint32 value;
1911 [case(REG_MULTI_SZ)] nstring_array string_array;
1912 [default,flag(NDR_REMAINING)] DATA_BLOB data;
1913 } spoolss_PrinterData;
1915 /* predefined registry key names for printer data */
1917 const string SPOOL_PRINTERDATA_KEY = "PrinterDriverData";
1918 const string SPOOL_DSSPOOLER_KEY = "DsSpooler";
1919 const string SPOOL_DSDRIVER_KEY = "DsDriver";
1920 const string SPOOL_DSUSER_KEY = "DsUser";
1921 const string SPOOL_PNPDATA_KEY = "PnPData";
1922 const string SPOOL_OID_KEY = "OID";
1924 /* predefined value names for printer data */
1926 const string SPOOL_REG_ASSETNUMBER = "assetNumber";
1927 const string SPOOL_REG_BYTESPERMINUTE = "bytesPerMinute";
1928 const string SPOOL_REG_DEFAULTPRIORITY = "defaultPriority";
1929 const string SPOOL_REG_DESCRIPTION = "description";
1930 const string SPOOL_REG_DRIVERNAME = "driverName";
1931 const string SPOOL_REG_DRIVERVERSION = "driverVersion";
1932 const string SPOOL_REG_FLAGS = "flags";
1933 const string SPOOL_REG_LOCATION = "location";
1934 const string SPOOL_REG_OPERATINGSYSTEM = "operatingSystem";
1935 const string SPOOL_REG_OPERATINGSYSTEMHOTFIX = "operatingSystemHotfix";
1936 const string SPOOL_REG_OPERATINGSYSTEMSERVICEPACK = "operatingSystemServicePack";
1937 const string SPOOL_REG_OPERATINGSYSTEMVERSION = "operatingSystemVersion";
1938 const string SPOOL_REG_PORTNAME = "portName";
1939 const string SPOOL_REG_PRINTATTRIBUTES = "printAttributes";
1940 const string SPOOL_REG_PRINTBINNAMES = "printBinNames";
1941 const string SPOOL_REG_PRINTCOLLATE = "printCollate";
1942 const string SPOOL_REG_PRINTCOLOR = "printColor";
1943 const string SPOOL_REG_PRINTDUPLEXSUPPORTED = "printDuplexSupported";
1944 const string SPOOL_REG_PRINTENDTIME = "printEndTime";
1945 const string SPOOL_REG_PRINTERNAME = "printerName";
1946 const string SPOOL_REG_PRINTFORMNAME = "printFormName";
1947 const string SPOOL_REG_PRINTKEEPPRINTEDJOBS = "printKeepPrintedJobs";
1948 const string SPOOL_REG_PRINTLANGUAGE = "printLanguage";
1949 const string SPOOL_REG_PRINTMACADDRESS = "printMACAddress";
1950 const string SPOOL_REG_PRINTMAXCOPIES = "printMaxCopies";
1951 const string SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED = "printMaxResolutionSupported";
1952 const string SPOOL_REG_PRINTMAXXEXTENT = "printMaxXExtent";
1953 const string SPOOL_REG_PRINTMAXYEXTENT = "printMaxYExtent";
1954 const string SPOOL_REG_PRINTMEDIAREADY = "printMediaReady";
1955 const string SPOOL_REG_PRINTMEDIASUPPORTED = "printMediaSupported";
1956 const string SPOOL_REG_PRINTMEMORY = "printMemory";
1957 const string SPOOL_REG_PRINTMINXEXTENT = "printMinXExtent";
1958 const string SPOOL_REG_PRINTMINYEXTENT = "printMinYExtent";
1959 const string SPOOL_REG_PRINTNETWORKADDRESS = "printNetworkAddress";
1960 const string SPOOL_REG_PRINTNOTIFY = "printNotify";
1961 const string SPOOL_REG_PRINTNUMBERUP = "printNumberUp";
1962 const string SPOOL_REG_PRINTORIENTATIONSSUPPORTED = "printOrientationsSupported";
1963 const string SPOOL_REG_PRINTOWNER = "printOwner";
1964 const string SPOOL_REG_PRINTPAGESPERMINUTE = "printPagesPerMinute";
1965 const string SPOOL_REG_PRINTRATE = "printRate";
1966 const string SPOOL_REG_PRINTRATEUNIT = "printRateUnit";
1967 const string SPOOL_REG_PRINTSEPARATORFILE = "printSeparatorFile";
1968 const string SPOOL_REG_PRINTSHARENAME = "printShareName";
1969 const string SPOOL_REG_PRINTSPOOLING = "printSpooling";
1970 const string SPOOL_REGVAL_PRINTWHILESPOOLING = "PrintWhileSpooling";
1971 const string SPOOL_REGVAL_PRINTAFTERSPOOLED = "PrintAfterSpooled";
1972 const string SPOOL_REGVAL_PRINTDIRECT = "PrintDirect";
1973 const string SPOOL_REG_PRINTSTAPLINGSUPPORTED = "printStaplingSupported";
1974 const string SPOOL_REG_PRINTSTARTTIME = "printStartTime";
1975 const string SPOOL_REG_PRINTSTATUS = "printStatus";
1976 const string SPOOL_REG_PRIORITY = "priority";
1977 const string SPOOL_REG_SERVERNAME = "serverName";
1978 const string SPOOL_REG_SHORTSERVERNAME = "shortServerName";
1979 const string SPOOL_REG_UNCNAME = "uNCName";
1980 const string SPOOL_REG_URL = "url";
1981 const string SPOOL_REG_VERSIONNUMBER = "versionNumber";
1983 [public] WERROR spoolss_GetPrinterData(
1984 [in,ref] policy_handle *handle,
1985 [in] [string,charset(UTF16)] uint16 value_name[],
1986 [out,ref] winreg_Type *type,
1987 [out,ref,size_is(offered)] uint8 *data,
1988 [in] uint32 offered,
1989 [out,ref] uint32 *needed
1992 /******************/
1993 /* Function: 0x1b */
1994 WERROR spoolss_SetPrinterData(
1995 [in,ref] policy_handle *handle,
1996 [in] [string,charset(UTF16)] uint16 value_name[],
1997 [in] winreg_Type type,
1998 [in,ref] [size_is(offered)] uint8 *data,
1999 [in] uint32 offered
2002 /******************/
2003 /* Function: 0x1c */
2004 [todo] WERROR spoolss_WaitForPrinterChange(
2007 /******************/
2008 /* Function: 0x1d */
2009 [public] WERROR spoolss_ClosePrinter(
2010 [in,out,ref] policy_handle *handle
2013 /******************/
2014 /* Function: 0x1e */
2015 typedef [v1_enum] enum {
2016 SPOOLSS_FORM_USER = 0,
2017 SPOOLSS_FORM_BUILTIN = 1,
2018 SPOOLSS_FORM_PRINTER = 2
2019 } spoolss_FormFlags;
2021 typedef struct {
2022 uint32 width;
2023 uint32 height;
2024 } spoolss_FormSize;
2026 typedef struct {
2027 uint32 left;
2028 uint32 top;
2029 uint32 right;
2030 uint32 bottom;
2031 } spoolss_FormArea;
2033 typedef [public,gensize] struct {
2034 spoolss_FormFlags flags;
2035 [relative] nstring *form_name;
2036 spoolss_FormSize size;
2037 spoolss_FormArea area;
2038 } spoolss_FormInfo1;
2040 typedef [bitmap32bit] bitmap {
2041 SPOOLSS_FORM_STRING_TYPE_NONE = 0x00000001,
2042 SPOOLSS_FORM_STRING_TYPE_MUI_DLL = 0x00000002,
2043 SPOOLSS_FORM_STRING_TYPE_LANG_PAIR = 0x00000004
2044 } spoolss_FormStringType;
2046 typedef [public,gensize] struct {
2047 spoolss_FormFlags flags;
2048 [relative] nstring *form_name;
2049 spoolss_FormSize size;
2050 spoolss_FormArea area;
2051 [relative] astring *keyword;
2052 spoolss_FormStringType string_type;
2053 [relative] nstring *mui_dll;
2054 uint32 ressource_id;
2055 [relative] nstring *display_name;
2056 uint16 lang_id;
2057 uint16 unused;
2058 } spoolss_FormInfo2;
2060 typedef [nodiscriminant,relative_base,public,gensize,flag(NDR_RELATIVE_REVERSE)] union {
2061 [case(1)] spoolss_FormInfo1 info1;
2062 [case(2)] spoolss_FormInfo2 info2;
2063 [default];
2064 } spoolss_FormInfo;
2066 typedef struct {
2067 spoolss_FormFlags flags;
2068 [string,charset(UTF16)] uint16 *form_name;
2069 spoolss_FormSize size;
2070 spoolss_FormArea area;
2071 } spoolss_AddFormInfo1;
2073 typedef struct {
2074 spoolss_FormFlags flags;
2075 [string,charset(UTF16)] uint16 *form_name;
2076 spoolss_FormSize size;
2077 spoolss_FormArea area;
2078 [string,charset(DOS)] uint8 *keyword;
2079 spoolss_FormStringType string_type;
2080 [string,charset(UTF16)] uint16 *mui_dll;
2081 uint32 ressource_id;
2082 [string,charset(UTF16)] uint16 *display_name;
2083 uint32 lang_id;
2084 } spoolss_AddFormInfo2;
2086 typedef [ms_union,switch_type(uint32)] union {
2087 [case(1)] spoolss_AddFormInfo1 *info1;
2088 [case(2)] spoolss_AddFormInfo2 *info2;
2089 } spoolss_AddFormInfo;
2091 typedef [public] struct {
2092 uint32 level;
2093 [switch_is(level)] spoolss_AddFormInfo info;
2094 } spoolss_AddFormInfoCtr;
2096 WERROR spoolss_AddForm(
2097 [in,ref] policy_handle *handle,
2098 [in,ref] spoolss_AddFormInfoCtr *info_ctr
2101 /******************/
2102 /* Function: 0x1f */
2103 WERROR spoolss_DeleteForm(
2104 [in,ref] policy_handle *handle,
2105 [in] [string,charset(UTF16)] uint16 form_name[]
2108 /******************/
2109 /* Function: 0x20 */
2110 WERROR spoolss_GetForm(
2111 [in,ref] policy_handle *handle,
2112 [in] [string,charset(UTF16)] uint16 form_name[],
2113 [in] uint32 level,
2114 [in,unique] DATA_BLOB *buffer,
2115 [in] uint32 offered,
2116 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
2117 [out,ref] uint32 *needed
2120 /******************/
2121 /* Function: 0x21 */
2122 WERROR spoolss_SetForm(
2123 [in,ref] policy_handle *handle,
2124 [in] [string,charset(UTF16)] uint16 form_name[],
2125 [in,ref] spoolss_AddFormInfoCtr *info_ctr
2128 /******************/
2129 /* Function: 0x22 */
2130 [public,noopnum,noprint] WERROR _spoolss_EnumForms(
2131 [in,ref] policy_handle *handle,
2132 [in] uint32 level,
2133 [in,unique] DATA_BLOB *buffer,
2134 [in] uint32 offered,
2135 [out,unique] DATA_BLOB *info,
2136 [out,ref] uint32 *needed,
2137 [out,ref] uint32 *count
2139 [public,noopnum,noprint] void __spoolss_EnumForms(
2140 [in] uint32 level,
2141 [in] uint32 count,
2142 [out,switch_is(level)] spoolss_FormInfo info[count]
2144 [nopull,nopush] WERROR spoolss_EnumForms(
2145 [in,ref] policy_handle *handle,
2146 [in] uint32 level,
2147 [in,unique] DATA_BLOB *buffer,
2148 [in] uint32 offered,
2149 [out,ref] uint32 *count,
2150 [out,ref,switch_is(level),size_is(,*count)] spoolss_FormInfo **info,
2151 [out,ref] uint32 *needed
2155 * Special strings for the OpenPrinter() call. See the MSDN DDK
2156 * docs on the XcvDataPort() for more details.
2159 const string SPL_LOCAL_PORT = "Local Port";
2160 const string SPL_TCPIP_PORT = "Standard TCP/IP Port";
2161 const string SPL_XCV_MONITOR_LOCALMON = ",XcvMonitor Local Port";
2162 const string SPL_XCV_MONITOR_TCPMON = ",XcvMonitor Standard TCP/IP Port";
2164 typedef [public,gensize] struct {
2165 [relative] nstring *port_name;
2166 } spoolss_PortInfo1;
2168 typedef bitmap {
2169 SPOOLSS_PORT_TYPE_WRITE = 0x00000001,
2170 SPOOLSS_PORT_TYPE_READ = 0x00000002,
2171 SPOOLSS_PORT_TYPE_REDIRECTED = 0x00000004,
2172 SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008
2173 } spoolss_PortType;
2175 typedef [public,gensize] struct {
2176 [relative] nstring *port_name;
2177 [relative] nstring *monitor_name;
2178 [relative] nstring *description;
2179 spoolss_PortType port_type;
2180 uint32 reserved;
2181 } spoolss_PortInfo2;
2183 typedef [v1_enum] enum {
2184 PORT_STATUS_CLEAR = 0x00000000,
2185 PORT_STATUS_OFFLINE = 0x00000001,
2186 PORT_STATUS_PAPER_JAM = 0x00000002,
2187 PORT_STATUS_PAPER_OUT = 0x00000003,
2188 PORT_STATUS_OUTPUT_BIN_FULL = 0x00000004,
2189 PORT_STATUS_PAPER_PROBLEM = 0x00000005,
2190 PORT_STATUS_NO_TONER = 0x00000006,
2191 PORT_STATUS_DOOR_OPEN = 0x00000007,
2192 PORT_STATUS_USER_INTERVENTION = 0x00000008,
2193 PORT_STATUS_OUT_OF_MEMORY = 0x00000009,
2194 PORT_STATUS_TONER_LOW = 0x0000000A,
2195 PORT_STATUS_WARMING_UP = 0x0000000B,
2196 PORT_STATUS_POWER_SAVE = 0x0000000C
2197 } spoolss_PortStatus;
2199 typedef [v1_enum] enum {
2200 PORT_STATUS_TYPE_ERROR = 0x00000001,
2201 PORT_STATUS_TYPE_WARNING = 0x00000002,
2202 PORT_STATUS_TYPE_INFO = 0x00000003
2203 } spoolss_PortSeverity;
2205 typedef [public,gensize] struct {
2206 spoolss_PortStatus status;
2207 [relative] nstring *status_string;
2208 spoolss_PortSeverity severity;
2209 } spoolss_PortInfo3;
2211 typedef [public,gensize] struct {
2212 [relative] nstring *port_name;
2213 DATA_BLOB monitor_data; /* relative ?? */
2214 } spoolss_PortInfoFF;
2216 typedef [nodiscriminant,relative_base,public,flag(NDR_RELATIVE_REVERSE)] union {
2217 [case(1)] spoolss_PortInfo1 info1;
2218 [case(2)] spoolss_PortInfo2 info2;
2219 [case(3)] spoolss_PortInfo3 info3;
2220 [case(0xff)] spoolss_PortInfoFF infoFF;
2221 [default];
2222 } spoolss_PortInfo;
2224 /******************/
2225 /* Function: 0x23 */
2226 [public,noopnum,noprint] WERROR _spoolss_EnumPorts(
2227 [in,unique] [string,charset(UTF16)] uint16 *servername,
2228 [in] uint32 level,
2229 [in,unique] DATA_BLOB *buffer,
2230 [in] uint32 offered,
2231 [out,unique] DATA_BLOB *info,
2232 [out,ref] uint32 *needed,
2233 [out,ref] uint32 *count
2235 [public,noopnum,noprint] void __spoolss_EnumPorts(
2236 [in] uint32 level,
2237 [in] uint32 count,
2238 [out,switch_is(level)] spoolss_PortInfo info[count]
2240 [nopull,nopush] WERROR spoolss_EnumPorts(
2241 [in,unique] [string,charset(UTF16)] uint16 *servername,
2242 [in] uint32 level,
2243 [in,unique] DATA_BLOB *buffer,
2244 [in] uint32 offered,
2245 [out,ref] uint32 *count,
2246 [out,ref,switch_is(level),size_is(,*count)] spoolss_PortInfo **info,
2247 [out,ref] uint32 *needed
2250 /******************/
2251 /* Function: 0x24 */
2252 typedef [public,gensize] struct {
2253 [relative] nstring *monitor_name;
2254 } spoolss_MonitorInfo1;
2256 typedef [public,gensize] struct {
2257 [relative] nstring *monitor_name;
2258 [relative] nstring *environment;
2259 [relative] nstring *dll_name;
2260 } spoolss_MonitorInfo2;
2262 typedef [nodiscriminant,relative_base,public,flag(NDR_RELATIVE_REVERSE)] union {
2263 [case(1)] spoolss_MonitorInfo1 info1;
2264 [case(2)] spoolss_MonitorInfo2 info2;
2265 [default];
2266 } spoolss_MonitorInfo;
2268 [public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
2269 [in,unique] [string,charset(UTF16)] uint16 *servername,
2270 [in] uint32 level,
2271 [in,unique] DATA_BLOB *buffer,
2272 [in] uint32 offered,
2273 [out,unique] DATA_BLOB *info,
2274 [out,ref] uint32 *needed,
2275 [out,ref] uint32 *count
2277 [public,noopnum,noprint] void __spoolss_EnumMonitors(
2278 [in] uint32 level,
2279 [in] uint32 count,
2280 [out,switch_is(level)] spoolss_MonitorInfo info[count]
2282 [nopull,nopush] WERROR spoolss_EnumMonitors(
2283 [in,unique] [string,charset(UTF16)] uint16 *servername,
2284 [in] uint32 level,
2285 [in,unique] DATA_BLOB *buffer,
2286 [in] uint32 offered,
2287 [out,ref] uint32 *count,
2288 [out,ref,switch_is(level),size_is(,*count)] spoolss_MonitorInfo **info,
2289 [out,ref] uint32 *needed
2292 /******************/
2293 /* Function: 0x25 */
2295 typedef [public,gensize] struct {
2296 [string,charset(UTF16)] uint16 *port_name;
2297 } spoolss_SetPortInfo1;
2299 typedef [public,gensize] struct {
2300 [string,charset(UTF16)] uint16 *port_name;
2301 [string,charset(UTF16)] uint16 *monitor_name;
2302 [string,charset(UTF16)] uint16 *description;
2303 spoolss_PortType port_type;
2304 uint32 reserved;
2305 } spoolss_SetPortInfo2;
2307 typedef [public,gensize] struct {
2308 spoolss_PortStatus status;
2309 [string,charset(UTF16)] uint16 *status_string;
2310 spoolss_PortSeverity severity;
2311 } spoolss_SetPortInfo3;
2313 typedef [public,gensize] struct {
2314 [string,charset(UTF16)] uint16 *port_name;
2315 DATA_BLOB monitor_data; /* relative ?? */
2316 } spoolss_SetPortInfoFF;
2318 typedef [ms_union,switch_type(uint32)] union {
2319 [case(1)] spoolss_SetPortInfo1 *info1;
2320 [case(2)] spoolss_SetPortInfo2 *info2;
2321 [case(3)] spoolss_SetPortInfo3 *info3;
2322 [case(0xff)] spoolss_SetPortInfoFF *infoFF;
2323 } spoolss_SetPortInfo;
2325 typedef [public] struct {
2326 uint32 level;
2327 [switch_is(level)] spoolss_SetPrinterInfo info;
2328 } spoolss_SetPortInfoContainer;
2330 WERROR spoolss_AddPort(
2331 [in,unique] [string,charset(UTF16)] uint16 *server_name,
2332 [in] uint32 unknown,
2333 [in] [string,charset(UTF16)] uint16 monitor_name[]
2336 /******************/
2337 /* Function: 0x26 */
2338 [todo] WERROR spoolss_ConfigurePort(
2341 /******************/
2342 /* Function: 0x27 */
2343 WERROR spoolss_DeletePort(
2344 [in,unique] [string,charset(UTF16)] uint16 *server_name,
2345 [in] uint3264 ptr, /* ULONG_PTR */
2346 [in,ref] [string,charset(UTF16)] uint16 *port_name
2349 /******************/
2350 /* Function: 0x28 */
2351 WERROR spoolss_CreatePrinterIC(
2352 [in,ref] policy_handle *handle,
2353 [out,ref] policy_handle *gdi_handle,
2354 [in,ref] spoolss_DevmodeContainer *devmode_ctr
2357 /******************/
2358 /* Function: 0x29 */
2360 typedef struct {
2361 uint32 Checksum;
2362 uint32 Index;
2363 } UNIVERSAL_FONT_ID;
2365 typedef [public] struct {
2366 uint32 count;
2367 UNIVERSAL_FONT_ID fonts[count];
2368 } UNIVERSAL_FONT_ID_ctr;
2370 WERROR spoolss_PlayGDIScriptOnPrinterIC(
2371 [in,ref] policy_handle *gdi_handle,
2372 [in,ref] [size_is(cIn)] uint8 *pIn,
2373 [in] uint32 cIn,
2374 [out,ref] [size_is(cOut)] uint8 *pOut,
2375 [in] uint32 cOut,
2376 [in] uint32 ul
2379 /******************/
2380 /* Function: 0x2a */
2381 WERROR spoolss_DeletePrinterIC(
2382 [in,out,ref] policy_handle *gdi_handle
2385 /******************/
2386 /* Function: 0x2b */
2387 [todo] WERROR spoolss_AddPrinterConnection(
2390 /******************/
2391 /* Function: 0x2c */
2392 [todo] WERROR spoolss_DeletePrinterConnection(
2395 /******************/
2396 /* Function: 0x2d */
2397 [todo] WERROR spoolss_PrinterMessageBox(
2398 /* Marked as obsolete in MSDN. "Not necessary and has
2399 no effect". */
2402 /******************/
2403 /* Function: 0x2e */
2405 typedef struct {
2406 [string,charset(UTF16)] uint16 *monitor_name;
2407 } spoolss_AddMonitorInfo1;
2409 typedef struct {
2410 [string,charset(UTF16)] uint16 *monitor_name;
2411 [string,charset(UTF16)] uint16 *environment;
2412 [string,charset(UTF16)] uint16 *dll_name;
2413 } spoolss_AddMonitorInfo2;
2415 typedef [ms_union,switch_type(uint32)] union {
2416 [case(1)] spoolss_AddMonitorInfo1 *info1;
2417 [case(2)] spoolss_AddMonitorInfo2 *info2;
2418 } spoolss_AddMonitorInfo;
2420 typedef [public] struct {
2421 uint32 level;
2422 [switch_is(level)] spoolss_MonitorInfo info;
2423 } spoolss_MonitorContainer;
2425 [todo] WERROR spoolss_AddMonitor(
2428 /******************/
2429 /* Function: 0x2f */
2430 [todo] WERROR spoolss_DeleteMonitor(
2433 /******************/
2434 /* Function: 0x30 */
2435 WERROR spoolss_DeletePrintProcessor(
2436 [in,unique] [string,charset(UTF16)] uint16 *server,
2437 [in,unique] [string,charset(UTF16)] uint16 *architecture,
2438 [in] [string,charset(UTF16)] uint16 print_processor_name[]
2441 /******************/
2442 /* Function: 0x31 */
2443 [todo] WERROR spoolss_AddPrintProvidor(
2446 /******************/
2447 /* Function: 0x32 */
2448 [todo] WERROR spoolss_DeletePrintProvidor(
2451 /******************/
2452 /* Function: 0x33 */
2454 typedef [public,gensize] struct {
2455 [relative] nstring *name_array;
2456 } spoolss_PrintProcDataTypesInfo1;
2458 typedef [nodiscriminant,relative_base,public,flag(NDR_RELATIVE_REVERSE)] union {
2459 [case(1)] spoolss_PrintProcDataTypesInfo1 info1;
2460 [default];
2461 } spoolss_PrintProcDataTypesInfo;
2463 [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessorDataTypes(
2464 [in,unique] [string,charset(UTF16)] uint16 *servername,
2465 [in,unique] [string,charset(UTF16)] uint16 *print_processor_name,
2466 [in] uint32 level,
2467 [in,unique] DATA_BLOB *buffer,
2468 [in] uint32 offered,
2469 [out,unique] DATA_BLOB *info,
2470 [out,ref] uint32 *needed,
2471 [out,ref] uint32 *count
2473 [public,noopnum,noprint] void __spoolss_EnumPrintProcessorDataTypes(
2474 [in] uint32 level,
2475 [in] uint32 count,
2476 [out,switch_is(level)] spoolss_PrintProcDataTypesInfo info[count]
2478 [nopull,nopush] WERROR spoolss_EnumPrintProcessorDataTypes(
2479 [in,unique] [string,charset(UTF16)] uint16 *servername,
2480 [in,unique] [string,charset(UTF16)] uint16 *print_processor_name,
2481 [in] uint32 level,
2482 [in,unique] DATA_BLOB *buffer,
2483 [in] uint32 offered,
2484 [out,ref] uint32 *count,
2485 [out,ref,switch_is(level),size_is(,*count)] spoolss_PrintProcDataTypesInfo **info,
2486 [out,ref] uint32 *needed
2489 /******************/
2490 /* Function: 0x34 */
2491 WERROR spoolss_ResetPrinter(
2492 [in,ref] policy_handle *handle,
2493 [in,unique] [string,charset(UTF16)] uint16 *data_type,
2494 [in,ref] spoolss_DevmodeContainer *devmode_ctr
2497 /******************/
2498 /* Function: 0x35 */
2499 [public] WERROR spoolss_GetPrinterDriver2(
2500 [in,ref] policy_handle *handle,
2501 [in,unique] [string,charset(UTF16)] uint16 *architecture,
2502 [in] uint32 level,
2503 [in,unique] DATA_BLOB *buffer,
2504 [in] uint32 offered,
2505 [in] uint32 client_major_version,
2506 [in] uint32 client_minor_version,
2507 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverInfo *info,
2508 [out,ref] uint32 *needed,
2509 [out,ref] uint32 *server_major_version,
2510 [out,ref] uint32 *server_minor_version
2513 /******************/
2514 /* Function: 0x36 */
2515 [todo] WERROR spoolss_FindFirstPrinterChangeNotification(
2518 /******************/
2519 /* Function: 0x37 */
2520 [todo] WERROR spoolss_FindNextPrinterChangeNotification(
2523 /******************/
2524 /* Function: 0x38 */
2525 [public] WERROR spoolss_FindClosePrinterNotify(
2526 [in,ref] policy_handle *handle
2529 /******************/
2530 /* Function: 0x39 */
2531 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
2534 /******************/
2535 /* Function: 0x3a */
2536 [public] WERROR spoolss_ReplyOpenPrinter(
2537 [in,string,charset(UTF16)] uint16 server_name[],
2538 [in] uint32 printer_local,
2539 [in] winreg_Type type,
2540 [in,range(0,512)] uint32 bufsize,
2541 [in,unique,size_is(bufsize)] uint8 *buffer,
2542 [out,ref] policy_handle *handle
2545 /******************/
2546 /* Function: 0x3b */
2548 typedef [bitmap32bit] bitmap {
2549 PRINTER_CHANGE_ADD_PRINTER = 0x00000001,
2550 PRINTER_CHANGE_SET_PRINTER = 0x00000002,
2551 PRINTER_CHANGE_DELETE_PRINTER = 0x00000004,
2552 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008,
2553 PRINTER_CHANGE_ADD_JOB = 0x00000100,
2554 PRINTER_CHANGE_SET_JOB = 0x00000200,
2555 PRINTER_CHANGE_DELETE_JOB = 0x00000400,
2556 PRINTER_CHANGE_WRITE_JOB = 0x00000800,
2557 PRINTER_CHANGE_ADD_FORM = 0x00010000,
2558 PRINTER_CHANGE_SET_FORM = 0x00020000,
2559 PRINTER_CHANGE_DELETE_FORM = 0x00040000,
2560 PRINTER_CHANGE_ADD_PORT = 0x00100000,
2561 PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000,
2562 PRINTER_CHANGE_DELETE_PORT = 0x00400000,
2563 PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000,
2564 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000,
2565 PRINTER_CHANGE_SERVER = 0x08000000,
2566 PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000,
2567 PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000,
2568 PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000,
2569 PRINTER_CHANGE_TIMEOUT = 0x80000000
2570 } spoolss_PrinterChangeFlags;
2572 const int PRINTER_CHANGE_PRINTER = 0x000000FF;
2574 const int PRINTER_CHANGE_JOB = 0x0000FF00;
2576 const int PRINTER_CHANGE_FORM = (PRINTER_CHANGE_ADD_FORM |
2577 PRINTER_CHANGE_SET_FORM |
2578 PRINTER_CHANGE_DELETE_FORM); /* 0x00070000 */
2580 const int PRINTER_CHANGE_PORT = (PRINTER_CHANGE_ADD_PORT |
2581 PRINTER_CHANGE_CONFIGURE_PORT |
2582 PRINTER_CHANGE_DELETE_PORT); /* 0x00700000 */
2584 const int PRINTER_CHANGE_PRINT_PROCESSOR = 0x07000000;
2586 const int PRINTER_CHANGE_PRINTER_DRIVER = (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
2587 PRINTER_CHANGE_SET_PRINTER_DRIVER |
2588 PRINTER_CHANGE_DELETE_PRINTER_DRIVER); /* 0x70000000 */
2590 const int PRINTER_CHANGE_ALL = (PRINTER_CHANGE_PRINTER |
2591 PRINTER_CHANGE_JOB |
2592 PRINTER_CHANGE_FORM |
2593 PRINTER_CHANGE_PORT |
2594 PRINTER_CHANGE_PRINT_PROCESSOR |
2595 PRINTER_CHANGE_PRINTER_DRIVER); /* 0x7777FFFF */
2596 WERROR spoolss_RouterReplyPrinter(
2597 [in,ref] policy_handle *handle,
2598 [in] spoolss_PrinterChangeFlags flags,
2599 [in,range(0,512)] uint32 bufsize,
2600 [in,unique,size_is(bufsize)] uint8 *buffer
2603 /******************/
2604 /* Function: 0x3c */
2605 [public] WERROR spoolss_ReplyClosePrinter(
2606 [in,out,ref] policy_handle *handle
2609 /******************/
2610 /* Function: 0x3d */
2612 typedef [public] struct {
2613 uint32 monitor_data_size;
2614 [size_is(monitor_data_size),unique] uint8 *monitor_data;
2615 } spoolss_PortVarContainer;
2617 WERROR spoolss_AddPortEx(
2618 [in,unique] [string,charset(UTF16)] uint16 *servername,
2619 [in,ref] spoolss_SetPortInfoContainer *port_ctr,
2620 [in,ref] spoolss_PortVarContainer *port_var_ctr,
2621 [in,unique] [string,charset(UTF16)] uint16 *monitor_name
2624 /******************/
2625 /* Function: 0x3e */
2626 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification(
2629 /******************/
2630 /* Function: 0x3f */
2631 [todo] WERROR spoolss_SpoolerInit(
2634 /******************/
2635 /* Function: 0x40 */
2636 [todo] WERROR spoolss_ResetPrinterEx(
2639 typedef [enum16bit,public] enum {
2640 JOB_NOTIFY_FIELD_PRINTER_NAME = 0x00,
2641 JOB_NOTIFY_FIELD_MACHINE_NAME = 0x01,
2642 JOB_NOTIFY_FIELD_PORT_NAME = 0x02,
2643 JOB_NOTIFY_FIELD_USER_NAME = 0x03,
2644 JOB_NOTIFY_FIELD_NOTIFY_NAME = 0x04,
2645 JOB_NOTIFY_FIELD_DATATYPE = 0x05,
2646 JOB_NOTIFY_FIELD_PRINT_PROCESSOR = 0x06,
2647 JOB_NOTIFY_FIELD_PARAMETERS = 0x07,
2648 JOB_NOTIFY_FIELD_DRIVER_NAME = 0x08,
2649 JOB_NOTIFY_FIELD_DEVMODE = 0x09,
2650 JOB_NOTIFY_FIELD_STATUS = 0x0a,
2651 JOB_NOTIFY_FIELD_STATUS_STRING = 0x0b,
2652 JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0c,
2653 JOB_NOTIFY_FIELD_DOCUMENT = 0x0d,
2654 JOB_NOTIFY_FIELD_PRIORITY = 0x0e,
2655 JOB_NOTIFY_FIELD_POSITION = 0x0f,
2656 JOB_NOTIFY_FIELD_SUBMITTED = 0x10,
2657 JOB_NOTIFY_FIELD_START_TIME = 0x11,
2658 JOB_NOTIFY_FIELD_UNTIL_TIME = 0x12,
2659 JOB_NOTIFY_FIELD_TIME = 0x13,
2660 JOB_NOTIFY_FIELD_TOTAL_PAGES = 0x14,
2661 JOB_NOTIFY_FIELD_PAGES_PRINTED = 0x15,
2662 JOB_NOTIFY_FIELD_TOTAL_BYTES = 0x16,
2663 JOB_NOTIFY_FIELD_BYTES_PRINTED = 0x17
2664 } spoolss_JobNotifyField;
2666 typedef [enum16bit,public] enum {
2667 PRINTER_NOTIFY_FIELD_SERVER_NAME = 0x00,
2668 PRINTER_NOTIFY_FIELD_PRINTER_NAME = 0x01,
2669 PRINTER_NOTIFY_FIELD_SHARE_NAME = 0x02,
2670 PRINTER_NOTIFY_FIELD_PORT_NAME = 0x03,
2671 PRINTER_NOTIFY_FIELD_DRIVER_NAME = 0x04,
2672 PRINTER_NOTIFY_FIELD_COMMENT = 0x05,
2673 PRINTER_NOTIFY_FIELD_LOCATION = 0x06,
2674 PRINTER_NOTIFY_FIELD_DEVMODE = 0x07,
2675 PRINTER_NOTIFY_FIELD_SEPFILE = 0x08,
2676 PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR = 0x09,
2677 PRINTER_NOTIFY_FIELD_PARAMETERS = 0x0a,
2678 PRINTER_NOTIFY_FIELD_DATATYPE = 0x0b,
2679 PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR = 0x0c,
2680 PRINTER_NOTIFY_FIELD_ATTRIBUTES = 0x0d,
2681 PRINTER_NOTIFY_FIELD_PRIORITY = 0x0e,
2682 PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY = 0x0f,
2683 PRINTER_NOTIFY_FIELD_START_TIME = 0x10,
2684 PRINTER_NOTIFY_FIELD_UNTIL_TIME = 0x11,
2685 PRINTER_NOTIFY_FIELD_STATUS = 0x12,
2686 PRINTER_NOTIFY_FIELD_STATUS_STRING = 0x13,
2687 PRINTER_NOTIFY_FIELD_CJOBS = 0x14,
2688 PRINTER_NOTIFY_FIELD_AVERAGE_PPM = 0x15,
2689 PRINTER_NOTIFY_FIELD_TOTAL_PAGES = 0x16,
2690 PRINTER_NOTIFY_FIELD_PAGES_PRINTED = 0x17,
2691 PRINTER_NOTIFY_FIELD_TOTAL_BYTES = 0x18,
2692 PRINTER_NOTIFY_FIELD_BYTES_PRINTED = 0x19,
2693 PRINTER_NOTIFY_FIELD_OBJECT_GUID = 0x1a,
2694 PRINTER_NOTIFY_FIELD_FRIENDLY_NAME = 0x1b
2695 } spoolss_PrintNotifyField;
2697 typedef [enum16bit] enum {
2698 PRINTER_NOTIFY_TYPE = 0x00,
2699 JOB_NOTIFY_TYPE = 0x01
2700 } spoolss_NotifyType;
2702 typedef [nodiscriminant,noprint] union {
2703 [case(PRINTER_NOTIFY_TYPE)] uint16 field;
2704 [case(JOB_NOTIFY_TYPE)] uint16 field;
2705 [default] uint16 field;
2706 } spoolss_Field;
2708 /******************/
2709 /* Function: 0x41 */
2710 typedef struct {
2711 spoolss_NotifyType type;
2712 uint16 u1;
2713 uint32 u2;
2714 uint32 u3;
2715 uint32 count;
2716 [size_is(count),switch_is(type)] spoolss_Field *fields;
2717 } spoolss_NotifyOptionType;
2719 typedef [bitmap32bit] bitmap {
2720 PRINTER_NOTIFY_OPTIONS_REFRESH = 0x00000001
2721 } spoolssNotifyOptionFlags;
2723 typedef [public] struct {
2724 [value(2)] uint32 version;
2725 spoolssNotifyOptionFlags flags;
2726 uint32 count;
2727 [size_is(count)] spoolss_NotifyOptionType *types;
2728 } spoolss_NotifyOption;
2730 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
2731 [in,ref] policy_handle *handle,
2732 [in] spoolss_PrinterChangeFlags flags,
2733 [in] uint32 options,
2734 [in,unique] [string,charset(UTF16)] uint16 *local_machine,
2735 [in] uint32 printer_local,
2736 [in,unique] spoolss_NotifyOption *notify_options
2739 /******************/
2740 /* Function: 0x42 */
2742 typedef struct {
2743 uint32 size;
2744 [size_is(size/2),unique,charset(UTF16)] uint16 *string;
2745 } spoolss_NotifyString;
2747 typedef [v1_enum] enum {
2748 NOTIFY_TABLE_DWORD = 0x0001,
2749 NOTIFY_TABLE_STRING = 0x0002,
2750 NOTIFY_TABLE_DEVMODE = 0x0003,
2751 NOTIFY_TABLE_TIME = 0x0004,
2752 NOTIFY_TABLE_SECURITYDESCRIPTOR = 0x0005
2753 } spoolss_NotifyTable;
2755 typedef [ms_union, switch_type(uint32)] union {
2756 [case(1)] uint32 integer[2];
2757 [case(2)] spoolss_NotifyString string;
2758 [case(3)] spoolss_DevmodeContainer devmode;
2759 [case(4)] spoolss_TimeCtr time;
2760 [case(5)] sec_desc_buf sd;
2761 } spoolss_NotifyData;
2763 typedef struct {
2764 spoolss_NotifyType type;
2765 [switch_is(type)] spoolss_Field field;
2766 spoolss_NotifyTable variable_type;
2767 uint32 job_id;
2768 [switch_is(variable_type)] spoolss_NotifyData data;
2769 } spoolss_Notify;
2771 typedef [public] struct {
2772 [value(2)] uint32 version;
2773 uint32 flags;
2774 uint32 count;
2775 [size_is(count)] spoolss_Notify notifies[];
2776 } spoolss_NotifyInfo;
2778 typedef [ms_union,switch_type(uint32)] union {
2779 [case(0)] spoolss_NotifyInfo *info0;
2780 } spoolss_ReplyPrinterInfo;
2782 typedef [bitmap32bit] bitmap {
2783 PRINTER_NOTIFY_INFO_DISCARDED = 0x00000001,
2784 PRINTER_NOTIFY_INFO_DISCARDNOTED = 0x00010000,
2785 PRINTER_NOTIFY_INFO_COLOR_MISMATCH = 0x00080000
2786 } spoolss_PrinterNotifyFlags;
2788 WERROR spoolss_RouterReplyPrinterEx(
2789 [in,ref] policy_handle *handle,
2790 [in] uint32 color,
2791 [in] spoolss_PrinterChangeFlags flags,
2792 [out,ref] spoolss_PrinterNotifyFlags *reply_result,
2793 [in] uint32 reply_type,
2794 [in,switch_is(reply_type)] spoolss_ReplyPrinterInfo info
2797 /******************/
2798 /* Function: 0x43 */
2799 [public] WERROR spoolss_RouterRefreshPrinterChangeNotify(
2800 [in,ref] policy_handle *handle,
2801 [in] uint32 change_low,
2802 [in,unique] spoolss_NotifyOption *options,
2803 [out,ref] spoolss_NotifyInfo **info
2806 /******************/
2807 /* Function: 0x44 */
2808 [todo] WERROR spoolss_44(
2811 typedef struct {
2812 uint32 size;
2813 [string,charset(UTF16)] uint16 *client;
2814 [string,charset(UTF16)] uint16 *user;
2815 uint32 build;
2816 spoolss_MajorVersion major;
2817 spoolss_MinorVersion minor;
2818 spoolss_ProcessorArchitecture processor;
2819 } spoolss_UserLevel1;
2821 typedef struct {
2822 uint32 not_used;
2823 } spoolss_UserLevel2;
2825 typedef struct {
2826 uint32 size;
2827 uint32 flags;
2828 uint32 size2;
2829 [string,charset(UTF16)] uint16 *client;
2830 [string,charset(UTF16)] uint16 *user;
2831 uint32 build;
2832 spoolss_MajorVersion major;
2833 spoolss_MinorVersion minor;
2834 spoolss_ProcessorArchitecture processor;
2835 udlong reserved;
2836 } spoolss_UserLevel3;
2838 typedef [ms_union,switch_type(uint32)] union {
2839 [case(1)] spoolss_UserLevel1 *level1;
2840 [case(2)] spoolss_UserLevel2 *level2;
2841 [case(3)] spoolss_UserLevel3 *level3;
2842 } spoolss_UserLevel;
2844 typedef [public] struct {
2845 uint32 level;
2846 [switch_is(level)] spoolss_UserLevel user_info;
2847 } spoolss_UserLevelCtr;
2849 typedef bitmap {
2850 SERVER_ACCESS_ADMINISTER = 0x00000001,
2851 SERVER_ACCESS_ENUMERATE = 0x00000002,
2852 PRINTER_ACCESS_ADMINISTER = 0x00000004,
2853 PRINTER_ACCESS_USE = 0x00000008,
2854 JOB_ACCESS_ADMINISTER = 0x00000010,
2855 JOB_ACCESS_READ = 0x00000020
2856 } spoolss_AccessRights;
2858 /* Access rights for print servers */
2859 const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED |
2860 SERVER_ACCESS_ADMINISTER |
2861 SERVER_ACCESS_ENUMERATE;
2863 const int SERVER_READ = SEC_STD_READ_CONTROL |
2864 SERVER_ACCESS_ENUMERATE;
2866 const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
2867 SERVER_ACCESS_ADMINISTER |
2868 SERVER_ACCESS_ENUMERATE;
2870 const int SERVER_EXECUTE = SEC_STD_READ_CONTROL |
2871 SERVER_ACCESS_ENUMERATE;
2873 /* Access rights for printers */
2874 const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED |
2875 PRINTER_ACCESS_ADMINISTER |
2876 PRINTER_ACCESS_USE;
2878 const int PRINTER_READ = SEC_STD_READ_CONTROL |
2879 PRINTER_ACCESS_USE;
2881 const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
2882 PRINTER_ACCESS_USE;
2884 const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL |
2885 PRINTER_ACCESS_USE;
2887 /* Access rights for jobs */
2888 const int JOB_ALL_ACCESS = SEC_STD_REQUIRED |
2889 JOB_ACCESS_ADMINISTER;
2891 const int JOB_READ = SEC_STD_READ_CONTROL |
2892 JOB_ACCESS_ADMINISTER;
2894 const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
2895 JOB_ACCESS_ADMINISTER;
2897 const int JOB_EXECUTE = SEC_STD_READ_CONTROL |
2898 JOB_ACCESS_ADMINISTER;
2900 /* ACE masks for various print permissions */
2901 const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL |
2902 PRINTER_ALL_ACCESS;
2904 const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL |
2905 SEC_STD_READ_CONTROL;
2907 const int PRINTER_ACE_PRINT = SEC_GENERIC_EXECUTE |
2908 SEC_STD_READ_CONTROL |
2909 PRINTER_ACCESS_USE;
2911 /******************/
2912 /* Function: 0x45 */
2913 [public] WERROR spoolss_OpenPrinterEx(
2914 [in,unique] [string,charset(UTF16)] uint16 *printername,
2915 [in,unique] [string,charset(UTF16)] uint16 *datatype,
2916 [in] spoolss_DevmodeContainer devmode_ctr,
2917 [in] spoolss_AccessRights access_mask,
2918 [in] spoolss_UserLevelCtr userlevel_ctr,
2919 [out,ref] policy_handle *handle
2922 /******************/
2923 /* Function: 0x46 */
2924 WERROR spoolss_AddPrinterEx(
2925 [in,unique] [string,charset(UTF16)] uint16 *server,
2926 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
2927 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
2928 [in,ref] sec_desc_buf *secdesc_ctr,
2929 [in,ref] spoolss_UserLevelCtr *userlevel_ctr,
2930 [out,ref] policy_handle *handle
2933 /******************/
2934 /* Function: 0x47 */
2935 WERROR spoolss_SetPort(
2936 [in,unique] [string,charset(UTF16)] uint16 *servername,
2937 [in,unique] [string,charset(UTF16)] uint16 *port_name,
2938 [in,ref] spoolss_SetPortInfoContainer *port_ctr
2941 /******************/
2942 /* Function: 0x48 */
2943 WERROR spoolss_EnumPrinterData(
2944 [in,ref] policy_handle *handle,
2945 [in] uint32 enum_index,
2946 [out,size_is(value_offered/2),charset(UTF16)] uint16 value_name[],
2947 [in] uint32 value_offered,
2948 [out,ref] uint32 *value_needed,
2949 [out,ref] winreg_Type *type,
2950 [out,ref,size_is(data_offered),flag(LIBNDR_PRINT_ARRAY_HEX)] uint8 *data,
2951 [in] uint32 data_offered,
2952 [out,ref] uint32 *data_needed
2955 /******************/
2956 /* Function: 0x49 */
2957 WERROR spoolss_DeletePrinterData(
2958 [in,ref] policy_handle *handle,
2959 [in] [string,charset(UTF16)] uint16 value_name[]
2962 /******************/
2963 /* Function: 0x4a */
2964 [todo] WERROR spoolss_4a(
2967 /******************/
2968 /* Function: 0x4b */
2969 [todo] WERROR spoolss_4b(
2972 /******************/
2973 /* Function: 0x4c */
2974 [todo] WERROR spoolss_4c(
2977 /******************/
2978 /* Function: 0x4d */
2979 WERROR spoolss_SetPrinterDataEx(
2980 [in,ref] policy_handle *handle,
2981 [in] [string,charset(UTF16)] uint16 key_name[],
2982 [in] [string,charset(UTF16)] uint16 value_name[],
2983 [in] winreg_Type type,
2984 [in,ref] [size_is(offered)] uint8 *data,
2985 [in] uint32 offered
2988 /******************/
2989 /* Function: 0x4e */
2990 WERROR spoolss_GetPrinterDataEx(
2991 [in,ref] policy_handle *handle,
2992 [in] [string,charset(UTF16)] uint16 key_name[],
2993 [in] [string,charset(UTF16)] uint16 value_name[],
2994 [out,ref] winreg_Type *type,
2995 [out,ref,size_is(offered)] uint8 *data,
2996 [in] uint32 offered,
2997 [out,ref] uint32 *needed
3000 /******************/
3001 /* Function: 0x4f */
3003 typedef [relative_base,public,gensize] struct {
3004 [relative] nstring *value_name;
3005 [value(2*strlen_m_term(value_name))] uint32 value_name_len;
3006 winreg_Type type;
3007 [relative,subcontext(0),subcontext_size(data_length),flag(NDR_REMAINING|ndr_spoolss_PrinterEnumValues_align(r->type))] DATA_BLOB *data;
3008 [value(data ? data->length : 0)] uint32 data_length;
3009 } spoolss_PrinterEnumValues;
3011 [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDataEx(
3012 [in,ref] policy_handle *handle,
3013 [in] [string,charset(UTF16)] uint16 key_name[],
3014 [out] DATA_BLOB info,
3015 [in] uint32 offered,
3016 [out,ref] uint32 *needed,
3017 [out,ref] uint32 *count
3019 [public,noopnum,noprint] void __spoolss_EnumPrinterDataEx(
3020 [in] uint32 count,
3021 [out] spoolss_PrinterEnumValues info[count]
3023 [nopull,nopush] WERROR spoolss_EnumPrinterDataEx(
3024 [in,ref] policy_handle *handle,
3025 [in] [string,charset(UTF16)] uint16 key_name[],
3026 [in] uint32 offered,
3027 [out,ref] uint32 *count,
3028 [out,ref,size_is(,*count)] spoolss_PrinterEnumValues **info,
3029 [out,ref] uint32 *needed
3032 typedef [nodiscriminant] union {
3033 [case(0)];
3034 [case(1)];
3035 [default] nstring_array string_array;
3036 } spoolss_KeyNames;
3038 /******************/
3039 /* Function: 0x50 */
3040 [public] WERROR spoolss_EnumPrinterKey(
3041 [in, ref] policy_handle *handle,
3042 [in] [string,charset(UTF16)] uint16 key_name[],
3043 [out,ref] uint32 *_ndr_size,
3044 [out,ref,subcontext(0),subcontext_size(*_ndr_size*2),switch_is(*_ndr_size)] spoolss_KeyNames *key_buffer,
3045 [in] uint32 offered,
3046 [out,ref] uint32 *needed
3049 /******************/
3050 /* Function: 0x51 */
3051 WERROR spoolss_DeletePrinterDataEx(
3052 [in,ref] policy_handle *handle,
3053 [in] [string,charset(UTF16)] uint16 key_name[],
3054 [in] [string,charset(UTF16)] uint16 value_name[]
3057 /******************/
3058 /* Function: 0x52 */
3059 WERROR spoolss_DeletePrinterKey(
3060 [in,ref] policy_handle *handle,
3061 [in] [string,charset(UTF16)] uint16 key_name[]
3064 /******************/
3065 /* Function: 0x53 */
3066 [todo] WERROR spoolss_53(
3069 /******************/
3070 /* Function: 0x54 */
3071 typedef [public,bitmap32bit] bitmap {
3072 DPD_DELETE_UNUSED_FILES = 0x00000001,
3073 DPD_DELETE_SPECIFIC_VERSION = 0x00000002,
3074 DPD_DELETE_ALL_FILES = 0x00000004
3075 } spoolss_DeleteDriverFlags;
3077 WERROR spoolss_DeletePrinterDriverEx(
3078 [in,unique] [string,charset(UTF16)] uint16 *server,
3079 [in] [string,charset(UTF16)] uint16 architecture[],
3080 [in] [string,charset(UTF16)] uint16 driver[],
3081 [in] spoolss_DeleteDriverFlags delete_flags,
3082 [in] uint32 version
3085 /******************/
3086 /* Function: 0x55 */
3087 WERROR spoolss_AddPerMachineConnection(
3088 [in,unique] [string,charset(UTF16)] uint16 *server,
3089 [in,ref] [string,charset(UTF16)] uint16 *printername,
3090 [in,ref] [string,charset(UTF16)] uint16 *printserver,
3091 [in,ref] [string,charset(UTF16)] uint16 *provider
3094 /******************/
3095 /* Function: 0x56 */
3096 WERROR spoolss_DeletePerMachineConnection(
3097 [in,unique] [string,charset(UTF16)] uint16 *server,
3098 [in,ref] [string,charset(UTF16)] uint16 *printername
3101 /******************/
3102 /* Function: 0x57 */
3103 [public,noopnum,noprint] WERROR _spoolss_EnumPerMachineConnections(
3104 [in,unique] [string,charset(UTF16)] uint16 *server,
3105 [in,unique] DATA_BLOB *buffer,
3106 [in] uint32 offered,
3107 [out,unique] DATA_BLOB *info,
3108 [out,ref] uint32 *needed,
3109 [out,ref] uint32 *count
3111 [public,noopnum,noprint] void __spoolss_EnumPerMachineConnections(
3112 [in] uint32 count,
3113 [out] spoolss_PrinterInfo4 info[count]
3115 [nopull,nopush] WERROR spoolss_EnumPerMachineConnections(
3116 [in,unique] [string,charset(UTF16)] uint16 *server,
3117 [in,unique] DATA_BLOB *buffer,
3118 [in] uint32 offered,
3119 [out,ref] uint32 *count,
3120 [out,ref,size_is(,*count)] spoolss_PrinterInfo4 **info,
3121 [out,ref] uint32 *needed
3124 /******************/
3125 /* Function: 0x58 */
3127 typedef [v1_enum] enum {
3128 PROTOCOL_RAWTCP_TYPE = 1,
3129 PROTOCOL_LPR_TYPE = 2
3130 } spoolss_PortProtocol;
3132 typedef [public,gensize] struct {
3133 [charset(UTF16)] uint16 portname[64];
3134 [value(0x00000001)] uint32 version;
3135 spoolss_PortProtocol protocol;
3136 [value(ndr_size_spoolss_PortData1(r, ndr->flags))] uint32 size;
3137 uint32 reserved;
3138 [charset(UTF16)] uint16 hostaddress[49];
3139 [charset(UTF16)] uint16 snmpcommunity[33];
3140 uint32 dblspool;
3141 [charset(UTF16)] uint16 queue[33];
3142 [charset(UTF16)] uint16 ip_address[16]; /* s3 had 17 */
3143 [charset(UTF16)] uint16 hardware_address[13];
3144 [charset(UTF16)] uint16 device_type[257];
3145 uint32 port_number;
3146 boolean32 snmp_enabled;
3147 uint32 snmp_dev_index;
3148 } spoolss_PortData1;
3150 typedef [public,gensize] struct {
3151 [charset(UTF16)] uint16 portname[64];
3152 [value(0x00000002)] uint32 version;
3153 spoolss_PortProtocol protocol;
3154 [value(ndr_size_spoolss_PortData2(r, ndr->flags))] uint32 size;
3155 uint32 reserved;
3156 [charset(UTF16)] uint16 hostaddress[128];
3157 [charset(UTF16)] uint16 snmpcommunity[33];
3158 uint32 dblspool;
3159 [charset(UTF16)] uint16 queue[33];
3160 [charset(UTF16)] uint16 device_type[257];
3161 uint32 port_number;
3162 boolean32 snmp_enabled;
3163 uint32 snmp_dev_index;
3164 uint32 port_monitor_mib_index;
3165 } spoolss_PortData2;
3167 typedef [public] struct {
3168 nstring dll_name;
3169 } spoolss_MonitorUi;
3171 WERROR spoolss_XcvData(
3172 [in,ref] policy_handle *handle,
3173 [in] [string,charset(UTF16)] uint16 function_name[],
3174 [in] DATA_BLOB in_data,
3175 [in,value(r->in.in_data.length)] uint32 _in_data_length,
3176 [out,ref] [size_is(out_data_size)] uint8 *out_data,
3177 [in] uint32 out_data_size,
3178 [out,ref] uint32 *needed,
3179 [in,out,ref] uint32 *status_code
3182 /******************/
3183 /* Function: 0x59 */
3185 typedef [bitmap32bit] bitmap {
3186 APD_STRICT_UPGRADE = 0x00000001,
3187 APD_STRICT_DOWNGRADE = 0x00000002,
3188 APD_COPY_ALL_FILES = 0x00000004,
3189 APD_COPY_NEW_FILES = 0x00000008,
3190 APD_COPY_FROM_DIRECTORY = 0x00000010,
3191 APD_DONT_COPY_FILES_TO_CLUSTER = 0x00001000,
3192 APD_COPY_TO_ALL_SPOOLERS = 0x00002000,
3193 APD_RETURN_BLOCKING_STATUS_CODE = 0x00010000
3194 } spoolss_AddPrinterDriverExFlags;
3196 [public] WERROR spoolss_AddPrinterDriverEx(
3197 [in,unique] [string,charset(UTF16)] uint16 *servername,
3198 [in,ref] spoolss_AddDriverInfoCtr *info_ctr,
3199 [in] spoolss_AddPrinterDriverExFlags flags
3202 /******************/
3203 /* Function: 0x5a */
3204 [todo] WERROR spoolss_5a(
3207 /******************/
3208 /* Function: 0x5b */
3209 [todo] WERROR spoolss_5b(
3212 /******************/
3213 /* Function: 0x5c */
3214 [todo] WERROR spoolss_5c(
3217 /******************/
3218 /* Function: 0x5d */
3219 [todo] WERROR spoolss_5d(
3222 /******************/
3223 /* Function: 0x5e */
3224 [todo] WERROR spoolss_5e(
3227 /******************/
3228 /* Function: 0x5f */
3229 [todo] WERROR spoolss_5f(
3232 /******************/
3233 /* Function: 0x60 */
3234 [todo] WERROR spoolss_60(
3237 /******************/
3238 /* Function: 0x61 */
3240 const string BIDI_ACTION_ENUM_SCHEMA = "EnumSchema";
3241 const string BIDI_ACTION_GET = "Get";
3242 const string BIDI_ACTION_SET = "Set";
3243 const string BIDI_ACTION_GET_ALL = "GetAll";
3245 typedef enum {
3246 BIDI_NULL = 0x00000000,
3247 BIDI_INT = 0x00000001,
3248 BIDI_FLOAT = 0x00000002,
3249 BIDI_BOOL = 0x00000003,
3250 BIDI_STRING = 0x00000004,
3251 BIDI_TEXT = 0x00000005,
3252 BIDI_ENUM = 0x00000006,
3253 BIDI_BLOB = 0x00000007
3254 } BIDI_TYPE;
3256 typedef struct {
3257 uint32 cbBuf;
3258 [size_is(cbBuf), unique] uint8 *pszString;
3259 } RPC_BINARY_CONTAINER;
3261 typedef [ms_union,switch_type(uint32)] union {
3262 [case(BIDI_NULL)] uint32 bData;
3263 [case(BIDI_BOOL)] uint32 bData;
3264 [case(BIDI_INT)] uint32 iData;
3265 [case(BIDI_STRING)] [unique] [string,charset(UTF16)] uint16 *sData;
3266 [case(BIDI_TEXT)] [unique] [string,charset(UTF16)] uint16 *sData;
3267 [case(BIDI_ENUM)] [unique] [string,charset(UTF16)] uint16 *sData;
3268 /*[case(BIDI_FLOAT)] float fData;*/
3269 [case(BIDI_BLOB)] RPC_BINARY_CONTAINER biData;
3270 } RPC_BIDI_DATA_u;
3272 typedef struct {
3273 uint32 dwBidiType;
3274 [switch_is(dwBidiType)] RPC_BIDI_DATA_u u;
3275 } RPC_BIDI_DATA;
3277 typedef struct {
3278 uint32 dwReqNumber;
3279 [unique] [string,charset(UTF16)] uint16 *pSchema;
3280 RPC_BIDI_DATA data;
3281 } RPC_BIDI_REQUEST_DATA;
3283 typedef [public] struct {
3284 [value(1)] uint32 Version;
3285 uint32 Flags;
3286 uint32 Count;
3287 [size_is(Count), unique] RPC_BIDI_REQUEST_DATA *aData[];
3288 } RPC_BIDI_REQUEST_CONTAINER;
3290 typedef struct {
3291 uint32 dwResult;
3292 uint32 dwReqNumber;
3293 [unique] [string,charset(UTF16)] uint16 *pSchema;
3294 RPC_BIDI_DATA data;
3295 } RPC_BIDI_RESPONSE_DATA;
3297 typedef [public] struct {
3298 [value(1)] uint32 Version;
3299 uint32 Flags;
3300 uint32 Count;
3301 [size_is(Count), unique] RPC_BIDI_RESPONSE_DATA *aData[];
3302 } RPC_BIDI_RESPONSE_CONTAINER;
3304 WERROR spoolss_SendRecvBidiData(
3305 [in] policy_handle hPrinter,
3306 [in,unique] [string,charset(UTF16)] uint16 *pAction,
3307 [in] RPC_BIDI_REQUEST_CONTAINER *pReqData,
3308 [out] RPC_BIDI_RESPONSE_CONTAINER **ppRespData
3311 /******************/
3312 /* Function: 0x62 */
3313 [todo] WERROR spoolss_62(
3316 /******************/
3317 /* Function: 0x63 */
3318 [todo] WERROR spoolss_63(
3321 /******************/
3322 /* Function: 0x64 */
3323 [todo] WERROR spoolss_64(
3326 /******************/
3327 /* Function: 0x65 */
3328 [todo] WERROR spoolss_65(
3331 /******************/
3332 /* Function: 0x66 */
3334 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_UNIDRV = "{D20EA372-DD35-4950-9ED8-A6335AFE79F0}";
3335 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_PSCRIPT = "{D20EA372-DD35-4950-9ED8-A6335AFE79F1}";
3336 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_PCLXL = "{D20EA372-DD35-4950-9ED8-A6335AFE79F2}";
3337 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_PLOTTER = "{D20EA372-DD35-4950-9ED8-A6335AFE79F4}";
3338 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_XPSDRV = "{D20EA372-DD35-4950-9ED8-A6335AFE79F5}";
3340 typedef [public] struct {
3341 GUID core_driver_guid;
3342 NTTIME driver_date;
3343 hyper driver_version;
3344 [charset(UTF16),to_null] uint16 szPackageID[260];
3345 } spoolss_CorePrinterDriver;
3347 [public] HRESULT spoolss_GetCorePrinterDrivers(
3348 [in,unique] [string,charset(UTF16)] uint16 *servername,
3349 [in,ref] [string,charset(UTF16)] uint16 *architecture,
3350 [in] uint32 core_driver_size,
3351 [in,size_is(core_driver_size)] uint16 *core_driver_dependencies,
3352 [in] uint32 core_printer_driver_count,
3353 [out,size_is(core_printer_driver_count)] spoolss_CorePrinterDriver *core_printer_drivers
3356 /******************/
3357 /* Function: 0x67 */
3358 [todo] WERROR spoolss_67(
3361 /******************/
3362 /* Function: 0x68 */
3363 HRESULT spoolss_GetPrinterDriverPackagePath(
3364 [in,unique] [string,charset(UTF16)] uint16 *servername,
3365 [in,ref] [string,charset(UTF16)] uint16 *architecture,
3366 [in,unique] [string,charset(UTF16)] uint16 *language,
3367 [in,ref] [string,charset(UTF16)] uint16 *package_id,
3368 [in,out,unique,size_is(driver_package_cab_size)] [charset(UTF16)] uint16 *driver_package_cab,
3369 [in] uint32 driver_package_cab_size,
3370 [out,ref] uint32 *required
3373 /******************/
3374 /* Function: 0x69 */
3375 [todo] WERROR spoolss_69(
3378 /******************/
3379 /* Function: 0x6a */
3380 [todo] WERROR spoolss_6a(
3383 /******************/
3384 /* Function: 0x6b */
3385 [todo] WERROR spoolss_6b(
3388 /******************/
3389 /* Function: 0x6c */
3390 [todo] WERROR spoolss_6c(
3393 /******************/
3394 /* Function: 0x6d */
3395 [todo] WERROR spoolss_6d(
3398 /******************/
3399 /* Function: 0x6e */
3401 const string SPLFILE_CONTENT_TYPE_PROP_NAME = "Spool File Contents";
3402 const string SPLFILE_CONTENT_TYPE_XPS_MS = "TYPE_XPS_MS";
3403 const string SPLFILE_CONTENT_TYPE_XPS_OPEN = "TYPE_XPS_OPEN";
3404 const string SPLFILE_CONTENT_TYPE_PDL_POSTSCRIPT = "TYPE_PDL_POSTSCRIPT";
3405 const string SPLFILE_CONTENT_TYPE_PDL_UNKNOWN = "TYPE_PDL_UNKNOWN";
3407 typedef enum {
3408 kRpcPropertyTypeString = 1,
3409 kRpcPropertyTypeInt32 = 2,
3410 kRpcPropertyTypeInt64 = 3,
3411 kRpcPropertyTypeByte = 4,
3412 kRpcPropertyTypeBuffer = 5
3413 } spoolss_EPrintPropertyType;
3415 typedef struct {
3416 uint32 cbBuf;
3417 [size_is(cbBuf)] uint8 *pBuf;
3418 } propertyBlob;
3420 typedef [ms_union,switch_type(spoolss_EPrintPropertyType)] union {
3421 [case(kRpcPropertyTypeString)] [string,charset(UTF16)] uint16 *propertyString;
3422 [case(kRpcPropertyTypeInt32)] uint32 propertyInt32;
3423 [case(kRpcPropertyTypeInt64)] hyper propertyInt64;
3424 [case(kRpcPropertyTypeByte)] uint8 propertyByte;
3425 [case(kRpcPropertyTypeBuffer)] propertyBlob propertyBlob;
3426 } spoolss_PrintPropertyValueUnion;
3428 typedef [public] struct {
3429 spoolss_EPrintPropertyType ePropertyType;
3430 [switch_is(ePropertyType)] spoolss_PrintPropertyValueUnion value;
3431 } spoolss_PrintPropertyValue;
3433 typedef [public] struct {
3434 [string,charset(UTF16)] uint16 *propertyName;
3435 spoolss_PrintPropertyValue propertyValue;
3436 } spoolss_PrintNamedProperty;
3438 WERROR spoolss_GetJobNamedPropertyValue(
3439 [in,ref] policy_handle *hPrinter,
3440 [in] uint32 JobId,
3441 [in] [string,charset(UTF16)] uint16 *pszName,
3442 [out,ref] spoolss_PrintPropertyValue *pValue
3445 /******************/
3446 /* Function: 0x6f */
3447 [public] WERROR spoolss_SetJobNamedProperty(
3448 [in,ref] policy_handle *hPrinter,
3449 [in] uint32 JobId,
3450 [in,ref] spoolss_PrintNamedProperty *pProperty
3453 /******************/
3454 /* Function: 0x70 */
3455 WERROR spoolss_DeleteJobNamedProperty(
3456 [in,ref] policy_handle *hPrinter,
3457 [in] uint32 JobId,
3458 [in] [string,charset(UTF16)] uint16 *pszName
3461 /******************/
3462 /* Function: 0x71 */
3463 WERROR spoolss_EnumJobNamedProperties(
3464 [in,ref] policy_handle *hPrinter,
3465 [in] uint32 JobId,
3466 [out,ref] uint32 *pcProperties,
3467 [out,ref,size_is(,*pcProperties)] spoolss_PrintNamedProperty **ppProperties
3470 /******************/
3471 /* Function: 0x72 */
3472 [todo] WERROR spoolss_72(
3475 /******************/
3476 /* Function: 0x73 */
3477 [todo] WERROR spoolss_73(
3480 /******************/
3481 /* Function: 0x71 */
3482 typedef enum {
3483 kInvalidJobState = 0,
3484 kLogJobPrinted = 1,
3485 kLogJobRendered = 2,
3486 kLogJobError = 3,
3487 kLogJobPipelineError = 4,
3488 kLogOfflineFileFull = 5
3489 } EBranchOfficeJobEventType;
3491 typedef struct {
3492 DWORD Status;
3493 [string,charset(UTF16)] uint16 *pDocumentName;
3494 [string,charset(UTF16)] uint16 *pUserName;
3495 [string,charset(UTF16)] uint16 *pMachineName;
3496 [string,charset(UTF16)] uint16 *pPrinterName;
3497 [string,charset(UTF16)] uint16 *pPortName;
3498 hyper Size;
3499 DWORD TotalPages;
3500 } spoolss_BranchOfficeJobDataPrinted;
3502 typedef struct {
3503 hyper Size;
3504 DWORD ICMMethod;
3505 short Color;
3506 short PrintQuality;
3507 short YResolution;
3508 short Copies;
3509 short TTOption;
3510 } spoolss_BranchOfficeJobDataRendered;
3512 typedef struct {
3513 WERROR LastError;
3514 [string,charset(UTF16)] uint16 *pDocumentName;
3515 [string,charset(UTF16)] uint16 *pUserName;
3516 [string,charset(UTF16)] uint16 *pPrinterName;
3517 [string,charset(UTF16)] uint16 *pDataType;
3518 hyper TotalSize;
3519 hyper PrintedSize;
3520 DWORD TotalPages;
3521 DWORD PrintedPages;
3522 [string,charset(UTF16)] uint16 *pMachineName;
3523 [string,charset(UTF16)] uint16 *pJobError;
3524 [string,charset(UTF16)] uint16 *pErrorDescription;
3525 } spoolss_BranchOfficeJobDataError;
3527 typedef struct {
3528 [string,charset(UTF16)] uint16 *pDocumentName;
3529 [string,charset(UTF16)] uint16 *pPrinterName;
3530 [string,charset(UTF16)] uint16 *pExtraErrorInfo;
3531 } spoolss_BranchOfficeJobDataPipelineFailed;
3533 typedef struct {
3534 [string,charset(UTF16)] uint16 *pMachineName;
3535 } spoolss_BranchOfficeLogOfflineFileFull;
3537 typedef [ms_union,switch_type(EBranchOfficeJobEventType)] union {
3538 [case(kLogJobPrinted)]
3539 spoolss_BranchOfficeJobDataPrinted LogJobPrinted;
3540 [case(kLogJobRendered)]
3541 spoolss_BranchOfficeJobDataRendered LogJobRendered;
3542 [case(kLogJobError)]
3543 spoolss_BranchOfficeJobDataError LogJobError;
3544 [case(kLogJobPipelineError)]
3545 spoolss_BranchOfficeJobDataPipelineFailed LogPipelineFailed;
3546 [case(kLogOfflineFileFull)]
3547 spoolss_BranchOfficeLogOfflineFileFull LogOfflineFileFull;
3548 } spoolss_BranchOfficeJobInfo;
3550 typedef struct {
3551 EBranchOfficeJobEventType eEventType;
3552 DWORD JobId;
3553 [switch_is(eEventType)] spoolss_BranchOfficeJobInfo JobInfo;
3554 } spoolss_BranchOfficeJobData;
3556 typedef [public] struct {
3557 DWORD cJobDataEntries;
3558 [size_is(cJobDataEntries)] spoolss_BranchOfficeJobData JobData[];
3559 } spoolss_BranchOfficeJobDataContainer;
3561 WERROR spoolss_LogJobInfoForBranchOffice(
3562 [in,ref] policy_handle *hPrinter,
3563 [in,ref] spoolss_BranchOfficeJobDataContainer *pBranchOfficeJobDataContainer