4 spoolss interface definitions
6 import
"security.idl", "winreg.idl";
8 [ uuid("12345678-1234-abcd-ef00-0123456789ab"),
10 endpoint("ncacn_np:[\\pipe\\spoolss]"),
11 pointer_default(unique),
12 pointer_default_top
(unique),
13 helpstring("Spooler SubSystem"),
14 helper
("librpc/ndr/ndr_spoolss_buf.h")
17 declare
[v1_enum] enum winreg_Type
;
30 [relative
] nstring
*printername
;
31 [relative
] nstring
*servername
;
36 uint32 global_counter
;
42 uint32 session_counter
;
44 uint32 printer_errors
;
59 } spoolss_PrinterInfo0
;
61 typedef [public,gensize
] struct {
66 [value
(r
->driverextra_data.length
)] uint16 __driverextra_length
;
87 uint32 displayfrequency
;
96 [subcontext_size
(__driverextra_length
),subcontext
(0),flag
(NDR_REMAINING
)] DATA_BLOB driverextra_data
;
99 typedef [public] bitmap
{
100 PRINTER_ENUM_DEFAULT
= 0x00000001,
101 PRINTER_ENUM_LOCAL
= 0x00000002,
102 PRINTER_ENUM_CONNECTIONS
= 0x00000004,
103 PRINTER_ENUM_FAVORITE
= 0x00000004,
104 PRINTER_ENUM_NAME
= 0x00000008,
105 PRINTER_ENUM_REMOTE
= 0x00000010,
106 PRINTER_ENUM_SHARED
= 0x00000020,
107 PRINTER_ENUM_NETWORK
= 0x00000040,
108 PRINTER_ENUM_EXPAND
= 0x00004000,
109 PRINTER_ENUM_CONTAINER
= 0x00008000,
110 PRINTER_ENUM_ICON1
= 0x00010000,
111 PRINTER_ENUM_ICON2
= 0x00020000,
112 PRINTER_ENUM_ICON3
= 0x00040000,
113 PRINTER_ENUM_ICON4
= 0x00080000,
114 PRINTER_ENUM_ICON5
= 0x00100000,
115 PRINTER_ENUM_ICON6
= 0x00200000,
116 PRINTER_ENUM_ICON7
= 0x00400000,
117 PRINTER_ENUM_ICON8
= 0x00800000,
118 PRINTER_ENUM_HIDE
= 0x01000000
119 } spoolss_EnumPrinterFlags
;
122 spoolss_EnumPrinterFlags flags
;
123 [relative
] nstring
*name
;
124 [relative
] nstring
*description
;
125 [relative
] nstring
*comment
;
126 } spoolss_PrinterInfo1
;
129 PRINTER_ATTRIBUTE_QUEUED
= 0x00000001,
130 PRINTER_ATTRIBUTE_DIRECT
= 0x00000002,
131 PRINTER_ATTRIBUTE_DEFAULT
= 0x00000004,
132 PRINTER_ATTRIBUTE_SHARED
= 0x00000008,
133 PRINTER_ATTRIBUTE_NETWORK
= 0x00000010,
134 PRINTER_ATTRIBUTE_HIDDEN
= 0x00000020,
135 PRINTER_ATTRIBUTE_LOCAL
= 0x00000040,
136 PRINTER_ATTRIBUTE_ENABLE_DEVQ
= 0x00000080,
137 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
= 0x00000100,
138 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
= 0x00000200,
139 PRINTER_ATTRIBUTE_WORK_OFFLINE
= 0x00000400,
140 PRINTER_ATTRIBUTE_ENABLE_BIDI
= 0x00000800,
141 PRINTER_ATTRIBUTE_RAW_ONLY
= 0x00001000,
142 PRINTER_ATTRIBUTE_PUBLISHED
= 0x00002000,
143 PRINTER_ATTRIBUTE_FAX
= 0x00004000,
144 PRINTER_ATTRIBUTE_TS
= 0x00008000
145 } spoolss_PrinterAttributes
;
148 PRINTER_STATUS_PAUSED
= 0x00000001,
149 PRINTER_STATUS_ERROR
= 0x00000002,
150 PRINTER_STATUS_PENDING_DELETION
= 0x00000004,
151 PRINTER_STATUS_PAPER_JAM
= 0x00000008,
152 PRINTER_STATUS_PAPER_OUT
= 0x00000010,
153 PRINTER_STATUS_MANUAL_FEED
= 0x00000020,
154 PRINTER_STATUS_PAPER_PROBLEM
= 0x00000040,
155 PRINTER_STATUS_OFFLINE
= 0x00000080,
156 PRINTER_STATUS_IO_ACTIVE
= 0x00000100,
157 PRINTER_STATUS_BUSY
= 0x00000200,
158 PRINTER_STATUS_PRINTING
= 0x00000400,
159 PRINTER_STATUS_OUTPUT_BIN_FULL
= 0x00000800,
160 PRINTER_STATUS_NOT_AVAILABLE
= 0x00001000,
161 PRINTER_STATUS_WAITING
= 0x00002000,
162 PRINTER_STATUS_PROCESSING
= 0x00004000,
163 PRINTER_STATUS_INITIALIZING
= 0x00008000,
164 PRINTER_STATUS_WARMING_UP
= 0x00010000,
165 PRINTER_STATUS_TONER_LOW
= 0x00020000,
166 PRINTER_STATUS_NO_TONER
= 0x00040000,
167 PRINTER_STATUS_PAGE_PUNT
= 0x00080000,
168 PRINTER_STATUS_USER_INTERVENTION
= 0x00100000,
169 PRINTER_STATUS_OUT_OF_MEMORY
= 0x00200000,
170 PRINTER_STATUS_DOOR_OPEN
= 0x00400000,
171 PRINTER_STATUS_SERVER_UNKNOWN
= 0x00800000,
172 PRINTER_STATUS_POWER_SAVE
= 0x01000000
173 } spoolss_PrinterStatus
;
176 [relative
] nstring
*servername
;
177 [relative
] nstring
*printername
;
178 [relative
] nstring
*sharename
;
179 [relative
] nstring
*portname
;
180 [relative
] nstring
*drivername
;
181 [relative
] nstring
*comment
;
182 [relative
] nstring
*location
;
183 [relative
,subcontext
(0)] spoolss_DeviceMode
*devmode
;
184 [relative
] nstring
*sepfile
;
185 [relative
] nstring
*printprocessor
;
186 [relative
] nstring
*datatype
;
187 [relative
] nstring
*parameters
;
188 [relative
,subcontext
(0)] security_descriptor
*secdesc
;
189 spoolss_PrinterAttributes attributes
;
191 uint32 defaultpriority
;
194 spoolss_PrinterStatus status
;
197 } spoolss_PrinterInfo2
;
200 [relative
,subcontext
(0)] security_descriptor
*secdesc
;
201 } spoolss_PrinterInfo3
;
204 [relative
] nstring
*printername
;
205 [relative
] nstring
*servername
;
206 spoolss_PrinterAttributes attributes
;
207 } spoolss_PrinterInfo4
;
210 [relative
] nstring
*printername
;
211 [relative
] nstring
*portname
;
212 spoolss_PrinterAttributes attributes
;
213 uint32 device_not_selected_timeout
;
214 uint32 transmission_retry_timeout
;
215 } spoolss_PrinterInfo5
;
218 spoolss_PrinterStatus status
;
219 } spoolss_PrinterInfo6
;
222 DSPRINT_PUBLISH
= 0x00000001,
223 DSPRINT_UPDATE
= 0x00000002,
224 DSPRINT_UNPUBLISH
= 0x00000004,
225 DSPRINT_REPUBLISH
= 0x00000008,
226 DSPRINT_PENDING
= 0x80000000
227 } spoolss_DsPrintAction
;
230 [relative
] nstring
*guid
; /* text form of printer guid */
231 spoolss_DsPrintAction action
;
232 } spoolss_PrinterInfo7
;
235 [relative
,subcontext
(0)] spoolss_DeviceMode
*devmode
;
236 } spoolss_DeviceModeInfo
;
238 typedef [nodiscriminant
,relative_base
,public] union {
239 [case(0)] spoolss_PrinterInfo0 info0
;
240 [case(1)] spoolss_PrinterInfo1 info1
;
241 [case(2)] spoolss_PrinterInfo2 info2
;
242 [case(3)] spoolss_PrinterInfo3 info3
;
243 [case(4)] spoolss_PrinterInfo4 info4
;
244 [case(5)] spoolss_PrinterInfo5 info5
;
245 [case(6)] spoolss_PrinterInfo6 info6
;
246 [case(7)] spoolss_PrinterInfo7 info7
;
247 [case(8)] spoolss_DeviceModeInfo info8
;
248 [case(9)] spoolss_DeviceModeInfo info9
;
250 } spoolss_PrinterInfo
;
254 /* we are using this as internal parsing code */
255 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinters
(
256 [in] spoolss_EnumPrinterFlags flags
,
257 [in] [string,charset
(UTF16
)] uint16
*server
,
259 [in] DATA_BLOB
*buffer
,
261 [out] DATA_BLOB
*info
,
265 [public,noopnum
,noprint
] void __spoolss_EnumPrinters
(
268 [out,switch_is(level
)] spoolss_PrinterInfo info
[count
]
270 [nopull
,nopush
] WERROR spoolss_EnumPrinters
(
271 [in] spoolss_EnumPrinterFlags flags
,
272 [in] [string,charset
(UTF16
)] uint16
*server
,
274 [in] DATA_BLOB
*buffer
,
276 /* what we have here is a subcontext containing an array of no discriminant unions
277 * and the array has no size in front
279 [out,switch_is(level
),size_is(count
)] spoolss_PrinterInfo
*info
,
287 [value
(_ndr_size_spoolss_DeviceMode
(devmode
, ndr
->flags
))] uint32 _ndr_size
;
288 [subcontext
(4),subcontext_size
(_ndr_size
)] spoolss_DeviceMode
*devmode
;
289 } spoolss_DevmodeContainer
;
291 [public] WERROR spoolss_OpenPrinter
(
292 [in] [string,charset
(UTF16
)] uint16
*printername
,
293 [in] [string,charset
(UTF16
)] uint16
*datatype
,
294 [in] spoolss_DevmodeContainer devmode_ctr
,
295 [in] uint32 access_mask
,
296 [out,ref] policy_handle
*handle
303 [relative
] nstring
*printer_name
;
304 [relative
] nstring
*server_name
;
305 [relative
] nstring
*user_name
;
306 [relative
] nstring
*document_name
;
307 [relative
] nstring
*data_type
;
308 [relative
] nstring
*text_status
;
313 uint32 pages_printed
;
317 typedef [nodiscriminant
,relative_base
,public] union {
318 [case(1)] spoolss_JobInfo1 info1
;
319 [case(2)]; /* TODO */
320 [case(3)]; /* TODO */
326 [switch_is(level
)] spoolss_JobInfo info
;
327 } spoolss_JobInfoContainer
;
329 typedef [v1_enum] enum {
330 SPOOLSS_JOB_CONTROL_PAUSE
= 1,
331 SPOOLSS_JOB_CONTROL_RESUME
= 2,
332 SPOOLSS_JOB_CONTROL_CANCEL
= 3,
333 SPOOLSS_JOB_CONTROL_RESTART
= 4,
334 SPOOLSS_JOB_CONTROL_DELETE
= 5,
335 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER
= 6,
336 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED
= 7
337 } spoolss_JobControl
;
339 WERROR spoolss_SetJob
(
340 [in,ref] policy_handle
*handle,
342 [in] spoolss_JobInfoContainer
*ctr
,
343 [in] spoolss_JobControl command
348 WERROR spoolss_GetJob
(
349 [in,ref] policy_handle
*handle,
352 [in] DATA_BLOB
*buffer
,
354 [out,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_JobInfo
*info
,
360 [public,noopnum
,noprint
] WERROR _spoolss_EnumJobs
(
361 [in,ref] policy_handle
*handle,
362 [in] uint32 firstjob
,
365 [in] DATA_BLOB
*buffer
,
367 [out] DATA_BLOB
*info
,
371 [public,noopnum
,noprint
] void __spoolss_EnumJobs
(
374 [out,switch_is(level
)] spoolss_JobInfo info
[count
]
376 [nopull
,nopush
] WERROR spoolss_EnumJobs
(
377 [in,ref] policy_handle
*handle,
378 [in] uint32 firstjob
,
381 [in] DATA_BLOB
*buffer
,
383 [out,switch_is(level
),size_is(count
)] spoolss_JobInfo
*info
,
390 WERROR spoolss_AddPrinter
(
391 /* This function is not implemented in Samba 3 as no
392 clients have been observed using it. */
397 WERROR spoolss_DeletePrinter
(
402 typedef [v1_enum] enum {
403 SPOOLSS_PRINTER_CONTROL_UNPAUSE
= 0,
404 SPOOLSS_PRINTER_CONTROL_PAUSE
= 1,
405 SPOOLSS_PRINTER_CONTROL_RESUME
= 2,
406 SPOOLSS_PRINTER_CONTROL_PURGE
= 3,
407 SPOOLSS_PRINTER_CONTROL_SET_STATUS
= 4
408 } spoolss_PrinterControl
;
410 typedef [switch_type(uint32
)] union {
411 [case(0)] spoolss_PrinterInfo0
*info0
;
412 [case(1)] spoolss_PrinterInfo1
*info1
;
413 [case(2)] spoolss_PrinterInfo2
*info2
;
414 [case(3)] spoolss_PrinterInfo3
*info3
;
415 [case(4)] spoolss_PrinterInfo4
*info4
;
416 [case(5)] spoolss_PrinterInfo5
*info5
;
417 [case(6)] spoolss_PrinterInfo6
*info6
;
418 [case(7)] spoolss_PrinterInfo7
*info7
;
419 [case(8)] spoolss_DeviceModeInfo
*info8
;
420 [case(9)] spoolss_DeviceModeInfo
*info9
;
422 } spoolss_SetPrinterInfo
;
424 WERROR spoolss_SetPrinter
(
425 [in,ref] policy_handle
*handle,
427 [in,switch_is(level
)] spoolss_SetPrinterInfo info
,
428 [in] spoolss_DevmodeContainer devmode_ctr
,
429 [in] sec_desc_buf secdesc_ctr
,
430 [in] spoolss_PrinterControl command
435 [public] WERROR spoolss_GetPrinter
(
436 [in,ref] policy_handle
*handle,
438 [in] DATA_BLOB
*buffer
,
440 [out,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_PrinterInfo
*info
,
446 WERROR spoolss_AddPrinterDriver
(
450 [relative
] nstring
*driver_name
;
451 } spoolss_DriverInfo1
;
453 typedef [v1_enum] enum {
454 SPOOLSS_DRIVER_VERSION_9X
= 0,
455 SPOOLSS_DRIVER_VERSION_NT35
= 1,
456 SPOOLSS_DRIVER_VERSION_NT4
= 2,
457 SPOOLSS_DRIVER_VERSION_200X
= 3
458 } spoolss_DriverOSVersion
;
461 spoolss_DriverOSVersion
version;
462 [relative
] nstring
*driver_name
;
463 [relative
] nstring
*architecture
;
464 [relative
] nstring
*driver_path
;
465 [relative
] nstring
*data_file
;
466 [relative
] nstring
*config_file
;
467 } spoolss_DriverInfo2
;
470 spoolss_DriverOSVersion
version;
471 [relative
] nstring
*driver_name
;
472 [relative
] nstring
*architecture
;
473 [relative
] nstring
*driver_path
;
474 [relative
] nstring
*data_file
;
475 [relative
] nstring
*config_file
;
476 [relative
] nstring
*help_file
;
477 [relative
] nstring_array
*dependent_files
;
478 [relative
] nstring
*monitor_name
;
479 [relative
] nstring
*default_datatype
;
480 } spoolss_DriverInfo3
;
483 spoolss_DriverOSVersion
version;
484 [relative
] nstring
*driver_name
;
485 [relative
] nstring
*architecture
;
486 [relative
] nstring
*driver_path
;
487 [relative
] nstring
*data_file
;
488 [relative
] nstring
*config_file
;
489 [relative
] nstring
*help_file
;
490 [relative
] nstring_array
*dependent_files
;
491 [relative
] nstring
*monitor_name
;
492 [relative
] nstring
*default_datatype
;
493 [relative
] nstring_array
*previous_names
;
494 } spoolss_DriverInfo4
;
497 spoolss_DriverOSVersion
version;
498 [relative
] nstring
*driver_name
;
499 [relative
] nstring
*architecture
;
500 [relative
] nstring
*driver_path
;
501 [relative
] nstring
*data_file
;
502 [relative
] nstring
*config_file
;
503 uint32 driver_attributes
;
504 uint32 config_version
;
505 uint32 driver_version
;
506 } spoolss_DriverInfo5
;
509 spoolss_DriverOSVersion
version;
510 [relative
] nstring
*driver_name
;
511 [relative
] nstring
*architecture
;
512 [relative
] nstring
*driver_path
;
513 [relative
] nstring
*data_file
;
514 [relative
] nstring
*config_file
;
515 [relative
] nstring
*help_file
;
516 [relative
] nstring_array
*dependent_files
;
517 [relative
] nstring
*monitor_name
;
518 [relative
] nstring
*default_datatype
;
519 [relative
] nstring_array
*previous_names
;
521 hyper driver_version
;
522 [relative
] nstring
*manufacturer_name
;
523 [relative
] nstring
*manufacturer_url
;
524 [relative
] nstring
*hardware_id
;
525 [relative
] nstring
*provider
;
526 } spoolss_DriverInfo6
;
528 typedef [nodiscriminant
,relative_base
,public] union {
529 [case(1)] spoolss_DriverInfo1 info1
;
530 [case(2)] spoolss_DriverInfo2 info2
;
531 [case(3)] spoolss_DriverInfo3 info3
;
532 [case(4)] spoolss_DriverInfo4 info4
;
533 [case(5)] spoolss_DriverInfo5 info5
;
534 [case(6)] spoolss_DriverInfo6 info6
;
536 } spoolss_DriverInfo
;
540 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinterDrivers
(
541 [in] [string,charset
(UTF16
)] uint16
*server
,
542 [in] [string,charset
(UTF16
)] uint16
*environment
,
544 [in] DATA_BLOB
*buffer
,
546 [out] DATA_BLOB
*info
,
550 [public,noopnum
,noprint
] void __spoolss_EnumPrinterDrivers
(
553 [out,switch_is(level
)] spoolss_DriverInfo info
[count
]
555 [nopull
,nopush
] WERROR spoolss_EnumPrinterDrivers
(
556 [in] [string,charset
(UTF16
)] uint16
*server
,
557 [in] [string,charset
(UTF16
)] uint16
*environment
,
559 [in] DATA_BLOB
*buffer
,
561 [out,switch_is(level
),size_is(count
)] spoolss_DriverInfo
*info
,
568 WERROR spoolss_GetPrinterDriver
(
574 nstring directory_name
;
575 } spoolss_DriverDirectoryInfo1
;
577 /* NOTE: it's seems that w2k3 completly ignores the level
580 typedef [nodiscriminant
,relative_base
,gensize
,public] union {
581 [case(1)] spoolss_DriverDirectoryInfo1 info1
;
582 [default] spoolss_DriverDirectoryInfo1 info1
;
583 } spoolss_DriverDirectoryInfo
;
585 WERROR spoolss_GetPrinterDriverDirectory
(
586 [in] [string,charset
(UTF16
)] uint16
*server
,
587 [in] [string,charset
(UTF16
)] uint16
*environment
,
589 [in] DATA_BLOB
*buffer
,
591 [out,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverDirectoryInfo
*info
,
597 WERROR spoolss_DeletePrinterDriver
(
598 [in,ref] policy_handle
*handle,
599 [in] [string,charset
(UTF16
)] uint16
*server
,
600 [in] [string,charset
(UTF16
)] uint16 architecture
[],
601 [in] [string,charset
(UTF16
)] uint16 driver
[]
606 WERROR spoolss_AddPrintProcessor
(
612 [relative
] nstring
*print_processor_name
;
613 } spoolss_PrintProcessorInfo1
;
615 typedef [nodiscriminant
,relative_base
,public] union {
616 [case(1)] spoolss_PrintProcessorInfo1 info1
;
618 } spoolss_PrintProcessorInfo
;
620 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrintProcessors
(
621 [in] [string,charset
(UTF16
)] uint16
*servername
,
622 [in] [string,charset
(UTF16
)] uint16
*environment
,
624 [in] DATA_BLOB
*buffer
,
626 [out] DATA_BLOB
*info
,
630 [public,noopnum
,noprint
] void __spoolss_EnumPrintProcessors
(
633 [out,switch_is(level
)] spoolss_PrintProcessorInfo info
[count
]
635 [nopull
,nopush
] WERROR spoolss_EnumPrintProcessors
(
636 [in] [string,charset
(UTF16
)] uint16
*servername
,
637 [in] [string,charset
(UTF16
)] uint16
*environment
,
639 [in] DATA_BLOB
*buffer
,
641 [out,switch_is(level
),size_is(count
)] spoolss_PrintProcessorInfo
*info
,
648 WERROR spoolss_GetPrintProcessorDirectory
(
654 [string,charset
(UTF16
)] uint16
*document_name
;
655 [string,charset
(UTF16
)] uint16
*output_file
;
656 [string,charset
(UTF16
)] uint16
*datatype
;
657 } spoolss_DocumentInfo1
;
659 typedef [switch_type(uint32
)] union {
660 [case(1)] spoolss_DocumentInfo1
*info1
;
661 [case(2)]; /* TODO */
662 [case(3)]; /* TODO */
664 } spoolss_DocumentInfo
;
666 WERROR spoolss_StartDocPrinter
(
667 [in,ref] policy_handle
*handle,
669 [in,switch_is(level
)] spoolss_DocumentInfo info
,
675 WERROR spoolss_StartPagePrinter
(
676 [in,ref] policy_handle
*handle
681 WERROR spoolss_WritePrinter
(
682 [in,ref] policy_handle
*handle,
684 [in,value
(r
->in.data.length
)] uint32 _data_size
,
685 [out] uint32 num_written
690 WERROR spoolss_EndPagePrinter
(
691 [in,ref] policy_handle
*handle
696 WERROR spoolss_AbortPrinter
(
697 [in,ref] policy_handle
*handle
702 WERROR spoolss_ReadPrinter
(
703 [in,ref] policy_handle
*handle,
704 [in] uint32 data_size
,
705 [out] DATA_BLOB data
,
706 [out,value
(r
->out.data.length
)] uint32 _data_size
711 WERROR spoolss_EndDocPrinter
(
712 [in,ref] policy_handle
*handle
717 WERROR spoolss_AddJob
(
722 WERROR spoolss_ScheduleJob
(
727 const string SPOOLSS_ARCHITECTURE_NT_X86
= "Windows NT x86";
729 typedef [public,gensize
] struct {
730 [value
(ndr_size_spoolss_OSVersion
(r
,ndr
->flags
))] uint32 _ndr_size
;
734 [value
(2)] uint32 unknown
;
735 [subcontext
(0),subcontext_size
(256)] nstring extra_string
;
738 typedef [public,gensize
] struct {
739 [value
(ndr_size_spoolss_OSVersionEx
(r
,ndr
->flags
))] uint32 _ndr_size
;
743 [value
(2)] uint32 unknown1
;
744 [subcontext
(0),subcontext_size
(256)] nstring extra_string
;
745 uint32 unknown2
;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/
746 uint32 unknown3
;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */
747 } spoolss_OSVersionEx
;
749 typedef [v1_enum] enum {
750 SPOOLSS_PRINTER_DATA_TYPE_NULL
= 0,
751 SPOOLSS_PRINTER_DATA_TYPE_STRING
= 1,
752 SPOOLSS_PRINTER_DATA_TYPE_BINARY
= 3,
753 SPOOLSS_PRINTER_DATA_TYPE_UINT32
= 4,
754 SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY
= 7
755 } spoolss_PrinterDataType
;
757 typedef [nodiscriminant
,public,gensize
] union {
758 [case(SPOOLSS_PRINTER_DATA_TYPE_NULL
)];
759 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING
)] nstring
string;
760 [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY
),flag
(NDR_REMAINING
)] DATA_BLOB binary
;
761 [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32
)] uint32 value
;
762 [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY
)] nstring_array string_array
;
763 [default,flag
(NDR_REMAINING
)] DATA_BLOB data
;
764 } spoolss_PrinterData
;
766 [noopnum
,noprint
,public] WERROR _spoolss_GetPrinterData
(
767 [in,ref] policy_handle
*handle,
768 [in] [string,charset
(UTF16
)] uint16 value_name
[],
770 [out] spoolss_PrinterDataType type
,
771 [out] DATA_BLOB data
,
774 [noopnum
,noprint
,public] void __spoolss_GetPrinterData
(
775 [in] spoolss_PrinterDataType type
,
776 [out,switch_is(type
)] spoolss_PrinterData data
778 [nopull
,nopush
,public] WERROR spoolss_GetPrinterData
(
779 [in,ref] policy_handle
*handle,
780 [in] [string,charset
(UTF16
)] uint16 value_name
[],
782 [out] spoolss_PrinterDataType type
,
783 [out,subcontext
(4),subcontext_size
(offered
),switch_is(type
)] spoolss_PrinterData data
,
789 [noopnum
,nopull
,noprint
,public] WERROR _spoolss_SetPrinterData
(
790 [in,ref] policy_handle
*handle,
791 [in] [string,charset
(UTF16
)] uint16 value_name
[],
792 [in] spoolss_PrinterDataType type
,
796 [noopnum
,nopull
,noprint
,public] void __spoolss_SetPrinterData
(
797 [in] spoolss_PrinterDataType type
,
798 [out,switch_is(type
)] spoolss_PrinterData data
800 [nopush
] WERROR spoolss_SetPrinterData
(
801 [in,ref] policy_handle
*handle,
802 [in] [string,charset
(UTF16
)] uint16 value_name
[],
803 [in] spoolss_PrinterDataType type
,
804 [in,subcontext
(4),switch_is(type
)] spoolss_PrinterData data
,
805 [in,value
(ndr_size_spoolss_PrinterData
(&data
,type
,flags
))] uint32 _offered
810 WERROR spoolss_WaitForPrinterChange
(
815 [public] WERROR spoolss_ClosePrinter
(
816 [in,out,ref] policy_handle
*handle
821 typedef [v1_enum] enum {
822 SPOOLSS_FORM_USER
= 0,
823 SPOOLSS_FORM_BUILTIN
= 1,
824 SPOOLSS_FORM_PRINTER
= 2
840 spoolss_FormFlags flags
;
841 [relative
] nstring
*form_name
;
842 spoolss_FormSize size
;
843 spoolss_FormArea area
;
846 typedef [nodiscriminant
,relative_base
,public,gensize
] union {
847 [case(1)] spoolss_FormInfo1 info1
;
852 spoolss_FormFlags flags
;
853 [string,charset
(UTF16
)] uint16
*form_name
;
854 spoolss_FormSize size
;
855 spoolss_FormArea area
;
856 } spoolss_AddFormInfo1
;
858 typedef [switch_type(uint32
)] union {
859 [case(1)] spoolss_AddFormInfo1
*info1
;
860 } spoolss_AddFormInfo
;
862 WERROR spoolss_AddForm
(
863 [in,ref] policy_handle
*handle,
865 [in,switch_is(level
)] spoolss_AddFormInfo info
870 WERROR spoolss_DeleteForm
(
871 [in,ref] policy_handle
*handle,
872 [in] [string,charset
(UTF16
)] uint16 form_name
[]
877 WERROR spoolss_GetForm
(
878 [in,ref] policy_handle
*handle,
879 [in] [string,charset
(UTF16
)] uint16 form_name
[],
881 [in] DATA_BLOB
*buffer
,
883 [out,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_FormInfo
*info
,
889 WERROR spoolss_SetForm
(
890 [in,ref] policy_handle
*handle,
891 [in] [string,charset
(UTF16
)] uint16 form_name
[],
893 [in,switch_is(level
)] spoolss_AddFormInfo info
898 [public,noopnum
,noprint
] WERROR _spoolss_EnumForms
(
899 [in,ref] policy_handle
*handle,
901 [in] DATA_BLOB
*buffer
,
903 [out] DATA_BLOB
*info
,
907 [public,noopnum
,noprint
] void __spoolss_EnumForms
(
910 [out,switch_is(level
)] spoolss_FormInfo info
[count
]
912 [nopull
,nopush
] WERROR spoolss_EnumForms
(
913 [in,ref] policy_handle
*handle,
915 [in] DATA_BLOB
*buffer
,
917 [out,switch_is(level
),size_is(count
)] spoolss_FormInfo
*info
,
923 [relative
] nstring
*port_name
;
927 SPOOLSS_PORT_TYPE_WRITE
= 0x00000001,
928 SPOOLSS_PORT_TYPE_READ
= 0x00000002,
929 SPOOLSS_PORT_TYPE_REDIRECTED
= 0x00000004,
930 SPOOLSS_PORT_TYPE_NET_ATTACHED
= 0x00000008
934 [relative
] nstring
*port_name
;
935 [relative
] nstring
*monitor_name
;
936 [relative
] nstring
*description
;
937 spoolss_PortType port_type
;
941 typedef [nodiscriminant
,relative_base
,public] union {
942 [case(1)] spoolss_PortInfo1 info1
;
943 [case(2)] spoolss_PortInfo2 info2
;
944 [case(3)]; /* TODO */
950 [public,noopnum
,noprint
] WERROR _spoolss_EnumPorts
(
951 [in] [string,charset
(UTF16
)] uint16
*servername
,
953 [in] DATA_BLOB
*buffer
,
955 [out] DATA_BLOB
*info
,
959 [public,noopnum
,noprint
] void __spoolss_EnumPorts
(
962 [out,switch_is(level
)] spoolss_PortInfo info
[count
]
964 [nopull
,nopush
] WERROR spoolss_EnumPorts
(
965 [in] [string,charset
(UTF16
)] uint16
*servername
,
967 [in] DATA_BLOB
*buffer
,
969 [out,switch_is(level
),size_is(count
)] spoolss_PortInfo
*info
,
977 [relative
] nstring
*monitor_name
;
978 } spoolss_MonitorInfo1
;
981 [relative
] nstring
*monitor_name
;
982 [relative
] nstring
*environment
;
983 [relative
] nstring
*dll_name
;
984 } spoolss_MonitorInfo2
;
986 typedef [nodiscriminant
,relative_base
,public] union {
987 [case(1)] spoolss_MonitorInfo1 info1
;
988 [case(2)] spoolss_MonitorInfo2 info2
;
990 } spoolss_MonitorInfo
;
992 [public,noopnum
,noprint
] WERROR _spoolss_EnumMonitors
(
993 [in] [string,charset
(UTF16
)] uint16
*servername
,
995 [in] DATA_BLOB
*buffer
,
997 [out] DATA_BLOB
*info
,
1001 [public,noopnum
,noprint
] void __spoolss_EnumMonitors
(
1004 [out,switch_is(level
)] spoolss_MonitorInfo info
[count
]
1006 [nopull
,nopush
] WERROR spoolss_EnumMonitors
(
1007 [in] [string,charset
(UTF16
)] uint16
*servername
,
1009 [in] DATA_BLOB
*buffer
,
1010 [in] uint32 offered
,
1011 [out,switch_is(level
),size_is(count
)] spoolss_MonitorInfo
*info
,
1012 [out] uint32 needed
,
1016 /******************/
1017 /* Function: 0x25 */
1018 WERROR spoolss_AddPort
(
1019 [in] [string,charset
(UTF16
)] uint16
*server_name
,
1020 [in] uint32 unknown
,
1021 [in] [string,charset
(UTF16
)] uint16 monitor_name
[]
1024 /******************/
1025 /* Function: 0x26 */
1026 WERROR spoolss_ConfigurePort
(
1029 /******************/
1030 /* Function: 0x27 */
1031 WERROR spoolss_DeletePort
(
1034 /******************/
1035 /* Function: 0x28 */
1036 WERROR spoolss_CreatePrinterIC
(
1039 /******************/
1040 /* Function: 0x29 */
1041 WERROR spoolss_PlayGDIScriptOnPrinterIC
(
1044 /******************/
1045 /* Function: 0x2a */
1046 WERROR spoolss_DeletePrinterIC
(
1049 /******************/
1050 /* Function: 0x2b */
1051 WERROR spoolss_AddPrinterConnection
(
1054 /******************/
1055 /* Function: 0x2c */
1056 WERROR spoolss_DeletePrinterConnection
(
1059 /******************/
1060 /* Function: 0x2d */
1061 WERROR spoolss_PrinterMessageBox
(
1062 /* Marked as obsolete in MSDN. "Not necessary and has
1066 /******************/
1067 /* Function: 0x2e */
1068 WERROR spoolss_AddMonitor
(
1071 /******************/
1072 /* Function: 0x2f */
1073 WERROR spoolss_DeleteMonitor
(
1076 /******************/
1077 /* Function: 0x30 */
1078 WERROR spoolss_DeletePrintProcessor
(
1081 /******************/
1082 /* Function: 0x31 */
1083 WERROR spoolss_AddPrintProvidor
(
1086 /******************/
1087 /* Function: 0x32 */
1088 WERROR spoolss_DeletePrintProvidor
(
1091 /******************/
1092 /* Function: 0x33 */
1093 WERROR spoolss_EnumPrintProcDataTypes
(
1096 /******************/
1097 /* Function: 0x34 */
1098 WERROR spoolss_ResetPrinter
(
1101 /******************/
1102 /* Function: 0x35 */
1103 WERROR spoolss_GetPrinterDriver2
(
1104 [in,ref] policy_handle
*handle,
1105 [in] [string,charset
(UTF16
)] uint16
*architecture
,
1107 [in] DATA_BLOB
*buffer
,
1108 [in] uint32 offered
,
1109 [in] uint32 client_major_version
,
1110 [in] uint32 client_minor_version
,
1111 [out] DATA_BLOB
*info
,
1112 [out] uint32 needed
,
1113 [out] uint32 server_major_version
,
1114 [out] uint32 server_minor_version
1117 /******************/
1118 /* Function: 0x36 */
1119 WERROR spoolss_FindFirstPrinterChangeNotification
(
1122 /******************/
1123 /* Function: 0x37 */
1124 WERROR spoolss_FindNextPrinterChangeNotification
(
1127 /******************/
1128 /* Function: 0x38 */
1129 [public] WERROR spoolss_FindClosePrinterNotify
(
1130 [in,ref] policy_handle
*handle
1133 /******************/
1134 /* Function: 0x39 */
1135 WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld
(
1138 /******************/
1139 /* Function: 0x3a */
1140 [public] WERROR spoolss_ReplyOpenPrinter
(
1141 [in,string,charset
(UTF16
)] uint16 server_name
[],
1142 [in] uint32 printer_local
,
1143 [in] winreg_Type type
,
1144 [in] uint32 unknown1
,
1145 [in] uint32 unknown2
,
1146 [out,ref] policy_handle
*handle
1149 /******************/
1150 /* Function: 0x3b */
1151 WERROR spoolss_RouterReplyPrinter
(
1154 /******************/
1155 /* Function: 0x3c */
1156 [public] WERROR spoolss_ReplyClosePrinter
(
1157 [in,out,ref] policy_handle
*handle
1160 /******************/
1161 /* Function: 0x3d */
1162 WERROR spoolss_AddPortEx
(
1165 /******************/
1166 /* Function: 0x3e */
1167 WERROR spoolss_RouterFindFirstPrinterChangeNotification
(
1170 /******************/
1171 /* Function: 0x3f */
1172 WERROR spoolss_SpoolerInit
(
1175 /******************/
1176 /* Function: 0x40 */
1177 WERROR spoolss_ResetPrinterEx
(
1180 typedef [enum16bit
] enum {
1181 SPOOLSS_FIELD_SERVER_NAME
= 0,
1182 SPOOLSS_FIELD_PRINTER_NAME
= 1,
1183 SPOOLSS_FIELD_SHARE_NAME
= 2,
1184 SPOOLSS_FIELD_PORT_NAME
= 3,
1185 SPOOLSS_FIELD_DRIVER_NAME
= 4,
1186 SPOOLSS_FIELD_COMMENT
= 5,
1187 SPOOLSS_FIELD_LOCATION
= 6,
1188 SPOOLSS_FIELD_DEVMODE
= 7,
1189 SPOOLSS_FIELD_SEPFILE
= 8,
1190 SPOOLSS_FIELD_PRINT_PROCESSOR
= 9,
1191 SPOOLSS_FIELD_PARAMETERS
= 10,
1192 SPOOLSS_FIELD_DATATYPE
= 11,
1193 SPOOLSS_FIELD_SECURITY_DESCRIPTOR
=12,
1194 SPOOLSS_FIELD_ATTRIBUTES
= 13,
1195 SPOOLSS_FIELD_PRIORITY
= 14,
1196 SPOOLSS_FIELD_DEFAULT_PRIORITY
= 15,
1197 SPOOLSS_FIELD_START_TIME
= 16,
1198 SPOOLSS_FIELD_UNTIL_TIME
= 17,
1199 SPOOLSS_FIELD_STATUS
= 18,
1200 SPOOLSS_FIELD_STATUS_STRING
= 19,
1201 SPOOLSS_FIELD_CJOBS
= 20,
1202 SPOOLSS_FIELD_AVERAGE_PPM
= 21,
1203 SPOOLSS_FIELD_TOTAL_PAGES
= 22,
1204 SPOOLSS_FIELD_PAGES_PRINTED
= 23,
1205 SPOOLSS_FIELD_TOTAL_BYTES
= 24,
1206 SPOOLSS_FIELD_BYTES_PRINTED
= 25
1209 typedef [enum16bit
] enum {
1210 SPOOLSS_NOTIFY_PRINTER
= 0,
1211 SPOOLSS_NOTIFY_JOB
= 1
1212 } spoolss_NotifyType
;
1214 /******************/
1215 /* Function: 0x41 */
1217 spoolss_NotifyType type
;
1222 [size_is(count
)] spoolss_Field
*fields
;
1223 } spoolss_NotifyOptionsArray
;
1229 [size_is(count
)] spoolss_NotifyOptionsArray
*options
;
1230 } spoolss_NotifyOptionsContainer
;
1232 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx
(
1233 [in,ref] policy_handle
*handle,
1235 [in] uint32 options
,
1236 [in] [string,charset
(UTF16
)] uint16
*str
,
1237 [in] uint32 printer_local
,
1238 [in] spoolss_NotifyOptionsContainer
*t1
1241 /******************/
1242 /* Function: 0x42 */
1243 WERROR spoolss_RouterRefreshPrinterChangeNotification
(
1248 [size_is(size
/2),unique,charset
(UTF16
)] uint16
*string;
1249 } spoolss_NotifyUTF16String
;
1253 [size_is(size
),charset
(DOS
)] uint8
*string;
1254 } spoolss_NotifyDOSString
;
1258 } spoolss_NotifyBlobData
;
1262 [unique] spoolss_NotifyBlobData
*data
;
1263 } spoolss_NotifyBlob
;
1265 typedef [switch_type(uint32
)] union {
1266 [case(1)] dlong integer
;
1267 [case(2)] spoolss_NotifyUTF16String utf16_string
;
1268 [case(3)] spoolss_NotifyDOSString ascii_string
;
1269 [case(4)] spoolss_NotifyBlob blob
;
1270 [case(5)] spoolss_NotifyDOSString ascii_string
;
1271 } spoolss_NotifyData
;
1274 spoolss_NotifyType type
;
1275 spoolss_Field field
;
1276 uint32 variable_type
;
1278 [switch_is(variable_type
)] spoolss_NotifyData data
;
1285 [size_is(count
)] spoolss_Notify notifies
[];
1286 } spoolss_NotifyInfo
;
1288 /******************/
1289 /* Function: 0x43 */
1290 [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx
(
1291 [in,ref] policy_handle
*handle,
1292 [in] uint32 change_low
,
1293 [in,unique] spoolss_NotifyOptionsContainer
*container
,
1294 [out, unique] spoolss_NotifyInfo
*info
1297 /******************/
1298 /* Function: 0x44 */
1304 [string,charset
(UTF16
)] uint16
*client
;
1305 [string,charset
(UTF16
)] uint16
*user
;
1310 } spoolss_UserLevel1
;
1313 [case(1)] spoolss_UserLevel1
*level1
;
1314 } spoolss_UserLevel
;
1316 /******************/
1317 /* Function: 0x45 */
1318 [public] WERROR spoolss_OpenPrinterEx
(
1319 [in] [string,charset
(UTF16
)] uint16
*printername
,
1320 [in] [string,charset
(UTF16
)] uint16
*datatype
,
1321 [in] spoolss_DevmodeContainer devmode_ctr
,
1322 [in] uint32 access_mask
,
1324 [in,switch_is(level
)] spoolss_UserLevel userlevel
,
1325 [out,ref] policy_handle
*handle
1328 /******************/
1329 /* Function: 0x46 */
1330 WERROR spoolss_AddPrinterEx
(
1331 [in] [string,charset
(UTF16
)] uint16
*server
,
1333 [in,switch_is(level
)] spoolss_PrinterInfo
*info
,
1334 [in] spoolss_DevmodeContainer devmode_ctr
,
1335 [in] security_descriptor
*secdesc
,
1337 [in,switch_is(ulevel
)] spoolss_UserLevel userlevel
1340 /******************/
1341 /* Function: 0x47 */
1345 /******************/
1346 /* Function: 0x48 */
1347 WERROR spoolss_EnumPrinterData
(
1348 [in,ref] policy_handle
*handle,
1349 [in] uint32 enum_index
,
1350 [in] uint32 value_offered
,
1351 [out] lstring value_name
,
1352 [out] uint32 value_needed
,
1353 [out] uint32 printerdata_type
,
1354 [out] DATA_BLOB buffer
,
1355 [in,out,ref] uint32
*data_size
1358 /******************/
1359 /* Function: 0x49 */
1360 WERROR spoolss_DeletePrinterData
(
1361 [in,ref] policy_handle
*handle,
1362 [in] [string,charset
(UTF16
)] uint16 value_name
[]
1365 /******************/
1366 /* Function: 0x4a */
1370 /******************/
1371 /* Function: 0x4b */
1375 /******************/
1376 /* Function: 0x4c */
1380 /******************/
1381 /* Function: 0x4d */
1382 WERROR spoolss_SetPrinterDataEx
(
1383 [in,ref] policy_handle
*handle,
1384 [in] [string,charset
(UTF16
)] uint16 key_name
[],
1385 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1387 [in] DATA_BLOB buffer
,
1391 /******************/
1392 /* Function: 0x4e */
1393 WERROR spoolss_GetPrinterDataEx
(
1394 [in,ref] policy_handle
*handle,
1395 [in] [string,charset
(UTF16
)] uint16 key_name
[],
1396 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1397 [in] uint32 offered
,
1399 [out] DATA_BLOB buffer
,
1403 /******************/
1404 /* Function: 0x4f */
1405 [public] WERROR spoolss_EnumPrinterDataEx
(
1406 [in,ref] policy_handle
*handle,
1407 [in] [string,charset
(UTF16
)] uint16 key_name
[],
1408 [in] uint32 offered
,
1409 [out] DATA_BLOB buffer
,
1410 [out] uint32 needed
,
1414 /******************/
1415 /* Function: 0x50 */
1416 [public] WERROR spoolss_EnumPrinterKey
(
1417 [in, ref] policy_handle
*handle,
1418 [in] [string,charset
(UTF16
)] uint16 key_name
[],
1419 [out, ref] uint32
*key_buffer_size
,
1420 [out] uint8 key_buffer
[*key_buffer_size
],
1421 [in,out,ref] uint32
*needed
1424 /******************/
1425 /* Function: 0x51 */
1426 WERROR spoolss_DeletePrinterDataEx
(
1427 [in,ref] policy_handle
*handle,
1428 [in] [string,charset
(UTF16
)] uint16 key_name
[],
1429 [in] [string,charset
(UTF16
)] uint16 value_name
[]
1432 /******************/
1433 /* Function: 0x52 */
1434 WERROR spoolss_DeletePrinterKey
(
1437 /******************/
1438 /* Function: 0x53 */
1442 /******************/
1443 /* Function: 0x54 */
1444 WERROR spoolss_DeletePrinterDriverEx
(
1447 /******************/
1448 /* Function: 0x55 */
1452 /******************/
1453 /* Function: 0x56 */
1457 /******************/
1458 /* Function: 0x57 */
1462 /******************/
1463 /* Function: 0x58 */
1464 WERROR spoolss_XcvData
(
1465 [in,ref] policy_handle
*handle,
1466 [in] [string,charset
(UTF16
)] uint16 function_name
[],
1467 [in] DATA_BLOB in_data
,
1468 [in,value
(r
->in.in_data.length
)] uint32 _in_data_length
,
1469 [in] uint32 offered
,
1470 [in] uint32 unknown1
,
1471 [out] DATA_BLOB out_data
,
1472 [out] uint32 needed
,
1473 [out] uint32 unknown2
1476 /******************/
1477 /* Function: 0x59 */
1478 WERROR spoolss_AddPrinterDriverEx
(
1481 /******************/
1482 /* Function: 0x5a */
1486 /******************/
1487 /* Function: 0x5b */
1491 /******************/
1492 /* Function: 0x5c */
1496 /******************/
1497 /* Function: 0x5d */
1501 /******************/
1502 /* Function: 0x5e */
1506 /******************/
1507 /* Function: 0x5f */