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 [switch_is(level)] spoolss_JobInfo info;
488 } spoolss_JobInfoContainer;
490 typedef [v1_enum] enum {
491 SPOOLSS_JOB_CONTROL_PAUSE = 1,
492 SPOOLSS_JOB_CONTROL_RESUME = 2,
493 SPOOLSS_JOB_CONTROL_CANCEL = 3,
494 SPOOLSS_JOB_CONTROL_RESTART = 4,
495 SPOOLSS_JOB_CONTROL_DELETE = 5,
496 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER = 6,
497 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED = 7
498 } spoolss_JobControl;
500 WERROR spoolss_SetJob(
501 [in,ref] policy_handle *handle,
503 [in,unique] spoolss_JobInfoContainer *ctr,
504 [in] spoolss_JobControl command
509 WERROR spoolss_GetJob(
510 [in,ref] policy_handle *handle,
513 [in,unique] DATA_BLOB *buffer,
515 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
516 [out,ref] uint32 *needed
521 [public,noopnum,noprint] WERROR _spoolss_EnumJobs(
522 [in,ref] policy_handle *handle,
523 [in] uint32 firstjob,
526 [in,unique] DATA_BLOB *buffer,
528 [out,unique] DATA_BLOB *info,
529 [out,ref] uint32 *needed,
530 [out,ref] uint32 *count
532 [public,noopnum,noprint] void __spoolss_EnumJobs(
535 [out,switch_is(level)] spoolss_JobInfo info[count]
537 [nopull,nopush] WERROR spoolss_EnumJobs(
538 [in,ref] policy_handle *handle,
539 [in] uint32 firstjob,
542 [in,unique] DATA_BLOB *buffer,
544 [out,ref] uint32 *count,
545 [out,unique,switch_is(level),size_is(*count)] spoolss_JobInfo *info,
546 [out,ref] uint32 *needed
551 [todo] WERROR spoolss_AddPrinter(
552 /* This function is not implemented in Samba 3 as no
553 clients have been observed using it. */
558 WERROR spoolss_DeletePrinter(
559 [in] policy_handle *handle
564 typedef [v1_enum] enum {
565 SPOOLSS_PRINTER_CONTROL_UNPAUSE = 0,
566 SPOOLSS_PRINTER_CONTROL_PAUSE = 1,
567 SPOOLSS_PRINTER_CONTROL_RESUME = 2,
568 SPOOLSS_PRINTER_CONTROL_PURGE = 3,
569 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
570 } spoolss_PrinterControl;
573 [string,charset(UTF16)] uint16 *servername;
574 [string,charset(UTF16)] uint16 *printername;
579 uint32 global_counter;
585 uint32 session_counter;
586 uint32 num_error_out_of_paper;
587 uint32 num_error_not_ready;
589 uint32 number_of_processors;
590 spoolss_ProcessorType processor_type;
591 uint32 high_part_total_bytes;
595 uint32 enumerate_network_printers;
597 spoolss_ProcessorArchitecture processor_architecture;
598 uint16 processor_level;
602 } spoolss_SetPrinterInfo0;
605 spoolss_EnumPrinterFlags flags;
606 [string,charset(UTF16)] uint16 *name;
607 [string,charset(UTF16)] uint16 *description;
608 [string,charset(UTF16)] uint16 *comment;
609 } spoolss_SetPrinterInfo1;
612 [string,charset(UTF16)] uint16 *servername;
613 [string,charset(UTF16)] uint16 *printername;
614 [string,charset(UTF16)] uint16 *sharename;
615 [string,charset(UTF16)] uint16 *portname;
616 [string,charset(UTF16)] uint16 *drivername;
617 [string,charset(UTF16)] uint16 *comment;
618 [string,charset(UTF16)] uint16 *location;
619 [subcontext(0)] spoolss_DeviceMode *devmode;
620 [string,charset(UTF16)] uint16 *sepfile;
621 [string,charset(UTF16)] uint16 *printprocessor;
622 [string,charset(UTF16)] uint16 *datatype;
623 [string,charset(UTF16)] uint16 *parameters;
624 [subcontext(0)] security_descriptor *secdesc;
625 spoolss_PrinterAttributes attributes;
627 uint32 defaultpriority;
630 spoolss_PrinterStatus status;
633 } spoolss_SetPrinterInfo2;
637 } spoolss_SetPrinterInfo3;
640 [string,charset(UTF16)] uint16 *printername;
641 [string,charset(UTF16)] uint16 *servername;
642 spoolss_PrinterAttributes attributes;
643 } spoolss_SetPrinterInfo4;
646 [string,charset(UTF16)] uint16 *printername;
647 [string,charset(UTF16)] uint16 *portname;
648 spoolss_PrinterAttributes attributes;
649 uint32 device_not_selected_timeout;
650 uint32 transmission_retry_timeout;
651 } spoolss_SetPrinterInfo5;
654 spoolss_PrinterStatus status;
655 } spoolss_SetPrinterInfo6;
658 [string,charset(UTF16)] uint16 *guid; /* text form of printer guid */
659 spoolss_DsPrintAction action;
660 } spoolss_SetPrinterInfo7;
662 typedef [switch_type(uint32)] union {
663 [case(0)] spoolss_SetPrinterInfo0 *info0;
664 [case(1)] spoolss_SetPrinterInfo1 *info1;
665 [case(2)] spoolss_SetPrinterInfo2 *info2;
666 [case(3)] spoolss_SetPrinterInfo3 *info3;
667 [case(4)] spoolss_SetPrinterInfo4 *info4;
668 [case(5)] spoolss_SetPrinterInfo5 *info5;
669 [case(6)] spoolss_SetPrinterInfo6 *info6;
670 [case(7)] spoolss_SetPrinterInfo7 *info7;
671 [case(8)] spoolss_DeviceModeInfo *info8;
672 [case(9)] spoolss_DeviceModeInfo *info9;
674 } spoolss_SetPrinterInfo;
678 [switch_is(level)] spoolss_SetPrinterInfo info;
679 } spoolss_SetPrinterInfoCtr;
681 WERROR spoolss_SetPrinter(
682 [in,ref] policy_handle *handle,
683 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
684 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
685 [in,ref] sec_desc_buf *secdesc_ctr,
686 [in] spoolss_PrinterControl command
691 [public] WERROR spoolss_GetPrinter(
692 [in,ref] policy_handle *handle,
694 [in,unique] DATA_BLOB *buffer,
696 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
697 [out,ref] uint32 *needed
703 typedef [public] struct {
704 [value((ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags)-4)/2)] uint32 _ndr_size;
705 /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array string;
706 } spoolss_StringArray;
709 [string,charset(UTF16)] uint16 *driver_name;
710 } spoolss_AddDriverInfo1;
712 typedef [v1_enum,public] enum {
713 SPOOLSS_DRIVER_VERSION_9X = 0,
714 SPOOLSS_DRIVER_VERSION_NT35 = 1,
715 SPOOLSS_DRIVER_VERSION_NT4 = 2,
716 SPOOLSS_DRIVER_VERSION_200X = 3
717 } spoolss_DriverOSVersion;
720 spoolss_DriverOSVersion version;
721 [string,charset(UTF16)] uint16 *driver_name;
722 [string,charset(UTF16)] uint16 *architecture;
723 [string,charset(UTF16)] uint16 *driver_path;
724 [string,charset(UTF16)] uint16 *data_file;
725 [string,charset(UTF16)] uint16 *config_file;
726 } spoolss_AddDriverInfo2;
729 spoolss_DriverOSVersion version;
730 [string,charset(UTF16)] uint16 *driver_name;
731 [string,charset(UTF16)] uint16 *architecture;
732 [string,charset(UTF16)] uint16 *driver_path;
733 [string,charset(UTF16)] uint16 *data_file;
734 [string,charset(UTF16)] uint16 *config_file;
735 [string,charset(UTF16)] uint16 *help_file;
736 [string,charset(UTF16)] uint16 *monitor_name;
737 [string,charset(UTF16)] uint16 *default_datatype;
738 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
739 spoolss_StringArray *dependent_files;
740 } spoolss_AddDriverInfo3;
743 spoolss_DriverOSVersion version;
744 [string,charset(UTF16)] uint16 *driver_name;
745 [string,charset(UTF16)] uint16 *architecture;
746 [string,charset(UTF16)] uint16 *driver_path;
747 [string,charset(UTF16)] uint16 *data_file;
748 [string,charset(UTF16)] uint16 *config_file;
749 [string,charset(UTF16)] uint16 *help_file;
750 [string,charset(UTF16)] uint16 *monitor_name;
751 [string,charset(UTF16)] uint16 *default_datatype;
752 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
753 spoolss_StringArray *dependent_files;
754 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
755 spoolss_StringArray *previous_names;
756 } spoolss_AddDriverInfo4;
759 spoolss_DriverOSVersion version;
760 [string,charset(UTF16)] uint16 *driver_name;
761 [string,charset(UTF16)] uint16 *architecture;
762 [string,charset(UTF16)] uint16 *driver_path;
763 [string,charset(UTF16)] uint16 *data_file;
764 [string,charset(UTF16)] uint16 *config_file;
765 uint32 driver_attributes;
766 uint32 config_version;
767 uint32 driver_version;
768 } spoolss_AddDriverInfo5;
771 spoolss_DriverOSVersion version;
772 [string,charset(UTF16)] uint16 *driver_name;
773 [string,charset(UTF16)] uint16 *architecture;
774 [string,charset(UTF16)] uint16 *driver_path;
775 [string,charset(UTF16)] uint16 *data_file;
776 [string,charset(UTF16)] uint16 *config_file;
777 [string,charset(UTF16)] uint16 *help_file;
778 [string,charset(UTF16)] uint16 *monitor_name;
779 [string,charset(UTF16)] uint16 *default_datatype;
780 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
781 spoolss_StringArray *dependent_files;
782 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
783 spoolss_StringArray *previous_names;
785 hyper driver_version;
786 [string,charset(UTF16)] uint16 *manufacturer_name;
787 [string,charset(UTF16)] uint16 *manufacturer_url;
788 [string,charset(UTF16)] uint16 *hardware_id;
789 [string,charset(UTF16)] uint16 *provider;
790 } spoolss_AddDriverInfo6;
793 spoolss_DriverOSVersion version;
794 [string,charset(UTF16)] uint16 *driver_name;
795 [string,charset(UTF16)] uint16 *architecture;
796 [string,charset(UTF16)] uint16 *driver_path;
797 [string,charset(UTF16)] uint16 *data_file;
798 [string,charset(UTF16)] uint16 *config_file;
799 [string,charset(UTF16)] uint16 *help_file;
800 [string,charset(UTF16)] uint16 *monitor_name;
801 [string,charset(UTF16)] uint16 *default_datatype;
802 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
803 spoolss_StringArray *dependent_files;
804 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
805 spoolss_StringArray *previous_names;
807 hyper driver_version;
808 [string,charset(UTF16)] uint16 *manufacturer_name;
809 [string,charset(UTF16)] uint16 *manufacturer_url;
810 [string,charset(UTF16)] uint16 *hardware_id;
811 [string,charset(UTF16)] uint16 *provider;
812 [string,charset(UTF16)] uint16 *print_processor;
813 [string,charset(UTF16)] uint16 *vendor_setup;
814 [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
815 spoolss_StringArray *color_profiles;
816 [string,charset(UTF16)] uint16 *inf_path;
817 uint32 printer_driver_attributes;
818 [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
819 spoolss_StringArray *core_driver_dependencies;
820 NTTIME min_inbox_driver_ver_date;
821 hyper min_inbox_driver_ver_version;
822 } spoolss_AddDriverInfo8;
824 typedef [switch_type(uint32)] union {
825 [case(1)] spoolss_AddDriverInfo1 *info1;
826 [case(2)] spoolss_AddDriverInfo2 *info2;
827 [case(3)] spoolss_AddDriverInfo3 *info3;
828 [case(4)] spoolss_AddDriverInfo4 *info4;
829 [case(6)] spoolss_AddDriverInfo6 *info6;
830 [case(8)] spoolss_AddDriverInfo8 *info8;
831 } spoolss_AddDriverInfo;
835 [switch_is(level)] spoolss_AddDriverInfo info;
836 } spoolss_AddDriverInfoCtr;
838 WERROR spoolss_AddPrinterDriver(
839 [in,unique] [string,charset(UTF16)] uint16 *servername,
840 [in,ref] spoolss_AddDriverInfoCtr *info_ctr
843 typedef [public,gensize] struct {
844 [relative] nstring *driver_name;
845 } spoolss_DriverInfo1;
847 typedef [public,gensize] struct {
848 spoolss_DriverOSVersion version;
849 [relative] nstring *driver_name;
850 [relative] nstring *architecture;
851 [relative] nstring *driver_path;
852 [relative] nstring *data_file;
853 [relative] nstring *config_file;
854 } spoolss_DriverInfo2;
856 typedef [public,gensize] struct {
857 spoolss_DriverOSVersion version;
858 [relative] nstring *driver_name;
859 [relative] nstring *architecture;
860 [relative] nstring *driver_path;
861 [relative] nstring *data_file;
862 [relative] nstring *config_file;
863 [relative] nstring *help_file;
864 [relative] nstring_array *dependent_files;
865 [relative] nstring *monitor_name;
866 [relative] nstring *default_datatype;
867 } spoolss_DriverInfo3;
869 typedef [public,gensize] struct {
870 spoolss_DriverOSVersion version;
871 [relative] nstring *driver_name;
872 [relative] nstring *architecture;
873 [relative] nstring *driver_path;
874 [relative] nstring *data_file;
875 [relative] nstring *config_file;
876 [relative] nstring *help_file;
877 [relative] nstring_array *dependent_files;
878 [relative] nstring *monitor_name;
879 [relative] nstring *default_datatype;
880 [relative] nstring_array *previous_names;
881 } spoolss_DriverInfo4;
883 typedef [public,gensize] struct {
884 spoolss_DriverOSVersion version;
885 [relative] nstring *driver_name;
886 [relative] nstring *architecture;
887 [relative] nstring *driver_path;
888 [relative] nstring *data_file;
889 [relative] nstring *config_file;
890 uint32 driver_attributes;
891 uint32 config_version;
892 uint32 driver_version;
893 } spoolss_DriverInfo5;
895 typedef [public,gensize] struct {
896 spoolss_DriverOSVersion version;
897 [relative] nstring *driver_name;
898 [relative] nstring *architecture;
899 [relative] nstring *driver_path;
900 [relative] nstring *data_file;
901 [relative] nstring *config_file;
902 [relative] nstring *help_file;
903 [relative] nstring_array *dependent_files;
904 [relative] nstring *monitor_name;
905 [relative] nstring *default_datatype;
906 [relative] nstring_array *previous_names;
908 hyper driver_version;
909 [relative] nstring *manufacturer_name;
910 [relative] nstring *manufacturer_url;
911 [relative] nstring *hardware_id;
912 [relative] nstring *provider;
913 } spoolss_DriverInfo6;
915 typedef [public,gensize] struct {
916 spoolss_DriverOSVersion version;
917 [relative] nstring *driver_name;
918 [relative] nstring *architecture;
919 [relative] nstring *driver_path;
920 [relative] nstring *data_file;
921 [relative] nstring *config_file;
922 [relative] nstring *help_file;
923 [relative] nstring *monitor_name;
924 [relative] nstring *default_datatype;
925 [relative] nstring_array *dependent_files;
926 [relative] nstring_array *previous_names;
928 hyper driver_version;
929 [relative] nstring *manufacturer_name;
930 [relative] nstring *manufacturer_url;
931 [relative] nstring *hardware_id;
932 [relative] nstring *provider;
933 [relative] nstring *print_processor;
934 [relative] nstring *vendor_setup;
935 [relative] nstring_array *color_profiles;
936 [relative] nstring *inf_path;
937 uint32 printer_driver_attributes;
938 [relative] nstring_array *core_driver_dependencies;
939 NTTIME min_inbox_driver_ver_date;
940 hyper min_inbox_driver_ver_version;
941 } spoolss_DriverInfo8;
943 typedef [v1_enum] enum {
944 SPOOLSS_DRIVER_FILE_TYPE_RENDERING = 0x00000000,
945 SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION = 0x00000001,
946 SPOOLSS_DRIVER_FILE_TYPE_DATA = 0x00000002,
947 SPOOLSS_DRIVER_FILE_TYPE_HELP = 0x00000003,
948 SPOOLSS_DRIVER_FILE_TYPE_OTHER = 0x00000004
949 } spoolss_DriverFileType;
951 typedef [public] struct {
952 [relative] nstring *file_name;
953 spoolss_DriverFileType file_type;
955 } spoolss_DriverFileInfo;
957 typedef [public,gensize,nopush,nopull] struct {
958 spoolss_DriverOSVersion version;
959 [relative] nstring *driver_name;
960 [relative] nstring *architecture;
961 [relative] [size_is(file_count)] spoolss_DriverFileInfo *file_info;
963 [relative] nstring *monitor_name;
964 [relative] nstring *default_datatype;
965 [relative] nstring_array *previous_names;
967 hyper driver_version;
968 [relative] nstring *manufacturer_name;
969 [relative] nstring *manufacturer_url;
970 [relative] nstring *hardware_id;
971 [relative] nstring *provider;
972 } spoolss_DriverInfo101;
974 typedef [nodiscriminant,relative_base,public] union {
975 [case(1)] spoolss_DriverInfo1 info1;
976 [case(2)] spoolss_DriverInfo2 info2;
977 [case(3)] spoolss_DriverInfo3 info3;
978 [case(4)] spoolss_DriverInfo4 info4;
979 [case(5)] spoolss_DriverInfo5 info5;
980 [case(6)] spoolss_DriverInfo6 info6;
981 [case(8)] spoolss_DriverInfo8 info8;
982 [case(101)] spoolss_DriverInfo101 info101;
984 } spoolss_DriverInfo;
988 [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
989 [in,unique] [string,charset(UTF16)] uint16 *server,
990 [in,unique] [string,charset(UTF16)] uint16 *environment,
992 [in,unique] DATA_BLOB *buffer,
994 [out,unique] DATA_BLOB *info,
995 [out,ref] uint32 *needed,
996 [out,ref] uint32 *count
998 [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
1001 [out,switch_is(level)] spoolss_DriverInfo info[count]
1003 [nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
1004 [in,unique] [string,charset(UTF16)] uint16 *server,
1005 [in,unique] [string,charset(UTF16)] uint16 *environment,
1007 [in,unique] DATA_BLOB *buffer,
1008 [in] uint32 offered,
1009 [out,ref] uint32 *count,
1010 [out,unique,switch_is(level),size_is(*count)] spoolss_DriverInfo *info,
1011 [out,ref] uint32 *needed
1014 /******************/
1015 /* Function: 0x0b */
1016 [todo] WERROR spoolss_GetPrinterDriver(
1019 /******************/
1020 /* Function: 0x0c */
1021 typedef [public,gensize] struct {
1022 nstring directory_name;
1023 } spoolss_DriverDirectoryInfo1;
1025 /* NOTE: it's seems that w2k3 completly ignores the level
1028 typedef [nodiscriminant,relative_base,gensize,public] union {
1029 [case(1)] spoolss_DriverDirectoryInfo1 info1;
1030 [default] spoolss_DriverDirectoryInfo1 info1;
1031 } spoolss_DriverDirectoryInfo;
1033 [public] WERROR spoolss_GetPrinterDriverDirectory(
1034 [in,unique] [string,charset(UTF16)] uint16 *server,
1035 [in,unique] [string,charset(UTF16)] uint16 *environment,
1037 [in,unique] DATA_BLOB *buffer,
1038 [in] uint32 offered,
1039 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
1040 [out,ref] uint32 *needed
1043 /******************/
1044 /* Function: 0x0d */
1045 WERROR spoolss_DeletePrinterDriver(
1046 [in,unique] [string,charset(UTF16)] uint16 *server,
1047 [in] [string,charset(UTF16)] uint16 architecture[],
1048 [in] [string,charset(UTF16)] uint16 driver[]
1051 /******************/
1052 /* Function: 0x0e */
1053 WERROR spoolss_AddPrintProcessor(
1054 [in,unique] [string,charset(UTF16)] uint16 *server,
1055 [in] [string,charset(UTF16)] uint16 architecture[],
1056 [in] [string,charset(UTF16)] uint16 path_name[],
1057 [in] [string,charset(UTF16)] uint16 print_processor_name[]
1060 /******************/
1061 /* Function: 0x0f */
1063 [relative] nstring *print_processor_name;
1064 } spoolss_PrintProcessorInfo1;
1066 typedef [nodiscriminant,relative_base,public] union {
1067 [case(1)] spoolss_PrintProcessorInfo1 info1;
1069 } spoolss_PrintProcessorInfo;
1071 [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
1072 [in,unique] [string,charset(UTF16)] uint16 *servername,
1073 [in,unique] [string,charset(UTF16)] uint16 *environment,
1075 [in,unique] DATA_BLOB *buffer,
1076 [in] uint32 offered,
1077 [out,unique] DATA_BLOB *info,
1078 [out,ref] uint32 *needed,
1079 [out,ref] uint32 *count
1081 [public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
1084 [out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
1086 [nopull,nopush] WERROR spoolss_EnumPrintProcessors(
1087 [in,unique] [string,charset(UTF16)] uint16 *servername,
1088 [in,unique] [string,charset(UTF16)] uint16 *environment,
1090 [in,unique] DATA_BLOB *buffer,
1091 [in] uint32 offered,
1092 [out,ref] uint32 *count,
1093 [out,unique,switch_is(level),size_is(*count)] spoolss_PrintProcessorInfo *info,
1094 [out,ref] uint32 *needed
1097 /******************/
1098 /* Function: 0x10 */
1099 typedef [public,gensize] struct {
1100 nstring directory_name;
1101 } spoolss_PrintProcessorDirectoryInfo1;
1103 typedef [nodiscriminant,relative_base,gensize,public] union {
1104 [case(1)] spoolss_PrintProcessorDirectoryInfo1 info1;
1105 [default] spoolss_PrintProcessorDirectoryInfo1 info1;
1106 } spoolss_PrintProcessorDirectoryInfo;
1108 WERROR spoolss_GetPrintProcessorDirectory(
1109 [in,unique] [string,charset(UTF16)] uint16 *server,
1110 [in,unique] [string,charset(UTF16)] uint16 *environment,
1112 [in,unique] DATA_BLOB *buffer,
1113 [in] uint32 offered,
1114 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrintProcessorDirectoryInfo *info,
1115 [out,ref] uint32 *needed
1118 /******************/
1119 /* Function: 0x11 */
1121 [string,charset(UTF16)] uint16 *document_name;
1122 [string,charset(UTF16)] uint16 *output_file;
1123 [string,charset(UTF16)] uint16 *datatype;
1124 } spoolss_DocumentInfo1;
1126 typedef [switch_type(uint32)] union {
1127 [case(1)] spoolss_DocumentInfo1 *info1;
1128 [case(2)]; /* TODO */
1129 [case(3)]; /* TODO */
1131 } spoolss_DocumentInfo;
1133 WERROR spoolss_StartDocPrinter(
1134 [in,ref] policy_handle *handle,
1136 [in,switch_is(level)] spoolss_DocumentInfo info,
1137 [out,ref] uint32 *job_id
1140 /******************/
1141 /* Function: 0x12 */
1142 WERROR spoolss_StartPagePrinter(
1143 [in,ref] policy_handle *handle
1146 /******************/
1147 /* Function: 0x13 */
1148 WERROR spoolss_WritePrinter(
1149 [in,ref] policy_handle *handle,
1150 [in] DATA_BLOB data,
1151 [in,value(r->in.data.length)] uint32 _data_size,
1152 [out,ref] uint32 *num_written
1155 /******************/
1156 /* Function: 0x14 */
1157 WERROR spoolss_EndPagePrinter(
1158 [in,ref] policy_handle *handle
1161 /******************/
1162 /* Function: 0x15 */
1163 WERROR spoolss_AbortPrinter(
1164 [in,ref] policy_handle *handle
1167 /******************/
1168 /* Function: 0x16 */
1169 WERROR spoolss_ReadPrinter(
1170 [in,ref] policy_handle *handle,
1171 [out,ref] [size_is(data_size)] uint8 *data,
1172 [in] uint32 data_size,
1173 [out,ref] uint32 *_data_size
1176 /******************/
1177 /* Function: 0x17 */
1178 WERROR spoolss_EndDocPrinter(
1179 [in,ref] policy_handle *handle
1182 /******************/
1183 /* Function: 0x18 */
1184 WERROR spoolss_AddJob(
1185 [in,ref] policy_handle *handle,
1187 [in,out,unique] [size_is(offered)] uint8 *buffer,
1188 [in] uint32 offered,
1189 [out,ref] uint32 *needed
1192 /******************/
1193 /* Function: 0x19 */
1194 WERROR spoolss_ScheduleJob(
1195 [in,ref] policy_handle *handle,
1199 /******************/
1200 /* Function: 0x1a */
1201 const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86";
1202 const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool";
1204 typedef [public,gensize] struct {
1205 [value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
1209 [value(2)] uint32 unknown;
1210 [subcontext(0),subcontext_size(256)] nstring extra_string;
1211 } spoolss_OSVersion;
1213 typedef [public,gensize] struct {
1214 [value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
1218 [value(2)] uint32 unknown1;
1219 [subcontext(0),subcontext_size(256)] nstring extra_string;
1220 uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/
1221 uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */
1222 } spoolss_OSVersionEx;
1224 typedef [v1_enum] enum {
1225 SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
1226 SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
1227 SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3,
1228 SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4,
1229 SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7
1230 } spoolss_PrinterDataType;
1232 typedef [nodiscriminant,public,gensize] union {
1233 [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
1234 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
1235 [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
1236 [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
1237 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array;
1238 [default,flag(NDR_REMAINING)] DATA_BLOB data;
1239 } spoolss_PrinterData;
1241 [noopnum,noprint,public] WERROR _spoolss_GetPrinterData(
1242 [in,ref] policy_handle *handle,
1243 [in] [string,charset(UTF16)] uint16 value_name[],
1244 [in] uint32 offered,
1245 [out,ref] spoolss_PrinterDataType *type,
1246 [out] DATA_BLOB data,
1247 [out,ref] uint32 *needed
1249 [noopnum,noprint,public] void __spoolss_GetPrinterData(
1250 [in] spoolss_PrinterDataType type,
1251 [out,switch_is(type)] spoolss_PrinterData data
1253 [nopull,nopush,public] WERROR spoolss_GetPrinterData(
1254 [in,ref] policy_handle *handle,
1255 [in] [string,charset(UTF16)] uint16 value_name[],
1256 [in] uint32 offered,
1257 [out,ref] spoolss_PrinterDataType *type,
1258 [out,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData data,
1259 [out,ref] uint32 *needed
1262 /******************/
1263 /* Function: 0x1b */
1264 [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData(
1265 [in,ref] policy_handle *handle,
1266 [in] [string,charset(UTF16)] uint16 value_name[],
1267 [in] spoolss_PrinterDataType type,
1268 [in] DATA_BLOB data,
1269 [in] uint32 _offered
1271 [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
1272 [in] spoolss_PrinterDataType type,
1273 [out,switch_is(type)] spoolss_PrinterData data
1275 [nopush] WERROR spoolss_SetPrinterData(
1276 [in,ref] policy_handle *handle,
1277 [in] [string,charset(UTF16)] uint16 value_name[],
1278 [in] spoolss_PrinterDataType type,
1279 [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
1280 [in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
1283 /******************/
1284 /* Function: 0x1c */
1285 [todo] WERROR spoolss_WaitForPrinterChange(
1288 /******************/
1289 /* Function: 0x1d */
1290 [public] WERROR spoolss_ClosePrinter(
1291 [in,out,ref] policy_handle *handle
1294 /******************/
1295 /* Function: 0x1e */
1296 typedef [v1_enum] enum {
1297 SPOOLSS_FORM_USER = 0,
1298 SPOOLSS_FORM_BUILTIN = 1,
1299 SPOOLSS_FORM_PRINTER = 2
1300 } spoolss_FormFlags;
1315 spoolss_FormFlags flags;
1316 [relative] nstring *form_name;
1317 spoolss_FormSize size;
1318 spoolss_FormArea area;
1319 } spoolss_FormInfo1;
1321 typedef [bitmap32bit] bitmap {
1322 SPOOLSS_FORM_STRING_TYPE_NONE = 0x00000001,
1323 SPOOLSS_FORM_STRING_TYPE_MUI_DLL = 0x00000002,
1324 SPOOLSS_FORM_STRING_TYPE_LANG_PAIR = 0x00000004
1325 } spoolss_FormStringType;
1328 spoolss_FormFlags flags;
1329 [relative] nstring *form_name;
1330 spoolss_FormSize size;
1331 spoolss_FormArea area;
1332 [relative] astring *keyword;
1333 spoolss_FormStringType string_type;
1334 [relative] nstring *mui_dll;
1335 uint32 ressource_id;
1336 [relative] nstring *display_name;
1338 } spoolss_FormInfo2;
1340 typedef [nodiscriminant,relative_base,public,gensize] union {
1341 [case(1)] spoolss_FormInfo1 info1;
1342 [case(2)] spoolss_FormInfo2 info2;
1347 spoolss_FormFlags flags;
1348 [string,charset(UTF16)] uint16 *form_name;
1349 spoolss_FormSize size;
1350 spoolss_FormArea area;
1351 } spoolss_AddFormInfo1;
1354 spoolss_FormFlags flags;
1355 [string,charset(UTF16)] uint16 *form_name;
1356 spoolss_FormSize size;
1357 spoolss_FormArea area;
1358 [string,charset(DOS)] uint8 *keyword;
1359 spoolss_FormStringType string_type;
1360 [string,charset(UTF16)] uint16 *mui_dll;
1361 uint32 ressource_id;
1362 [string,charset(UTF16)] uint16 *display_name;
1364 } spoolss_AddFormInfo2;
1366 typedef [switch_type(uint32)] union {
1367 [case(1)] spoolss_AddFormInfo1 *info1;
1368 [case(2)] spoolss_AddFormInfo2 *info2;
1369 } spoolss_AddFormInfo;
1371 WERROR spoolss_AddForm(
1372 [in,ref] policy_handle *handle,
1374 [in,switch_is(level)] spoolss_AddFormInfo info
1377 /******************/
1378 /* Function: 0x1f */
1379 WERROR spoolss_DeleteForm(
1380 [in,ref] policy_handle *handle,
1381 [in] [string,charset(UTF16)] uint16 form_name[]
1384 /******************/
1385 /* Function: 0x20 */
1386 WERROR spoolss_GetForm(
1387 [in,ref] policy_handle *handle,
1388 [in] [string,charset(UTF16)] uint16 form_name[],
1390 [in,unique] DATA_BLOB *buffer,
1391 [in] uint32 offered,
1392 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
1393 [out,ref] uint32 *needed
1396 /******************/
1397 /* Function: 0x21 */
1398 WERROR spoolss_SetForm(
1399 [in,ref] policy_handle *handle,
1400 [in] [string,charset(UTF16)] uint16 form_name[],
1402 [in,switch_is(level)] spoolss_AddFormInfo info
1405 /******************/
1406 /* Function: 0x22 */
1407 [public,noopnum,noprint] WERROR _spoolss_EnumForms(
1408 [in,ref] policy_handle *handle,
1410 [in,unique] DATA_BLOB *buffer,
1411 [in] uint32 offered,
1412 [out,unique] DATA_BLOB *info,
1413 [out,ref] uint32 *needed,
1414 [out,ref] uint32 *count
1416 [public,noopnum,noprint] void __spoolss_EnumForms(
1419 [out,switch_is(level)] spoolss_FormInfo info[count]
1421 [nopull,nopush] WERROR spoolss_EnumForms(
1422 [in,ref] policy_handle *handle,
1424 [in,unique] DATA_BLOB *buffer,
1425 [in] uint32 offered,
1426 [out,ref] uint32 *count,
1427 [out,unique,switch_is(level),size_is(*count)] spoolss_FormInfo *info,
1428 [out,ref] uint32 *needed
1432 [relative] nstring *port_name;
1433 } spoolss_PortInfo1;
1436 SPOOLSS_PORT_TYPE_WRITE = 0x00000001,
1437 SPOOLSS_PORT_TYPE_READ = 0x00000002,
1438 SPOOLSS_PORT_TYPE_REDIRECTED = 0x00000004,
1439 SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008
1443 [relative] nstring *port_name;
1444 [relative] nstring *monitor_name;
1445 [relative] nstring *description;
1446 spoolss_PortType port_type;
1448 } spoolss_PortInfo2;
1450 typedef [nodiscriminant,relative_base,public] union {
1451 [case(1)] spoolss_PortInfo1 info1;
1452 [case(2)] spoolss_PortInfo2 info2;
1453 [case(3)]; /* TODO */
1457 /******************/
1458 /* Function: 0x23 */
1459 [public,noopnum,noprint] WERROR _spoolss_EnumPorts(
1460 [in,unique] [string,charset(UTF16)] uint16 *servername,
1462 [in,unique] DATA_BLOB *buffer,
1463 [in] uint32 offered,
1464 [out,unique] DATA_BLOB *info,
1465 [out,ref] uint32 *needed,
1466 [out,ref] uint32 *count
1468 [public,noopnum,noprint] void __spoolss_EnumPorts(
1471 [out,switch_is(level)] spoolss_PortInfo info[count]
1473 [nopull,nopush] WERROR spoolss_EnumPorts(
1474 [in,unique] [string,charset(UTF16)] uint16 *servername,
1476 [in,unique] DATA_BLOB *buffer,
1477 [in] uint32 offered,
1478 [out,ref] uint32 *count,
1479 [out,unique,switch_is(level),size_is(*count)] spoolss_PortInfo *info,
1480 [out,ref] uint32 *needed
1483 /******************/
1484 /* Function: 0x24 */
1486 [relative] nstring *monitor_name;
1487 } spoolss_MonitorInfo1;
1490 [relative] nstring *monitor_name;
1491 [relative] nstring *environment;
1492 [relative] nstring *dll_name;
1493 } spoolss_MonitorInfo2;
1495 typedef [nodiscriminant,relative_base,public] union {
1496 [case(1)] spoolss_MonitorInfo1 info1;
1497 [case(2)] spoolss_MonitorInfo2 info2;
1499 } spoolss_MonitorInfo;
1501 [public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
1502 [in,unique] [string,charset(UTF16)] uint16 *servername,
1504 [in,unique] DATA_BLOB *buffer,
1505 [in] uint32 offered,
1506 [out,unique] DATA_BLOB *info,
1507 [out,ref] uint32 *needed,
1508 [out,ref] uint32 *count
1510 [public,noopnum,noprint] void __spoolss_EnumMonitors(
1513 [out,switch_is(level)] spoolss_MonitorInfo info[count]
1515 [nopull,nopush] WERROR spoolss_EnumMonitors(
1516 [in,unique] [string,charset(UTF16)] uint16 *servername,
1518 [in,unique] DATA_BLOB *buffer,
1519 [in] uint32 offered,
1520 [out,ref] uint32 *count,
1521 [out,unique,switch_is(level),size_is(*count)] spoolss_MonitorInfo *info,
1522 [out,ref] uint32 *needed
1525 /******************/
1526 /* Function: 0x25 */
1527 WERROR spoolss_AddPort(
1528 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1529 [in] uint32 unknown,
1530 [in] [string,charset(UTF16)] uint16 monitor_name[]
1533 /******************/
1534 /* Function: 0x26 */
1535 [todo] WERROR spoolss_ConfigurePort(
1538 /******************/
1539 /* Function: 0x27 */
1540 [todo] WERROR spoolss_DeletePort(
1543 /******************/
1544 /* Function: 0x28 */
1545 [todo] WERROR spoolss_CreatePrinterIC(
1548 /******************/
1549 /* Function: 0x29 */
1550 [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC(
1553 /******************/
1554 /* Function: 0x2a */
1555 [todo] WERROR spoolss_DeletePrinterIC(
1558 /******************/
1559 /* Function: 0x2b */
1560 [todo] WERROR spoolss_AddPrinterConnection(
1563 /******************/
1564 /* Function: 0x2c */
1565 [todo] WERROR spoolss_DeletePrinterConnection(
1568 /******************/
1569 /* Function: 0x2d */
1570 [todo] WERROR spoolss_PrinterMessageBox(
1571 /* Marked as obsolete in MSDN. "Not necessary and has
1575 /******************/
1576 /* Function: 0x2e */
1577 [todo] WERROR spoolss_AddMonitor(
1580 /******************/
1581 /* Function: 0x2f */
1582 [todo] WERROR spoolss_DeleteMonitor(
1585 /******************/
1586 /* Function: 0x30 */
1587 [todo] WERROR spoolss_DeletePrintProcessor(
1590 /******************/
1591 /* Function: 0x31 */
1592 [todo] WERROR spoolss_AddPrintProvidor(
1595 /******************/
1596 /* Function: 0x32 */
1597 [todo] WERROR spoolss_DeletePrintProvidor(
1600 /******************/
1601 /* Function: 0x33 */
1602 [todo] WERROR spoolss_EnumPrintProcDataTypes(
1605 /******************/
1606 /* Function: 0x34 */
1607 WERROR spoolss_ResetPrinter(
1608 [in,ref] policy_handle *handle,
1609 [in,unique] [string,charset(UTF16)] uint16 *data_type,
1610 [in,ref] spoolss_DevmodeContainer *devmode_ctr
1613 /******************/
1614 /* Function: 0x35 */
1615 WERROR spoolss_GetPrinterDriver2(
1616 [in,ref] policy_handle *handle,
1617 [in,unique] [string,charset(UTF16)] uint16 *architecture,
1619 [in,unique] DATA_BLOB *buffer,
1620 [in] uint32 offered,
1621 [in] uint32 client_major_version,
1622 [in] uint32 client_minor_version,
1623 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverInfo *info,
1624 [out,ref] uint32 *needed,
1625 [out,ref] uint32 *server_major_version,
1626 [out,ref] uint32 *server_minor_version
1629 /******************/
1630 /* Function: 0x36 */
1631 [todo] WERROR spoolss_FindFirstPrinterChangeNotification(
1634 /******************/
1635 /* Function: 0x37 */
1636 [todo] WERROR spoolss_FindNextPrinterChangeNotification(
1639 /******************/
1640 /* Function: 0x38 */
1641 [public] WERROR spoolss_FindClosePrinterNotify(
1642 [in,ref] policy_handle *handle
1645 /******************/
1646 /* Function: 0x39 */
1647 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
1650 /******************/
1651 /* Function: 0x3a */
1652 [public] WERROR spoolss_ReplyOpenPrinter(
1653 [in,string,charset(UTF16)] uint16 server_name[],
1654 [in] uint32 printer_local,
1655 [in] winreg_Type type,
1656 [in,range(0,512)] uint32 bufsize,
1657 [in,unique,size_is(bufsize)] uint8 *buffer,
1658 [out,ref] policy_handle *handle
1661 /******************/
1662 /* Function: 0x3b */
1664 typedef [bitmap32bit] bitmap {
1665 PRINTER_CHANGE_ADD_PRINTER = 0x00000001,
1666 PRINTER_CHANGE_SET_PRINTER = 0x00000002,
1667 PRINTER_CHANGE_DELETE_PRINTER = 0x00000004,
1668 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008,
1669 PRINTER_CHANGE_ADD_JOB = 0x00000100,
1670 PRINTER_CHANGE_SET_JOB = 0x00000200,
1671 PRINTER_CHANGE_DELETE_JOB = 0x00000400,
1672 PRINTER_CHANGE_WRITE_JOB = 0x00000800,
1673 PRINTER_CHANGE_ADD_FORM = 0x00010000,
1674 PRINTER_CHANGE_SET_FORM = 0x00020000,
1675 PRINTER_CHANGE_DELETE_FORM = 0x00040000,
1676 PRINTER_CHANGE_ADD_PORT = 0x00100000,
1677 PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000,
1678 PRINTER_CHANGE_DELETE_PORT = 0x00400000,
1679 PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000,
1680 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000,
1681 PRINTER_CHANGE_SERVER = 0x08000000,
1682 PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000,
1683 PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000,
1684 PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000,
1685 PRINTER_CHANGE_TIMEOUT = 0x80000000
1686 } spoolss_PrinterChangeFlags;
1688 const int PRINTER_CHANGE_PRINTER = 0x000000FF;
1690 const int PRINTER_CHANGE_JOB = 0x0000FF00;
1692 const int PRINTER_CHANGE_FORM = (PRINTER_CHANGE_ADD_FORM |
1693 PRINTER_CHANGE_SET_FORM |
1694 PRINTER_CHANGE_DELETE_FORM); /* 0x00070000 */
1696 const int PRINTER_CHANGE_PORT = (PRINTER_CHANGE_ADD_PORT |
1697 PRINTER_CHANGE_CONFIGURE_PORT |
1698 PRINTER_CHANGE_DELETE_PORT); /* 0x00700000 */
1700 const int PRINTER_CHANGE_PRINT_PROCESSOR = 0x07000000;
1702 const int PRINTER_CHANGE_PRINTER_DRIVER = (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
1703 PRINTER_CHANGE_SET_PRINTER_DRIVER |
1704 PRINTER_CHANGE_DELETE_PRINTER_DRIVER); /* 0x70000000 */
1706 const int PRINTER_CHANGE_ALL = (PRINTER_CHANGE_PRINTER |
1707 PRINTER_CHANGE_JOB |
1708 PRINTER_CHANGE_FORM |
1709 PRINTER_CHANGE_PORT |
1710 PRINTER_CHANGE_PRINT_PROCESSOR |
1711 PRINTER_CHANGE_PRINTER_DRIVER); /* 0x7777FFFF */
1712 WERROR spoolss_RouterReplyPrinter(
1713 [in,ref] policy_handle *handle,
1714 [in] spoolss_PrinterChangeFlags flags,
1715 [in,range(0,512)] uint32 bufsize,
1716 [in,unique,size_is(bufsize)] uint8 *buffer
1719 /******************/
1720 /* Function: 0x3c */
1721 [public] WERROR spoolss_ReplyClosePrinter(
1722 [in,out,ref] policy_handle *handle
1725 /******************/
1726 /* Function: 0x3d */
1727 [todo] WERROR spoolss_AddPortEx(
1730 /******************/
1731 /* Function: 0x3e */
1732 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification(
1735 /******************/
1736 /* Function: 0x3f */
1737 [todo] WERROR spoolss_SpoolerInit(
1740 /******************/
1741 /* Function: 0x40 */
1742 [todo] WERROR spoolss_ResetPrinterEx(
1745 typedef [enum16bit] enum {
1746 SPOOLSS_FIELD_SERVER_NAME = 0,
1747 SPOOLSS_FIELD_PRINTER_NAME = 1,
1748 SPOOLSS_FIELD_SHARE_NAME = 2,
1749 SPOOLSS_FIELD_PORT_NAME = 3,
1750 SPOOLSS_FIELD_DRIVER_NAME = 4,
1751 SPOOLSS_FIELD_COMMENT = 5,
1752 SPOOLSS_FIELD_LOCATION = 6,
1753 SPOOLSS_FIELD_DEVMODE = 7,
1754 SPOOLSS_FIELD_SEPFILE = 8,
1755 SPOOLSS_FIELD_PRINT_PROCESSOR = 9,
1756 SPOOLSS_FIELD_PARAMETERS = 10,
1757 SPOOLSS_FIELD_DATATYPE = 11,
1758 SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12,
1759 SPOOLSS_FIELD_ATTRIBUTES = 13,
1760 SPOOLSS_FIELD_PRIORITY = 14,
1761 SPOOLSS_FIELD_DEFAULT_PRIORITY = 15,
1762 SPOOLSS_FIELD_START_TIME = 16,
1763 SPOOLSS_FIELD_UNTIL_TIME = 17,
1764 SPOOLSS_FIELD_STATUS = 18,
1765 SPOOLSS_FIELD_STATUS_STRING = 19,
1766 SPOOLSS_FIELD_CJOBS = 20,
1767 SPOOLSS_FIELD_AVERAGE_PPM = 21,
1768 SPOOLSS_FIELD_TOTAL_PAGES = 22,
1769 SPOOLSS_FIELD_PAGES_PRINTED = 23,
1770 SPOOLSS_FIELD_TOTAL_BYTES = 24,
1771 SPOOLSS_FIELD_BYTES_PRINTED = 25
1774 typedef [enum16bit] enum {
1775 SPOOLSS_NOTIFY_PRINTER = 0,
1776 SPOOLSS_NOTIFY_JOB = 1
1777 } spoolss_NotifyType;
1779 /******************/
1780 /* Function: 0x41 */
1782 spoolss_NotifyType type;
1787 [size_is(count)] spoolss_Field *fields;
1788 } spoolss_NotifyOptionType;
1790 typedef [bitmap32bit] bitmap {
1791 PRINTER_NOTIFY_OPTIONS_REFRESH = 0x00000001
1792 } spoolssNotifyOptionFlags;
1795 [value(2)] uint32 version;
1796 spoolssNotifyOptionFlags flags;
1798 [size_is(count)] spoolss_NotifyOptionType *types;
1799 } spoolss_NotifyOption;
1801 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
1802 [in,ref] policy_handle *handle,
1803 [in] spoolss_PrinterChangeFlags flags,
1804 [in] uint32 options,
1805 [in,unique] [string,charset(UTF16)] uint16 *local_machine,
1806 [in] uint32 printer_local,
1807 [in,unique] spoolss_NotifyOption *notify_options
1810 /******************/
1811 /* Function: 0x42 */
1815 [size_is(size/2),unique,charset(UTF16)] uint16 *string;
1816 } spoolss_NotifyString;
1818 typedef [v1_enum] enum {
1819 NOTIFY_TABLE_DWORD = 0x0001,
1820 NOTIFY_TABLE_STRING = 0x0002,
1821 NOTIFY_TABLE_DEVMODE = 0x0003,
1822 NOTIFY_TABLE_TIME = 0x0004,
1823 NOTIFY_TABLE_SECURITYDESCRIPTOR = 0x0005
1824 } spoolss_NotifyTable;
1826 typedef [switch_type(uint32)] union {
1827 [case(1)] uint32 integer[2];
1828 [case(2)] spoolss_NotifyString string;
1829 [case(3)] spoolss_DevmodeContainer devmode;
1830 [case(4)] spoolss_TimeCtr time;
1831 [case(5)] sec_desc_buf sd;
1832 } spoolss_NotifyData;
1835 spoolss_NotifyType type;
1836 spoolss_Field field;
1837 spoolss_NotifyTable variable_type;
1839 [switch_is(variable_type)] spoolss_NotifyData data;
1843 [value(2)] uint32 version;
1846 [size_is(count)] spoolss_Notify notifies[];
1847 } spoolss_NotifyInfo;
1849 typedef [switch_type(uint32)] union {
1850 [case(0)] spoolss_NotifyInfo *info0;
1851 } spoolss_ReplyPrinterInfo;
1853 typedef [bitmap32bit] bitmap {
1854 PRINTER_NOTIFY_INFO_DISCARDED = 0x00000001,
1855 PRINTER_NOTIFY_INFO_DISCARDNOTED = 0x00010000,
1856 PRINTER_NOTIFY_INFO_COLOR_MISMATCH = 0x00080000
1857 } spoolss_PrinterNotifyFlags;
1859 WERROR spoolss_RouterReplyPrinterEx(
1860 [in,ref] policy_handle *handle,
1862 [in] spoolss_PrinterChangeFlags flags,
1863 [out,ref] spoolss_PrinterNotifyFlags *reply_result,
1864 [in] uint32 reply_type,
1865 [in,switch_is(reply_type)] spoolss_ReplyPrinterInfo info
1868 /******************/
1869 /* Function: 0x43 */
1870 [public] WERROR spoolss_RouterRefreshPrinterChangeNotify(
1871 [in,ref] policy_handle *handle,
1872 [in] uint32 change_low,
1873 [in,unique] spoolss_NotifyOption *options,
1874 [out,ref] spoolss_NotifyInfo **info
1877 /******************/
1878 /* Function: 0x44 */
1879 [todo] WERROR spoolss_44(
1884 [string,charset(UTF16)] uint16 *client;
1885 [string,charset(UTF16)] uint16 *user;
1887 spoolss_MajorVersion major;
1888 spoolss_MinorVersion minor;
1889 spoolss_ProcessorArchitecture processor;
1890 } spoolss_UserLevel1;
1894 } spoolss_UserLevel2;
1900 [string,charset(UTF16)] uint16 *client;
1901 [string,charset(UTF16)] uint16 *user;
1903 spoolss_MajorVersion major;
1904 spoolss_MinorVersion minor;
1905 spoolss_ProcessorArchitecture processor;
1907 } spoolss_UserLevel3;
1909 typedef [switch_type(uint32)] union {
1910 [case(1)] spoolss_UserLevel1 *level1;
1911 [case(2)] spoolss_UserLevel2 *level2;
1912 [case(3)] spoolss_UserLevel3 *level3;
1913 } spoolss_UserLevel;
1917 [switch_is(level)] spoolss_UserLevel user_info;
1918 } spoolss_UserLevelCtr;
1921 SERVER_ACCESS_ADMINISTER = 0x00000001,
1922 SERVER_ACCESS_ENUMERATE = 0x00000002,
1923 PRINTER_ACCESS_ADMINISTER = 0x00000004,
1924 PRINTER_ACCESS_USE = 0x00000008,
1925 JOB_ACCESS_ADMINISTER = 0x00000010,
1926 JOB_ACCESS_READ = 0x00000020
1927 } spoolss_AccessRights;
1929 /* Access rights for print servers */
1930 const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED |
1931 SERVER_ACCESS_ADMINISTER |
1932 SERVER_ACCESS_ENUMERATE;
1934 const int SERVER_READ = SEC_STD_READ_CONTROL |
1935 SERVER_ACCESS_ENUMERATE;
1937 const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1938 SERVER_ACCESS_ADMINISTER |
1939 SERVER_ACCESS_ENUMERATE;
1941 const int SERVER_EXECUTE = SEC_STD_READ_CONTROL |
1942 SERVER_ACCESS_ENUMERATE;
1944 /* Access rights for printers */
1945 const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED |
1946 PRINTER_ACCESS_ADMINISTER |
1949 const int PRINTER_READ = SEC_STD_READ_CONTROL |
1952 const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1955 const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL |
1958 /* Access rights for jobs */
1959 const int JOB_ALL_ACCESS = SEC_STD_REQUIRED |
1960 JOB_ACCESS_ADMINISTER;
1962 const int JOB_READ = SEC_STD_READ_CONTROL |
1963 JOB_ACCESS_ADMINISTER;
1965 const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1966 JOB_ACCESS_ADMINISTER;
1968 const int JOB_EXECUTE = SEC_STD_READ_CONTROL |
1969 JOB_ACCESS_ADMINISTER;
1971 /* ACE masks for various print permissions */
1972 const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL |
1975 const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL |
1976 READ_CONTROL_ACCESS;
1978 const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS |
1979 READ_CONTROL_ACCESS |
1982 /******************/
1983 /* Function: 0x45 */
1984 [public] WERROR spoolss_OpenPrinterEx(
1985 [in,unique] [string,charset(UTF16)] uint16 *printername,
1986 [in,unique] [string,charset(UTF16)] uint16 *datatype,
1987 [in] spoolss_DevmodeContainer devmode_ctr,
1988 [in] spoolss_AccessRights access_mask,
1990 [in,switch_is(level)] spoolss_UserLevel userlevel,
1991 [out,ref] policy_handle *handle
1994 /******************/
1995 /* Function: 0x46 */
1996 WERROR spoolss_AddPrinterEx(
1997 [in,unique] [string,charset(UTF16)] uint16 *server,
1998 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
1999 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
2000 [in,ref] sec_desc_buf *secdesc_ctr,
2001 [in,ref] spoolss_UserLevelCtr *userlevel_ctr,
2002 [out,ref] policy_handle *handle
2005 /******************/
2006 /* Function: 0x47 */
2007 [todo] WERROR spoolss_47(
2010 /******************/
2011 /* Function: 0x48 */
2012 WERROR spoolss_EnumPrinterData(
2013 [in,ref] policy_handle *handle,
2014 [in] uint32 enum_index,
2015 [out,size_is(value_offered/2),charset(UTF16)] uint16 value_name[],
2016 [in] uint32 value_offered,
2017 [out,ref] uint32 *value_needed,
2018 [out,ref] uint32 *printerdata_type,
2019 [out,ref] DATA_BLOB *buffer,
2020 [in] uint32 data_offered,
2021 [out,ref] uint32 *data_needed
2024 /******************/
2025 /* Function: 0x49 */
2026 WERROR spoolss_DeletePrinterData(
2027 [in,ref] policy_handle *handle,
2028 [in] [string,charset(UTF16)] uint16 value_name[]
2031 /******************/
2032 /* Function: 0x4a */
2033 [todo] WERROR spoolss_4a(
2036 /******************/
2037 /* Function: 0x4b */
2038 [todo] WERROR spoolss_4b(
2041 /******************/
2042 /* Function: 0x4c */
2043 [todo] WERROR spoolss_4c(
2046 /******************/
2047 /* Function: 0x4d */
2048 WERROR spoolss_SetPrinterDataEx(
2049 [in,ref] policy_handle *handle,
2050 [in] [string,charset(UTF16)] uint16 key_name[],
2051 [in] [string,charset(UTF16)] uint16 value_name[],
2053 [in,ref] [size_is(offered)] uint8 *buffer,
2057 /******************/
2058 /* Function: 0x4e */
2059 WERROR spoolss_GetPrinterDataEx(
2060 [in,ref] policy_handle *handle,
2061 [in] [string,charset(UTF16)] uint16 key_name[],
2062 [in] [string,charset(UTF16)] uint16 value_name[],
2063 [out,ref] uint32 *type,
2064 [out,ref] [size_is(offered)] uint8 *buffer,
2065 [in] uint32 offered,
2066 [out,ref] uint32 *needed
2069 /******************/
2070 /* Function: 0x4f */
2071 [public] WERROR spoolss_EnumPrinterDataEx(
2072 [in,ref] policy_handle *handle,
2073 [in] [string,charset(UTF16)] uint16 key_name[],
2074 [out,ref] [size_is(offered)] uint8 *buffer,
2075 [in] uint32 offered,
2076 [out,ref] uint32 *needed,
2077 [out,ref] uint32 *count
2080 /******************/
2081 /* Function: 0x50 */
2082 [public] WERROR spoolss_EnumPrinterKey(
2083 [in, ref] policy_handle *handle,
2084 [in] [string,charset(UTF16)] uint16 key_name[],
2085 [out,ref] [size_is(key_buffer_size/2)] uint16 *key_buffer,
2086 [in] uint32 key_buffer_size,
2087 [out,ref] uint32 *needed
2090 /******************/
2091 /* Function: 0x51 */
2092 WERROR spoolss_DeletePrinterDataEx(
2093 [in,ref] policy_handle *handle,
2094 [in] [string,charset(UTF16)] uint16 key_name[],
2095 [in] [string,charset(UTF16)] uint16 value_name[]
2098 /******************/
2099 /* Function: 0x52 */
2100 WERROR spoolss_DeletePrinterKey(
2101 [in,ref] policy_handle *handle,
2102 [in] [string,charset(UTF16)] uint16 key_name[]
2105 /******************/
2106 /* Function: 0x53 */
2107 [todo] WERROR spoolss_53(
2110 /******************/
2111 /* Function: 0x54 */
2112 typedef [public,bitmap32bit] bitmap {
2113 DPD_DELETE_UNUSED_FILES = 0x00000001,
2114 DPD_DELETE_SPECIFIC_VERSION = 0x00000002,
2115 DPD_DELETE_ALL_FILES = 0x00000004
2116 } spoolss_DeleteDriverFlags;
2118 WERROR spoolss_DeletePrinterDriverEx(
2119 [in,unique] [string,charset(UTF16)] uint16 *server,
2120 [in] [string,charset(UTF16)] uint16 architecture[],
2121 [in] [string,charset(UTF16)] uint16 driver[],
2122 [in] spoolss_DeleteDriverFlags delete_flags,
2126 /******************/
2127 /* Function: 0x55 */
2128 [todo] WERROR spoolss_55(
2131 /******************/
2132 /* Function: 0x56 */
2133 [todo] WERROR spoolss_56(
2136 /******************/
2137 /* Function: 0x57 */
2138 [todo] WERROR spoolss_57(
2141 /******************/
2142 /* Function: 0x58 */
2144 typedef [v1_enum] enum {
2145 PROTOCOL_RAWTCP_TYPE = 1,
2146 PROTOCOL_LPR_TYPE = 2
2147 } spoolss_PortProtocol;
2149 typedef [public] struct {
2150 [charset(UTF16)] uint16 portname[64];
2151 [value(0x00000001)] uint32 version;
2152 spoolss_PortProtocol protocol;
2153 [value(sizeof(r))] uint32 size;
2155 [charset(UTF16)] uint16 hostaddress[49];
2156 [charset(UTF16)] uint16 snmpcommunity[33];
2158 [charset(UTF16)] uint16 queue[33];
2159 [charset(UTF16)] uint16 ip_address[16]; /* s3 had 17 */
2160 [charset(UTF16)] uint16 hardware_address[13];
2161 [charset(UTF16)] uint16 device_type[257];
2163 boolean32 snmp_enabled;
2164 uint32 snmp_dev_index;
2165 } spoolss_PortData1;
2167 typedef [public] struct {
2168 [charset(UTF16)] uint16 portname[64];
2169 [value(0x00000002)] uint32 version;
2170 spoolss_PortProtocol protocol;
2171 [value(sizeof(r))] uint32 size;
2173 [charset(UTF16)] uint16 hostaddress[128];
2174 [charset(UTF16)] uint16 snmpcommunity[33];
2176 [charset(UTF16)] uint16 queue[33];
2177 [charset(UTF16)] uint16 device_type[257];
2179 boolean32 snmp_enabled;
2180 uint32 snmp_dev_index;
2181 uint32 port_monitor_mib_index;
2182 } spoolss_PortData2;
2184 typedef [public] struct {
2186 } spoolss_MonitorUi;
2188 WERROR spoolss_XcvData(
2189 [in,ref] policy_handle *handle,
2190 [in] [string,charset(UTF16)] uint16 function_name[],
2191 [in] DATA_BLOB in_data,
2192 [in,value(r->in.in_data.length)] uint32 _in_data_length,
2193 [out,ref] [size_is(out_data_size)] uint8 *out_data,
2194 [in] uint32 out_data_size,
2195 [out,ref] uint32 *needed,
2196 [in,out,ref] uint32 *status_code
2199 /******************/
2200 /* Function: 0x59 */
2202 typedef [bitmap32bit] bitmap {
2203 APD_STRICT_UPGRADE = 0x00000001,
2204 APD_STRICT_DOWNGRADE = 0x00000002,
2205 APD_COPY_ALL_FILES = 0x00000004,
2206 APD_COPY_NEW_FILES = 0x00000008,
2207 APD_COPY_FROM_DIRECTORY = 0x00000010,
2208 APD_DONT_COPY_FILES_TO_CLUSTER = 0x00001000,
2209 APD_COPY_TO_ALL_SPOOLERS = 0x00002000,
2210 APD_RETURN_BLOCKING_STATUS_CODE = 0x00010000
2211 } spoolss_AddPrinterDriverExFlags;
2213 [public] WERROR spoolss_AddPrinterDriverEx(
2214 [in,unique] [string,charset(UTF16)] uint16 *servername,
2215 [in,ref] spoolss_AddDriverInfoCtr *info_ctr,
2216 [in] spoolss_AddPrinterDriverExFlags flags
2219 /******************/
2220 /* Function: 0x5a */
2221 [todo] WERROR spoolss_5a(
2224 /******************/
2225 /* Function: 0x5b */
2226 [todo] WERROR spoolss_5b(
2229 /******************/
2230 /* Function: 0x5c */
2231 [todo] WERROR spoolss_5c(
2234 /******************/
2235 /* Function: 0x5d */
2236 [todo] WERROR spoolss_5d(
2239 /******************/
2240 /* Function: 0x5e */
2241 [todo] WERROR spoolss_5e(
2244 /******************/
2245 /* Function: 0x5f */
2246 [todo] WERROR spoolss_5f(