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
,noprint
] struct {
32 [value
(ndr_size_spoolss_Time
(time
, 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 [v1_enum] enum {
123 SPOOLSS_DEBUGGING_BUILD
= 0x00000000,
124 SPOOLSS_RELEASE_BUILD
= 0x00000001
127 typedef [public,gensize
] struct {
128 [relative
] nstring
*printername
;
129 [relative
] nstring
*servername
;
134 uint32 global_counter
;
137 spoolss_Build free_build
;
140 uint32 session_counter
;
141 uint32 num_error_out_of_paper
;
142 uint32 num_error_not_ready
;
143 spoolss_JobStatus job_error
;
144 uint32 number_of_processors
;
145 spoolss_ProcessorType processor_type
;
146 uint32 high_part_total_bytes
;
149 spoolss_PrinterStatus status
;
150 uint32 enumerate_network_printers
;
152 spoolss_ProcessorArchitecture processor_architecture
;
153 uint16 processor_level
;
157 } spoolss_PrinterInfo0
;
159 /* Device Mode Extra Data */
161 typedef [v1_enum] enum {
162 SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
= 0x554e4944, /* 0x44494e55 */
163 SPOOLSS_DM_SIGNATURE_JTEXP
= 0x4a544d53, /* 0x534d544a */
164 SPOOLSS_DM_SIGNATURE_PSEXTRA
= 0x50524956 /* 0x56495250 */
165 } spoolss_DM_Signature
;
167 typedef [v1_enum] enum {
168 SPOOLSS_DM_LAYOUT_NUP_DISABLED
= 0x00000000,
169 SPOOLSS_DM_LAYOUT_NUP_2
= 0x00000001,
170 SPOOLSS_DM_LAYOUT_NUP_4
= 0x00000002,
171 SPOOLSS_DM_LAYOUT_NUP_6
= 0x00000003,
172 SPOOLSS_DM_LAYOUT_NUP_9
= 0x00000004,
173 SPOOLSS_DM_LAYOUT_NUP_16
= 0x00000005,
174 SPOOLSS_DM_LAYOUT_BOOKLET
= 0x00000006
177 typedef [v1_enum] enum {
178 SPOOLSS_DM_NUP_DIRECTION_L2R_T2B
= 0x00000001,
179 SPOOLSS_DM_NUP_DIRECTION_T2B_L2R
= 0x00000002,
180 SPOOLSS_DM_NUP_DIRECTION_R2L_T2B
= 0x00000004,
181 SPOOLSS_DM_NUP_DIRECTION_T2B_R2L
= 0x00000008
182 } spoolss_DM_NupDirection
;
184 typedef [v1_enum] enum {
185 SPOOLSS_DM_NUP_BORDER_PRINT
= 0x00000000,
186 SPOOLSS_DM_NUP_BORDER_NONE
= 0x00000001
187 } spoolss_DM_NupBorderFlags
;
189 typedef [v1_enum] enum {
190 SPOOLSS_DM_BOOKLET_LEFT_FLIP
= 0x00000000,
191 SPOOLSS_DM_BOOKLET_RIGHT_FLIP
= 0x00000001
192 } spoolss_DM_BookletFlags
;
194 /* Device Mode Extra Data: PostScript */
198 typedef [bitmap32bit
] bitmap
{
199 SPOOLSS_DM_PS_FLAGS_DRV_ERROR_HANDLER
= 0x00000002,
200 SPOOLSS_DM_PS_FLAGS_PRINT_MIRROR
= 0x00000004,
201 SPOOLSS_DM_PS_FLAGS_PRINT_NEGATIVE
= 0x00000010,
202 SPOOLSS_DM_PS_FLAGS_COMPRESS_BITMAP
= 0x00000040,
203 SPOOLSS_DM_PS_FLAGS_ROTATE_180
= 0x00000200,
204 SPOOLSS_DM_PS_FLAGS_GDI_METAFILE_SPOOL
= 0x00002000
205 } spoolss_DMPS_Flags
;
208 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
209 spoolss_DMPS_Flags dwFlags
;
210 uint32 wchEPSFile
[12];
211 [value
(24)] uint16 caSize
;
213 uint16 caIlluminantIndex
;
217 uint16 caReferenceBlack
;
218 uint16 caReferenceWhite
;
221 uint16 caColorfulness
;
222 uint16 caRedGreenTint
;
223 } spoolss_PSDRVEXTRA351
;
228 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
229 spoolss_DMPS_Flags dwFlags
;
230 uint32 wchEPSFile
[12];
231 [value
(24)] uint16 caSize
;
233 uint16 caIlluminantIndex
;
237 uint16 caReferenceBlack
;
238 uint16 caReferenceWhite
;
241 uint16 caColorfulness
;
242 uint16 caRedGreenTint
;
245 uint32 aubOptions
[8];
246 } spoolss_PSDRVEXTRA400
;
250 typedef [v1_enum] enum {
251 SPOOLSS_DM_PS_OPTIMIZE_SPEED
= 0x00000000,
252 SPOOLSS_DM_PS_OPTIMIZE_PORTABILITY
= 0x00000001,
253 SPOOLSS_DM_PS_OPTIMIZE_EPS
= 0x00000002,
254 SPOOLSS_DM_PS_OPTIMIZE_ARCHIVAL
= 0x00000003
255 } spoolss_DMPS_Dialect
;
257 typedef [v1_enum] enum {
258 SPOOLSS_DM_PS_TTDLFMT_DEFAULT
= 0x00000000,
259 SPOOLSS_DM_PS_TTDLFMT_TYPE_1
= 0x00000001,
260 SPOOLSS_DM_PS_TTDLFMT_TYPE_3
= 0x00000002,
261 SPOOLSS_DM_PS_TTDLFMT_TYPE_42
= 0x00000003
262 } spoolss_DMPS_TTDLFmt
;
264 typedef [v1_enum] enum {
265 SPOOLSS_DM_PS_PSLEVEL_1
= 0x00000001,
266 SPOOLSS_DM_PS_PSLEVEL_2
= 0x00000002,
267 SPOOLSS_DM_PS_PSLEVEL_3
= 0x00000003
268 } spoolss_DMPS_PSLevel
;
271 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST
= 0x0000,
272 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST
= 0x0001,
273 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST_UPSIDEDOWN
= 0x0002,
274 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST_UPSIDEDOWN
= 0x0003
275 } spoolss_DMPS_FeedDirection
;
278 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
279 spoolss_DMPS_Flags dwFlags
;
280 uint32 wchEPSFile
[12];
281 [value
(24)] uint16 caSize
;
283 uint16 caIlluminantIndex
;
287 uint16 caReferenceBlack
;
288 uint16 caReferenceWhite
;
291 uint16 caColorfulness
;
292 uint16 caRedGreenTint
;
297 spoolss_DMPS_Dialect iDialect
;
298 spoolss_DMPS_TTDLFmt iTTDLFmt
;
299 boolean32 bReversePrint
;
300 spoolss_DM_Layout iLayout
;
301 spoolss_DMPS_PSLevel iPSLevel
;
304 [value
(0x0010)] uint16 wVer
;
307 uint32 dwWidthOffset
;
308 uint32 dwHeightOffset
;
309 spoolss_DMPS_FeedDirection wFeedDirection
;
311 uint32 dwReserved3
[4];
314 uint32 aOptions
[128];
315 } spoolss_PSDRVEXTRA500
;
320 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
321 spoolss_DMPS_Flags dwFlags
;
322 uint32 wchEPSFile
[12];
323 [value
(24)] uint16 caSize
;
325 uint16 caIlluminantIndex
;
329 uint16 caReferenceBlack
;
330 uint16 caReferenceWhite
;
333 uint16 caColorfulness
;
334 uint16 caRedGreenTint
;
335 uint16 wCoreJTExpSize
;
336 [value
(ndr_size_spoolss_PSDRVEXTRA
(r
, ndr
->flags
) + wCoreJTExpSize
)] uint16 wCoreFullSize
;
339 spoolss_DMPS_Dialect iDialect
;
340 spoolss_DMPS_TTDLFmt iTTDLFmt
;
341 boolean32 bReversePrint
;
342 spoolss_DM_Layout iLayout
;
343 spoolss_DMPS_PSLevel iPSLevel
;
346 [value
(0x0010)] uint16 wVer
;
349 uint32 dwWidthOffset
;
350 uint32 dwHeightOffset
;
351 spoolss_DMPS_FeedDirection wFeedDirection
;
353 uint32 dwReserved3
[4];
356 uint32 aOptions
[128];
357 spoolss_DM_NupDirection dwNupDirection
;
358 spoolss_DM_NupBorderFlags dwNupBorderFlags
;
359 spoolss_DM_BookletFlags dwBookletFlags
;
361 } spoolss_PSDRVEXTRA
;
363 /* Device Mode Extra Data: UniDriver */
368 uint16 wReserved
[56];
369 } spoolss_UNIDRVEXTRA3_4
;
373 typedef [v1_enum] enum {
374 SPOOLSS_DM_UNI_QUALITY_BEST
= 0x00000000,
375 SPOOLSS_DM_UNI_QUALITY_MEDIUM
= 0x00000001,
376 SPOOLSS_DM_UNI_QUALITY_DRAFT
= 0x00000002
377 } spoolss_DMUNI_Quality
;
379 typedef [bitmap32bit
] bitmap
{
380 SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS
= 0x00000002,
381 SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL
= 0x00000010,
382 SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING
= 0x00000080
383 } spoolss_DMUNI_Flags
;
386 [value
(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
)] spoolss_DM_Signature dwSignature
;
387 [value
(0x0022)] uint16 wVer
;
392 spoolss_DMUNI_Flags dwFlags
;
393 boolean32 bReversePrint
;
394 spoolss_DM_Layout iLayout
;
395 spoolss_DMUNI_Quality iQuality
;
398 uint32 aOptions
[128];
399 } spoolss_UNIDRVEXTRA500
;
403 typedef [public,gensize
] struct {
404 [value
(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
)] spoolss_DM_Signature dwSignature
;
405 [value
(0x0022)] uint16 wVer
;
406 uint16 wCoreJTExpSize
;
407 [value
(ndr_size_spoolss_UNIDRVEXTRA
(r
, ndr
->flags
) + wCoreJTExpSize
)] uint16 wCoreFullSize
;
410 spoolss_DMUNI_Flags dwFlags
;
411 boolean32 bReversePrint
;
412 spoolss_DM_Layout iLayout
;
413 spoolss_DMUNI_Quality iQuality
;
416 uint32 aOptions
[128];
417 spoolss_DM_NupDirection dwNupDirection
;
418 spoolss_DM_NupBorderFlags dwNupBorderFlags
;
419 spoolss_DM_BookletFlags dwBookletFlags
;
420 } spoolss_UNIDRVEXTRA
;
422 /* Device Mode Extra Data: JTEXP */
426 [value
(SPOOLSS_DM_SIGNATURE_JTEXP
)] spoolss_DM_Signature dwSignature
;
427 [value
(0)] uint32 dwVersion
;
428 [value
(16)] uint32 wJTHdrSize
;
430 [string,charset
(UTF16
)] uint16
*ModelName
;
431 nstring_array FeatureOptionPairs
;
434 /* Device Mode Extra Data: OEM_DMEXTRA */
438 spoolss_DM_Signature dwSignature
;
440 [flag
(NDR_REMAINING
)] DATA_BLOB Data
;
441 } spoolss_OEM_DMEXTRA
;
443 typedef [nodiscriminant
] union {
444 [case(0x0350)] spoolss_PSDRVEXTRA351 psdrvextra351
;
445 [case(0x0400)] spoolss_PSDRVEXTRA400 psdrvextra400
;
446 [case(0x0501)] spoolss_PSDRVEXTRA500 psdrvextra500
;
447 [case(0x0600)] spoolss_PSDRVEXTRA psdrvextra
;
448 [default] [flag
(NDR_REMAINING
)] DATA_BLOB psblob
;
449 } spoolss_DeviceModeExtraDataPostScript
;
451 typedef [nodiscriminant
] union {
452 [case(0x0301)] spoolss_UNIDRVEXTRA3_4 unidrvextra3_4
;
453 [case(0x0500)] spoolss_UNIDRVEXTRA500 unidrvextra500
;
454 [case(0x0600)] spoolss_UNIDRVEXTRA unidrvextra
;
455 [default] [flag
(NDR_REMAINING
)] DATA_BLOB uniblob
;
456 } spoolss_DeviceModeExtraDataUniDriver
;
458 typedef [bitmap32bit
] bitmap
{
459 DEVMODE_ORIENTATION
= 0x00000001,
460 DEVMODE_PAPERSIZE
= 0x00000002,
461 DEVMODE_PAPERLENGTH
= 0x00000004,
462 DEVMODE_PAPERWIDTH
= 0x00000008,
463 DEVMODE_SCALE
= 0x00000010,
464 DEVMODE_POSITION
= 0x00000020,
465 DEVMODE_NUP
= 0x00000040,
466 DEVMODE_COPIES
= 0x00000100,
467 DEVMODE_DEFAULTSOURCE
= 0x00000200,
468 DEVMODE_PRINTQUALITY
= 0x00000400,
469 DEVMODE_COLOR
= 0x00000800,
470 DEVMODE_DUPLEX
= 0x00001000,
471 DEVMODE_YRESOLUTION
= 0x00002000,
472 DEVMODE_TTOPTION
= 0x00004000,
473 DEVMODE_COLLATE
= 0x00008000,
474 DEVMODE_FORMNAME
= 0x00010000,
475 DEVMODE_LOGPIXELS
= 0x00020000,
476 DEVMODE_BITSPERPEL
= 0x00040000,
477 DEVMODE_PELSWIDTH
= 0x00080000,
478 DEVMODE_PELSHEIGHT
= 0x00100000,
479 DEVMODE_DISPLAYFLAGS
= 0x00200000,
480 DEVMODE_DISPLAYFREQUENCY
= 0x00400000,
481 DEVMODE_ICMMETHOD
= 0x00800000,
482 DEVMODE_ICMINTENT
= 0x01000000,
483 DEVMODE_MEDIATYPE
= 0x02000000,
484 DEVMODE_DITHERTYPE
= 0x04000000,
485 DEVMODE_PANNINGWIDTH
= 0x08000000,
486 DEVMODE_PANNINGHEIGHT
= 0x10000000
487 } spoolss_DeviceModeFields
;
489 typedef [enum16bit
] enum {
491 DMSPEC_WIN95_98_ME
= 0x400,
492 DMSPEC_NT4_AND_ABOVE
= 0x401
493 } spoolss_DeviceModeSpecVersion
;
495 typedef [enum16bit
] enum {
496 DMORIENT_PORTRAIT
= 0x0001,
497 DMORIENT_LANDSCAPE
= 0x0002
498 } spoolss_DeviceModeOrientation
;
500 typedef [enum16bit
] enum {
501 DMPAPER_LETTER
= 0x0001, /* Letter, 8 1/2 x 11 inches */
502 DMPAPER_LETTERSMALL
= 0x0002, /* Letter Small, 8 1/2 x 11 inches */
503 DMPAPER_TABLOID
= 0x0003, /* Tabloid, 11 x 17 inches */
504 DMPAPER_LEDGER
= 0x0004, /* Ledger, 17 x 11 inches */
505 DMPAPER_LEGAL
= 0x0005, /* Legal, 8 1/2 x 14 inches */
506 DMPAPER_STATEMENT
= 0x0006, /* Statement, 5 1/2 x 8 1/2 inches */
507 DMPAPER_EXECUTIVE
= 0x0007, /* Executive, 7 1/4 x 10 1/2 inches */
508 DMPAPER_A3
= 0x0008, /* A3 sheet, 297 x 420 millimeters */
509 DMPAPER_A4
= 0x0009, /* A4 sheet, 210 x 297 millimeters */
510 DMPAPER_A4SMALL
= 0x000A, /* A4 small sheet, 210 x 297 millimeters */
511 DMPAPER_A5
= 0x000B, /* A5 sheet, 148 x 210 millimeters */
512 DMPAPER_B4
= 0x000C, /* B4 sheet, 250 x 354 millimeters */
513 DMPAPER_B5
= 0x000D, /* B5 sheet, 182 x 257-millimeter paper */
514 DMPAPER_FOLIO
= 0x000E, /* Folio, 8 1/2 x 13-inch paper */
515 DMPAPER_QUARTO
= 0x000F, /* Quarto, 215 x 275 millimeter paper */
516 DMPAPER_10X14
= 0x0010, /* 10 x 14-inch sheet */
517 DMPAPER_11X17
= 0x0011, /* 11 x 17-inch sheet */
518 DMPAPER_NOTE
= 0x0012, /* Note, 8 1/2 x 11-inches */
519 DMPAPER_ENV_9
= 0x0013, /* #9 Envelope, 3 7/8 x 8 7/8 inches */
520 DMPAPER_ENV_10
= 0x0014, /* #10 Envelope, 4 1/8 x 9 1/2 inches */
521 DMPAPER_ENV_11
= 0x0015, /* #11 Envelope, 4 1/2 x 10 3/8 inches */
522 DMPAPER_ENV_12
= 0x0016, /* #12 Envelope, 4 3/4 x 11 inches */
523 DMPAPER_ENV_14
= 0x0017, /* #14 Envelope, 5 x 11 1/2 inches */
524 DMPAPER_CSHEET
= 0x0018, /* C Sheet, 17 x 22 inches */
525 DMPAPER_DSHEET
= 0x0019, /* D Sheet, 22 x 34 inches */
526 DMPAPER_ESHEET
= 0x001A, /* E Sheet, 34 x 44 inches */
527 DMPAPER_ENV_DL
= 0x001B, /* DL Envelope, 110 x 220 millimeters */
528 DMPAPER_ENV_C5
= 0x001C, /* C5 Envelope, 162 x 229 millimeters */
529 DMPAPER_ENV_C3
= 0x001D, /* C3 Envelope, 324 x 458 millimeters */
530 DMPAPER_ENV_C4
= 0x001E, /* C4 Envelope, 229 x 324 millimeters */
531 DMPAPER_ENV_C6
= 0x001F, /* C6 Envelope, 114 x 162 millimeters */
532 DMPAPER_ENV_C65
= 0x0020, /* C65 Envelope, 114 x 229 millimeters */
533 DMPAPER_ENV_B4
= 0x0021, /* B4 Envelope, 250 x 353 millimeters */
534 DMPAPER_ENV_B5
= 0x0022, /* B5 Envelope, 176 x 250 millimeters */
535 DMPAPER_ENV_B6
= 0x0023, /* B6 Envelope, 176 x 125 millimeters */
536 DMPAPER_ENV_ITALY
= 0x0024, /* Italy Envelope, 110 x 230 millimeters */
537 DMPAPER_ENV_MONARCH
= 0x0025, /* Monarch Envelope, 3 7/8 x 7 1/2 inches */
538 DMPAPER_ENV_PERSONAL
= 0x0026, /* 6 3/4 Envelope, 3 5/8 x 6 1/2 inches */
539 DMPAPER_FANFOLD_US
= 0x0027, /* US Std Fanfold, 14 7/8 x 11 inches */
540 DMPAPER_FANFOLD_STD_GERMAN
= 0x0028, /* German Std Fanfold, 8 1/2 x 12 inches */
541 DMPAPER_FANFOLD_LGL_GERMAN
= 0x0029, /* German Legal Fanfold, 8 x 13 inches */
542 DMPAPER_DBL_JAPANESE_POSTCARD
= 0x0045, /* Double Japanese Postcard, 200 x 148 millimeters */
543 DMPAPER_A6
= 0x0046, /* A6 sheet, 105 x 148 millimeters */
544 DMPAPER_JENV_KAKU2
= 0x0047, /* Japanese Envelope Kaku #2 */
545 DMPAPER_JENV_KAKU3
= 0x0048, /* Japanese Envelope Kaku #3 */
546 DMPAPER_JENV_CHOU3
= 0x0049, /* Japanese Envelope Chou #3 */
547 DMPAPER_JENV_CHOU4
= 0x004A, /* Japanese Envelope Chou #4 */
548 DMPAPER_LETTER_ROTATED
= 0x004B, /* Letter Rotated, 11 by 8 1/2 inches */
549 DMPAPER_A3_ROTATED
= 0x004C, /* A3 rotated sheet, 420 x 297 millimeters */
550 DMPAPER_A4_ROTATED
= 0x004D, /* A4 rotated sheet, 297 x 210 millimeters */
551 DMPAPER_A5_ROTATED
= 0x004E, /* A5 rotated sheet, 210 x 148 millimeters */
552 DMPAPER_B4_JIS_ROTATED
= 0x004F, /* B4 (JIS) rotated sheet, 364 x 257 millimeters */
553 DMPAPER_B5_JIS_ROTATED
= 0x0050, /* B5 (JIS) rotated sheet, 257 x 182 millimeters */
554 DMPAPER_JAPANESE_POSTCARD_ROTATED
= 0x0051, /* Japanese Postcard Rotated, 148 x 100 millimeters */
555 DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED
= 0x0052, /* Double Japanese Postcard Rotated, 148 x 200 millimeters */
556 DMPAPER_A6_ROTATED
= 0x0053, /* A6 rotated sheet, 148 x 105 millimeters */
557 DMPAPER_JENV_KAKU2_ROTATED
= 0x0054, /* Japanese Envelope Kaku #2 Rotated */
558 DMPAPER_JENV_KAKU3_ROTATED
= 0x0055, /* Japanese Envelope Kaku #3 Rotated */
559 DMPAPER_JENV_CHOU3_ROTATED
= 0x0056, /* Japanese Envelope Chou #3 Rotated */
560 DMPAPER_JENV_CHOU4_ROTATED
= 0x0057, /* Japanese Envelope Chou #4 Rotated */
561 DMPAPER_B6_JIS
= 0x0058, /* B6 (JIS) sheet, 128 x 182 millimeters */
562 DMPAPER_B6_JIS_ROTATED
= 0x0059, /* B6 (JIS) rotated sheet, 182 x 128 millimeters */
563 DMPAPER_12X11
= 0x005A, /* 12 x 11-inch sheet */
564 DMPAPER_JENV_YOU4
= 0x005B, /* Japanese Envelope You #4 */
565 DMPAPER_JENV_YOU4_ROTATED
= 0x005C, /* Japanese Envelope You #4 */
566 DMPAPER_P16K
= 0x005D, /* PRC 16K, 146 x 215 millimeters */
567 DMPAPER_P32K
= 0x005E, /* PRC 32K, 97 x 151 millimeters */
568 DMPAPER_P32KBIG
= 0x005F, /* PRC 32K(Big) 97 x 151 millimeters */
569 DMPAPER_PENV_1
= 0x0060, /* PRC Envelope #1, 102 by 165 millimeters */
570 DMPAPER_PENV_2
= 0x0061, /* PRC Envelope #2, 102 x 176 millimeters */
571 DMPAPER_PENV_3
= 0x0062, /* PRC Envelope #3, 125 x 176 millimeters */
572 DMPAPER_PENV_4
= 0x0063, /* PRC Envelope #4, 110 x 208 millimeters */
573 DMPAPER_PENV_5
= 0x0064, /* PRC Envelope #5, 110 x 220 millimeters */
574 DMPAPER_PENV_6
= 0x0065, /* PRC Envelope #6, 120 x 230 millimeters */
575 DMPAPER_PENV_7
= 0x0066, /* PRC Envelope #7, 160 x 230 millimeters */
576 DMPAPER_PENV_8
= 0x0067, /* PRC Envelope #8, 120 x 309 millimeters */
577 DMPAPER_PENV_9
= 0x0068, /* PRC Envelope #9, 229 x 324 millimeters */
578 DMPAPER_PENV_10
= 0x0069, /* PRC Envelope #10, 324 x 458 millimeters */
579 DMPAPER_P16K_ROTATED
= 0x006A, /* PRC 16K Rotated, 215 x 146 millimeters */
580 DMPAPER_P32K_ROTATED
= 0x006B, /* PRC 32K Rotated, 151 x 97 millimeters */
581 DMPAPER_P32KBIG_ROTATED
= 0x006C, /* PRC 32K(Big) Rotated, 151 x 97 millimeters */
582 DMPAPER_PENV_1_ROTATED
= 0x006D, /* PRC Envelope #1 Rotated, 165 x 102 millimeters */
583 DMPAPER_PENV_2_ROTATED
= 0x006E, /* PRC Envelope #2 Rotated, 176 x 102 millimeters */
584 DMPAPER_PENV_3_ROTATED
= 0x006F, /* PRC Envelope #3 Rotated, 176 x 125 millimeters */
585 DMPAPER_PENV_4_ROTATED
= 0x0070, /* PRC Envelope #4 Rotated, 208 x 110 millimeters */
586 DMPAPER_PENV_5_ROTATED
= 0x0071, /* PRC Envelope #5 Rotated, 220 x 110 millimeters */
587 DMPAPER_PENV_6_ROTATED
= 0x0072, /* PRC Envelope #6 Rotated, 230 x 120 millimeters */
588 DMPAPER_PENV_7_ROTATED
= 0x0073, /* PRC Envelope #7 Rotated, 230 x 160 millimeters */
589 DMPAPER_PENV_8_ROTATED
= 0x0074, /* PRC Envelope #8 Rotated, 309 x 120 millimeters */
590 DMPAPER_PENV_9_ROTATED
= 0x0075, /* PRC Envelope #9 Rotated, 324 x 229 millimeters */
591 DMPAPER_PENV_10_ROTATED
= 0x0076 /* PRC Envelope #10 Rotated, 458 x 324 millimeters */
592 } spoolss_DeviceModePaperSize
;
594 typedef [enum16bit
] enum {
595 DMBIN_UPPER
= 0x0001,
596 DMBIN_LOWER
= 0x0002,
597 DMBIN_MIDDLE
= 0x0003,
598 DMBIN_MANUAL
= 0x0004,
599 DMBIN_ENVELOPE
= 0x0005,
600 DMBIN_ENVMANUAL
= 0x0006,
602 DMBIN_TRACTOR
= 0x0008,
603 DMBIN_SMALLFMT
= 0x0009,
604 DMBIN_LARGEFMT
= 0x000a,
605 DMBIN_LARGECAPACITY
= 0x000b,
606 DMBIN_CASSETTE
= 0x000e,
607 DMBIN_FORMSOURCE
= 0x000f
608 } spoolss_DeviceModeDefaultSource
;
610 typedef [enum16bit
] enum {
612 DMRES_MEDIUM
= 0xfffd,
615 } spoolss_DeviceModePrintQuality
;
617 typedef [enum16bit
] enum {
618 DMRES_MONOCHROME
= 0x0001,
620 } spoolss_DeviceModeColor
;
622 typedef [enum16bit
] enum {
623 DMDUP_SIMPLEX
= 0x0001,
624 DMDUP_VERTICAL
= 0x0002,
625 DMDUP_HORIZONTAL
= 0x0003
626 } spoolss_DeviceModeDuplex
;
628 typedef [enum16bit
] enum {
629 DMTT_BITMAP
= 0x0001,
630 DMTT_DOWNLOAD
= 0x0002,
631 DMTT_SUBDEV
= 0x0003,
632 DMTT_DOWNLOAD_OUTLINE
= 0x0004
633 } spoolss_DeviceModeTTOption
;
635 typedef [enum16bit
] enum {
636 DMCOLLATE_FALSE
= 0x0000,
637 DMCOLLATE_TRUE
= 0x0001
638 } spoolss_DeviceModeCollate
;
640 typedef [v1_enum] enum {
641 DMNUP_SYSTEM
= 0x00000001,
642 DMNUP_ONEUP
= 0x00000002
643 } spoolss_DeviceModeNUp
;
645 typedef [v1_enum] enum {
646 DMICMMETHOD_NONE
= 0x00000001,
647 DMICMMETHOD_SYSTEM
= 0x00000002,
648 DMICMMETHOD_DRIVER
= 0x00000003,
649 DMICMMETHOD_DEVICE
= 0x00000004
650 } spoolss_DeviceModeICMMethod
;
652 typedef [v1_enum] enum {
653 DMICM_SATURATE
= 0x00000001,
654 DMICM_CONTRAST
= 0x00000002,
655 DMICM_COLORIMETRIC
= 0x00000003,
656 DMICM_ABS_COLORIMETRIC
= 0x00000004
657 } spoolss_DeviceModeICMIntent
;
659 typedef [v1_enum] enum {
660 DMMEDIA_STANDARD
= 0x00000001,
661 DMMEDIA_TRANSPARENCY
= 0x00000002,
662 DMMEDIA_GLOSSY
= 0x00000003
663 } spoolss_DeviceModeMediaType
;
665 typedef [v1_enum] enum {
666 DMDITHER_NONE
= 0x00000001,
667 DMDITHER_COARSE
= 0x00000002,
668 DMDITHER_FINE
= 0x00000003,
669 DMDITHER_LINEART
= 0x00000004,
670 DMDITHER_ERRORDIFFUSION
= 0x00000005,
671 DMDITHER_RESERVED6
= 0x00000006,
672 DMDITHER_RESERVED7
= 0x00000007,
673 DMDITHER_RESERVED8
= 0x00000008,
674 DMDITHER_RESERVED9
= 0x00000009,
675 DMDITHER_GRAYSCALE
= 0x0000000A
676 } spoolss_DeviceModeDitherType
;
678 const int MAXDEVICENAME
= 32;
680 typedef [public,gensize
] struct {
681 [charset
(UTF16
),to_null
] uint16 devicename
[MAXDEVICENAME
];
682 spoolss_DeviceModeSpecVersion specversion
;
683 uint16 driverversion
;
685 [value
(r
->driverextra_data.length
)] uint16 __driverextra_length
;
686 spoolss_DeviceModeFields fields
;
687 spoolss_DeviceModeOrientation orientation
;
688 spoolss_DeviceModePaperSize papersize
;
693 spoolss_DeviceModeDefaultSource defaultsource
;
694 spoolss_DeviceModePrintQuality printquality
;
695 spoolss_DeviceModeColor color
;
696 spoolss_DeviceModeDuplex duplex
;
698 spoolss_DeviceModeTTOption ttoption
;
699 spoolss_DeviceModeCollate collate
;
700 [charset
(UTF16
),to_null
] uint16 formname
[MAXDEVICENAME
];
701 uint16 logpixels
; /* reserved */
702 uint32 bitsperpel
; /* reserved */
703 uint32 pelswidth
; /* reserved */
704 uint32 pelsheight
; /* reserved */
705 spoolss_DeviceModeNUp displayflags
;
706 uint32 displayfrequency
; /* reserved */
707 spoolss_DeviceModeICMMethod icmmethod
;
708 spoolss_DeviceModeICMIntent icmintent
;
709 spoolss_DeviceModeMediaType mediatype
;
710 spoolss_DeviceModeDitherType dithertype
;
713 uint32 panningwidth
; /* reserved */
714 uint32 panningheight
; /* reserved */
715 [subcontext_size
(__driverextra_length
),subcontext
(0),flag
(NDR_REMAINING
)] DATA_BLOB driverextra_data
;
716 } spoolss_DeviceMode
;
718 typedef [public] bitmap
{
719 PRINTER_ENUM_DEFAULT
= 0x00000001,
720 PRINTER_ENUM_LOCAL
= 0x00000002,
721 PRINTER_ENUM_CONNECTIONS
= 0x00000004,
722 PRINTER_ENUM_FAVORITE
= 0x00000004,
723 PRINTER_ENUM_NAME
= 0x00000008,
724 PRINTER_ENUM_REMOTE
= 0x00000010,
725 PRINTER_ENUM_SHARED
= 0x00000020,
726 PRINTER_ENUM_NETWORK
= 0x00000040,
727 PRINTER_ENUM_EXPAND
= 0x00004000,
728 PRINTER_ENUM_CONTAINER
= 0x00008000,
729 PRINTER_ENUM_ICON1
= 0x00010000,
730 PRINTER_ENUM_ICON2
= 0x00020000,
731 PRINTER_ENUM_ICON3
= 0x00040000,
732 PRINTER_ENUM_ICON4
= 0x00080000,
733 PRINTER_ENUM_ICON5
= 0x00100000,
734 PRINTER_ENUM_ICON6
= 0x00200000,
735 PRINTER_ENUM_ICON7
= 0x00400000,
736 PRINTER_ENUM_ICON8
= 0x00800000,
737 PRINTER_ENUM_HIDE
= 0x01000000
738 } spoolss_EnumPrinterFlags
;
740 const int PRINTER_ENUM_ICONMASK
= (PRINTER_ENUM_ICON1 |
747 PRINTER_ENUM_ICON8
); /* 0x00ff0000 */
749 typedef [public] bitmap
{
750 PRINTER_ATTRIBUTE_QUEUED
= 0x00000001,
751 PRINTER_ATTRIBUTE_DIRECT
= 0x00000002,
752 PRINTER_ATTRIBUTE_DEFAULT
= 0x00000004,
753 PRINTER_ATTRIBUTE_SHARED
= 0x00000008,
754 PRINTER_ATTRIBUTE_NETWORK
= 0x00000010,
755 PRINTER_ATTRIBUTE_HIDDEN
= 0x00000020,
756 PRINTER_ATTRIBUTE_LOCAL
= 0x00000040,
757 PRINTER_ATTRIBUTE_ENABLE_DEVQ
= 0x00000080,
758 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
= 0x00000100,
759 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
= 0x00000200,
760 PRINTER_ATTRIBUTE_WORK_OFFLINE
= 0x00000400,
761 PRINTER_ATTRIBUTE_ENABLE_BIDI
= 0x00000800,
762 PRINTER_ATTRIBUTE_RAW_ONLY
= 0x00001000,
763 PRINTER_ATTRIBUTE_PUBLISHED
= 0x00002000,
764 PRINTER_ATTRIBUTE_FAX
= 0x00004000,
765 PRINTER_ATTRIBUTE_TS
= 0x00008000
766 } spoolss_PrinterAttributes
;
768 typedef [public,gensize
] struct {
769 spoolss_EnumPrinterFlags flags
;
770 [relative
] nstring
*description
;
771 [relative
] nstring
*name
;
772 [relative
] nstring
*comment
;
773 } spoolss_PrinterInfo1
;
775 typedef [public,gensize
,nopush
] struct {
776 [relative
] nstring
*servername
;
777 [relative
] nstring
*printername
;
778 [relative
] nstring
*sharename
;
779 [relative
] nstring
*portname
;
780 [relative
] nstring
*drivername
;
781 [relative
] nstring
*comment
;
782 [relative
] nstring
*location
;
783 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
784 [relative
] nstring
*sepfile
;
785 [relative
] nstring
*printprocessor
;
786 [relative
] nstring
*datatype
;
787 [relative
] nstring
*parameters
;
788 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
789 spoolss_PrinterAttributes attributes
;
790 [range(0,99)] uint32 priority
;
791 uint32 defaultpriority
;
794 spoolss_PrinterStatus status
;
797 } spoolss_PrinterInfo2
;
799 typedef [public,gensize
] struct {
800 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
801 } spoolss_PrinterInfo3
;
803 typedef [public,gensize
] struct {
804 [relative
] nstring
*printername
;
805 [relative
] nstring
*servername
;
806 spoolss_PrinterAttributes attributes
;
807 } spoolss_PrinterInfo4
;
809 typedef [public,gensize
] struct {
810 [relative
] nstring
*printername
;
811 [relative
] nstring
*portname
;
812 spoolss_PrinterAttributes attributes
;
813 uint32 device_not_selected_timeout
;
814 uint32 transmission_retry_timeout
;
815 } spoolss_PrinterInfo5
;
817 typedef [public,gensize
] struct {
818 spoolss_PrinterStatus status
;
819 } spoolss_PrinterInfo6
;
822 DSPRINT_PUBLISH
= 0x00000001,
823 DSPRINT_UPDATE
= 0x00000002,
824 DSPRINT_UNPUBLISH
= 0x00000004,
825 DSPRINT_REPUBLISH
= 0x00000008,
826 DSPRINT_PENDING
= 0x80000000
827 } spoolss_DsPrintAction
;
829 typedef [public,gensize
] struct {
830 [relative
] nstring
*guid
; /* text form of printer guid */
831 spoolss_DsPrintAction action
;
832 } spoolss_PrinterInfo7
;
835 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
836 } spoolss_DeviceModeInfo
;
838 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
839 [case(0)] spoolss_PrinterInfo0 info0
;
840 [case(1)] spoolss_PrinterInfo1 info1
;
841 [case(2)] spoolss_PrinterInfo2 info2
;
842 [case(3)] spoolss_PrinterInfo3 info3
;
843 [case(4)] spoolss_PrinterInfo4 info4
;
844 [case(5)] spoolss_PrinterInfo5 info5
;
845 [case(6)] spoolss_PrinterInfo6 info6
;
846 [case(7)] spoolss_PrinterInfo7 info7
;
847 [case(8)] spoolss_DeviceModeInfo info8
;
848 [case(9)] spoolss_DeviceModeInfo info9
;
850 } spoolss_PrinterInfo
;
854 /* we are using this as internal parsing code */
855 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinters
(
856 [in] spoolss_EnumPrinterFlags flags
,
857 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
859 [in,unique] DATA_BLOB
*buffer
,
861 [out,unique] DATA_BLOB
*info
,
862 [out,ref] uint32
*needed
,
863 [out,ref] uint32
*count
865 [public,noopnum
,noprint
] void __spoolss_EnumPrinters
(
868 [out,switch_is(level
)] spoolss_PrinterInfo info
[count
]
870 [nopull
,nopush
] WERROR spoolss_EnumPrinters
(
871 [in] spoolss_EnumPrinterFlags flags
,
872 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
874 [in,unique] DATA_BLOB
*buffer
,
876 /* what we have here is a subcontext containing an array of no discriminant unions
877 * and the array has no size in front
879 [out,ref] uint32
*count
,
880 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrinterInfo
**info
,
881 [out,ref] uint32
*needed
887 [value
(_ndr_size_spoolss_DeviceMode
(devmode
, ndr
->flags
))] uint32 _ndr_size
;
888 [subcontext
(4),subcontext_size
(_ndr_size
)] spoolss_DeviceMode
*devmode
;
889 } spoolss_DevmodeContainer
;
891 [public] WERROR spoolss_OpenPrinter
(
892 [in,unique] [string,charset
(UTF16
)] uint16
*printername
,
893 [in,unique] [string,charset
(UTF16
)] uint16
*datatype
,
894 [in] spoolss_DevmodeContainer devmode_ctr
,
895 [in] spoolss_AccessRights access_mask
,
896 [out,ref] policy_handle
*handle
902 typedef [public,gensize
] struct {
904 [relative
] nstring
*printer_name
;
905 [relative
] nstring
*server_name
;
906 [relative
] nstring
*user_name
;
907 [relative
] nstring
*document_name
;
908 [relative
] nstring
*data_type
;
909 [relative
] nstring
*text_status
;
910 spoolss_JobStatus status
;
911 [range(0,99)] uint32 priority
;
914 uint32 pages_printed
;
915 spoolss_Time submitted
;
918 typedef [public,gensize
] struct {
920 [relative
] nstring
*printer_name
;
921 [relative
] nstring
*server_name
;
922 [relative
] nstring
*user_name
;
923 [relative
] nstring
*document_name
;
924 [relative
] nstring
*notify_name
;
925 [relative
] nstring
*data_type
;
926 [relative
] nstring
*print_processor
;
927 [relative
] nstring
*parameters
;
928 [relative
] nstring
*driver_name
;
929 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
930 [relative
] nstring
*text_status
;
931 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
932 spoolss_JobStatus status
;
933 [range(0,99)] uint32 priority
;
939 spoolss_Time submitted
;
941 uint32 pages_printed
;
944 typedef [public,gensize
] struct {
950 typedef [public,gensize
] struct {
952 [relative
] nstring
*printer_name
;
953 [relative
] nstring
*server_name
;
954 [relative
] nstring
*user_name
;
955 [relative
] nstring
*document_name
;
956 [relative
] nstring
*notify_name
;
957 [relative
] nstring
*data_type
;
958 [relative
] nstring
*print_processor
;
959 [relative
] nstring
*parameters
;
960 [relative
] nstring
*driver_name
;
961 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
962 [relative
] nstring
*text_status
;
963 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
964 spoolss_JobStatus status
;
965 [range(0,99)] uint32 priority
;
971 spoolss_Time submitted
;
973 uint32 pages_printed
;
977 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
978 [case(1)] spoolss_JobInfo1 info1
;
979 [case(2)] spoolss_JobInfo2 info2
;
980 [case(3)] spoolss_JobInfo3 info3
;
981 [case(4)] spoolss_JobInfo4 info4
;
987 [string,charset
(UTF16
)] uint16
*printer_name
;
988 [string,charset
(UTF16
)] uint16
*server_name
;
989 [string,charset
(UTF16
)] uint16
*user_name
;
990 [string,charset
(UTF16
)] uint16
*document_name
;
991 [string,charset
(UTF16
)] uint16
*data_type
;
992 [string,charset
(UTF16
)] uint16
*text_status
;
993 spoolss_JobStatus status
;
994 [range(0,99)] uint32 priority
;
997 uint32 pages_printed
;
998 spoolss_Time submitted
;
999 } spoolss_SetJobInfo1
;
1003 [string,charset
(UTF16
)] uint16
*printer_name
;
1004 [string,charset
(UTF16
)] uint16
*server_name
;
1005 [string,charset
(UTF16
)] uint16
*user_name
;
1006 [string,charset
(UTF16
)] uint16
*document_name
;
1007 [string,charset
(UTF16
)] uint16
*notify_name
;
1008 [string,charset
(UTF16
)] uint16
*data_type
;
1009 [string,charset
(UTF16
)] uint16
*print_processor
;
1010 [string,charset
(UTF16
)] uint16
*parameters
;
1011 [string,charset
(UTF16
)] uint16
*driver_name
;
1012 uint32 _devmode_ptr
; /* pointer to truncated devicemode */
1013 [string,charset
(UTF16
)] uint16
*text_status
;
1014 uint32 _secdesc_ptr
;
1015 spoolss_JobStatus status
;
1016 [range(0,99)] uint32 priority
;
1022 spoolss_Time submitted
;
1024 uint32 pages_printed
;
1025 } spoolss_SetJobInfo2
;
1029 [string,charset
(UTF16
)] uint16
*printer_name
;
1030 [string,charset
(UTF16
)] uint16
*server_name
;
1031 [string,charset
(UTF16
)] uint16
*user_name
;
1032 [string,charset
(UTF16
)] uint16
*document_name
;
1033 [string,charset
(UTF16
)] uint16
*notify_name
;
1034 [string,charset
(UTF16
)] uint16
*data_type
;
1035 [string,charset
(UTF16
)] uint16
*print_processor
;
1036 [string,charset
(UTF16
)] uint16
*parameters
;
1037 [string,charset
(UTF16
)] uint16
*driver_name
;
1038 uint32 _devmode_ptr
; /* pointer to truncated devicemode */
1039 [string,charset
(UTF16
)] uint16
*text_status
;
1040 uint32 _secdesc_ptr
;
1041 spoolss_JobStatus status
;
1042 [range(0,99)] uint32 priority
;
1048 spoolss_Time submitted
;
1050 uint32 pages_printed
;
1052 } spoolss_SetJobInfo4
;
1054 typedef [public] union {
1055 [case(1)] spoolss_SetJobInfo1
*info1
;
1056 [case(2)] spoolss_SetJobInfo2
*info2
;
1057 [case(3)] spoolss_JobInfo3
*info3
;
1058 [case(4)] spoolss_SetJobInfo4
*info4
;
1060 } spoolss_SetJobInfo
;
1064 [switch_is(level
)] spoolss_SetJobInfo info
;
1065 } spoolss_JobInfoContainer
;
1067 typedef [v1_enum] enum {
1068 SPOOLSS_JOB_CONTROL_PAUSE
= 1,
1069 SPOOLSS_JOB_CONTROL_RESUME
= 2,
1070 SPOOLSS_JOB_CONTROL_CANCEL
= 3,
1071 SPOOLSS_JOB_CONTROL_RESTART
= 4,
1072 SPOOLSS_JOB_CONTROL_DELETE
= 5,
1073 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER
= 6,
1074 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED
= 7,
1075 SPOOLSS_JOB_CONTROL_RETAIN
= 8,
1076 SPOOLSS_JOB_CONTROL_RELEASE
= 9
1077 } spoolss_JobControl
;
1079 WERROR spoolss_SetJob
(
1080 [in,ref] policy_handle
*handle,
1082 [in,unique] spoolss_JobInfoContainer
*ctr
,
1083 [in] spoolss_JobControl command
1086 /******************/
1087 /* Function: 0x03 */
1088 WERROR spoolss_GetJob
(
1089 [in,ref] policy_handle
*handle,
1092 [in,unique] DATA_BLOB
*buffer
,
1093 [in] uint32 offered
,
1094 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_JobInfo
*info
,
1095 [out,ref] uint32
*needed
1098 /******************/
1099 /* Function: 0x04 */
1100 [public,noopnum
,noprint
] WERROR _spoolss_EnumJobs
(
1101 [in,ref] policy_handle
*handle,
1102 [in] uint32 firstjob
,
1103 [in] uint32 numjobs
,
1105 [in,unique] DATA_BLOB
*buffer
,
1106 [in] uint32 offered
,
1107 [out,unique] DATA_BLOB
*info
,
1108 [out,ref] uint32
*needed
,
1109 [out,ref] uint32
*count
1111 [public,noopnum
,noprint
] void __spoolss_EnumJobs
(
1114 [out,switch_is(level
)] spoolss_JobInfo info
[count
]
1116 [nopull
,nopush
] WERROR spoolss_EnumJobs
(
1117 [in,ref] policy_handle
*handle,
1118 [in] uint32 firstjob
,
1119 [in] uint32 numjobs
,
1121 [in,unique] DATA_BLOB
*buffer
,
1122 [in] uint32 offered
,
1123 [out,ref] uint32
*count
,
1124 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_JobInfo
**info
,
1125 [out,ref] uint32
*needed
1128 /******************/
1129 /* Function: 0x05 */
1130 WERROR spoolss_AddPrinter
(
1131 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1132 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
1133 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
1134 [in,ref] sec_desc_buf
*secdesc_ctr
,
1135 [out,ref] policy_handle
*handle
1138 /******************/
1139 /* Function: 0x06 */
1140 WERROR spoolss_DeletePrinter
(
1141 [in] policy_handle
*handle
1144 /******************/
1145 /* Function: 0x07 */
1146 typedef [v1_enum] enum {
1147 SPOOLSS_PRINTER_CONTROL_UNPAUSE
= 0,
1148 SPOOLSS_PRINTER_CONTROL_PAUSE
= 1,
1149 SPOOLSS_PRINTER_CONTROL_RESUME
= 2,
1150 SPOOLSS_PRINTER_CONTROL_PURGE
= 3,
1151 SPOOLSS_PRINTER_CONTROL_SET_STATUS
= 4
1152 } spoolss_PrinterControl
;
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
;
1170 spoolss_JobStatus job_error
;
1171 uint32 number_of_processors
;
1172 spoolss_ProcessorType processor_type
;
1173 uint32 high_part_total_bytes
;
1176 spoolss_PrinterStatus status
;
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
->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
->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
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1343 spoolss_StringArray
*dependent_files
;
1344 [value
(((ndr_size_spoolss_StringArray
(previous_names
, 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
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1375 spoolss_StringArray
*dependent_files
;
1376 [value
(((ndr_size_spoolss_StringArray
(previous_names
, 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
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1397 spoolss_StringArray
*dependent_files
;
1398 [value
(((ndr_size_spoolss_StringArray
(previous_names
, 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
->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
->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
),flag
(NDR_ALIGN4
)] 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
->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
->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 [public] WERROR spoolss_GetPrinterData
(
1929 [in,ref] policy_handle
*handle,
1930 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1931 [out,ref] winreg_Type
*type
,
1932 [out,ref,size_is(offered
)] uint8
*data
,
1933 [in] uint32 offered
,
1934 [out,ref] uint32
*needed
1937 /******************/
1938 /* Function: 0x1b */
1939 WERROR spoolss_SetPrinterData
(
1940 [in,ref] policy_handle
*handle,
1941 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1942 [in] winreg_Type type
,
1943 [in,ref] [size_is(offered
)] uint8
*data
,
1947 /******************/
1948 /* Function: 0x1c */
1949 [todo
] WERROR spoolss_WaitForPrinterChange
(
1952 /******************/
1953 /* Function: 0x1d */
1954 [public] WERROR spoolss_ClosePrinter
(
1955 [in,out,ref] policy_handle
*handle
1958 /******************/
1959 /* Function: 0x1e */
1960 typedef [v1_enum] enum {
1961 SPOOLSS_FORM_USER
= 0,
1962 SPOOLSS_FORM_BUILTIN
= 1,
1963 SPOOLSS_FORM_PRINTER
= 2
1964 } spoolss_FormFlags
;
1978 typedef [public,gensize
] struct {
1979 spoolss_FormFlags flags
;
1980 [relative
] nstring
*form_name
;
1981 spoolss_FormSize size
;
1982 spoolss_FormArea area
;
1983 } spoolss_FormInfo1
;
1985 typedef [bitmap32bit
] bitmap
{
1986 SPOOLSS_FORM_STRING_TYPE_NONE
= 0x00000001,
1987 SPOOLSS_FORM_STRING_TYPE_MUI_DLL
= 0x00000002,
1988 SPOOLSS_FORM_STRING_TYPE_LANG_PAIR
= 0x00000004
1989 } spoolss_FormStringType
;
1991 typedef [public,gensize
] struct {
1992 spoolss_FormFlags flags
;
1993 [relative
] nstring
*form_name
;
1994 spoolss_FormSize size
;
1995 spoolss_FormArea area
;
1996 [relative
] astring
*keyword
;
1997 spoolss_FormStringType string_type
;
1998 [relative
] nstring
*mui_dll
;
1999 uint32 ressource_id
;
2000 [relative
] nstring
*display_name
;
2003 } spoolss_FormInfo2
;
2005 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
2006 [case(1)] spoolss_FormInfo1 info1
;
2007 [case(2)] spoolss_FormInfo2 info2
;
2012 spoolss_FormFlags flags
;
2013 [string,charset
(UTF16
)] uint16
*form_name
;
2014 spoolss_FormSize size
;
2015 spoolss_FormArea area
;
2016 } spoolss_AddFormInfo1
;
2019 spoolss_FormFlags flags
;
2020 [string,charset
(UTF16
)] uint16
*form_name
;
2021 spoolss_FormSize size
;
2022 spoolss_FormArea area
;
2023 [string,charset
(DOS
)] uint8
*keyword
;
2024 spoolss_FormStringType string_type
;
2025 [string,charset
(UTF16
)] uint16
*mui_dll
;
2026 uint32 ressource_id
;
2027 [string,charset
(UTF16
)] uint16
*display_name
;
2029 } spoolss_AddFormInfo2
;
2031 typedef [switch_type(uint32
)] union {
2032 [case(1)] spoolss_AddFormInfo1
*info1
;
2033 [case(2)] spoolss_AddFormInfo2
*info2
;
2034 } spoolss_AddFormInfo
;
2036 WERROR spoolss_AddForm
(
2037 [in,ref] policy_handle
*handle,
2039 [in,switch_is(level
)] spoolss_AddFormInfo info
2042 /******************/
2043 /* Function: 0x1f */
2044 WERROR spoolss_DeleteForm
(
2045 [in,ref] policy_handle
*handle,
2046 [in] [string,charset
(UTF16
)] uint16 form_name
[]
2049 /******************/
2050 /* Function: 0x20 */
2051 WERROR spoolss_GetForm
(
2052 [in,ref] policy_handle
*handle,
2053 [in] [string,charset
(UTF16
)] uint16 form_name
[],
2055 [in,unique] DATA_BLOB
*buffer
,
2056 [in] uint32 offered
,
2057 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_FormInfo
*info
,
2058 [out,ref] uint32
*needed
2061 /******************/
2062 /* Function: 0x21 */
2063 WERROR spoolss_SetForm
(
2064 [in,ref] policy_handle
*handle,
2065 [in] [string,charset
(UTF16
)] uint16 form_name
[],
2067 [in,switch_is(level
)] spoolss_AddFormInfo info
2070 /******************/
2071 /* Function: 0x22 */
2072 [public,noopnum
,noprint
] WERROR _spoolss_EnumForms
(
2073 [in,ref] policy_handle
*handle,
2075 [in,unique] DATA_BLOB
*buffer
,
2076 [in] uint32 offered
,
2077 [out,unique] DATA_BLOB
*info
,
2078 [out,ref] uint32
*needed
,
2079 [out,ref] uint32
*count
2081 [public,noopnum
,noprint
] void __spoolss_EnumForms
(
2084 [out,switch_is(level
)] spoolss_FormInfo info
[count
]
2086 [nopull
,nopush
] WERROR spoolss_EnumForms
(
2087 [in,ref] policy_handle
*handle,
2089 [in,unique] DATA_BLOB
*buffer
,
2090 [in] uint32 offered
,
2091 [out,ref] uint32
*count
,
2092 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_FormInfo
**info
,
2093 [out,ref] uint32
*needed
2097 * Special strings for the OpenPrinter() call. See the MSDN DDK
2098 * docs on the XcvDataPort() for more details.
2101 const string SPL_LOCAL_PORT
= "Local Port";
2102 const string SPL_TCPIP_PORT
= "Standard TCP/IP Port";
2103 const string SPL_XCV_MONITOR_LOCALMON
= ",XcvMonitor Local Port";
2104 const string SPL_XCV_MONITOR_TCPMON
= ",XcvMonitor Standard TCP/IP Port";
2106 typedef [public,gensize
] struct {
2107 [relative
] nstring
*port_name
;
2108 } spoolss_PortInfo1
;
2111 SPOOLSS_PORT_TYPE_WRITE
= 0x00000001,
2112 SPOOLSS_PORT_TYPE_READ
= 0x00000002,
2113 SPOOLSS_PORT_TYPE_REDIRECTED
= 0x00000004,
2114 SPOOLSS_PORT_TYPE_NET_ATTACHED
= 0x00000008
2117 typedef [public,gensize
] struct {
2118 [relative
] nstring
*port_name
;
2119 [relative
] nstring
*monitor_name
;
2120 [relative
] nstring
*description
;
2121 spoolss_PortType port_type
;
2123 } spoolss_PortInfo2
;
2125 typedef [v1_enum] enum {
2126 PORT_STATUS_CLEAR
= 0x00000000,
2127 PORT_STATUS_OFFLINE
= 0x00000001,
2128 PORT_STATUS_PAPER_JAM
= 0x00000002,
2129 PORT_STATUS_PAPER_OUT
= 0x00000003,
2130 PORT_STATUS_OUTPUT_BIN_FULL
= 0x00000004,
2131 PORT_STATUS_PAPER_PROBLEM
= 0x00000005,
2132 PORT_STATUS_NO_TONER
= 0x00000006,
2133 PORT_STATUS_DOOR_OPEN
= 0x00000007,
2134 PORT_STATUS_USER_INTERVENTION
= 0x00000008,
2135 PORT_STATUS_OUT_OF_MEMORY
= 0x00000009,
2136 PORT_STATUS_TONER_LOW
= 0x0000000A,
2137 PORT_STATUS_WARMING_UP
= 0x0000000B,
2138 PORT_STATUS_POWER_SAVE
= 0x0000000C
2139 } spoolss_PortStatus
;
2141 typedef [v1_enum] enum {
2142 PORT_STATUS_TYPE_ERROR
= 0x00000001,
2143 PORT_STATUS_TYPE_WARNING
= 0x00000002,
2144 PORT_STATUS_TYPE_INFO
= 0x00000003
2145 } spoolss_PortSeverity
;
2147 typedef [public,gensize
] struct {
2148 spoolss_PortStatus status
;
2149 [relative
] nstring
*status_string
;
2150 spoolss_PortSeverity severity
;
2151 } spoolss_PortInfo3
;
2153 typedef [public,gensize
] struct {
2154 [relative
] nstring
*port_name
;
2155 DATA_BLOB monitor_data
; /* relative ?? */
2156 } spoolss_PortInfoFF
;
2158 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2159 [case(1)] spoolss_PortInfo1 info1
;
2160 [case(2)] spoolss_PortInfo2 info2
;
2161 [case(3)] spoolss_PortInfo3 info3
;
2162 [case(0xff)] spoolss_PortInfoFF infoFF
;
2166 /******************/
2167 /* Function: 0x23 */
2168 [public,noopnum
,noprint
] WERROR _spoolss_EnumPorts
(
2169 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2171 [in,unique] DATA_BLOB
*buffer
,
2172 [in] uint32 offered
,
2173 [out,unique] DATA_BLOB
*info
,
2174 [out,ref] uint32
*needed
,
2175 [out,ref] uint32
*count
2177 [public,noopnum
,noprint
] void __spoolss_EnumPorts
(
2180 [out,switch_is(level
)] spoolss_PortInfo info
[count
]
2182 [nopull
,nopush
] WERROR spoolss_EnumPorts
(
2183 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2185 [in,unique] DATA_BLOB
*buffer
,
2186 [in] uint32 offered
,
2187 [out,ref] uint32
*count
,
2188 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PortInfo
**info
,
2189 [out,ref] uint32
*needed
2192 /******************/
2193 /* Function: 0x24 */
2194 typedef [public,gensize
] struct {
2195 [relative
] nstring
*monitor_name
;
2196 } spoolss_MonitorInfo1
;
2198 typedef [public,gensize
] struct {
2199 [relative
] nstring
*monitor_name
;
2200 [relative
] nstring
*environment
;
2201 [relative
] nstring
*dll_name
;
2202 } spoolss_MonitorInfo2
;
2204 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2205 [case(1)] spoolss_MonitorInfo1 info1
;
2206 [case(2)] spoolss_MonitorInfo2 info2
;
2208 } spoolss_MonitorInfo
;
2210 [public,noopnum
,noprint
] WERROR _spoolss_EnumMonitors
(
2211 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2213 [in,unique] DATA_BLOB
*buffer
,
2214 [in] uint32 offered
,
2215 [out,unique] DATA_BLOB
*info
,
2216 [out,ref] uint32
*needed
,
2217 [out,ref] uint32
*count
2219 [public,noopnum
,noprint
] void __spoolss_EnumMonitors
(
2222 [out,switch_is(level
)] spoolss_MonitorInfo info
[count
]
2224 [nopull
,nopush
] WERROR spoolss_EnumMonitors
(
2225 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2227 [in,unique] DATA_BLOB
*buffer
,
2228 [in] uint32 offered
,
2229 [out,ref] uint32
*count
,
2230 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_MonitorInfo
**info
,
2231 [out,ref] uint32
*needed
2234 /******************/
2235 /* Function: 0x25 */
2237 typedef [public,gensize
] struct {
2238 [string,charset
(UTF16
)] uint16
*port_name
;
2239 } spoolss_SetPortInfo1
;
2241 typedef [public,gensize
] struct {
2242 [string,charset
(UTF16
)] uint16
*port_name
;
2243 [string,charset
(UTF16
)] uint16
*monitor_name
;
2244 [string,charset
(UTF16
)] uint16
*description
;
2245 spoolss_PortType port_type
;
2247 } spoolss_SetPortInfo2
;
2249 typedef [public,gensize
] struct {
2250 spoolss_PortStatus status
;
2251 [string,charset
(UTF16
)] uint16
*status_string
;
2252 spoolss_PortSeverity severity
;
2253 } spoolss_SetPortInfo3
;
2255 typedef [public,gensize
] struct {
2256 [string,charset
(UTF16
)] uint16
*port_name
;
2257 DATA_BLOB monitor_data
; /* relative ?? */
2258 } spoolss_SetPortInfoFF
;
2260 typedef [switch_type(uint32
)] union {
2261 [case(1)] spoolss_SetPortInfo1
*info1
;
2262 [case(2)] spoolss_SetPortInfo2
*info2
;
2263 [case(3)] spoolss_SetPortInfo3
*info3
;
2264 [case(0xff)] spoolss_SetPortInfoFF
*infoFF
;
2265 } spoolss_SetPortInfo
;
2269 [switch_is(level
)] spoolss_SetPrinterInfo info
;
2270 } spoolss_SetPortInfoContainer
;
2272 WERROR spoolss_AddPort
(
2273 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
2274 [in] uint32 unknown
,
2275 [in] [string,charset
(UTF16
)] uint16 monitor_name
[]
2278 /******************/
2279 /* Function: 0x26 */
2280 [todo
] WERROR spoolss_ConfigurePort
(
2283 /******************/
2284 /* Function: 0x27 */
2285 WERROR spoolss_DeletePort
(
2286 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
2288 [in,ref] [string,charset
(UTF16
)] uint16
*port_name
2291 /******************/
2292 /* Function: 0x28 */
2293 WERROR spoolss_CreatePrinterIC
(
2294 [in,ref] policy_handle
*handle,
2295 [out,ref] policy_handle
*gdi_handle
,
2296 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
2299 /******************/
2300 /* Function: 0x29 */
2301 [todo
] WERROR spoolss_PlayGDIScriptOnPrinterIC
(
2304 /******************/
2305 /* Function: 0x2a */
2306 WERROR spoolss_DeletePrinterIC
(
2307 [in,out,ref] policy_handle
*gdi_handle
2310 /******************/
2311 /* Function: 0x2b */
2312 [todo
] WERROR spoolss_AddPrinterConnection
(
2315 /******************/
2316 /* Function: 0x2c */
2317 [todo
] WERROR spoolss_DeletePrinterConnection
(
2320 /******************/
2321 /* Function: 0x2d */
2322 [todo
] WERROR spoolss_PrinterMessageBox
(
2323 /* Marked as obsolete in MSDN. "Not necessary and has
2327 /******************/
2328 /* Function: 0x2e */
2329 [todo
] WERROR spoolss_AddMonitor
(
2332 /******************/
2333 /* Function: 0x2f */
2334 [todo
] WERROR spoolss_DeleteMonitor
(
2337 /******************/
2338 /* Function: 0x30 */
2339 [todo
] WERROR spoolss_DeletePrintProcessor
(
2342 /******************/
2343 /* Function: 0x31 */
2344 [todo
] WERROR spoolss_AddPrintProvidor
(
2347 /******************/
2348 /* Function: 0x32 */
2349 [todo
] WERROR spoolss_DeletePrintProvidor
(
2352 /******************/
2353 /* Function: 0x33 */
2355 typedef [public,gensize
] struct {
2356 [relative
] nstring
*name_array
;
2357 } spoolss_PrintProcDataTypesInfo1
;
2359 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2360 [case(1)] spoolss_PrintProcDataTypesInfo1 info1
;
2362 } spoolss_PrintProcDataTypesInfo
;
2364 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrintProcDataTypes
(
2365 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2366 [in,unique] [string,charset
(UTF16
)] uint16
*print_processor_name
,
2368 [in,unique] DATA_BLOB
*buffer
,
2369 [in] uint32 offered
,
2370 [out,unique] DATA_BLOB
*info
,
2371 [out,ref] uint32
*needed
,
2372 [out,ref] uint32
*count
2374 [public,noopnum
,noprint
] void __spoolss_EnumPrintProcDataTypes
(
2377 [out,switch_is(level
)] spoolss_PrintProcDataTypesInfo info
[count
]
2379 [nopull
,nopush
] WERROR spoolss_EnumPrintProcDataTypes
(
2380 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2381 [in,unique] [string,charset
(UTF16
)] uint16
*print_processor_name
,
2383 [in,unique] DATA_BLOB
*buffer
,
2384 [in] uint32 offered
,
2385 [out,ref] uint32
*count
,
2386 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrintProcDataTypesInfo
**info
,
2387 [out,ref] uint32
*needed
2390 /******************/
2391 /* Function: 0x34 */
2392 WERROR spoolss_ResetPrinter
(
2393 [in,ref] policy_handle
*handle,
2394 [in,unique] [string,charset
(UTF16
)] uint16
*data_type
,
2395 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
2398 /******************/
2399 /* Function: 0x35 */
2400 [public] WERROR spoolss_GetPrinterDriver2
(
2401 [in,ref] policy_handle
*handle,
2402 [in,unique] [string,charset
(UTF16
)] uint16
*architecture
,
2404 [in,unique] DATA_BLOB
*buffer
,
2405 [in] uint32 offered
,
2406 [in] uint32 client_major_version
,
2407 [in] uint32 client_minor_version
,
2408 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverInfo
*info
,
2409 [out,ref] uint32
*needed
,
2410 [out,ref] uint32
*server_major_version
,
2411 [out,ref] uint32
*server_minor_version
2414 /******************/
2415 /* Function: 0x36 */
2416 [todo
] WERROR spoolss_FindFirstPrinterChangeNotification
(
2419 /******************/
2420 /* Function: 0x37 */
2421 [todo
] WERROR spoolss_FindNextPrinterChangeNotification
(
2424 /******************/
2425 /* Function: 0x38 */
2426 [public] WERROR spoolss_FindClosePrinterNotify
(
2427 [in,ref] policy_handle
*handle
2430 /******************/
2431 /* Function: 0x39 */
2432 [todo
] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld
(
2435 /******************/
2436 /* Function: 0x3a */
2437 [public] WERROR spoolss_ReplyOpenPrinter
(
2438 [in,string,charset
(UTF16
)] uint16 server_name
[],
2439 [in] uint32 printer_local
,
2440 [in] winreg_Type type
,
2441 [in,range(0,512)] uint32 bufsize
,
2442 [in,unique,size_is(bufsize
)] uint8
*buffer
,
2443 [out,ref] policy_handle
*handle
2446 /******************/
2447 /* Function: 0x3b */
2449 typedef [bitmap32bit
] bitmap
{
2450 PRINTER_CHANGE_ADD_PRINTER
= 0x00000001,
2451 PRINTER_CHANGE_SET_PRINTER
= 0x00000002,
2452 PRINTER_CHANGE_DELETE_PRINTER
= 0x00000004,
2453 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER
= 0x00000008,
2454 PRINTER_CHANGE_ADD_JOB
= 0x00000100,
2455 PRINTER_CHANGE_SET_JOB
= 0x00000200,
2456 PRINTER_CHANGE_DELETE_JOB
= 0x00000400,
2457 PRINTER_CHANGE_WRITE_JOB
= 0x00000800,
2458 PRINTER_CHANGE_ADD_FORM
= 0x00010000,
2459 PRINTER_CHANGE_SET_FORM
= 0x00020000,
2460 PRINTER_CHANGE_DELETE_FORM
= 0x00040000,
2461 PRINTER_CHANGE_ADD_PORT
= 0x00100000,
2462 PRINTER_CHANGE_CONFIGURE_PORT
= 0x00200000,
2463 PRINTER_CHANGE_DELETE_PORT
= 0x00400000,
2464 PRINTER_CHANGE_ADD_PRINT_PROCESSOR
= 0x01000000,
2465 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR
= 0x04000000,
2466 PRINTER_CHANGE_SERVER
= 0x08000000,
2467 PRINTER_CHANGE_ADD_PRINTER_DRIVER
= 0x10000000,
2468 PRINTER_CHANGE_SET_PRINTER_DRIVER
= 0x20000000,
2469 PRINTER_CHANGE_DELETE_PRINTER_DRIVER
= 0x40000000,
2470 PRINTER_CHANGE_TIMEOUT
= 0x80000000
2471 } spoolss_PrinterChangeFlags
;
2473 const int PRINTER_CHANGE_PRINTER
= 0x000000FF;
2475 const int PRINTER_CHANGE_JOB
= 0x0000FF00;
2477 const int PRINTER_CHANGE_FORM
= (PRINTER_CHANGE_ADD_FORM |
2478 PRINTER_CHANGE_SET_FORM |
2479 PRINTER_CHANGE_DELETE_FORM
); /* 0x00070000 */
2481 const int PRINTER_CHANGE_PORT
= (PRINTER_CHANGE_ADD_PORT |
2482 PRINTER_CHANGE_CONFIGURE_PORT |
2483 PRINTER_CHANGE_DELETE_PORT
); /* 0x00700000 */
2485 const int PRINTER_CHANGE_PRINT_PROCESSOR
= 0x07000000;
2487 const int PRINTER_CHANGE_PRINTER_DRIVER
= (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
2488 PRINTER_CHANGE_SET_PRINTER_DRIVER |
2489 PRINTER_CHANGE_DELETE_PRINTER_DRIVER
); /* 0x70000000 */
2491 const int PRINTER_CHANGE_ALL
= (PRINTER_CHANGE_PRINTER |
2492 PRINTER_CHANGE_JOB |
2493 PRINTER_CHANGE_FORM |
2494 PRINTER_CHANGE_PORT |
2495 PRINTER_CHANGE_PRINT_PROCESSOR |
2496 PRINTER_CHANGE_PRINTER_DRIVER
); /* 0x7777FFFF */
2497 WERROR spoolss_RouterReplyPrinter
(
2498 [in,ref] policy_handle
*handle,
2499 [in] spoolss_PrinterChangeFlags flags
,
2500 [in,range(0,512)] uint32 bufsize
,
2501 [in,unique,size_is(bufsize
)] uint8
*buffer
2504 /******************/
2505 /* Function: 0x3c */
2506 [public] WERROR spoolss_ReplyClosePrinter
(
2507 [in,out,ref] policy_handle
*handle
2510 /******************/
2511 /* Function: 0x3d */
2514 uint32 monitor_data_size
;
2515 [size_is(monitor_data_size
),unique] uint8
*monitor_data
;
2516 } spoolss_PortVarContainer
;
2518 WERROR spoolss_AddPortEx
(
2519 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2520 [in,ref] spoolss_SetPortInfoContainer
*port_ctr
,
2521 [in,ref] spoolss_PortVarContainer
*port_var_ctr
,
2522 [in,unique] [string,charset
(UTF16
)] uint16
*monitor_name
2525 /******************/
2526 /* Function: 0x3e */
2527 [todo
] WERROR spoolss_RouterFindFirstPrinterChangeNotification
(
2530 /******************/
2531 /* Function: 0x3f */
2532 [todo
] WERROR spoolss_SpoolerInit
(
2535 /******************/
2536 /* Function: 0x40 */
2537 [todo
] WERROR spoolss_ResetPrinterEx
(
2540 typedef [enum16bit
,public] enum {
2541 JOB_NOTIFY_FIELD_PRINTER_NAME
= 0x00,
2542 JOB_NOTIFY_FIELD_MACHINE_NAME
= 0x01,
2543 JOB_NOTIFY_FIELD_PORT_NAME
= 0x02,
2544 JOB_NOTIFY_FIELD_USER_NAME
= 0x03,
2545 JOB_NOTIFY_FIELD_NOTIFY_NAME
= 0x04,
2546 JOB_NOTIFY_FIELD_DATATYPE
= 0x05,
2547 JOB_NOTIFY_FIELD_PRINT_PROCESSOR
= 0x06,
2548 JOB_NOTIFY_FIELD_PARAMETERS
= 0x07,
2549 JOB_NOTIFY_FIELD_DRIVER_NAME
= 0x08,
2550 JOB_NOTIFY_FIELD_DEVMODE
= 0x09,
2551 JOB_NOTIFY_FIELD_STATUS
= 0x0a,
2552 JOB_NOTIFY_FIELD_STATUS_STRING
= 0x0b,
2553 JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR
= 0x0c,
2554 JOB_NOTIFY_FIELD_DOCUMENT
= 0x0d,
2555 JOB_NOTIFY_FIELD_PRIORITY
= 0x0e,
2556 JOB_NOTIFY_FIELD_POSITION
= 0x0f,
2557 JOB_NOTIFY_FIELD_SUBMITTED
= 0x10,
2558 JOB_NOTIFY_FIELD_START_TIME
= 0x11,
2559 JOB_NOTIFY_FIELD_UNTIL_TIME
= 0x12,
2560 JOB_NOTIFY_FIELD_TIME
= 0x13,
2561 JOB_NOTIFY_FIELD_TOTAL_PAGES
= 0x14,
2562 JOB_NOTIFY_FIELD_PAGES_PRINTED
= 0x15,
2563 JOB_NOTIFY_FIELD_TOTAL_BYTES
= 0x16,
2564 JOB_NOTIFY_FIELD_BYTES_PRINTED
= 0x17
2565 } spoolss_JobNotifyField
;
2567 typedef [enum16bit
,public] enum {
2568 PRINTER_NOTIFY_FIELD_SERVER_NAME
= 0x00,
2569 PRINTER_NOTIFY_FIELD_PRINTER_NAME
= 0x01,
2570 PRINTER_NOTIFY_FIELD_SHARE_NAME
= 0x02,
2571 PRINTER_NOTIFY_FIELD_PORT_NAME
= 0x03,
2572 PRINTER_NOTIFY_FIELD_DRIVER_NAME
= 0x04,
2573 PRINTER_NOTIFY_FIELD_COMMENT
= 0x05,
2574 PRINTER_NOTIFY_FIELD_LOCATION
= 0x06,
2575 PRINTER_NOTIFY_FIELD_DEVMODE
= 0x07,
2576 PRINTER_NOTIFY_FIELD_SEPFILE
= 0x08,
2577 PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR
= 0x09,
2578 PRINTER_NOTIFY_FIELD_PARAMETERS
= 0x0a,
2579 PRINTER_NOTIFY_FIELD_DATATYPE
= 0x0b,
2580 PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR
= 0x0c,
2581 PRINTER_NOTIFY_FIELD_ATTRIBUTES
= 0x0d,
2582 PRINTER_NOTIFY_FIELD_PRIORITY
= 0x0e,
2583 PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY
= 0x0f,
2584 PRINTER_NOTIFY_FIELD_START_TIME
= 0x10,
2585 PRINTER_NOTIFY_FIELD_UNTIL_TIME
= 0x11,
2586 PRINTER_NOTIFY_FIELD_STATUS
= 0x12,
2587 PRINTER_NOTIFY_FIELD_STATUS_STRING
= 0x13,
2588 PRINTER_NOTIFY_FIELD_CJOBS
= 0x14,
2589 PRINTER_NOTIFY_FIELD_AVERAGE_PPM
= 0x15,
2590 PRINTER_NOTIFY_FIELD_TOTAL_PAGES
= 0x16,
2591 PRINTER_NOTIFY_FIELD_PAGES_PRINTED
= 0x17,
2592 PRINTER_NOTIFY_FIELD_TOTAL_BYTES
= 0x18,
2593 PRINTER_NOTIFY_FIELD_BYTES_PRINTED
= 0x19,
2594 PRINTER_NOTIFY_FIELD_OBJECT_GUID
= 0x1a,
2595 PRINTER_NOTIFY_FIELD_FRIENDLY_NAME
= 0x1b
2596 } spoolss_PrintNotifyField
;
2598 typedef [enum16bit
] enum {
2599 PRINTER_NOTIFY_TYPE
= 0x00,
2600 JOB_NOTIFY_TYPE
= 0x01
2601 } spoolss_NotifyType
;
2603 typedef [nodiscriminant
,noprint
] union {
2604 [case(PRINTER_NOTIFY_TYPE
)] uint16 field
;
2605 [case(JOB_NOTIFY_TYPE
)] uint16 field
;
2606 [default] uint16 field
;
2609 /******************/
2610 /* Function: 0x41 */
2612 spoolss_NotifyType type
;
2617 [size_is(count
),switch_is(type
)] spoolss_Field
*fields
;
2618 } spoolss_NotifyOptionType
;
2620 typedef [bitmap32bit
] bitmap
{
2621 PRINTER_NOTIFY_OPTIONS_REFRESH
= 0x00000001
2622 } spoolssNotifyOptionFlags
;
2625 [value
(2)] uint32
version;
2626 spoolssNotifyOptionFlags flags
;
2628 [size_is(count
)] spoolss_NotifyOptionType
*types
;
2629 } spoolss_NotifyOption
;
2631 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx
(
2632 [in,ref] policy_handle
*handle,
2633 [in] spoolss_PrinterChangeFlags flags
,
2634 [in] uint32 options
,
2635 [in,unique] [string,charset
(UTF16
)] uint16
*local_machine
,
2636 [in] uint32 printer_local
,
2637 [in,unique] spoolss_NotifyOption
*notify_options
2640 /******************/
2641 /* Function: 0x42 */
2645 [size_is(size
/2),unique,charset
(UTF16
)] uint16
*string;
2646 } spoolss_NotifyString
;
2648 typedef [v1_enum] enum {
2649 NOTIFY_TABLE_DWORD
= 0x0001,
2650 NOTIFY_TABLE_STRING
= 0x0002,
2651 NOTIFY_TABLE_DEVMODE
= 0x0003,
2652 NOTIFY_TABLE_TIME
= 0x0004,
2653 NOTIFY_TABLE_SECURITYDESCRIPTOR
= 0x0005
2654 } spoolss_NotifyTable
;
2656 typedef [switch_type(uint32
)] union {
2657 [case(1)] uint32 integer
[2];
2658 [case(2)] spoolss_NotifyString
string;
2659 [case(3)] spoolss_DevmodeContainer devmode
;
2660 [case(4)] spoolss_TimeCtr time
;
2661 [case(5)] sec_desc_buf sd
;
2662 } spoolss_NotifyData
;
2665 spoolss_NotifyType type
;
2666 [switch_is(type
)] spoolss_Field field
;
2667 spoolss_NotifyTable variable_type
;
2669 [switch_is(variable_type
)] spoolss_NotifyData data
;
2673 [value
(2)] uint32
version;
2676 [size_is(count
)] spoolss_Notify notifies
[];
2677 } spoolss_NotifyInfo
;
2679 typedef [switch_type(uint32
)] union {
2680 [case(0)] spoolss_NotifyInfo
*info0
;
2681 } spoolss_ReplyPrinterInfo
;
2683 typedef [bitmap32bit
] bitmap
{
2684 PRINTER_NOTIFY_INFO_DISCARDED
= 0x00000001,
2685 PRINTER_NOTIFY_INFO_DISCARDNOTED
= 0x00010000,
2686 PRINTER_NOTIFY_INFO_COLOR_MISMATCH
= 0x00080000
2687 } spoolss_PrinterNotifyFlags
;
2689 WERROR spoolss_RouterReplyPrinterEx
(
2690 [in,ref] policy_handle
*handle,
2692 [in] spoolss_PrinterChangeFlags flags
,
2693 [out,ref] spoolss_PrinterNotifyFlags
*reply_result
,
2694 [in] uint32 reply_type
,
2695 [in,switch_is(reply_type
)] spoolss_ReplyPrinterInfo info
2698 /******************/
2699 /* Function: 0x43 */
2700 [public] WERROR spoolss_RouterRefreshPrinterChangeNotify
(
2701 [in,ref] policy_handle
*handle,
2702 [in] uint32 change_low
,
2703 [in,unique] spoolss_NotifyOption
*options
,
2704 [out,ref] spoolss_NotifyInfo
**info
2707 /******************/
2708 /* Function: 0x44 */
2709 [todo
] WERROR spoolss_44
(
2714 [string,charset
(UTF16
)] uint16
*client
;
2715 [string,charset
(UTF16
)] uint16
*user
;
2717 spoolss_MajorVersion major
;
2718 spoolss_MinorVersion minor
;
2719 spoolss_ProcessorArchitecture processor
;
2720 } spoolss_UserLevel1
;
2724 } spoolss_UserLevel2
;
2730 [string,charset
(UTF16
)] uint16
*client
;
2731 [string,charset
(UTF16
)] uint16
*user
;
2733 spoolss_MajorVersion major
;
2734 spoolss_MinorVersion minor
;
2735 spoolss_ProcessorArchitecture processor
;
2737 } spoolss_UserLevel3
;
2739 typedef [switch_type(uint32
)] union {
2740 [case(1)] spoolss_UserLevel1
*level1
;
2741 [case(2)] spoolss_UserLevel2
*level2
;
2742 [case(3)] spoolss_UserLevel3
*level3
;
2743 } spoolss_UserLevel
;
2747 [switch_is(level
)] spoolss_UserLevel user_info
;
2748 } spoolss_UserLevelCtr
;
2751 SERVER_ACCESS_ADMINISTER
= 0x00000001,
2752 SERVER_ACCESS_ENUMERATE
= 0x00000002,
2753 PRINTER_ACCESS_ADMINISTER
= 0x00000004,
2754 PRINTER_ACCESS_USE
= 0x00000008,
2755 JOB_ACCESS_ADMINISTER
= 0x00000010,
2756 JOB_ACCESS_READ
= 0x00000020
2757 } spoolss_AccessRights
;
2759 /* Access rights for print servers */
2760 const int SERVER_ALL_ACCESS
= SEC_STD_REQUIRED |
2761 SERVER_ACCESS_ADMINISTER |
2762 SERVER_ACCESS_ENUMERATE
;
2764 const int SERVER_READ
= SEC_STD_READ_CONTROL |
2765 SERVER_ACCESS_ENUMERATE
;
2767 const int SERVER_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2768 SERVER_ACCESS_ADMINISTER |
2769 SERVER_ACCESS_ENUMERATE
;
2771 const int SERVER_EXECUTE
= SEC_STD_READ_CONTROL |
2772 SERVER_ACCESS_ENUMERATE
;
2774 /* Access rights for printers */
2775 const int PRINTER_ALL_ACCESS
= SEC_STD_REQUIRED |
2776 PRINTER_ACCESS_ADMINISTER |
2779 const int PRINTER_READ
= SEC_STD_READ_CONTROL |
2782 const int PRINTER_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2785 const int PRINTER_EXECUTE
= SEC_STD_READ_CONTROL |
2788 /* Access rights for jobs */
2789 const int JOB_ALL_ACCESS
= SEC_STD_REQUIRED |
2790 JOB_ACCESS_ADMINISTER
;
2792 const int JOB_READ
= SEC_STD_READ_CONTROL |
2793 JOB_ACCESS_ADMINISTER
;
2795 const int JOB_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2796 JOB_ACCESS_ADMINISTER
;
2798 const int JOB_EXECUTE
= SEC_STD_READ_CONTROL |
2799 JOB_ACCESS_ADMINISTER
;
2801 /* ACE masks for various print permissions */
2802 const int PRINTER_ACE_FULL_CONTROL
= SEC_GENERIC_ALL |
2805 const int PRINTER_ACE_MANAGE_DOCUMENTS
= SEC_GENERIC_ALL |
2806 READ_CONTROL_ACCESS
;
2808 const int PRINTER_ACE_PRINT
= GENERIC_EXECUTE_ACCESS |
2809 READ_CONTROL_ACCESS |
2812 /******************/
2813 /* Function: 0x45 */
2814 [public] WERROR spoolss_OpenPrinterEx
(
2815 [in,unique] [string,charset
(UTF16
)] uint16
*printername
,
2816 [in,unique] [string,charset
(UTF16
)] uint16
*datatype
,
2817 [in] spoolss_DevmodeContainer devmode_ctr
,
2818 [in] spoolss_AccessRights access_mask
,
2820 [in,switch_is(level
)] spoolss_UserLevel userlevel
,
2821 [out,ref] policy_handle
*handle
2824 /******************/
2825 /* Function: 0x46 */
2826 WERROR spoolss_AddPrinterEx
(
2827 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
2828 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
2829 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
2830 [in,ref] sec_desc_buf
*secdesc_ctr
,
2831 [in,ref] spoolss_UserLevelCtr
*userlevel_ctr
,
2832 [out,ref] policy_handle
*handle
2835 /******************/
2836 /* Function: 0x47 */
2837 WERROR spoolss_SetPort
(
2838 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2839 [in,unique] [string,charset
(UTF16
)] uint16
*port_name
,
2840 [in,ref] spoolss_SetPortInfoContainer
*port_ctr
2843 /******************/
2844 /* Function: 0x48 */
2845 WERROR spoolss_EnumPrinterData
(
2846 [in,ref] policy_handle
*handle,
2847 [in] uint32 enum_index
,
2848 [out,size_is(value_offered
/2),charset
(UTF16
)] uint16 value_name
[],
2849 [in] uint32 value_offered
,
2850 [out,ref] uint32
*value_needed
,
2851 [out,ref] winreg_Type
*type
,
2852 [out,ref,size_is(data_offered
),flag
(LIBNDR_PRINT_ARRAY_HEX
)] uint8
*data
,
2853 [in] uint32 data_offered
,
2854 [out,ref] uint32
*data_needed
2857 /******************/
2858 /* Function: 0x49 */
2859 WERROR spoolss_DeletePrinterData
(
2860 [in,ref] policy_handle
*handle,
2861 [in] [string,charset
(UTF16
)] uint16 value_name
[]
2864 /******************/
2865 /* Function: 0x4a */
2866 [todo
] WERROR spoolss_4a
(
2869 /******************/
2870 /* Function: 0x4b */
2871 [todo
] WERROR spoolss_4b
(
2874 /******************/
2875 /* Function: 0x4c */
2876 [todo
] WERROR spoolss_4c
(
2879 /******************/
2880 /* Function: 0x4d */
2881 WERROR spoolss_SetPrinterDataEx
(
2882 [in,ref] policy_handle
*handle,
2883 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2884 [in] [string,charset
(UTF16
)] uint16 value_name
[],
2885 [in] winreg_Type type
,
2886 [in,ref] [size_is(offered
)] uint8
*data
,
2890 /******************/
2891 /* Function: 0x4e */
2892 WERROR spoolss_GetPrinterDataEx
(
2893 [in,ref] policy_handle
*handle,
2894 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2895 [in] [string,charset
(UTF16
)] uint16 value_name
[],
2896 [out,ref] winreg_Type
*type
,
2897 [out,ref,size_is(offered
)] uint8
*data
,
2898 [in] uint32 offered
,
2899 [out,ref] uint32
*needed
2902 /******************/
2903 /* Function: 0x4f */
2905 typedef [relative_base
,public,gensize
] struct {
2906 [relative
] nstring
*value_name
;
2907 [value
(2*strlen_m_term
(value_name
))] uint32 value_name_len
;
2909 [relative
,subcontext
(0),subcontext_size
(data_length
),flag
(NDR_REMAINING|ndr_spoolss_PrinterEnumValues_align
(r
->type
))] DATA_BLOB
*data
;
2910 [value
(data ? data
->length
: 0)] uint32 data_length
;
2911 } spoolss_PrinterEnumValues
;
2913 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinterDataEx
(
2914 [in,ref] policy_handle
*handle,
2915 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2916 [out] DATA_BLOB info
,
2917 [in] uint32 offered
,
2918 [out,ref] uint32
*needed
,
2919 [out,ref] uint32
*count
2921 [public,noopnum
,noprint
] void __spoolss_EnumPrinterDataEx
(
2923 [out] spoolss_PrinterEnumValues info
[count
]
2925 [nopull
,nopush
] WERROR spoolss_EnumPrinterDataEx
(
2926 [in,ref] policy_handle
*handle,
2927 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2928 [in] uint32 offered
,
2929 [out,ref] uint32
*count
,
2930 [out,ref,size_is(,*count
)] spoolss_PrinterEnumValues
**info
,
2931 [out,ref] uint32
*needed
2934 typedef [nodiscriminant
] union {
2937 [default] nstring_array string_array
;
2940 /******************/
2941 /* Function: 0x50 */
2942 [public] WERROR spoolss_EnumPrinterKey
(
2943 [in, ref] policy_handle
*handle,
2944 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2945 [out,ref] uint32
*_ndr_size
,
2946 [out,ref,subcontext
(0),subcontext_size
(*_ndr_size
*2),switch_is(*_ndr_size
)] spoolss_KeyNames
*key_buffer
,
2947 [in] uint32 offered
,
2948 [out,ref] uint32
*needed
2951 /******************/
2952 /* Function: 0x51 */
2953 WERROR spoolss_DeletePrinterDataEx
(
2954 [in,ref] policy_handle
*handle,
2955 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2956 [in] [string,charset
(UTF16
)] uint16 value_name
[]
2959 /******************/
2960 /* Function: 0x52 */
2961 WERROR spoolss_DeletePrinterKey
(
2962 [in,ref] policy_handle
*handle,
2963 [in] [string,charset
(UTF16
)] uint16 key_name
[]
2966 /******************/
2967 /* Function: 0x53 */
2968 [todo
] WERROR spoolss_53
(
2971 /******************/
2972 /* Function: 0x54 */
2973 typedef [public,bitmap32bit
] bitmap
{
2974 DPD_DELETE_UNUSED_FILES
= 0x00000001,
2975 DPD_DELETE_SPECIFIC_VERSION
= 0x00000002,
2976 DPD_DELETE_ALL_FILES
= 0x00000004
2977 } spoolss_DeleteDriverFlags
;
2979 WERROR spoolss_DeletePrinterDriverEx
(
2980 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
2981 [in] [string,charset
(UTF16
)] uint16 architecture
[],
2982 [in] [string,charset
(UTF16
)] uint16 driver
[],
2983 [in] spoolss_DeleteDriverFlags delete_flags
,
2987 /******************/
2988 /* Function: 0x55 */
2989 WERROR spoolss_AddPerMachineConnection
(
2990 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
2991 [in,ref] [string,charset
(UTF16
)] uint16
*printername
,
2992 [in,ref] [string,charset
(UTF16
)] uint16
*printserver
,
2993 [in,ref] [string,charset
(UTF16
)] uint16
*provider
2996 /******************/
2997 /* Function: 0x56 */
2998 WERROR spoolss_DeletePerMachineConnection
(
2999 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
3000 [in,ref] [string,charset
(UTF16
)] uint16
*printername
3003 /******************/
3004 /* Function: 0x57 */
3005 [todo
] WERROR spoolss_EnumPerMachineConnections
(
3008 /******************/
3009 /* Function: 0x58 */
3011 typedef [v1_enum] enum {
3012 PROTOCOL_RAWTCP_TYPE
= 1,
3013 PROTOCOL_LPR_TYPE
= 2
3014 } spoolss_PortProtocol
;
3016 typedef [public] struct {
3017 [charset
(UTF16
)] uint16 portname
[64];
3018 [value
(0x00000001)] uint32
version;
3019 spoolss_PortProtocol protocol
;
3020 [value
(sizeof
(r
))] uint32 size
;
3022 [charset
(UTF16
)] uint16 hostaddress
[49];
3023 [charset
(UTF16
)] uint16 snmpcommunity
[33];
3025 [charset
(UTF16
)] uint16 queue
[33];
3026 [charset
(UTF16
)] uint16 ip_address
[16]; /* s3 had 17 */
3027 [charset
(UTF16
)] uint16 hardware_address
[13];
3028 [charset
(UTF16
)] uint16 device_type
[257];
3030 boolean32 snmp_enabled
;
3031 uint32 snmp_dev_index
;
3032 } spoolss_PortData1
;
3034 typedef [public] struct {
3035 [charset
(UTF16
)] uint16 portname
[64];
3036 [value
(0x00000002)] uint32
version;
3037 spoolss_PortProtocol protocol
;
3038 [value
(sizeof
(r
))] uint32 size
;
3040 [charset
(UTF16
)] uint16 hostaddress
[128];
3041 [charset
(UTF16
)] uint16 snmpcommunity
[33];
3043 [charset
(UTF16
)] uint16 queue
[33];
3044 [charset
(UTF16
)] uint16 device_type
[257];
3046 boolean32 snmp_enabled
;
3047 uint32 snmp_dev_index
;
3048 uint32 port_monitor_mib_index
;
3049 } spoolss_PortData2
;
3051 typedef [public] struct {
3053 } spoolss_MonitorUi
;
3055 WERROR spoolss_XcvData
(
3056 [in,ref] policy_handle
*handle,
3057 [in] [string,charset
(UTF16
)] uint16 function_name
[],
3058 [in] DATA_BLOB in_data
,
3059 [in,value
(r
->in.in_data.length
)] uint32 _in_data_length
,
3060 [out,ref] [size_is(out_data_size
)] uint8
*out_data
,
3061 [in] uint32 out_data_size
,
3062 [out,ref] uint32
*needed
,
3063 [in,out,ref] uint32
*status_code
3066 /******************/
3067 /* Function: 0x59 */
3069 typedef [bitmap32bit
] bitmap
{
3070 APD_STRICT_UPGRADE
= 0x00000001,
3071 APD_STRICT_DOWNGRADE
= 0x00000002,
3072 APD_COPY_ALL_FILES
= 0x00000004,
3073 APD_COPY_NEW_FILES
= 0x00000008,
3074 APD_COPY_FROM_DIRECTORY
= 0x00000010,
3075 APD_DONT_COPY_FILES_TO_CLUSTER
= 0x00001000,
3076 APD_COPY_TO_ALL_SPOOLERS
= 0x00002000,
3077 APD_RETURN_BLOCKING_STATUS_CODE
= 0x00010000
3078 } spoolss_AddPrinterDriverExFlags
;
3080 [public] WERROR spoolss_AddPrinterDriverEx
(
3081 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3082 [in,ref] spoolss_AddDriverInfoCtr
*info_ctr
,
3083 [in] spoolss_AddPrinterDriverExFlags flags
3086 /******************/
3087 /* Function: 0x5a */
3088 [todo
] WERROR spoolss_5a
(
3091 /******************/
3092 /* Function: 0x5b */
3093 [todo
] WERROR spoolss_5b
(
3096 /******************/
3097 /* Function: 0x5c */
3098 [todo
] WERROR spoolss_5c
(
3101 /******************/
3102 /* Function: 0x5d */
3103 [todo
] WERROR spoolss_5d
(
3106 /******************/
3107 /* Function: 0x5e */
3108 [todo
] WERROR spoolss_5e
(
3111 /******************/
3112 /* Function: 0x5f */
3113 [todo
] WERROR spoolss_5f
(
3116 /******************/
3117 /* Function: 0x60 */
3118 [todo
] WERROR spoolss_60
(
3121 /******************/
3122 /* Function: 0x61 */
3123 [todo
] WERROR spoolss_61
(
3126 /******************/
3127 /* Function: 0x62 */
3128 [todo
] WERROR spoolss_62
(
3131 /******************/
3132 /* Function: 0x63 */
3133 [todo
] WERROR spoolss_63
(
3136 /******************/
3137 /* Function: 0x64 */
3138 [todo
] WERROR spoolss_64
(
3141 /******************/
3142 /* Function: 0x65 */
3143 [todo
] WERROR spoolss_65
(
3146 /******************/
3147 /* Function: 0x66 */
3149 GUID core_driver_guid
;
3151 hyper driver_version
;
3152 [charset
(UTF8
)] uint8 formname
[520];
3153 } spoolss_CorePrinterDriver
;
3155 WERROR spoolss_GetCorePrinterDrivers
(
3156 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3157 [in,ref] [string,charset
(UTF16
)] uint16
*architecture
,
3158 [in] uint32 core_driver_size
,
3159 [in,size_is(core_driver_size
)] [charset
(UTF16
)] uint16
*core_driver_dependencies
,
3160 [in] uint32 core_printer_driver_count
,
3161 [out,size_is(core_printer_driver_count
)] spoolss_CorePrinterDriver
*core_printer_drivers
3164 /******************/
3165 /* Function: 0x67 */
3166 [todo
] WERROR spoolss_67
(
3169 /******************/
3170 /* Function: 0x68 */
3171 WERROR spoolss_GetPrinterDriverPackagePath
(
3172 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3173 [in,ref] [string,charset
(UTF16
)] uint16
*architecture
,
3174 [in,unique] [string,charset
(UTF16
)] uint16
*language
,
3175 [in,ref] [string,charset
(UTF16
)] uint16
*package_id
,
3176 [in,out,unique,size_is(driver_package_cab_size
)] [charset
(UTF16
)] uint16
*driver_package_cab
,
3177 [in] uint32 driver_package_cab_size
,
3178 [out,ref] uint32
*required
3181 /******************/
3182 /* Function: 0x69 */
3183 [todo
] WERROR spoolss_69
(
3186 /******************/
3187 /* Function: 0x6a */
3188 [todo
] WERROR spoolss_6a
(
3191 /******************/
3192 /* Function: 0x6b */
3193 [todo
] WERROR spoolss_6b
(
3196 /******************/
3197 /* Function: 0x6c */
3198 [todo
] WERROR spoolss_6c
(
3201 /******************/
3202 /* Function: 0x6d */
3203 [todo
] WERROR spoolss_6d
(