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;
29 [relative] nstring *printername;
30 [relative] nstring *servername;
35 uint32 global_counter;
41 uint32 session_counter;
43 uint32 printer_errors;
58 } spoolss_PrinterInfo0;
60 typedef [bitmap32bit] bitmap {
61 DEVMODE_ORIENTATION = 0x00000001,
62 DEVMODE_PAPERSIZE = 0x00000002,
63 DEVMODE_PAPERLENGTH = 0x00000004,
64 DEVMODE_PAPERWIDTH = 0x00000008,
65 DEVMODE_SCALE = 0x00000010,
66 DEVMODE_POSITION = 0x00000020,
67 DEVMODE_NUP = 0x00000040,
68 DEVMODE_COPIES = 0x00000100,
69 DEVMODE_DEFAULTSOURCE = 0x00000200,
70 DEVMODE_PRINTQUALITY = 0x00000400,
71 DEVMODE_COLOR = 0x00000800,
72 DEVMODE_DUPLEX = 0x00001000,
73 DEVMODE_YRESOLUTION = 0x00002000,
74 DEVMODE_TTOPTION = 0x00004000,
75 DEVMODE_COLLATE = 0x00008000,
76 DEVMODE_FORMNAME = 0x00010000,
77 DEVMODE_LOGPIXELS = 0x00020000,
78 DEVMODE_BITSPERPEL = 0x00040000,
79 DEVMODE_PELSWIDTH = 0x00080000,
80 DEVMODE_PELSHEIGHT = 0x00100000,
81 DEVMODE_DISPLAYFLAGS = 0x00200000,
82 DEVMODE_DISPLAYFREQUENCY = 0x00400000,
83 DEVMODE_ICMMETHOD = 0x00800000,
84 DEVMODE_ICMINTENT = 0x01000000,
85 DEVMODE_MEDIATYPE = 0x02000000,
86 DEVMODE_DITHERTYPE = 0x04000000,
87 DEVMODE_PANNINGWIDTH = 0x08000000,
88 DEVMODE_PANNINGHEIGHT = 0x10000000
89 } spoolss_DeviceModeFields;
91 typedef [public,gensize] struct {
92 [charset(UTF16)] uint16 devicename[32];
96 [value(r->driverextra_data.length)] uint16 __driverextra_length;
97 spoolss_DeviceModeFields fields;
104 uint16 defaultsource;
111 [charset(UTF16)] uint16 formname[32];
117 uint32 displayfrequency;
125 uint32 panningheight;
126 [subcontext_size(__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data;
127 } spoolss_DeviceMode;
129 typedef [public] bitmap {
130 PRINTER_ENUM_DEFAULT = 0x00000001,
131 PRINTER_ENUM_LOCAL = 0x00000002,
132 PRINTER_ENUM_CONNECTIONS = 0x00000004,
133 PRINTER_ENUM_FAVORITE = 0x00000004,
134 PRINTER_ENUM_NAME = 0x00000008,
135 PRINTER_ENUM_REMOTE = 0x00000010,
136 PRINTER_ENUM_SHARED = 0x00000020,
137 PRINTER_ENUM_NETWORK = 0x00000040,
138 PRINTER_ENUM_EXPAND = 0x00004000,
139 PRINTER_ENUM_CONTAINER = 0x00008000,
140 PRINTER_ENUM_ICON1 = 0x00010000,
141 PRINTER_ENUM_ICON2 = 0x00020000,
142 PRINTER_ENUM_ICON3 = 0x00040000,
143 PRINTER_ENUM_ICON4 = 0x00080000,
144 PRINTER_ENUM_ICON5 = 0x00100000,
145 PRINTER_ENUM_ICON6 = 0x00200000,
146 PRINTER_ENUM_ICON7 = 0x00400000,
147 PRINTER_ENUM_ICON8 = 0x00800000,
148 PRINTER_ENUM_HIDE = 0x01000000
149 } spoolss_EnumPrinterFlags;
151 const int PRINTER_ENUM_ICONMASK = (PRINTER_ENUM_ICON1 |
158 PRINTER_ENUM_ICON8); /* 0x00ff0000 */
161 spoolss_EnumPrinterFlags flags;
162 [relative] nstring *name;
163 [relative] nstring *description;
164 [relative] nstring *comment;
165 } spoolss_PrinterInfo1;
168 PRINTER_ATTRIBUTE_QUEUED = 0x00000001,
169 PRINTER_ATTRIBUTE_DIRECT = 0x00000002,
170 PRINTER_ATTRIBUTE_DEFAULT = 0x00000004,
171 PRINTER_ATTRIBUTE_SHARED = 0x00000008,
172 PRINTER_ATTRIBUTE_NETWORK = 0x00000010,
173 PRINTER_ATTRIBUTE_HIDDEN = 0x00000020,
174 PRINTER_ATTRIBUTE_LOCAL = 0x00000040,
175 PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080,
176 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100,
177 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200,
178 PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400,
179 PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800,
180 PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000,
181 PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000,
182 PRINTER_ATTRIBUTE_FAX = 0x00004000,
183 PRINTER_ATTRIBUTE_TS = 0x00008000
184 } spoolss_PrinterAttributes;
187 PRINTER_STATUS_PAUSED = 0x00000001,
188 PRINTER_STATUS_ERROR = 0x00000002,
189 PRINTER_STATUS_PENDING_DELETION = 0x00000004,
190 PRINTER_STATUS_PAPER_JAM = 0x00000008,
191 PRINTER_STATUS_PAPER_OUT = 0x00000010,
192 PRINTER_STATUS_MANUAL_FEED = 0x00000020,
193 PRINTER_STATUS_PAPER_PROBLEM = 0x00000040,
194 PRINTER_STATUS_OFFLINE = 0x00000080,
195 PRINTER_STATUS_IO_ACTIVE = 0x00000100,
196 PRINTER_STATUS_BUSY = 0x00000200,
197 PRINTER_STATUS_PRINTING = 0x00000400,
198 PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800,
199 PRINTER_STATUS_NOT_AVAILABLE = 0x00001000,
200 PRINTER_STATUS_WAITING = 0x00002000,
201 PRINTER_STATUS_PROCESSING = 0x00004000,
202 PRINTER_STATUS_INITIALIZING = 0x00008000,
203 PRINTER_STATUS_WARMING_UP = 0x00010000,
204 PRINTER_STATUS_TONER_LOW = 0x00020000,
205 PRINTER_STATUS_NO_TONER = 0x00040000,
206 PRINTER_STATUS_PAGE_PUNT = 0x00080000,
207 PRINTER_STATUS_USER_INTERVENTION= 0x00100000,
208 PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000,
209 PRINTER_STATUS_DOOR_OPEN = 0x00400000,
210 PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000,
211 PRINTER_STATUS_POWER_SAVE = 0x01000000
212 } spoolss_PrinterStatus;
215 [relative] nstring *servername;
216 [relative] nstring *printername;
217 [relative] nstring *sharename;
218 [relative] nstring *portname;
219 [relative] nstring *drivername;
220 [relative] nstring *comment;
221 [relative] nstring *location;
222 [relative,subcontext(0)] spoolss_DeviceMode *devmode;
223 [relative] nstring *sepfile;
224 [relative] nstring *printprocessor;
225 [relative] nstring *datatype;
226 [relative] nstring *parameters;
227 [relative,subcontext(0)] security_descriptor *secdesc;
228 spoolss_PrinterAttributes attributes;
230 uint32 defaultpriority;
233 spoolss_PrinterStatus status;
236 } spoolss_PrinterInfo2;
239 [relative,subcontext(0)] security_descriptor *secdesc;
240 } spoolss_PrinterInfo3;
243 [relative] nstring *printername;
244 [relative] nstring *servername;
245 spoolss_PrinterAttributes attributes;
246 } spoolss_PrinterInfo4;
249 [relative] nstring *printername;
250 [relative] nstring *portname;
251 spoolss_PrinterAttributes attributes;
252 uint32 device_not_selected_timeout;
253 uint32 transmission_retry_timeout;
254 } spoolss_PrinterInfo5;
257 spoolss_PrinterStatus status;
258 } spoolss_PrinterInfo6;
261 DSPRINT_PUBLISH = 0x00000001,
262 DSPRINT_UPDATE = 0x00000002,
263 DSPRINT_UNPUBLISH = 0x00000004,
264 DSPRINT_REPUBLISH = 0x00000008,
265 DSPRINT_PENDING = 0x80000000
266 } spoolss_DsPrintAction;
269 [relative] nstring *guid; /* text form of printer guid */
270 spoolss_DsPrintAction action;
271 } spoolss_PrinterInfo7;
274 [relative,subcontext(0)] spoolss_DeviceMode *devmode;
275 } spoolss_DeviceModeInfo;
277 typedef [nodiscriminant,relative_base,public] union {
278 [case(0)] spoolss_PrinterInfo0 info0;
279 [case(1)] spoolss_PrinterInfo1 info1;
280 [case(2)] spoolss_PrinterInfo2 info2;
281 [case(3)] spoolss_PrinterInfo3 info3;
282 [case(4)] spoolss_PrinterInfo4 info4;
283 [case(5)] spoolss_PrinterInfo5 info5;
284 [case(6)] spoolss_PrinterInfo6 info6;
285 [case(7)] spoolss_PrinterInfo7 info7;
286 [case(8)] spoolss_DeviceModeInfo info8;
287 [case(9)] spoolss_DeviceModeInfo info9;
289 } spoolss_PrinterInfo;
293 /* we are using this as internal parsing code */
294 [public,noopnum,noprint] WERROR _spoolss_EnumPrinters(
295 [in] spoolss_EnumPrinterFlags flags,
296 [in,unique] [string,charset(UTF16)] uint16 *server,
298 [in,unique] DATA_BLOB *buffer,
300 [out,unique] DATA_BLOB *info,
301 [out,ref] uint32 *needed,
304 [public,noopnum,noprint] void __spoolss_EnumPrinters(
307 [out,switch_is(level)] spoolss_PrinterInfo info[count]
309 [nopull,nopush] WERROR spoolss_EnumPrinters(
310 [in] spoolss_EnumPrinterFlags flags,
311 [in,unique] [string,charset(UTF16)] uint16 *server,
313 [in,unique] DATA_BLOB *buffer,
315 /* what we have here is a subcontext containing an array of no discriminant unions
316 * and the array has no size in front
318 [out,unique,switch_is(level),size_is(count)] spoolss_PrinterInfo *info,
319 [out,ref] uint32 *needed,
326 [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->iconv_convenience, ndr->flags))] uint32 _ndr_size;
327 [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode;
328 } spoolss_DevmodeContainer;
330 [public] WERROR spoolss_OpenPrinter(
331 [in,unique] [string,charset(UTF16)] uint16 *printername,
332 [in,unique] [string,charset(UTF16)] uint16 *datatype,
333 [in] spoolss_DevmodeContainer devmode_ctr,
334 [in] uint32 access_mask,
335 [out,ref] policy_handle *handle
342 [relative] nstring *printer_name;
343 [relative] nstring *server_name;
344 [relative] nstring *user_name;
345 [relative] nstring *document_name;
346 [relative] nstring *data_type;
347 [relative] nstring *text_status;
352 uint32 pages_printed;
356 typedef [nodiscriminant,relative_base,public] union {
357 [case(1)] spoolss_JobInfo1 info1;
358 [case(2)]; /* TODO */
359 [case(3)]; /* TODO */
365 [switch_is(level)] spoolss_JobInfo info;
366 } spoolss_JobInfoContainer;
368 typedef [v1_enum] enum {
369 SPOOLSS_JOB_CONTROL_PAUSE = 1,
370 SPOOLSS_JOB_CONTROL_RESUME = 2,
371 SPOOLSS_JOB_CONTROL_CANCEL = 3,
372 SPOOLSS_JOB_CONTROL_RESTART = 4,
373 SPOOLSS_JOB_CONTROL_DELETE = 5,
374 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER = 6,
375 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED = 7
376 } spoolss_JobControl;
378 WERROR spoolss_SetJob(
379 [in,ref] policy_handle *handle,
381 [in,unique] spoolss_JobInfoContainer *ctr,
382 [in] spoolss_JobControl command
387 WERROR spoolss_GetJob(
388 [in,ref] policy_handle *handle,
391 [in,unique] DATA_BLOB *buffer,
393 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
394 [out,ref] uint32 *needed
399 [public,noopnum,noprint] WERROR _spoolss_EnumJobs(
400 [in,ref] policy_handle *handle,
401 [in] uint32 firstjob,
404 [in,unique] DATA_BLOB *buffer,
406 [out,unique] DATA_BLOB *info,
407 [out,ref] uint32 *needed,
410 [public,noopnum,noprint] void __spoolss_EnumJobs(
413 [out,switch_is(level)] spoolss_JobInfo info[count]
415 [nopull,nopush] WERROR spoolss_EnumJobs(
416 [in,ref] policy_handle *handle,
417 [in] uint32 firstjob,
420 [in,unique] DATA_BLOB *buffer,
422 [out,unique,switch_is(level),size_is(count)] spoolss_JobInfo *info,
423 [out,ref] uint32 *needed,
429 [todo] WERROR spoolss_AddPrinter(
430 /* This function is not implemented in Samba 3 as no
431 clients have been observed using it. */
436 WERROR spoolss_DeletePrinter(
437 [in] policy_handle *handle
442 typedef [v1_enum] enum {
443 SPOOLSS_PRINTER_CONTROL_UNPAUSE = 0,
444 SPOOLSS_PRINTER_CONTROL_PAUSE = 1,
445 SPOOLSS_PRINTER_CONTROL_RESUME = 2,
446 SPOOLSS_PRINTER_CONTROL_PURGE = 3,
447 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
448 } spoolss_PrinterControl;
450 typedef [switch_type(uint32)] union {
451 [case(0)] spoolss_PrinterInfo0 *info0;
452 [case(1)] spoolss_PrinterInfo1 *info1;
453 [case(2)] spoolss_PrinterInfo2 *info2;
454 [case(3)] spoolss_PrinterInfo3 *info3;
455 [case(4)] spoolss_PrinterInfo4 *info4;
456 [case(5)] spoolss_PrinterInfo5 *info5;
457 [case(6)] spoolss_PrinterInfo6 *info6;
458 [case(7)] spoolss_PrinterInfo7 *info7;
459 [case(8)] spoolss_DeviceModeInfo *info8;
460 [case(9)] spoolss_DeviceModeInfo *info9;
462 } spoolss_SetPrinterInfo;
464 WERROR spoolss_SetPrinter(
465 [in,ref] policy_handle *handle,
467 [in,switch_is(level)] spoolss_SetPrinterInfo info,
468 [in] spoolss_DevmodeContainer devmode_ctr,
469 [in] sec_desc_buf secdesc_ctr,
470 [in] spoolss_PrinterControl command
475 [public] WERROR spoolss_GetPrinter(
476 [in,ref] policy_handle *handle,
478 [in,unique] DATA_BLOB *buffer,
480 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
481 [out,ref] uint32 *needed
487 typedef [public,gensize] struct {
488 [value((ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags)-4)/2)] uint32 _ndr_size;
489 /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array string;
490 } spoolss_StringArray;
493 [string,charset(UTF16)] uint16 *driver_name;
494 } spoolss_AddDriverInfo1;
496 typedef [v1_enum] enum {
497 SPOOLSS_DRIVER_VERSION_9X = 0,
498 SPOOLSS_DRIVER_VERSION_NT35 = 1,
499 SPOOLSS_DRIVER_VERSION_NT4 = 2,
500 SPOOLSS_DRIVER_VERSION_200X = 3
501 } spoolss_DriverOSVersion;
504 spoolss_DriverOSVersion version;
505 [string,charset(UTF16)] uint16 *driver_name;
506 [string,charset(UTF16)] uint16 *architecture;
507 [string,charset(UTF16)] uint16 *driver_path;
508 [string,charset(UTF16)] uint16 *data_file;
509 [string,charset(UTF16)] uint16 *config_file;
510 } spoolss_AddDriverInfo2;
513 spoolss_DriverOSVersion version;
514 [string,charset(UTF16)] uint16 *driver_name;
515 [string,charset(UTF16)] uint16 *architecture;
516 [string,charset(UTF16)] uint16 *driver_path;
517 [string,charset(UTF16)] uint16 *data_file;
518 [string,charset(UTF16)] uint16 *config_file;
519 [string,charset(UTF16)] uint16 *help_file;
520 [string,charset(UTF16)] uint16 *monitor_name;
521 [string,charset(UTF16)] uint16 *default_datatype;
522 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
523 spoolss_StringArray *dependent_files;
524 } spoolss_AddDriverInfo3;
527 spoolss_DriverOSVersion version;
528 [string,charset(UTF16)] uint16 *driver_name;
529 [string,charset(UTF16)] uint16 *architecture;
530 [string,charset(UTF16)] uint16 *driver_path;
531 [string,charset(UTF16)] uint16 *data_file;
532 [string,charset(UTF16)] uint16 *config_file;
533 [string,charset(UTF16)] uint16 *help_file;
534 [string,charset(UTF16)] uint16 *monitor_name;
535 [string,charset(UTF16)] uint16 *default_datatype;
536 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
537 spoolss_StringArray *dependent_files;
538 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
539 spoolss_StringArray *previous_names;
540 } spoolss_AddDriverInfo4;
543 spoolss_DriverOSVersion version;
544 [string,charset(UTF16)] uint16 *driver_name;
545 [string,charset(UTF16)] uint16 *architecture;
546 [string,charset(UTF16)] uint16 *driver_path;
547 [string,charset(UTF16)] uint16 *data_file;
548 [string,charset(UTF16)] uint16 *config_file;
549 uint32 driver_attributes;
550 uint32 config_version;
551 uint32 driver_version;
552 } spoolss_AddDriverInfo5;
555 spoolss_DriverOSVersion version;
556 [string,charset(UTF16)] uint16 *driver_name;
557 [string,charset(UTF16)] uint16 *architecture;
558 [string,charset(UTF16)] uint16 *driver_path;
559 [string,charset(UTF16)] uint16 *data_file;
560 [string,charset(UTF16)] uint16 *config_file;
561 [string,charset(UTF16)] uint16 *help_file;
562 [string,charset(UTF16)] uint16 *monitor_name;
563 [string,charset(UTF16)] uint16 *default_datatype;
564 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
565 spoolss_StringArray *dependent_files;
566 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
567 spoolss_StringArray *previous_names;
569 hyper driver_version;
570 [string,charset(UTF16)] uint16 *manufacturer_name;
571 [string,charset(UTF16)] uint16 *manufacturer_url;
572 [string,charset(UTF16)] uint16 *hardware_id;
573 [string,charset(UTF16)] uint16 *provider;
574 } spoolss_AddDriverInfo6;
576 typedef [switch_type(uint32)] union {
577 [case(1)] spoolss_AddDriverInfo1 *info1;
578 [case(2)] spoolss_AddDriverInfo2 *info2;
579 [case(3)] spoolss_AddDriverInfo3 *info3;
580 [case(4)] spoolss_AddDriverInfo4 *info4;
581 [case(6)] spoolss_AddDriverInfo6 *info6;
582 } spoolss_AddDriverInfo;
584 WERROR spoolss_AddPrinterDriver(
585 [in] [string,charset(UTF16)] uint16 *servername,
587 [in,switch_is(level)] spoolss_AddDriverInfo info
591 [relative] nstring *driver_name;
592 } spoolss_DriverInfo1;
595 spoolss_DriverOSVersion version;
596 [relative] nstring *driver_name;
597 [relative] nstring *architecture;
598 [relative] nstring *driver_path;
599 [relative] nstring *data_file;
600 [relative] nstring *config_file;
601 } spoolss_DriverInfo2;
604 spoolss_DriverOSVersion version;
605 [relative] nstring *driver_name;
606 [relative] nstring *architecture;
607 [relative] nstring *driver_path;
608 [relative] nstring *data_file;
609 [relative] nstring *config_file;
610 [relative] nstring *help_file;
611 [relative] nstring_array *dependent_files;
612 [relative] nstring *monitor_name;
613 [relative] nstring *default_datatype;
614 } spoolss_DriverInfo3;
617 spoolss_DriverOSVersion version;
618 [relative] nstring *driver_name;
619 [relative] nstring *architecture;
620 [relative] nstring *driver_path;
621 [relative] nstring *data_file;
622 [relative] nstring *config_file;
623 [relative] nstring *help_file;
624 [relative] nstring_array *dependent_files;
625 [relative] nstring *monitor_name;
626 [relative] nstring *default_datatype;
627 [relative] nstring_array *previous_names;
628 } spoolss_DriverInfo4;
631 spoolss_DriverOSVersion version;
632 [relative] nstring *driver_name;
633 [relative] nstring *architecture;
634 [relative] nstring *driver_path;
635 [relative] nstring *data_file;
636 [relative] nstring *config_file;
637 uint32 driver_attributes;
638 uint32 config_version;
639 uint32 driver_version;
640 } spoolss_DriverInfo5;
643 spoolss_DriverOSVersion version;
644 [relative] nstring *driver_name;
645 [relative] nstring *architecture;
646 [relative] nstring *driver_path;
647 [relative] nstring *data_file;
648 [relative] nstring *config_file;
649 [relative] nstring *help_file;
650 [relative] nstring_array *dependent_files;
651 [relative] nstring *monitor_name;
652 [relative] nstring *default_datatype;
653 [relative] nstring_array *previous_names;
655 hyper driver_version;
656 [relative] nstring *manufacturer_name;
657 [relative] nstring *manufacturer_url;
658 [relative] nstring *hardware_id;
659 [relative] nstring *provider;
660 } spoolss_DriverInfo6;
662 typedef [nodiscriminant,relative_base,public] union {
663 [case(1)] spoolss_DriverInfo1 info1;
664 [case(2)] spoolss_DriverInfo2 info2;
665 [case(3)] spoolss_DriverInfo3 info3;
666 [case(4)] spoolss_DriverInfo4 info4;
667 [case(5)] spoolss_DriverInfo5 info5;
668 [case(6)] spoolss_DriverInfo6 info6;
670 } spoolss_DriverInfo;
674 [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
675 [in,unique] [string,charset(UTF16)] uint16 *server,
676 [in,unique] [string,charset(UTF16)] uint16 *environment,
678 [in,unique] DATA_BLOB *buffer,
680 [out,unique] DATA_BLOB *info,
681 [out,ref] uint32 *needed,
684 [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
687 [out,switch_is(level)] spoolss_DriverInfo info[count]
689 [nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
690 [in,unique] [string,charset(UTF16)] uint16 *server,
691 [in,unique] [string,charset(UTF16)] uint16 *environment,
693 [in,unique] DATA_BLOB *buffer,
695 [out,unique,switch_is(level),size_is(count)] spoolss_DriverInfo *info,
696 [out,ref] uint32 *needed,
702 [todo] WERROR spoolss_GetPrinterDriver(
708 nstring directory_name;
709 } spoolss_DriverDirectoryInfo1;
711 /* NOTE: it's seems that w2k3 completly ignores the level
714 typedef [nodiscriminant,relative_base,gensize,public] union {
715 [case(1)] spoolss_DriverDirectoryInfo1 info1;
716 [default] spoolss_DriverDirectoryInfo1 info1;
717 } spoolss_DriverDirectoryInfo;
719 [public] WERROR spoolss_GetPrinterDriverDirectory(
720 [in,unique] [string,charset(UTF16)] uint16 *server,
721 [in,unique] [string,charset(UTF16)] uint16 *environment,
723 [in,unique] DATA_BLOB *buffer,
725 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
726 [out,ref] uint32 *needed
731 WERROR spoolss_DeletePrinterDriver(
732 [in,unique] [string,charset(UTF16)] uint16 *server,
733 [in] [string,charset(UTF16)] uint16 architecture[],
734 [in] [string,charset(UTF16)] uint16 driver[]
739 WERROR spoolss_AddPrintProcessor(
740 [in,unique] [string,charset(UTF16)] uint16 *server,
741 [in] [string,charset(UTF16)] uint16 architecture[],
742 [in] [string,charset(UTF16)] uint16 path_name[],
743 [in] [string,charset(UTF16)] uint16 print_processor_name[]
749 [relative] nstring *print_processor_name;
750 } spoolss_PrintProcessorInfo1;
752 typedef [nodiscriminant,relative_base,public] union {
753 [case(1)] spoolss_PrintProcessorInfo1 info1;
755 } spoolss_PrintProcessorInfo;
757 [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
758 [in,unique] [string,charset(UTF16)] uint16 *servername,
759 [in,unique] [string,charset(UTF16)] uint16 *environment,
761 [in,unique] DATA_BLOB *buffer,
763 [out,unique] DATA_BLOB *info,
764 [out,ref] uint32 *needed,
767 [public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
770 [out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
772 [nopull,nopush] WERROR spoolss_EnumPrintProcessors(
773 [in,unique] [string,charset(UTF16)] uint16 *servername,
774 [in,unique] [string,charset(UTF16)] uint16 *environment,
776 [in,unique] DATA_BLOB *buffer,
778 [out,unique,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info,
779 [out,ref] uint32 *needed,
785 [todo] WERROR spoolss_GetPrintProcessorDirectory(
791 [string,charset(UTF16)] uint16 *document_name;
792 [string,charset(UTF16)] uint16 *output_file;
793 [string,charset(UTF16)] uint16 *datatype;
794 } spoolss_DocumentInfo1;
796 typedef [switch_type(uint32)] union {
797 [case(1)] spoolss_DocumentInfo1 *info1;
798 [case(2)]; /* TODO */
799 [case(3)]; /* TODO */
801 } spoolss_DocumentInfo;
803 WERROR spoolss_StartDocPrinter(
804 [in,ref] policy_handle *handle,
806 [in,switch_is(level)] spoolss_DocumentInfo info,
807 [out,ref] uint32 *job_id
812 WERROR spoolss_StartPagePrinter(
813 [in,ref] policy_handle *handle
818 WERROR spoolss_WritePrinter(
819 [in,ref] policy_handle *handle,
821 [in,value(r->in.data.length)] uint32 _data_size,
822 [out,ref] uint32 *num_written
827 WERROR spoolss_EndPagePrinter(
828 [in,ref] policy_handle *handle
833 WERROR spoolss_AbortPrinter(
834 [in,ref] policy_handle *handle
839 WERROR spoolss_ReadPrinter(
840 [in,ref] policy_handle *handle,
841 [out,ref] [size_is(data_size)] uint8 *data,
842 [in] uint32 data_size,
843 [out,ref] uint32 *_data_size
848 WERROR spoolss_EndDocPrinter(
849 [in,ref] policy_handle *handle
854 WERROR spoolss_AddJob(
855 [in,ref] policy_handle *handle,
857 [in,out,unique] [size_is(offered)] uint8 *buffer,
859 [out,ref] uint32 *needed
864 WERROR spoolss_ScheduleJob(
865 [in,ref] policy_handle *handle,
871 const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86";
873 typedef [public,gensize] struct {
874 [value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
878 [value(2)] uint32 unknown;
879 [subcontext(0),subcontext_size(256)] nstring extra_string;
882 typedef [public,gensize] struct {
883 [value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
887 [value(2)] uint32 unknown1;
888 [subcontext(0),subcontext_size(256)] nstring extra_string;
889 uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/
890 uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */
891 } spoolss_OSVersionEx;
893 typedef [v1_enum] enum {
894 SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
895 SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
896 SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3,
897 SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4,
898 SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7
899 } spoolss_PrinterDataType;
901 typedef [nodiscriminant,public,gensize] union {
902 [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
903 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
904 [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
905 [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
906 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array;
907 [default,flag(NDR_REMAINING)] DATA_BLOB data;
908 } spoolss_PrinterData;
910 [noopnum,noprint,public] WERROR _spoolss_GetPrinterData(
911 [in,ref] policy_handle *handle,
912 [in] [string,charset(UTF16)] uint16 value_name[],
914 [out,ref] spoolss_PrinterDataType *type,
915 [out] DATA_BLOB data,
916 [out,ref] uint32 *needed
918 [noopnum,noprint,public] void __spoolss_GetPrinterData(
919 [in] spoolss_PrinterDataType type,
920 [out,switch_is(type)] spoolss_PrinterData data
922 [nopull,nopush,public] WERROR spoolss_GetPrinterData(
923 [in,ref] policy_handle *handle,
924 [in] [string,charset(UTF16)] uint16 value_name[],
926 [out,ref] spoolss_PrinterDataType *type,
927 [out,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData data,
928 [out,ref] uint32 *needed
933 [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData(
934 [in,ref] policy_handle *handle,
935 [in] [string,charset(UTF16)] uint16 value_name[],
936 [in] spoolss_PrinterDataType type,
940 [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
941 [in] spoolss_PrinterDataType type,
942 [out,switch_is(type)] spoolss_PrinterData data
944 [nopush] WERROR spoolss_SetPrinterData(
945 [in,ref] policy_handle *handle,
946 [in] [string,charset(UTF16)] uint16 value_name[],
947 [in] spoolss_PrinterDataType type,
948 [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
949 [in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
954 [todo] WERROR spoolss_WaitForPrinterChange(
959 [public] WERROR spoolss_ClosePrinter(
960 [in,out,ref] policy_handle *handle
965 typedef [v1_enum] enum {
966 SPOOLSS_FORM_USER = 0,
967 SPOOLSS_FORM_BUILTIN = 1,
968 SPOOLSS_FORM_PRINTER = 2
984 spoolss_FormFlags flags;
985 [relative] nstring *form_name;
986 spoolss_FormSize size;
987 spoolss_FormArea area;
990 typedef [nodiscriminant,relative_base,public,gensize] union {
991 [case(1)] spoolss_FormInfo1 info1;
996 spoolss_FormFlags flags;
997 [string,charset(UTF16)] uint16 *form_name;
998 spoolss_FormSize size;
999 spoolss_FormArea area;
1000 } spoolss_AddFormInfo1;
1002 typedef [switch_type(uint32)] union {
1003 [case(1)] spoolss_AddFormInfo1 *info1;
1004 } spoolss_AddFormInfo;
1006 WERROR spoolss_AddForm(
1007 [in,ref] policy_handle *handle,
1009 [in,switch_is(level)] spoolss_AddFormInfo info
1012 /******************/
1013 /* Function: 0x1f */
1014 WERROR spoolss_DeleteForm(
1015 [in,ref] policy_handle *handle,
1016 [in] [string,charset(UTF16)] uint16 form_name[]
1019 /******************/
1020 /* Function: 0x20 */
1021 WERROR spoolss_GetForm(
1022 [in,ref] policy_handle *handle,
1023 [in] [string,charset(UTF16)] uint16 form_name[],
1025 [in,unique] DATA_BLOB *buffer,
1026 [in] uint32 offered,
1027 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
1028 [out,ref] uint32 *needed
1031 /******************/
1032 /* Function: 0x21 */
1033 WERROR spoolss_SetForm(
1034 [in,ref] policy_handle *handle,
1035 [in] [string,charset(UTF16)] uint16 form_name[],
1037 [in,switch_is(level)] spoolss_AddFormInfo info
1040 /******************/
1041 /* Function: 0x22 */
1042 [public,noopnum,noprint] WERROR _spoolss_EnumForms(
1043 [in,ref] policy_handle *handle,
1045 [in,unique] DATA_BLOB *buffer,
1046 [in] uint32 offered,
1047 [out,unique] DATA_BLOB *info,
1048 [out,ref] uint32 *needed,
1051 [public,noopnum,noprint] void __spoolss_EnumForms(
1054 [out,switch_is(level)] spoolss_FormInfo info[count]
1056 [nopull,nopush] WERROR spoolss_EnumForms(
1057 [in,ref] policy_handle *handle,
1059 [in,unique] DATA_BLOB *buffer,
1060 [in] uint32 offered,
1061 [out,unique,switch_is(level),size_is(count)] spoolss_FormInfo *info,
1062 [out,ref] uint32 *needed,
1067 [relative] nstring *port_name;
1068 } spoolss_PortInfo1;
1071 SPOOLSS_PORT_TYPE_WRITE = 0x00000001,
1072 SPOOLSS_PORT_TYPE_READ = 0x00000002,
1073 SPOOLSS_PORT_TYPE_REDIRECTED = 0x00000004,
1074 SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008
1078 [relative] nstring *port_name;
1079 [relative] nstring *monitor_name;
1080 [relative] nstring *description;
1081 spoolss_PortType port_type;
1083 } spoolss_PortInfo2;
1085 typedef [nodiscriminant,relative_base,public] union {
1086 [case(1)] spoolss_PortInfo1 info1;
1087 [case(2)] spoolss_PortInfo2 info2;
1088 [case(3)]; /* TODO */
1092 /******************/
1093 /* Function: 0x23 */
1094 [public,noopnum,noprint] WERROR _spoolss_EnumPorts(
1095 [in,unique] [string,charset(UTF16)] uint16 *servername,
1097 [in,unique] DATA_BLOB *buffer,
1098 [in] uint32 offered,
1099 [out,unique] DATA_BLOB *info,
1100 [out,ref] uint32 *needed,
1103 [public,noopnum,noprint] void __spoolss_EnumPorts(
1106 [out,switch_is(level)] spoolss_PortInfo info[count]
1108 [nopull,nopush] WERROR spoolss_EnumPorts(
1109 [in,unique] [string,charset(UTF16)] uint16 *servername,
1111 [in,unique] DATA_BLOB *buffer,
1112 [in] uint32 offered,
1113 [out,unique,switch_is(level),size_is(count)] spoolss_PortInfo *info,
1114 [out,ref] uint32 *needed,
1118 /******************/
1119 /* Function: 0x24 */
1121 [relative] nstring *monitor_name;
1122 } spoolss_MonitorInfo1;
1125 [relative] nstring *monitor_name;
1126 [relative] nstring *environment;
1127 [relative] nstring *dll_name;
1128 } spoolss_MonitorInfo2;
1130 typedef [nodiscriminant,relative_base,public] union {
1131 [case(1)] spoolss_MonitorInfo1 info1;
1132 [case(2)] spoolss_MonitorInfo2 info2;
1134 } spoolss_MonitorInfo;
1136 [public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
1137 [in,unique] [string,charset(UTF16)] uint16 *servername,
1139 [in,unique] DATA_BLOB *buffer,
1140 [in] uint32 offered,
1141 [out,unique] DATA_BLOB *info,
1142 [out,ref] uint32 *needed,
1145 [public,noopnum,noprint] void __spoolss_EnumMonitors(
1148 [out,switch_is(level)] spoolss_MonitorInfo info[count]
1150 [nopull,nopush] WERROR spoolss_EnumMonitors(
1151 [in,unique] [string,charset(UTF16)] uint16 *servername,
1153 [in,unique] DATA_BLOB *buffer,
1154 [in] uint32 offered,
1155 [out,unique,switch_is(level),size_is(count)] spoolss_MonitorInfo *info,
1156 [out,ref] uint32 *needed,
1160 /******************/
1161 /* Function: 0x25 */
1162 WERROR spoolss_AddPort(
1163 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1164 [in] uint32 unknown,
1165 [in] [string,charset(UTF16)] uint16 monitor_name[]
1168 /******************/
1169 /* Function: 0x26 */
1170 [todo] WERROR spoolss_ConfigurePort(
1173 /******************/
1174 /* Function: 0x27 */
1175 [todo] WERROR spoolss_DeletePort(
1178 /******************/
1179 /* Function: 0x28 */
1180 [todo] WERROR spoolss_CreatePrinterIC(
1183 /******************/
1184 /* Function: 0x29 */
1185 [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC(
1188 /******************/
1189 /* Function: 0x2a */
1190 [todo] WERROR spoolss_DeletePrinterIC(
1193 /******************/
1194 /* Function: 0x2b */
1195 [todo] WERROR spoolss_AddPrinterConnection(
1198 /******************/
1199 /* Function: 0x2c */
1200 [todo] WERROR spoolss_DeletePrinterConnection(
1203 /******************/
1204 /* Function: 0x2d */
1205 [todo] WERROR spoolss_PrinterMessageBox(
1206 /* Marked as obsolete in MSDN. "Not necessary and has
1210 /******************/
1211 /* Function: 0x2e */
1212 [todo] WERROR spoolss_AddMonitor(
1215 /******************/
1216 /* Function: 0x2f */
1217 [todo] WERROR spoolss_DeleteMonitor(
1220 /******************/
1221 /* Function: 0x30 */
1222 [todo] WERROR spoolss_DeletePrintProcessor(
1225 /******************/
1226 /* Function: 0x31 */
1227 [todo] WERROR spoolss_AddPrintProvidor(
1230 /******************/
1231 /* Function: 0x32 */
1232 [todo] WERROR spoolss_DeletePrintProvidor(
1235 /******************/
1236 /* Function: 0x33 */
1237 [todo] WERROR spoolss_EnumPrintProcDataTypes(
1240 /******************/
1241 /* Function: 0x34 */
1242 [todo] WERROR spoolss_ResetPrinter(
1245 /******************/
1246 /* Function: 0x35 */
1247 WERROR spoolss_GetPrinterDriver2(
1248 [in,ref] policy_handle *handle,
1249 [in,unique] [string,charset(UTF16)] uint16 *architecture,
1251 [in,unique] DATA_BLOB *buffer,
1252 [in] uint32 offered,
1253 [in] uint32 client_major_version,
1254 [in] uint32 client_minor_version,
1255 [out,unique] DATA_BLOB *info,
1256 [out,ref] uint32 *needed,
1257 [out,ref] uint32 *server_major_version,
1258 [out,ref] uint32 *server_minor_version
1261 /******************/
1262 /* Function: 0x36 */
1263 [todo] WERROR spoolss_FindFirstPrinterChangeNotification(
1266 /******************/
1267 /* Function: 0x37 */
1268 [todo] WERROR spoolss_FindNextPrinterChangeNotification(
1271 /******************/
1272 /* Function: 0x38 */
1273 [public] WERROR spoolss_FindClosePrinterNotify(
1274 [in,ref] policy_handle *handle
1277 /******************/
1278 /* Function: 0x39 */
1279 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
1282 /******************/
1283 /* Function: 0x3a */
1284 [public] WERROR spoolss_ReplyOpenPrinter(
1285 [in,string,charset(UTF16)] uint16 server_name[],
1286 [in] uint32 printer_local,
1287 [in] winreg_Type type,
1288 [in,range(0,512)] uint32 bufsize,
1289 [in,unique,size_is(bufsize)] uint8 *buffer,
1290 [out,ref] policy_handle *handle
1293 /******************/
1294 /* Function: 0x3b */
1296 typedef [bitmap32bit] bitmap {
1297 PRINTER_CHANGE_ADD_PRINTER = 0x00000001,
1298 PRINTER_CHANGE_SET_PRINTER = 0x00000002,
1299 PRINTER_CHANGE_DELETE_PRINTER = 0x00000004,
1300 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008,
1301 PRINTER_CHANGE_ADD_JOB = 0x00000100,
1302 PRINTER_CHANGE_SET_JOB = 0x00000200,
1303 PRINTER_CHANGE_DELETE_JOB = 0x00000400,
1304 PRINTER_CHANGE_WRITE_JOB = 0x00000800,
1305 PRINTER_CHANGE_ADD_FORM = 0x00010000,
1306 PRINTER_CHANGE_SET_FORM = 0x00020000,
1307 PRINTER_CHANGE_DELETE_FORM = 0x00040000,
1308 PRINTER_CHANGE_ADD_PORT = 0x00100000,
1309 PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000,
1310 PRINTER_CHANGE_DELETE_PORT = 0x00400000,
1311 PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000,
1312 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000,
1313 PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000,
1314 PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000,
1315 PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000,
1316 PRINTER_CHANGE_TIMEOUT = 0x80000000
1317 } spoolss_PrinterChangeFlags;
1319 const int PRINTER_CHANGE_PRINTER = (PRINTER_CHANGE_ADD_PRINTER |
1320 PRINTER_CHANGE_SET_PRINTER |
1321 PRINTER_CHANGE_DELETE_PRINTER |
1322 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER); /* 0x000000FF */
1324 const int PRINTER_CHANGE_JOB = (PRINTER_CHANGE_ADD_JOB |
1325 PRINTER_CHANGE_SET_JOB |
1326 PRINTER_CHANGE_DELETE_JOB |
1327 PRINTER_CHANGE_WRITE_JOB); /* 0x0000FF00 */
1329 const int PRINTER_CHANGE_FORM = (PRINTER_CHANGE_ADD_FORM |
1330 PRINTER_CHANGE_SET_FORM |
1331 PRINTER_CHANGE_DELETE_FORM); /* 0x00070000 */
1333 const int PRINTER_CHANGE_PORT = (PRINTER_CHANGE_ADD_PORT |
1334 PRINTER_CHANGE_CONFIGURE_PORT |
1335 PRINTER_CHANGE_DELETE_PORT); /* 0x00700000 */
1337 const int PRINTER_CHANGE_PRINT_PROCESSOR = (PRINTER_CHANGE_ADD_PRINT_PROCESSOR |
1338 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR); /* 0x07000000 */
1340 const int PRINTER_CHANGE_PRINTER_DRIVER = (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
1341 PRINTER_CHANGE_SET_PRINTER_DRIVER |
1342 PRINTER_CHANGE_DELETE_PRINTER_DRIVER); /* 0x70000000 */
1344 const int PRINTER_CHANGE_ALL = (PRINTER_CHANGE_JOB |
1345 PRINTER_CHANGE_FORM |
1346 PRINTER_CHANGE_PORT |
1347 PRINTER_CHANGE_PRINT_PROCESSOR |
1348 PRINTER_CHANGE_PRINTER_DRIVER); /* 0x7777FFFF */
1349 WERROR spoolss_RouterReplyPrinter(
1350 [in,ref] policy_handle *handle,
1351 [in] spoolss_PrinterChangeFlags flags,
1352 [in,range(0,512)] uint32 bufsize,
1353 [in,unique,size_is(bufsize)] uint8 *buffer
1356 /******************/
1357 /* Function: 0x3c */
1358 [public] WERROR spoolss_ReplyClosePrinter(
1359 [in,out,ref] policy_handle *handle
1362 /******************/
1363 /* Function: 0x3d */
1364 [todo] WERROR spoolss_AddPortEx(
1367 /******************/
1368 /* Function: 0x3e */
1369 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification(
1372 /******************/
1373 /* Function: 0x3f */
1374 [todo] WERROR spoolss_SpoolerInit(
1377 /******************/
1378 /* Function: 0x40 */
1379 [todo] WERROR spoolss_ResetPrinterEx(
1382 typedef [enum16bit] enum {
1383 SPOOLSS_FIELD_SERVER_NAME = 0,
1384 SPOOLSS_FIELD_PRINTER_NAME = 1,
1385 SPOOLSS_FIELD_SHARE_NAME = 2,
1386 SPOOLSS_FIELD_PORT_NAME = 3,
1387 SPOOLSS_FIELD_DRIVER_NAME = 4,
1388 SPOOLSS_FIELD_COMMENT = 5,
1389 SPOOLSS_FIELD_LOCATION = 6,
1390 SPOOLSS_FIELD_DEVMODE = 7,
1391 SPOOLSS_FIELD_SEPFILE = 8,
1392 SPOOLSS_FIELD_PRINT_PROCESSOR = 9,
1393 SPOOLSS_FIELD_PARAMETERS = 10,
1394 SPOOLSS_FIELD_DATATYPE = 11,
1395 SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12,
1396 SPOOLSS_FIELD_ATTRIBUTES = 13,
1397 SPOOLSS_FIELD_PRIORITY = 14,
1398 SPOOLSS_FIELD_DEFAULT_PRIORITY = 15,
1399 SPOOLSS_FIELD_START_TIME = 16,
1400 SPOOLSS_FIELD_UNTIL_TIME = 17,
1401 SPOOLSS_FIELD_STATUS = 18,
1402 SPOOLSS_FIELD_STATUS_STRING = 19,
1403 SPOOLSS_FIELD_CJOBS = 20,
1404 SPOOLSS_FIELD_AVERAGE_PPM = 21,
1405 SPOOLSS_FIELD_TOTAL_PAGES = 22,
1406 SPOOLSS_FIELD_PAGES_PRINTED = 23,
1407 SPOOLSS_FIELD_TOTAL_BYTES = 24,
1408 SPOOLSS_FIELD_BYTES_PRINTED = 25
1411 typedef [enum16bit] enum {
1412 SPOOLSS_NOTIFY_PRINTER = 0,
1413 SPOOLSS_NOTIFY_JOB = 1
1414 } spoolss_NotifyType;
1416 /******************/
1417 /* Function: 0x41 */
1419 spoolss_NotifyType type;
1424 [size_is(count)] spoolss_Field *fields;
1425 } spoolss_NotifyOptionsArray;
1431 [size_is(count)] spoolss_NotifyOptionsArray *options;
1432 } spoolss_NotifyOptionsContainer;
1434 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
1435 [in,ref] policy_handle *handle,
1437 [in] uint32 options,
1438 [in,unique] [string,charset(UTF16)] uint16 *str,
1439 [in] uint32 printer_local,
1440 [in,unique] spoolss_NotifyOptionsContainer *t1
1443 /******************/
1444 /* Function: 0x42 */
1445 [todo] WERROR spoolss_RouterRefreshPrinterChangeNotification(
1450 [size_is(size/2),unique,charset(UTF16)] uint16 *string;
1451 } spoolss_NotifyUTF16String;
1455 [size_is(size),charset(DOS)] uint8 *string;
1456 } spoolss_NotifyDOSString;
1460 } spoolss_NotifyBlobData;
1464 [unique] spoolss_NotifyBlobData *data;
1465 } spoolss_NotifyBlob;
1467 typedef [switch_type(uint32)] union {
1468 [case(1)] dlong integer;
1469 [case(2)] spoolss_NotifyUTF16String utf16_string;
1470 [case(3)] spoolss_NotifyDOSString ascii_string;
1471 [case(4)] spoolss_NotifyBlob blob;
1472 [case(5)] spoolss_NotifyDOSString ascii_string;
1473 } spoolss_NotifyData;
1476 spoolss_NotifyType type;
1477 spoolss_Field field;
1478 uint32 variable_type;
1480 [switch_is(variable_type)] spoolss_NotifyData data;
1487 [size_is(count)] spoolss_Notify notifies[];
1488 } spoolss_NotifyInfo;
1490 /******************/
1491 /* Function: 0x43 */
1492 [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx(
1493 [in,ref] policy_handle *handle,
1494 [in] uint32 change_low,
1495 [in,unique] spoolss_NotifyOptionsContainer *container,
1496 [out,ref] spoolss_NotifyInfo **info
1499 /******************/
1500 /* Function: 0x44 */
1501 [todo] WERROR spoolss_44(
1506 [string,charset(UTF16)] uint16 *client;
1507 [string,charset(UTF16)] uint16 *user;
1512 } spoolss_UserLevel1;
1515 [case(1)] spoolss_UserLevel1 *level1;
1516 } spoolss_UserLevel;
1519 SERVER_ACCESS_ADMINISTER = 0x00000001,
1520 SERVER_ACCESS_ENUMERATE = 0x00000002,
1521 PRINTER_ACCESS_ADMINISTER = 0x00000004,
1522 PRINTER_ACCESS_USE = 0x00000008,
1523 JOB_ACCESS_ADMINISTER = 0x00000010
1524 } spoolss_AccessRights;
1526 /* Access rights for print servers */
1527 const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED |
1528 SERVER_ACCESS_ADMINISTER |
1529 SERVER_ACCESS_ENUMERATE;
1531 const int SERVER_READ = SEC_STD_READ_CONTROL |
1532 SERVER_ACCESS_ENUMERATE;
1534 const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1535 SERVER_ACCESS_ADMINISTER |
1536 SERVER_ACCESS_ENUMERATE;
1538 const int SERVER_EXECUTE = SEC_STD_READ_CONTROL |
1539 SERVER_ACCESS_ENUMERATE;
1541 /* Access rights for printers */
1542 const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED |
1543 PRINTER_ACCESS_ADMINISTER |
1546 const int PRINTER_READ = SEC_STD_READ_CONTROL |
1549 const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1552 const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL |
1555 /* Access rights for jobs */
1556 const int JOB_ALL_ACCESS = SEC_STD_REQUIRED |
1557 JOB_ACCESS_ADMINISTER;
1559 const int JOB_READ = SEC_STD_READ_CONTROL |
1560 JOB_ACCESS_ADMINISTER;
1562 const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1563 JOB_ACCESS_ADMINISTER;
1565 const int JOB_EXECUTE = SEC_STD_READ_CONTROL |
1566 JOB_ACCESS_ADMINISTER;
1568 /* ACE masks for various print permissions */
1569 const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL |
1572 const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL |
1573 READ_CONTROL_ACCESS;
1575 const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS |
1576 READ_CONTROL_ACCESS |
1579 /******************/
1580 /* Function: 0x45 */
1581 [public] WERROR spoolss_OpenPrinterEx(
1582 [in,unique] [string,charset(UTF16)] uint16 *printername,
1583 [in,unique] [string,charset(UTF16)] uint16 *datatype,
1584 [in] spoolss_DevmodeContainer devmode_ctr,
1585 [in] uint32 access_mask,
1587 [in,switch_is(level)] spoolss_UserLevel userlevel,
1588 [out,ref] policy_handle *handle
1591 /******************/
1592 /* Function: 0x46 */
1593 WERROR spoolss_AddPrinterEx(
1594 [in,unique] [string,charset(UTF16)] uint16 *server,
1596 [in,unique,switch_is(level)] spoolss_PrinterInfo *info,
1597 [in] spoolss_DevmodeContainer devmode_ctr,
1598 [in,unique] security_descriptor *secdesc,
1600 [in,switch_is(ulevel)] spoolss_UserLevel userlevel
1603 /******************/
1604 /* Function: 0x47 */
1605 [todo] WERROR spoolss_47(
1608 /******************/
1609 /* Function: 0x48 */
1610 WERROR spoolss_EnumPrinterData(
1611 [in,ref] policy_handle *handle,
1612 [in] uint32 enum_index,
1613 [out,size_is(value_offered/2),charset(UTF16)] uint16 value_name[],
1614 [in] uint32 value_offered,
1615 [out,ref] uint32 *value_needed,
1616 [out,ref] uint32 *printerdata_type,
1617 [out,ref] DATA_BLOB *buffer,
1618 [in] uint32 data_offered,
1619 [out,ref] uint32 *data_needed
1622 /******************/
1623 /* Function: 0x49 */
1624 WERROR spoolss_DeletePrinterData(
1625 [in,ref] policy_handle *handle,
1626 [in] [string,charset(UTF16)] uint16 value_name[]
1629 /******************/
1630 /* Function: 0x4a */
1631 [todo] WERROR spoolss_4a(
1634 /******************/
1635 /* Function: 0x4b */
1636 [todo] WERROR spoolss_4b(
1639 /******************/
1640 /* Function: 0x4c */
1641 [todo] WERROR spoolss_4c(
1644 /******************/
1645 /* Function: 0x4d */
1646 WERROR spoolss_SetPrinterDataEx(
1647 [in,ref] policy_handle *handle,
1648 [in] [string,charset(UTF16)] uint16 key_name[],
1649 [in] [string,charset(UTF16)] uint16 value_name[],
1651 [in] DATA_BLOB buffer,
1655 /******************/
1656 /* Function: 0x4e */
1657 WERROR spoolss_GetPrinterDataEx(
1658 [in,ref] policy_handle *handle,
1659 [in] [string,charset(UTF16)] uint16 key_name[],
1660 [in] [string,charset(UTF16)] uint16 value_name[],
1661 [out,ref] uint32 *type,
1662 [out,ref] [size_is(offered)] uint8 *buffer,
1663 [in] uint32 offered,
1664 [out,ref] uint32 *needed
1667 /******************/
1668 /* Function: 0x4f */
1669 [public] WERROR spoolss_EnumPrinterDataEx(
1670 [in,ref] policy_handle *handle,
1671 [in] [string,charset(UTF16)] uint16 key_name[],
1672 [out,ref] [size_is(offered)] uint8 *buffer,
1673 [in] uint32 offered,
1674 [out,ref] uint32 *needed,
1675 [out,ref] uint32 *count
1678 /******************/
1679 /* Function: 0x50 */
1680 [public] WERROR spoolss_EnumPrinterKey(
1681 [in, ref] policy_handle *handle,
1682 [in] [string,charset(UTF16)] uint16 key_name[],
1683 [out,ref] [size_is(key_buffer_size/2)] uint16 *key_buffer,
1684 [in] uint32 key_buffer_size,
1685 [out,ref] uint32 *needed
1688 /******************/
1689 /* Function: 0x51 */
1690 WERROR spoolss_DeletePrinterDataEx(
1691 [in,ref] policy_handle *handle,
1692 [in] [string,charset(UTF16)] uint16 key_name[],
1693 [in] [string,charset(UTF16)] uint16 value_name[]
1696 /******************/
1697 /* Function: 0x52 */
1698 WERROR spoolss_DeletePrinterKey(
1699 [in,ref] policy_handle *handle,
1700 [in] [string,charset(UTF16)] uint16 key_name[]
1703 /******************/
1704 /* Function: 0x53 */
1705 [todo] WERROR spoolss_53(
1708 /******************/
1709 /* Function: 0x54 */
1710 typedef [public,bitmap32bit] bitmap {
1711 DPD_DELETE_UNUSED_FILES = 0x00000001,
1712 DPD_DELETE_SPECIFIC_VERSION = 0x00000002,
1713 DPD_DELETE_ALL_FILES = 0x00000004
1714 } spoolss_DeleteDriverFlags;
1716 WERROR spoolss_DeletePrinterDriverEx(
1717 [in,unique] [string,charset(UTF16)] uint16 *server,
1718 [in] [string,charset(UTF16)] uint16 architecture[],
1719 [in] [string,charset(UTF16)] uint16 driver[],
1720 [in] spoolss_DeleteDriverFlags delete_flags,
1724 /******************/
1725 /* Function: 0x55 */
1726 [todo] WERROR spoolss_55(
1729 /******************/
1730 /* Function: 0x56 */
1731 [todo] WERROR spoolss_56(
1734 /******************/
1735 /* Function: 0x57 */
1736 [todo] WERROR spoolss_57(
1739 /******************/
1740 /* Function: 0x58 */
1741 WERROR spoolss_XcvData(
1742 [in,ref] policy_handle *handle,
1743 [in] [string,charset(UTF16)] uint16 function_name[],
1744 [in] DATA_BLOB in_data,
1745 [in,value(r->in.in_data.length)] uint32 _in_data_length,
1746 [out,ref] [size_is(out_data_size)] uint8 *out_data,
1747 [in] uint32 out_data_size,
1748 [out,ref] uint32 *needed,
1749 [in,out,ref] uint32 *status_code
1752 /******************/
1753 /* Function: 0x59 */
1754 [public,todo] WERROR spoolss_AddPrinterDriverEx(
1757 /******************/
1758 /* Function: 0x5a */
1759 [todo] WERROR spoolss_5a(
1762 /******************/
1763 /* Function: 0x5b */
1764 [todo] WERROR spoolss_5b(
1767 /******************/
1768 /* Function: 0x5c */
1769 [todo] WERROR spoolss_5c(
1772 /******************/
1773 /* Function: 0x5d */
1774 [todo] WERROR spoolss_5d(
1777 /******************/
1778 /* Function: 0x5e */
1779 [todo] WERROR spoolss_5e(
1782 /******************/
1783 /* Function: 0x5f */
1784 [todo] WERROR spoolss_5f(