4 spoolss interface definitions
6 import
"misc.idl", "security.idl", "winreg.idl";
9 cpp_quote
("#define spoolss_security_descriptor security_descriptor")
11 [ uuid("12345678-1234-abcd-ef00-0123456789ab"),
13 endpoint("ncacn_np:[\\pipe\\spoolss]"),
14 pointer_default(unique),
15 helpstring("Spooler SubSystem"),
16 helper
("../librpc/ndr/ndr_spoolss_buf.h")
19 typedef [v1_enum] enum winreg_Type winreg_Type
;
20 typedef [gensize
] struct {
32 [value
(ndr_size_spoolss_Time
(time
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 size
;
33 [unique] spoolss_Time
*time
;
37 PROCESSOR_ARCHITECTURE_INTEL
= 0x0000,
38 PROCESSOR_ARCHITECTURE_IA64
= 0x0006,
39 PROCESSOR_ARCHITECTURE_AMD64
= 0x0009
40 } spoolss_ProcessorArchitecture
;
42 typedef [v1_enum] enum {
43 PROCESSOR_INTEL_386
= 0x00000182,
44 PROCESSOR_INTEL_486
= 0x000001E6,
45 PROCESSOR_INTEL_PENTIUM
= 0x0000024A,
46 PROCESSOR_INTEL_IA64
= 0x00000898,
47 PROCESSOR_AMD_X8664
= 0x000022A0
48 } spoolss_ProcessorType
;
50 typedef [v1_enum] enum {
51 /* Windows 95, Windows 98, Windows Me, Windows NT4 */
52 SPOOLSS_MAJOR_VERSION_NT4_95_98_ME
= 0x00000004,
53 /* Windows 2000, Windows 2003, Windows XP */
54 SPOOLSS_MAJOR_VERSION_2000_2003_XP
= 0x00000005,
55 /* Windows Vista, Windows 2008 */
56 SPOOLSS_MAJOR_VERSION_2008_VISTA
= 0x00000006
57 } spoolss_MajorVersion
;
59 typedef [v1_enum] enum {
60 /* Windows 2008, Windows Vista, Windows 2000, Windows NT4, Windows 95 */
61 SPOOLSS_MINOR_VERSION_0
= 0x00000000,
63 SPOOLSS_MINOR_VERSION_XP
= 0x00000001,
64 /* Windows 2003, Windows XP x64 */
65 SPOOLSS_MINOR_VERSION_2003_XP64
= 0x00000002,
67 SPOOLSS_MINOR_VERSION_98
= 0x0000000a,
69 SPOOLSS_MINOR_VERSION_ME
= 0x0000005a
70 } spoolss_MinorVersion
;
72 const int PRINTER_STATUS_OK
= 0x00000000;
74 typedef [public] bitmap
{
75 PRINTER_STATUS_PAUSED
= 0x00000001,
76 PRINTER_STATUS_ERROR
= 0x00000002,
77 PRINTER_STATUS_PENDING_DELETION
= 0x00000004,
78 PRINTER_STATUS_PAPER_JAM
= 0x00000008,
79 PRINTER_STATUS_PAPER_OUT
= 0x00000010,
80 PRINTER_STATUS_MANUAL_FEED
= 0x00000020,
81 PRINTER_STATUS_PAPER_PROBLEM
= 0x00000040,
82 PRINTER_STATUS_OFFLINE
= 0x00000080,
83 PRINTER_STATUS_IO_ACTIVE
= 0x00000100,
84 PRINTER_STATUS_BUSY
= 0x00000200,
85 PRINTER_STATUS_PRINTING
= 0x00000400,
86 PRINTER_STATUS_OUTPUT_BIN_FULL
= 0x00000800,
87 PRINTER_STATUS_NOT_AVAILABLE
= 0x00001000,
88 PRINTER_STATUS_WAITING
= 0x00002000,
89 PRINTER_STATUS_PROCESSING
= 0x00004000,
90 PRINTER_STATUS_INITIALIZING
= 0x00008000,
91 PRINTER_STATUS_WARMING_UP
= 0x00010000,
92 PRINTER_STATUS_TONER_LOW
= 0x00020000,
93 PRINTER_STATUS_NO_TONER
= 0x00040000,
94 PRINTER_STATUS_PAGE_PUNT
= 0x00080000,
95 PRINTER_STATUS_USER_INTERVENTION
= 0x00100000,
96 PRINTER_STATUS_OUT_OF_MEMORY
= 0x00200000,
97 PRINTER_STATUS_DOOR_OPEN
= 0x00400000,
98 PRINTER_STATUS_SERVER_UNKNOWN
= 0x00800000,
99 PRINTER_STATUS_POWER_SAVE
= 0x01000000
100 } spoolss_PrinterStatus
;
102 /* JOB status codes. */
104 const int JOB_STATUS_QUEUED
= 0x0000;
106 typedef [bitmap32bit
] bitmap
{
107 JOB_STATUS_PAUSED
= 0x00000001,
108 JOB_STATUS_ERROR
= 0x00000002,
109 JOB_STATUS_DELETING
= 0x00000004,
110 JOB_STATUS_SPOOLING
= 0x00000008,
111 JOB_STATUS_PRINTING
= 0x00000010,
112 JOB_STATUS_OFFLINE
= 0x00000020,
113 JOB_STATUS_PAPEROUT
= 0x00000040,
114 JOB_STATUS_PRINTED
= 0x00000080,
115 JOB_STATUS_DELETED
= 0x00000100,
116 JOB_STATUS_BLOCKED_DEVQ
= 0x00000200,
117 JOB_STATUS_USER_INTERVENTION
= 0x00000400,
118 JOB_STATUS_RESTART
= 0x00000800,
119 JOB_STATUS_COMPLETE
= 0x00001000
122 typedef [public,gensize
] struct {
123 [relative
] nstring
*printername
;
124 [relative
] nstring
*servername
;
129 uint32 global_counter
;
135 uint32 session_counter
;
136 uint32 num_error_out_of_paper
;
137 uint32 num_error_not_ready
;
138 spoolss_JobStatus job_error
;
139 uint32 number_of_processors
;
140 spoolss_ProcessorType processor_type
;
141 uint32 high_part_total_bytes
;
144 spoolss_PrinterStatus status
;
145 uint32 enumerate_network_printers
;
147 spoolss_ProcessorArchitecture processor_architecture
;
148 uint16 processor_level
;
152 } spoolss_PrinterInfo0
;
154 /* Device Mode Extra Data */
156 typedef [v1_enum] enum {
157 SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
= 0x554e4944, /* 0x44494e55 */
158 SPOOLSS_DM_SIGNATURE_JTEXP
= 0x4a544d53, /* 0x534d544a */
159 SPOOLSS_DM_SIGNATURE_PSEXTRA
= 0x50524956 /* 0x56495250 */
160 } spoolss_DM_Signature
;
162 typedef [v1_enum] enum {
163 SPOOLSS_DM_LAYOUT_NUP_DISABLED
= 0x00000000,
164 SPOOLSS_DM_LAYOUT_NUP_2
= 0x00000001,
165 SPOOLSS_DM_LAYOUT_NUP_4
= 0x00000002,
166 SPOOLSS_DM_LAYOUT_NUP_6
= 0x00000003,
167 SPOOLSS_DM_LAYOUT_NUP_9
= 0x00000004,
168 SPOOLSS_DM_LAYOUT_NUP_16
= 0x00000005,
169 SPOOLSS_DM_LAYOUT_BOOKLET
= 0x00000006
172 typedef [v1_enum] enum {
173 SPOOLSS_DM_NUP_DIRECTION_L2R_T2B
= 0x00000001,
174 SPOOLSS_DM_NUP_DIRECTION_T2B_L2R
= 0x00000002,
175 SPOOLSS_DM_NUP_DIRECTION_R2L_T2B
= 0x00000004,
176 SPOOLSS_DM_NUP_DIRECTION_T2B_R2L
= 0x00000008
177 } spoolss_DM_NupDirection
;
179 typedef [v1_enum] enum {
180 SPOOLSS_DM_NUP_BORDER_PRINT
= 0x00000000,
181 SPOOLSS_DM_NUP_BORDER_NONE
= 0x00000001
182 } spoolss_DM_NupBorderFlags
;
184 typedef [v1_enum] enum {
185 SPOOLSS_DM_BOOKLET_LEFT_FLIP
= 0x00000000,
186 SPOOLSS_DM_BOOKLET_RIGHT_FLIP
= 0x00000001
187 } spoolss_DM_BookletFlags
;
189 /* Device Mode Extra Data: PostScript */
193 typedef [bitmap32bit
] bitmap
{
194 SPOOLSS_DM_PS_FLAGS_DRV_ERROR_HANDLER
= 0x00000002,
195 SPOOLSS_DM_PS_FLAGS_PRINT_MIRROR
= 0x00000004,
196 SPOOLSS_DM_PS_FLAGS_PRINT_NEGATIVE
= 0x00000010,
197 SPOOLSS_DM_PS_FLAGS_COMPRESS_BITMAP
= 0x00000040,
198 SPOOLSS_DM_PS_FLAGS_ROTATE_180
= 0x00000200,
199 SPOOLSS_DM_PS_FLAGS_GDI_METAFILE_SPOOL
= 0x00002000
200 } spoolss_DMPS_Flags
;
203 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
204 spoolss_DMPS_Flags dwFlags
;
205 uint32 wchEPSFile
[12];
206 [value
(24)] uint16 caSize
;
208 uint16 caIlluminantIndex
;
212 uint16 caReferenceBlack
;
213 uint16 caReferenceWhite
;
216 uint16 caColorfulness
;
217 uint16 caRedGreenTint
;
218 } spoolss_PSDRVEXTRA351
;
223 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
224 spoolss_DMPS_Flags dwFlags
;
225 uint32 wchEPSFile
[12];
226 [value
(24)] uint16 caSize
;
228 uint16 caIlluminantIndex
;
232 uint16 caReferenceBlack
;
233 uint16 caReferenceWhite
;
236 uint16 caColorfulness
;
237 uint16 caRedGreenTint
;
240 uint32 aubOptions
[8];
241 } spoolss_PSDRVEXTRA400
;
245 typedef [v1_enum] enum {
246 SPOOLSS_DM_PS_OPTIMIZE_SPEED
= 0x00000000,
247 SPOOLSS_DM_PS_OPTIMIZE_PORTABILITY
= 0x00000001,
248 SPOOLSS_DM_PS_OPTIMIZE_EPS
= 0x00000002,
249 SPOOLSS_DM_PS_OPTIMIZE_ARCHIVAL
= 0x00000003
250 } spoolss_DMPS_Dialect
;
252 typedef [v1_enum] enum {
253 SPOOLSS_DM_PS_TTDLFMT_DEFAULT
= 0x00000000,
254 SPOOLSS_DM_PS_TTDLFMT_TYPE_1
= 0x00000001,
255 SPOOLSS_DM_PS_TTDLFMT_TYPE_3
= 0x00000002,
256 SPOOLSS_DM_PS_TTDLFMT_TYPE_42
= 0x00000003
257 } spoolss_DMPS_TTDLFmt
;
259 typedef [v1_enum] enum {
260 SPOOLSS_DM_PS_PSLEVEL_1
= 0x00000001,
261 SPOOLSS_DM_PS_PSLEVEL_2
= 0x00000002,
262 SPOOLSS_DM_PS_PSLEVEL_3
= 0x00000003
263 } spoolss_DMPS_PSLevel
;
266 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST
= 0x0000,
267 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST
= 0x0001,
268 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST_UPSIDEDOWN
= 0x0002,
269 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST_UPSIDEDOWN
= 0x0003
270 } spoolss_DMPS_FeedDirection
;
273 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
274 spoolss_DMPS_Flags dwFlags
;
275 uint32 wchEPSFile
[12];
276 [value
(24)] uint16 caSize
;
278 uint16 caIlluminantIndex
;
282 uint16 caReferenceBlack
;
283 uint16 caReferenceWhite
;
286 uint16 caColorfulness
;
287 uint16 caRedGreenTint
;
292 spoolss_DMPS_Dialect iDialect
;
293 spoolss_DMPS_TTDLFmt iTTDLFmt
;
294 boolean32 bReversePrint
;
295 spoolss_DM_Layout iLayout
;
296 spoolss_DMPS_PSLevel iPSLevel
;
299 [value
(0x0010)] uint16 wVer
;
302 uint32 dwWidthOffset
;
303 uint32 dwHeightOffset
;
304 spoolss_DMPS_FeedDirection wFeedDirection
;
306 uint32 dwReserved3
[4];
309 uint32 aOptions
[128];
310 } spoolss_PSDRVEXTRA500
;
315 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
316 spoolss_DMPS_Flags dwFlags
;
317 uint32 wchEPSFile
[12];
318 [value
(24)] uint16 caSize
;
320 uint16 caIlluminantIndex
;
324 uint16 caReferenceBlack
;
325 uint16 caReferenceWhite
;
328 uint16 caColorfulness
;
329 uint16 caRedGreenTint
;
330 uint16 wCoreJTExpSize
;
331 [value
(ndr_size_spoolss_PSDRVEXTRA
(r
, ndr
->iconv_convenience
, ndr
->flags
) + wCoreJTExpSize
)] uint16 wCoreFullSize
;
334 spoolss_DMPS_Dialect iDialect
;
335 spoolss_DMPS_TTDLFmt iTTDLFmt
;
336 boolean32 bReversePrint
;
337 spoolss_DM_Layout iLayout
;
338 spoolss_DMPS_PSLevel iPSLevel
;
341 [value
(0x0010)] uint16 wVer
;
344 uint32 dwWidthOffset
;
345 uint32 dwHeightOffset
;
346 spoolss_DMPS_FeedDirection wFeedDirection
;
348 uint32 dwReserved3
[4];
351 uint32 aOptions
[128];
352 spoolss_DM_NupDirection dwNupDirection
;
353 spoolss_DM_NupBorderFlags dwNupBorderFlags
;
354 spoolss_DM_BookletFlags dwBookletFlags
;
356 } spoolss_PSDRVEXTRA
;
358 /* Device Mode Extra Data: UniDriver */
363 uint16 wReserved
[56];
364 } spoolss_UNIDRVEXTRA3_4
;
368 typedef [v1_enum] enum {
369 SPOOLSS_DM_UNI_QUALITY_BEST
= 0x00000000,
370 SPOOLSS_DM_UNI_QUALITY_MEDIUM
= 0x00000001,
371 SPOOLSS_DM_UNI_QUALITY_DRAFT
= 0x00000002
372 } spoolss_DMUNI_Quality
;
374 typedef [bitmap32bit
] bitmap
{
375 SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS
= 0x00000002,
376 SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL
= 0x00000010,
377 SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING
= 0x00000080
378 } spoolss_DMUNI_Flags
;
381 [value
(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
)] spoolss_DM_Signature dwSignature
;
382 [value
(0x0022)] uint16 wVer
;
387 spoolss_DMUNI_Flags dwFlags
;
388 boolean32 bReversePrint
;
389 spoolss_DM_Layout iLayout
;
390 spoolss_DMUNI_Quality iQuality
;
393 uint32 aOptions
[128];
394 } spoolss_UNIDRVEXTRA500
;
398 typedef [public,gensize
] struct {
399 [value
(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
)] spoolss_DM_Signature dwSignature
;
400 [value
(0x0022)] uint16 wVer
;
401 uint16 wCoreJTExpSize
;
402 [value
(ndr_size_spoolss_UNIDRVEXTRA
(r
, ndr
->iconv_convenience
, ndr
->flags
) + wCoreJTExpSize
)] uint16 wCoreFullSize
;
405 spoolss_DMUNI_Flags dwFlags
;
406 boolean32 bReversePrint
;
407 spoolss_DM_Layout iLayout
;
408 spoolss_DMUNI_Quality iQuality
;
411 uint32 aOptions
[128];
412 spoolss_DM_NupDirection dwNupDirection
;
413 spoolss_DM_NupBorderFlags dwNupBorderFlags
;
414 spoolss_DM_BookletFlags dwBookletFlags
;
415 } spoolss_UNIDRVEXTRA
;
417 /* Device Mode Extra Data: JTEXP */
421 [value
(SPOOLSS_DM_SIGNATURE_JTEXP
)] spoolss_DM_Signature dwSignature
;
422 [value
(0)] uint32 dwVersion
;
423 [value
(16)] uint32 wJTHdrSize
;
425 [string,charset
(UTF16
)] uint16
*ModelName
;
426 nstring_array FeatureOptionPairs
;
429 /* Device Mode Extra Data: OEM_DMEXTRA */
433 spoolss_DM_Signature dwSignature
;
435 [flag
(NDR_REMAINING
)] DATA_BLOB Data
;
436 } spoolss_OEM_DMEXTRA
;
438 typedef [nodiscriminant
] union {
439 [case(0x0350)] spoolss_PSDRVEXTRA351 psdrvextra351
;
440 [case(0x0400)] spoolss_PSDRVEXTRA400 psdrvextra400
;
441 [case(0x0501)] spoolss_PSDRVEXTRA500 psdrvextra500
;
442 [case(0x0600)] spoolss_PSDRVEXTRA psdrvextra
;
443 [default] [flag
(NDR_REMAINING
)] DATA_BLOB psblob
;
444 } spoolss_DeviceModeExtraDataPostScript
;
446 typedef [nodiscriminant
] union {
447 [case(0x0301)] spoolss_UNIDRVEXTRA3_4 unidrvextra3_4
;
448 [case(0x0500)] spoolss_UNIDRVEXTRA500 unidrvextra500
;
449 [case(0x0600)] spoolss_UNIDRVEXTRA unidrvextra
;
450 [default] [flag
(NDR_REMAINING
)] DATA_BLOB uniblob
;
451 } spoolss_DeviceModeExtraDataUniDriver
;
453 typedef [bitmap32bit
] bitmap
{
454 DEVMODE_ORIENTATION
= 0x00000001,
455 DEVMODE_PAPERSIZE
= 0x00000002,
456 DEVMODE_PAPERLENGTH
= 0x00000004,
457 DEVMODE_PAPERWIDTH
= 0x00000008,
458 DEVMODE_SCALE
= 0x00000010,
459 DEVMODE_POSITION
= 0x00000020,
460 DEVMODE_NUP
= 0x00000040,
461 DEVMODE_COPIES
= 0x00000100,
462 DEVMODE_DEFAULTSOURCE
= 0x00000200,
463 DEVMODE_PRINTQUALITY
= 0x00000400,
464 DEVMODE_COLOR
= 0x00000800,
465 DEVMODE_DUPLEX
= 0x00001000,
466 DEVMODE_YRESOLUTION
= 0x00002000,
467 DEVMODE_TTOPTION
= 0x00004000,
468 DEVMODE_COLLATE
= 0x00008000,
469 DEVMODE_FORMNAME
= 0x00010000,
470 DEVMODE_LOGPIXELS
= 0x00020000,
471 DEVMODE_BITSPERPEL
= 0x00040000,
472 DEVMODE_PELSWIDTH
= 0x00080000,
473 DEVMODE_PELSHEIGHT
= 0x00100000,
474 DEVMODE_DISPLAYFLAGS
= 0x00200000,
475 DEVMODE_DISPLAYFREQUENCY
= 0x00400000,
476 DEVMODE_ICMMETHOD
= 0x00800000,
477 DEVMODE_ICMINTENT
= 0x01000000,
478 DEVMODE_MEDIATYPE
= 0x02000000,
479 DEVMODE_DITHERTYPE
= 0x04000000,
480 DEVMODE_PANNINGWIDTH
= 0x08000000,
481 DEVMODE_PANNINGHEIGHT
= 0x10000000
482 } spoolss_DeviceModeFields
;
484 typedef [enum16bit
] enum {
486 DMSPEC_WIN95_98_ME
= 0x400,
487 DMSPEC_NT4_AND_ABOVE
= 0x401
488 } spoolss_DeviceModeSpecVersion
;
490 typedef [enum16bit
] enum {
491 DMORIENT_PORTRAIT
= 0x0001,
492 DMORIENT_LANDSCAPE
= 0x0002
493 } spoolss_DeviceModeOrientation
;
495 typedef [enum16bit
] enum {
496 DMPAPER_LETTER
= 0x0001, /* Letter, 8 1/2 x 11 inches */
497 DMPAPER_LETTERSMALL
= 0x0002, /* Letter Small, 8 1/2 x 11 inches */
498 DMPAPER_TABLOID
= 0x0003, /* Tabloid, 11 x 17 inches */
499 DMPAPER_LEDGER
= 0x0004, /* Ledger, 17 x 11 inches */
500 DMPAPER_LEGAL
= 0x0005, /* Legal, 8 1/2 x 14 inches */
501 DMPAPER_STATEMENT
= 0x0006, /* Statement, 5 1/2 x 8 1/2 inches */
502 DMPAPER_EXECUTIVE
= 0x0007, /* Executive, 7 1/4 x 10 1/2 inches */
503 DMPAPER_A3
= 0x0008, /* A3 sheet, 297 x 420 millimeters */
504 DMPAPER_A4
= 0x0009, /* A4 sheet, 210 x 297 millimeters */
505 DMPAPER_A4SMALL
= 0x000A, /* A4 small sheet, 210 x 297 millimeters */
506 DMPAPER_A5
= 0x000B, /* A5 sheet, 148 x 210 millimeters */
507 DMPAPER_B4
= 0x000C, /* B4 sheet, 250 x 354 millimeters */
508 DMPAPER_B5
= 0x000D, /* B5 sheet, 182 x 257-millimeter paper */
509 DMPAPER_FOLIO
= 0x000E, /* Folio, 8 1/2 x 13-inch paper */
510 DMPAPER_QUARTO
= 0x000F, /* Quarto, 215 x 275 millimeter paper */
511 DMPAPER_10X14
= 0x0010, /* 10 x 14-inch sheet */
512 DMPAPER_11X17
= 0x0011, /* 11 x 17-inch sheet */
513 DMPAPER_NOTE
= 0x0012, /* Note, 8 1/2 x 11-inches */
514 DMPAPER_ENV_9
= 0x0013, /* #9 Envelope, 3 7/8 x 8 7/8 inches */
515 DMPAPER_ENV_10
= 0x0014, /* #10 Envelope, 4 1/8 x 9 1/2 inches */
516 DMPAPER_ENV_11
= 0x0015, /* #11 Envelope, 4 1/2 x 10 3/8 inches */
517 DMPAPER_ENV_12
= 0x0016, /* #12 Envelope, 4 3/4 x 11 inches */
518 DMPAPER_ENV_14
= 0x0017, /* #14 Envelope, 5 x 11 1/2 inches */
519 DMPAPER_CSHEET
= 0x0018, /* C Sheet, 17 x 22 inches */
520 DMPAPER_DSHEET
= 0x0019, /* D Sheet, 22 x 34 inches */
521 DMPAPER_ESHEET
= 0x001A, /* E Sheet, 34 x 44 inches */
522 DMPAPER_ENV_DL
= 0x001B, /* DL Envelope, 110 x 220 millimeters */
523 DMPAPER_ENV_C5
= 0x001C, /* C5 Envelope, 162 x 229 millimeters */
524 DMPAPER_ENV_C3
= 0x001D, /* C3 Envelope, 324 x 458 millimeters */
525 DMPAPER_ENV_C4
= 0x001E, /* C4 Envelope, 229 x 324 millimeters */
526 DMPAPER_ENV_C6
= 0x001F, /* C6 Envelope, 114 x 162 millimeters */
527 DMPAPER_ENV_C65
= 0x0020, /* C65 Envelope, 114 x 229 millimeters */
528 DMPAPER_ENV_B4
= 0x0021, /* B4 Envelope, 250 x 353 millimeters */
529 DMPAPER_ENV_B5
= 0x0022, /* B5 Envelope, 176 x 250 millimeters */
530 DMPAPER_ENV_B6
= 0x0023, /* B6 Envelope, 176 x 125 millimeters */
531 DMPAPER_ENV_ITALY
= 0x0024, /* Italy Envelope, 110 x 230 millimeters */
532 DMPAPER_ENV_MONARCH
= 0x0025, /* Monarch Envelope, 3 7/8 x 7 1/2 inches */
533 DMPAPER_ENV_PERSONAL
= 0x0026, /* 6 3/4 Envelope, 3 5/8 x 6 1/2 inches */
534 DMPAPER_FANFOLD_US
= 0x0027, /* US Std Fanfold, 14 7/8 x 11 inches */
535 DMPAPER_FANFOLD_STD_GERMAN
= 0x0028, /* German Std Fanfold, 8 1/2 x 12 inches */
536 DMPAPER_FANFOLD_LGL_GERMAN
= 0x0029, /* German Legal Fanfold, 8 x 13 inches */
537 DMPAPER_DBL_JAPANESE_POSTCARD
= 0x0045, /* Double Japanese Postcard, 200 x 148 millimeters */
538 DMPAPER_A6
= 0x0046, /* A6 sheet, 105 x 148 millimeters */
539 DMPAPER_JENV_KAKU2
= 0x0047, /* Japanese Envelope Kaku #2 */
540 DMPAPER_JENV_KAKU3
= 0x0048, /* Japanese Envelope Kaku #3 */
541 DMPAPER_JENV_CHOU3
= 0x0049, /* Japanese Envelope Chou #3 */
542 DMPAPER_JENV_CHOU4
= 0x004A, /* Japanese Envelope Chou #4 */
543 DMPAPER_LETTER_ROTATED
= 0x004B, /* Letter Rotated, 11 by 8 1/2 inches */
544 DMPAPER_A3_ROTATED
= 0x004C, /* A3 rotated sheet, 420 x 297 millimeters */
545 DMPAPER_A4_ROTATED
= 0x004D, /* A4 rotated sheet, 297 x 210 millimeters */
546 DMPAPER_A5_ROTATED
= 0x004E, /* A5 rotated sheet, 210 x 148 millimeters */
547 DMPAPER_B4_JIS_ROTATED
= 0x004F, /* B4 (JIS) rotated sheet, 364 x 257 millimeters */
548 DMPAPER_B5_JIS_ROTATED
= 0x0050, /* B5 (JIS) rotated sheet, 257 x 182 millimeters */
549 DMPAPER_JAPANESE_POSTCARD_ROTATED
= 0x0051, /* Japanese Postcard Rotated, 148 x 100 millimeters */
550 DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED
= 0x0052, /* Double Japanese Postcard Rotated, 148 x 200 millimeters */
551 DMPAPER_A6_ROTATED
= 0x0053, /* A6 rotated sheet, 148 x 105 millimeters */
552 DMPAPER_JENV_KAKU2_ROTATED
= 0x0054, /* Japanese Envelope Kaku #2 Rotated */
553 DMPAPER_JENV_KAKU3_ROTATED
= 0x0055, /* Japanese Envelope Kaku #3 Rotated */
554 DMPAPER_JENV_CHOU3_ROTATED
= 0x0056, /* Japanese Envelope Chou #3 Rotated */
555 DMPAPER_JENV_CHOU4_ROTATED
= 0x0057, /* Japanese Envelope Chou #4 Rotated */
556 DMPAPER_B6_JIS
= 0x0058, /* B6 (JIS) sheet, 128 x 182 millimeters */
557 DMPAPER_B6_JIS_ROTATED
= 0x0059, /* B6 (JIS) rotated sheet, 182 x 128 millimeters */
558 DMPAPER_12X11
= 0x005A, /* 12 x 11-inch sheet */
559 DMPAPER_JENV_YOU4
= 0x005B, /* Japanese Envelope You #4 */
560 DMPAPER_JENV_YOU4_ROTATED
= 0x005C, /* Japanese Envelope You #4 */
561 DMPAPER_P16K
= 0x005D, /* PRC 16K, 146 x 215 millimeters */
562 DMPAPER_P32K
= 0x005E, /* PRC 32K, 97 x 151 millimeters */
563 DMPAPER_P32KBIG
= 0x005F, /* PRC 32K(Big) 97 x 151 millimeters */
564 DMPAPER_PENV_1
= 0x0060, /* PRC Envelope #1, 102 by 165 millimeters */
565 DMPAPER_PENV_2
= 0x0061, /* PRC Envelope #2, 102 x 176 millimeters */
566 DMPAPER_PENV_3
= 0x0062, /* PRC Envelope #3, 125 x 176 millimeters */
567 DMPAPER_PENV_4
= 0x0063, /* PRC Envelope #4, 110 x 208 millimeters */
568 DMPAPER_PENV_5
= 0x0064, /* PRC Envelope #5, 110 x 220 millimeters */
569 DMPAPER_PENV_6
= 0x0065, /* PRC Envelope #6, 120 x 230 millimeters */
570 DMPAPER_PENV_7
= 0x0066, /* PRC Envelope #7, 160 x 230 millimeters */
571 DMPAPER_PENV_8
= 0x0067, /* PRC Envelope #8, 120 x 309 millimeters */
572 DMPAPER_PENV_9
= 0x0068, /* PRC Envelope #9, 229 x 324 millimeters */
573 DMPAPER_PENV_10
= 0x0069, /* PRC Envelope #10, 324 x 458 millimeters */
574 DMPAPER_P16K_ROTATED
= 0x006A, /* PRC 16K Rotated, 215 x 146 millimeters */
575 DMPAPER_P32K_ROTATED
= 0x006B, /* PRC 32K Rotated, 151 x 97 millimeters */
576 DMPAPER_P32KBIG_ROTATED
= 0x006C, /* PRC 32K(Big) Rotated, 151 x 97 millimeters */
577 DMPAPER_PENV_1_ROTATED
= 0x006D, /* PRC Envelope #1 Rotated, 165 x 102 millimeters */
578 DMPAPER_PENV_2_ROTATED
= 0x006E, /* PRC Envelope #2 Rotated, 176 x 102 millimeters */
579 DMPAPER_PENV_3_ROTATED
= 0x006F, /* PRC Envelope #3 Rotated, 176 x 125 millimeters */
580 DMPAPER_PENV_4_ROTATED
= 0x0070, /* PRC Envelope #4 Rotated, 208 x 110 millimeters */
581 DMPAPER_PENV_5_ROTATED
= 0x0071, /* PRC Envelope #5 Rotated, 220 x 110 millimeters */
582 DMPAPER_PENV_6_ROTATED
= 0x0072, /* PRC Envelope #6 Rotated, 230 x 120 millimeters */
583 DMPAPER_PENV_7_ROTATED
= 0x0073, /* PRC Envelope #7 Rotated, 230 x 160 millimeters */
584 DMPAPER_PENV_8_ROTATED
= 0x0074, /* PRC Envelope #8 Rotated, 309 x 120 millimeters */
585 DMPAPER_PENV_9_ROTATED
= 0x0075, /* PRC Envelope #9 Rotated, 324 x 229 millimeters */
586 DMPAPER_PENV_10_ROTATED
= 0x0076 /* PRC Envelope #10 Rotated, 458 x 324 millimeters */
587 } spoolss_DeviceModePaperSize
;
589 typedef [enum16bit
] enum {
590 DMBIN_UPPER
= 0x0001,
591 DMBIN_LOWER
= 0x0002,
592 DMBIN_MIDDLE
= 0x0003,
593 DMBIN_MANUAL
= 0x0004,
594 DMBIN_ENVELOPE
= 0x0005,
595 DMBIN_ENVMANUAL
= 0x0006,
597 DMBIN_TRACTOR
= 0x0008,
598 DMBIN_SMALLFMT
= 0x0009,
599 DMBIN_LARGEFMT
= 0x000a,
600 DMBIN_LARGECAPACITY
= 0x000b,
601 DMBIN_CASSETTE
= 0x000e,
602 DMBIN_FORMSOURCE
= 0x000f
603 } spoolss_DeviceModeDefaultSource
;
605 typedef [enum16bit
] enum {
607 DMRES_MEDIUM
= 0xfffd,
610 } spoolss_DeviceModePrintQuality
;
612 typedef [enum16bit
] enum {
613 DMRES_MONOCHROME
= 0x0001,
615 } spoolss_DeviceModeColor
;
617 typedef [enum16bit
] enum {
618 DMDUP_SIMPLEX
= 0x0001,
619 DMDUP_VERTICAL
= 0x0002,
620 DMDUP_HORIZONTAL
= 0x0003
621 } spoolss_DeviceModeDuplex
;
623 typedef [enum16bit
] enum {
624 DMTT_BITMAP
= 0x0001,
625 DMTT_DOWNLOAD
= 0x0002,
626 DMTT_SUBDEV
= 0x0003,
627 DMTT_DOWNLOAD_OUTLINE
= 0x0004
628 } spoolss_DeviceModeTTOption
;
630 typedef [enum16bit
] enum {
631 DMCOLLATE_FALSE
= 0x0000,
632 DMCOLLATE_TRUE
= 0x0001
633 } spoolss_DeviceModeCollate
;
635 typedef [v1_enum] enum {
636 DMNUP_SYSTEM
= 0x00000001,
637 DMNUP_ONEUP
= 0x00000002
638 } spoolss_DeviceModeNUp
;
640 typedef [v1_enum] enum {
641 DMICMMETHOD_NONE
= 0x00000001,
642 DMICMMETHOD_SYSTEM
= 0x00000002,
643 DMICMMETHOD_DRIVER
= 0x00000003,
644 DMICMMETHOD_DEVICE
= 0x00000004
645 } spoolss_DeviceModeICMMethod
;
647 typedef [v1_enum] enum {
648 DMICM_SATURATE
= 0x00000001,
649 DMICM_CONTRAST
= 0x00000002,
650 DMICM_COLORIMETRIC
= 0x00000003,
651 DMICM_ABS_COLORIMETRIC
= 0x00000004
652 } spoolss_DeviceModeICMIntent
;
654 typedef [v1_enum] enum {
655 DMMEDIA_STANDARD
= 0x00000001,
656 DMMEDIA_TRANSPARENCY
= 0x00000002,
657 DMMEDIA_GLOSSY
= 0x00000003
658 } spoolss_DeviceModeMediaType
;
660 typedef [v1_enum] enum {
661 DMDITHER_NONE
= 0x00000001,
662 DMDITHER_COARSE
= 0x00000002,
663 DMDITHER_FINE
= 0x00000003,
664 DMDITHER_LINEART
= 0x00000004,
665 DMDITHER_ERRORDIFFUSION
= 0x00000005,
666 DMDITHER_RESERVED6
= 0x00000006,
667 DMDITHER_RESERVED7
= 0x00000007,
668 DMDITHER_RESERVED8
= 0x00000008,
669 DMDITHER_RESERVED9
= 0x00000009,
670 DMDITHER_GRAYSCALE
= 0x0000000A
671 } spoolss_DeviceModeDitherType
;
673 const int MAXDEVICENAME
= 32;
675 typedef [public,gensize
] struct {
676 [charset
(UTF16
)] uint16 devicename
[MAXDEVICENAME
];
677 spoolss_DeviceModeSpecVersion specversion
;
678 uint16 driverversion
;
680 [value
(r
->driverextra_data.length
)] uint16 __driverextra_length
;
681 spoolss_DeviceModeFields fields
;
682 spoolss_DeviceModeOrientation orientation
;
683 spoolss_DeviceModePaperSize papersize
;
688 spoolss_DeviceModeDefaultSource defaultsource
;
689 spoolss_DeviceModePrintQuality printquality
;
690 spoolss_DeviceModeColor color
;
691 spoolss_DeviceModeDuplex duplex
;
693 spoolss_DeviceModeTTOption ttoption
;
694 spoolss_DeviceModeCollate collate
;
695 [charset
(UTF16
)] uint16 formname
[MAXDEVICENAME
];
696 uint16 logpixels
; /* reserved */
697 uint32 bitsperpel
; /* reserved */
698 uint32 pelswidth
; /* reserved */
699 uint32 pelsheight
; /* reserved */
700 spoolss_DeviceModeNUp displayflags
;
701 uint32 displayfrequency
; /* reserved */
702 spoolss_DeviceModeICMMethod icmmethod
;
703 spoolss_DeviceModeICMIntent icmintent
;
704 spoolss_DeviceModeMediaType mediatype
;
705 spoolss_DeviceModeDitherType dithertype
;
708 uint32 panningwidth
; /* reserved */
709 uint32 panningheight
; /* reserved */
710 [subcontext_size
(__driverextra_length
),subcontext
(0),flag
(NDR_REMAINING
)] DATA_BLOB driverextra_data
;
711 } spoolss_DeviceMode
;
713 typedef [public] bitmap
{
714 PRINTER_ENUM_DEFAULT
= 0x00000001,
715 PRINTER_ENUM_LOCAL
= 0x00000002,
716 PRINTER_ENUM_CONNECTIONS
= 0x00000004,
717 PRINTER_ENUM_FAVORITE
= 0x00000004,
718 PRINTER_ENUM_NAME
= 0x00000008,
719 PRINTER_ENUM_REMOTE
= 0x00000010,
720 PRINTER_ENUM_SHARED
= 0x00000020,
721 PRINTER_ENUM_NETWORK
= 0x00000040,
722 PRINTER_ENUM_EXPAND
= 0x00004000,
723 PRINTER_ENUM_CONTAINER
= 0x00008000,
724 PRINTER_ENUM_ICON1
= 0x00010000,
725 PRINTER_ENUM_ICON2
= 0x00020000,
726 PRINTER_ENUM_ICON3
= 0x00040000,
727 PRINTER_ENUM_ICON4
= 0x00080000,
728 PRINTER_ENUM_ICON5
= 0x00100000,
729 PRINTER_ENUM_ICON6
= 0x00200000,
730 PRINTER_ENUM_ICON7
= 0x00400000,
731 PRINTER_ENUM_ICON8
= 0x00800000,
732 PRINTER_ENUM_HIDE
= 0x01000000
733 } spoolss_EnumPrinterFlags
;
735 const int PRINTER_ENUM_ICONMASK
= (PRINTER_ENUM_ICON1 |
742 PRINTER_ENUM_ICON8
); /* 0x00ff0000 */
744 typedef [public] bitmap
{
745 PRINTER_ATTRIBUTE_QUEUED
= 0x00000001,
746 PRINTER_ATTRIBUTE_DIRECT
= 0x00000002,
747 PRINTER_ATTRIBUTE_DEFAULT
= 0x00000004,
748 PRINTER_ATTRIBUTE_SHARED
= 0x00000008,
749 PRINTER_ATTRIBUTE_NETWORK
= 0x00000010,
750 PRINTER_ATTRIBUTE_HIDDEN
= 0x00000020,
751 PRINTER_ATTRIBUTE_LOCAL
= 0x00000040,
752 PRINTER_ATTRIBUTE_ENABLE_DEVQ
= 0x00000080,
753 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
= 0x00000100,
754 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
= 0x00000200,
755 PRINTER_ATTRIBUTE_WORK_OFFLINE
= 0x00000400,
756 PRINTER_ATTRIBUTE_ENABLE_BIDI
= 0x00000800,
757 PRINTER_ATTRIBUTE_RAW_ONLY
= 0x00001000,
758 PRINTER_ATTRIBUTE_PUBLISHED
= 0x00002000,
759 PRINTER_ATTRIBUTE_FAX
= 0x00004000,
760 PRINTER_ATTRIBUTE_TS
= 0x00008000
761 } spoolss_PrinterAttributes
;
763 typedef [public,gensize
] struct {
764 spoolss_PrinterAttributes flags
;
765 [relative
] nstring
*description
;
766 [relative
] nstring
*name
;
767 [relative
] nstring
*comment
;
768 } spoolss_PrinterInfo1
;
770 typedef [public,gensize
,nopush
] struct {
771 [relative
] nstring
*servername
;
772 [relative
] nstring
*printername
;
773 [relative
] nstring
*sharename
;
774 [relative
] nstring
*portname
;
775 [relative
] nstring
*drivername
;
776 [relative
] nstring
*comment
;
777 [relative
] nstring
*location
;
778 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
779 [relative
] nstring
*sepfile
;
780 [relative
] nstring
*printprocessor
;
781 [relative
] nstring
*datatype
;
782 [relative
] nstring
*parameters
;
783 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
784 spoolss_PrinterAttributes attributes
;
785 [range(0,99)] uint32 priority
;
786 uint32 defaultpriority
;
789 spoolss_PrinterStatus status
;
792 } spoolss_PrinterInfo2
;
794 typedef [public,gensize
] struct {
795 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
796 } spoolss_PrinterInfo3
;
798 typedef [public,gensize
] struct {
799 [relative
] nstring
*printername
;
800 [relative
] nstring
*servername
;
801 spoolss_PrinterAttributes attributes
;
802 } spoolss_PrinterInfo4
;
804 typedef [public,gensize
] struct {
805 [relative
] nstring
*printername
;
806 [relative
] nstring
*portname
;
807 spoolss_PrinterAttributes attributes
;
808 uint32 device_not_selected_timeout
;
809 uint32 transmission_retry_timeout
;
810 } spoolss_PrinterInfo5
;
812 typedef [public,gensize
] struct {
813 spoolss_PrinterStatus status
;
814 } spoolss_PrinterInfo6
;
817 DSPRINT_PUBLISH
= 0x00000001,
818 DSPRINT_UPDATE
= 0x00000002,
819 DSPRINT_UNPUBLISH
= 0x00000004,
820 DSPRINT_REPUBLISH
= 0x00000008,
821 DSPRINT_PENDING
= 0x80000000
822 } spoolss_DsPrintAction
;
824 typedef [public,gensize
] struct {
825 [relative
] nstring
*guid
; /* text form of printer guid */
826 spoolss_DsPrintAction action
;
827 } spoolss_PrinterInfo7
;
830 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
831 } spoolss_DeviceModeInfo
;
833 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
834 [case(0)] spoolss_PrinterInfo0 info0
;
835 [case(1)] spoolss_PrinterInfo1 info1
;
836 [case(2)] spoolss_PrinterInfo2 info2
;
837 [case(3)] spoolss_PrinterInfo3 info3
;
838 [case(4)] spoolss_PrinterInfo4 info4
;
839 [case(5)] spoolss_PrinterInfo5 info5
;
840 [case(6)] spoolss_PrinterInfo6 info6
;
841 [case(7)] spoolss_PrinterInfo7 info7
;
842 [case(8)] spoolss_DeviceModeInfo info8
;
843 [case(9)] spoolss_DeviceModeInfo info9
;
845 } spoolss_PrinterInfo
;
849 /* we are using this as internal parsing code */
850 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinters
(
851 [in] spoolss_EnumPrinterFlags flags
,
852 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
854 [in,unique] DATA_BLOB
*buffer
,
856 [out,unique] DATA_BLOB
*info
,
857 [out,ref] uint32
*needed
,
858 [out,ref] uint32
*count
860 [public,noopnum
,noprint
] void __spoolss_EnumPrinters
(
863 [out,switch_is(level
)] spoolss_PrinterInfo info
[count
]
865 [nopull
,nopush
] WERROR spoolss_EnumPrinters
(
866 [in] spoolss_EnumPrinterFlags flags
,
867 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
869 [in,unique] DATA_BLOB
*buffer
,
871 /* what we have here is a subcontext containing an array of no discriminant unions
872 * and the array has no size in front
874 [out,ref] uint32
*count
,
875 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrinterInfo
**info
,
876 [out,ref] uint32
*needed
882 [value
(_ndr_size_spoolss_DeviceMode
(devmode
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 _ndr_size
;
883 [subcontext
(4),subcontext_size
(_ndr_size
)] spoolss_DeviceMode
*devmode
;
884 } spoolss_DevmodeContainer
;
886 [public] WERROR spoolss_OpenPrinter
(
887 [in,unique] [string,charset
(UTF16
)] uint16
*printername
,
888 [in,unique] [string,charset
(UTF16
)] uint16
*datatype
,
889 [in] spoolss_DevmodeContainer devmode_ctr
,
890 [in] spoolss_AccessRights access_mask
,
891 [out,ref] policy_handle
*handle
897 typedef [public,gensize
] struct {
899 [relative
] nstring
*printer_name
;
900 [relative
] nstring
*server_name
;
901 [relative
] nstring
*user_name
;
902 [relative
] nstring
*document_name
;
903 [relative
] nstring
*data_type
;
904 [relative
] nstring
*text_status
;
905 spoolss_JobStatus status
;
906 [range(0,99)] uint32 priority
;
909 uint32 pages_printed
;
910 spoolss_Time submitted
;
913 typedef [public,gensize
] struct {
915 [relative
] nstring
*printer_name
;
916 [relative
] nstring
*server_name
;
917 [relative
] nstring
*user_name
;
918 [relative
] nstring
*document_name
;
919 [relative
] nstring
*notify_name
;
920 [relative
] nstring
*data_type
;
921 [relative
] nstring
*print_processor
;
922 [relative
] nstring
*parameters
;
923 [relative
] nstring
*driver_name
;
924 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
925 [relative
] nstring
*text_status
;
926 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
927 spoolss_JobStatus status
;
928 [range(0,99)] uint32 priority
;
934 spoolss_Time submitted
;
936 uint32 pages_printed
;
939 typedef [public,gensize
] struct {
945 typedef [public,gensize
] struct {
947 [relative
] nstring
*printer_name
;
948 [relative
] nstring
*server_name
;
949 [relative
] nstring
*user_name
;
950 [relative
] nstring
*document_name
;
951 [relative
] nstring
*notify_name
;
952 [relative
] nstring
*data_type
;
953 [relative
] nstring
*print_processor
;
954 [relative
] nstring
*parameters
;
955 [relative
] nstring
*driver_name
;
956 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
957 [relative
] nstring
*text_status
;
958 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
959 spoolss_JobStatus status
;
960 [range(0,99)] uint32 priority
;
966 spoolss_Time submitted
;
968 uint32 pages_printed
;
972 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
973 [case(1)] spoolss_JobInfo1 info1
;
974 [case(2)] spoolss_JobInfo2 info2
;
975 [case(3)] spoolss_JobInfo3 info3
;
976 [case(4)] spoolss_JobInfo4 info4
;
982 [string,charset
(UTF16
)] uint16
*printer_name
;
983 [string,charset
(UTF16
)] uint16
*server_name
;
984 [string,charset
(UTF16
)] uint16
*user_name
;
985 [string,charset
(UTF16
)] uint16
*document_name
;
986 [string,charset
(UTF16
)] uint16
*data_type
;
987 [string,charset
(UTF16
)] uint16
*text_status
;
988 spoolss_JobStatus status
;
989 [range(0,99)] uint32 priority
;
992 uint32 pages_printed
;
993 spoolss_Time submitted
;
994 } spoolss_SetJobInfo1
;
998 [string,charset
(UTF16
)] uint16
*printer_name
;
999 [string,charset
(UTF16
)] uint16
*server_name
;
1000 [string,charset
(UTF16
)] uint16
*user_name
;
1001 [string,charset
(UTF16
)] uint16
*document_name
;
1002 [string,charset
(UTF16
)] uint16
*notify_name
;
1003 [string,charset
(UTF16
)] uint16
*data_type
;
1004 [string,charset
(UTF16
)] uint16
*print_processor
;
1005 [string,charset
(UTF16
)] uint16
*parameters
;
1006 [string,charset
(UTF16
)] uint16
*driver_name
;
1007 uint32 _devmode_ptr
; /* pointer to truncated devicemode */
1008 [string,charset
(UTF16
)] uint16
*text_status
;
1009 uint32 _secdesc_ptr
;
1010 spoolss_JobStatus status
;
1011 [range(0,99)] uint32 priority
;
1017 spoolss_Time submitted
;
1019 uint32 pages_printed
;
1020 } spoolss_SetJobInfo2
;
1024 [string,charset
(UTF16
)] uint16
*printer_name
;
1025 [string,charset
(UTF16
)] uint16
*server_name
;
1026 [string,charset
(UTF16
)] uint16
*user_name
;
1027 [string,charset
(UTF16
)] uint16
*document_name
;
1028 [string,charset
(UTF16
)] uint16
*notify_name
;
1029 [string,charset
(UTF16
)] uint16
*data_type
;
1030 [string,charset
(UTF16
)] uint16
*print_processor
;
1031 [string,charset
(UTF16
)] uint16
*parameters
;
1032 [string,charset
(UTF16
)] uint16
*driver_name
;
1033 uint32 _devmode_ptr
; /* pointer to truncated devicemode */
1034 [string,charset
(UTF16
)] uint16
*text_status
;
1035 uint32 _secdesc_ptr
;
1036 spoolss_JobStatus status
;
1037 [range(0,99)] uint32 priority
;
1043 spoolss_Time submitted
;
1045 uint32 pages_printed
;
1047 } spoolss_SetJobInfo4
;
1049 typedef [public] union {
1050 [case(1)] spoolss_SetJobInfo1
*info1
;
1051 [case(2)] spoolss_SetJobInfo2
*info2
;
1052 [case(3)] spoolss_JobInfo3
*info3
;
1053 [case(4)] spoolss_SetJobInfo4
*info4
;
1055 } spoolss_SetJobInfo
;
1059 [switch_is(level
)] spoolss_SetJobInfo info
;
1060 } spoolss_JobInfoContainer
;
1062 typedef [v1_enum] enum {
1063 SPOOLSS_JOB_CONTROL_PAUSE
= 1,
1064 SPOOLSS_JOB_CONTROL_RESUME
= 2,
1065 SPOOLSS_JOB_CONTROL_CANCEL
= 3,
1066 SPOOLSS_JOB_CONTROL_RESTART
= 4,
1067 SPOOLSS_JOB_CONTROL_DELETE
= 5,
1068 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER
= 6,
1069 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED
= 7,
1070 SPOOLSS_JOB_CONTROL_RETAIN
= 8,
1071 SPOOLSS_JOB_CONTROL_RELEASE
= 9
1072 } spoolss_JobControl
;
1074 WERROR spoolss_SetJob
(
1075 [in,ref] policy_handle
*handle,
1077 [in,unique] spoolss_JobInfoContainer
*ctr
,
1078 [in] spoolss_JobControl command
1081 /******************/
1082 /* Function: 0x03 */
1083 WERROR spoolss_GetJob
(
1084 [in,ref] policy_handle
*handle,
1087 [in,unique] DATA_BLOB
*buffer
,
1088 [in] uint32 offered
,
1089 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_JobInfo
*info
,
1090 [out,ref] uint32
*needed
1093 /******************/
1094 /* Function: 0x04 */
1095 [public,noopnum
,noprint
] WERROR _spoolss_EnumJobs
(
1096 [in,ref] policy_handle
*handle,
1097 [in] uint32 firstjob
,
1098 [in] uint32 numjobs
,
1100 [in,unique] DATA_BLOB
*buffer
,
1101 [in] uint32 offered
,
1102 [out,unique] DATA_BLOB
*info
,
1103 [out,ref] uint32
*needed
,
1104 [out,ref] uint32
*count
1106 [public,noopnum
,noprint
] void __spoolss_EnumJobs
(
1109 [out,switch_is(level
)] spoolss_JobInfo info
[count
]
1111 [nopull
,nopush
] WERROR spoolss_EnumJobs
(
1112 [in,ref] policy_handle
*handle,
1113 [in] uint32 firstjob
,
1114 [in] uint32 numjobs
,
1116 [in,unique] DATA_BLOB
*buffer
,
1117 [in] uint32 offered
,
1118 [out,ref] uint32
*count
,
1119 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_JobInfo
**info
,
1120 [out,ref] uint32
*needed
1123 /******************/
1124 /* Function: 0x05 */
1125 WERROR spoolss_AddPrinter
(
1126 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1127 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
1128 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
1129 [in,ref] sec_desc_buf
*secdesc_ctr
,
1130 [out,ref] policy_handle
*handle
1133 /******************/
1134 /* Function: 0x06 */
1135 WERROR spoolss_DeletePrinter
(
1136 [in] policy_handle
*handle
1139 /******************/
1140 /* Function: 0x07 */
1141 typedef [v1_enum] enum {
1142 SPOOLSS_PRINTER_CONTROL_UNPAUSE
= 0,
1143 SPOOLSS_PRINTER_CONTROL_PAUSE
= 1,
1144 SPOOLSS_PRINTER_CONTROL_RESUME
= 2,
1145 SPOOLSS_PRINTER_CONTROL_PURGE
= 3,
1146 SPOOLSS_PRINTER_CONTROL_SET_STATUS
= 4
1147 } spoolss_PrinterControl
;
1149 typedef [v1_enum] enum {
1150 SPOOLSS_DEBUGGING_BUILD
= 0x00000000,
1151 SPOOLSS_RELEASE_BUILD
= 0x00000001
1155 [string,charset
(UTF16
)] uint16
*servername
;
1156 [string,charset
(UTF16
)] uint16
*printername
;
1161 uint32 global_counter
;
1164 spoolss_Build free_build
;
1166 uint32 max_spooling
;
1167 uint32 session_counter
;
1168 uint32 num_error_out_of_paper
;
1169 uint32 num_error_not_ready
;
1171 uint32 number_of_processors
;
1172 spoolss_ProcessorType processor_type
;
1173 uint32 high_part_total_bytes
;
1177 uint32 enumerate_network_printers
;
1178 uint32 c_setprinter
;
1179 spoolss_ProcessorArchitecture processor_architecture
;
1180 uint16 processor_level
;
1184 } spoolss_SetPrinterInfo0
;
1187 spoolss_PrinterAttributes flags
;
1188 [string,charset
(UTF16
)] uint16
*description
;
1189 [string,charset
(UTF16
)] uint16
*name
;
1190 [string,charset
(UTF16
)] uint16
*comment
;
1191 } spoolss_SetPrinterInfo1
;
1194 [string,charset
(UTF16
)] uint16
*servername
;
1195 [string,charset
(UTF16
)] uint16
*printername
;
1196 [string,charset
(UTF16
)] uint16
*sharename
;
1197 [string,charset
(UTF16
)] uint16
*portname
;
1198 [string,charset
(UTF16
)] uint16
*drivername
;
1199 [string,charset
(UTF16
)] uint16
*comment
;
1200 [string,charset
(UTF16
)] uint16
*location
;
1202 [string,charset
(UTF16
)] uint16
*sepfile
;
1203 [string,charset
(UTF16
)] uint16
*printprocessor
;
1204 [string,charset
(UTF16
)] uint16
*datatype
;
1205 [string,charset
(UTF16
)] uint16
*parameters
;
1207 spoolss_PrinterAttributes attributes
;
1208 [range(0,99)] uint32 priority
;
1209 uint32 defaultpriority
;
1212 spoolss_PrinterStatus status
;
1215 } spoolss_SetPrinterInfo2
;
1218 uint32 sec_desc_ptr
;
1219 } spoolss_SetPrinterInfo3
;
1222 [string,charset
(UTF16
)] uint16
*printername
;
1223 [string,charset
(UTF16
)] uint16
*servername
;
1224 spoolss_PrinterAttributes attributes
;
1225 } spoolss_SetPrinterInfo4
;
1228 [string,charset
(UTF16
)] uint16
*printername
;
1229 [string,charset
(UTF16
)] uint16
*portname
;
1230 spoolss_PrinterAttributes attributes
;
1231 uint32 device_not_selected_timeout
;
1232 uint32 transmission_retry_timeout
;
1233 } spoolss_SetPrinterInfo5
;
1236 spoolss_PrinterStatus status
;
1237 } spoolss_SetPrinterInfo6
;
1240 [string,charset
(UTF16
)] uint16
*guid
; /* text form of printer guid */
1241 spoolss_DsPrintAction action
;
1242 } spoolss_SetPrinterInfo7
;
1246 } spoolss_SetPrinterInfo8
;
1250 } spoolss_SetPrinterInfo9
;
1252 typedef [switch_type(uint32
)] union {
1253 [case(0)] spoolss_SetPrinterInfo0
*info0
;
1254 [case(1)] spoolss_SetPrinterInfo1
*info1
;
1255 [case(2)] spoolss_SetPrinterInfo2
*info2
;
1256 [case(3)] spoolss_SetPrinterInfo3
*info3
;
1257 [case(4)] spoolss_SetPrinterInfo4
*info4
;
1258 [case(5)] spoolss_SetPrinterInfo5
*info5
;
1259 [case(6)] spoolss_SetPrinterInfo6
*info6
;
1260 [case(7)] spoolss_SetPrinterInfo7
*info7
;
1261 [case(8)] spoolss_SetPrinterInfo8
*info8
;
1262 [case(9)] spoolss_SetPrinterInfo9
*info9
;
1264 } spoolss_SetPrinterInfo
;
1268 [switch_is(level
)] spoolss_SetPrinterInfo info
;
1269 } spoolss_SetPrinterInfoCtr
;
1271 WERROR spoolss_SetPrinter
(
1272 [in,ref] policy_handle
*handle,
1273 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
1274 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
1275 [in,ref] sec_desc_buf
*secdesc_ctr
,
1276 [in] spoolss_PrinterControl command
1279 /******************/
1280 /* Function: 0x08 */
1281 [public] WERROR spoolss_GetPrinter
(
1282 [in,ref] policy_handle
*handle,
1284 [in,unique] DATA_BLOB
*buffer
,
1285 [in] uint32 offered
,
1286 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_PrinterInfo
*info
,
1287 [out,ref] uint32
*needed
1290 /******************/
1291 /* Function: 0x09 */
1293 typedef [public] struct {
1294 [value
((ndr_size_spoolss_StringArray
(r
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2)] uint32 _ndr_size
;
1295 /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array
string;
1296 } spoolss_StringArray
;
1299 [string,charset
(UTF16
)] uint16
*driver_name
;
1300 } spoolss_AddDriverInfo1
;
1302 typedef [v1_enum,public] enum {
1303 SPOOLSS_DRIVER_VERSION_9X
= 0,
1304 SPOOLSS_DRIVER_VERSION_NT35
= 1,
1305 SPOOLSS_DRIVER_VERSION_NT4
= 2,
1306 SPOOLSS_DRIVER_VERSION_200X
= 3
1307 } spoolss_DriverOSVersion
;
1310 spoolss_DriverOSVersion
version;
1311 [string,charset
(UTF16
)] uint16
*driver_name
;
1312 [string,charset
(UTF16
)] uint16
*architecture
;
1313 [string,charset
(UTF16
)] uint16
*driver_path
;
1314 [string,charset
(UTF16
)] uint16
*data_file
;
1315 [string,charset
(UTF16
)] uint16
*config_file
;
1316 } spoolss_AddDriverInfo2
;
1319 spoolss_DriverOSVersion
version;
1320 [string,charset
(UTF16
)] uint16
*driver_name
;
1321 [string,charset
(UTF16
)] uint16
*architecture
;
1322 [string,charset
(UTF16
)] uint16
*driver_path
;
1323 [string,charset
(UTF16
)] uint16
*data_file
;
1324 [string,charset
(UTF16
)] uint16
*config_file
;
1325 [string,charset
(UTF16
)] uint16
*help_file
;
1326 [string,charset
(UTF16
)] uint16
*monitor_name
;
1327 [string,charset
(UTF16
)] uint16
*default_datatype
;
1328 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1329 spoolss_StringArray
*dependent_files
;
1330 } spoolss_AddDriverInfo3
;
1333 spoolss_DriverOSVersion
version;
1334 [string,charset
(UTF16
)] uint16
*driver_name
;
1335 [string,charset
(UTF16
)] uint16
*architecture
;
1336 [string,charset
(UTF16
)] uint16
*driver_path
;
1337 [string,charset
(UTF16
)] uint16
*data_file
;
1338 [string,charset
(UTF16
)] uint16
*config_file
;
1339 [string,charset
(UTF16
)] uint16
*help_file
;
1340 [string,charset
(UTF16
)] uint16
*monitor_name
;
1341 [string,charset
(UTF16
)] uint16
*default_datatype
;
1342 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1343 spoolss_StringArray
*dependent_files
;
1344 [value
(((ndr_size_spoolss_StringArray
(previous_names
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_previous_names
;
1345 spoolss_StringArray
*previous_names
;
1346 } spoolss_AddDriverInfo4
;
1348 typedef [bitmap32bit
] bitmap
{
1349 PRINTER_DRIVER_PACKAGE_AWARE
= 0x00000002
1350 } spoolss_DriverAttributes
;
1353 spoolss_DriverOSVersion
version;
1354 [string,charset
(UTF16
)] uint16
*driver_name
;
1355 [string,charset
(UTF16
)] uint16
*architecture
;
1356 [string,charset
(UTF16
)] uint16
*driver_path
;
1357 [string,charset
(UTF16
)] uint16
*data_file
;
1358 [string,charset
(UTF16
)] uint16
*config_file
;
1359 spoolss_DriverAttributes driver_attributes
;
1360 uint32 config_version
;
1361 uint32 driver_version
;
1362 } spoolss_AddDriverInfo5
;
1365 spoolss_DriverOSVersion
version;
1366 [string,charset
(UTF16
)] uint16
*driver_name
;
1367 [string,charset
(UTF16
)] uint16
*architecture
;
1368 [string,charset
(UTF16
)] uint16
*driver_path
;
1369 [string,charset
(UTF16
)] uint16
*data_file
;
1370 [string,charset
(UTF16
)] uint16
*config_file
;
1371 [string,charset
(UTF16
)] uint16
*help_file
;
1372 [string,charset
(UTF16
)] uint16
*monitor_name
;
1373 [string,charset
(UTF16
)] uint16
*default_datatype
;
1374 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1375 spoolss_StringArray
*dependent_files
;
1376 [value
(((ndr_size_spoolss_StringArray
(previous_names
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_previous_names
;
1377 spoolss_StringArray
*previous_names
;
1379 hyper driver_version
;
1380 [string,charset
(UTF16
)] uint16
*manufacturer_name
;
1381 [string,charset
(UTF16
)] uint16
*manufacturer_url
;
1382 [string,charset
(UTF16
)] uint16
*hardware_id
;
1383 [string,charset
(UTF16
)] uint16
*provider
;
1384 } spoolss_AddDriverInfo6
;
1387 spoolss_DriverOSVersion
version;
1388 [string,charset
(UTF16
)] uint16
*driver_name
;
1389 [string,charset
(UTF16
)] uint16
*architecture
;
1390 [string,charset
(UTF16
)] uint16
*driver_path
;
1391 [string,charset
(UTF16
)] uint16
*data_file
;
1392 [string,charset
(UTF16
)] uint16
*config_file
;
1393 [string,charset
(UTF16
)] uint16
*help_file
;
1394 [string,charset
(UTF16
)] uint16
*monitor_name
;
1395 [string,charset
(UTF16
)] uint16
*default_datatype
;
1396 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1397 spoolss_StringArray
*dependent_files
;
1398 [value
(((ndr_size_spoolss_StringArray
(previous_names
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_previous_names
;
1399 spoolss_StringArray
*previous_names
;
1401 hyper driver_version
;
1402 [string,charset
(UTF16
)] uint16
*manufacturer_name
;
1403 [string,charset
(UTF16
)] uint16
*manufacturer_url
;
1404 [string,charset
(UTF16
)] uint16
*hardware_id
;
1405 [string,charset
(UTF16
)] uint16
*provider
;
1406 [string,charset
(UTF16
)] uint16
*print_processor
;
1407 [string,charset
(UTF16
)] uint16
*vendor_setup
;
1408 [value
(((ndr_size_spoolss_StringArray
(color_profiles
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_color_profiles
;
1409 spoolss_StringArray
*color_profiles
;
1410 [string,charset
(UTF16
)] uint16
*inf_path
;
1411 uint32 printer_driver_attributes
;
1412 [value
(((ndr_size_spoolss_StringArray
(core_driver_dependencies
, ndr
->iconv_convenience
, ndr
->flags
)-4)/2))] uint32 _ndr_size_core_driver_dependencies
;
1413 spoolss_StringArray
*core_driver_dependencies
;
1414 NTTIME min_inbox_driver_ver_date
;
1415 hyper min_inbox_driver_ver_version
;
1416 } spoolss_AddDriverInfo8
;
1418 typedef [switch_type(uint32
)] union {
1419 [case(1)] spoolss_AddDriverInfo1
*info1
;
1420 [case(2)] spoolss_AddDriverInfo2
*info2
;
1421 [case(3)] spoolss_AddDriverInfo3
*info3
;
1422 [case(4)] spoolss_AddDriverInfo4
*info4
;
1423 [case(6)] spoolss_AddDriverInfo6
*info6
;
1424 [case(8)] spoolss_AddDriverInfo8
*info8
;
1425 } spoolss_AddDriverInfo
;
1429 [switch_is(level
)] spoolss_AddDriverInfo info
;
1430 } spoolss_AddDriverInfoCtr
;
1432 WERROR spoolss_AddPrinterDriver
(
1433 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
1434 [in,ref] spoolss_AddDriverInfoCtr
*info_ctr
1437 typedef [public,gensize
] struct {
1438 [relative
] nstring
*driver_name
;
1439 } spoolss_DriverInfo1
;
1441 typedef [public,gensize
] struct {
1442 spoolss_DriverOSVersion
version;
1443 [relative
] nstring
*driver_name
;
1444 [relative
] nstring
*architecture
;
1445 [relative
] nstring
*driver_path
;
1446 [relative
] nstring
*data_file
;
1447 [relative
] nstring
*config_file
;
1448 } spoolss_DriverInfo2
;
1450 typedef [public,gensize
] struct {
1451 spoolss_DriverOSVersion
version;
1452 [relative
] nstring
*driver_name
;
1453 [relative
] nstring
*architecture
;
1454 [relative
] nstring
*driver_path
;
1455 [relative
] nstring
*data_file
;
1456 [relative
] nstring
*config_file
;
1457 [relative
] nstring
*help_file
;
1458 [relative
] nstring_array
*dependent_files
;
1459 [relative
] nstring
*monitor_name
;
1460 [relative
] nstring
*default_datatype
;
1461 } spoolss_DriverInfo3
;
1463 typedef [public,gensize
] struct {
1464 spoolss_DriverOSVersion
version;
1465 [relative
] nstring
*driver_name
;
1466 [relative
] nstring
*architecture
;
1467 [relative
] nstring
*driver_path
;
1468 [relative
] nstring
*data_file
;
1469 [relative
] nstring
*config_file
;
1470 [relative
] nstring
*help_file
;
1471 [relative
] nstring_array
*dependent_files
;
1472 [relative
] nstring
*monitor_name
;
1473 [relative
] nstring
*default_datatype
;
1474 [relative
] nstring_array
*previous_names
;
1475 } spoolss_DriverInfo4
;
1477 typedef [public,gensize
] struct {
1478 spoolss_DriverOSVersion
version;
1479 [relative
] nstring
*driver_name
;
1480 [relative
] nstring
*architecture
;
1481 [relative
] nstring
*driver_path
;
1482 [relative
] nstring
*data_file
;
1483 [relative
] nstring
*config_file
;
1484 spoolss_DriverAttributes driver_attributes
;
1485 uint32 config_version
;
1486 uint32 driver_version
;
1487 } spoolss_DriverInfo5
;
1489 typedef [public,gensize
] struct {
1490 spoolss_DriverOSVersion
version;
1491 [relative
] nstring
*driver_name
;
1492 [relative
] nstring
*architecture
;
1493 [relative
] nstring
*driver_path
;
1494 [relative
] nstring
*data_file
;
1495 [relative
] nstring
*config_file
;
1496 [relative
] nstring
*help_file
;
1497 [relative
] nstring_array
*dependent_files
;
1498 [relative
] nstring
*monitor_name
;
1499 [relative
] nstring
*default_datatype
;
1500 [relative
] nstring_array
*previous_names
;
1502 hyper driver_version
;
1503 [relative
] nstring
*manufacturer_name
;
1504 [relative
] nstring
*manufacturer_url
;
1505 [relative
] nstring
*hardware_id
;
1506 [relative
] nstring
*provider
;
1507 } spoolss_DriverInfo6
;
1509 typedef [public,gensize
] struct {
1511 spoolss_DriverOSVersion
version;
1512 [relative
] nstring
*driver_name
;
1513 [relative
] nstring
*inf_name
;
1514 [relative
] nstring
*install_source_root
;
1515 } spoolss_DriverInfo7
;
1517 typedef [public,gensize
] struct {
1518 spoolss_DriverOSVersion
version;
1519 [relative
] nstring
*driver_name
;
1520 [relative
] nstring
*architecture
;
1521 [relative
] nstring
*driver_path
;
1522 [relative
] nstring
*data_file
;
1523 [relative
] nstring
*config_file
;
1524 [relative
] nstring
*help_file
;
1525 [relative
] nstring_array
*dependent_files
;
1526 [relative
] nstring
*monitor_name
;
1527 [relative
] nstring
*default_datatype
;
1528 [relative
] nstring_array
*previous_names
;
1530 hyper driver_version
;
1531 [relative
] nstring
*manufacturer_name
;
1532 [relative
] nstring
*manufacturer_url
;
1533 [relative
] nstring
*hardware_id
;
1534 [relative
] nstring
*provider
;
1535 [relative
] nstring
*print_processor
;
1536 [relative
] nstring
*vendor_setup
;
1537 [relative
] nstring_array
*color_profiles
;
1538 [relative
] nstring
*inf_path
;
1539 uint32 printer_driver_attributes
;
1540 [relative
] nstring_array
*core_driver_dependencies
;
1541 NTTIME min_inbox_driver_ver_date
;
1542 hyper min_inbox_driver_ver_version
;
1543 } spoolss_DriverInfo8
;
1545 typedef [v1_enum] enum {
1546 SPOOLSS_DRIVER_FILE_TYPE_RENDERING
= 0x00000000,
1547 SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION
= 0x00000001,
1548 SPOOLSS_DRIVER_FILE_TYPE_DATA
= 0x00000002,
1549 SPOOLSS_DRIVER_FILE_TYPE_HELP
= 0x00000003,
1550 SPOOLSS_DRIVER_FILE_TYPE_OTHER
= 0x00000004
1551 } spoolss_DriverFileType
;
1553 typedef [public] struct {
1554 [relative
] nstring
*file_name
;
1555 spoolss_DriverFileType file_type
;
1556 uint32 file_version
;
1557 } spoolss_DriverFileInfo
;
1559 typedef [public,gensize
,nopush
,nopull
] struct {
1560 spoolss_DriverOSVersion
version;
1561 [relative
] nstring
*driver_name
;
1562 [relative
] nstring
*architecture
;
1563 [relative
] [size_is(file_count
)] spoolss_DriverFileInfo
*file_info
;
1565 [relative
] nstring
*monitor_name
;
1566 [relative
] nstring
*default_datatype
;
1567 [relative
] nstring_array
*previous_names
;
1569 hyper driver_version
;
1570 [relative
] nstring
*manufacturer_name
;
1571 [relative
] nstring
*manufacturer_url
;
1572 [relative
] nstring
*hardware_id
;
1573 [relative
] nstring
*provider
;
1574 } spoolss_DriverInfo101
;
1576 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
1577 [case(1)] spoolss_DriverInfo1 info1
;
1578 [case(2)] spoolss_DriverInfo2 info2
;
1579 [case(3)] spoolss_DriverInfo3 info3
;
1580 [case(4)] spoolss_DriverInfo4 info4
;
1581 [case(5)] spoolss_DriverInfo5 info5
;
1582 [case(6)] spoolss_DriverInfo6 info6
;
1583 [case(7)] spoolss_DriverInfo7 info7
;
1584 [case(8)] spoolss_DriverInfo8 info8
;
1585 [case(101)] spoolss_DriverInfo101 info101
;
1587 } spoolss_DriverInfo
;
1589 /******************/
1590 /* Function: 0x0a */
1591 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinterDrivers
(
1592 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1593 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1595 [in,unique] DATA_BLOB
*buffer
,
1596 [in] uint32 offered
,
1597 [out,unique] DATA_BLOB
*info
,
1598 [out,ref] uint32
*needed
,
1599 [out,ref] uint32
*count
1601 [public,noopnum
,noprint
] void __spoolss_EnumPrinterDrivers
(
1604 [out,switch_is(level
)] spoolss_DriverInfo info
[count
]
1606 [nopull
,nopush
] WERROR spoolss_EnumPrinterDrivers
(
1607 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1608 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1610 [in,unique] DATA_BLOB
*buffer
,
1611 [in] uint32 offered
,
1612 [out,ref] uint32
*count
,
1613 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_DriverInfo
**info
,
1614 [out,ref] uint32
*needed
1617 /******************/
1618 /* Function: 0x0b */
1619 WERROR spoolss_GetPrinterDriver
(
1620 [in,ref] policy_handle
*handle,
1621 [in,unique] [string,charset
(UTF16
)] uint16
*architecture
,
1623 [in,unique] DATA_BLOB
*buffer
,
1624 [in] uint32 offered
,
1625 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverInfo
*info
,
1626 [out,ref] uint32
*needed
1629 /******************/
1630 /* Function: 0x0c */
1631 typedef [public,gensize
] struct {
1632 nstring directory_name
;
1633 } spoolss_DriverDirectoryInfo1
;
1635 /* NOTE: it's seems that w2k3 completly ignores the level
1638 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
1639 [case(1)] spoolss_DriverDirectoryInfo1 info1
;
1640 [default] spoolss_DriverDirectoryInfo1 info1
;
1641 } spoolss_DriverDirectoryInfo
;
1643 [public] WERROR spoolss_GetPrinterDriverDirectory
(
1644 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1645 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1647 [in,unique] DATA_BLOB
*buffer
,
1648 [in] uint32 offered
,
1649 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverDirectoryInfo
*info
,
1650 [out,ref] uint32
*needed
1653 /******************/
1654 /* Function: 0x0d */
1655 WERROR spoolss_DeletePrinterDriver
(
1656 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1657 [in] [string,charset
(UTF16
)] uint16 architecture
[],
1658 [in] [string,charset
(UTF16
)] uint16 driver
[]
1661 /******************/
1662 /* Function: 0x0e */
1663 WERROR spoolss_AddPrintProcessor
(
1664 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1665 [in] [string,charset
(UTF16
)] uint16 architecture
[],
1666 [in] [string,charset
(UTF16
)] uint16 path_name
[],
1667 [in] [string,charset
(UTF16
)] uint16 print_processor_name
[]
1670 /******************/
1671 /* Function: 0x0f */
1672 typedef [public,gensize
] struct {
1673 [relative
] nstring
*print_processor_name
;
1674 } spoolss_PrintProcessorInfo1
;
1676 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
1677 [case(1)] spoolss_PrintProcessorInfo1 info1
;
1679 } spoolss_PrintProcessorInfo
;
1681 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrintProcessors
(
1682 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
1683 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1685 [in,unique] DATA_BLOB
*buffer
,
1686 [in] uint32 offered
,
1687 [out,unique] DATA_BLOB
*info
,
1688 [out,ref] uint32
*needed
,
1689 [out,ref] uint32
*count
1691 [public,noopnum
,noprint
] void __spoolss_EnumPrintProcessors
(
1694 [out,switch_is(level
)] spoolss_PrintProcessorInfo info
[count
]
1696 [nopull
,nopush
] WERROR spoolss_EnumPrintProcessors
(
1697 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
1698 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1700 [in,unique] DATA_BLOB
*buffer
,
1701 [in] uint32 offered
,
1702 [out,ref] uint32
*count
,
1703 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrintProcessorInfo
**info
,
1704 [out,ref] uint32
*needed
1707 /******************/
1708 /* Function: 0x10 */
1709 typedef [public,gensize
] struct {
1710 nstring directory_name
;
1711 } spoolss_PrintProcessorDirectoryInfo1
;
1713 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
1714 [case(1)] spoolss_PrintProcessorDirectoryInfo1 info1
;
1715 [default] spoolss_PrintProcessorDirectoryInfo1 info1
;
1716 } spoolss_PrintProcessorDirectoryInfo
;
1718 WERROR spoolss_GetPrintProcessorDirectory
(
1719 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1720 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1722 [in,unique] DATA_BLOB
*buffer
,
1723 [in] uint32 offered
,
1724 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_PrintProcessorDirectoryInfo
*info
,
1725 [out,ref] uint32
*needed
1728 /******************/
1729 /* Function: 0x11 */
1731 [string,charset
(UTF16
)] uint16
*document_name
;
1732 [string,charset
(UTF16
)] uint16
*output_file
;
1733 [string,charset
(UTF16
)] uint16
*datatype
;
1734 } spoolss_DocumentInfo1
;
1736 typedef [switch_type(uint32
)] union {
1737 [case(1)] spoolss_DocumentInfo1
*info1
;
1738 [case(2)]; /* TODO */
1739 [case(3)]; /* TODO */
1741 } spoolss_DocumentInfo
;
1743 WERROR spoolss_StartDocPrinter
(
1744 [in,ref] policy_handle
*handle,
1746 [in,switch_is(level
)] spoolss_DocumentInfo info
,
1747 [out,ref] uint32
*job_id
1750 /******************/
1751 /* Function: 0x12 */
1752 WERROR spoolss_StartPagePrinter
(
1753 [in,ref] policy_handle
*handle
1756 /******************/
1757 /* Function: 0x13 */
1758 WERROR spoolss_WritePrinter
(
1759 [in,ref] policy_handle
*handle,
1760 [in] DATA_BLOB data
,
1761 [in,value
(r
->in.data.length
)] uint32 _data_size
,
1762 [out,ref] uint32
*num_written
1765 /******************/
1766 /* Function: 0x14 */
1767 WERROR spoolss_EndPagePrinter
(
1768 [in,ref] policy_handle
*handle
1771 /******************/
1772 /* Function: 0x15 */
1773 WERROR spoolss_AbortPrinter
(
1774 [in,ref] policy_handle
*handle
1777 /******************/
1778 /* Function: 0x16 */
1779 WERROR spoolss_ReadPrinter
(
1780 [in,ref] policy_handle
*handle,
1781 [out,ref] [size_is(data_size
)] uint8
*data
,
1782 [in] uint32 data_size
,
1783 [out,ref] uint32
*_data_size
1786 /******************/
1787 /* Function: 0x17 */
1788 WERROR spoolss_EndDocPrinter
(
1789 [in,ref] policy_handle
*handle
1792 /******************/
1793 /* Function: 0x18 */
1794 WERROR spoolss_AddJob
(
1795 [in,ref] policy_handle
*handle,
1797 [in,out,unique] [size_is(offered
)] uint8
*buffer
,
1798 [in] uint32 offered
,
1799 [out,ref] uint32
*needed
1802 /******************/
1803 /* Function: 0x19 */
1804 WERROR spoolss_ScheduleJob
(
1805 [in,ref] policy_handle
*handle,
1809 /******************/
1810 /* Function: 0x1a */
1812 const string SPL_ARCH_WIN40
= "WIN40";
1813 const string SPL_ARCH_W32X86
= "W32X86";
1814 const string SPL_ARCH_W32MIPS
= "W32MIPS";
1815 const string SPL_ARCH_W32ALPHA
= "W32ALPHA";
1816 const string SPL_ARCH_W32PPC
= "W32PPC";
1817 const string SPL_ARCH_IA64
= "IA64";
1818 const string SPL_ARCH_X64
= "x64";
1820 const string SPOOLSS_ARCHITECTURE_ALL
= "All";
1821 const string SPOOLSS_ARCHITECTURE_ALL_CLUSTER
= "AllCluster";
1822 const string SPOOLSS_ARCHITECTURE_NT_X86
= "Windows NT x86";
1823 const string SPOOLSS_ARCHITECTURE_IA_64
= "Windows IA64";
1824 const string SPOOLSS_ARCHITECTURE_x64
= "Windows x64";
1825 const string SPOOLSS_ARCHITECTURE_4_0
= "Windows 4.0";
1826 const string SPOOLSS_DEFAULT_SERVER_PATH
= "C:\\WINDOWS\\system32\\spool";
1828 typedef [public,gensize
] struct {
1829 [value
(ndr_size_spoolss_OSVersion
(r
,ndr
->iconv_convenience
,ndr
->flags
))] uint32 _ndr_size
;
1833 [value
(2)] uint32 platform_id
;
1834 [subcontext
(0),subcontext_size
(256)] nstring extra_string
;
1835 } spoolss_OSVersion
;
1837 typedef [public,gensize
] struct {
1838 [value
(ndr_size_spoolss_OSVersionEx
(r
,ndr
->iconv_convenience
,ndr
->flags
))] uint32 _ndr_size
;
1842 [value
(2)] uint32 platform_id
;
1843 [subcontext
(0),subcontext_size
(256)] nstring extra_string
;
1844 uint16 service_pack_major
;
1845 uint16 service_pack_minor
;
1849 } spoolss_OSVersionEx
;
1851 typedef [nodiscriminant
,public] union {
1853 [case(REG_SZ
)] nstring
string;
1854 [case(REG_BINARY
),flag
(NDR_REMAINING
)] DATA_BLOB binary
;
1855 [case(REG_DWORD
)] uint32 value
;
1856 [case(REG_MULTI_SZ
)] nstring_array string_array
;
1857 [default,flag
(NDR_REMAINING
)] DATA_BLOB data
;
1858 } spoolss_PrinterData
;
1860 /* predefined registry key names for printer data */
1862 const string SPOOL_PRINTERDATA_KEY
= "PrinterDriverData";
1863 const string SPOOL_DSSPOOLER_KEY
= "DsSpooler";
1864 const string SPOOL_DSDRIVER_KEY
= "DsDriver";
1865 const string SPOOL_DSUSER_KEY
= "DsUser";
1866 const string SPOOL_PNPDATA_KEY
= "PnPData";
1867 const string SPOOL_OID_KEY
= "OID";
1869 /* predefined value names for printer data */
1871 const string SPOOL_REG_ASSETNUMBER
= "assetNumber";
1872 const string SPOOL_REG_BYTESPERMINUTE
= "bytesPerMinute";
1873 const string SPOOL_REG_DEFAULTPRIORITY
= "defaultPriority";
1874 const string SPOOL_REG_DESCRIPTION
= "description";
1875 const string SPOOL_REG_DRIVERNAME
= "driverName";
1876 const string SPOOL_REG_DRIVERVERSION
= "driverVersion";
1877 const string SPOOL_REG_FLAGS
= "flags";
1878 const string SPOOL_REG_LOCATION
= "location";
1879 const string SPOOL_REG_OPERATINGSYSTEM
= "operatingSystem";
1880 const string SPOOL_REG_OPERATINGSYSTEMHOTFIX
= "operatingSystemHotfix";
1881 const string SPOOL_REG_OPERATINGSYSTEMSERVICEPACK
= "operatingSystemServicePack";
1882 const string SPOOL_REG_OPERATINGSYSTEMVERSION
= "operatingSystemVersion";
1883 const string SPOOL_REG_PORTNAME
= "portName";
1884 const string SPOOL_REG_PRINTATTRIBUTES
= "printAttributes";
1885 const string SPOOL_REG_PRINTBINNAMES
= "printBinNames";
1886 const string SPOOL_REG_PRINTCOLLATE
= "printCollate";
1887 const string SPOOL_REG_PRINTCOLOR
= "printColor";
1888 const string SPOOL_REG_PRINTDUPLEXSUPPORTED
= "printDuplexSupported";
1889 const string SPOOL_REG_PRINTENDTIME
= "printEndTime";
1890 const string SPOOL_REG_PRINTERNAME
= "printerName";
1891 const string SPOOL_REG_PRINTFORMNAME
= "printFormName";
1892 const string SPOOL_REG_PRINTKEEPPRINTEDJOBS
= "printKeepPrintedJobs";
1893 const string SPOOL_REG_PRINTLANGUAGE
= "printLanguage";
1894 const string SPOOL_REG_PRINTMACADDRESS
= "printMACAddress";
1895 const string SPOOL_REG_PRINTMAXCOPIES
= "printMaxCopies";
1896 const string SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED
= "printMaxResolutionSupported";
1897 const string SPOOL_REG_PRINTMAXXEXTENT
= "printMaxXExtent";
1898 const string SPOOL_REG_PRINTMAXYEXTENT
= "printMaxYExtent";
1899 const string SPOOL_REG_PRINTMEDIAREADY
= "printMediaReady";
1900 const string SPOOL_REG_PRINTMEDIASUPPORTED
= "printMediaSupported";
1901 const string SPOOL_REG_PRINTMEMORY
= "printMemory";
1902 const string SPOOL_REG_PRINTMINXEXTENT
= "printMinXExtent";
1903 const string SPOOL_REG_PRINTMINYEXTENT
= "printMinYExtent";
1904 const string SPOOL_REG_PRINTNETWORKADDRESS
= "printNetworkAddress";
1905 const string SPOOL_REG_PRINTNOTIFY
= "printNotify";
1906 const string SPOOL_REG_PRINTNUMBERUP
= "printNumberUp";
1907 const string SPOOL_REG_PRINTORIENTATIONSSUPPORTED
= "printOrientationsSupported";
1908 const string SPOOL_REG_PRINTOWNER
= "printOwner";
1909 const string SPOOL_REG_PRINTPAGESPERMINUTE
= "printPagesPerMinute";
1910 const string SPOOL_REG_PRINTRATE
= "printRate";
1911 const string SPOOL_REG_PRINTRATEUNIT
= "printRateUnit";
1912 const string SPOOL_REG_PRINTSEPARATORFILE
= "printSeparatorFile";
1913 const string SPOOL_REG_PRINTSHARENAME
= "printShareName";
1914 const string SPOOL_REG_PRINTSPOOLING
= "printSpooling";
1915 const string SPOOL_REGVAL_PRINTWHILESPOOLING
= "PrintWhileSpooling";
1916 const string SPOOL_REGVAL_PRINTAFTERSPOOLED
= "PrintAfterSpooled";
1917 const string SPOOL_REGVAL_PRINTDIRECT
= "PrintDirect";
1918 const string SPOOL_REG_PRINTSTAPLINGSUPPORTED
= "printStaplingSupported";
1919 const string SPOOL_REG_PRINTSTARTTIME
= "printStartTime";
1920 const string SPOOL_REG_PRINTSTATUS
= "printStatus";
1921 const string SPOOL_REG_PRIORITY
= "priority";
1922 const string SPOOL_REG_SERVERNAME
= "serverName";
1923 const string SPOOL_REG_SHORTSERVERNAME
= "shortServerName";
1924 const string SPOOL_REG_UNCNAME
= "uNCName";
1925 const string SPOOL_REG_URL
= "url";
1926 const string SPOOL_REG_VERSIONNUMBER
= "versionNumber";
1928 [noopnum
,noprint
,public] WERROR _spoolss_GetPrinterData
(
1929 [in,ref] policy_handle
*handle,
1930 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1931 [in] uint32 offered
,
1932 [out,ref] winreg_Type
*type
,
1933 [out,ref] DATA_BLOB
*data
,
1934 [out,ref] uint32
*needed
1936 [noopnum
,noprint
,public] void __spoolss_GetPrinterData
(
1937 [in] winreg_Type type
,
1938 [out,ref,switch_is(type
)] spoolss_PrinterData
*data
1940 [nopull
,nopush
,public] WERROR spoolss_GetPrinterData
(
1941 [in,ref] policy_handle
*handle,
1942 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1943 [in] uint32 offered
,
1944 [out,ref] winreg_Type
*type
,
1945 [out,ref,subcontext
(4),subcontext_size
(offered
),switch_is(*type
)] spoolss_PrinterData
*data
,
1946 [out,ref] uint32
*needed
1949 /******************/
1950 /* Function: 0x1b */
1951 WERROR spoolss_SetPrinterData
(
1952 [in,ref] policy_handle
*handle,
1953 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1954 [in] winreg_Type type
,
1955 [in,ref] [size_is(offered
)] uint8
*data
,
1959 /******************/
1960 /* Function: 0x1c */
1961 [todo
] WERROR spoolss_WaitForPrinterChange
(
1964 /******************/
1965 /* Function: 0x1d */
1966 [public] WERROR spoolss_ClosePrinter
(
1967 [in,out,ref] policy_handle
*handle
1970 /******************/
1971 /* Function: 0x1e */
1972 typedef [v1_enum] enum {
1973 SPOOLSS_FORM_USER
= 0,
1974 SPOOLSS_FORM_BUILTIN
= 1,
1975 SPOOLSS_FORM_PRINTER
= 2
1976 } spoolss_FormFlags
;
1990 typedef [public,gensize
] struct {
1991 spoolss_FormFlags flags
;
1992 [relative
] nstring
*form_name
;
1993 spoolss_FormSize size
;
1994 spoolss_FormArea area
;
1995 } spoolss_FormInfo1
;
1997 typedef [bitmap32bit
] bitmap
{
1998 SPOOLSS_FORM_STRING_TYPE_NONE
= 0x00000001,
1999 SPOOLSS_FORM_STRING_TYPE_MUI_DLL
= 0x00000002,
2000 SPOOLSS_FORM_STRING_TYPE_LANG_PAIR
= 0x00000004
2001 } spoolss_FormStringType
;
2003 typedef [public,gensize
] struct {
2004 spoolss_FormFlags flags
;
2005 [relative
] nstring
*form_name
;
2006 spoolss_FormSize size
;
2007 spoolss_FormArea area
;
2008 [relative
] astring
*keyword
;
2009 spoolss_FormStringType string_type
;
2010 [relative
] nstring
*mui_dll
;
2011 uint32 ressource_id
;
2012 [relative
] nstring
*display_name
;
2015 } spoolss_FormInfo2
;
2017 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
2018 [case(1)] spoolss_FormInfo1 info1
;
2019 [case(2)] spoolss_FormInfo2 info2
;
2024 spoolss_FormFlags flags
;
2025 [string,charset
(UTF16
)] uint16
*form_name
;
2026 spoolss_FormSize size
;
2027 spoolss_FormArea area
;
2028 } spoolss_AddFormInfo1
;
2031 spoolss_FormFlags flags
;
2032 [string,charset
(UTF16
)] uint16
*form_name
;
2033 spoolss_FormSize size
;
2034 spoolss_FormArea area
;
2035 [string,charset
(DOS
)] uint8
*keyword
;
2036 spoolss_FormStringType string_type
;
2037 [string,charset
(UTF16
)] uint16
*mui_dll
;
2038 uint32 ressource_id
;
2039 [string,charset
(UTF16
)] uint16
*display_name
;
2041 } spoolss_AddFormInfo2
;
2043 typedef [switch_type(uint32
)] union {
2044 [case(1)] spoolss_AddFormInfo1
*info1
;
2045 [case(2)] spoolss_AddFormInfo2
*info2
;
2046 } spoolss_AddFormInfo
;
2048 WERROR spoolss_AddForm
(
2049 [in,ref] policy_handle
*handle,
2051 [in,switch_is(level
)] spoolss_AddFormInfo info
2054 /******************/
2055 /* Function: 0x1f */
2056 WERROR spoolss_DeleteForm
(
2057 [in,ref] policy_handle
*handle,
2058 [in] [string,charset
(UTF16
)] uint16 form_name
[]
2061 /******************/
2062 /* Function: 0x20 */
2063 WERROR spoolss_GetForm
(
2064 [in,ref] policy_handle
*handle,
2065 [in] [string,charset
(UTF16
)] uint16 form_name
[],
2067 [in,unique] DATA_BLOB
*buffer
,
2068 [in] uint32 offered
,
2069 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_FormInfo
*info
,
2070 [out,ref] uint32
*needed
2073 /******************/
2074 /* Function: 0x21 */
2075 WERROR spoolss_SetForm
(
2076 [in,ref] policy_handle
*handle,
2077 [in] [string,charset
(UTF16
)] uint16 form_name
[],
2079 [in,switch_is(level
)] spoolss_AddFormInfo info
2082 /******************/
2083 /* Function: 0x22 */
2084 [public,noopnum
,noprint
] WERROR _spoolss_EnumForms
(
2085 [in,ref] policy_handle
*handle,
2087 [in,unique] DATA_BLOB
*buffer
,
2088 [in] uint32 offered
,
2089 [out,unique] DATA_BLOB
*info
,
2090 [out,ref] uint32
*needed
,
2091 [out,ref] uint32
*count
2093 [public,noopnum
,noprint
] void __spoolss_EnumForms
(
2096 [out,switch_is(level
)] spoolss_FormInfo info
[count
]
2098 [nopull
,nopush
] WERROR spoolss_EnumForms
(
2099 [in,ref] policy_handle
*handle,
2101 [in,unique] DATA_BLOB
*buffer
,
2102 [in] uint32 offered
,
2103 [out,ref] uint32
*count
,
2104 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_FormInfo
**info
,
2105 [out,ref] uint32
*needed
2109 * Special strings for the OpenPrinter() call. See the MSDN DDK
2110 * docs on the XcvDataPort() for more details.
2113 const string SPL_LOCAL_PORT
= "Local Port";
2114 const string SPL_TCPIP_PORT
= "Standard TCP/IP Port";
2115 const string SPL_XCV_MONITOR_LOCALMON
= ",XcvMonitor Local Port";
2116 const string SPL_XCV_MONITOR_TCPMON
= ",XcvMonitor Standard TCP/IP Port";
2118 typedef [public,gensize
] struct {
2119 [relative
] nstring
*port_name
;
2120 } spoolss_PortInfo1
;
2123 SPOOLSS_PORT_TYPE_WRITE
= 0x00000001,
2124 SPOOLSS_PORT_TYPE_READ
= 0x00000002,
2125 SPOOLSS_PORT_TYPE_REDIRECTED
= 0x00000004,
2126 SPOOLSS_PORT_TYPE_NET_ATTACHED
= 0x00000008
2129 typedef [public,gensize
] struct {
2130 [relative
] nstring
*port_name
;
2131 [relative
] nstring
*monitor_name
;
2132 [relative
] nstring
*description
;
2133 spoolss_PortType port_type
;
2135 } spoolss_PortInfo2
;
2137 typedef [v1_enum] enum {
2138 PORT_STATUS_CLEAR
= 0x00000000,
2139 PORT_STATUS_OFFLINE
= 0x00000001,
2140 PORT_STATUS_PAPER_JAM
= 0x00000002,
2141 PORT_STATUS_PAPER_OUT
= 0x00000003,
2142 PORT_STATUS_OUTPUT_BIN_FULL
= 0x00000004,
2143 PORT_STATUS_PAPER_PROBLEM
= 0x00000005,
2144 PORT_STATUS_NO_TONER
= 0x00000006,
2145 PORT_STATUS_DOOR_OPEN
= 0x00000007,
2146 PORT_STATUS_USER_INTERVENTION
= 0x00000008,
2147 PORT_STATUS_OUT_OF_MEMORY
= 0x00000009,
2148 PORT_STATUS_TONER_LOW
= 0x0000000A,
2149 PORT_STATUS_WARMING_UP
= 0x0000000B,
2150 PORT_STATUS_POWER_SAVE
= 0x0000000C
2151 } spoolss_PortStatus
;
2153 typedef [v1_enum] enum {
2154 PORT_STATUS_TYPE_ERROR
= 0x00000001,
2155 PORT_STATUS_TYPE_WARNING
= 0x00000002,
2156 PORT_STATUS_TYPE_INFO
= 0x00000003
2157 } spoolss_PortSeverity
;
2159 typedef [public,gensize
] struct {
2160 spoolss_PortStatus status
;
2161 [relative
] nstring
*status_string
;
2162 spoolss_PortSeverity severity
;
2163 } spoolss_PortInfo3
;
2165 typedef [public,gensize
] struct {
2166 [relative
] nstring
*port_name
;
2167 DATA_BLOB monitor_data
; /* relative ?? */
2168 } spoolss_PortInfoFF
;
2170 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2171 [case(1)] spoolss_PortInfo1 info1
;
2172 [case(2)] spoolss_PortInfo2 info2
;
2173 [case(3)] spoolss_PortInfo3 info3
;
2174 [case(0xff)] spoolss_PortInfoFF infoFF
;
2178 /******************/
2179 /* Function: 0x23 */
2180 [public,noopnum
,noprint
] WERROR _spoolss_EnumPorts
(
2181 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2183 [in,unique] DATA_BLOB
*buffer
,
2184 [in] uint32 offered
,
2185 [out,unique] DATA_BLOB
*info
,
2186 [out,ref] uint32
*needed
,
2187 [out,ref] uint32
*count
2189 [public,noopnum
,noprint
] void __spoolss_EnumPorts
(
2192 [out,switch_is(level
)] spoolss_PortInfo info
[count
]
2194 [nopull
,nopush
] WERROR spoolss_EnumPorts
(
2195 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2197 [in,unique] DATA_BLOB
*buffer
,
2198 [in] uint32 offered
,
2199 [out,ref] uint32
*count
,
2200 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PortInfo
**info
,
2201 [out,ref] uint32
*needed
2204 /******************/
2205 /* Function: 0x24 */
2206 typedef [public,gensize
] struct {
2207 [relative
] nstring
*monitor_name
;
2208 } spoolss_MonitorInfo1
;
2210 typedef [public,gensize
] struct {
2211 [relative
] nstring
*monitor_name
;
2212 [relative
] nstring
*environment
;
2213 [relative
] nstring
*dll_name
;
2214 } spoolss_MonitorInfo2
;
2216 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2217 [case(1)] spoolss_MonitorInfo1 info1
;
2218 [case(2)] spoolss_MonitorInfo2 info2
;
2220 } spoolss_MonitorInfo
;
2222 [public,noopnum
,noprint
] WERROR _spoolss_EnumMonitors
(
2223 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2225 [in,unique] DATA_BLOB
*buffer
,
2226 [in] uint32 offered
,
2227 [out,unique] DATA_BLOB
*info
,
2228 [out,ref] uint32
*needed
,
2229 [out,ref] uint32
*count
2231 [public,noopnum
,noprint
] void __spoolss_EnumMonitors
(
2234 [out,switch_is(level
)] spoolss_MonitorInfo info
[count
]
2236 [nopull
,nopush
] WERROR spoolss_EnumMonitors
(
2237 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2239 [in,unique] DATA_BLOB
*buffer
,
2240 [in] uint32 offered
,
2241 [out,ref] uint32
*count
,
2242 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_MonitorInfo
**info
,
2243 [out,ref] uint32
*needed
2246 /******************/
2247 /* Function: 0x25 */
2248 WERROR spoolss_AddPort
(
2249 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
2250 [in] uint32 unknown
,
2251 [in] [string,charset
(UTF16
)] uint16 monitor_name
[]
2254 /******************/
2255 /* Function: 0x26 */
2256 [todo
] WERROR spoolss_ConfigurePort
(
2259 /******************/
2260 /* Function: 0x27 */
2261 [todo
] WERROR spoolss_DeletePort
(
2264 /******************/
2265 /* Function: 0x28 */
2266 WERROR spoolss_CreatePrinterIC
(
2267 [in,ref] policy_handle
*handle,
2268 [out,ref] policy_handle
*gdi_handle
,
2269 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
2272 /******************/
2273 /* Function: 0x29 */
2274 [todo
] WERROR spoolss_PlayGDIScriptOnPrinterIC
(
2277 /******************/
2278 /* Function: 0x2a */
2279 WERROR spoolss_DeletePrinterIC
(
2280 [in,out,ref] policy_handle
*gdi_handle
2283 /******************/
2284 /* Function: 0x2b */
2285 [todo
] WERROR spoolss_AddPrinterConnection
(
2288 /******************/
2289 /* Function: 0x2c */
2290 [todo
] WERROR spoolss_DeletePrinterConnection
(
2293 /******************/
2294 /* Function: 0x2d */
2295 [todo
] WERROR spoolss_PrinterMessageBox
(
2296 /* Marked as obsolete in MSDN. "Not necessary and has
2300 /******************/
2301 /* Function: 0x2e */
2302 [todo
] WERROR spoolss_AddMonitor
(
2305 /******************/
2306 /* Function: 0x2f */
2307 [todo
] WERROR spoolss_DeleteMonitor
(
2310 /******************/
2311 /* Function: 0x30 */
2312 [todo
] WERROR spoolss_DeletePrintProcessor
(
2315 /******************/
2316 /* Function: 0x31 */
2317 [todo
] WERROR spoolss_AddPrintProvidor
(
2320 /******************/
2321 /* Function: 0x32 */
2322 [todo
] WERROR spoolss_DeletePrintProvidor
(
2325 /******************/
2326 /* Function: 0x33 */
2328 typedef [public,gensize
] struct {
2329 [relative
] nstring
*name_array
;
2330 } spoolss_PrintProcDataTypesInfo1
;
2332 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2333 [case(1)] spoolss_PrintProcDataTypesInfo1 info1
;
2335 } spoolss_PrintProcDataTypesInfo
;
2337 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrintProcDataTypes
(
2338 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2339 [in,unique] [string,charset
(UTF16
)] uint16
*print_processor_name
,
2341 [in,unique] DATA_BLOB
*buffer
,
2342 [in] uint32 offered
,
2343 [out,unique] DATA_BLOB
*info
,
2344 [out,ref] uint32
*needed
,
2345 [out,ref] uint32
*count
2347 [public,noopnum
,noprint
] void __spoolss_EnumPrintProcDataTypes
(
2350 [out,switch_is(level
)] spoolss_PrintProcDataTypesInfo info
[count
]
2352 [nopull
,nopush
] WERROR spoolss_EnumPrintProcDataTypes
(
2353 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2354 [in,unique] [string,charset
(UTF16
)] uint16
*print_processor_name
,
2356 [in,unique] DATA_BLOB
*buffer
,
2357 [in] uint32 offered
,
2358 [out,ref] uint32
*count
,
2359 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrintProcDataTypesInfo
**info
,
2360 [out,ref] uint32
*needed
2363 /******************/
2364 /* Function: 0x34 */
2365 WERROR spoolss_ResetPrinter
(
2366 [in,ref] policy_handle
*handle,
2367 [in,unique] [string,charset
(UTF16
)] uint16
*data_type
,
2368 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
2371 /******************/
2372 /* Function: 0x35 */
2373 WERROR spoolss_GetPrinterDriver2
(
2374 [in,ref] policy_handle
*handle,
2375 [in,unique] [string,charset
(UTF16
)] uint16
*architecture
,
2377 [in,unique] DATA_BLOB
*buffer
,
2378 [in] uint32 offered
,
2379 [in] uint32 client_major_version
,
2380 [in] uint32 client_minor_version
,
2381 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverInfo
*info
,
2382 [out,ref] uint32
*needed
,
2383 [out,ref] uint32
*server_major_version
,
2384 [out,ref] uint32
*server_minor_version
2387 /******************/
2388 /* Function: 0x36 */
2389 [todo
] WERROR spoolss_FindFirstPrinterChangeNotification
(
2392 /******************/
2393 /* Function: 0x37 */
2394 [todo
] WERROR spoolss_FindNextPrinterChangeNotification
(
2397 /******************/
2398 /* Function: 0x38 */
2399 [public] WERROR spoolss_FindClosePrinterNotify
(
2400 [in,ref] policy_handle
*handle
2403 /******************/
2404 /* Function: 0x39 */
2405 [todo
] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld
(
2408 /******************/
2409 /* Function: 0x3a */
2410 [public] WERROR spoolss_ReplyOpenPrinter
(
2411 [in,string,charset
(UTF16
)] uint16 server_name
[],
2412 [in] uint32 printer_local
,
2413 [in] winreg_Type type
,
2414 [in,range(0,512)] uint32 bufsize
,
2415 [in,unique,size_is(bufsize
)] uint8
*buffer
,
2416 [out,ref] policy_handle
*handle
2419 /******************/
2420 /* Function: 0x3b */
2422 typedef [bitmap32bit
] bitmap
{
2423 PRINTER_CHANGE_ADD_PRINTER
= 0x00000001,
2424 PRINTER_CHANGE_SET_PRINTER
= 0x00000002,
2425 PRINTER_CHANGE_DELETE_PRINTER
= 0x00000004,
2426 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER
= 0x00000008,
2427 PRINTER_CHANGE_ADD_JOB
= 0x00000100,
2428 PRINTER_CHANGE_SET_JOB
= 0x00000200,
2429 PRINTER_CHANGE_DELETE_JOB
= 0x00000400,
2430 PRINTER_CHANGE_WRITE_JOB
= 0x00000800,
2431 PRINTER_CHANGE_ADD_FORM
= 0x00010000,
2432 PRINTER_CHANGE_SET_FORM
= 0x00020000,
2433 PRINTER_CHANGE_DELETE_FORM
= 0x00040000,
2434 PRINTER_CHANGE_ADD_PORT
= 0x00100000,
2435 PRINTER_CHANGE_CONFIGURE_PORT
= 0x00200000,
2436 PRINTER_CHANGE_DELETE_PORT
= 0x00400000,
2437 PRINTER_CHANGE_ADD_PRINT_PROCESSOR
= 0x01000000,
2438 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR
= 0x04000000,
2439 PRINTER_CHANGE_SERVER
= 0x08000000,
2440 PRINTER_CHANGE_ADD_PRINTER_DRIVER
= 0x10000000,
2441 PRINTER_CHANGE_SET_PRINTER_DRIVER
= 0x20000000,
2442 PRINTER_CHANGE_DELETE_PRINTER_DRIVER
= 0x40000000,
2443 PRINTER_CHANGE_TIMEOUT
= 0x80000000
2444 } spoolss_PrinterChangeFlags
;
2446 const int PRINTER_CHANGE_PRINTER
= 0x000000FF;
2448 const int PRINTER_CHANGE_JOB
= 0x0000FF00;
2450 const int PRINTER_CHANGE_FORM
= (PRINTER_CHANGE_ADD_FORM |
2451 PRINTER_CHANGE_SET_FORM |
2452 PRINTER_CHANGE_DELETE_FORM
); /* 0x00070000 */
2454 const int PRINTER_CHANGE_PORT
= (PRINTER_CHANGE_ADD_PORT |
2455 PRINTER_CHANGE_CONFIGURE_PORT |
2456 PRINTER_CHANGE_DELETE_PORT
); /* 0x00700000 */
2458 const int PRINTER_CHANGE_PRINT_PROCESSOR
= 0x07000000;
2460 const int PRINTER_CHANGE_PRINTER_DRIVER
= (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
2461 PRINTER_CHANGE_SET_PRINTER_DRIVER |
2462 PRINTER_CHANGE_DELETE_PRINTER_DRIVER
); /* 0x70000000 */
2464 const int PRINTER_CHANGE_ALL
= (PRINTER_CHANGE_PRINTER |
2465 PRINTER_CHANGE_JOB |
2466 PRINTER_CHANGE_FORM |
2467 PRINTER_CHANGE_PORT |
2468 PRINTER_CHANGE_PRINT_PROCESSOR |
2469 PRINTER_CHANGE_PRINTER_DRIVER
); /* 0x7777FFFF */
2470 WERROR spoolss_RouterReplyPrinter
(
2471 [in,ref] policy_handle
*handle,
2472 [in] spoolss_PrinterChangeFlags flags
,
2473 [in,range(0,512)] uint32 bufsize
,
2474 [in,unique,size_is(bufsize
)] uint8
*buffer
2477 /******************/
2478 /* Function: 0x3c */
2479 [public] WERROR spoolss_ReplyClosePrinter
(
2480 [in,out,ref] policy_handle
*handle
2483 /******************/
2484 /* Function: 0x3d */
2485 [todo
] WERROR spoolss_AddPortEx
(
2488 /******************/
2489 /* Function: 0x3e */
2490 [todo
] WERROR spoolss_RouterFindFirstPrinterChangeNotification
(
2493 /******************/
2494 /* Function: 0x3f */
2495 [todo
] WERROR spoolss_SpoolerInit
(
2498 /******************/
2499 /* Function: 0x40 */
2500 [todo
] WERROR spoolss_ResetPrinterEx
(
2503 typedef [enum16bit
,public] enum {
2504 JOB_NOTIFY_FIELD_PRINTER_NAME
= 0x00,
2505 JOB_NOTIFY_FIELD_MACHINE_NAME
= 0x01,
2506 JOB_NOTIFY_FIELD_PORT_NAME
= 0x02,
2507 JOB_NOTIFY_FIELD_USER_NAME
= 0x03,
2508 JOB_NOTIFY_FIELD_NOTIFY_NAME
= 0x04,
2509 JOB_NOTIFY_FIELD_DATATYPE
= 0x05,
2510 JOB_NOTIFY_FIELD_PRINT_PROCESSOR
= 0x06,
2511 JOB_NOTIFY_FIELD_PARAMETERS
= 0x07,
2512 JOB_NOTIFY_FIELD_DRIVER_NAME
= 0x08,
2513 JOB_NOTIFY_FIELD_DEVMODE
= 0x09,
2514 JOB_NOTIFY_FIELD_STATUS
= 0x0a,
2515 JOB_NOTIFY_FIELD_STATUS_STRING
= 0x0b,
2516 JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR
= 0x0c,
2517 JOB_NOTIFY_FIELD_DOCUMENT
= 0x0d,
2518 JOB_NOTIFY_FIELD_PRIORITY
= 0x0e,
2519 JOB_NOTIFY_FIELD_POSITION
= 0x0f,
2520 JOB_NOTIFY_FIELD_SUBMITTED
= 0x10,
2521 JOB_NOTIFY_FIELD_START_TIME
= 0x11,
2522 JOB_NOTIFY_FIELD_UNTIL_TIME
= 0x12,
2523 JOB_NOTIFY_FIELD_TIME
= 0x13,
2524 JOB_NOTIFY_FIELD_TOTAL_PAGES
= 0x14,
2525 JOB_NOTIFY_FIELD_PAGES_PRINTED
= 0x15,
2526 JOB_NOTIFY_FIELD_TOTAL_BYTES
= 0x16,
2527 JOB_NOTIFY_FIELD_BYTES_PRINTED
= 0x17
2528 } spoolss_JobNotifyField
;
2530 typedef [enum16bit
,public] enum {
2531 PRINTER_NOTIFY_FIELD_SERVER_NAME
= 0x00,
2532 PRINTER_NOTIFY_FIELD_PRINTER_NAME
= 0x01,
2533 PRINTER_NOTIFY_FIELD_SHARE_NAME
= 0x02,
2534 PRINTER_NOTIFY_FIELD_PORT_NAME
= 0x03,
2535 PRINTER_NOTIFY_FIELD_DRIVER_NAME
= 0x04,
2536 PRINTER_NOTIFY_FIELD_COMMENT
= 0x05,
2537 PRINTER_NOTIFY_FIELD_LOCATION
= 0x06,
2538 PRINTER_NOTIFY_FIELD_DEVMODE
= 0x07,
2539 PRINTER_NOTIFY_FIELD_SEPFILE
= 0x08,
2540 PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR
= 0x09,
2541 PRINTER_NOTIFY_FIELD_PARAMETERS
= 0x0a,
2542 PRINTER_NOTIFY_FIELD_DATATYPE
= 0x0b,
2543 PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR
= 0x0c,
2544 PRINTER_NOTIFY_FIELD_ATTRIBUTES
= 0x0d,
2545 PRINTER_NOTIFY_FIELD_PRIORITY
= 0x0e,
2546 PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY
= 0x0f,
2547 PRINTER_NOTIFY_FIELD_START_TIME
= 0x10,
2548 PRINTER_NOTIFY_FIELD_UNTIL_TIME
= 0x11,
2549 PRINTER_NOTIFY_FIELD_STATUS
= 0x12,
2550 PRINTER_NOTIFY_FIELD_STATUS_STRING
= 0x13,
2551 PRINTER_NOTIFY_FIELD_CJOBS
= 0x14,
2552 PRINTER_NOTIFY_FIELD_AVERAGE_PPM
= 0x15,
2553 PRINTER_NOTIFY_FIELD_TOTAL_PAGES
= 0x16,
2554 PRINTER_NOTIFY_FIELD_PAGES_PRINTED
= 0x17,
2555 PRINTER_NOTIFY_FIELD_TOTAL_BYTES
= 0x18,
2556 PRINTER_NOTIFY_FIELD_BYTES_PRINTED
= 0x19,
2557 PRINTER_NOTIFY_FIELD_OBJECT_GUID
= 0x1a,
2558 PRINTER_NOTIFY_FIELD_FRIENDLY_NAME
= 0x1b
2559 } spoolss_PrintNotifyField
;
2561 typedef [enum16bit
] enum {
2562 PRINTER_NOTIFY_TYPE
= 0x00,
2563 JOB_NOTIFY_TYPE
= 0x01
2564 } spoolss_NotifyType
;
2566 typedef [nodiscriminant
,noprint
] union {
2567 [case(PRINTER_NOTIFY_TYPE
)] uint16 field
;
2568 [case(JOB_NOTIFY_TYPE
)] uint16 field
;
2569 [default] uint16 field
;
2572 /******************/
2573 /* Function: 0x41 */
2575 spoolss_NotifyType type
;
2580 [size_is(count
),switch_is(type
)] spoolss_Field
*fields
;
2581 } spoolss_NotifyOptionType
;
2583 typedef [bitmap32bit
] bitmap
{
2584 PRINTER_NOTIFY_OPTIONS_REFRESH
= 0x00000001
2585 } spoolssNotifyOptionFlags
;
2588 [value
(2)] uint32
version;
2589 spoolssNotifyOptionFlags flags
;
2591 [size_is(count
)] spoolss_NotifyOptionType
*types
;
2592 } spoolss_NotifyOption
;
2594 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx
(
2595 [in,ref] policy_handle
*handle,
2596 [in] spoolss_PrinterChangeFlags flags
,
2597 [in] uint32 options
,
2598 [in,unique] [string,charset
(UTF16
)] uint16
*local_machine
,
2599 [in] uint32 printer_local
,
2600 [in,unique] spoolss_NotifyOption
*notify_options
2603 /******************/
2604 /* Function: 0x42 */
2608 [size_is(size
/2),unique,charset
(UTF16
)] uint16
*string;
2609 } spoolss_NotifyString
;
2611 typedef [v1_enum] enum {
2612 NOTIFY_TABLE_DWORD
= 0x0001,
2613 NOTIFY_TABLE_STRING
= 0x0002,
2614 NOTIFY_TABLE_DEVMODE
= 0x0003,
2615 NOTIFY_TABLE_TIME
= 0x0004,
2616 NOTIFY_TABLE_SECURITYDESCRIPTOR
= 0x0005
2617 } spoolss_NotifyTable
;
2619 typedef [switch_type(uint32
)] union {
2620 [case(1)] uint32 integer
[2];
2621 [case(2)] spoolss_NotifyString
string;
2622 [case(3)] spoolss_DevmodeContainer devmode
;
2623 [case(4)] spoolss_TimeCtr time
;
2624 [case(5)] sec_desc_buf sd
;
2625 } spoolss_NotifyData
;
2628 spoolss_NotifyType type
;
2629 [switch_is(type
)] spoolss_Field field
;
2630 spoolss_NotifyTable variable_type
;
2632 [switch_is(variable_type
)] spoolss_NotifyData data
;
2636 [value
(2)] uint32
version;
2639 [size_is(count
)] spoolss_Notify notifies
[];
2640 } spoolss_NotifyInfo
;
2642 typedef [switch_type(uint32
)] union {
2643 [case(0)] spoolss_NotifyInfo
*info0
;
2644 } spoolss_ReplyPrinterInfo
;
2646 typedef [bitmap32bit
] bitmap
{
2647 PRINTER_NOTIFY_INFO_DISCARDED
= 0x00000001,
2648 PRINTER_NOTIFY_INFO_DISCARDNOTED
= 0x00010000,
2649 PRINTER_NOTIFY_INFO_COLOR_MISMATCH
= 0x00080000
2650 } spoolss_PrinterNotifyFlags
;
2652 WERROR spoolss_RouterReplyPrinterEx
(
2653 [in,ref] policy_handle
*handle,
2655 [in] spoolss_PrinterChangeFlags flags
,
2656 [out,ref] spoolss_PrinterNotifyFlags
*reply_result
,
2657 [in] uint32 reply_type
,
2658 [in,switch_is(reply_type
)] spoolss_ReplyPrinterInfo info
2661 /******************/
2662 /* Function: 0x43 */
2663 [public] WERROR spoolss_RouterRefreshPrinterChangeNotify
(
2664 [in,ref] policy_handle
*handle,
2665 [in] uint32 change_low
,
2666 [in,unique] spoolss_NotifyOption
*options
,
2667 [out,ref] spoolss_NotifyInfo
**info
2670 /******************/
2671 /* Function: 0x44 */
2672 [todo
] WERROR spoolss_44
(
2677 [string,charset
(UTF16
)] uint16
*client
;
2678 [string,charset
(UTF16
)] uint16
*user
;
2680 spoolss_MajorVersion major
;
2681 spoolss_MinorVersion minor
;
2682 spoolss_ProcessorArchitecture processor
;
2683 } spoolss_UserLevel1
;
2687 } spoolss_UserLevel2
;
2693 [string,charset
(UTF16
)] uint16
*client
;
2694 [string,charset
(UTF16
)] uint16
*user
;
2696 spoolss_MajorVersion major
;
2697 spoolss_MinorVersion minor
;
2698 spoolss_ProcessorArchitecture processor
;
2700 } spoolss_UserLevel3
;
2702 typedef [switch_type(uint32
)] union {
2703 [case(1)] spoolss_UserLevel1
*level1
;
2704 [case(2)] spoolss_UserLevel2
*level2
;
2705 [case(3)] spoolss_UserLevel3
*level3
;
2706 } spoolss_UserLevel
;
2710 [switch_is(level
)] spoolss_UserLevel user_info
;
2711 } spoolss_UserLevelCtr
;
2714 SERVER_ACCESS_ADMINISTER
= 0x00000001,
2715 SERVER_ACCESS_ENUMERATE
= 0x00000002,
2716 PRINTER_ACCESS_ADMINISTER
= 0x00000004,
2717 PRINTER_ACCESS_USE
= 0x00000008,
2718 JOB_ACCESS_ADMINISTER
= 0x00000010,
2719 JOB_ACCESS_READ
= 0x00000020
2720 } spoolss_AccessRights
;
2722 /* Access rights for print servers */
2723 const int SERVER_ALL_ACCESS
= SEC_STD_REQUIRED |
2724 SERVER_ACCESS_ADMINISTER |
2725 SERVER_ACCESS_ENUMERATE
;
2727 const int SERVER_READ
= SEC_STD_READ_CONTROL |
2728 SERVER_ACCESS_ENUMERATE
;
2730 const int SERVER_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2731 SERVER_ACCESS_ADMINISTER |
2732 SERVER_ACCESS_ENUMERATE
;
2734 const int SERVER_EXECUTE
= SEC_STD_READ_CONTROL |
2735 SERVER_ACCESS_ENUMERATE
;
2737 /* Access rights for printers */
2738 const int PRINTER_ALL_ACCESS
= SEC_STD_REQUIRED |
2739 PRINTER_ACCESS_ADMINISTER |
2742 const int PRINTER_READ
= SEC_STD_READ_CONTROL |
2745 const int PRINTER_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2748 const int PRINTER_EXECUTE
= SEC_STD_READ_CONTROL |
2751 /* Access rights for jobs */
2752 const int JOB_ALL_ACCESS
= SEC_STD_REQUIRED |
2753 JOB_ACCESS_ADMINISTER
;
2755 const int JOB_READ
= SEC_STD_READ_CONTROL |
2756 JOB_ACCESS_ADMINISTER
;
2758 const int JOB_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2759 JOB_ACCESS_ADMINISTER
;
2761 const int JOB_EXECUTE
= SEC_STD_READ_CONTROL |
2762 JOB_ACCESS_ADMINISTER
;
2764 /* ACE masks for various print permissions */
2765 const int PRINTER_ACE_FULL_CONTROL
= SEC_GENERIC_ALL |
2768 const int PRINTER_ACE_MANAGE_DOCUMENTS
= SEC_GENERIC_ALL |
2769 READ_CONTROL_ACCESS
;
2771 const int PRINTER_ACE_PRINT
= GENERIC_EXECUTE_ACCESS |
2772 READ_CONTROL_ACCESS |
2775 /******************/
2776 /* Function: 0x45 */
2777 [public] WERROR spoolss_OpenPrinterEx
(
2778 [in,unique] [string,charset
(UTF16
)] uint16
*printername
,
2779 [in,unique] [string,charset
(UTF16
)] uint16
*datatype
,
2780 [in] spoolss_DevmodeContainer devmode_ctr
,
2781 [in] spoolss_AccessRights access_mask
,
2783 [in,switch_is(level
)] spoolss_UserLevel userlevel
,
2784 [out,ref] policy_handle
*handle
2787 /******************/
2788 /* Function: 0x46 */
2789 WERROR spoolss_AddPrinterEx
(
2790 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
2791 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
2792 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
2793 [in,ref] sec_desc_buf
*secdesc_ctr
,
2794 [in,ref] spoolss_UserLevelCtr
*userlevel_ctr
,
2795 [out,ref] policy_handle
*handle
2798 /******************/
2799 /* Function: 0x47 */
2800 [todo
] WERROR spoolss_47
(
2803 /******************/
2804 /* Function: 0x48 */
2805 WERROR spoolss_EnumPrinterData
(
2806 [in,ref] policy_handle
*handle,
2807 [in] uint32 enum_index
,
2808 [out,size_is(value_offered
/2),charset
(UTF16
)] uint16 value_name
[],
2809 [in] uint32 value_offered
,
2810 [out,ref] uint32
*value_needed
,
2811 [out,ref] winreg_Type
*type
,
2812 [out,ref,size_is(data_offered
),flag
(LIBNDR_PRINT_ARRAY_HEX
)] uint8
*data
,
2813 [in] uint32 data_offered
,
2814 [out,ref] uint32
*data_needed
2817 /******************/
2818 /* Function: 0x49 */
2819 WERROR spoolss_DeletePrinterData
(
2820 [in,ref] policy_handle
*handle,
2821 [in] [string,charset
(UTF16
)] uint16 value_name
[]
2824 /******************/
2825 /* Function: 0x4a */
2826 [todo
] WERROR spoolss_4a
(
2829 /******************/
2830 /* Function: 0x4b */
2831 [todo
] WERROR spoolss_4b
(
2834 /******************/
2835 /* Function: 0x4c */
2836 [todo
] WERROR spoolss_4c
(
2839 /******************/
2840 /* Function: 0x4d */
2841 WERROR spoolss_SetPrinterDataEx
(
2842 [in,ref] policy_handle
*handle,
2843 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2844 [in] [string,charset
(UTF16
)] uint16 value_name
[],
2845 [in] winreg_Type type
,
2846 [in,ref] [size_is(offered
)] uint8
*data
,
2850 /******************/
2851 /* Function: 0x4e */
2852 [noopnum
,noprint
,public] WERROR _spoolss_GetPrinterDataEx
(
2853 [in,ref] policy_handle
*handle,
2854 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2855 [in] [string,charset
(UTF16
)] uint16 value_name
[],
2856 [in] uint32 offered
,
2857 [out,ref] winreg_Type
*type
,
2858 [out,ref] DATA_BLOB
*data
,
2859 [out,ref] uint32
*needed
2861 [noopnum
,noprint
,public] void __spoolss_GetPrinterDataEx
(
2862 [in] winreg_Type type
,
2863 [out,ref,switch_is(type
)] spoolss_PrinterData
*data
2865 [nopull
,nopush
,public] WERROR spoolss_GetPrinterDataEx
(
2866 [in,ref] policy_handle
*handle,
2867 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2868 [in] [string,charset
(UTF16
)] uint16 value_name
[],
2869 [in] uint32 offered
,
2870 [out,ref] winreg_Type
*type
,
2871 [out,ref,subcontext
(4),subcontext_size
(offered
),switch_is(*type
)] spoolss_PrinterData
*data
,
2872 [out,ref] uint32
*needed
2875 /******************/
2876 /* Function: 0x4f */
2878 typedef [relative_base
,public,gensize
] struct {
2879 [relative
] nstring
*value_name
;
2880 [value
(2*strlen_m_term
(value_name
))] uint32 value_name_len
;
2882 [relative
,switch_is(type
),subcontext
(0),subcontext_size
(r
->data_length
)] spoolss_PrinterData
*data
;
2883 [value
(ndr_size_spoolss_PrinterData
(data
, type
, ndr
->iconv_convenience
, ndr
->flags
))] uint32 data_length
;
2884 } spoolss_PrinterEnumValues
;
2886 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinterDataEx
(
2887 [in,ref] policy_handle
*handle,
2888 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2889 [out] DATA_BLOB info
,
2890 [in] uint32 offered
,
2891 [out,ref] uint32
*needed
,
2892 [out,ref] uint32
*count
2894 [public,noopnum
,noprint
] void __spoolss_EnumPrinterDataEx
(
2896 [out] spoolss_PrinterEnumValues info
[count
]
2898 [nopull
,nopush
] WERROR spoolss_EnumPrinterDataEx
(
2899 [in,ref] policy_handle
*handle,
2900 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2901 [in] uint32 offered
,
2902 [out,ref] uint32
*count
,
2903 [out,ref,size_is(,*count
)] spoolss_PrinterEnumValues
**info
,
2904 [out,ref] uint32
*needed
2907 typedef [nodiscriminant
] union {
2910 [default] nstring_array string_array
;
2913 /******************/
2914 /* Function: 0x50 */
2915 [public] WERROR spoolss_EnumPrinterKey
(
2916 [in, ref] policy_handle
*handle,
2917 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2918 [out,ref] uint32
*_ndr_size
,
2919 [out,ref,subcontext
(0),subcontext_size
(*_ndr_size
*2),switch_is(*_ndr_size
)] spoolss_KeyNames
*key_buffer
,
2920 [in] uint32 offered
,
2921 [out,ref] uint32
*needed
2924 /******************/
2925 /* Function: 0x51 */
2926 WERROR spoolss_DeletePrinterDataEx
(
2927 [in,ref] policy_handle
*handle,
2928 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2929 [in] [string,charset
(UTF16
)] uint16 value_name
[]
2932 /******************/
2933 /* Function: 0x52 */
2934 WERROR spoolss_DeletePrinterKey
(
2935 [in,ref] policy_handle
*handle,
2936 [in] [string,charset
(UTF16
)] uint16 key_name
[]
2939 /******************/
2940 /* Function: 0x53 */
2941 [todo
] WERROR spoolss_53
(
2944 /******************/
2945 /* Function: 0x54 */
2946 typedef [public,bitmap32bit
] bitmap
{
2947 DPD_DELETE_UNUSED_FILES
= 0x00000001,
2948 DPD_DELETE_SPECIFIC_VERSION
= 0x00000002,
2949 DPD_DELETE_ALL_FILES
= 0x00000004
2950 } spoolss_DeleteDriverFlags
;
2952 WERROR spoolss_DeletePrinterDriverEx
(
2953 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
2954 [in] [string,charset
(UTF16
)] uint16 architecture
[],
2955 [in] [string,charset
(UTF16
)] uint16 driver
[],
2956 [in] spoolss_DeleteDriverFlags delete_flags
,
2960 /******************/
2961 /* Function: 0x55 */
2962 [todo
] WERROR spoolss_55
(
2965 /******************/
2966 /* Function: 0x56 */
2967 [todo
] WERROR spoolss_56
(
2970 /******************/
2971 /* Function: 0x57 */
2972 [todo
] WERROR spoolss_57
(
2975 /******************/
2976 /* Function: 0x58 */
2978 typedef [v1_enum] enum {
2979 PROTOCOL_RAWTCP_TYPE
= 1,
2980 PROTOCOL_LPR_TYPE
= 2
2981 } spoolss_PortProtocol
;
2983 typedef [public] struct {
2984 [charset
(UTF16
)] uint16 portname
[64];
2985 [value
(0x00000001)] uint32
version;
2986 spoolss_PortProtocol protocol
;
2987 [value
(sizeof
(r
))] uint32 size
;
2989 [charset
(UTF16
)] uint16 hostaddress
[49];
2990 [charset
(UTF16
)] uint16 snmpcommunity
[33];
2992 [charset
(UTF16
)] uint16 queue
[33];
2993 [charset
(UTF16
)] uint16 ip_address
[16]; /* s3 had 17 */
2994 [charset
(UTF16
)] uint16 hardware_address
[13];
2995 [charset
(UTF16
)] uint16 device_type
[257];
2997 boolean32 snmp_enabled
;
2998 uint32 snmp_dev_index
;
2999 } spoolss_PortData1
;
3001 typedef [public] struct {
3002 [charset
(UTF16
)] uint16 portname
[64];
3003 [value
(0x00000002)] uint32
version;
3004 spoolss_PortProtocol protocol
;
3005 [value
(sizeof
(r
))] uint32 size
;
3007 [charset
(UTF16
)] uint16 hostaddress
[128];
3008 [charset
(UTF16
)] uint16 snmpcommunity
[33];
3010 [charset
(UTF16
)] uint16 queue
[33];
3011 [charset
(UTF16
)] uint16 device_type
[257];
3013 boolean32 snmp_enabled
;
3014 uint32 snmp_dev_index
;
3015 uint32 port_monitor_mib_index
;
3016 } spoolss_PortData2
;
3018 typedef [public] struct {
3020 } spoolss_MonitorUi
;
3022 WERROR spoolss_XcvData
(
3023 [in,ref] policy_handle
*handle,
3024 [in] [string,charset
(UTF16
)] uint16 function_name
[],
3025 [in] DATA_BLOB in_data
,
3026 [in,value
(r
->in.in_data.length
)] uint32 _in_data_length
,
3027 [out,ref] [size_is(out_data_size
)] uint8
*out_data
,
3028 [in] uint32 out_data_size
,
3029 [out,ref] uint32
*needed
,
3030 [in,out,ref] uint32
*status_code
3033 /******************/
3034 /* Function: 0x59 */
3036 typedef [bitmap32bit
] bitmap
{
3037 APD_STRICT_UPGRADE
= 0x00000001,
3038 APD_STRICT_DOWNGRADE
= 0x00000002,
3039 APD_COPY_ALL_FILES
= 0x00000004,
3040 APD_COPY_NEW_FILES
= 0x00000008,
3041 APD_COPY_FROM_DIRECTORY
= 0x00000010,
3042 APD_DONT_COPY_FILES_TO_CLUSTER
= 0x00001000,
3043 APD_COPY_TO_ALL_SPOOLERS
= 0x00002000,
3044 APD_RETURN_BLOCKING_STATUS_CODE
= 0x00010000
3045 } spoolss_AddPrinterDriverExFlags
;
3047 [public] WERROR spoolss_AddPrinterDriverEx
(
3048 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3049 [in,ref] spoolss_AddDriverInfoCtr
*info_ctr
,
3050 [in] spoolss_AddPrinterDriverExFlags flags
3053 /******************/
3054 /* Function: 0x5a */
3055 [todo
] WERROR spoolss_5a
(
3058 /******************/
3059 /* Function: 0x5b */
3060 [todo
] WERROR spoolss_5b
(
3063 /******************/
3064 /* Function: 0x5c */
3065 [todo
] WERROR spoolss_5c
(
3068 /******************/
3069 /* Function: 0x5d */
3070 [todo
] WERROR spoolss_5d
(
3073 /******************/
3074 /* Function: 0x5e */
3075 [todo
] WERROR spoolss_5e
(
3078 /******************/
3079 /* Function: 0x5f */
3080 [todo
] WERROR spoolss_5f
(
3083 /******************/
3084 /* Function: 0x60 */
3085 [todo
] WERROR spoolss_60
(
3088 /******************/
3089 /* Function: 0x61 */
3090 [todo
] WERROR spoolss_61
(
3093 /******************/
3094 /* Function: 0x62 */
3095 [todo
] WERROR spoolss_62
(
3098 /******************/
3099 /* Function: 0x63 */
3100 [todo
] WERROR spoolss_63
(
3103 /******************/
3104 /* Function: 0x64 */
3105 [todo
] WERROR spoolss_64
(
3108 /******************/
3109 /* Function: 0x65 */
3110 [todo
] WERROR spoolss_65
(
3113 /******************/
3114 /* Function: 0x66 */
3116 GUID core_driver_guid
;
3118 hyper driver_version
;
3119 [charset
(UTF8
)] uint8 formname
[520];
3120 } spoolss_CorePrinterDriver
;
3122 WERROR spoolss_GetCorePrinterDrivers
(
3123 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3124 [in,ref] [string,charset
(UTF16
)] uint16
*architecture
,
3125 [in] uint32 core_driver_size
,
3126 [in,size_is(core_driver_size
)] [charset
(UTF16
)] uint16
*core_driver_dependencies
,
3127 [in] uint32 core_printer_driver_count
,
3128 [out,size_is(core_printer_driver_count
)] spoolss_CorePrinterDriver
*core_printer_drivers
3131 /******************/
3132 /* Function: 0x67 */
3133 [todo
] WERROR spoolss_67
(
3136 /******************/
3137 /* Function: 0x68 */
3138 WERROR spoolss_GetPrinterDriverPackagePath
(
3139 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3140 [in,ref] [string,charset
(UTF16
)] uint16
*architecture
,
3141 [in,unique] [string,charset
(UTF16
)] uint16
*language
,
3142 [in,ref] [string,charset
(UTF16
)] uint16
*package_id
,
3143 [in,out,unique,size_is(driver_package_cab_size
)] [charset
(UTF16
)] uint16
*driver_package_cab
,
3144 [in] uint32 driver_package_cab_size
,
3145 [out,ref] uint32
*required
3148 /******************/
3149 /* Function: 0x69 */
3150 [todo
] WERROR spoolss_69
(
3153 /******************/
3154 /* Function: 0x6a */
3155 [todo
] WERROR spoolss_6a
(
3158 /******************/
3159 /* Function: 0x6b */
3160 [todo
] WERROR spoolss_6b
(
3163 /******************/
3164 /* Function: 0x6c */
3165 [todo
] WERROR spoolss_6c
(
3168 /******************/
3169 /* Function: 0x6d */
3170 [todo
] WERROR spoolss_6d
(