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_JOB_CONTROL_RETAIN = 8,
499 SPOOLSS_JOB_CONTROL_RELEASE = 9
500 } spoolss_JobControl;
502 WERROR spoolss_SetJob(
503 [in,ref] policy_handle *handle,
505 [in,unique] spoolss_JobInfoContainer *ctr,
506 [in] spoolss_JobControl command
511 WERROR spoolss_GetJob(
512 [in,ref] policy_handle *handle,
515 [in,unique] DATA_BLOB *buffer,
517 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info,
518 [out,ref] uint32 *needed
523 [public,noopnum,noprint] WERROR _spoolss_EnumJobs(
524 [in,ref] policy_handle *handle,
525 [in] uint32 firstjob,
528 [in,unique] DATA_BLOB *buffer,
530 [out,unique] DATA_BLOB *info,
531 [out,ref] uint32 *needed,
532 [out,ref] uint32 *count
534 [public,noopnum,noprint] void __spoolss_EnumJobs(
537 [out,switch_is(level)] spoolss_JobInfo info[count]
539 [nopull,nopush] WERROR spoolss_EnumJobs(
540 [in,ref] policy_handle *handle,
541 [in] uint32 firstjob,
544 [in,unique] DATA_BLOB *buffer,
546 [out,ref] uint32 *count,
547 [out,unique,switch_is(level),size_is(*count)] spoolss_JobInfo *info,
548 [out,ref] uint32 *needed
553 [todo] WERROR spoolss_AddPrinter(
554 /* This function is not implemented in Samba 3 as no
555 clients have been observed using it. */
560 WERROR spoolss_DeletePrinter(
561 [in] policy_handle *handle
566 typedef [v1_enum] enum {
567 SPOOLSS_PRINTER_CONTROL_UNPAUSE = 0,
568 SPOOLSS_PRINTER_CONTROL_PAUSE = 1,
569 SPOOLSS_PRINTER_CONTROL_RESUME = 2,
570 SPOOLSS_PRINTER_CONTROL_PURGE = 3,
571 SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4
572 } spoolss_PrinterControl;
575 [string,charset(UTF16)] uint16 *servername;
576 [string,charset(UTF16)] uint16 *printername;
581 uint32 global_counter;
587 uint32 session_counter;
588 uint32 num_error_out_of_paper;
589 uint32 num_error_not_ready;
591 uint32 number_of_processors;
592 spoolss_ProcessorType processor_type;
593 uint32 high_part_total_bytes;
597 uint32 enumerate_network_printers;
599 spoolss_ProcessorArchitecture processor_architecture;
600 uint16 processor_level;
604 } spoolss_SetPrinterInfo0;
607 spoolss_EnumPrinterFlags flags;
608 [string,charset(UTF16)] uint16 *name;
609 [string,charset(UTF16)] uint16 *description;
610 [string,charset(UTF16)] uint16 *comment;
611 } spoolss_SetPrinterInfo1;
614 [string,charset(UTF16)] uint16 *servername;
615 [string,charset(UTF16)] uint16 *printername;
616 [string,charset(UTF16)] uint16 *sharename;
617 [string,charset(UTF16)] uint16 *portname;
618 [string,charset(UTF16)] uint16 *drivername;
619 [string,charset(UTF16)] uint16 *comment;
620 [string,charset(UTF16)] uint16 *location;
621 [subcontext(0)] spoolss_DeviceMode *devmode;
622 [string,charset(UTF16)] uint16 *sepfile;
623 [string,charset(UTF16)] uint16 *printprocessor;
624 [string,charset(UTF16)] uint16 *datatype;
625 [string,charset(UTF16)] uint16 *parameters;
626 [subcontext(0)] security_descriptor *secdesc;
627 spoolss_PrinterAttributes attributes;
629 uint32 defaultpriority;
632 spoolss_PrinterStatus status;
635 } spoolss_SetPrinterInfo2;
639 } spoolss_SetPrinterInfo3;
642 [string,charset(UTF16)] uint16 *printername;
643 [string,charset(UTF16)] uint16 *servername;
644 spoolss_PrinterAttributes attributes;
645 } spoolss_SetPrinterInfo4;
648 [string,charset(UTF16)] uint16 *printername;
649 [string,charset(UTF16)] uint16 *portname;
650 spoolss_PrinterAttributes attributes;
651 uint32 device_not_selected_timeout;
652 uint32 transmission_retry_timeout;
653 } spoolss_SetPrinterInfo5;
656 spoolss_PrinterStatus status;
657 } spoolss_SetPrinterInfo6;
660 [string,charset(UTF16)] uint16 *guid; /* text form of printer guid */
661 spoolss_DsPrintAction action;
662 } spoolss_SetPrinterInfo7;
664 typedef [switch_type(uint32)] union {
665 [case(0)] spoolss_SetPrinterInfo0 *info0;
666 [case(1)] spoolss_SetPrinterInfo1 *info1;
667 [case(2)] spoolss_SetPrinterInfo2 *info2;
668 [case(3)] spoolss_SetPrinterInfo3 *info3;
669 [case(4)] spoolss_SetPrinterInfo4 *info4;
670 [case(5)] spoolss_SetPrinterInfo5 *info5;
671 [case(6)] spoolss_SetPrinterInfo6 *info6;
672 [case(7)] spoolss_SetPrinterInfo7 *info7;
673 [case(8)] spoolss_DeviceModeInfo *info8;
674 [case(9)] spoolss_DeviceModeInfo *info9;
676 } spoolss_SetPrinterInfo;
680 [switch_is(level)] spoolss_SetPrinterInfo info;
681 } spoolss_SetPrinterInfoCtr;
683 WERROR spoolss_SetPrinter(
684 [in,ref] policy_handle *handle,
685 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
686 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
687 [in,ref] sec_desc_buf *secdesc_ctr,
688 [in] spoolss_PrinterControl command
693 [public] WERROR spoolss_GetPrinter(
694 [in,ref] policy_handle *handle,
696 [in,unique] DATA_BLOB *buffer,
698 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info,
699 [out,ref] uint32 *needed
705 typedef [public] struct {
706 [value((ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags)-4)/2)] uint32 _ndr_size;
707 /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array string;
708 } spoolss_StringArray;
711 [string,charset(UTF16)] uint16 *driver_name;
712 } spoolss_AddDriverInfo1;
714 typedef [v1_enum,public] enum {
715 SPOOLSS_DRIVER_VERSION_9X = 0,
716 SPOOLSS_DRIVER_VERSION_NT35 = 1,
717 SPOOLSS_DRIVER_VERSION_NT4 = 2,
718 SPOOLSS_DRIVER_VERSION_200X = 3
719 } spoolss_DriverOSVersion;
722 spoolss_DriverOSVersion version;
723 [string,charset(UTF16)] uint16 *driver_name;
724 [string,charset(UTF16)] uint16 *architecture;
725 [string,charset(UTF16)] uint16 *driver_path;
726 [string,charset(UTF16)] uint16 *data_file;
727 [string,charset(UTF16)] uint16 *config_file;
728 } spoolss_AddDriverInfo2;
731 spoolss_DriverOSVersion version;
732 [string,charset(UTF16)] uint16 *driver_name;
733 [string,charset(UTF16)] uint16 *architecture;
734 [string,charset(UTF16)] uint16 *driver_path;
735 [string,charset(UTF16)] uint16 *data_file;
736 [string,charset(UTF16)] uint16 *config_file;
737 [string,charset(UTF16)] uint16 *help_file;
738 [string,charset(UTF16)] uint16 *monitor_name;
739 [string,charset(UTF16)] uint16 *default_datatype;
740 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
741 spoolss_StringArray *dependent_files;
742 } spoolss_AddDriverInfo3;
745 spoolss_DriverOSVersion version;
746 [string,charset(UTF16)] uint16 *driver_name;
747 [string,charset(UTF16)] uint16 *architecture;
748 [string,charset(UTF16)] uint16 *driver_path;
749 [string,charset(UTF16)] uint16 *data_file;
750 [string,charset(UTF16)] uint16 *config_file;
751 [string,charset(UTF16)] uint16 *help_file;
752 [string,charset(UTF16)] uint16 *monitor_name;
753 [string,charset(UTF16)] uint16 *default_datatype;
754 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
755 spoolss_StringArray *dependent_files;
756 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
757 spoolss_StringArray *previous_names;
758 } spoolss_AddDriverInfo4;
761 spoolss_DriverOSVersion version;
762 [string,charset(UTF16)] uint16 *driver_name;
763 [string,charset(UTF16)] uint16 *architecture;
764 [string,charset(UTF16)] uint16 *driver_path;
765 [string,charset(UTF16)] uint16 *data_file;
766 [string,charset(UTF16)] uint16 *config_file;
767 uint32 driver_attributes;
768 uint32 config_version;
769 uint32 driver_version;
770 } spoolss_AddDriverInfo5;
773 spoolss_DriverOSVersion version;
774 [string,charset(UTF16)] uint16 *driver_name;
775 [string,charset(UTF16)] uint16 *architecture;
776 [string,charset(UTF16)] uint16 *driver_path;
777 [string,charset(UTF16)] uint16 *data_file;
778 [string,charset(UTF16)] uint16 *config_file;
779 [string,charset(UTF16)] uint16 *help_file;
780 [string,charset(UTF16)] uint16 *monitor_name;
781 [string,charset(UTF16)] uint16 *default_datatype;
782 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
783 spoolss_StringArray *dependent_files;
784 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
785 spoolss_StringArray *previous_names;
787 hyper driver_version;
788 [string,charset(UTF16)] uint16 *manufacturer_name;
789 [string,charset(UTF16)] uint16 *manufacturer_url;
790 [string,charset(UTF16)] uint16 *hardware_id;
791 [string,charset(UTF16)] uint16 *provider;
792 } spoolss_AddDriverInfo6;
795 spoolss_DriverOSVersion version;
796 [string,charset(UTF16)] uint16 *driver_name;
797 [string,charset(UTF16)] uint16 *architecture;
798 [string,charset(UTF16)] uint16 *driver_path;
799 [string,charset(UTF16)] uint16 *data_file;
800 [string,charset(UTF16)] uint16 *config_file;
801 [string,charset(UTF16)] uint16 *help_file;
802 [string,charset(UTF16)] uint16 *monitor_name;
803 [string,charset(UTF16)] uint16 *default_datatype;
804 [value(((ndr_size_spoolss_StringArray(dependent_files, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_dependent_files;
805 spoolss_StringArray *dependent_files;
806 [value(((ndr_size_spoolss_StringArray(previous_names, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_previous_names;
807 spoolss_StringArray *previous_names;
809 hyper driver_version;
810 [string,charset(UTF16)] uint16 *manufacturer_name;
811 [string,charset(UTF16)] uint16 *manufacturer_url;
812 [string,charset(UTF16)] uint16 *hardware_id;
813 [string,charset(UTF16)] uint16 *provider;
814 [string,charset(UTF16)] uint16 *print_processor;
815 [string,charset(UTF16)] uint16 *vendor_setup;
816 [value(((ndr_size_spoolss_StringArray(color_profiles, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_color_profiles;
817 spoolss_StringArray *color_profiles;
818 [string,charset(UTF16)] uint16 *inf_path;
819 uint32 printer_driver_attributes;
820 [value(((ndr_size_spoolss_StringArray(core_driver_dependencies, ndr->iconv_convenience, ndr->flags)-4)/2))] uint32 _ndr_size_core_driver_dependencies;
821 spoolss_StringArray *core_driver_dependencies;
822 NTTIME min_inbox_driver_ver_date;
823 hyper min_inbox_driver_ver_version;
824 } spoolss_AddDriverInfo8;
826 typedef [switch_type(uint32)] union {
827 [case(1)] spoolss_AddDriverInfo1 *info1;
828 [case(2)] spoolss_AddDriverInfo2 *info2;
829 [case(3)] spoolss_AddDriverInfo3 *info3;
830 [case(4)] spoolss_AddDriverInfo4 *info4;
831 [case(6)] spoolss_AddDriverInfo6 *info6;
832 [case(8)] spoolss_AddDriverInfo8 *info8;
833 } spoolss_AddDriverInfo;
837 [switch_is(level)] spoolss_AddDriverInfo info;
838 } spoolss_AddDriverInfoCtr;
840 WERROR spoolss_AddPrinterDriver(
841 [in,unique] [string,charset(UTF16)] uint16 *servername,
842 [in,ref] spoolss_AddDriverInfoCtr *info_ctr
845 typedef [public,gensize] struct {
846 [relative] nstring *driver_name;
847 } spoolss_DriverInfo1;
849 typedef [public,gensize] struct {
850 spoolss_DriverOSVersion version;
851 [relative] nstring *driver_name;
852 [relative] nstring *architecture;
853 [relative] nstring *driver_path;
854 [relative] nstring *data_file;
855 [relative] nstring *config_file;
856 } spoolss_DriverInfo2;
858 typedef [public,gensize] struct {
859 spoolss_DriverOSVersion version;
860 [relative] nstring *driver_name;
861 [relative] nstring *architecture;
862 [relative] nstring *driver_path;
863 [relative] nstring *data_file;
864 [relative] nstring *config_file;
865 [relative] nstring *help_file;
866 [relative] nstring_array *dependent_files;
867 [relative] nstring *monitor_name;
868 [relative] nstring *default_datatype;
869 } spoolss_DriverInfo3;
871 typedef [public,gensize] struct {
872 spoolss_DriverOSVersion version;
873 [relative] nstring *driver_name;
874 [relative] nstring *architecture;
875 [relative] nstring *driver_path;
876 [relative] nstring *data_file;
877 [relative] nstring *config_file;
878 [relative] nstring *help_file;
879 [relative] nstring_array *dependent_files;
880 [relative] nstring *monitor_name;
881 [relative] nstring *default_datatype;
882 [relative] nstring_array *previous_names;
883 } spoolss_DriverInfo4;
885 typedef [public,gensize] struct {
886 spoolss_DriverOSVersion version;
887 [relative] nstring *driver_name;
888 [relative] nstring *architecture;
889 [relative] nstring *driver_path;
890 [relative] nstring *data_file;
891 [relative] nstring *config_file;
892 uint32 driver_attributes;
893 uint32 config_version;
894 uint32 driver_version;
895 } spoolss_DriverInfo5;
897 typedef [public,gensize] struct {
898 spoolss_DriverOSVersion version;
899 [relative] nstring *driver_name;
900 [relative] nstring *architecture;
901 [relative] nstring *driver_path;
902 [relative] nstring *data_file;
903 [relative] nstring *config_file;
904 [relative] nstring *help_file;
905 [relative] nstring_array *dependent_files;
906 [relative] nstring *monitor_name;
907 [relative] nstring *default_datatype;
908 [relative] nstring_array *previous_names;
910 hyper driver_version;
911 [relative] nstring *manufacturer_name;
912 [relative] nstring *manufacturer_url;
913 [relative] nstring *hardware_id;
914 [relative] nstring *provider;
915 } spoolss_DriverInfo6;
917 typedef [public,gensize] struct {
918 spoolss_DriverOSVersion version;
919 [relative] nstring *driver_name;
920 [relative] nstring *architecture;
921 [relative] nstring *driver_path;
922 [relative] nstring *data_file;
923 [relative] nstring *config_file;
924 [relative] nstring *help_file;
925 [relative] nstring *monitor_name;
926 [relative] nstring *default_datatype;
927 [relative] nstring_array *dependent_files;
928 [relative] nstring_array *previous_names;
930 hyper driver_version;
931 [relative] nstring *manufacturer_name;
932 [relative] nstring *manufacturer_url;
933 [relative] nstring *hardware_id;
934 [relative] nstring *provider;
935 [relative] nstring *print_processor;
936 [relative] nstring *vendor_setup;
937 [relative] nstring_array *color_profiles;
938 [relative] nstring *inf_path;
939 uint32 printer_driver_attributes;
940 [relative] nstring_array *core_driver_dependencies;
941 NTTIME min_inbox_driver_ver_date;
942 hyper min_inbox_driver_ver_version;
943 } spoolss_DriverInfo8;
945 typedef [v1_enum] enum {
946 SPOOLSS_DRIVER_FILE_TYPE_RENDERING = 0x00000000,
947 SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION = 0x00000001,
948 SPOOLSS_DRIVER_FILE_TYPE_DATA = 0x00000002,
949 SPOOLSS_DRIVER_FILE_TYPE_HELP = 0x00000003,
950 SPOOLSS_DRIVER_FILE_TYPE_OTHER = 0x00000004
951 } spoolss_DriverFileType;
953 typedef [public] struct {
954 [relative] nstring *file_name;
955 spoolss_DriverFileType file_type;
957 } spoolss_DriverFileInfo;
959 typedef [public,gensize,nopush,nopull] struct {
960 spoolss_DriverOSVersion version;
961 [relative] nstring *driver_name;
962 [relative] nstring *architecture;
963 [relative] [size_is(file_count)] spoolss_DriverFileInfo *file_info;
965 [relative] nstring *monitor_name;
966 [relative] nstring *default_datatype;
967 [relative] nstring_array *previous_names;
969 hyper driver_version;
970 [relative] nstring *manufacturer_name;
971 [relative] nstring *manufacturer_url;
972 [relative] nstring *hardware_id;
973 [relative] nstring *provider;
974 } spoolss_DriverInfo101;
976 typedef [nodiscriminant,relative_base,public] union {
977 [case(1)] spoolss_DriverInfo1 info1;
978 [case(2)] spoolss_DriverInfo2 info2;
979 [case(3)] spoolss_DriverInfo3 info3;
980 [case(4)] spoolss_DriverInfo4 info4;
981 [case(5)] spoolss_DriverInfo5 info5;
982 [case(6)] spoolss_DriverInfo6 info6;
983 [case(8)] spoolss_DriverInfo8 info8;
984 [case(101)] spoolss_DriverInfo101 info101;
986 } spoolss_DriverInfo;
990 [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers(
991 [in,unique] [string,charset(UTF16)] uint16 *server,
992 [in,unique] [string,charset(UTF16)] uint16 *environment,
994 [in,unique] DATA_BLOB *buffer,
996 [out,unique] DATA_BLOB *info,
997 [out,ref] uint32 *needed,
998 [out,ref] uint32 *count
1000 [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers(
1003 [out,switch_is(level)] spoolss_DriverInfo info[count]
1005 [nopull,nopush] WERROR spoolss_EnumPrinterDrivers(
1006 [in,unique] [string,charset(UTF16)] uint16 *server,
1007 [in,unique] [string,charset(UTF16)] uint16 *environment,
1009 [in,unique] DATA_BLOB *buffer,
1010 [in] uint32 offered,
1011 [out,ref] uint32 *count,
1012 [out,unique,switch_is(level),size_is(*count)] spoolss_DriverInfo *info,
1013 [out,ref] uint32 *needed
1016 /******************/
1017 /* Function: 0x0b */
1018 [todo] WERROR spoolss_GetPrinterDriver(
1021 /******************/
1022 /* Function: 0x0c */
1023 typedef [public,gensize] struct {
1024 nstring directory_name;
1025 } spoolss_DriverDirectoryInfo1;
1027 /* NOTE: it's seems that w2k3 completly ignores the level
1030 typedef [nodiscriminant,relative_base,gensize,public] union {
1031 [case(1)] spoolss_DriverDirectoryInfo1 info1;
1032 [default] spoolss_DriverDirectoryInfo1 info1;
1033 } spoolss_DriverDirectoryInfo;
1035 [public] WERROR spoolss_GetPrinterDriverDirectory(
1036 [in,unique] [string,charset(UTF16)] uint16 *server,
1037 [in,unique] [string,charset(UTF16)] uint16 *environment,
1039 [in,unique] DATA_BLOB *buffer,
1040 [in] uint32 offered,
1041 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info,
1042 [out,ref] uint32 *needed
1045 /******************/
1046 /* Function: 0x0d */
1047 WERROR spoolss_DeletePrinterDriver(
1048 [in,unique] [string,charset(UTF16)] uint16 *server,
1049 [in] [string,charset(UTF16)] uint16 architecture[],
1050 [in] [string,charset(UTF16)] uint16 driver[]
1053 /******************/
1054 /* Function: 0x0e */
1055 WERROR spoolss_AddPrintProcessor(
1056 [in,unique] [string,charset(UTF16)] uint16 *server,
1057 [in] [string,charset(UTF16)] uint16 architecture[],
1058 [in] [string,charset(UTF16)] uint16 path_name[],
1059 [in] [string,charset(UTF16)] uint16 print_processor_name[]
1062 /******************/
1063 /* Function: 0x0f */
1065 [relative] nstring *print_processor_name;
1066 } spoolss_PrintProcessorInfo1;
1068 typedef [nodiscriminant,relative_base,public] union {
1069 [case(1)] spoolss_PrintProcessorInfo1 info1;
1071 } spoolss_PrintProcessorInfo;
1073 [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors(
1074 [in,unique] [string,charset(UTF16)] uint16 *servername,
1075 [in,unique] [string,charset(UTF16)] uint16 *environment,
1077 [in,unique] DATA_BLOB *buffer,
1078 [in] uint32 offered,
1079 [out,unique] DATA_BLOB *info,
1080 [out,ref] uint32 *needed,
1081 [out,ref] uint32 *count
1083 [public,noopnum,noprint] void __spoolss_EnumPrintProcessors(
1086 [out,switch_is(level)] spoolss_PrintProcessorInfo info[count]
1088 [nopull,nopush] WERROR spoolss_EnumPrintProcessors(
1089 [in,unique] [string,charset(UTF16)] uint16 *servername,
1090 [in,unique] [string,charset(UTF16)] uint16 *environment,
1092 [in,unique] DATA_BLOB *buffer,
1093 [in] uint32 offered,
1094 [out,ref] uint32 *count,
1095 [out,unique,switch_is(level),size_is(*count)] spoolss_PrintProcessorInfo *info,
1096 [out,ref] uint32 *needed
1099 /******************/
1100 /* Function: 0x10 */
1101 typedef [public,gensize] struct {
1102 nstring directory_name;
1103 } spoolss_PrintProcessorDirectoryInfo1;
1105 typedef [nodiscriminant,relative_base,gensize,public] union {
1106 [case(1)] spoolss_PrintProcessorDirectoryInfo1 info1;
1107 [default] spoolss_PrintProcessorDirectoryInfo1 info1;
1108 } spoolss_PrintProcessorDirectoryInfo;
1110 WERROR spoolss_GetPrintProcessorDirectory(
1111 [in,unique] [string,charset(UTF16)] uint16 *server,
1112 [in,unique] [string,charset(UTF16)] uint16 *environment,
1114 [in,unique] DATA_BLOB *buffer,
1115 [in] uint32 offered,
1116 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrintProcessorDirectoryInfo *info,
1117 [out,ref] uint32 *needed
1120 /******************/
1121 /* Function: 0x11 */
1123 [string,charset(UTF16)] uint16 *document_name;
1124 [string,charset(UTF16)] uint16 *output_file;
1125 [string,charset(UTF16)] uint16 *datatype;
1126 } spoolss_DocumentInfo1;
1128 typedef [switch_type(uint32)] union {
1129 [case(1)] spoolss_DocumentInfo1 *info1;
1130 [case(2)]; /* TODO */
1131 [case(3)]; /* TODO */
1133 } spoolss_DocumentInfo;
1135 WERROR spoolss_StartDocPrinter(
1136 [in,ref] policy_handle *handle,
1138 [in,switch_is(level)] spoolss_DocumentInfo info,
1139 [out,ref] uint32 *job_id
1142 /******************/
1143 /* Function: 0x12 */
1144 WERROR spoolss_StartPagePrinter(
1145 [in,ref] policy_handle *handle
1148 /******************/
1149 /* Function: 0x13 */
1150 WERROR spoolss_WritePrinter(
1151 [in,ref] policy_handle *handle,
1152 [in] DATA_BLOB data,
1153 [in,value(r->in.data.length)] uint32 _data_size,
1154 [out,ref] uint32 *num_written
1157 /******************/
1158 /* Function: 0x14 */
1159 WERROR spoolss_EndPagePrinter(
1160 [in,ref] policy_handle *handle
1163 /******************/
1164 /* Function: 0x15 */
1165 WERROR spoolss_AbortPrinter(
1166 [in,ref] policy_handle *handle
1169 /******************/
1170 /* Function: 0x16 */
1171 WERROR spoolss_ReadPrinter(
1172 [in,ref] policy_handle *handle,
1173 [out,ref] [size_is(data_size)] uint8 *data,
1174 [in] uint32 data_size,
1175 [out,ref] uint32 *_data_size
1178 /******************/
1179 /* Function: 0x17 */
1180 WERROR spoolss_EndDocPrinter(
1181 [in,ref] policy_handle *handle
1184 /******************/
1185 /* Function: 0x18 */
1186 WERROR spoolss_AddJob(
1187 [in,ref] policy_handle *handle,
1189 [in,out,unique] [size_is(offered)] uint8 *buffer,
1190 [in] uint32 offered,
1191 [out,ref] uint32 *needed
1194 /******************/
1195 /* Function: 0x19 */
1196 WERROR spoolss_ScheduleJob(
1197 [in,ref] policy_handle *handle,
1201 /******************/
1202 /* Function: 0x1a */
1203 const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86";
1204 const string SPOOLSS_DEFAULT_SERVER_PATH = "C:\\WINDOWS\\system32\\spool";
1206 typedef [public,gensize] struct {
1207 [value(ndr_size_spoolss_OSVersion(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
1211 [value(2)] uint32 unknown;
1212 [subcontext(0),subcontext_size(256)] nstring extra_string;
1213 } spoolss_OSVersion;
1215 typedef [public,gensize] struct {
1216 [value(ndr_size_spoolss_OSVersionEx(r,ndr->iconv_convenience,ndr->flags))] uint32 _ndr_size;
1220 [value(2)] uint32 unknown1;
1221 [subcontext(0),subcontext_size(256)] nstring extra_string;
1222 uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/
1223 uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */
1224 } spoolss_OSVersionEx;
1226 typedef [v1_enum] enum {
1227 SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
1228 SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
1229 SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3,
1230 SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4,
1231 SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7
1232 } spoolss_PrinterDataType;
1234 typedef [nodiscriminant,public,gensize] union {
1235 [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)];
1236 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
1237 [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary;
1238 [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
1239 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array;
1240 [default,flag(NDR_REMAINING)] DATA_BLOB data;
1241 } spoolss_PrinterData;
1243 [noopnum,noprint,public] WERROR _spoolss_GetPrinterData(
1244 [in,ref] policy_handle *handle,
1245 [in] [string,charset(UTF16)] uint16 value_name[],
1246 [in] uint32 offered,
1247 [out,ref] spoolss_PrinterDataType *type,
1248 [out] DATA_BLOB data,
1249 [out,ref] uint32 *needed
1251 [noopnum,noprint,public] void __spoolss_GetPrinterData(
1252 [in] spoolss_PrinterDataType type,
1253 [out,switch_is(type)] spoolss_PrinterData data
1255 [nopull,nopush,public] WERROR spoolss_GetPrinterData(
1256 [in,ref] policy_handle *handle,
1257 [in] [string,charset(UTF16)] uint16 value_name[],
1258 [in] uint32 offered,
1259 [out,ref] spoolss_PrinterDataType *type,
1260 [out,subcontext(4),subcontext_size(offered),switch_is(*type)] spoolss_PrinterData data,
1261 [out,ref] uint32 *needed
1264 /******************/
1265 /* Function: 0x1b */
1266 [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData(
1267 [in,ref] policy_handle *handle,
1268 [in] [string,charset(UTF16)] uint16 value_name[],
1269 [in] spoolss_PrinterDataType type,
1270 [in] DATA_BLOB data,
1271 [in] uint32 _offered
1273 [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
1274 [in] spoolss_PrinterDataType type,
1275 [out,switch_is(type)] spoolss_PrinterData data
1277 [nopush] WERROR spoolss_SetPrinterData(
1278 [in,ref] policy_handle *handle,
1279 [in] [string,charset(UTF16)] uint16 value_name[],
1280 [in] spoolss_PrinterDataType type,
1281 [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
1282 [in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
1285 /******************/
1286 /* Function: 0x1c */
1287 [todo] WERROR spoolss_WaitForPrinterChange(
1290 /******************/
1291 /* Function: 0x1d */
1292 [public] WERROR spoolss_ClosePrinter(
1293 [in,out,ref] policy_handle *handle
1296 /******************/
1297 /* Function: 0x1e */
1298 typedef [v1_enum] enum {
1299 SPOOLSS_FORM_USER = 0,
1300 SPOOLSS_FORM_BUILTIN = 1,
1301 SPOOLSS_FORM_PRINTER = 2
1302 } spoolss_FormFlags;
1317 spoolss_FormFlags flags;
1318 [relative] nstring *form_name;
1319 spoolss_FormSize size;
1320 spoolss_FormArea area;
1321 } spoolss_FormInfo1;
1323 typedef [bitmap32bit] bitmap {
1324 SPOOLSS_FORM_STRING_TYPE_NONE = 0x00000001,
1325 SPOOLSS_FORM_STRING_TYPE_MUI_DLL = 0x00000002,
1326 SPOOLSS_FORM_STRING_TYPE_LANG_PAIR = 0x00000004
1327 } spoolss_FormStringType;
1330 spoolss_FormFlags flags;
1331 [relative] nstring *form_name;
1332 spoolss_FormSize size;
1333 spoolss_FormArea area;
1334 [relative] astring *keyword;
1335 spoolss_FormStringType string_type;
1336 [relative] nstring *mui_dll;
1337 uint32 ressource_id;
1338 [relative] nstring *display_name;
1340 } spoolss_FormInfo2;
1342 typedef [nodiscriminant,relative_base,public,gensize] union {
1343 [case(1)] spoolss_FormInfo1 info1;
1344 [case(2)] spoolss_FormInfo2 info2;
1349 spoolss_FormFlags flags;
1350 [string,charset(UTF16)] uint16 *form_name;
1351 spoolss_FormSize size;
1352 spoolss_FormArea area;
1353 } spoolss_AddFormInfo1;
1356 spoolss_FormFlags flags;
1357 [string,charset(UTF16)] uint16 *form_name;
1358 spoolss_FormSize size;
1359 spoolss_FormArea area;
1360 [string,charset(DOS)] uint8 *keyword;
1361 spoolss_FormStringType string_type;
1362 [string,charset(UTF16)] uint16 *mui_dll;
1363 uint32 ressource_id;
1364 [string,charset(UTF16)] uint16 *display_name;
1366 } spoolss_AddFormInfo2;
1368 typedef [switch_type(uint32)] union {
1369 [case(1)] spoolss_AddFormInfo1 *info1;
1370 [case(2)] spoolss_AddFormInfo2 *info2;
1371 } spoolss_AddFormInfo;
1373 WERROR spoolss_AddForm(
1374 [in,ref] policy_handle *handle,
1376 [in,switch_is(level)] spoolss_AddFormInfo info
1379 /******************/
1380 /* Function: 0x1f */
1381 WERROR spoolss_DeleteForm(
1382 [in,ref] policy_handle *handle,
1383 [in] [string,charset(UTF16)] uint16 form_name[]
1386 /******************/
1387 /* Function: 0x20 */
1388 WERROR spoolss_GetForm(
1389 [in,ref] policy_handle *handle,
1390 [in] [string,charset(UTF16)] uint16 form_name[],
1392 [in,unique] DATA_BLOB *buffer,
1393 [in] uint32 offered,
1394 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info,
1395 [out,ref] uint32 *needed
1398 /******************/
1399 /* Function: 0x21 */
1400 WERROR spoolss_SetForm(
1401 [in,ref] policy_handle *handle,
1402 [in] [string,charset(UTF16)] uint16 form_name[],
1404 [in,switch_is(level)] spoolss_AddFormInfo info
1407 /******************/
1408 /* Function: 0x22 */
1409 [public,noopnum,noprint] WERROR _spoolss_EnumForms(
1410 [in,ref] policy_handle *handle,
1412 [in,unique] DATA_BLOB *buffer,
1413 [in] uint32 offered,
1414 [out,unique] DATA_BLOB *info,
1415 [out,ref] uint32 *needed,
1416 [out,ref] uint32 *count
1418 [public,noopnum,noprint] void __spoolss_EnumForms(
1421 [out,switch_is(level)] spoolss_FormInfo info[count]
1423 [nopull,nopush] WERROR spoolss_EnumForms(
1424 [in,ref] policy_handle *handle,
1426 [in,unique] DATA_BLOB *buffer,
1427 [in] uint32 offered,
1428 [out,ref] uint32 *count,
1429 [out,unique,switch_is(level),size_is(*count)] spoolss_FormInfo *info,
1430 [out,ref] uint32 *needed
1434 [relative] nstring *port_name;
1435 } spoolss_PortInfo1;
1438 SPOOLSS_PORT_TYPE_WRITE = 0x00000001,
1439 SPOOLSS_PORT_TYPE_READ = 0x00000002,
1440 SPOOLSS_PORT_TYPE_REDIRECTED = 0x00000004,
1441 SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008
1445 [relative] nstring *port_name;
1446 [relative] nstring *monitor_name;
1447 [relative] nstring *description;
1448 spoolss_PortType port_type;
1450 } spoolss_PortInfo2;
1452 typedef [nodiscriminant,relative_base,public] union {
1453 [case(1)] spoolss_PortInfo1 info1;
1454 [case(2)] spoolss_PortInfo2 info2;
1455 [case(3)]; /* TODO */
1459 /******************/
1460 /* Function: 0x23 */
1461 [public,noopnum,noprint] WERROR _spoolss_EnumPorts(
1462 [in,unique] [string,charset(UTF16)] uint16 *servername,
1464 [in,unique] DATA_BLOB *buffer,
1465 [in] uint32 offered,
1466 [out,unique] DATA_BLOB *info,
1467 [out,ref] uint32 *needed,
1468 [out,ref] uint32 *count
1470 [public,noopnum,noprint] void __spoolss_EnumPorts(
1473 [out,switch_is(level)] spoolss_PortInfo info[count]
1475 [nopull,nopush] WERROR spoolss_EnumPorts(
1476 [in,unique] [string,charset(UTF16)] uint16 *servername,
1478 [in,unique] DATA_BLOB *buffer,
1479 [in] uint32 offered,
1480 [out,ref] uint32 *count,
1481 [out,unique,switch_is(level),size_is(*count)] spoolss_PortInfo *info,
1482 [out,ref] uint32 *needed
1485 /******************/
1486 /* Function: 0x24 */
1488 [relative] nstring *monitor_name;
1489 } spoolss_MonitorInfo1;
1492 [relative] nstring *monitor_name;
1493 [relative] nstring *environment;
1494 [relative] nstring *dll_name;
1495 } spoolss_MonitorInfo2;
1497 typedef [nodiscriminant,relative_base,public] union {
1498 [case(1)] spoolss_MonitorInfo1 info1;
1499 [case(2)] spoolss_MonitorInfo2 info2;
1501 } spoolss_MonitorInfo;
1503 [public,noopnum,noprint] WERROR _spoolss_EnumMonitors(
1504 [in,unique] [string,charset(UTF16)] uint16 *servername,
1506 [in,unique] DATA_BLOB *buffer,
1507 [in] uint32 offered,
1508 [out,unique] DATA_BLOB *info,
1509 [out,ref] uint32 *needed,
1510 [out,ref] uint32 *count
1512 [public,noopnum,noprint] void __spoolss_EnumMonitors(
1515 [out,switch_is(level)] spoolss_MonitorInfo info[count]
1517 [nopull,nopush] WERROR spoolss_EnumMonitors(
1518 [in,unique] [string,charset(UTF16)] uint16 *servername,
1520 [in,unique] DATA_BLOB *buffer,
1521 [in] uint32 offered,
1522 [out,ref] uint32 *count,
1523 [out,unique,switch_is(level),size_is(*count)] spoolss_MonitorInfo *info,
1524 [out,ref] uint32 *needed
1527 /******************/
1528 /* Function: 0x25 */
1529 WERROR spoolss_AddPort(
1530 [in,unique] [string,charset(UTF16)] uint16 *server_name,
1531 [in] uint32 unknown,
1532 [in] [string,charset(UTF16)] uint16 monitor_name[]
1535 /******************/
1536 /* Function: 0x26 */
1537 [todo] WERROR spoolss_ConfigurePort(
1540 /******************/
1541 /* Function: 0x27 */
1542 [todo] WERROR spoolss_DeletePort(
1545 /******************/
1546 /* Function: 0x28 */
1547 [todo] WERROR spoolss_CreatePrinterIC(
1550 /******************/
1551 /* Function: 0x29 */
1552 [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC(
1555 /******************/
1556 /* Function: 0x2a */
1557 [todo] WERROR spoolss_DeletePrinterIC(
1560 /******************/
1561 /* Function: 0x2b */
1562 [todo] WERROR spoolss_AddPrinterConnection(
1565 /******************/
1566 /* Function: 0x2c */
1567 [todo] WERROR spoolss_DeletePrinterConnection(
1570 /******************/
1571 /* Function: 0x2d */
1572 [todo] WERROR spoolss_PrinterMessageBox(
1573 /* Marked as obsolete in MSDN. "Not necessary and has
1577 /******************/
1578 /* Function: 0x2e */
1579 [todo] WERROR spoolss_AddMonitor(
1582 /******************/
1583 /* Function: 0x2f */
1584 [todo] WERROR spoolss_DeleteMonitor(
1587 /******************/
1588 /* Function: 0x30 */
1589 [todo] WERROR spoolss_DeletePrintProcessor(
1592 /******************/
1593 /* Function: 0x31 */
1594 [todo] WERROR spoolss_AddPrintProvidor(
1597 /******************/
1598 /* Function: 0x32 */
1599 [todo] WERROR spoolss_DeletePrintProvidor(
1602 /******************/
1603 /* Function: 0x33 */
1604 [todo] WERROR spoolss_EnumPrintProcDataTypes(
1607 /******************/
1608 /* Function: 0x34 */
1609 WERROR spoolss_ResetPrinter(
1610 [in,ref] policy_handle *handle,
1611 [in,unique] [string,charset(UTF16)] uint16 *data_type,
1612 [in,ref] spoolss_DevmodeContainer *devmode_ctr
1615 /******************/
1616 /* Function: 0x35 */
1617 WERROR spoolss_GetPrinterDriver2(
1618 [in,ref] policy_handle *handle,
1619 [in,unique] [string,charset(UTF16)] uint16 *architecture,
1621 [in,unique] DATA_BLOB *buffer,
1622 [in] uint32 offered,
1623 [in] uint32 client_major_version,
1624 [in] uint32 client_minor_version,
1625 [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverInfo *info,
1626 [out,ref] uint32 *needed,
1627 [out,ref] uint32 *server_major_version,
1628 [out,ref] uint32 *server_minor_version
1631 /******************/
1632 /* Function: 0x36 */
1633 [todo] WERROR spoolss_FindFirstPrinterChangeNotification(
1636 /******************/
1637 /* Function: 0x37 */
1638 [todo] WERROR spoolss_FindNextPrinterChangeNotification(
1641 /******************/
1642 /* Function: 0x38 */
1643 [public] WERROR spoolss_FindClosePrinterNotify(
1644 [in,ref] policy_handle *handle
1647 /******************/
1648 /* Function: 0x39 */
1649 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld(
1652 /******************/
1653 /* Function: 0x3a */
1654 [public] WERROR spoolss_ReplyOpenPrinter(
1655 [in,string,charset(UTF16)] uint16 server_name[],
1656 [in] uint32 printer_local,
1657 [in] winreg_Type type,
1658 [in,range(0,512)] uint32 bufsize,
1659 [in,unique,size_is(bufsize)] uint8 *buffer,
1660 [out,ref] policy_handle *handle
1663 /******************/
1664 /* Function: 0x3b */
1666 typedef [bitmap32bit] bitmap {
1667 PRINTER_CHANGE_ADD_PRINTER = 0x00000001,
1668 PRINTER_CHANGE_SET_PRINTER = 0x00000002,
1669 PRINTER_CHANGE_DELETE_PRINTER = 0x00000004,
1670 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = 0x00000008,
1671 PRINTER_CHANGE_ADD_JOB = 0x00000100,
1672 PRINTER_CHANGE_SET_JOB = 0x00000200,
1673 PRINTER_CHANGE_DELETE_JOB = 0x00000400,
1674 PRINTER_CHANGE_WRITE_JOB = 0x00000800,
1675 PRINTER_CHANGE_ADD_FORM = 0x00010000,
1676 PRINTER_CHANGE_SET_FORM = 0x00020000,
1677 PRINTER_CHANGE_DELETE_FORM = 0x00040000,
1678 PRINTER_CHANGE_ADD_PORT = 0x00100000,
1679 PRINTER_CHANGE_CONFIGURE_PORT = 0x00200000,
1680 PRINTER_CHANGE_DELETE_PORT = 0x00400000,
1681 PRINTER_CHANGE_ADD_PRINT_PROCESSOR = 0x01000000,
1682 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = 0x04000000,
1683 PRINTER_CHANGE_SERVER = 0x08000000,
1684 PRINTER_CHANGE_ADD_PRINTER_DRIVER = 0x10000000,
1685 PRINTER_CHANGE_SET_PRINTER_DRIVER = 0x20000000,
1686 PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 0x40000000,
1687 PRINTER_CHANGE_TIMEOUT = 0x80000000
1688 } spoolss_PrinterChangeFlags;
1690 const int PRINTER_CHANGE_PRINTER = 0x000000FF;
1692 const int PRINTER_CHANGE_JOB = 0x0000FF00;
1694 const int PRINTER_CHANGE_FORM = (PRINTER_CHANGE_ADD_FORM |
1695 PRINTER_CHANGE_SET_FORM |
1696 PRINTER_CHANGE_DELETE_FORM); /* 0x00070000 */
1698 const int PRINTER_CHANGE_PORT = (PRINTER_CHANGE_ADD_PORT |
1699 PRINTER_CHANGE_CONFIGURE_PORT |
1700 PRINTER_CHANGE_DELETE_PORT); /* 0x00700000 */
1702 const int PRINTER_CHANGE_PRINT_PROCESSOR = 0x07000000;
1704 const int PRINTER_CHANGE_PRINTER_DRIVER = (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
1705 PRINTER_CHANGE_SET_PRINTER_DRIVER |
1706 PRINTER_CHANGE_DELETE_PRINTER_DRIVER); /* 0x70000000 */
1708 const int PRINTER_CHANGE_ALL = (PRINTER_CHANGE_PRINTER |
1709 PRINTER_CHANGE_JOB |
1710 PRINTER_CHANGE_FORM |
1711 PRINTER_CHANGE_PORT |
1712 PRINTER_CHANGE_PRINT_PROCESSOR |
1713 PRINTER_CHANGE_PRINTER_DRIVER); /* 0x7777FFFF */
1714 WERROR spoolss_RouterReplyPrinter(
1715 [in,ref] policy_handle *handle,
1716 [in] spoolss_PrinterChangeFlags flags,
1717 [in,range(0,512)] uint32 bufsize,
1718 [in,unique,size_is(bufsize)] uint8 *buffer
1721 /******************/
1722 /* Function: 0x3c */
1723 [public] WERROR spoolss_ReplyClosePrinter(
1724 [in,out,ref] policy_handle *handle
1727 /******************/
1728 /* Function: 0x3d */
1729 [todo] WERROR spoolss_AddPortEx(
1732 /******************/
1733 /* Function: 0x3e */
1734 [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification(
1737 /******************/
1738 /* Function: 0x3f */
1739 [todo] WERROR spoolss_SpoolerInit(
1742 /******************/
1743 /* Function: 0x40 */
1744 [todo] WERROR spoolss_ResetPrinterEx(
1747 typedef [enum16bit] enum {
1748 SPOOLSS_FIELD_SERVER_NAME = 0,
1749 SPOOLSS_FIELD_PRINTER_NAME = 1,
1750 SPOOLSS_FIELD_SHARE_NAME = 2,
1751 SPOOLSS_FIELD_PORT_NAME = 3,
1752 SPOOLSS_FIELD_DRIVER_NAME = 4,
1753 SPOOLSS_FIELD_COMMENT = 5,
1754 SPOOLSS_FIELD_LOCATION = 6,
1755 SPOOLSS_FIELD_DEVMODE = 7,
1756 SPOOLSS_FIELD_SEPFILE = 8,
1757 SPOOLSS_FIELD_PRINT_PROCESSOR = 9,
1758 SPOOLSS_FIELD_PARAMETERS = 10,
1759 SPOOLSS_FIELD_DATATYPE = 11,
1760 SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12,
1761 SPOOLSS_FIELD_ATTRIBUTES = 13,
1762 SPOOLSS_FIELD_PRIORITY = 14,
1763 SPOOLSS_FIELD_DEFAULT_PRIORITY = 15,
1764 SPOOLSS_FIELD_START_TIME = 16,
1765 SPOOLSS_FIELD_UNTIL_TIME = 17,
1766 SPOOLSS_FIELD_STATUS = 18,
1767 SPOOLSS_FIELD_STATUS_STRING = 19,
1768 SPOOLSS_FIELD_CJOBS = 20,
1769 SPOOLSS_FIELD_AVERAGE_PPM = 21,
1770 SPOOLSS_FIELD_TOTAL_PAGES = 22,
1771 SPOOLSS_FIELD_PAGES_PRINTED = 23,
1772 SPOOLSS_FIELD_TOTAL_BYTES = 24,
1773 SPOOLSS_FIELD_BYTES_PRINTED = 25
1776 typedef [enum16bit] enum {
1777 SPOOLSS_NOTIFY_PRINTER = 0,
1778 SPOOLSS_NOTIFY_JOB = 1
1779 } spoolss_NotifyType;
1781 /******************/
1782 /* Function: 0x41 */
1784 spoolss_NotifyType type;
1789 [size_is(count)] spoolss_Field *fields;
1790 } spoolss_NotifyOptionType;
1792 typedef [bitmap32bit] bitmap {
1793 PRINTER_NOTIFY_OPTIONS_REFRESH = 0x00000001
1794 } spoolssNotifyOptionFlags;
1797 [value(2)] uint32 version;
1798 spoolssNotifyOptionFlags flags;
1800 [size_is(count)] spoolss_NotifyOptionType *types;
1801 } spoolss_NotifyOption;
1803 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx(
1804 [in,ref] policy_handle *handle,
1805 [in] spoolss_PrinterChangeFlags flags,
1806 [in] uint32 options,
1807 [in,unique] [string,charset(UTF16)] uint16 *local_machine,
1808 [in] uint32 printer_local,
1809 [in,unique] spoolss_NotifyOption *notify_options
1812 /******************/
1813 /* Function: 0x42 */
1817 [size_is(size/2),unique,charset(UTF16)] uint16 *string;
1818 } spoolss_NotifyString;
1820 typedef [v1_enum] enum {
1821 NOTIFY_TABLE_DWORD = 0x0001,
1822 NOTIFY_TABLE_STRING = 0x0002,
1823 NOTIFY_TABLE_DEVMODE = 0x0003,
1824 NOTIFY_TABLE_TIME = 0x0004,
1825 NOTIFY_TABLE_SECURITYDESCRIPTOR = 0x0005
1826 } spoolss_NotifyTable;
1828 typedef [switch_type(uint32)] union {
1829 [case(1)] uint32 integer[2];
1830 [case(2)] spoolss_NotifyString string;
1831 [case(3)] spoolss_DevmodeContainer devmode;
1832 [case(4)] spoolss_TimeCtr time;
1833 [case(5)] sec_desc_buf sd;
1834 } spoolss_NotifyData;
1837 spoolss_NotifyType type;
1838 spoolss_Field field;
1839 spoolss_NotifyTable variable_type;
1841 [switch_is(variable_type)] spoolss_NotifyData data;
1845 [value(2)] uint32 version;
1848 [size_is(count)] spoolss_Notify notifies[];
1849 } spoolss_NotifyInfo;
1851 typedef [switch_type(uint32)] union {
1852 [case(0)] spoolss_NotifyInfo *info0;
1853 } spoolss_ReplyPrinterInfo;
1855 typedef [bitmap32bit] bitmap {
1856 PRINTER_NOTIFY_INFO_DISCARDED = 0x00000001,
1857 PRINTER_NOTIFY_INFO_DISCARDNOTED = 0x00010000,
1858 PRINTER_NOTIFY_INFO_COLOR_MISMATCH = 0x00080000
1859 } spoolss_PrinterNotifyFlags;
1861 WERROR spoolss_RouterReplyPrinterEx(
1862 [in,ref] policy_handle *handle,
1864 [in] spoolss_PrinterChangeFlags flags,
1865 [out,ref] spoolss_PrinterNotifyFlags *reply_result,
1866 [in] uint32 reply_type,
1867 [in,switch_is(reply_type)] spoolss_ReplyPrinterInfo info
1870 /******************/
1871 /* Function: 0x43 */
1872 [public] WERROR spoolss_RouterRefreshPrinterChangeNotify(
1873 [in,ref] policy_handle *handle,
1874 [in] uint32 change_low,
1875 [in,unique] spoolss_NotifyOption *options,
1876 [out,ref] spoolss_NotifyInfo **info
1879 /******************/
1880 /* Function: 0x44 */
1881 [todo] WERROR spoolss_44(
1886 [string,charset(UTF16)] uint16 *client;
1887 [string,charset(UTF16)] uint16 *user;
1889 spoolss_MajorVersion major;
1890 spoolss_MinorVersion minor;
1891 spoolss_ProcessorArchitecture processor;
1892 } spoolss_UserLevel1;
1896 } spoolss_UserLevel2;
1902 [string,charset(UTF16)] uint16 *client;
1903 [string,charset(UTF16)] uint16 *user;
1905 spoolss_MajorVersion major;
1906 spoolss_MinorVersion minor;
1907 spoolss_ProcessorArchitecture processor;
1909 } spoolss_UserLevel3;
1911 typedef [switch_type(uint32)] union {
1912 [case(1)] spoolss_UserLevel1 *level1;
1913 [case(2)] spoolss_UserLevel2 *level2;
1914 [case(3)] spoolss_UserLevel3 *level3;
1915 } spoolss_UserLevel;
1919 [switch_is(level)] spoolss_UserLevel user_info;
1920 } spoolss_UserLevelCtr;
1923 SERVER_ACCESS_ADMINISTER = 0x00000001,
1924 SERVER_ACCESS_ENUMERATE = 0x00000002,
1925 PRINTER_ACCESS_ADMINISTER = 0x00000004,
1926 PRINTER_ACCESS_USE = 0x00000008,
1927 JOB_ACCESS_ADMINISTER = 0x00000010,
1928 JOB_ACCESS_READ = 0x00000020
1929 } spoolss_AccessRights;
1931 /* Access rights for print servers */
1932 const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED |
1933 SERVER_ACCESS_ADMINISTER |
1934 SERVER_ACCESS_ENUMERATE;
1936 const int SERVER_READ = SEC_STD_READ_CONTROL |
1937 SERVER_ACCESS_ENUMERATE;
1939 const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1940 SERVER_ACCESS_ADMINISTER |
1941 SERVER_ACCESS_ENUMERATE;
1943 const int SERVER_EXECUTE = SEC_STD_READ_CONTROL |
1944 SERVER_ACCESS_ENUMERATE;
1946 /* Access rights for printers */
1947 const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED |
1948 PRINTER_ACCESS_ADMINISTER |
1951 const int PRINTER_READ = SEC_STD_READ_CONTROL |
1954 const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1957 const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL |
1960 /* Access rights for jobs */
1961 const int JOB_ALL_ACCESS = SEC_STD_REQUIRED |
1962 JOB_ACCESS_ADMINISTER;
1964 const int JOB_READ = SEC_STD_READ_CONTROL |
1965 JOB_ACCESS_ADMINISTER;
1967 const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS |
1968 JOB_ACCESS_ADMINISTER;
1970 const int JOB_EXECUTE = SEC_STD_READ_CONTROL |
1971 JOB_ACCESS_ADMINISTER;
1973 /* ACE masks for various print permissions */
1974 const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL |
1977 const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL |
1978 READ_CONTROL_ACCESS;
1980 const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS |
1981 READ_CONTROL_ACCESS |
1984 /******************/
1985 /* Function: 0x45 */
1986 [public] WERROR spoolss_OpenPrinterEx(
1987 [in,unique] [string,charset(UTF16)] uint16 *printername,
1988 [in,unique] [string,charset(UTF16)] uint16 *datatype,
1989 [in] spoolss_DevmodeContainer devmode_ctr,
1990 [in] spoolss_AccessRights access_mask,
1992 [in,switch_is(level)] spoolss_UserLevel userlevel,
1993 [out,ref] policy_handle *handle
1996 /******************/
1997 /* Function: 0x46 */
1998 WERROR spoolss_AddPrinterEx(
1999 [in,unique] [string,charset(UTF16)] uint16 *server,
2000 [in,ref] spoolss_SetPrinterInfoCtr *info_ctr,
2001 [in,ref] spoolss_DevmodeContainer *devmode_ctr,
2002 [in,ref] sec_desc_buf *secdesc_ctr,
2003 [in,ref] spoolss_UserLevelCtr *userlevel_ctr,
2004 [out,ref] policy_handle *handle
2007 /******************/
2008 /* Function: 0x47 */
2009 [todo] WERROR spoolss_47(
2012 /******************/
2013 /* Function: 0x48 */
2014 WERROR spoolss_EnumPrinterData(
2015 [in,ref] policy_handle *handle,
2016 [in] uint32 enum_index,
2017 [out,size_is(value_offered/2),charset(UTF16)] uint16 value_name[],
2018 [in] uint32 value_offered,
2019 [out,ref] uint32 *value_needed,
2020 [out,ref] uint32 *printerdata_type,
2021 [out,ref] DATA_BLOB *buffer,
2022 [in] uint32 data_offered,
2023 [out,ref] uint32 *data_needed
2026 /******************/
2027 /* Function: 0x49 */
2028 WERROR spoolss_DeletePrinterData(
2029 [in,ref] policy_handle *handle,
2030 [in] [string,charset(UTF16)] uint16 value_name[]
2033 /******************/
2034 /* Function: 0x4a */
2035 [todo] WERROR spoolss_4a(
2038 /******************/
2039 /* Function: 0x4b */
2040 [todo] WERROR spoolss_4b(
2043 /******************/
2044 /* Function: 0x4c */
2045 [todo] WERROR spoolss_4c(
2048 /******************/
2049 /* Function: 0x4d */
2050 WERROR spoolss_SetPrinterDataEx(
2051 [in,ref] policy_handle *handle,
2052 [in] [string,charset(UTF16)] uint16 key_name[],
2053 [in] [string,charset(UTF16)] uint16 value_name[],
2055 [in,ref] [size_is(offered)] uint8 *buffer,
2059 /******************/
2060 /* Function: 0x4e */
2061 WERROR spoolss_GetPrinterDataEx(
2062 [in,ref] policy_handle *handle,
2063 [in] [string,charset(UTF16)] uint16 key_name[],
2064 [in] [string,charset(UTF16)] uint16 value_name[],
2065 [out,ref] uint32 *type,
2066 [out,ref] [size_is(offered)] uint8 *buffer,
2067 [in] uint32 offered,
2068 [out,ref] uint32 *needed
2071 /******************/
2072 /* Function: 0x4f */
2073 [public] WERROR spoolss_EnumPrinterDataEx(
2074 [in,ref] policy_handle *handle,
2075 [in] [string,charset(UTF16)] uint16 key_name[],
2076 [out,ref] [size_is(offered)] uint8 *buffer,
2077 [in] uint32 offered,
2078 [out,ref] uint32 *needed,
2079 [out,ref] uint32 *count
2082 /******************/
2083 /* Function: 0x50 */
2084 [public] WERROR spoolss_EnumPrinterKey(
2085 [in, ref] policy_handle *handle,
2086 [in] [string,charset(UTF16)] uint16 key_name[],
2087 [out,ref] [size_is(key_buffer_size/2)] uint16 *key_buffer,
2088 [in] uint32 key_buffer_size,
2089 [out,ref] uint32 *needed
2092 /******************/
2093 /* Function: 0x51 */
2094 WERROR spoolss_DeletePrinterDataEx(
2095 [in,ref] policy_handle *handle,
2096 [in] [string,charset(UTF16)] uint16 key_name[],
2097 [in] [string,charset(UTF16)] uint16 value_name[]
2100 /******************/
2101 /* Function: 0x52 */
2102 WERROR spoolss_DeletePrinterKey(
2103 [in,ref] policy_handle *handle,
2104 [in] [string,charset(UTF16)] uint16 key_name[]
2107 /******************/
2108 /* Function: 0x53 */
2109 [todo] WERROR spoolss_53(
2112 /******************/
2113 /* Function: 0x54 */
2114 typedef [public,bitmap32bit] bitmap {
2115 DPD_DELETE_UNUSED_FILES = 0x00000001,
2116 DPD_DELETE_SPECIFIC_VERSION = 0x00000002,
2117 DPD_DELETE_ALL_FILES = 0x00000004
2118 } spoolss_DeleteDriverFlags;
2120 WERROR spoolss_DeletePrinterDriverEx(
2121 [in,unique] [string,charset(UTF16)] uint16 *server,
2122 [in] [string,charset(UTF16)] uint16 architecture[],
2123 [in] [string,charset(UTF16)] uint16 driver[],
2124 [in] spoolss_DeleteDriverFlags delete_flags,
2128 /******************/
2129 /* Function: 0x55 */
2130 [todo] WERROR spoolss_55(
2133 /******************/
2134 /* Function: 0x56 */
2135 [todo] WERROR spoolss_56(
2138 /******************/
2139 /* Function: 0x57 */
2140 [todo] WERROR spoolss_57(
2143 /******************/
2144 /* Function: 0x58 */
2146 typedef [v1_enum] enum {
2147 PROTOCOL_RAWTCP_TYPE = 1,
2148 PROTOCOL_LPR_TYPE = 2
2149 } spoolss_PortProtocol;
2151 typedef [public] struct {
2152 [charset(UTF16)] uint16 portname[64];
2153 [value(0x00000001)] uint32 version;
2154 spoolss_PortProtocol protocol;
2155 [value(sizeof(r))] uint32 size;
2157 [charset(UTF16)] uint16 hostaddress[49];
2158 [charset(UTF16)] uint16 snmpcommunity[33];
2160 [charset(UTF16)] uint16 queue[33];
2161 [charset(UTF16)] uint16 ip_address[16]; /* s3 had 17 */
2162 [charset(UTF16)] uint16 hardware_address[13];
2163 [charset(UTF16)] uint16 device_type[257];
2165 boolean32 snmp_enabled;
2166 uint32 snmp_dev_index;
2167 } spoolss_PortData1;
2169 typedef [public] struct {
2170 [charset(UTF16)] uint16 portname[64];
2171 [value(0x00000002)] uint32 version;
2172 spoolss_PortProtocol protocol;
2173 [value(sizeof(r))] uint32 size;
2175 [charset(UTF16)] uint16 hostaddress[128];
2176 [charset(UTF16)] uint16 snmpcommunity[33];
2178 [charset(UTF16)] uint16 queue[33];
2179 [charset(UTF16)] uint16 device_type[257];
2181 boolean32 snmp_enabled;
2182 uint32 snmp_dev_index;
2183 uint32 port_monitor_mib_index;
2184 } spoolss_PortData2;
2186 typedef [public] struct {
2188 } spoolss_MonitorUi;
2190 WERROR spoolss_XcvData(
2191 [in,ref] policy_handle *handle,
2192 [in] [string,charset(UTF16)] uint16 function_name[],
2193 [in] DATA_BLOB in_data,
2194 [in,value(r->in.in_data.length)] uint32 _in_data_length,
2195 [out,ref] [size_is(out_data_size)] uint8 *out_data,
2196 [in] uint32 out_data_size,
2197 [out,ref] uint32 *needed,
2198 [in,out,ref] uint32 *status_code
2201 /******************/
2202 /* Function: 0x59 */
2204 typedef [bitmap32bit] bitmap {
2205 APD_STRICT_UPGRADE = 0x00000001,
2206 APD_STRICT_DOWNGRADE = 0x00000002,
2207 APD_COPY_ALL_FILES = 0x00000004,
2208 APD_COPY_NEW_FILES = 0x00000008,
2209 APD_COPY_FROM_DIRECTORY = 0x00000010,
2210 APD_DONT_COPY_FILES_TO_CLUSTER = 0x00001000,
2211 APD_COPY_TO_ALL_SPOOLERS = 0x00002000,
2212 APD_RETURN_BLOCKING_STATUS_CODE = 0x00010000
2213 } spoolss_AddPrinterDriverExFlags;
2215 [public] WERROR spoolss_AddPrinterDriverEx(
2216 [in,unique] [string,charset(UTF16)] uint16 *servername,
2217 [in,ref] spoolss_AddDriverInfoCtr *info_ctr,
2218 [in] spoolss_AddPrinterDriverExFlags flags
2221 /******************/
2222 /* Function: 0x5a */
2223 [todo] WERROR spoolss_5a(
2226 /******************/
2227 /* Function: 0x5b */
2228 [todo] WERROR spoolss_5b(
2231 /******************/
2232 /* Function: 0x5c */
2233 [todo] WERROR spoolss_5c(
2236 /******************/
2237 /* Function: 0x5d */
2238 [todo] WERROR spoolss_5d(
2241 /******************/
2242 /* Function: 0x5e */
2243 [todo] WERROR spoolss_5e(
2246 /******************/
2247 /* Function: 0x5f */
2248 [todo] WERROR spoolss_5f(