4 spoolss interface definitions
6 import "misc.idl", "security.idl", "winreg.idl";
8 [ uuid("12345678-1234-abcd-ef00-0123456789ab"),
10 endpoint("ncacn_np:[\\pipe\\spoolss]"),
11 pointer_default(unique),
12 helpstring("Spooler SubSystem"),
13 helper("../librpc/ndr/ndr_spoolss_buf.h")
16 typedef [v1_enum] enum winreg_Type winreg_Type;
17 typedef [gensize] struct {
29 [value(ndr_size_spoolss_Time(time, ndr->iconv_convenience, ndr->flags))] uint32 size;
30 [unique] spoolss_Time *time;
34 PROCESSOR_ARCHITECTURE_INTEL = 0x0000,
35 PROCESSOR_ARCHITECTURE_IA64 = 0x0006,
36 PROCESSOR_ARCHITECTURE_AMD64 = 0x0009
37 } spoolss_ProcessorArchitecture;
39 typedef [v1_enum] enum {
40 PROCESSOR_INTEL_386 = 0x00000182,
41 PROCESSOR_INTEL_486 = 0x000001E6,
42 PROCESSOR_INTEL_PENTIUM = 0x0000024A,
43 PROCESSOR_INTEL_IA64 = 0x00000898,
44 PROCESSOR_AMD_X8664 = 0x000022A0
45 } spoolss_ProcessorType;
47 typedef [v1_enum] enum {
48 /* Windows 95, Windows 98, Windows Me, Windows NT4 */
49 SPOOLSS_MAJOR_VERSION_NT4_95_98_ME = 0x00000004,
50 /* Windows 2000, Windows 2003, Windows XP */
51 SPOOLSS_MAJOR_VERSION_2000_2003_XP = 0x00000005,
52 /* Windows Vista, Windows 2008 */
53 SPOOLSS_MAJOR_VERSION_2008_VISTA = 0x00000006
54 } spoolss_MajorVersion;
56 typedef [v1_enum] enum {
57 /* Windows 2008, Windows Vista, Windows 2000, Windows NT4, Windows 95 */
58 SPOOLSS_MINOR_VERSION_0 = 0x00000000,
60 SPOOLSS_MINOR_VERSION_XP = 0x00000001,
61 /* Windows 2003, Windows XP x64 */
62 SPOOLSS_MINOR_VERSION_2003_XP64 = 0x00000002,
64 SPOOLSS_MINOR_VERSION_98 = 0x0000000a,
66 SPOOLSS_MINOR_VERSION_ME = 0x0000005a
67 } spoolss_MinorVersion;
70 [relative] nstring *printername;
71 [relative] nstring *servername;
76 uint32 global_counter;
82 uint32 session_counter;
83 uint32 num_error_out_of_paper;
84 uint32 num_error_not_ready;
86 uint32 number_of_processors;
87 spoolss_ProcessorType processor_type;
88 uint32 high_part_total_bytes;
92 uint32 enumerate_network_printers;
94 spoolss_ProcessorArchitecture processor_architecture;
95 uint16 processor_level;
99 } spoolss_PrinterInfo0;
101 typedef [bitmap32bit] bitmap {
102 DEVMODE_ORIENTATION = 0x00000001,
103 DEVMODE_PAPERSIZE = 0x00000002,
104 DEVMODE_PAPERLENGTH = 0x00000004,
105 DEVMODE_PAPERWIDTH = 0x00000008,
106 DEVMODE_SCALE = 0x00000010,
107 DEVMODE_POSITION = 0x00000020,
108 DEVMODE_NUP = 0x00000040,
109 DEVMODE_COPIES = 0x00000100,
110 DEVMODE_DEFAULTSOURCE = 0x00000200,
111 DEVMODE_PRINTQUALITY = 0x00000400,
112 DEVMODE_COLOR = 0x00000800,
113 DEVMODE_DUPLEX = 0x00001000,
114 DEVMODE_YRESOLUTION = 0x00002000,
115 DEVMODE_TTOPTION = 0x00004000,
116 DEVMODE_COLLATE = 0x00008000,
117 DEVMODE_FORMNAME = 0x00010000,
118 DEVMODE_LOGPIXELS = 0x00020000,
119 DEVMODE_BITSPERPEL = 0x00040000,
120 DEVMODE_PELSWIDTH = 0x00080000,
121 DEVMODE_PELSHEIGHT = 0x00100000,
122 DEVMODE_DISPLAYFLAGS = 0x00200000,
123 DEVMODE_DISPLAYFREQUENCY = 0x00400000,
124 DEVMODE_ICMMETHOD = 0x00800000,
125 DEVMODE_ICMINTENT = 0x01000000,
126 DEVMODE_MEDIATYPE = 0x02000000,
127 DEVMODE_DITHERTYPE = 0x04000000,
128 DEVMODE_PANNINGWIDTH = 0x08000000,
129 DEVMODE_PANNINGHEIGHT = 0x10000000
130 } spoolss_DeviceModeFields;
132 typedef [public,gensize] struct {
133 [charset(UTF16)] uint16 devicename[32];
135 uint16 driverversion;
137 [value(r->driverextra_data.length)] uint16 __driverextra_length;
138 spoolss_DeviceModeFields fields;
145 uint16 defaultsource;
152 [charset(UTF16)] uint16 formname[32];
158 uint32 displayfrequency;
166 uint32 panningheight;
167 [subcontext_size(__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data;
168 } spoolss_DeviceMode;
170 typedef [public] bitmap {
171 PRINTER_ENUM_DEFAULT = 0x00000001,
172 PRINTER_ENUM_LOCAL = 0x00000002,
173 PRINTER_ENUM_CONNECTIONS = 0x00000004,
174 PRINTER_ENUM_FAVORITE = 0x00000004,
175 PRINTER_ENUM_NAME = 0x00000008,
176 PRINTER_ENUM_REMOTE = 0x00000010,
177 PRINTER_ENUM_SHARED = 0x00000020,
178 PRINTER_ENUM_NETWORK = 0x00000040,
179 PRINTER_ENUM_EXPAND = 0x00004000,
180 PRINTER_ENUM_CONTAINER = 0x00008000,
181 PRINTER_ENUM_ICON1 = 0x00010000,
182 PRINTER_ENUM_ICON2 = 0x00020000,
183 PRINTER_ENUM_ICON3 = 0x00040000,
184 PRINTER_ENUM_ICON4 = 0x00080000,
185 PRINTER_ENUM_ICON5 = 0x00100000,
186 PRINTER_ENUM_ICON6 = 0x00200000,
187 PRINTER_ENUM_ICON7 = 0x00400000,
188 PRINTER_ENUM_ICON8 = 0x00800000,
189 PRINTER_ENUM_HIDE = 0x01000000
190 } spoolss_EnumPrinterFlags;
192 const int PRINTER_ENUM_ICONMASK = (PRINTER_ENUM_ICON1 |
199 PRINTER_ENUM_ICON8); /* 0x00ff0000 */
202 spoolss_EnumPrinterFlags flags;
203 [relative] nstring *name;
204 [relative] nstring *description;
205 [relative] nstring *comment;
206 } spoolss_PrinterInfo1;
209 PRINTER_ATTRIBUTE_QUEUED = 0x00000001,
210 PRINTER_ATTRIBUTE_DIRECT = 0x00000002,
211 PRINTER_ATTRIBUTE_DEFAULT = 0x00000004,
212 PRINTER_ATTRIBUTE_SHARED = 0x00000008,
213 PRINTER_ATTRIBUTE_NETWORK = 0x00000010,
214 PRINTER_ATTRIBUTE_HIDDEN = 0x00000020,
215 PRINTER_ATTRIBUTE_LOCAL = 0x00000040,
216 PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080,
217 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100,
218 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200,
219 PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400,
220 PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800,
221 PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000,
222 PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000,
223 PRINTER_ATTRIBUTE_FAX = 0x00004000,
224 PRINTER_ATTRIBUTE_TS = 0x00008000
225 } spoolss_PrinterAttributes;
228 PRINTER_STATUS_PAUSED = 0x00000001,
229 PRINTER_STATUS_ERROR = 0x00000002,
230 PRINTER_STATUS_PENDING_DELETION = 0x00000004,
231 PRINTER_STATUS_PAPER_JAM = 0x00000008,
232 PRINTER_STATUS_PAPER_OUT = 0x00000010,
233 PRINTER_STATUS_MANUAL_FEED = 0x00000020,
234 PRINTER_STATUS_PAPER_PROBLEM = 0x00000040,
235 PRINTER_STATUS_OFFLINE = 0x00000080,
236 PRINTER_STATUS_IO_ACTIVE = 0x00000100,
237 PRINTER_STATUS_BUSY = 0x00000200,
238 PRINTER_STATUS_PRINTING = 0x00000400,
239 PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800,
240 PRINTER_STATUS_NOT_AVAILABLE = 0x00001000,
241 PRINTER_STATUS_WAITING = 0x00002000,
242 PRINTER_STATUS_PROCESSING = 0x00004000,
243 PRINTER_STATUS_INITIALIZING = 0x00008000,
244 PRINTER_STATUS_WARMING_UP = 0x00010000,
245 PRINTER_STATUS_TONER_LOW = 0x00020000,
246 PRINTER_STATUS_NO_TONER = 0x00040000,
247 PRINTER_STATUS_PAGE_PUNT = 0x00080000,
248 PRINTER_STATUS_USER_INTERVENTION= 0x00100000,
249 PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000,
250 PRINTER_STATUS_DOOR_OPEN = 0x00400000,
251 PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000,
252 PRINTER_STATUS_POWER_SAVE = 0x01000000
253 } spoolss_PrinterStatus;
256 [relative] nstring *servername;
257 [relative] nstring *printername;
258 [relative] nstring *sharename;
259 [relative] nstring *portname;
260 [relative] nstring *drivername;
261 [relative] nstring *comment;
262 [relative] nstring *location;
263 [relative,subcontext(0)] spoolss_DeviceMode *devmode;
264 [relative] nstring *sepfile;
265 [relative] nstring *printprocessor;
266 [relative] nstring *datatype;
267 [relative] nstring *parameters;
268 [relative,subcontext(0)] security_descriptor *secdesc;
269 spoolss_PrinterAttributes attributes;
271 uint32 defaultpriority;
274 spoolss_PrinterStatus status;
277 } spoolss_PrinterInfo2;
280 [relative,subcontext(0)] security_descriptor *secdesc;
281 } spoolss_PrinterInfo3;
284 [relative] nstring *printername;
285 [relative] nstring *servername;
286 spoolss_PrinterAttributes attributes;
287 } spoolss_PrinterInfo4;
290 [relative] nstring *printername;
291 [relative] nstring *portname;
292 spoolss_PrinterAttributes attributes;
293 uint32 device_not_selected_timeout;
294 uint32 transmission_retry_timeout;
295 } spoolss_PrinterInfo5;
298 spoolss_PrinterStatus status;
299 } spoolss_PrinterInfo6;
302 DSPRINT_PUBLISH = 0x00000001,
303 DSPRINT_UPDATE = 0x00000002,
304 DSPRINT_UNPUBLISH = 0x00000004,
305 DSPRINT_REPUBLISH = 0x00000008,
306 DSPRINT_PENDING = 0x80000000
307 } spoolss_DsPrintAction;
310 [relative] nstring *guid; /* text form of printer guid */
311 spoolss_DsPrintAction action;
312 } spoolss_PrinterInfo7;
315 [relative,subcontext(0)] spoolss_DeviceMode *devmode;
316 } spoolss_DeviceModeInfo;
318 typedef [nodiscriminant,relative_base,public] union {
319 [case(0)] spoolss_PrinterInfo0 info0;
320 [case(1)] spoolss_PrinterInfo1 info1;
321 [case(2)] spoolss_PrinterInfo2 info2;
322 [case(3)] spoolss_PrinterInfo3 info3;
323 [case(4)] spoolss_PrinterInfo4 info4;
324 [case(5)] spoolss_PrinterInfo5 info5;
325 [case(6)] spoolss_PrinterInfo6 info6;
326 [case(7)] spoolss_PrinterInfo7 info7;
327 [case(8)] spoolss_DeviceModeInfo info8;
328 [case(9)] spoolss_DeviceModeInfo info9;
330 } spoolss_PrinterInfo;
334 /* we are using this as internal parsing code */
335 [public,noopnum,noprint] WERROR _spoolss_EnumPrinters(
336 [in] spoolss_EnumPrinterFlags flags,
337 [in,unique] [string,charset(UTF16)] uint16 *server,
339 [in,unique] DATA_BLOB *buffer,
341 [out,unique] DATA_BLOB *info,
342 [out,ref] uint32 *needed,
343 [out,ref] uint32 *count
345 [public,noopnum,noprint] void __spoolss_EnumPrinters(
348 [out,switch_is(level)] spoolss_PrinterInfo info[count]
350 [nopull,nopush] WERROR spoolss_EnumPrinters(
351 [in] spoolss_EnumPrinterFlags flags,
352 [in,unique] [string,charset(UTF16)] uint16 *server,
354 [in,unique] DATA_BLOB *buffer,
356 /* what we have here is a subcontext containing an array of no discriminant unions
357 * and the array has no size in front
359 [out,ref] uint32 *count,
360 [out,unique,switch_is(level),size_is(*count)] spoolss_PrinterInfo *info,
361 [out,ref] uint32 *needed
367 [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->iconv_convenience, ndr->flags))] uint32 _ndr_size;
368 [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
369 } spoolss_DevmodeContainer;
371 [public] WERROR spoolss_OpenPrinter(
372 [in,unique] [string,charset(UTF16)] uint16 *printername,
373 [in,unique] [string,charset(UTF16)] uint16 *datatype,
374 [in] spoolss_DevmodeContainer devmode_ctr,
375 [in] spoolss_AccessRights access_mask,
376 [out,ref] policy_handle *handle
382 /* JOB status codes. */
384 const int JOB_STATUS_QUEUED = 0x0000;
386 typedef [bitmap32bit] bitmap {
387 JOB_STATUS_PAUSED = 0x00000001,
388 JOB_STATUS_ERROR = 0x00000002,
389 JOB_STATUS_DELETING = 0x00000004,
390 JOB_STATUS_SPOOLING = 0x00000008,
391 JOB_STATUS_PRINTING = 0x00000010,
392 JOB_STATUS_OFFLINE = 0x00000020,
393 JOB_STATUS_PAPEROUT = 0x00000040,
394 JOB_STATUS_PRINTED = 0x00000080,
395 JOB_STATUS_DELETED = 0x00000100,
396 JOB_STATUS_BLOCKED_DEVQ = 0x00000200,
397 JOB_STATUS_USER_INTERVENTION = 0x00000400,
398 JOB_STATUS_RESTART = 0x00000800,
399 JOB_STATUS_COMPLETE = 0x00001000
404 [relative] nstring *printer_name;
405 [relative] nstring *server_name;
406 [relative] nstring *user_name;
407 [relative] nstring *document_name;
408 [relative] nstring *data_type;
409 [relative] nstring *text_status;
410 spoolss_JobStatus status;
414 uint32 pages_printed;
415 spoolss_Time submitted;
420 [relative] nstring *printer_name;
421 [relative] nstring *server_name;
422 [relative] nstring *user_name;
423 [relative] nstring *document_name;
424 [relative] nstring *notify_name;
425 [relative] nstring *data_type;
426 [relative] nstring *print_processor;
427 [relative] nstring *parameters;
428 [relative] nstring *driver_name;
429 [relative] spoolss_DeviceMode *devmode;
430 [relative] nstring *text_status;
431 [relative] security_descriptor *secdesc;
432 spoolss_JobStatus status;
439 spoolss_Time submitted;
441 uint32 pages_printed;
452 [relative] nstring *printer_name;
453 [relative] nstring *server_name;
454 [relative] nstring *user_name;
455 [relative] nstring *document_name;
456 [relative] nstring *notify_name;
457 [relative] nstring *data_type;
458 [relative] nstring *print_processor;
459 [relative] nstring *parameters;
460 [relative] nstring *driver_name;
461 [relative] spoolss_DeviceMode *devmode;
462 [relative] nstring *text_status;
463 [relative] security_descriptor *secdesc;
464 spoolss_JobStatus status;
471 spoolss_Time submitted;
473 uint32 pages_printed;
477 typedef [nodiscriminant,relative_base,public] union {
478 [case(1)] spoolss_JobInfo1 info1;
479 [case(2)] spoolss_JobInfo2 info2;
480 [case(3)] spoolss_JobInfo3 info3;
481 [case(4)] spoolss_JobInfo4 info4;
487 [string,charset(UTF16)] uint16 *printer_name;
488 [string,charset(UTF16)] uint16 *server_name;
489 [string,charset(UTF16)] uint16 *user_name;
490 [string,charset(UTF16)] uint16 *document_name;
491 [string,charset(UTF16)] uint16 *data_type;
492 [string,charset(UTF16)] uint16 *text_status;
493 spoolss_JobStatus status;
497 uint32 pages_printed;
498 spoolss_Time submitted;
499 } spoolss_SetJobInfo1;
503 [string,charset(UTF16)] uint16 *printer_name;
504 [string,charset(UTF16)] uint16 *server_name;
505 [string,charset(UTF16)] uint16 *user_name;
506 [string,charset(UTF16)] uint16 *document_name;
507 [string,charset(UTF16)] uint16 *notify_name;
508 [string,charset(UTF16)] uint16 *data_type;
509 [string,charset(UTF16)] uint16 *print_processor;
510 [string,charset(UTF16)] uint16 *parameters;
511 [string,charset(UTF16)] uint16 *driver_name;
512 spoolss_DeviceMode *devmode;
513 [string,charset(UTF16)] uint16 *text_status;
514 security_descriptor *secdesc;
515 spoolss_JobStatus status;
522 spoolss_Time submitted;
524 uint32 pages_printed;
525 } spoolss_SetJobInfo2;
529 [string,charset(UTF16)] uint16 *printer_name;
530 [string,charset(UTF16)] uint16 *server_name;
531 [string,charset(UTF16)] uint16 *user_name;
532 [string,charset(UTF16)] uint16 *document_name;
533 [string,charset(UTF16)] uint16 *notify_name;
534 [string,charset(UTF16)] uint16 *data_type;
535 [string,charset(UTF16)] uint16 *print_processor;
536 [string,charset(UTF16)] uint16 *parameters;
537 [string,charset(UTF16)] uint16 *driver_name;
538 spoolss_DeviceMode *devmode;
539 [string,charset(UTF16)] uint16 *text_status;
540 security_descriptor *secdesc;
541 spoolss_JobStatus status;
548 spoolss_Time submitted;
550 uint32 pages_printed;
552 } spoolss_SetJobInfo4;
554 typedef [public] union {
555 [case(1)] spoolss_SetJobInfo1 *info1;
556 [case(2)] spoolss_SetJobInfo2 *info2;
557 [case(3)] spoolss_JobInfo3 *info3;
558 [case(4)] spoolss_SetJobInfo4 *info4;
560 } spoolss_SetJobInfo;
564 [switch_is(level)] spoolss_SetJobInfo info;
565 } spoolss_JobInfoContainer;
567 typedef [v1_enum] enum {
568 SPOOLSS_JOB_CONTROL_PAUSE = 1,
569 SPOOLSS_JOB_CONTROL_RESUME = 2,
570 SPOOLSS_JOB_CONTROL_CANCEL = 3,
571 SPOOLSS_JOB_CONTROL_RESTART = 4,
572 SPOOLSS_JOB_CONTROL_DELETE = 5,
573 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER = 6,
574 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED = 7,
575 SPOOLSS_JOB_CONTROL_RETAIN = 8,
576 SPOOLSS_JOB_CONTROL_RELEASE = 9
577 } spoolss_JobControl;
579 WERROR spoolss_SetJob(
580 [in,ref] policy_handle *handle,
582 [in,unique] spoolss_JobInfoContainer *ctr,
583 [in] spoolss_JobControl command
588 WERROR spoolss_GetJob(
589 [in,ref] policy_handle *handle,
592 [in,unique] DATA_BLOB *buffer,
594 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
595 [out,ref] uint32 *needed
600 [public,noopnum,noprint] WERROR _spoolss_EnumJobs(
601 [in,ref] policy_handle *handle,
602 [in] uint32 firstjob,
605 [in,unique] DATA_BLOB *buffer,
607 [out,unique] DATA_BLOB *info,
608 [out,ref] uint32 *needed,
609 [out,ref] uint32 *count
611 [public,noopnum,noprint] void __spoolss_EnumJobs(
614 [out,switch_is(level)] spoolss_JobInfo info[count]
616 [nopull,nopush] WERROR spoolss_EnumJobs(
617 [in,ref] policy_handle *handle,
618 [in] uint32 firstjob,
621 [in,unique] DATA_BLOB *buffer,
623 [out,ref] uint32 *count,
624 [out,unique,switch_is(level),size_is(*count)] spoolss_JobInfo *info,
625 [out,ref] uint32 *needed
630 [todo] WERROR spoolss_AddPrinter(
631 /* This function is not implemented in Samba 3 as no
632 clients have been observed using it. */
637 WERROR spoolss_DeletePrinter(
638 [in] policy_handle *handle
643 typedef [v1_enum] enum {
644 SPOOLSS_PRINTER_CONTROL_UNPAUSE = 0,
645 SPOOLSS_PRINTER_CONTROL_PAUSE = 1,
646 SPOOLSS_PRINTER_CONTROL_RESUME = 2,
647 SPOOLSS_PRINTER_CONTROL_PURGE = 3,
648 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
649 } spoolss_PrinterControl;
652 [string,charset(UTF16)] uint16 *servername;
653 [string,charset(UTF16)] uint16 *printername;
658 uint32 global_counter;
664 uint32 session_counter;
665 uint32 num_error_out_of_paper;
666 uint32 num_error_not_ready;
668 uint32 number_of_processors;
669 spoolss_ProcessorType processor_type;
670 uint32 high_part_total_bytes;
674 uint32 enumerate_network_printers;
676 spoolss_ProcessorArchitecture processor_architecture;
677 uint16 processor_level;
681 } spoolss_SetPrinterInfo0;
684 spoolss_EnumPrinterFlags flags;
685 [string,charset(UTF16)] uint16 *name;
686 [string,charset(UTF16)] uint16 *description;
687 [string,charset(UTF16)] uint16 *comment;
688 } spoolss_SetPrinterInfo1;
691 [string,charset(UTF16)] uint16 *servername;
692 [string,charset(UTF16)] uint16 *printername;
693 [string,charset(UTF16)] uint16 *sharename;
694 [string,charset(UTF16)] uint16 *portname;
695 [string,charset(UTF16)] uint16 *drivername;
696 [string,charset(UTF16)] uint16 *comment;
697 [string,charset(UTF16)] uint16 *location;
698 [subcontext(0)] spoolss_DeviceMode *devmode;
699 [string,charset(UTF16)] uint16 *sepfile;
700 [string,charset(UTF16)] uint16 *printprocessor;
701 [string,charset(UTF16)] uint16 *datatype;
702 [string,charset(UTF16)] uint16 *parameters;
703 [subcontext(0)] security_descriptor *secdesc;
704 spoolss_PrinterAttributes attributes;
706 uint32 defaultpriority;
709 spoolss_PrinterStatus status;
712 } spoolss_SetPrinterInfo2;
716 } spoolss_SetPrinterInfo3;
719 [string,charset(UTF16)] uint16 *printername;
720 [string,charset(UTF16)] uint16 *servername;
721 spoolss_PrinterAttributes attributes;
722 } spoolss_SetPrinterInfo4;
725 [string,charset(UTF16)] uint16 *printername;
726 [string,charset(UTF16)] uint16 *portname;
727 spoolss_PrinterAttributes attributes;
728 uint32 device_not_selected_timeout;
729 uint32 transmission_retry_timeout;
730 } spoolss_SetPrinterInfo5;
733 spoolss_PrinterStatus status;
734 } spoolss_SetPrinterInfo6;
737 [string,charset(UTF16)] uint16 *guid; /* text form of printer guid */
738 spoolss_DsPrintAction action;
739 } spoolss_SetPrinterInfo7;
741 typedef [switch_type(uint32)] union {
742 [case(0)] spoolss_SetPrinterInfo0 *info0;
743 [case(1)] spoolss_SetPrinterInfo1 *info1;
744 [case(2)] spoolss_SetPrinterInfo2 *info2;
745 [case(3)] spoolss_SetPrinterInfo3 *info3;
746 [case(4)] spoolss_SetPrinterInfo4 *info4;
747 [case(5)] spoolss_SetPrinterInfo5 *info5;
748 [case(6)] spoolss_SetPrinterInfo6 *info6;
749 [case(7)] spoolss_SetPrinterInfo7 *info7;
750 [case(8)] spoolss_DeviceModeInfo *info8;
751 [case(9)] spoolss_DeviceModeInfo *info9;
753 } spoolss_SetPrinterInfo;
757 [switch_is(level)] spoolss_SetPrinterInfo info;
758 } spoolss_SetPrinterInfoCtr;
760 WERROR spoolss_SetPrinter(
761 [in,ref] policy_handle *handle,
762 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
763 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
764 [in,ref] sec_desc_buf *secdesc_ctr,
765 [in] spoolss_PrinterControl command
770 [public] WERROR spoolss_GetPrinter(
771 [in,ref] policy_handle *handle,
773 [in,unique] DATA_BLOB *buffer,
775 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
776 [out,ref] uint32 *needed
782 typedef [public] struct {
783 [value((ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags)-4)/2)] uint32 _ndr_size;
784 /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array string;
785 } spoolss_StringArray;
788 [string,charset(UTF16)] uint16 *driver_name;
789 } spoolss_AddDriverInfo1;
791 typedef [v1_enum,public] enum {
792 SPOOLSS_DRIVER_VERSION_9X = 0,
793 SPOOLSS_DRIVER_VERSION_NT35 = 1,
794 SPOOLSS_DRIVER_VERSION_NT4 = 2,
795 SPOOLSS_DRIVER_VERSION_200X = 3
796 } spoolss_DriverOSVersion;
799 spoolss_DriverOSVersion version;
800 [string,charset(UTF16)] uint16 *driver_name;
801 [string,charset(UTF16)] uint16 *architecture;
802 [string,charset(UTF16)] uint16 *driver_path;
803 [string,charset(UTF16)] uint16 *data_file;
804 [string,charset(UTF16)] uint16 *config_file;
805 } spoolss_AddDriverInfo2;
808 spoolss_DriverOSVersion version;
809 [string,charset(UTF16)] uint16 *driver_name;
810 [string,charset(UTF16)] uint16 *architecture;
811 [string,charset(UTF16)] uint16 *driver_path;
812 [string,charset(UTF16)] uint16 *data_file;
813 [string,charset(UTF16)] uint16 *config_file;
814 [string,charset(UTF16)] uint16 *help_file;
815 [string,charset(UTF16)] uint16 *monitor_name;
816 [string,charset(UTF16)] uint16 *default_datatype;
817 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
818 spoolss_StringArray *dependent_files;
819 } spoolss_AddDriverInfo3;
822 spoolss_DriverOSVersion version;
823 [string,charset(UTF16)] uint16 *driver_name;
824 [string,charset(UTF16)] uint16 *architecture;
825 [string,charset(UTF16)] uint16 *driver_path;
826 [string,charset(UTF16)] uint16 *data_file;
827 [string,charset(UTF16)] uint16 *config_file;
828 [string,charset(UTF16)] uint16 *help_file;
829 [string,charset(UTF16)] uint16 *monitor_name;
830 [string,charset(UTF16)] uint16 *default_datatype;
831 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
832 spoolss_StringArray *dependent_files;
833 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
834 spoolss_StringArray *previous_names;
835 } spoolss_AddDriverInfo4;
838 spoolss_DriverOSVersion version;
839 [string,charset(UTF16)] uint16 *driver_name;
840 [string,charset(UTF16)] uint16 *architecture;
841 [string,charset(UTF16)] uint16 *driver_path;
842 [string,charset(UTF16)] uint16 *data_file;
843 [string,charset(UTF16)] uint16 *config_file;
844 uint32 driver_attributes;
845 uint32 config_version;
846 uint32 driver_version;
847 } spoolss_AddDriverInfo5;
850 spoolss_DriverOSVersion version;
851 [string,charset(UTF16)] uint16 *driver_name;
852 [string,charset(UTF16)] uint16 *architecture;
853 [string,charset(UTF16)] uint16 *driver_path;
854 [string,charset(UTF16)] uint16 *data_file;
855 [string,charset(UTF16)] uint16 *config_file;
856 [string,charset(UTF16)] uint16 *help_file;
857 [string,charset(UTF16)] uint16 *monitor_name;
858 [string,charset(UTF16)] uint16 *default_datatype;
859 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
860 spoolss_StringArray *dependent_files;
861 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
862 spoolss_StringArray *previous_names;
864 hyper driver_version;
865 [string,charset(UTF16)] uint16 *manufacturer_name;
866 [string,charset(UTF16)] uint16 *manufacturer_url;
867 [string,charset(UTF16)] uint16 *hardware_id;
868 [string,charset(UTF16)] uint16 *provider;
869 } spoolss_AddDriverInfo6;
872 spoolss_DriverOSVersion version;
873 [string,charset(UTF16)] uint16 *driver_name;
874 [string,charset(UTF16)] uint16 *architecture;
875 [string,charset(UTF16)] uint16 *driver_path;
876 [string,charset(UTF16)] uint16 *data_file;
877 [string,charset(UTF16)] uint16 *config_file;
878 [string,charset(UTF16)] uint16 *help_file;
879 [string,charset(UTF16)] uint16 *monitor_name;
880 [string,charset(UTF16)] uint16 *default_datatype;
881 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
882 spoolss_StringArray *dependent_files;
883 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
884 spoolss_StringArray *previous_names;
886 hyper driver_version;
887 [string,charset(UTF16)] uint16 *manufacturer_name;
888 [string,charset(UTF16)] uint16 *manufacturer_url;
889 [string,charset(UTF16)] uint16 *hardware_id;
890 [string,charset(UTF16)] uint16 *provider;
891 [string,charset(UTF16)] uint16 *print_processor;
892 [string,charset(UTF16)] uint16 *vendor_setup;
893 [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
894 spoolss_StringArray *color_profiles;
895 [string,charset(UTF16)] uint16 *inf_path;
896 uint32 printer_driver_attributes;
897 [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
898 spoolss_StringArray *core_driver_dependencies;
899 NTTIME min_inbox_driver_ver_date;
900 hyper min_inbox_driver_ver_version;
901 } spoolss_AddDriverInfo8;
903 typedef [switch_type(uint32)] union {
904 [case(1)] spoolss_AddDriverInfo1 *info1;
905 [case(2)] spoolss_AddDriverInfo2 *info2;
906 [case(3)] spoolss_AddDriverInfo3 *info3;
907 [case(4)] spoolss_AddDriverInfo4 *info4;
908 [case(6)] spoolss_AddDriverInfo6 *info6;
909 [case(8)] spoolss_AddDriverInfo8 *info8;
910 } spoolss_AddDriverInfo;
914 [switch_is(level)] spoolss_AddDriverInfo info;
915 } spoolss_AddDriverInfoCtr;
917 WERROR spoolss_AddPrinterDriver(
918 [in,unique] [string,charset(UTF16)] uint16 *servername,
919 [in,ref] spoolss_AddDriverInfoCtr *info_ctr
922 typedef [public,gensize] struct {
923 [relative] nstring *driver_name;
924 } spoolss_DriverInfo1;
926 typedef [public,gensize] struct {
927 spoolss_DriverOSVersion version;
928 [relative] nstring *driver_name;
929 [relative] nstring *architecture;
930 [relative] nstring *driver_path;
931 [relative] nstring *data_file;
932 [relative] nstring *config_file;
933 } spoolss_DriverInfo2;
935 typedef [public,gensize] struct {
936 spoolss_DriverOSVersion version;
937 [relative] nstring *driver_name;
938 [relative] nstring *architecture;
939 [relative] nstring *driver_path;
940 [relative] nstring *data_file;
941 [relative] nstring *config_file;
942 [relative] nstring *help_file;
943 [relative] nstring_array *dependent_files;
944 [relative] nstring *monitor_name;
945 [relative] nstring *default_datatype;
946 } spoolss_DriverInfo3;
948 typedef [public,gensize] struct {
949 spoolss_DriverOSVersion version;
950 [relative] nstring *driver_name;
951 [relative] nstring *architecture;
952 [relative] nstring *driver_path;
953 [relative] nstring *data_file;
954 [relative] nstring *config_file;
955 [relative] nstring *help_file;
956 [relative] nstring_array *dependent_files;
957 [relative] nstring *monitor_name;
958 [relative] nstring *default_datatype;
959 [relative] nstring_array *previous_names;
960 } spoolss_DriverInfo4;
962 typedef [public,gensize] struct {
963 spoolss_DriverOSVersion version;
964 [relative] nstring *driver_name;
965 [relative] nstring *architecture;
966 [relative] nstring *driver_path;
967 [relative] nstring *data_file;
968 [relative] nstring *config_file;
969 uint32 driver_attributes;
970 uint32 config_version;
971 uint32 driver_version;
972 } spoolss_DriverInfo5;
974 typedef [public,gensize] struct {
975 spoolss_DriverOSVersion version;
976 [relative] nstring *driver_name;
977 [relative] nstring *architecture;
978 [relative] nstring *driver_path;
979 [relative] nstring *data_file;
980 [relative] nstring *config_file;
981 [relative] nstring *help_file;
982 [relative] nstring_array *dependent_files;
983 [relative] nstring *monitor_name;
984 [relative] nstring *default_datatype;
985 [relative] nstring_array *previous_names;
987 hyper driver_version;
988 [relative] nstring *manufacturer_name;
989 [relative] nstring *manufacturer_url;
990 [relative] nstring *hardware_id;
991 [relative] nstring *provider;
992 } spoolss_DriverInfo6;
994 typedef [public,gensize] struct {
995 spoolss_DriverOSVersion version;
996 [relative] nstring *driver_name;
997 [relative] nstring *architecture;
998 [relative] nstring *driver_path;
999 [relative] nstring *data_file;
1000 [relative] nstring *config_file;
1001 [relative] nstring *help_file;
1002 [relative] nstring *monitor_name;
1003 [relative] nstring *default_datatype;
1004 [relative] nstring_array *dependent_files;
1005 [relative] nstring_array *previous_names;
1007 hyper driver_version;
1008 [relative] nstring *manufacturer_name;
1009 [relative] nstring *manufacturer_url;
1010 [relative] nstring *hardware_id;
1011 [relative] nstring *provider;
1012 [relative] nstring *print_processor;
1013 [relative] nstring *vendor_setup;
1014 [relative] nstring_array *color_profiles;
1015 [relative] nstring *inf_path;
1016 uint32 printer_driver_attributes;
1017 [relative] nstring_array *core_driver_dependencies;
1018 NTTIME min_inbox_driver_ver_date;
1019 hyper min_inbox_driver_ver_version;
1020 } spoolss_DriverInfo8;
1022 typedef [v1_enum] enum {
1023 SPOOLSS_DRIVER_FILE_TYPE_RENDERING = 0x00000000,
1024 SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION = 0x00000001,
1025 SPOOLSS_DRIVER_FILE_TYPE_DATA = 0x00000002,
1026 SPOOLSS_DRIVER_FILE_TYPE_HELP = 0x00000003,
1027 SPOOLSS_DRIVER_FILE_TYPE_OTHER = 0x00000004
1028 } spoolss_DriverFileType;
1030 typedef [public] struct {
1031 [relative] nstring *file_name;
1032 spoolss_DriverFileType file_type;
1033 uint32 file_version;
1034 } spoolss_DriverFileInfo;
1036 typedef [public,gensize,nopush,nopull] struct {
1037 spoolss_DriverOSVersion version;
1038 [relative] nstring *driver_name;
1039 [relative] nstring *architecture;
1040 [relative] [size_is(file_count)] spoolss_DriverFileInfo *file_info;
1042 [relative] nstring *monitor_name;
1043 [relative] nstring *default_datatype;
1044 [relative] nstring_array *previous_names;
1046 hyper driver_version;
1047 [relative] nstring *manufacturer_name;
1048 [relative] nstring *manufacturer_url;
1049 [relative] nstring *hardware_id;
1050 [relative] nstring *provider;
1051 } spoolss_DriverInfo101;
1053 typedef [nodiscriminant,relative_base,public] union {
1054 [case(1)] spoolss_DriverInfo1 info1;
1055 [case(2)] spoolss_DriverInfo2 info2;
1056 [case(3)] spoolss_DriverInfo3 info3;
1057 [case(4)] spoolss_DriverInfo4 info4;
1058 [case(5)] spoolss_DriverInfo5 info5;
1059 [case(6)] spoolss_DriverInfo6 info6;
1060 [case(8)] spoolss_DriverInfo8 info8;
1061 [case(101)] spoolss_DriverInfo101 info101;
1063 } spoolss_DriverInfo;
1065 /******************/
1066 /* Function: 0x0a */
1067 [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
1068 [in,unique] [string,charset(UTF16)] uint16 *server,
1069 [in,unique] [string,charset(UTF16)] uint16 *environment,
1071 [in,unique] DATA_BLOB *buffer,
1072 [in] uint32 offered,
1073 [out,unique] DATA_BLOB *info,
1074 [out,ref] uint32 *needed,
1075 [out,ref] uint32 *count
1077 [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
1080 [out,switch_is(level)] spoolss_DriverInfo info[count]
1082 [nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
1083 [in,unique] [string,charset(UTF16)] uint16 *server,
1084 [in,unique] [string,charset(UTF16)] uint16 *environment,
1086 [in,unique] DATA_BLOB *buffer,
1087 [in] uint32 offered,
1088 [out,ref] uint32 *count,
1089 [out,unique,switch_is(level),size_is(*count)] spoolss_DriverInfo *info,
1090 [out,ref] uint32 *needed
1093 /******************/
1094 /* Function: 0x0b */
1095 [todo] WERROR spoolss_GetPrinterDriver(
1098 /******************/
1099 /* Function: 0x0c */
1100 typedef [public,gensize] struct {
1101 nstring directory_name;
1102 } spoolss_DriverDirectoryInfo1;
1104 /* NOTE: it's seems that w2k3 completly ignores the level
1107 typedef [nodiscriminant,relative_base,gensize,public] union {
1108 [case(1)] spoolss_DriverDirectoryInfo1 info1;
1109 [default] spoolss_DriverDirectoryInfo1 info1;
1110 } spoolss_DriverDirectoryInfo;
1112 [public] WERROR spoolss_GetPrinterDriverDirectory(
1113 [in,unique] [string,charset(UTF16)] uint16 *server,
1114 [in,unique] [string,charset(UTF16)] uint16 *environment,
1116 [in,unique] DATA_BLOB *buffer,
1117 [in] uint32 offered,
1118 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
1119 [out,ref] uint32 *needed
1122 /******************/
1123 /* Function: 0x0d */
1124 WERROR spoolss_DeletePrinterDriver(
1125 [in,unique] [string,charset(UTF16)] uint16 *server,
1126 [in] [string,charset(UTF16)] uint16 architecture[],
1127 [in] [string,charset(UTF16)] uint16 driver[]
1130 /******************/
1131 /* Function: 0x0e */
1132 WERROR spoolss_AddPrintProcessor(
1133 [in,unique] [string,charset(UTF16)] uint16 *server,
1134 [in] [string,charset(UTF16)] uint16 architecture[],
1135 [in] [string,charset(UTF16)] uint16 path_name[],
1136 [in] [string,charset(UTF16)] uint16 print_processor_name[]
1139 /******************/
1140 /* Function: 0x0f */
1142 [relative] nstring *print_processor_name;
1143 } spoolss_PrintProcessorInfo1;
1145 typedef [nodiscriminant,relative_base,public] union {
1146 [case(1)] spoolss_PrintProcessorInfo1 info1;
1148 } spoolss_PrintProcessorInfo;
1150 [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
1151 [in,unique] [string,charset(UTF16)] uint16 *servername,
1152 [in,unique] [string,charset(UTF16)] uint16 *environment,
1154 [in,unique] DATA_BLOB *buffer,
1155 [in] uint32 offered,
1156 [out,unique] DATA_BLOB *info,
1157 [out,ref] uint32 *needed,
1158 [out,ref] uint32 *count
1160 [public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
1163 [out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
1165 [nopull,nopush] WERROR spoolss_EnumPrintProcessors(
1166 [in,unique] [string,charset(UTF16)] uint16 *servername,
1167 [in,unique] [string,charset(UTF16)] uint16 *environment,
1169 [in,unique] DATA_BLOB *buffer,
1170 [in] uint32 offered,
1171 [out,ref] uint32 *count,
1172 [out,unique,switch_is(level),size_is(*count)] spoolss_PrintProcessorInfo *info,
1173 [out,ref] uint32 *needed
1176 /******************/
1177 /* Function: 0x10 */
1178 typedef [public,gensize] struct {
1179 nstring directory_name;
1180 } spoolss_PrintProcessorDirectoryInfo1;
1182 typedef [nodiscriminant,relative_base,gensize,public] union {
1183 [case(1)] spoolss_PrintProcessorDirectoryInfo1 info1;
1184 [default] spoolss_PrintProcessorDirectoryInfo1 info1;
1185 } spoolss_PrintProcessorDirectoryInfo;
1187 WERROR spoolss_GetPrintProcessorDirectory(
1188 [in,unique] [string,charset(UTF16)] uint16 *server,
1189 [in,unique] [string,charset(UTF16)] uint16 *environment,
1191 [in,unique] DATA_BLOB *buffer,
1192 [in] uint32 offered,
1193 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrintProcessorDirectoryInfo *info,
1194 [out,ref] uint32 *needed
1197 /******************/
1198 /* Function: 0x11 */
1200 [string,charset(UTF16)] uint16 *document_name;
1201 [string,charset(UTF16)] uint16 *output_file;
1202 [string,charset(UTF16)] uint16 *datatype;
1203 } spoolss_DocumentInfo1;
1205 typedef [switch_type(uint32)] union {
1206 [case(1)] spoolss_DocumentInfo1 *info1;
1207 [case(2)]; /* TODO */
1208 [case(3)]; /* TODO */
1210 } spoolss_DocumentInfo;
1212 WERROR spoolss_StartDocPrinter(
1213 [in,ref] policy_handle *handle,
1215 [in,switch_is(level)] spoolss_DocumentInfo info,
1216 [out,ref] uint32 *job_id
1219 /******************/
1220 /* Function: 0x12 */
1221 WERROR spoolss_StartPagePrinter(
1222 [in,ref] policy_handle *handle
1225 /******************/
1226 /* Function: 0x13 */
1227 WERROR spoolss_WritePrinter(
1228 [in,ref] policy_handle *handle,
1229 [in] DATA_BLOB data,
1230 [in,value(r->in.data.length)] uint32 _data_size,
1231 [out,ref] uint32 *num_written
1234 /******************/
1235 /* Function: 0x14 */
1236 WERROR spoolss_EndPagePrinter(
1237 [in,ref] policy_handle *handle
1240 /******************/
1241 /* Function: 0x15 */
1242 WERROR spoolss_AbortPrinter(
1243 [in,ref] policy_handle *handle
1246 /******************/
1247 /* Function: 0x16 */
1248 WERROR spoolss_ReadPrinter(
1249 [in,ref] policy_handle *handle,
1250 [out,ref] [size_is(data_size)] uint8 *data,
1251 [in] uint32 data_size,
1252 [out,ref] uint32 *_data_size
1255 /******************/
1256 /* Function: 0x17 */
1257 WERROR spoolss_EndDocPrinter(
1258 [in,ref] policy_handle *handle
1261 /******************/
1262 /* Function: 0x18 */
1263 WERROR spoolss_AddJob(
1264 [in,ref] policy_handle *handle,
1266 [in,out,unique] [size_is(offered)] uint8 *buffer,
1267 [in] uint32 offered,
1268 [out,ref] uint32 *needed
1271 /******************/
1272 /* Function: 0x19 */
1273 WERROR spoolss_ScheduleJob(
1274 [in,ref] policy_handle *handle,
1278 /******************/
1279 /* Function: 0x1a */
1280 const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86";
1281 const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool";
1283 typedef [public,gensize] struct {
1284 [value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
1288 [value(2)] uint32 unknown;
1289 [subcontext(0),subcontext_size(256)] nstring extra_string;
1290 } spoolss_OSVersion;
1292 typedef [public,gensize] struct {
1293 [value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
1297 [value(2)] uint32 unknown1;
1298 [subcontext(0),subcontext_size(256)] nstring extra_string;
1299 uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/
1300 uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */
1301 } spoolss_OSVersionEx;
1303 typedef [v1_enum] enum {
1304 SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
1305 SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
1306 SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3,
1307 SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4,
1308 SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7
1309 } spoolss_PrinterDataType;
1311 typedef [nodiscriminant,public,gensize] union {
1312 [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
1313 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
1314 [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
1315 [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
1316 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array;
1317 [default,flag(NDR_REMAINING)] DATA_BLOB data;
1318 } spoolss_PrinterData;
1320 [noopnum,noprint,public] WERROR _spoolss_GetPrinterData(
1321 [in,ref] policy_handle *handle,
1322 [in] [string,charset(UTF16)] uint16 value_name[],
1323 [in] uint32 offered,
1324 [out,ref] spoolss_PrinterDataType *type,
1325 [out] DATA_BLOB data,
1326 [out,ref] uint32 *needed
1328 [noopnum,noprint,public] void __spoolss_GetPrinterData(
1329 [in] spoolss_PrinterDataType type,
1330 [out,switch_is(type)] spoolss_PrinterData data
1332 [nopull,nopush,public] WERROR spoolss_GetPrinterData(
1333 [in,ref] policy_handle *handle,
1334 [in] [string,charset(UTF16)] uint16 value_name[],
1335 [in] uint32 offered,
1336 [out,ref] spoolss_PrinterDataType *type,
1337 [out,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData data,
1338 [out,ref] uint32 *needed
1341 /******************/
1342 /* Function: 0x1b */
1343 [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData(
1344 [in,ref] policy_handle *handle,
1345 [in] [string,charset(UTF16)] uint16 value_name[],
1346 [in] spoolss_PrinterDataType type,
1347 [in] DATA_BLOB data,
1348 [in] uint32 _offered
1350 [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
1351 [in] spoolss_PrinterDataType type,
1352 [out,switch_is(type)] spoolss_PrinterData data
1354 [nopush] WERROR spoolss_SetPrinterData(
1355 [in,ref] policy_handle *handle,
1356 [in] [string,charset(UTF16)] uint16 value_name[],
1357 [in] spoolss_PrinterDataType type,
1358 [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
1359 [in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
1362 /******************/
1363 /* Function: 0x1c */
1364 [todo] WERROR spoolss_WaitForPrinterChange(
1367 /******************/
1368 /* Function: 0x1d */
1369 [public] WERROR spoolss_ClosePrinter(
1370 [in,out,ref] policy_handle *handle
1373 /******************/
1374 /* Function: 0x1e */
1375 typedef [v1_enum] enum {
1376 SPOOLSS_FORM_USER = 0,
1377 SPOOLSS_FORM_BUILTIN = 1,
1378 SPOOLSS_FORM_PRINTER = 2
1379 } spoolss_FormFlags;
1394 spoolss_FormFlags flags;
1395 [relative] nstring *form_name;
1396 spoolss_FormSize size;
1397 spoolss_FormArea area;
1398 } spoolss_FormInfo1;
1400 typedef [bitmap32bit] bitmap {
1401 SPOOLSS_FORM_STRING_TYPE_NONE = 0x00000001,
1402 SPOOLSS_FORM_STRING_TYPE_MUI_DLL = 0x00000002,
1403 SPOOLSS_FORM_STRING_TYPE_LANG_PAIR = 0x00000004
1404 } spoolss_FormStringType;
1407 spoolss_FormFlags flags;
1408 [relative] nstring *form_name;
1409 spoolss_FormSize size;
1410 spoolss_FormArea area;
1411 [relative] astring *keyword;
1412 spoolss_FormStringType string_type;
1413 [relative] nstring *mui_dll;
1414 uint32 ressource_id;
1415 [relative] nstring *display_name;
1417 } spoolss_FormInfo2;
1419 typedef [nodiscriminant,relative_base,public,gensize] union {
1420 [case(1)] spoolss_FormInfo1 info1;
1421 [case(2)] spoolss_FormInfo2 info2;
1426 spoolss_FormFlags flags;
1427 [string,charset(UTF16)] uint16 *form_name;
1428 spoolss_FormSize size;
1429 spoolss_FormArea area;
1430 } spoolss_AddFormInfo1;
1433 spoolss_FormFlags flags;
1434 [string,charset(UTF16)] uint16 *form_name;
1435 spoolss_FormSize size;
1436 spoolss_FormArea area;
1437 [string,charset(DOS)] uint8 *keyword;
1438 spoolss_FormStringType string_type;
1439 [string,charset(UTF16)] uint16 *mui_dll;
1440 uint32 ressource_id;
1441 [string,charset(UTF16)] uint16 *display_name;
1443 } spoolss_AddFormInfo2;
1445 typedef [switch_type(uint32)] union {
1446 [case(1)] spoolss_AddFormInfo1 *info1;
1447 [case(2)] spoolss_AddFormInfo2 *info2;
1448 } spoolss_AddFormInfo;
1450 WERROR spoolss_AddForm(
1451 [in,ref] policy_handle *handle,
1453 [in,switch_is(level)] spoolss_AddFormInfo info
1456 /******************/
1457 /* Function: 0x1f */
1458 WERROR spoolss_DeleteForm(
1459 [in,ref] policy_handle *handle,
1460 [in] [string,charset(UTF16)] uint16 form_name[]
1463 /******************/
1464 /* Function: 0x20 */
1465 WERROR spoolss_GetForm(
1466 [in,ref] policy_handle *handle,
1467 [in] [string,charset(UTF16)] uint16 form_name[],
1469 [in,unique] DATA_BLOB *buffer,
1470 [in] uint32 offered,
1471 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
1472 [out,ref] uint32 *needed
1475 /******************/
1476 /* Function: 0x21 */
1477 WERROR spoolss_SetForm(
1478 [in,ref] policy_handle *handle,
1479 [in] [string,charset(UTF16)] uint16 form_name[],
1481 [in,switch_is(level)] spoolss_AddFormInfo info
1484 /******************/
1485 /* Function: 0x22 */
1486 [public,noopnum,noprint] WERROR _spoolss_EnumForms(
1487 [in,ref] policy_handle *handle,
1489 [in,unique] DATA_BLOB *buffer,
1490 [in] uint32 offered,
1491 [out,unique] DATA_BLOB *info,
1492 [out,ref] uint32 *needed,
1493 [out,ref] uint32 *count
1495 [public,noopnum,noprint] void __spoolss_EnumForms(
1498 [out,switch_is(level)] spoolss_FormInfo info[count]
1500 [nopull,nopush] WERROR spoolss_EnumForms(
1501 [in,ref] policy_handle *handle,
1503 [in,unique] DATA_BLOB *buffer,
1504 [in] uint32 offered,
1505 [out,ref] uint32 *count,
1506 [out,unique,switch_is(level),size_is(*count)] spoolss_FormInfo *info,
1507 [out,ref] uint32 *needed
1511 [relative] nstring *port_name;
1512 } spoolss_PortInfo1;
1515 SPOOLSS_PORT_TYPE_WRITE = 0x00000001,
1516 SPOOLSS_PORT_TYPE_READ = 0x00000002,
1517 SPOOLSS_PORT_TYPE_REDIRECTED = 0x00000004,
1518 SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008
1522 [relative] nstring *port_name;
1523 [relative] nstring *monitor_name;
1524 [relative] nstring *description;
1525 spoolss_PortType port_type;
1527 } spoolss_PortInfo2;
1529 typedef [v1_enum] enum {
1530 PORT_STATUS_CLEAR = 0x00000000,
1531 PORT_STATUS_OFFLINE = 0x00000001,
1532 PORT_STATUS_PAPER_JAM = 0x00000002,
1533 PORT_STATUS_PAPER_OUT = 0x00000003,
1534 PORT_STATUS_OUTPUT_BIN_FULL = 0x00000004,
1535 PORT_STATUS_PAPER_PROBLEM = 0x00000005,
1536 PORT_STATUS_NO_TONER = 0x00000006,
1537 PORT_STATUS_DOOR_OPEN = 0x00000007,
1538 PORT_STATUS_USER_INTERVENTION = 0x00000008,
1539 PORT_STATUS_OUT_OF_MEMORY = 0x00000009,
1540 PORT_STATUS_TONER_LOW = 0x0000000A,
1541 PORT_STATUS_WARMING_UP = 0x0000000B,
1542 PORT_STATUS_POWER_SAVE = 0x0000000C
1543 } spoolss_PortStatus;
1545 typedef [v1_enum] enum {
1546 PORT_STATUS_TYPE_ERROR = 0x00000001,
1547 PORT_STATUS_TYPE_WARNING = 0x00000002,
1548 PORT_STATUS_TYPE_INFO = 0x00000003
1549 } spoolss_PortSeverity;
1552 spoolss_PortStatus status;
1553 [relative] nstring *status_string;
1554 spoolss_PortSeverity severity;
1555 } spoolss_PortInfo3;
1558 [relative] nstring *port_name;
1559 DATA_BLOB monitor_data; /* relative ?? */
1560 } spoolss_PortInfoFF;
1562 typedef [nodiscriminant,relative_base,public] union {
1563 [case(1)] spoolss_PortInfo1 info1;
1564 [case(2)] spoolss_PortInfo2 info2;
1565 [case(3)] spoolss_PortInfo3 info3;
1566 [case(0xff)] spoolss_PortInfoFF infoFF;
1570 /******************/
1571 /* Function: 0x23 */
1572 [public,noopnum,noprint] WERROR _spoolss_EnumPorts(
1573 [in,unique] [string,charset(UTF16)] uint16 *servername,
1575 [in,unique] DATA_BLOB *buffer,
1576 [in] uint32 offered,
1577 [out,unique] DATA_BLOB *info,
1578 [out,ref] uint32 *needed,
1579 [out,ref] uint32 *count
1581 [public,noopnum,noprint] void __spoolss_EnumPorts(
1584 [out,switch_is(level)] spoolss_PortInfo info[count]
1586 [nopull,nopush] WERROR spoolss_EnumPorts(
1587 [in,unique] [string,charset(UTF16)] uint16 *servername,
1589 [in,unique] DATA_BLOB *buffer,
1590 [in] uint32 offered,
1591 [out,ref] uint32 *count,
1592 [out,unique,switch_is(level),size_is(*count)] spoolss_PortInfo *info,
1593 [out,ref] uint32 *needed
1596 /******************/
1597 /* Function: 0x24 */
1599 [relative] nstring *monitor_name;
1600 } spoolss_MonitorInfo1;
1603 [relative] nstring *monitor_name;
1604 [relative] nstring *environment;
1605 [relative] nstring *dll_name;
1606 } spoolss_MonitorInfo2;
1608 typedef [nodiscriminant,relative_base,public] union {
1609 [case(1)] spoolss_MonitorInfo1 info1;
1610 [case(2)] spoolss_MonitorInfo2 info2;
1612 } spoolss_MonitorInfo;
1614 [public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
1615 [in,unique] [string,charset(UTF16)] uint16 *servername,
1617 [in,unique] DATA_BLOB *buffer,
1618 [in] uint32 offered,
1619 [out,unique] DATA_BLOB *info,
1620 [out,ref] uint32 *needed,
1621 [out,ref] uint32 *count
1623 [public,noopnum,noprint] void __spoolss_EnumMonitors(
1626 [out,switch_is(level)] spoolss_MonitorInfo info[count]
1628 [nopull,nopush] WERROR spoolss_EnumMonitors(
1629 [in,unique] [string,charset(UTF16)] uint16 *servername,
1631 [in,unique] DATA_BLOB *buffer,
1632 [in] uint32 offered,
1633 [out,ref] uint32 *count,
1634 [out,unique,switch_is(level),size_is(*count)] spoolss_MonitorInfo *info,
1635 [out,ref] uint32 *needed
1638 /******************/
1639 /* Function: 0x25 */
1640 WERROR spoolss_AddPort(
1641 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1642 [in] uint32 unknown,
1643 [in] [string,charset(UTF16)] uint16 monitor_name[]
1646 /******************/
1647 /* Function: 0x26 */
1648 [todo] WERROR spoolss_ConfigurePort(
1651 /******************/
1652 /* Function: 0x27 */
1653 [todo] WERROR spoolss_DeletePort(
1656 /******************/
1657 /* Function: 0x28 */
1658 [todo] WERROR spoolss_CreatePrinterIC(
1661 /******************/
1662 /* Function: 0x29 */
1663 [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC(
1666 /******************/
1667 /* Function: 0x2a */
1668 [todo] WERROR spoolss_DeletePrinterIC(
1671 /******************/
1672 /* Function: 0x2b */
1673 [todo] WERROR spoolss_AddPrinterConnection(
1676 /******************/
1677 /* Function: 0x2c */
1678 [todo] WERROR spoolss_DeletePrinterConnection(
1681 /******************/
1682 /* Function: 0x2d */
1683 [todo] WERROR spoolss_PrinterMessageBox(
1684 /* Marked as obsolete in MSDN. "Not necessary and has
1688 /******************/
1689 /* Function: 0x2e */
1690 [todo] WERROR spoolss_AddMonitor(
1693 /******************/
1694 /* Function: 0x2f */
1695 [todo] WERROR spoolss_DeleteMonitor(
1698 /******************/
1699 /* Function: 0x30 */
1700 [todo] WERROR spoolss_DeletePrintProcessor(
1703 /******************/
1704 /* Function: 0x31 */
1705 [todo] WERROR spoolss_AddPrintProvidor(
1708 /******************/
1709 /* Function: 0x32 */
1710 [todo] WERROR spoolss_DeletePrintProvidor(
1713 /******************/
1714 /* Function: 0x33 */
1715 [todo] WERROR spoolss_EnumPrintProcDataTypes(
1718 /******************/
1719 /* Function: 0x34 */
1720 WERROR spoolss_ResetPrinter(
1721 [in,ref] policy_handle *handle,
1722 [in,unique] [string,charset(UTF16)] uint16 *data_type,
1723 [in,ref] spoolss_DevmodeContainer *devmode_ctr
1726 /******************/
1727 /* Function: 0x35 */
1728 WERROR spoolss_GetPrinterDriver2(
1729 [in,ref] policy_handle *handle,
1730 [in,unique] [string,charset(UTF16)] uint16 *architecture,
1732 [in,unique] DATA_BLOB *buffer,
1733 [in] uint32 offered,
1734 [in] uint32 client_major_version,
1735 [in] uint32 client_minor_version,
1736 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverInfo *info,
1737 [out,ref] uint32 *needed,
1738 [out,ref] uint32 *server_major_version,
1739 [out,ref] uint32 *server_minor_version
1742 /******************/
1743 /* Function: 0x36 */
1744 [todo] WERROR spoolss_FindFirstPrinterChangeNotification(
1747 /******************/
1748 /* Function: 0x37 */
1749 [todo] WERROR spoolss_FindNextPrinterChangeNotification(
1752 /******************/
1753 /* Function: 0x38 */
1754 [public] WERROR spoolss_FindClosePrinterNotify(
1755 [in,ref] policy_handle *handle
1758 /******************/
1759 /* Function: 0x39 */
1760 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
1763 /******************/
1764 /* Function: 0x3a */
1765 [public] WERROR spoolss_ReplyOpenPrinter(
1766 [in,string,charset(UTF16)] uint16 server_name[],
1767 [in] uint32 printer_local,
1768 [in] winreg_Type type,
1769 [in,range(0,512)] uint32 bufsize,
1770 [in,unique,size_is(bufsize)] uint8 *buffer,
1771 [out,ref] policy_handle *handle
1774 /******************/
1775 /* Function: 0x3b */
1777 typedef [bitmap32bit] bitmap {
1778 PRINTER_CHANGE_ADD_PRINTER = 0x00000001,
1779 PRINTER_CHANGE_SET_PRINTER = 0x00000002,
1780 PRINTER_CHANGE_DELETE_PRINTER = 0x00000004,
1781 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008,
1782 PRINTER_CHANGE_ADD_JOB = 0x00000100,
1783 PRINTER_CHANGE_SET_JOB = 0x00000200,
1784 PRINTER_CHANGE_DELETE_JOB = 0x00000400,
1785 PRINTER_CHANGE_WRITE_JOB = 0x00000800,
1786 PRINTER_CHANGE_ADD_FORM = 0x00010000,
1787 PRINTER_CHANGE_SET_FORM = 0x00020000,
1788 PRINTER_CHANGE_DELETE_FORM = 0x00040000,
1789 PRINTER_CHANGE_ADD_PORT = 0x00100000,
1790 PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000,
1791 PRINTER_CHANGE_DELETE_PORT = 0x00400000,
1792 PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000,
1793 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000,
1794 PRINTER_CHANGE_SERVER = 0x08000000,
1795 PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000,
1796 PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000,
1797 PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000,
1798 PRINTER_CHANGE_TIMEOUT = 0x80000000
1799 } spoolss_PrinterChangeFlags;
1801 const int PRINTER_CHANGE_PRINTER = 0x000000FF;
1803 const int PRINTER_CHANGE_JOB = 0x0000FF00;
1805 const int PRINTER_CHANGE_FORM = (PRINTER_CHANGE_ADD_FORM |
1806 PRINTER_CHANGE_SET_FORM |
1807 PRINTER_CHANGE_DELETE_FORM); /* 0x00070000 */
1809 const int PRINTER_CHANGE_PORT = (PRINTER_CHANGE_ADD_PORT |
1810 PRINTER_CHANGE_CONFIGURE_PORT |
1811 PRINTER_CHANGE_DELETE_PORT); /* 0x00700000 */
1813 const int PRINTER_CHANGE_PRINT_PROCESSOR = 0x07000000;
1815 const int PRINTER_CHANGE_PRINTER_DRIVER = (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
1816 PRINTER_CHANGE_SET_PRINTER_DRIVER |
1817 PRINTER_CHANGE_DELETE_PRINTER_DRIVER); /* 0x70000000 */
1819 const int PRINTER_CHANGE_ALL = (PRINTER_CHANGE_PRINTER |
1820 PRINTER_CHANGE_JOB |
1821 PRINTER_CHANGE_FORM |
1822 PRINTER_CHANGE_PORT |
1823 PRINTER_CHANGE_PRINT_PROCESSOR |
1824 PRINTER_CHANGE_PRINTER_DRIVER); /* 0x7777FFFF */
1825 WERROR spoolss_RouterReplyPrinter(
1826 [in,ref] policy_handle *handle,
1827 [in] spoolss_PrinterChangeFlags flags,
1828 [in,range(0,512)] uint32 bufsize,
1829 [in,unique,size_is(bufsize)] uint8 *buffer
1832 /******************/
1833 /* Function: 0x3c */
1834 [public] WERROR spoolss_ReplyClosePrinter(
1835 [in,out,ref] policy_handle *handle
1838 /******************/
1839 /* Function: 0x3d */
1840 [todo] WERROR spoolss_AddPortEx(
1843 /******************/
1844 /* Function: 0x3e */
1845 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification(
1848 /******************/
1849 /* Function: 0x3f */
1850 [todo] WERROR spoolss_SpoolerInit(
1853 /******************/
1854 /* Function: 0x40 */
1855 [todo] WERROR spoolss_ResetPrinterEx(
1858 typedef [enum16bit] enum {
1859 SPOOLSS_FIELD_SERVER_NAME = 0,
1860 SPOOLSS_FIELD_PRINTER_NAME = 1,
1861 SPOOLSS_FIELD_SHARE_NAME = 2,
1862 SPOOLSS_FIELD_PORT_NAME = 3,
1863 SPOOLSS_FIELD_DRIVER_NAME = 4,
1864 SPOOLSS_FIELD_COMMENT = 5,
1865 SPOOLSS_FIELD_LOCATION = 6,
1866 SPOOLSS_FIELD_DEVMODE = 7,
1867 SPOOLSS_FIELD_SEPFILE = 8,
1868 SPOOLSS_FIELD_PRINT_PROCESSOR = 9,
1869 SPOOLSS_FIELD_PARAMETERS = 10,
1870 SPOOLSS_FIELD_DATATYPE = 11,
1871 SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12,
1872 SPOOLSS_FIELD_ATTRIBUTES = 13,
1873 SPOOLSS_FIELD_PRIORITY = 14,
1874 SPOOLSS_FIELD_DEFAULT_PRIORITY = 15,
1875 SPOOLSS_FIELD_START_TIME = 16,
1876 SPOOLSS_FIELD_UNTIL_TIME = 17,
1877 SPOOLSS_FIELD_STATUS = 18,
1878 SPOOLSS_FIELD_STATUS_STRING = 19,
1879 SPOOLSS_FIELD_CJOBS = 20,
1880 SPOOLSS_FIELD_AVERAGE_PPM = 21,
1881 SPOOLSS_FIELD_TOTAL_PAGES = 22,
1882 SPOOLSS_FIELD_PAGES_PRINTED = 23,
1883 SPOOLSS_FIELD_TOTAL_BYTES = 24,
1884 SPOOLSS_FIELD_BYTES_PRINTED = 25
1887 typedef [enum16bit] enum {
1888 SPOOLSS_NOTIFY_PRINTER = 0,
1889 SPOOLSS_NOTIFY_JOB = 1
1890 } spoolss_NotifyType;
1892 /******************/
1893 /* Function: 0x41 */
1895 spoolss_NotifyType type;
1900 [size_is(count)] spoolss_Field *fields;
1901 } spoolss_NotifyOptionType;
1903 typedef [bitmap32bit] bitmap {
1904 PRINTER_NOTIFY_OPTIONS_REFRESH = 0x00000001
1905 } spoolssNotifyOptionFlags;
1908 [value(2)] uint32 version;
1909 spoolssNotifyOptionFlags flags;
1911 [size_is(count)] spoolss_NotifyOptionType *types;
1912 } spoolss_NotifyOption;
1914 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
1915 [in,ref] policy_handle *handle,
1916 [in] spoolss_PrinterChangeFlags flags,
1917 [in] uint32 options,
1918 [in,unique] [string,charset(UTF16)] uint16 *local_machine,
1919 [in] uint32 printer_local,
1920 [in,unique] spoolss_NotifyOption *notify_options
1923 /******************/
1924 /* Function: 0x42 */
1928 [size_is(size/2),unique,charset(UTF16)] uint16 *string;
1929 } spoolss_NotifyString;
1931 typedef [v1_enum] enum {
1932 NOTIFY_TABLE_DWORD = 0x0001,
1933 NOTIFY_TABLE_STRING = 0x0002,
1934 NOTIFY_TABLE_DEVMODE = 0x0003,
1935 NOTIFY_TABLE_TIME = 0x0004,
1936 NOTIFY_TABLE_SECURITYDESCRIPTOR = 0x0005
1937 } spoolss_NotifyTable;
1939 typedef [switch_type(uint32)] union {
1940 [case(1)] uint32 integer[2];
1941 [case(2)] spoolss_NotifyString string;
1942 [case(3)] spoolss_DevmodeContainer devmode;
1943 [case(4)] spoolss_TimeCtr time;
1944 [case(5)] sec_desc_buf sd;
1945 } spoolss_NotifyData;
1948 spoolss_NotifyType type;
1949 spoolss_Field field;
1950 spoolss_NotifyTable variable_type;
1952 [switch_is(variable_type)] spoolss_NotifyData data;
1956 [value(2)] uint32 version;
1959 [size_is(count)] spoolss_Notify notifies[];
1960 } spoolss_NotifyInfo;
1962 typedef [switch_type(uint32)] union {
1963 [case(0)] spoolss_NotifyInfo *info0;
1964 } spoolss_ReplyPrinterInfo;
1966 typedef [bitmap32bit] bitmap {
1967 PRINTER_NOTIFY_INFO_DISCARDED = 0x00000001,
1968 PRINTER_NOTIFY_INFO_DISCARDNOTED = 0x00010000,
1969 PRINTER_NOTIFY_INFO_COLOR_MISMATCH = 0x00080000
1970 } spoolss_PrinterNotifyFlags;
1972 WERROR spoolss_RouterReplyPrinterEx(
1973 [in,ref] policy_handle *handle,
1975 [in] spoolss_PrinterChangeFlags flags,
1976 [out,ref] spoolss_PrinterNotifyFlags *reply_result,
1977 [in] uint32 reply_type,
1978 [in,switch_is(reply_type)] spoolss_ReplyPrinterInfo info
1981 /******************/
1982 /* Function: 0x43 */
1983 [public] WERROR spoolss_RouterRefreshPrinterChangeNotify(
1984 [in,ref] policy_handle *handle,
1985 [in] uint32 change_low,
1986 [in,unique] spoolss_NotifyOption *options,
1987 [out,ref] spoolss_NotifyInfo **info
1990 /******************/
1991 /* Function: 0x44 */
1992 [todo] WERROR spoolss_44(
1997 [string,charset(UTF16)] uint16 *client;
1998 [string,charset(UTF16)] uint16 *user;
2000 spoolss_MajorVersion major;
2001 spoolss_MinorVersion minor;
2002 spoolss_ProcessorArchitecture processor;
2003 } spoolss_UserLevel1;
2007 } spoolss_UserLevel2;
2013 [string,charset(UTF16)] uint16 *client;
2014 [string,charset(UTF16)] uint16 *user;
2016 spoolss_MajorVersion major;
2017 spoolss_MinorVersion minor;
2018 spoolss_ProcessorArchitecture processor;
2020 } spoolss_UserLevel3;
2022 typedef [switch_type(uint32)] union {
2023 [case(1)] spoolss_UserLevel1 *level1;
2024 [case(2)] spoolss_UserLevel2 *level2;
2025 [case(3)] spoolss_UserLevel3 *level3;
2026 } spoolss_UserLevel;
2030 [switch_is(level)] spoolss_UserLevel user_info;
2031 } spoolss_UserLevelCtr;
2034 SERVER_ACCESS_ADMINISTER = 0x00000001,
2035 SERVER_ACCESS_ENUMERATE = 0x00000002,
2036 PRINTER_ACCESS_ADMINISTER = 0x00000004,
2037 PRINTER_ACCESS_USE = 0x00000008,
2038 JOB_ACCESS_ADMINISTER = 0x00000010,
2039 JOB_ACCESS_READ = 0x00000020
2040 } spoolss_AccessRights;
2042 /* Access rights for print servers */
2043 const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED |
2044 SERVER_ACCESS_ADMINISTER |
2045 SERVER_ACCESS_ENUMERATE;
2047 const int SERVER_READ = SEC_STD_READ_CONTROL |
2048 SERVER_ACCESS_ENUMERATE;
2050 const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
2051 SERVER_ACCESS_ADMINISTER |
2052 SERVER_ACCESS_ENUMERATE;
2054 const int SERVER_EXECUTE = SEC_STD_READ_CONTROL |
2055 SERVER_ACCESS_ENUMERATE;
2057 /* Access rights for printers */
2058 const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED |
2059 PRINTER_ACCESS_ADMINISTER |
2062 const int PRINTER_READ = SEC_STD_READ_CONTROL |
2065 const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
2068 const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL |
2071 /* Access rights for jobs */
2072 const int JOB_ALL_ACCESS = SEC_STD_REQUIRED |
2073 JOB_ACCESS_ADMINISTER;
2075 const int JOB_READ = SEC_STD_READ_CONTROL |
2076 JOB_ACCESS_ADMINISTER;
2078 const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
2079 JOB_ACCESS_ADMINISTER;
2081 const int JOB_EXECUTE = SEC_STD_READ_CONTROL |
2082 JOB_ACCESS_ADMINISTER;
2084 /* ACE masks for various print permissions */
2085 const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL |
2088 const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL |
2089 READ_CONTROL_ACCESS;
2091 const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS |
2092 READ_CONTROL_ACCESS |
2095 /******************/
2096 /* Function: 0x45 */
2097 [public] WERROR spoolss_OpenPrinterEx(
2098 [in,unique] [string,charset(UTF16)] uint16 *printername,
2099 [in,unique] [string,charset(UTF16)] uint16 *datatype,
2100 [in] spoolss_DevmodeContainer devmode_ctr,
2101 [in] spoolss_AccessRights access_mask,
2103 [in,switch_is(level)] spoolss_UserLevel userlevel,
2104 [out,ref] policy_handle *handle
2107 /******************/
2108 /* Function: 0x46 */
2109 WERROR spoolss_AddPrinterEx(
2110 [in,unique] [string,charset(UTF16)] uint16 *server,
2111 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
2112 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
2113 [in,ref] sec_desc_buf *secdesc_ctr,
2114 [in,ref] spoolss_UserLevelCtr *userlevel_ctr,
2115 [out,ref] policy_handle *handle
2118 /******************/
2119 /* Function: 0x47 */
2120 [todo] WERROR spoolss_47(
2123 /******************/
2124 /* Function: 0x48 */
2125 WERROR spoolss_EnumPrinterData(
2126 [in,ref] policy_handle *handle,
2127 [in] uint32 enum_index,
2128 [out,size_is(value_offered/2),charset(UTF16)] uint16 value_name[],
2129 [in] uint32 value_offered,
2130 [out,ref] uint32 *value_needed,
2131 [out,ref] uint32 *printerdata_type,
2132 [out,ref] DATA_BLOB *buffer,
2133 [in] uint32 data_offered,
2134 [out,ref] uint32 *data_needed
2137 /******************/
2138 /* Function: 0x49 */
2139 WERROR spoolss_DeletePrinterData(
2140 [in,ref] policy_handle *handle,
2141 [in] [string,charset(UTF16)] uint16 value_name[]
2144 /******************/
2145 /* Function: 0x4a */
2146 [todo] WERROR spoolss_4a(
2149 /******************/
2150 /* Function: 0x4b */
2151 [todo] WERROR spoolss_4b(
2154 /******************/
2155 /* Function: 0x4c */
2156 [todo] WERROR spoolss_4c(
2159 /******************/
2160 /* Function: 0x4d */
2161 WERROR spoolss_SetPrinterDataEx(
2162 [in,ref] policy_handle *handle,
2163 [in] [string,charset(UTF16)] uint16 key_name[],
2164 [in] [string,charset(UTF16)] uint16 value_name[],
2166 [in,ref] [size_is(offered)] uint8 *buffer,
2170 /******************/
2171 /* Function: 0x4e */
2172 WERROR spoolss_GetPrinterDataEx(
2173 [in,ref] policy_handle *handle,
2174 [in] [string,charset(UTF16)] uint16 key_name[],
2175 [in] [string,charset(UTF16)] uint16 value_name[],
2176 [out,ref] uint32 *type,
2177 [out,ref] [size_is(offered)] uint8 *buffer,
2178 [in] uint32 offered,
2179 [out,ref] uint32 *needed
2182 /******************/
2183 /* Function: 0x4f */
2184 [public] WERROR spoolss_EnumPrinterDataEx(
2185 [in,ref] policy_handle *handle,
2186 [in] [string,charset(UTF16)] uint16 key_name[],
2187 [out,ref] [size_is(offered)] uint8 *buffer,
2188 [in] uint32 offered,
2189 [out,ref] uint32 *needed,
2190 [out,ref] uint32 *count
2193 /******************/
2194 /* Function: 0x50 */
2195 [public] WERROR spoolss_EnumPrinterKey(
2196 [in, ref] policy_handle *handle,
2197 [in] [string,charset(UTF16)] uint16 key_name[],
2198 [out,ref] [size_is(key_buffer_size/2)] uint16 *key_buffer,
2199 [in] uint32 key_buffer_size,
2200 [out,ref] uint32 *needed
2203 /******************/
2204 /* Function: 0x51 */
2205 WERROR spoolss_DeletePrinterDataEx(
2206 [in,ref] policy_handle *handle,
2207 [in] [string,charset(UTF16)] uint16 key_name[],
2208 [in] [string,charset(UTF16)] uint16 value_name[]
2211 /******************/
2212 /* Function: 0x52 */
2213 WERROR spoolss_DeletePrinterKey(
2214 [in,ref] policy_handle *handle,
2215 [in] [string,charset(UTF16)] uint16 key_name[]
2218 /******************/
2219 /* Function: 0x53 */
2220 [todo] WERROR spoolss_53(
2223 /******************/
2224 /* Function: 0x54 */
2225 typedef [public,bitmap32bit] bitmap {
2226 DPD_DELETE_UNUSED_FILES = 0x00000001,
2227 DPD_DELETE_SPECIFIC_VERSION = 0x00000002,
2228 DPD_DELETE_ALL_FILES = 0x00000004
2229 } spoolss_DeleteDriverFlags;
2231 WERROR spoolss_DeletePrinterDriverEx(
2232 [in,unique] [string,charset(UTF16)] uint16 *server,
2233 [in] [string,charset(UTF16)] uint16 architecture[],
2234 [in] [string,charset(UTF16)] uint16 driver[],
2235 [in] spoolss_DeleteDriverFlags delete_flags,
2239 /******************/
2240 /* Function: 0x55 */
2241 [todo] WERROR spoolss_55(
2244 /******************/
2245 /* Function: 0x56 */
2246 [todo] WERROR spoolss_56(
2249 /******************/
2250 /* Function: 0x57 */
2251 [todo] WERROR spoolss_57(
2254 /******************/
2255 /* Function: 0x58 */
2257 typedef [v1_enum] enum {
2258 PROTOCOL_RAWTCP_TYPE = 1,
2259 PROTOCOL_LPR_TYPE = 2
2260 } spoolss_PortProtocol;
2262 typedef [public] struct {
2263 [charset(UTF16)] uint16 portname[64];
2264 [value(0x00000001)] uint32 version;
2265 spoolss_PortProtocol protocol;
2266 [value(sizeof(r))] uint32 size;
2268 [charset(UTF16)] uint16 hostaddress[49];
2269 [charset(UTF16)] uint16 snmpcommunity[33];
2271 [charset(UTF16)] uint16 queue[33];
2272 [charset(UTF16)] uint16 ip_address[16]; /* s3 had 17 */
2273 [charset(UTF16)] uint16 hardware_address[13];
2274 [charset(UTF16)] uint16 device_type[257];
2276 boolean32 snmp_enabled;
2277 uint32 snmp_dev_index;
2278 } spoolss_PortData1;
2280 typedef [public] struct {
2281 [charset(UTF16)] uint16 portname[64];
2282 [value(0x00000002)] uint32 version;
2283 spoolss_PortProtocol protocol;
2284 [value(sizeof(r))] uint32 size;
2286 [charset(UTF16)] uint16 hostaddress[128];
2287 [charset(UTF16)] uint16 snmpcommunity[33];
2289 [charset(UTF16)] uint16 queue[33];
2290 [charset(UTF16)] uint16 device_type[257];
2292 boolean32 snmp_enabled;
2293 uint32 snmp_dev_index;
2294 uint32 port_monitor_mib_index;
2295 } spoolss_PortData2;
2297 typedef [public] struct {
2299 } spoolss_MonitorUi;
2301 WERROR spoolss_XcvData(
2302 [in,ref] policy_handle *handle,
2303 [in] [string,charset(UTF16)] uint16 function_name[],
2304 [in] DATA_BLOB in_data,
2305 [in,value(r->in.in_data.length)] uint32 _in_data_length,
2306 [out,ref] [size_is(out_data_size)] uint8 *out_data,
2307 [in] uint32 out_data_size,
2308 [out,ref] uint32 *needed,
2309 [in,out,ref] uint32 *status_code
2312 /******************/
2313 /* Function: 0x59 */
2315 typedef [bitmap32bit] bitmap {
2316 APD_STRICT_UPGRADE = 0x00000001,
2317 APD_STRICT_DOWNGRADE = 0x00000002,
2318 APD_COPY_ALL_FILES = 0x00000004,
2319 APD_COPY_NEW_FILES = 0x00000008,
2320 APD_COPY_FROM_DIRECTORY = 0x00000010,
2321 APD_DONT_COPY_FILES_TO_CLUSTER = 0x00001000,
2322 APD_COPY_TO_ALL_SPOOLERS = 0x00002000,
2323 APD_RETURN_BLOCKING_STATUS_CODE = 0x00010000
2324 } spoolss_AddPrinterDriverExFlags;
2326 [public] WERROR spoolss_AddPrinterDriverEx(
2327 [in,unique] [string,charset(UTF16)] uint16 *servername,
2328 [in,ref] spoolss_AddDriverInfoCtr *info_ctr,
2329 [in] spoolss_AddPrinterDriverExFlags flags
2332 /******************/
2333 /* Function: 0x5a */
2334 [todo] WERROR spoolss_5a(
2337 /******************/
2338 /* Function: 0x5b */
2339 [todo] WERROR spoolss_5b(
2342 /******************/
2343 /* Function: 0x5c */
2344 [todo] WERROR spoolss_5c(
2347 /******************/
2348 /* Function: 0x5d */
2349 [todo] WERROR spoolss_5d(
2352 /******************/
2353 /* Function: 0x5e */
2354 [todo] WERROR spoolss_5e(
2357 /******************/
2358 /* Function: 0x5f */
2359 [todo] WERROR spoolss_5f(