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]", "ncalrpc:"),
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 {
31 typedef [public] 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_ARM
= 0x0005,
39 PROCESSOR_ARCHITECTURE_IA64
= 0x0006,
40 PROCESSOR_ARCHITECTURE_AMD64
= 0x0009
41 } spoolss_ProcessorArchitecture
;
43 typedef [v1_enum] enum {
44 PROCESSOR_ARM
= 0x00000000,
45 PROCESSOR_INTEL_386
= 0x00000182, /* 386 */
46 PROCESSOR_INTEL_486
= 0x000001E6, /* 486 */
47 PROCESSOR_INTEL_PENTIUM
= 0x0000024A, /* 586 */
48 PROCESSOR_INTEL_IA64
= 0x00000898, /* 2200 */
49 PROCESSOR_AMD_X8664
= 0x000021D8 /* 8664 */
50 } spoolss_ProcessorType
;
52 typedef [v1_enum] enum {
53 /* Windows 95, Windows 98, Windows Me, Windows NT4 */
54 SPOOLSS_MAJOR_VERSION_NT4_95_98_ME
= 0x00000004,
55 /* Windows 2000, Windows 2003, Windows XP */
56 SPOOLSS_MAJOR_VERSION_2000_2003_XP
= 0x00000005,
57 /* Windows Vista, Windows 2008 */
58 SPOOLSS_MAJOR_VERSION_2008_VISTA
= 0x00000006
59 } spoolss_MajorVersion
;
61 typedef [v1_enum] enum {
62 /* Windows 2008, Windows Vista, Windows 2000, Windows NT4, Windows 95 */
63 SPOOLSS_MINOR_VERSION_0
= 0x00000000,
65 SPOOLSS_MINOR_VERSION_XP
= 0x00000001,
66 /* Windows 2003, Windows XP x64 */
67 SPOOLSS_MINOR_VERSION_2003_XP64
= 0x00000002,
69 SPOOLSS_MINOR_VERSION_98
= 0x0000000a,
71 SPOOLSS_MINOR_VERSION_ME
= 0x0000005a
72 } spoolss_MinorVersion
;
74 const int PRINTER_STATUS_OK
= 0x00000000;
76 typedef [public] bitmap
{
77 PRINTER_STATUS_PAUSED
= 0x00000001,
78 PRINTER_STATUS_ERROR
= 0x00000002,
79 PRINTER_STATUS_PENDING_DELETION
= 0x00000004,
80 PRINTER_STATUS_PAPER_JAM
= 0x00000008,
81 PRINTER_STATUS_PAPER_OUT
= 0x00000010,
82 PRINTER_STATUS_MANUAL_FEED
= 0x00000020,
83 PRINTER_STATUS_PAPER_PROBLEM
= 0x00000040,
84 PRINTER_STATUS_OFFLINE
= 0x00000080,
85 PRINTER_STATUS_IO_ACTIVE
= 0x00000100,
86 PRINTER_STATUS_BUSY
= 0x00000200,
87 PRINTER_STATUS_PRINTING
= 0x00000400,
88 PRINTER_STATUS_OUTPUT_BIN_FULL
= 0x00000800,
89 PRINTER_STATUS_NOT_AVAILABLE
= 0x00001000,
90 PRINTER_STATUS_WAITING
= 0x00002000,
91 PRINTER_STATUS_PROCESSING
= 0x00004000,
92 PRINTER_STATUS_INITIALIZING
= 0x00008000,
93 PRINTER_STATUS_WARMING_UP
= 0x00010000,
94 PRINTER_STATUS_TONER_LOW
= 0x00020000,
95 PRINTER_STATUS_NO_TONER
= 0x00040000,
96 PRINTER_STATUS_PAGE_PUNT
= 0x00080000,
97 PRINTER_STATUS_USER_INTERVENTION
= 0x00100000,
98 PRINTER_STATUS_OUT_OF_MEMORY
= 0x00200000,
99 PRINTER_STATUS_DOOR_OPEN
= 0x00400000,
100 PRINTER_STATUS_SERVER_UNKNOWN
= 0x00800000,
101 PRINTER_STATUS_POWER_SAVE
= 0x01000000
102 } spoolss_PrinterStatus
;
104 /* JOB status codes. */
106 const int JOB_STATUS_QUEUED
= 0x0000;
108 typedef [bitmap32bit
] bitmap
{
109 JOB_STATUS_PAUSED
= 0x00000001,
110 JOB_STATUS_ERROR
= 0x00000002,
111 JOB_STATUS_DELETING
= 0x00000004,
112 JOB_STATUS_SPOOLING
= 0x00000008,
113 JOB_STATUS_PRINTING
= 0x00000010,
114 JOB_STATUS_OFFLINE
= 0x00000020,
115 JOB_STATUS_PAPEROUT
= 0x00000040,
116 JOB_STATUS_PRINTED
= 0x00000080,
117 JOB_STATUS_DELETED
= 0x00000100,
118 JOB_STATUS_BLOCKED_DEVQ
= 0x00000200,
119 JOB_STATUS_USER_INTERVENTION
= 0x00000400,
120 JOB_STATUS_RESTART
= 0x00000800,
121 JOB_STATUS_COMPLETE
= 0x00001000
124 typedef [v1_enum] enum {
125 SPOOLSS_DEBUGGING_BUILD
= 0x00000000,
126 SPOOLSS_RELEASE_BUILD
= 0x00000001
129 typedef [public,gensize
] struct {
130 [relative
] nstring
*printername
;
131 [relative
] nstring
*servername
;
136 uint32 global_counter
;
139 spoolss_Build free_build
;
142 uint32 session_counter
;
143 uint32 num_error_out_of_paper
;
144 uint32 num_error_not_ready
;
145 spoolss_JobStatus job_error
;
146 uint32 number_of_processors
;
147 spoolss_ProcessorType processor_type
;
148 uint32 high_part_total_bytes
;
151 spoolss_PrinterStatus status
;
152 uint32 enumerate_network_printers
;
154 spoolss_ProcessorArchitecture processor_architecture
;
155 uint16 processor_level
;
159 } spoolss_PrinterInfo0
;
161 /* Device Mode Extra Data */
163 typedef [v1_enum] enum {
164 SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
= 0x554e4944, /* 0x44494e55 */
165 SPOOLSS_DM_SIGNATURE_JTEXP
= 0x4a544d53, /* 0x534d544a */
166 SPOOLSS_DM_SIGNATURE_PSEXTRA
= 0x50524956 /* 0x56495250 */
167 } spoolss_DM_Signature
;
169 typedef [v1_enum] enum {
170 SPOOLSS_DM_LAYOUT_NUP_DISABLED
= 0x00000000,
171 SPOOLSS_DM_LAYOUT_NUP_2
= 0x00000001,
172 SPOOLSS_DM_LAYOUT_NUP_4
= 0x00000002,
173 SPOOLSS_DM_LAYOUT_NUP_6
= 0x00000003,
174 SPOOLSS_DM_LAYOUT_NUP_9
= 0x00000004,
175 SPOOLSS_DM_LAYOUT_NUP_16
= 0x00000005,
176 SPOOLSS_DM_LAYOUT_BOOKLET
= 0x00000006
179 typedef [v1_enum] enum {
180 SPOOLSS_DM_NUP_DIRECTION_L2R_T2B
= 0x00000001,
181 SPOOLSS_DM_NUP_DIRECTION_T2B_L2R
= 0x00000002,
182 SPOOLSS_DM_NUP_DIRECTION_R2L_T2B
= 0x00000004,
183 SPOOLSS_DM_NUP_DIRECTION_T2B_R2L
= 0x00000008
184 } spoolss_DM_NupDirection
;
186 typedef [v1_enum] enum {
187 SPOOLSS_DM_NUP_BORDER_PRINT
= 0x00000000,
188 SPOOLSS_DM_NUP_BORDER_NONE
= 0x00000001
189 } spoolss_DM_NupBorderFlags
;
191 typedef [v1_enum] enum {
192 SPOOLSS_DM_BOOKLET_LEFT_FLIP
= 0x00000000,
193 SPOOLSS_DM_BOOKLET_RIGHT_FLIP
= 0x00000001
194 } spoolss_DM_BookletFlags
;
196 /* Device Mode Extra Data: PostScript */
200 typedef [bitmap32bit
] bitmap
{
201 SPOOLSS_DM_PS_FLAGS_DRV_ERROR_HANDLER
= 0x00000002,
202 SPOOLSS_DM_PS_FLAGS_PRINT_MIRROR
= 0x00000004,
203 SPOOLSS_DM_PS_FLAGS_PRINT_NEGATIVE
= 0x00000010,
204 SPOOLSS_DM_PS_FLAGS_COMPRESS_BITMAP
= 0x00000040,
205 SPOOLSS_DM_PS_FLAGS_ROTATE_180
= 0x00000200,
206 SPOOLSS_DM_PS_FLAGS_GDI_METAFILE_SPOOL
= 0x00002000
207 } spoolss_DMPS_Flags
;
210 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
211 spoolss_DMPS_Flags dwFlags
;
212 uint32 wchEPSFile
[12];
213 [value
(24)] uint16 caSize
;
215 uint16 caIlluminantIndex
;
219 uint16 caReferenceBlack
;
220 uint16 caReferenceWhite
;
223 uint16 caColorfulness
;
224 uint16 caRedGreenTint
;
225 } spoolss_PSDRVEXTRA351
;
230 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
231 spoolss_DMPS_Flags dwFlags
;
232 uint32 wchEPSFile
[12];
233 [value
(24)] uint16 caSize
;
235 uint16 caIlluminantIndex
;
239 uint16 caReferenceBlack
;
240 uint16 caReferenceWhite
;
243 uint16 caColorfulness
;
244 uint16 caRedGreenTint
;
247 uint32 aubOptions
[8];
248 } spoolss_PSDRVEXTRA400
;
252 typedef [v1_enum] enum {
253 SPOOLSS_DM_PS_OPTIMIZE_SPEED
= 0x00000000,
254 SPOOLSS_DM_PS_OPTIMIZE_PORTABILITY
= 0x00000001,
255 SPOOLSS_DM_PS_OPTIMIZE_EPS
= 0x00000002,
256 SPOOLSS_DM_PS_OPTIMIZE_ARCHIVAL
= 0x00000003
257 } spoolss_DMPS_Dialect
;
259 typedef [v1_enum] enum {
260 SPOOLSS_DM_PS_TTDLFMT_DEFAULT
= 0x00000000,
261 SPOOLSS_DM_PS_TTDLFMT_TYPE_1
= 0x00000001,
262 SPOOLSS_DM_PS_TTDLFMT_TYPE_3
= 0x00000002,
263 SPOOLSS_DM_PS_TTDLFMT_TYPE_42
= 0x00000003
264 } spoolss_DMPS_TTDLFmt
;
266 typedef [v1_enum] enum {
267 SPOOLSS_DM_PS_PSLEVEL_1
= 0x00000001,
268 SPOOLSS_DM_PS_PSLEVEL_2
= 0x00000002,
269 SPOOLSS_DM_PS_PSLEVEL_3
= 0x00000003
270 } spoolss_DMPS_PSLevel
;
273 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST
= 0x0000,
274 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST
= 0x0001,
275 SPOOLSS_DM_PS_FEED_DIRECTION_LONG_EDGE_FIRST_UPSIDEDOWN
= 0x0002,
276 SPOOLSS_DM_PS_FEED_DIRECTION_SHORT_EDGE_FIRST_UPSIDEDOWN
= 0x0003
277 } spoolss_DMPS_FeedDirection
;
280 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
281 spoolss_DMPS_Flags dwFlags
;
282 uint32 wchEPSFile
[12];
283 [value
(24)] uint16 caSize
;
285 uint16 caIlluminantIndex
;
289 uint16 caReferenceBlack
;
290 uint16 caReferenceWhite
;
293 uint16 caColorfulness
;
294 uint16 caRedGreenTint
;
299 spoolss_DMPS_Dialect iDialect
;
300 spoolss_DMPS_TTDLFmt iTTDLFmt
;
301 boolean32 bReversePrint
;
302 spoolss_DM_Layout iLayout
;
303 spoolss_DMPS_PSLevel iPSLevel
;
306 [value
(0x0010)] uint16 wVer
;
309 uint32 dwWidthOffset
;
310 uint32 dwHeightOffset
;
311 spoolss_DMPS_FeedDirection wFeedDirection
;
313 uint32 dwReserved3
[4];
316 uint32 aOptions
[128];
317 } spoolss_PSDRVEXTRA500
;
322 [value
(SPOOLSS_DM_SIGNATURE_PSEXTRA
)] spoolss_DM_Signature dwSignature
;
323 spoolss_DMPS_Flags dwFlags
;
324 uint32 wchEPSFile
[12];
325 [value
(24)] uint16 caSize
;
327 uint16 caIlluminantIndex
;
331 uint16 caReferenceBlack
;
332 uint16 caReferenceWhite
;
335 uint16 caColorfulness
;
336 uint16 caRedGreenTint
;
337 uint16 wCoreJTExpSize
;
338 [value
(ndr_size_spoolss_PSDRVEXTRA
(r
, ndr
->flags
) + wCoreJTExpSize
)] uint16 wCoreFullSize
;
341 spoolss_DMPS_Dialect iDialect
;
342 spoolss_DMPS_TTDLFmt iTTDLFmt
;
343 boolean32 bReversePrint
;
344 spoolss_DM_Layout iLayout
;
345 spoolss_DMPS_PSLevel iPSLevel
;
348 [value
(0x0010)] uint16 wVer
;
351 uint32 dwWidthOffset
;
352 uint32 dwHeightOffset
;
353 spoolss_DMPS_FeedDirection wFeedDirection
;
355 uint32 dwReserved3
[4];
358 uint32 aOptions
[128];
359 spoolss_DM_NupDirection dwNupDirection
;
360 spoolss_DM_NupBorderFlags dwNupBorderFlags
;
361 spoolss_DM_BookletFlags dwBookletFlags
;
363 } spoolss_PSDRVEXTRA
;
365 /* Device Mode Extra Data: UniDriver */
370 uint16 wReserved
[56];
371 } spoolss_UNIDRVEXTRA3_4
;
375 typedef [v1_enum] enum {
376 SPOOLSS_DM_UNI_QUALITY_BEST
= 0x00000000,
377 SPOOLSS_DM_UNI_QUALITY_MEDIUM
= 0x00000001,
378 SPOOLSS_DM_UNI_QUALITY_DRAFT
= 0x00000002
379 } spoolss_DMUNI_Quality
;
381 typedef [bitmap32bit
] bitmap
{
382 SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS
= 0x00000002,
383 SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL
= 0x00000010,
384 SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING
= 0x00000080
385 } spoolss_DMUNI_Flags
;
388 [value
(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
)] spoolss_DM_Signature dwSignature
;
389 [value
(0x0022)] uint16 wVer
;
394 spoolss_DMUNI_Flags dwFlags
;
395 boolean32 bReversePrint
;
396 spoolss_DM_Layout iLayout
;
397 spoolss_DMUNI_Quality iQuality
;
400 uint32 aOptions
[128];
401 } spoolss_UNIDRVEXTRA500
;
405 typedef [public,gensize
] struct {
406 [value
(SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
)] spoolss_DM_Signature dwSignature
;
407 [value
(0x0022)] uint16 wVer
;
408 uint16 wCoreJTExpSize
;
409 [value
(ndr_size_spoolss_UNIDRVEXTRA
(r
, ndr
->flags
) + wCoreJTExpSize
)] uint16 wCoreFullSize
;
412 spoolss_DMUNI_Flags dwFlags
;
413 boolean32 bReversePrint
;
414 spoolss_DM_Layout iLayout
;
415 spoolss_DMUNI_Quality iQuality
;
418 uint32 aOptions
[128];
419 spoolss_DM_NupDirection dwNupDirection
;
420 spoolss_DM_NupBorderFlags dwNupBorderFlags
;
421 spoolss_DM_BookletFlags dwBookletFlags
;
422 } spoolss_UNIDRVEXTRA
;
424 /* Device Mode Extra Data: JTEXP */
428 [value
(SPOOLSS_DM_SIGNATURE_JTEXP
)] spoolss_DM_Signature dwSignature
;
429 [value
(0)] uint32 dwVersion
;
430 [value
(16)] uint16 wJTHdrSize
;
431 uint16 wCoreMFOSize
; /* must be sizeof the two following elements, must be dwSize - 16*/
433 [flag
(STR_UTF8|STR_NULLTERM|NDR_REMAINING
)] string_array FeatureOptionPairs
;
436 /* Device Mode Extra Data: OEM_DMEXTRA */
440 spoolss_DM_Signature dwSignature
;
442 [flag
(NDR_REMAINING
)] DATA_BLOB Data
;
443 } spoolss_OEM_DMEXTRA
;
445 typedef [nodiscriminant
] union {
446 [case(0x0350)] spoolss_PSDRVEXTRA351 psdrvextra351
;
447 [case(0x0400)] spoolss_PSDRVEXTRA400 psdrvextra400
;
448 [case(0x0501)] spoolss_PSDRVEXTRA500 psdrvextra500
;
449 [case(0x0600)] spoolss_PSDRVEXTRA psdrvextra
;
450 [default] [flag
(NDR_REMAINING
)] DATA_BLOB psblob
;
451 } spoolss_DeviceModeExtraDataPostScript
;
453 typedef [nodiscriminant
] union {
454 [case(0x0301)] spoolss_UNIDRVEXTRA3_4 unidrvextra3_4
;
455 [case(0x0500)] spoolss_UNIDRVEXTRA500 unidrvextra500
;
456 [case(0x0600)] spoolss_UNIDRVEXTRA unidrvextra
;
457 [default] [flag
(NDR_REMAINING
)] DATA_BLOB uniblob
;
458 } spoolss_DeviceModeExtraDataUniDriver
;
460 typedef [bitmap32bit
] bitmap
{
461 DEVMODE_ORIENTATION
= 0x00000001,
462 DEVMODE_PAPERSIZE
= 0x00000002,
463 DEVMODE_PAPERLENGTH
= 0x00000004,
464 DEVMODE_PAPERWIDTH
= 0x00000008,
465 DEVMODE_SCALE
= 0x00000010,
466 DEVMODE_POSITION
= 0x00000020,
467 DEVMODE_NUP
= 0x00000040,
468 DEVMODE_COPIES
= 0x00000100,
469 DEVMODE_DEFAULTSOURCE
= 0x00000200,
470 DEVMODE_PRINTQUALITY
= 0x00000400,
471 DEVMODE_COLOR
= 0x00000800,
472 DEVMODE_DUPLEX
= 0x00001000,
473 DEVMODE_YRESOLUTION
= 0x00002000,
474 DEVMODE_TTOPTION
= 0x00004000,
475 DEVMODE_COLLATE
= 0x00008000,
476 DEVMODE_FORMNAME
= 0x00010000,
477 DEVMODE_LOGPIXELS
= 0x00020000,
478 DEVMODE_BITSPERPEL
= 0x00040000,
479 DEVMODE_PELSWIDTH
= 0x00080000,
480 DEVMODE_PELSHEIGHT
= 0x00100000,
481 DEVMODE_DISPLAYFLAGS
= 0x00200000,
482 DEVMODE_DISPLAYFREQUENCY
= 0x00400000,
483 DEVMODE_ICMMETHOD
= 0x00800000,
484 DEVMODE_ICMINTENT
= 0x01000000,
485 DEVMODE_MEDIATYPE
= 0x02000000,
486 DEVMODE_DITHERTYPE
= 0x04000000,
487 DEVMODE_PANNINGWIDTH
= 0x08000000,
488 DEVMODE_PANNINGHEIGHT
= 0x10000000
489 } spoolss_DeviceModeFields
;
491 typedef [enum16bit
] enum {
493 DMSPEC_WIN95_98_ME
= 0x400,
494 DMSPEC_NT4_AND_ABOVE
= 0x401
495 } spoolss_DeviceModeSpecVersion
;
497 typedef [enum16bit
] enum {
498 DMORIENT_PORTRAIT
= 0x0001,
499 DMORIENT_LANDSCAPE
= 0x0002
500 } spoolss_DeviceModeOrientation
;
502 typedef [enum16bit
] enum {
503 DMPAPER_LETTER
= 0x0001, /* Letter, 8 1/2 x 11 inches */
504 DMPAPER_LETTERSMALL
= 0x0002, /* Letter Small, 8 1/2 x 11 inches */
505 DMPAPER_TABLOID
= 0x0003, /* Tabloid, 11 x 17 inches */
506 DMPAPER_LEDGER
= 0x0004, /* Ledger, 17 x 11 inches */
507 DMPAPER_LEGAL
= 0x0005, /* Legal, 8 1/2 x 14 inches */
508 DMPAPER_STATEMENT
= 0x0006, /* Statement, 5 1/2 x 8 1/2 inches */
509 DMPAPER_EXECUTIVE
= 0x0007, /* Executive, 7 1/4 x 10 1/2 inches */
510 DMPAPER_A3
= 0x0008, /* A3 sheet, 297 x 420 millimeters */
511 DMPAPER_A4
= 0x0009, /* A4 sheet, 210 x 297 millimeters */
512 DMPAPER_A4SMALL
= 0x000A, /* A4 small sheet, 210 x 297 millimeters */
513 DMPAPER_A5
= 0x000B, /* A5 sheet, 148 x 210 millimeters */
514 DMPAPER_B4
= 0x000C, /* B4 sheet, 250 x 354 millimeters */
515 DMPAPER_B5
= 0x000D, /* B5 sheet, 182 x 257-millimeter paper */
516 DMPAPER_FOLIO
= 0x000E, /* Folio, 8 1/2 x 13-inch paper */
517 DMPAPER_QUARTO
= 0x000F, /* Quarto, 215 x 275 millimeter paper */
518 DMPAPER_10X14
= 0x0010, /* 10 x 14-inch sheet */
519 DMPAPER_11X17
= 0x0011, /* 11 x 17-inch sheet */
520 DMPAPER_NOTE
= 0x0012, /* Note, 8 1/2 x 11-inches */
521 DMPAPER_ENV_9
= 0x0013, /* #9 Envelope, 3 7/8 x 8 7/8 inches */
522 DMPAPER_ENV_10
= 0x0014, /* #10 Envelope, 4 1/8 x 9 1/2 inches */
523 DMPAPER_ENV_11
= 0x0015, /* #11 Envelope, 4 1/2 x 10 3/8 inches */
524 DMPAPER_ENV_12
= 0x0016, /* #12 Envelope, 4 3/4 x 11 inches */
525 DMPAPER_ENV_14
= 0x0017, /* #14 Envelope, 5 x 11 1/2 inches */
526 DMPAPER_CSHEET
= 0x0018, /* C Sheet, 17 x 22 inches */
527 DMPAPER_DSHEET
= 0x0019, /* D Sheet, 22 x 34 inches */
528 DMPAPER_ESHEET
= 0x001A, /* E Sheet, 34 x 44 inches */
529 DMPAPER_ENV_DL
= 0x001B, /* DL Envelope, 110 x 220 millimeters */
530 DMPAPER_ENV_C5
= 0x001C, /* C5 Envelope, 162 x 229 millimeters */
531 DMPAPER_ENV_C3
= 0x001D, /* C3 Envelope, 324 x 458 millimeters */
532 DMPAPER_ENV_C4
= 0x001E, /* C4 Envelope, 229 x 324 millimeters */
533 DMPAPER_ENV_C6
= 0x001F, /* C6 Envelope, 114 x 162 millimeters */
534 DMPAPER_ENV_C65
= 0x0020, /* C65 Envelope, 114 x 229 millimeters */
535 DMPAPER_ENV_B4
= 0x0021, /* B4 Envelope, 250 x 353 millimeters */
536 DMPAPER_ENV_B5
= 0x0022, /* B5 Envelope, 176 x 250 millimeters */
537 DMPAPER_ENV_B6
= 0x0023, /* B6 Envelope, 176 x 125 millimeters */
538 DMPAPER_ENV_ITALY
= 0x0024, /* Italy Envelope, 110 x 230 millimeters */
539 DMPAPER_ENV_MONARCH
= 0x0025, /* Monarch Envelope, 3 7/8 x 7 1/2 inches */
540 DMPAPER_ENV_PERSONAL
= 0x0026, /* 6 3/4 Envelope, 3 5/8 x 6 1/2 inches */
541 DMPAPER_FANFOLD_US
= 0x0027, /* US Std Fanfold, 14 7/8 x 11 inches */
542 DMPAPER_FANFOLD_STD_GERMAN
= 0x0028, /* German Std Fanfold, 8 1/2 x 12 inches */
543 DMPAPER_FANFOLD_LGL_GERMAN
= 0x0029, /* German Legal Fanfold, 8 x 13 inches */
544 DMPAPER_DBL_JAPANESE_POSTCARD
= 0x0045, /* Double Japanese Postcard, 200 x 148 millimeters */
545 DMPAPER_A6
= 0x0046, /* A6 sheet, 105 x 148 millimeters */
546 DMPAPER_JENV_KAKU2
= 0x0047, /* Japanese Envelope Kaku #2 */
547 DMPAPER_JENV_KAKU3
= 0x0048, /* Japanese Envelope Kaku #3 */
548 DMPAPER_JENV_CHOU3
= 0x0049, /* Japanese Envelope Chou #3 */
549 DMPAPER_JENV_CHOU4
= 0x004A, /* Japanese Envelope Chou #4 */
550 DMPAPER_LETTER_ROTATED
= 0x004B, /* Letter Rotated, 11 by 8 1/2 inches */
551 DMPAPER_A3_ROTATED
= 0x004C, /* A3 rotated sheet, 420 x 297 millimeters */
552 DMPAPER_A4_ROTATED
= 0x004D, /* A4 rotated sheet, 297 x 210 millimeters */
553 DMPAPER_A5_ROTATED
= 0x004E, /* A5 rotated sheet, 210 x 148 millimeters */
554 DMPAPER_B4_JIS_ROTATED
= 0x004F, /* B4 (JIS) rotated sheet, 364 x 257 millimeters */
555 DMPAPER_B5_JIS_ROTATED
= 0x0050, /* B5 (JIS) rotated sheet, 257 x 182 millimeters */
556 DMPAPER_JAPANESE_POSTCARD_ROTATED
= 0x0051, /* Japanese Postcard Rotated, 148 x 100 millimeters */
557 DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED
= 0x0052, /* Double Japanese Postcard Rotated, 148 x 200 millimeters */
558 DMPAPER_A6_ROTATED
= 0x0053, /* A6 rotated sheet, 148 x 105 millimeters */
559 DMPAPER_JENV_KAKU2_ROTATED
= 0x0054, /* Japanese Envelope Kaku #2 Rotated */
560 DMPAPER_JENV_KAKU3_ROTATED
= 0x0055, /* Japanese Envelope Kaku #3 Rotated */
561 DMPAPER_JENV_CHOU3_ROTATED
= 0x0056, /* Japanese Envelope Chou #3 Rotated */
562 DMPAPER_JENV_CHOU4_ROTATED
= 0x0057, /* Japanese Envelope Chou #4 Rotated */
563 DMPAPER_B6_JIS
= 0x0058, /* B6 (JIS) sheet, 128 x 182 millimeters */
564 DMPAPER_B6_JIS_ROTATED
= 0x0059, /* B6 (JIS) rotated sheet, 182 x 128 millimeters */
565 DMPAPER_12X11
= 0x005A, /* 12 x 11-inch sheet */
566 DMPAPER_JENV_YOU4
= 0x005B, /* Japanese Envelope You #4 */
567 DMPAPER_JENV_YOU4_ROTATED
= 0x005C, /* Japanese Envelope You #4 */
568 DMPAPER_P16K
= 0x005D, /* PRC 16K, 146 x 215 millimeters */
569 DMPAPER_P32K
= 0x005E, /* PRC 32K, 97 x 151 millimeters */
570 DMPAPER_P32KBIG
= 0x005F, /* PRC 32K(Big) 97 x 151 millimeters */
571 DMPAPER_PENV_1
= 0x0060, /* PRC Envelope #1, 102 by 165 millimeters */
572 DMPAPER_PENV_2
= 0x0061, /* PRC Envelope #2, 102 x 176 millimeters */
573 DMPAPER_PENV_3
= 0x0062, /* PRC Envelope #3, 125 x 176 millimeters */
574 DMPAPER_PENV_4
= 0x0063, /* PRC Envelope #4, 110 x 208 millimeters */
575 DMPAPER_PENV_5
= 0x0064, /* PRC Envelope #5, 110 x 220 millimeters */
576 DMPAPER_PENV_6
= 0x0065, /* PRC Envelope #6, 120 x 230 millimeters */
577 DMPAPER_PENV_7
= 0x0066, /* PRC Envelope #7, 160 x 230 millimeters */
578 DMPAPER_PENV_8
= 0x0067, /* PRC Envelope #8, 120 x 309 millimeters */
579 DMPAPER_PENV_9
= 0x0068, /* PRC Envelope #9, 229 x 324 millimeters */
580 DMPAPER_PENV_10
= 0x0069, /* PRC Envelope #10, 324 x 458 millimeters */
581 DMPAPER_P16K_ROTATED
= 0x006A, /* PRC 16K Rotated, 215 x 146 millimeters */
582 DMPAPER_P32K_ROTATED
= 0x006B, /* PRC 32K Rotated, 151 x 97 millimeters */
583 DMPAPER_P32KBIG_ROTATED
= 0x006C, /* PRC 32K(Big) Rotated, 151 x 97 millimeters */
584 DMPAPER_PENV_1_ROTATED
= 0x006D, /* PRC Envelope #1 Rotated, 165 x 102 millimeters */
585 DMPAPER_PENV_2_ROTATED
= 0x006E, /* PRC Envelope #2 Rotated, 176 x 102 millimeters */
586 DMPAPER_PENV_3_ROTATED
= 0x006F, /* PRC Envelope #3 Rotated, 176 x 125 millimeters */
587 DMPAPER_PENV_4_ROTATED
= 0x0070, /* PRC Envelope #4 Rotated, 208 x 110 millimeters */
588 DMPAPER_PENV_5_ROTATED
= 0x0071, /* PRC Envelope #5 Rotated, 220 x 110 millimeters */
589 DMPAPER_PENV_6_ROTATED
= 0x0072, /* PRC Envelope #6 Rotated, 230 x 120 millimeters */
590 DMPAPER_PENV_7_ROTATED
= 0x0073, /* PRC Envelope #7 Rotated, 230 x 160 millimeters */
591 DMPAPER_PENV_8_ROTATED
= 0x0074, /* PRC Envelope #8 Rotated, 309 x 120 millimeters */
592 DMPAPER_PENV_9_ROTATED
= 0x0075, /* PRC Envelope #9 Rotated, 324 x 229 millimeters */
593 DMPAPER_PENV_10_ROTATED
= 0x0076 /* PRC Envelope #10 Rotated, 458 x 324 millimeters */
594 } spoolss_DeviceModePaperSize
;
596 typedef [enum16bit
] enum {
597 DMBIN_UPPER
= 0x0001,
598 DMBIN_LOWER
= 0x0002,
599 DMBIN_MIDDLE
= 0x0003,
600 DMBIN_MANUAL
= 0x0004,
601 DMBIN_ENVELOPE
= 0x0005,
602 DMBIN_ENVMANUAL
= 0x0006,
604 DMBIN_TRACTOR
= 0x0008,
605 DMBIN_SMALLFMT
= 0x0009,
606 DMBIN_LARGEFMT
= 0x000a,
607 DMBIN_LARGECAPACITY
= 0x000b,
608 DMBIN_CASSETTE
= 0x000e,
609 DMBIN_FORMSOURCE
= 0x000f
610 } spoolss_DeviceModeDefaultSource
;
612 typedef [enum16bit
] enum {
614 DMRES_MEDIUM
= 0xfffd,
617 } spoolss_DeviceModePrintQuality
;
619 typedef [enum16bit
] enum {
620 DMRES_MONOCHROME
= 0x0001,
622 } spoolss_DeviceModeColor
;
624 typedef [enum16bit
] enum {
625 DMDUP_SIMPLEX
= 0x0001,
626 DMDUP_VERTICAL
= 0x0002,
627 DMDUP_HORIZONTAL
= 0x0003
628 } spoolss_DeviceModeDuplex
;
630 typedef [enum16bit
] enum {
631 DMTT_BITMAP
= 0x0001,
632 DMTT_DOWNLOAD
= 0x0002,
633 DMTT_SUBDEV
= 0x0003,
634 DMTT_DOWNLOAD_OUTLINE
= 0x0004
635 } spoolss_DeviceModeTTOption
;
637 typedef [enum16bit
] enum {
638 DMCOLLATE_FALSE
= 0x0000,
639 DMCOLLATE_TRUE
= 0x0001
640 } spoolss_DeviceModeCollate
;
642 typedef [v1_enum] enum {
643 DMNUP_SYSTEM
= 0x00000001,
644 DMNUP_ONEUP
= 0x00000002
645 } spoolss_DeviceModeNUp
;
647 typedef [v1_enum] enum {
648 DMICMMETHOD_NONE
= 0x00000001,
649 DMICMMETHOD_SYSTEM
= 0x00000002,
650 DMICMMETHOD_DRIVER
= 0x00000003,
651 DMICMMETHOD_DEVICE
= 0x00000004
652 } spoolss_DeviceModeICMMethod
;
654 typedef [v1_enum] enum {
655 DMICM_SATURATE
= 0x00000001,
656 DMICM_CONTRAST
= 0x00000002,
657 DMICM_COLORIMETRIC
= 0x00000003,
658 DMICM_ABS_COLORIMETRIC
= 0x00000004
659 } spoolss_DeviceModeICMIntent
;
661 typedef [v1_enum] enum {
662 DMMEDIA_STANDARD
= 0x00000001,
663 DMMEDIA_TRANSPARENCY
= 0x00000002,
664 DMMEDIA_GLOSSY
= 0x00000003
665 } spoolss_DeviceModeMediaType
;
667 typedef [v1_enum] enum {
668 DMDITHER_NONE
= 0x00000001,
669 DMDITHER_COARSE
= 0x00000002,
670 DMDITHER_FINE
= 0x00000003,
671 DMDITHER_LINEART
= 0x00000004,
672 DMDITHER_ERRORDIFFUSION
= 0x00000005,
673 DMDITHER_RESERVED6
= 0x00000006,
674 DMDITHER_RESERVED7
= 0x00000007,
675 DMDITHER_RESERVED8
= 0x00000008,
676 DMDITHER_RESERVED9
= 0x00000009,
677 DMDITHER_GRAYSCALE
= 0x0000000A
678 } spoolss_DeviceModeDitherType
;
680 const int MAXDEVICENAME
= 32;
682 typedef [public,gensize
] struct {
683 [charset
(UTF16
),to_null
] uint16 devicename
[MAXDEVICENAME
];
684 spoolss_DeviceModeSpecVersion specversion
;
685 uint16 driverversion
;
687 [value
(r
->driverextra_data.length
)] uint16 __driverextra_length
;
688 spoolss_DeviceModeFields fields
;
689 spoolss_DeviceModeOrientation orientation
;
690 spoolss_DeviceModePaperSize papersize
;
695 spoolss_DeviceModeDefaultSource defaultsource
;
696 spoolss_DeviceModePrintQuality printquality
;
697 spoolss_DeviceModeColor color
;
698 spoolss_DeviceModeDuplex duplex
;
700 spoolss_DeviceModeTTOption ttoption
;
701 spoolss_DeviceModeCollate collate
;
702 [charset
(UTF16
),to_null
] uint16 formname
[MAXDEVICENAME
];
703 uint16 logpixels
; /* reserved */
704 uint32 bitsperpel
; /* reserved */
705 uint32 pelswidth
; /* reserved */
706 uint32 pelsheight
; /* reserved */
707 spoolss_DeviceModeNUp displayflags
;
708 uint32 displayfrequency
; /* reserved */
709 spoolss_DeviceModeICMMethod icmmethod
;
710 spoolss_DeviceModeICMIntent icmintent
;
711 spoolss_DeviceModeMediaType mediatype
;
712 spoolss_DeviceModeDitherType dithertype
;
715 uint32 panningwidth
; /* reserved */
716 uint32 panningheight
; /* reserved */
717 [subcontext_size
(__driverextra_length
),subcontext
(0),flag
(NDR_REMAINING
)] DATA_BLOB driverextra_data
;
718 } spoolss_DeviceMode
;
720 typedef [public] bitmap
{
721 PRINTER_ENUM_DEFAULT
= 0x00000001,
722 PRINTER_ENUM_LOCAL
= 0x00000002,
723 PRINTER_ENUM_CONNECTIONS
= 0x00000004,
724 PRINTER_ENUM_FAVORITE
= 0x00000004,
725 PRINTER_ENUM_NAME
= 0x00000008,
726 PRINTER_ENUM_REMOTE
= 0x00000010,
727 PRINTER_ENUM_SHARED
= 0x00000020,
728 PRINTER_ENUM_NETWORK
= 0x00000040,
729 PRINTER_ENUM_EXPAND
= 0x00004000,
730 PRINTER_ENUM_CONTAINER
= 0x00008000,
731 PRINTER_ENUM_ICON1
= 0x00010000,
732 PRINTER_ENUM_ICON2
= 0x00020000,
733 PRINTER_ENUM_ICON3
= 0x00040000,
734 PRINTER_ENUM_ICON4
= 0x00080000,
735 PRINTER_ENUM_ICON5
= 0x00100000,
736 PRINTER_ENUM_ICON6
= 0x00200000,
737 PRINTER_ENUM_ICON7
= 0x00400000,
738 PRINTER_ENUM_ICON8
= 0x00800000,
739 PRINTER_ENUM_HIDE
= 0x01000000
740 } spoolss_EnumPrinterFlags
;
742 const int PRINTER_ENUM_ICONMASK
= (PRINTER_ENUM_ICON1 |
749 PRINTER_ENUM_ICON8
); /* 0x00ff0000 */
751 typedef [public] bitmap
{
752 PRINTER_ATTRIBUTE_QUEUED
= 0x00000001,
753 PRINTER_ATTRIBUTE_DIRECT
= 0x00000002,
754 PRINTER_ATTRIBUTE_DEFAULT
= 0x00000004,
755 PRINTER_ATTRIBUTE_SHARED
= 0x00000008,
756 PRINTER_ATTRIBUTE_NETWORK
= 0x00000010,
757 PRINTER_ATTRIBUTE_HIDDEN
= 0x00000020,
758 PRINTER_ATTRIBUTE_LOCAL
= 0x00000040,
759 PRINTER_ATTRIBUTE_ENABLE_DEVQ
= 0x00000080,
760 PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
= 0x00000100,
761 PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
= 0x00000200,
762 PRINTER_ATTRIBUTE_WORK_OFFLINE
= 0x00000400,
763 PRINTER_ATTRIBUTE_ENABLE_BIDI
= 0x00000800,
764 PRINTER_ATTRIBUTE_RAW_ONLY
= 0x00001000,
765 PRINTER_ATTRIBUTE_PUBLISHED
= 0x00002000,
766 PRINTER_ATTRIBUTE_FAX
= 0x00004000,
767 PRINTER_ATTRIBUTE_TS
= 0x00008000
768 } spoolss_PrinterAttributes
;
770 typedef [public,gensize
] struct {
771 spoolss_EnumPrinterFlags flags
;
772 [relative
] nstring
*description
;
773 [relative
] nstring
*name
;
774 [relative
] nstring
*comment
;
775 } spoolss_PrinterInfo1
;
777 typedef [public,gensize
,nopush
] struct {
778 [relative
] nstring
*servername
;
779 [relative
] nstring
*printername
;
780 [relative
] nstring
*sharename
;
781 [relative
] nstring
*portname
;
782 [relative
] nstring
*drivername
;
783 [relative
] nstring
*comment
;
784 [relative
] nstring
*location
;
785 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
786 [relative
] nstring
*sepfile
;
787 [relative
] nstring
*printprocessor
;
788 [relative
] nstring
*datatype
;
789 [relative
] nstring
*parameters
;
790 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
791 spoolss_PrinterAttributes attributes
;
792 [range(0,99)] uint32 priority
;
793 uint32 defaultpriority
;
796 spoolss_PrinterStatus status
;
799 } spoolss_PrinterInfo2
;
801 typedef [public,gensize
] struct {
802 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
803 } spoolss_PrinterInfo3
;
805 typedef [public,gensize
] struct {
806 [relative
] nstring
*printername
;
807 [relative
] nstring
*servername
;
808 spoolss_PrinterAttributes attributes
;
809 } spoolss_PrinterInfo4
;
811 typedef [public,gensize
] struct {
812 [relative
] nstring
*printername
;
813 [relative
] nstring
*portname
;
814 spoolss_PrinterAttributes attributes
;
815 uint32 device_not_selected_timeout
;
816 uint32 transmission_retry_timeout
;
817 } spoolss_PrinterInfo5
;
819 typedef [public,gensize
] struct {
820 spoolss_PrinterStatus status
;
821 } spoolss_PrinterInfo6
;
824 DSPRINT_PUBLISH
= 0x00000001,
825 DSPRINT_UPDATE
= 0x00000002,
826 DSPRINT_UNPUBLISH
= 0x00000004,
827 DSPRINT_REPUBLISH
= 0x00000008,
828 DSPRINT_PENDING
= 0x80000000
829 } spoolss_DsPrintAction
;
831 typedef [public,gensize
] struct {
832 [relative
] nstring
*guid
; /* text form of printer guid */
833 spoolss_DsPrintAction action
;
834 } spoolss_PrinterInfo7
;
837 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
838 } spoolss_DeviceModeInfo
;
840 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
841 [case(0)] spoolss_PrinterInfo0 info0
;
842 [case(1)] spoolss_PrinterInfo1 info1
;
843 [case(2)] spoolss_PrinterInfo2 info2
;
844 [case(3)] spoolss_PrinterInfo3 info3
;
845 [case(4)] spoolss_PrinterInfo4 info4
;
846 [case(5)] spoolss_PrinterInfo5 info5
;
847 [case(6)] spoolss_PrinterInfo6 info6
;
848 [case(7)] spoolss_PrinterInfo7 info7
;
849 [case(8)] spoolss_DeviceModeInfo info8
;
850 [case(9)] spoolss_DeviceModeInfo info9
;
852 } spoolss_PrinterInfo
;
856 /* we are using this as internal parsing code */
857 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinters
(
858 [in] spoolss_EnumPrinterFlags flags
,
859 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
861 [in,unique] DATA_BLOB
*buffer
,
863 [out,unique] DATA_BLOB
*info
,
864 [out,ref] uint32
*needed
,
865 [out,ref] uint32
*count
867 [public,noopnum
,noprint
] void __spoolss_EnumPrinters
(
870 [out,switch_is(level
)] spoolss_PrinterInfo info
[count
]
872 [nopull
,nopush
] WERROR spoolss_EnumPrinters
(
873 [in] spoolss_EnumPrinterFlags flags
,
874 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
876 [in,unique] DATA_BLOB
*buffer
,
878 /* what we have here is a subcontext containing an array of no discriminant unions
879 * and the array has no size in front
881 [out,ref] uint32
*count
,
882 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrinterInfo
**info
,
883 [out,ref] uint32
*needed
888 typedef [public] struct {
889 [value
(_ndr_size_spoolss_DeviceMode
(devmode
, ndr
->flags
))] uint32 _ndr_size
;
890 [subcontext
(4),subcontext_size
(_ndr_size
)] spoolss_DeviceMode
*devmode
;
891 } spoolss_DevmodeContainer
;
893 [public] WERROR spoolss_OpenPrinter
(
894 [in,unique] [string,charset
(UTF16
)] uint16
*printername
,
895 [in,unique] [string,charset
(UTF16
)] uint16
*datatype
,
896 [in] spoolss_DevmodeContainer devmode_ctr
,
897 [in] spoolss_AccessRights access_mask
,
898 [out,ref] policy_handle
*handle
904 typedef [public,gensize
] struct {
906 [relative
] nstring
*printer_name
;
907 [relative
] nstring
*server_name
;
908 [relative
] nstring
*user_name
;
909 [relative
] nstring
*document_name
;
910 [relative
] nstring
*data_type
;
911 [relative
] nstring
*text_status
;
912 spoolss_JobStatus status
;
913 [range(0,99)] uint32 priority
;
916 uint32 pages_printed
;
917 spoolss_Time submitted
;
920 typedef [public,gensize
] struct {
922 [relative
] nstring
*printer_name
;
923 [relative
] nstring
*server_name
;
924 [relative
] nstring
*user_name
;
925 [relative
] nstring
*document_name
;
926 [relative
] nstring
*notify_name
;
927 [relative
] nstring
*data_type
;
928 [relative
] nstring
*print_processor
;
929 [relative
] nstring
*parameters
;
930 [relative
] nstring
*driver_name
;
931 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
932 [relative
] nstring
*text_status
;
933 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
934 spoolss_JobStatus status
;
935 [range(0,99)] uint32 priority
;
941 spoolss_Time submitted
;
943 uint32 pages_printed
;
946 typedef [public,gensize
] struct {
952 typedef [public,gensize
] struct {
954 [relative
] nstring
*printer_name
;
955 [relative
] nstring
*server_name
;
956 [relative
] nstring
*user_name
;
957 [relative
] nstring
*document_name
;
958 [relative
] nstring
*notify_name
;
959 [relative
] nstring
*data_type
;
960 [relative
] nstring
*print_processor
;
961 [relative
] nstring
*parameters
;
962 [relative
] nstring
*driver_name
;
963 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_DeviceMode
*devmode
;
964 [relative
] nstring
*text_status
;
965 [relative
,subcontext
(0),flag
(NDR_ALIGN4
)] spoolss_security_descriptor
*secdesc
;
966 spoolss_JobStatus status
;
967 [range(0,99)] uint32 priority
;
973 spoolss_Time submitted
;
975 uint32 pages_printed
;
979 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
980 [case(1)] spoolss_JobInfo1 info1
;
981 [case(2)] spoolss_JobInfo2 info2
;
982 [case(3)] spoolss_JobInfo3 info3
;
983 [case(4)] spoolss_JobInfo4 info4
;
989 [string,charset
(UTF16
)] uint16
*printer_name
;
990 [string,charset
(UTF16
)] uint16
*server_name
;
991 [string,charset
(UTF16
)] uint16
*user_name
;
992 [string,charset
(UTF16
)] uint16
*document_name
;
993 [string,charset
(UTF16
)] uint16
*data_type
;
994 [string,charset
(UTF16
)] uint16
*text_status
;
995 spoolss_JobStatus status
;
996 [range(0,99)] uint32 priority
;
999 uint32 pages_printed
;
1000 spoolss_Time submitted
;
1001 } spoolss_SetJobInfo1
;
1005 [string,charset
(UTF16
)] uint16
*printer_name
;
1006 [string,charset
(UTF16
)] uint16
*server_name
;
1007 [string,charset
(UTF16
)] uint16
*user_name
;
1008 [string,charset
(UTF16
)] uint16
*document_name
;
1009 [string,charset
(UTF16
)] uint16
*notify_name
;
1010 [string,charset
(UTF16
)] uint16
*data_type
;
1011 [string,charset
(UTF16
)] uint16
*print_processor
;
1012 [string,charset
(UTF16
)] uint16
*parameters
;
1013 [string,charset
(UTF16
)] uint16
*driver_name
;
1014 uint3264 _devmode_ptr
; /* ULONG_PTR */
1015 [string,charset
(UTF16
)] uint16
*text_status
;
1016 uint3264 _secdesc_ptr
; /* ULONG_PTR */
1017 spoolss_JobStatus status
;
1018 [range(0,99)] uint32 priority
;
1024 spoolss_Time submitted
;
1026 uint32 pages_printed
;
1027 } spoolss_SetJobInfo2
;
1031 [string,charset
(UTF16
)] uint16
*printer_name
;
1032 [string,charset
(UTF16
)] uint16
*server_name
;
1033 [string,charset
(UTF16
)] uint16
*user_name
;
1034 [string,charset
(UTF16
)] uint16
*document_name
;
1035 [string,charset
(UTF16
)] uint16
*notify_name
;
1036 [string,charset
(UTF16
)] uint16
*data_type
;
1037 [string,charset
(UTF16
)] uint16
*print_processor
;
1038 [string,charset
(UTF16
)] uint16
*parameters
;
1039 [string,charset
(UTF16
)] uint16
*driver_name
;
1040 uint3264 _devmode_ptr
; /* ULONG_PTR */
1041 [string,charset
(UTF16
)] uint16
*text_status
;
1042 uint3264 _secdesc_ptr
; /* ULONG_PTR */
1043 spoolss_JobStatus status
;
1044 [range(0,99)] uint32 priority
;
1050 spoolss_Time submitted
;
1052 uint32 pages_printed
;
1054 } spoolss_SetJobInfo4
;
1056 typedef [ms_union,public] union {
1057 [case(1)] spoolss_SetJobInfo1
*info1
;
1058 [case(2)] spoolss_SetJobInfo2
*info2
;
1059 [case(3)] spoolss_JobInfo3
*info3
;
1060 [case(4)] spoolss_SetJobInfo4
*info4
;
1062 } spoolss_SetJobInfo
;
1064 typedef [public] struct {
1066 [switch_is(level
)] spoolss_SetJobInfo info
;
1067 } spoolss_JobInfoContainer
;
1069 typedef [v1_enum] enum {
1070 SPOOLSS_JOB_CONTROL_NOOP
= 0,
1071 SPOOLSS_JOB_CONTROL_PAUSE
= 1,
1072 SPOOLSS_JOB_CONTROL_RESUME
= 2,
1073 SPOOLSS_JOB_CONTROL_CANCEL
= 3,
1074 SPOOLSS_JOB_CONTROL_RESTART
= 4,
1075 SPOOLSS_JOB_CONTROL_DELETE
= 5,
1076 SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER
= 6,
1077 SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED
= 7,
1078 SPOOLSS_JOB_CONTROL_RETAIN
= 8,
1079 SPOOLSS_JOB_CONTROL_RELEASE
= 9
1080 } spoolss_JobControl
;
1082 WERROR spoolss_SetJob
(
1083 [in,ref] policy_handle
*handle,
1085 [in,unique] spoolss_JobInfoContainer
*ctr
,
1086 [in] spoolss_JobControl command
1089 /******************/
1090 /* Function: 0x03 */
1091 WERROR spoolss_GetJob
(
1092 [in,ref] policy_handle
*handle,
1095 [in,unique] DATA_BLOB
*buffer
,
1096 [in] uint32 offered
,
1097 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_JobInfo
*info
,
1098 [out,ref] uint32
*needed
1101 /******************/
1102 /* Function: 0x04 */
1103 [public,noopnum
,noprint
] WERROR _spoolss_EnumJobs
(
1104 [in,ref] policy_handle
*handle,
1105 [in] uint32 firstjob
,
1106 [in] uint32 numjobs
,
1108 [in,unique] DATA_BLOB
*buffer
,
1109 [in] uint32 offered
,
1110 [out,unique] DATA_BLOB
*info
,
1111 [out,ref] uint32
*needed
,
1112 [out,ref] uint32
*count
1114 [public,noopnum
,noprint
] void __spoolss_EnumJobs
(
1117 [out,switch_is(level
)] spoolss_JobInfo info
[count
]
1119 [nopull
,nopush
] WERROR spoolss_EnumJobs
(
1120 [in,ref] policy_handle
*handle,
1121 [in] uint32 firstjob
,
1122 [in] uint32 numjobs
,
1124 [in,unique] DATA_BLOB
*buffer
,
1125 [in] uint32 offered
,
1126 [out,ref] uint32
*count
,
1127 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_JobInfo
**info
,
1128 [out,ref] uint32
*needed
1131 /******************/
1132 /* Function: 0x05 */
1133 WERROR spoolss_AddPrinter
(
1134 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1135 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
1136 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
1137 [in,ref] sec_desc_buf
*secdesc_ctr
,
1138 [out,ref] policy_handle
*handle
1141 /******************/
1142 /* Function: 0x06 */
1143 WERROR spoolss_DeletePrinter
(
1144 [in] policy_handle
*handle
1147 /******************/
1148 /* Function: 0x07 */
1149 typedef [v1_enum] enum {
1150 SPOOLSS_PRINTER_CONTROL_UNPAUSE
= 0,
1151 SPOOLSS_PRINTER_CONTROL_PAUSE
= 1,
1152 SPOOLSS_PRINTER_CONTROL_RESUME
= 2,
1153 SPOOLSS_PRINTER_CONTROL_PURGE
= 3,
1154 SPOOLSS_PRINTER_CONTROL_SET_STATUS
= 4
1155 } spoolss_PrinterControl
;
1158 [string,charset
(UTF16
)] uint16
*servername
;
1159 [string,charset
(UTF16
)] uint16
*printername
;
1164 uint32 global_counter
;
1167 spoolss_Build free_build
;
1169 uint32 max_spooling
;
1170 uint32 session_counter
;
1171 uint32 num_error_out_of_paper
;
1172 uint32 num_error_not_ready
;
1173 spoolss_JobStatus job_error
;
1174 uint32 number_of_processors
;
1175 spoolss_ProcessorType processor_type
;
1176 uint32 high_part_total_bytes
;
1179 spoolss_PrinterStatus status
;
1180 uint32 enumerate_network_printers
;
1181 uint32 c_setprinter
;
1182 spoolss_ProcessorArchitecture processor_architecture
;
1183 uint16 processor_level
;
1187 } spoolss_SetPrinterInfo0
;
1190 spoolss_PrinterAttributes flags
;
1191 [string,charset
(UTF16
)] uint16
*description
;
1192 [string,charset
(UTF16
)] uint16
*name
;
1193 [string,charset
(UTF16
)] uint16
*comment
;
1194 } spoolss_SetPrinterInfo1
;
1197 [string,charset
(UTF16
)] uint16
*servername
;
1198 [string,charset
(UTF16
)] uint16
*printername
;
1199 [string,charset
(UTF16
)] uint16
*sharename
;
1200 [string,charset
(UTF16
)] uint16
*portname
;
1201 [string,charset
(UTF16
)] uint16
*drivername
;
1202 [string,charset
(UTF16
)] uint16
*comment
;
1203 [string,charset
(UTF16
)] uint16
*location
;
1204 uint3264 devmode_ptr
; /* ULONG_PTR */
1205 [string,charset
(UTF16
)] uint16
*sepfile
;
1206 [string,charset
(UTF16
)] uint16
*printprocessor
;
1207 [string,charset
(UTF16
)] uint16
*datatype
;
1208 [string,charset
(UTF16
)] uint16
*parameters
;
1209 uint3264 secdesc_ptr
; /* ULONG_PTR */
1210 spoolss_PrinterAttributes attributes
;
1211 [range(0,99)] uint32 priority
;
1212 uint32 defaultpriority
;
1215 spoolss_PrinterStatus status
;
1218 } spoolss_SetPrinterInfo2
;
1221 uint3264 sec_desc_ptr
; /* ULONG_PTR */
1222 } spoolss_SetPrinterInfo3
;
1225 [string,charset
(UTF16
)] uint16
*printername
;
1226 [string,charset
(UTF16
)] uint16
*servername
;
1227 spoolss_PrinterAttributes attributes
;
1228 } spoolss_SetPrinterInfo4
;
1231 [string,charset
(UTF16
)] uint16
*printername
;
1232 [string,charset
(UTF16
)] uint16
*portname
;
1233 spoolss_PrinterAttributes attributes
;
1234 uint32 device_not_selected_timeout
;
1235 uint32 transmission_retry_timeout
;
1236 } spoolss_SetPrinterInfo5
;
1239 spoolss_PrinterStatus status
;
1240 } spoolss_SetPrinterInfo6
;
1243 [string,charset
(UTF16
)] uint16
*guid
; /* text form of printer guid */
1244 spoolss_DsPrintAction action
;
1245 } spoolss_SetPrinterInfo7
;
1248 uint3264 devmode_ptr
; /* ULONG_PTR */
1249 } spoolss_SetPrinterInfo8
;
1252 uint3264 devmode_ptr
; /* ULONG_PTR */
1253 } spoolss_SetPrinterInfo9
;
1255 typedef [ms_union,switch_type(uint32
)] union {
1256 [case(0)] spoolss_SetPrinterInfo0
*info0
;
1257 [case(1)] spoolss_SetPrinterInfo1
*info1
;
1258 [case(2)] spoolss_SetPrinterInfo2
*info2
;
1259 [case(3)] spoolss_SetPrinterInfo3
*info3
;
1260 [case(4)] spoolss_SetPrinterInfo4
*info4
;
1261 [case(5)] spoolss_SetPrinterInfo5
*info5
;
1262 [case(6)] spoolss_SetPrinterInfo6
*info6
;
1263 [case(7)] spoolss_SetPrinterInfo7
*info7
;
1264 [case(8)] spoolss_SetPrinterInfo8
*info8
;
1265 [case(9)] spoolss_SetPrinterInfo9
*info9
;
1267 } spoolss_SetPrinterInfo
;
1269 typedef [public] struct {
1271 [switch_is(level
)] spoolss_SetPrinterInfo info
;
1272 } spoolss_SetPrinterInfoCtr
;
1274 [public] WERROR spoolss_SetPrinter
(
1275 [in,ref] policy_handle
*handle,
1276 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
1277 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
1278 [in,ref] sec_desc_buf
*secdesc_ctr
,
1279 [in] spoolss_PrinterControl command
1282 /******************/
1283 /* Function: 0x08 */
1284 [public] WERROR spoolss_GetPrinter
(
1285 [in,ref] policy_handle
*handle,
1287 [in,unique] DATA_BLOB
*buffer
,
1288 [in] uint32 offered
,
1289 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_PrinterInfo
*info
,
1290 [out,ref] uint32
*needed
1293 /******************/
1294 /* Function: 0x09 */
1296 typedef [public] struct {
1297 [value
((ndr_size_spoolss_StringArray
(r
, ndr
->flags
)-4)/2)] uint32 _ndr_size
;
1298 /*[subcontext(0),subcontext_size(_ndr_size*2)]*/ nstring_array
string;
1299 } spoolss_StringArray
;
1302 [string,charset
(UTF16
)] uint16
*driver_name
;
1303 } spoolss_AddDriverInfo1
;
1305 typedef [v1_enum,public] enum {
1306 SPOOLSS_DRIVER_VERSION_9X
= 0,
1307 SPOOLSS_DRIVER_VERSION_NT35
= 1,
1308 SPOOLSS_DRIVER_VERSION_NT4
= 2,
1309 SPOOLSS_DRIVER_VERSION_200X
= 3,
1310 SPOOLSS_DRIVER_VERSION_2012
= 4
1311 } spoolss_DriverOSVersion
;
1314 spoolss_DriverOSVersion
version;
1315 [string,charset
(UTF16
)] uint16
*driver_name
;
1316 [string,charset
(UTF16
)] uint16
*architecture
;
1317 [string,charset
(UTF16
)] uint16
*driver_path
;
1318 [string,charset
(UTF16
)] uint16
*data_file
;
1319 [string,charset
(UTF16
)] uint16
*config_file
;
1320 } spoolss_AddDriverInfo2
;
1323 spoolss_DriverOSVersion
version;
1324 [string,charset
(UTF16
)] uint16
*driver_name
;
1325 [string,charset
(UTF16
)] uint16
*architecture
;
1326 [string,charset
(UTF16
)] uint16
*driver_path
;
1327 [string,charset
(UTF16
)] uint16
*data_file
;
1328 [string,charset
(UTF16
)] uint16
*config_file
;
1329 [string,charset
(UTF16
)] uint16
*help_file
;
1330 [string,charset
(UTF16
)] uint16
*monitor_name
;
1331 [string,charset
(UTF16
)] uint16
*default_datatype
;
1332 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1333 spoolss_StringArray
*dependent_files
;
1334 } spoolss_AddDriverInfo3
;
1337 spoolss_DriverOSVersion
version;
1338 [string,charset
(UTF16
)] uint16
*driver_name
;
1339 [string,charset
(UTF16
)] uint16
*architecture
;
1340 [string,charset
(UTF16
)] uint16
*driver_path
;
1341 [string,charset
(UTF16
)] uint16
*data_file
;
1342 [string,charset
(UTF16
)] uint16
*config_file
;
1343 [string,charset
(UTF16
)] uint16
*help_file
;
1344 [string,charset
(UTF16
)] uint16
*monitor_name
;
1345 [string,charset
(UTF16
)] uint16
*default_datatype
;
1346 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1347 spoolss_StringArray
*dependent_files
;
1348 [value
(((ndr_size_spoolss_StringArray
(previous_names
, ndr
->flags
)-4)/2))] uint32 _ndr_size_previous_names
;
1349 spoolss_StringArray
*previous_names
;
1350 } spoolss_AddDriverInfo4
;
1352 typedef [bitmap32bit
] bitmap
{
1353 PRINTER_DRIVER_PACKAGE_AWARE
= 0x00000001,
1354 PRINTER_DRIVER_XPS
= 0x00000002,
1355 PRINTER_DRIVER_SANDBOX_ENABLED
= 0x00000004,
1356 PRINTER_DRIVER_CLASS
= 0x00000008,
1357 PRINTER_DRIVER_DERIVED
= 0x00000010,
1358 PRINTER_DRIVER_NOT_SHAREABLE
= 0x00000020,
1359 PRINTER_DRIVER_CATEGORY_FAX
= 0x00000040,
1360 PRINTER_DRIVER_CATEGORY_FILE
= 0x00000080,
1361 PRINTER_DRIVER_CATEGORY_VIRTUAL
= 0x00000100,
1362 PRINTER_DRIVER_CATEGORY_SERVICE
= 0x00000200,
1363 PRINTER_DRIVER_SOFT_RESET_REQUIRED
= 0x00000400,
1364 PRINTER_DRIVER_CATEGORY_3D
= 0x00001000
1365 } spoolss_DriverAttributes
;
1368 spoolss_DriverOSVersion
version;
1369 [string,charset
(UTF16
)] uint16
*driver_name
;
1370 [string,charset
(UTF16
)] uint16
*architecture
;
1371 [string,charset
(UTF16
)] uint16
*driver_path
;
1372 [string,charset
(UTF16
)] uint16
*data_file
;
1373 [string,charset
(UTF16
)] uint16
*config_file
;
1374 spoolss_DriverAttributes driver_attributes
;
1375 uint32 config_version
;
1376 uint32 driver_version
;
1377 } spoolss_AddDriverInfo5
;
1380 spoolss_DriverOSVersion
version;
1381 [string,charset
(UTF16
)] uint16
*driver_name
;
1382 [string,charset
(UTF16
)] uint16
*architecture
;
1383 [string,charset
(UTF16
)] uint16
*driver_path
;
1384 [string,charset
(UTF16
)] uint16
*data_file
;
1385 [string,charset
(UTF16
)] uint16
*config_file
;
1386 [string,charset
(UTF16
)] uint16
*help_file
;
1387 [string,charset
(UTF16
)] uint16
*monitor_name
;
1388 [string,charset
(UTF16
)] uint16
*default_datatype
;
1389 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1390 spoolss_StringArray
*dependent_files
;
1391 [value
(((ndr_size_spoolss_StringArray
(previous_names
, ndr
->flags
)-4)/2))] uint32 _ndr_size_previous_names
;
1392 spoolss_StringArray
*previous_names
;
1394 hyper driver_version
;
1395 [string,charset
(UTF16
)] uint16
*manufacturer_name
;
1396 [string,charset
(UTF16
)] uint16
*manufacturer_url
;
1397 [string,charset
(UTF16
)] uint16
*hardware_id
;
1398 [string,charset
(UTF16
)] uint16
*provider
;
1399 } spoolss_AddDriverInfo6
;
1402 spoolss_DriverOSVersion
version;
1403 [string,charset
(UTF16
)] uint16
*driver_name
;
1404 [string,charset
(UTF16
)] uint16
*architecture
;
1405 [string,charset
(UTF16
)] uint16
*driver_path
;
1406 [string,charset
(UTF16
)] uint16
*data_file
;
1407 [string,charset
(UTF16
)] uint16
*config_file
;
1408 [string,charset
(UTF16
)] uint16
*help_file
;
1409 [string,charset
(UTF16
)] uint16
*monitor_name
;
1410 [string,charset
(UTF16
)] uint16
*default_datatype
;
1411 [value
(((ndr_size_spoolss_StringArray
(dependent_files
, ndr
->flags
)-4)/2))] uint32 _ndr_size_dependent_files
;
1412 spoolss_StringArray
*dependent_files
;
1413 [value
(((ndr_size_spoolss_StringArray
(previous_names
, ndr
->flags
)-4)/2))] uint32 _ndr_size_previous_names
;
1414 spoolss_StringArray
*previous_names
;
1416 hyper driver_version
;
1417 [string,charset
(UTF16
)] uint16
*manufacturer_name
;
1418 [string,charset
(UTF16
)] uint16
*manufacturer_url
;
1419 [string,charset
(UTF16
)] uint16
*hardware_id
;
1420 [string,charset
(UTF16
)] uint16
*provider
;
1421 [string,charset
(UTF16
)] uint16
*print_processor
;
1422 [string,charset
(UTF16
)] uint16
*vendor_setup
;
1423 [value
(((ndr_size_spoolss_StringArray
(color_profiles
, ndr
->flags
)-4)/2))] uint32 _ndr_size_color_profiles
;
1424 spoolss_StringArray
*color_profiles
;
1425 [string,charset
(UTF16
)] uint16
*inf_path
;
1426 spoolss_DriverAttributes printer_driver_attributes
;
1427 [value
(((ndr_size_spoolss_StringArray
(core_driver_dependencies
, ndr
->flags
)-4)/2))] uint32 _ndr_size_core_driver_dependencies
;
1428 spoolss_StringArray
*core_driver_dependencies
;
1429 NTTIME min_inbox_driver_ver_date
;
1430 hyper min_inbox_driver_ver_version
;
1431 } spoolss_AddDriverInfo8
;
1433 typedef [ms_union,switch_type(uint32
)] union {
1434 [case(1)] spoolss_AddDriverInfo1
*info1
;
1435 [case(2)] spoolss_AddDriverInfo2
*info2
;
1436 [case(3)] spoolss_AddDriverInfo3
*info3
;
1437 [case(4)] spoolss_AddDriverInfo4
*info4
;
1438 [case(6)] spoolss_AddDriverInfo6
*info6
;
1439 [case(8)] spoolss_AddDriverInfo8
*info8
;
1440 } spoolss_AddDriverInfo
;
1442 typedef [public] struct {
1444 [switch_is(level
)] spoolss_AddDriverInfo info
;
1445 } spoolss_AddDriverInfoCtr
;
1447 WERROR spoolss_AddPrinterDriver
(
1448 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
1449 [in,ref] spoolss_AddDriverInfoCtr
*info_ctr
1452 typedef [public,gensize
] struct {
1453 [relative
] nstring
*driver_name
;
1454 } spoolss_DriverInfo1
;
1456 typedef [public,gensize
] struct {
1457 spoolss_DriverOSVersion
version;
1458 [relative
] nstring
*driver_name
;
1459 [relative
] nstring
*architecture
;
1460 [relative
] nstring
*driver_path
;
1461 [relative
] nstring
*data_file
;
1462 [relative
] nstring
*config_file
;
1463 } spoolss_DriverInfo2
;
1465 typedef [public,gensize
] struct {
1466 spoolss_DriverOSVersion
version;
1467 [relative
] nstring
*driver_name
;
1468 [relative
] nstring
*architecture
;
1469 [relative
] nstring
*driver_path
;
1470 [relative
] nstring
*data_file
;
1471 [relative
] nstring
*config_file
;
1472 [relative
] nstring
*help_file
;
1473 [relative
] nstring_array
*dependent_files
;
1474 [relative
] nstring
*monitor_name
;
1475 [relative
] nstring
*default_datatype
;
1476 } spoolss_DriverInfo3
;
1478 typedef [public,gensize
] struct {
1479 spoolss_DriverOSVersion
version;
1480 [relative
] nstring
*driver_name
;
1481 [relative
] nstring
*architecture
;
1482 [relative
] nstring
*driver_path
;
1483 [relative
] nstring
*data_file
;
1484 [relative
] nstring
*config_file
;
1485 [relative
] nstring
*help_file
;
1486 [relative
] nstring_array
*dependent_files
;
1487 [relative
] nstring
*monitor_name
;
1488 [relative
] nstring
*default_datatype
;
1489 [relative
] nstring_array
*previous_names
;
1490 } spoolss_DriverInfo4
;
1492 typedef [public,gensize
] struct {
1493 spoolss_DriverOSVersion
version;
1494 [relative
] nstring
*driver_name
;
1495 [relative
] nstring
*architecture
;
1496 [relative
] nstring
*driver_path
;
1497 [relative
] nstring
*data_file
;
1498 [relative
] nstring
*config_file
;
1499 spoolss_DriverAttributes driver_attributes
;
1500 uint32 config_version
;
1501 uint32 driver_version
;
1502 } spoolss_DriverInfo5
;
1504 typedef [public,gensize
] struct {
1505 spoolss_DriverOSVersion
version;
1506 [relative
] nstring
*driver_name
;
1507 [relative
] nstring
*architecture
;
1508 [relative
] nstring
*driver_path
;
1509 [relative
] nstring
*data_file
;
1510 [relative
] nstring
*config_file
;
1511 [relative
] nstring
*help_file
;
1512 [relative
] nstring_array
*dependent_files
;
1513 [relative
] nstring
*monitor_name
;
1514 [relative
] nstring
*default_datatype
;
1515 [relative
] nstring_array
*previous_names
;
1517 hyper driver_version
;
1518 [relative
] nstring
*manufacturer_name
;
1519 [relative
] nstring
*manufacturer_url
;
1520 [relative
] nstring
*hardware_id
;
1521 [relative
] nstring
*provider
;
1522 } spoolss_DriverInfo6
;
1524 typedef [public,gensize
] struct {
1526 spoolss_DriverOSVersion
version;
1527 [relative
] nstring
*driver_name
;
1528 [relative
] nstring
*inf_name
;
1529 [relative
] nstring
*install_source_root
;
1530 } spoolss_DriverInfo7
;
1532 typedef [public,gensize
] struct {
1533 spoolss_DriverOSVersion
version;
1534 [relative
] nstring
*driver_name
;
1535 [relative
] nstring
*architecture
;
1536 [relative
] nstring
*driver_path
;
1537 [relative
] nstring
*data_file
;
1538 [relative
] nstring
*config_file
;
1539 [relative
] nstring
*help_file
;
1540 [relative
] nstring_array
*dependent_files
;
1541 [relative
] nstring
*monitor_name
;
1542 [relative
] nstring
*default_datatype
;
1543 [relative
] nstring_array
*previous_names
;
1545 hyper driver_version
;
1546 [relative
] nstring
*manufacturer_name
;
1547 [relative
] nstring
*manufacturer_url
;
1548 [relative
] nstring
*hardware_id
;
1549 [relative
] nstring
*provider
;
1550 [relative
] nstring
*print_processor
;
1551 [relative
] nstring
*vendor_setup
;
1552 [relative
] nstring_array
*color_profiles
;
1553 [relative
] nstring
*inf_path
;
1554 spoolss_DriverAttributes printer_driver_attributes
;
1555 [relative
] nstring_array
*core_driver_dependencies
;
1556 NTTIME min_inbox_driver_ver_date
;
1557 hyper min_inbox_driver_ver_version
;
1558 } spoolss_DriverInfo8
;
1560 typedef [v1_enum] enum {
1561 SPOOLSS_DRIVER_FILE_TYPE_RENDERING
= 0x00000000,
1562 SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION
= 0x00000001,
1563 SPOOLSS_DRIVER_FILE_TYPE_DATA
= 0x00000002,
1564 SPOOLSS_DRIVER_FILE_TYPE_HELP
= 0x00000003,
1565 SPOOLSS_DRIVER_FILE_TYPE_OTHER
= 0x00000004
1566 } spoolss_DriverFileType
;
1568 typedef [public] struct {
1569 [relative
] nstring
*file_name
;
1570 spoolss_DriverFileType file_type
;
1571 uint32 file_version
;
1572 } spoolss_DriverFileInfo
;
1574 typedef [public,gensize
,nopush
,nopull
] struct {
1575 spoolss_DriverOSVersion
version;
1576 [relative
] nstring
*driver_name
;
1577 [relative
] nstring
*architecture
;
1578 [relative
,size_is(file_count
),flag
(NDR_ALIGN4
)] spoolss_DriverFileInfo
*file_info
;
1580 [relative
] nstring
*monitor_name
;
1581 [relative
] nstring
*default_datatype
;
1582 [relative
] nstring_array
*previous_names
;
1584 hyper driver_version
;
1585 [relative
] nstring
*manufacturer_name
;
1586 [relative
] nstring
*manufacturer_url
;
1587 [relative
] nstring
*hardware_id
;
1588 [relative
] nstring
*provider
;
1589 } spoolss_DriverInfo101
;
1591 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
1592 [case(1)] spoolss_DriverInfo1 info1
;
1593 [case(2)] spoolss_DriverInfo2 info2
;
1594 [case(3)] spoolss_DriverInfo3 info3
;
1595 [case(4)] spoolss_DriverInfo4 info4
;
1596 [case(5)] spoolss_DriverInfo5 info5
;
1597 [case(6)] spoolss_DriverInfo6 info6
;
1598 [case(7)] spoolss_DriverInfo7 info7
;
1599 [case(8)] spoolss_DriverInfo8 info8
;
1600 [case(101)] spoolss_DriverInfo101 info101
;
1602 } spoolss_DriverInfo
;
1604 /******************/
1605 /* Function: 0x0a */
1606 [public,noopnum
,noprint
] 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,unique] DATA_BLOB
*info
,
1613 [out,ref] uint32
*needed
,
1614 [out,ref] uint32
*count
1616 [public,noopnum
,noprint
] void __spoolss_EnumPrinterDrivers
(
1619 [out,switch_is(level
)] spoolss_DriverInfo info
[count
]
1621 [nopull
,nopush
] WERROR spoolss_EnumPrinterDrivers
(
1622 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1623 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1625 [in,unique] DATA_BLOB
*buffer
,
1626 [in] uint32 offered
,
1627 [out,ref] uint32
*count
,
1628 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_DriverInfo
**info
,
1629 [out,ref] uint32
*needed
1632 /******************/
1633 /* Function: 0x0b */
1634 WERROR spoolss_GetPrinterDriver
(
1635 [in,ref] policy_handle
*handle,
1636 [in,unique] [string,charset
(UTF16
)] uint16
*architecture
,
1638 [in,unique] DATA_BLOB
*buffer
,
1639 [in] uint32 offered
,
1640 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverInfo
*info
,
1641 [out,ref] uint32
*needed
1644 /******************/
1645 /* Function: 0x0c */
1646 typedef [public,gensize
] struct {
1647 nstring directory_name
;
1648 } spoolss_DriverDirectoryInfo1
;
1650 /* NOTE: it's seems that w2k3 completly ignores the level
1653 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
1654 [case(1)] spoolss_DriverDirectoryInfo1 info1
;
1655 [default] spoolss_DriverDirectoryInfo1 info1
;
1656 } spoolss_DriverDirectoryInfo
;
1658 [public] WERROR spoolss_GetPrinterDriverDirectory
(
1659 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1660 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1662 [in,unique] DATA_BLOB
*buffer
,
1663 [in] uint32 offered
,
1664 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverDirectoryInfo
*info
,
1665 [out,ref] uint32
*needed
1668 /******************/
1669 /* Function: 0x0d */
1670 WERROR spoolss_DeletePrinterDriver
(
1671 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1672 [in] [string,charset
(UTF16
)] uint16 architecture
[],
1673 [in] [string,charset
(UTF16
)] uint16 driver
[]
1676 /******************/
1677 /* Function: 0x0e */
1678 WERROR spoolss_AddPrintProcessor
(
1679 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1680 [in] [string,charset
(UTF16
)] uint16 architecture
[],
1681 [in] [string,charset
(UTF16
)] uint16 path_name
[],
1682 [in] [string,charset
(UTF16
)] uint16 print_processor_name
[]
1685 /******************/
1686 /* Function: 0x0f */
1687 typedef [public,gensize
] struct {
1688 [relative
] nstring
*print_processor_name
;
1689 } spoolss_PrintProcessorInfo1
;
1691 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
1692 [case(1)] spoolss_PrintProcessorInfo1 info1
;
1694 } spoolss_PrintProcessorInfo
;
1696 [public,noopnum
,noprint
] 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,unique] DATA_BLOB
*info
,
1703 [out,ref] uint32
*needed
,
1704 [out,ref] uint32
*count
1706 [public,noopnum
,noprint
] void __spoolss_EnumPrintProcessors
(
1709 [out,switch_is(level
)] spoolss_PrintProcessorInfo info
[count
]
1711 [nopull
,nopush
] WERROR spoolss_EnumPrintProcessors
(
1712 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
1713 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1715 [in,unique] DATA_BLOB
*buffer
,
1716 [in] uint32 offered
,
1717 [out,ref] uint32
*count
,
1718 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrintProcessorInfo
**info
,
1719 [out,ref] uint32
*needed
1722 /******************/
1723 /* Function: 0x10 */
1724 typedef [public,gensize
] struct {
1725 nstring directory_name
;
1726 } spoolss_PrintProcessorDirectoryInfo1
;
1728 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
1729 [case(1)] spoolss_PrintProcessorDirectoryInfo1 info1
;
1730 [default] spoolss_PrintProcessorDirectoryInfo1 info1
;
1731 } spoolss_PrintProcessorDirectoryInfo
;
1733 WERROR spoolss_GetPrintProcessorDirectory
(
1734 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
1735 [in,unique] [string,charset
(UTF16
)] uint16
*environment
,
1737 [in,unique] DATA_BLOB
*buffer
,
1738 [in] uint32 offered
,
1739 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_PrintProcessorDirectoryInfo
*info
,
1740 [out,ref] uint32
*needed
1743 /******************/
1744 /* Function: 0x11 */
1746 [string,charset
(UTF16
)] uint16
*document_name
;
1747 [string,charset
(UTF16
)] uint16
*output_file
;
1748 [string,charset
(UTF16
)] uint16
*datatype
;
1749 } spoolss_DocumentInfo1
;
1751 typedef [ms_union,switch_type(uint32
)] union {
1752 [case(1)] spoolss_DocumentInfo1
*info1
;
1753 [case(2)]; /* TODO */
1754 [case(3)]; /* TODO */
1756 } spoolss_DocumentInfo
;
1758 typedef [public] struct {
1760 [switch_is(level
)] spoolss_DocumentInfo info
;
1761 } spoolss_DocumentInfoCtr
;
1763 WERROR spoolss_StartDocPrinter
(
1764 [in,ref] policy_handle
*handle,
1765 [in,ref] spoolss_DocumentInfoCtr
*info_ctr
,
1766 [out,ref] uint32
*job_id
1769 /******************/
1770 /* Function: 0x12 */
1771 WERROR spoolss_StartPagePrinter
(
1772 [in,ref] policy_handle
*handle
1775 /******************/
1776 /* Function: 0x13 */
1777 WERROR spoolss_WritePrinter
(
1778 [in,ref] policy_handle
*handle,
1779 [in] DATA_BLOB data
,
1780 [in,value
(r
->in.data.length
)] uint32 _data_size
,
1781 [out,ref] uint32
*num_written
1784 /******************/
1785 /* Function: 0x14 */
1786 WERROR spoolss_EndPagePrinter
(
1787 [in,ref] policy_handle
*handle
1790 /******************/
1791 /* Function: 0x15 */
1792 WERROR spoolss_AbortPrinter
(
1793 [in,ref] policy_handle
*handle
1796 /******************/
1797 /* Function: 0x16 */
1798 WERROR spoolss_ReadPrinter
(
1799 [in,ref] policy_handle
*handle,
1800 [out,ref] [size_is(data_size
)] uint8
*data
,
1801 [in] uint32 data_size
,
1802 [out,ref] uint32
*_data_size
1805 /******************/
1806 /* Function: 0x17 */
1807 WERROR spoolss_EndDocPrinter
(
1808 [in,ref] policy_handle
*handle
1811 /******************/
1812 /* Function: 0x18 */
1813 WERROR spoolss_AddJob
(
1814 [in,ref] policy_handle
*handle,
1816 [in,out,unique] [size_is(offered
)] uint8
*buffer
,
1817 [in] uint32 offered
,
1818 [out,ref] uint32
*needed
1821 /******************/
1822 /* Function: 0x19 */
1823 WERROR spoolss_ScheduleJob
(
1824 [in,ref] policy_handle
*handle,
1828 /******************/
1829 /* Function: 0x1a */
1831 const string SPL_ARCH_WIN40
= "WIN40";
1832 const string SPL_ARCH_W32X86
= "W32X86";
1833 const string SPL_ARCH_W32MIPS
= "W32MIPS";
1834 const string SPL_ARCH_W32ALPHA
= "W32ALPHA";
1835 const string SPL_ARCH_W32PPC
= "W32PPC";
1836 const string SPL_ARCH_IA64
= "IA64";
1837 const string SPL_ARCH_X64
= "x64";
1838 const string SPL_ARCH_ARM
= "ARM";
1840 const string SPOOLSS_ARCHITECTURE_ALL
= "All";
1841 const string SPOOLSS_ARCHITECTURE_ALL_CLUSTER
= "AllCluster";
1842 const string SPOOLSS_ARCHITECTURE_NT_X86
= "Windows NT x86";
1843 const string SPOOLSS_ARCHITECTURE_IA_64
= "Windows IA64";
1844 const string SPOOLSS_ARCHITECTURE_x64
= "Windows x64";
1845 const string SPOOLSS_ARCHITECTURE_4_0
= "Windows 4.0";
1846 const string SPOOLSS_ARCHITECTURE_ARM
= "Windows ARM";
1847 const string SPOOLSS_DEFAULT_SERVER_PATH
= "C:\\WINDOWS\\system32\\spool";
1849 typedef [public,gensize
] struct {
1850 [value
(ndr_size_spoolss_OSVersion
(r
,ndr
->flags
))] uint32 _ndr_size
;
1854 [value
(2)] uint32 platform_id
;
1855 [subcontext
(0),subcontext_size
(256)] nstring extra_string
;
1856 } spoolss_OSVersion
;
1858 typedef [public,gensize
] struct {
1859 [value
(ndr_size_spoolss_OSVersionEx
(r
,ndr
->flags
))] uint32 _ndr_size
;
1863 [value
(2)] uint32 platform_id
;
1864 [subcontext
(0),subcontext_size
(256)] nstring extra_string
;
1865 uint16 service_pack_major
;
1866 uint16 service_pack_minor
;
1870 } spoolss_OSVersionEx
;
1872 typedef [nodiscriminant
,public] union {
1874 [case(REG_SZ
)] nstring
string;
1875 [case(REG_BINARY
),flag
(NDR_REMAINING
)] DATA_BLOB binary
;
1876 [case(REG_DWORD
)] uint32 value
;
1877 [case(REG_MULTI_SZ
)] nstring_array string_array
;
1878 [default,flag
(NDR_REMAINING
)] DATA_BLOB data
;
1879 } spoolss_PrinterData
;
1881 /* predefined registry key names for printer data */
1883 const string SPOOL_PRINTERDATA_KEY
= "PrinterDriverData";
1884 const string SPOOL_DSSPOOLER_KEY
= "DsSpooler";
1885 const string SPOOL_DSDRIVER_KEY
= "DsDriver";
1886 const string SPOOL_DSUSER_KEY
= "DsUser";
1887 const string SPOOL_PNPDATA_KEY
= "PnPData";
1888 const string SPOOL_OID_KEY
= "OID";
1890 /* predefined value names for printer data */
1892 const string SPOOL_REG_ASSETNUMBER
= "assetNumber";
1893 const string SPOOL_REG_BYTESPERMINUTE
= "bytesPerMinute";
1894 const string SPOOL_REG_DEFAULTPRIORITY
= "defaultPriority";
1895 const string SPOOL_REG_DESCRIPTION
= "description";
1896 const string SPOOL_REG_DRIVERNAME
= "driverName";
1897 const string SPOOL_REG_DRIVERVERSION
= "driverVersion";
1898 const string SPOOL_REG_FLAGS
= "flags";
1899 const string SPOOL_REG_LOCATION
= "location";
1900 const string SPOOL_REG_OPERATINGSYSTEM
= "operatingSystem";
1901 const string SPOOL_REG_OPERATINGSYSTEMHOTFIX
= "operatingSystemHotfix";
1902 const string SPOOL_REG_OPERATINGSYSTEMSERVICEPACK
= "operatingSystemServicePack";
1903 const string SPOOL_REG_OPERATINGSYSTEMVERSION
= "operatingSystemVersion";
1904 const string SPOOL_REG_PORTNAME
= "portName";
1905 const string SPOOL_REG_PRINTATTRIBUTES
= "printAttributes";
1906 const string SPOOL_REG_PRINTBINNAMES
= "printBinNames";
1907 const string SPOOL_REG_PRINTCOLLATE
= "printCollate";
1908 const string SPOOL_REG_PRINTCOLOR
= "printColor";
1909 const string SPOOL_REG_PRINTDUPLEXSUPPORTED
= "printDuplexSupported";
1910 const string SPOOL_REG_PRINTENDTIME
= "printEndTime";
1911 const string SPOOL_REG_PRINTERNAME
= "printerName";
1912 const string SPOOL_REG_PRINTFORMNAME
= "printFormName";
1913 const string SPOOL_REG_PRINTKEEPPRINTEDJOBS
= "printKeepPrintedJobs";
1914 const string SPOOL_REG_PRINTLANGUAGE
= "printLanguage";
1915 const string SPOOL_REG_PRINTMACADDRESS
= "printMACAddress";
1916 const string SPOOL_REG_PRINTMAXCOPIES
= "printMaxCopies";
1917 const string SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED
= "printMaxResolutionSupported";
1918 const string SPOOL_REG_PRINTMAXXEXTENT
= "printMaxXExtent";
1919 const string SPOOL_REG_PRINTMAXYEXTENT
= "printMaxYExtent";
1920 const string SPOOL_REG_PRINTMEDIAREADY
= "printMediaReady";
1921 const string SPOOL_REG_PRINTMEDIASUPPORTED
= "printMediaSupported";
1922 const string SPOOL_REG_PRINTMEMORY
= "printMemory";
1923 const string SPOOL_REG_PRINTMINXEXTENT
= "printMinXExtent";
1924 const string SPOOL_REG_PRINTMINYEXTENT
= "printMinYExtent";
1925 const string SPOOL_REG_PRINTNETWORKADDRESS
= "printNetworkAddress";
1926 const string SPOOL_REG_PRINTNOTIFY
= "printNotify";
1927 const string SPOOL_REG_PRINTNUMBERUP
= "printNumberUp";
1928 const string SPOOL_REG_PRINTORIENTATIONSSUPPORTED
= "printOrientationsSupported";
1929 const string SPOOL_REG_PRINTOWNER
= "printOwner";
1930 const string SPOOL_REG_PRINTPAGESPERMINUTE
= "printPagesPerMinute";
1931 const string SPOOL_REG_PRINTRATE
= "printRate";
1932 const string SPOOL_REG_PRINTRATEUNIT
= "printRateUnit";
1933 const string SPOOL_REG_PRINTSEPARATORFILE
= "printSeparatorFile";
1934 const string SPOOL_REG_PRINTSHARENAME
= "printShareName";
1935 const string SPOOL_REG_PRINTSPOOLING
= "printSpooling";
1936 const string SPOOL_REGVAL_PRINTWHILESPOOLING
= "PrintWhileSpooling";
1937 const string SPOOL_REGVAL_PRINTAFTERSPOOLED
= "PrintAfterSpooled";
1938 const string SPOOL_REGVAL_PRINTDIRECT
= "PrintDirect";
1939 const string SPOOL_REG_PRINTSTAPLINGSUPPORTED
= "printStaplingSupported";
1940 const string SPOOL_REG_PRINTSTARTTIME
= "printStartTime";
1941 const string SPOOL_REG_PRINTSTATUS
= "printStatus";
1942 const string SPOOL_REG_PRIORITY
= "priority";
1943 const string SPOOL_REG_SERVERNAME
= "serverName";
1944 const string SPOOL_REG_SHORTSERVERNAME
= "shortServerName";
1945 const string SPOOL_REG_UNCNAME
= "uNCName";
1946 const string SPOOL_REG_URL
= "url";
1947 const string SPOOL_REG_VERSIONNUMBER
= "versionNumber";
1949 [public] WERROR spoolss_GetPrinterData
(
1950 [in,ref] policy_handle
*handle,
1951 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1952 [out,ref] winreg_Type
*type
,
1953 [out,ref,size_is(offered
)] uint8
*data
,
1954 [in] uint32 offered
,
1955 [out,ref] uint32
*needed
1958 /******************/
1959 /* Function: 0x1b */
1960 WERROR spoolss_SetPrinterData
(
1961 [in,ref] policy_handle
*handle,
1962 [in] [string,charset
(UTF16
)] uint16 value_name
[],
1963 [in] winreg_Type type
,
1964 [in,ref] [size_is(offered
)] uint8
*data
,
1968 /******************/
1969 /* Function: 0x1c */
1970 [todo
] WERROR spoolss_WaitForPrinterChange
(
1973 /******************/
1974 /* Function: 0x1d */
1975 [public] WERROR spoolss_ClosePrinter
(
1976 [in,out,ref] policy_handle
*handle
1979 /******************/
1980 /* Function: 0x1e */
1981 typedef [v1_enum] enum {
1982 SPOOLSS_FORM_USER
= 0,
1983 SPOOLSS_FORM_BUILTIN
= 1,
1984 SPOOLSS_FORM_PRINTER
= 2
1985 } spoolss_FormFlags
;
1999 typedef [public,gensize
] struct {
2000 spoolss_FormFlags flags
;
2001 [relative
] nstring
*form_name
;
2002 spoolss_FormSize size
;
2003 spoolss_FormArea area
;
2004 } spoolss_FormInfo1
;
2006 typedef [bitmap32bit
] bitmap
{
2007 SPOOLSS_FORM_STRING_TYPE_NONE
= 0x00000001,
2008 SPOOLSS_FORM_STRING_TYPE_MUI_DLL
= 0x00000002,
2009 SPOOLSS_FORM_STRING_TYPE_LANG_PAIR
= 0x00000004
2010 } spoolss_FormStringType
;
2012 typedef [public,gensize
] struct {
2013 spoolss_FormFlags flags
;
2014 [relative
] nstring
*form_name
;
2015 spoolss_FormSize size
;
2016 spoolss_FormArea area
;
2017 [relative
] astring
*keyword
;
2018 spoolss_FormStringType string_type
;
2019 [relative
] nstring
*mui_dll
;
2020 uint32 ressource_id
;
2021 [relative
] nstring
*display_name
;
2024 } spoolss_FormInfo2
;
2026 typedef [nodiscriminant
,relative_base
,public,gensize
,flag
(NDR_RELATIVE_REVERSE
)] union {
2027 [case(1)] spoolss_FormInfo1 info1
;
2028 [case(2)] spoolss_FormInfo2 info2
;
2033 spoolss_FormFlags flags
;
2034 [string,charset
(UTF16
)] uint16
*form_name
;
2035 spoolss_FormSize size
;
2036 spoolss_FormArea area
;
2037 } spoolss_AddFormInfo1
;
2040 spoolss_FormFlags flags
;
2041 [string,charset
(UTF16
)] uint16
*form_name
;
2042 spoolss_FormSize size
;
2043 spoolss_FormArea area
;
2044 [string,charset
(DOS
)] uint8
*keyword
;
2045 spoolss_FormStringType string_type
;
2046 [string,charset
(UTF16
)] uint16
*mui_dll
;
2047 uint32 ressource_id
;
2048 [string,charset
(UTF16
)] uint16
*display_name
;
2050 } spoolss_AddFormInfo2
;
2052 typedef [ms_union,switch_type(uint32
)] union {
2053 [case(1)] spoolss_AddFormInfo1
*info1
;
2054 [case(2)] spoolss_AddFormInfo2
*info2
;
2055 } spoolss_AddFormInfo
;
2057 typedef [public] struct {
2059 [switch_is(level
)] spoolss_AddFormInfo info
;
2060 } spoolss_AddFormInfoCtr
;
2062 WERROR spoolss_AddForm
(
2063 [in,ref] policy_handle
*handle,
2064 [in,ref] spoolss_AddFormInfoCtr
*info_ctr
2067 /******************/
2068 /* Function: 0x1f */
2069 WERROR spoolss_DeleteForm
(
2070 [in,ref] policy_handle
*handle,
2071 [in] [string,charset
(UTF16
)] uint16 form_name
[]
2074 /******************/
2075 /* Function: 0x20 */
2076 WERROR spoolss_GetForm
(
2077 [in,ref] policy_handle
*handle,
2078 [in] [string,charset
(UTF16
)] uint16 form_name
[],
2080 [in,unique] DATA_BLOB
*buffer
,
2081 [in] uint32 offered
,
2082 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_FormInfo
*info
,
2083 [out,ref] uint32
*needed
2086 /******************/
2087 /* Function: 0x21 */
2088 WERROR spoolss_SetForm
(
2089 [in,ref] policy_handle
*handle,
2090 [in] [string,charset
(UTF16
)] uint16 form_name
[],
2091 [in,ref] spoolss_AddFormInfoCtr
*info_ctr
2094 /******************/
2095 /* Function: 0x22 */
2096 [public,noopnum
,noprint
] WERROR _spoolss_EnumForms
(
2097 [in,ref] policy_handle
*handle,
2099 [in,unique] DATA_BLOB
*buffer
,
2100 [in] uint32 offered
,
2101 [out,unique] DATA_BLOB
*info
,
2102 [out,ref] uint32
*needed
,
2103 [out,ref] uint32
*count
2105 [public,noopnum
,noprint
] void __spoolss_EnumForms
(
2108 [out,switch_is(level
)] spoolss_FormInfo info
[count
]
2110 [nopull
,nopush
] WERROR spoolss_EnumForms
(
2111 [in,ref] policy_handle
*handle,
2113 [in,unique] DATA_BLOB
*buffer
,
2114 [in] uint32 offered
,
2115 [out,ref] uint32
*count
,
2116 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_FormInfo
**info
,
2117 [out,ref] uint32
*needed
2121 * Special strings for the OpenPrinter() call. See the MSDN DDK
2122 * docs on the XcvDataPort() for more details.
2125 const string SPL_LOCAL_PORT
= "Local Port";
2126 const string SPL_TCPIP_PORT
= "Standard TCP/IP Port";
2127 const string SPL_XCV_MONITOR_LOCALMON
= ",XcvMonitor Local Port";
2128 const string SPL_XCV_MONITOR_TCPMON
= ",XcvMonitor Standard TCP/IP Port";
2130 typedef [public,gensize
] struct {
2131 [relative
] nstring
*port_name
;
2132 } spoolss_PortInfo1
;
2135 SPOOLSS_PORT_TYPE_WRITE
= 0x00000001,
2136 SPOOLSS_PORT_TYPE_READ
= 0x00000002,
2137 SPOOLSS_PORT_TYPE_REDIRECTED
= 0x00000004,
2138 SPOOLSS_PORT_TYPE_NET_ATTACHED
= 0x00000008
2141 typedef [public,gensize
] struct {
2142 [relative
] nstring
*port_name
;
2143 [relative
] nstring
*monitor_name
;
2144 [relative
] nstring
*description
;
2145 spoolss_PortType port_type
;
2147 } spoolss_PortInfo2
;
2149 typedef [v1_enum] enum {
2150 PORT_STATUS_CLEAR
= 0x00000000,
2151 PORT_STATUS_OFFLINE
= 0x00000001,
2152 PORT_STATUS_PAPER_JAM
= 0x00000002,
2153 PORT_STATUS_PAPER_OUT
= 0x00000003,
2154 PORT_STATUS_OUTPUT_BIN_FULL
= 0x00000004,
2155 PORT_STATUS_PAPER_PROBLEM
= 0x00000005,
2156 PORT_STATUS_NO_TONER
= 0x00000006,
2157 PORT_STATUS_DOOR_OPEN
= 0x00000007,
2158 PORT_STATUS_USER_INTERVENTION
= 0x00000008,
2159 PORT_STATUS_OUT_OF_MEMORY
= 0x00000009,
2160 PORT_STATUS_TONER_LOW
= 0x0000000A,
2161 PORT_STATUS_WARMING_UP
= 0x0000000B,
2162 PORT_STATUS_POWER_SAVE
= 0x0000000C
2163 } spoolss_PortStatus
;
2165 typedef [v1_enum] enum {
2166 PORT_STATUS_TYPE_ERROR
= 0x00000001,
2167 PORT_STATUS_TYPE_WARNING
= 0x00000002,
2168 PORT_STATUS_TYPE_INFO
= 0x00000003
2169 } spoolss_PortSeverity
;
2171 typedef [public,gensize
] struct {
2172 spoolss_PortStatus status
;
2173 [relative
] nstring
*status_string
;
2174 spoolss_PortSeverity severity
;
2175 } spoolss_PortInfo3
;
2177 typedef [public,gensize
] struct {
2178 [relative
] nstring
*port_name
;
2179 DATA_BLOB monitor_data
; /* relative ?? */
2180 } spoolss_PortInfoFF
;
2182 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2183 [case(1)] spoolss_PortInfo1 info1
;
2184 [case(2)] spoolss_PortInfo2 info2
;
2185 [case(3)] spoolss_PortInfo3 info3
;
2186 [case(0xff)] spoolss_PortInfoFF infoFF
;
2190 /******************/
2191 /* Function: 0x23 */
2192 [public,noopnum
,noprint
] WERROR _spoolss_EnumPorts
(
2193 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2195 [in,unique] DATA_BLOB
*buffer
,
2196 [in] uint32 offered
,
2197 [out,unique] DATA_BLOB
*info
,
2198 [out,ref] uint32
*needed
,
2199 [out,ref] uint32
*count
2201 [public,noopnum
,noprint
] void __spoolss_EnumPorts
(
2204 [out,switch_is(level
)] spoolss_PortInfo info
[count
]
2206 [nopull
,nopush
] WERROR spoolss_EnumPorts
(
2207 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2209 [in,unique] DATA_BLOB
*buffer
,
2210 [in] uint32 offered
,
2211 [out,ref] uint32
*count
,
2212 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PortInfo
**info
,
2213 [out,ref] uint32
*needed
2216 /******************/
2217 /* Function: 0x24 */
2218 typedef [public,gensize
] struct {
2219 [relative
] nstring
*monitor_name
;
2220 } spoolss_MonitorInfo1
;
2222 typedef [public,gensize
] struct {
2223 [relative
] nstring
*monitor_name
;
2224 [relative
] nstring
*environment
;
2225 [relative
] nstring
*dll_name
;
2226 } spoolss_MonitorInfo2
;
2228 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2229 [case(1)] spoolss_MonitorInfo1 info1
;
2230 [case(2)] spoolss_MonitorInfo2 info2
;
2232 } spoolss_MonitorInfo
;
2234 [public,noopnum
,noprint
] WERROR _spoolss_EnumMonitors
(
2235 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2237 [in,unique] DATA_BLOB
*buffer
,
2238 [in] uint32 offered
,
2239 [out,unique] DATA_BLOB
*info
,
2240 [out,ref] uint32
*needed
,
2241 [out,ref] uint32
*count
2243 [public,noopnum
,noprint
] void __spoolss_EnumMonitors
(
2246 [out,switch_is(level
)] spoolss_MonitorInfo info
[count
]
2248 [nopull
,nopush
] WERROR spoolss_EnumMonitors
(
2249 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2251 [in,unique] DATA_BLOB
*buffer
,
2252 [in] uint32 offered
,
2253 [out,ref] uint32
*count
,
2254 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_MonitorInfo
**info
,
2255 [out,ref] uint32
*needed
2258 /******************/
2259 /* Function: 0x25 */
2261 typedef [public,gensize
] struct {
2262 [string,charset
(UTF16
)] uint16
*port_name
;
2263 } spoolss_SetPortInfo1
;
2265 typedef [public,gensize
] struct {
2266 [string,charset
(UTF16
)] uint16
*port_name
;
2267 [string,charset
(UTF16
)] uint16
*monitor_name
;
2268 [string,charset
(UTF16
)] uint16
*description
;
2269 spoolss_PortType port_type
;
2271 } spoolss_SetPortInfo2
;
2273 typedef [public,gensize
] struct {
2274 spoolss_PortStatus status
;
2275 [string,charset
(UTF16
)] uint16
*status_string
;
2276 spoolss_PortSeverity severity
;
2277 } spoolss_SetPortInfo3
;
2279 typedef [public,gensize
] struct {
2280 [string,charset
(UTF16
)] uint16
*port_name
;
2281 DATA_BLOB monitor_data
; /* relative ?? */
2282 } spoolss_SetPortInfoFF
;
2284 typedef [ms_union,switch_type(uint32
)] union {
2285 [case(1)] spoolss_SetPortInfo1
*info1
;
2286 [case(2)] spoolss_SetPortInfo2
*info2
;
2287 [case(3)] spoolss_SetPortInfo3
*info3
;
2288 [case(0xff)] spoolss_SetPortInfoFF
*infoFF
;
2289 } spoolss_SetPortInfo
;
2291 typedef [public] struct {
2293 [switch_is(level
)] spoolss_SetPrinterInfo info
;
2294 } spoolss_SetPortInfoContainer
;
2296 WERROR spoolss_AddPort
(
2297 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
2298 [in] uint32 unknown
,
2299 [in] [string,charset
(UTF16
)] uint16 monitor_name
[]
2302 /******************/
2303 /* Function: 0x26 */
2304 [todo
] WERROR spoolss_ConfigurePort
(
2307 /******************/
2308 /* Function: 0x27 */
2309 WERROR spoolss_DeletePort
(
2310 [in,unique] [string,charset
(UTF16
)] uint16
*server_name
,
2311 [in] uint3264
ptr, /* ULONG_PTR */
2312 [in,ref] [string,charset
(UTF16
)] uint16
*port_name
2315 /******************/
2316 /* Function: 0x28 */
2317 WERROR spoolss_CreatePrinterIC
(
2318 [in,ref] policy_handle
*handle,
2319 [out,ref] policy_handle
*gdi_handle
,
2320 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
2323 /******************/
2324 /* Function: 0x29 */
2329 } UNIVERSAL_FONT_ID
;
2331 typedef [public] struct {
2333 UNIVERSAL_FONT_ID fonts
[count
];
2334 } UNIVERSAL_FONT_ID_ctr
;
2336 WERROR spoolss_PlayGDIScriptOnPrinterIC
(
2337 [in,ref] policy_handle
*gdi_handle
,
2338 [in,ref] [size_is(cIn
)] uint8
*pIn
,
2340 [out,ref] [size_is(cOut
)] uint8
*pOut
,
2345 /******************/
2346 /* Function: 0x2a */
2347 WERROR spoolss_DeletePrinterIC
(
2348 [in,out,ref] policy_handle
*gdi_handle
2351 /******************/
2352 /* Function: 0x2b */
2353 [todo
] WERROR spoolss_AddPrinterConnection
(
2356 /******************/
2357 /* Function: 0x2c */
2358 [todo
] WERROR spoolss_DeletePrinterConnection
(
2361 /******************/
2362 /* Function: 0x2d */
2363 [todo
] WERROR spoolss_PrinterMessageBox
(
2364 /* Marked as obsolete in MSDN. "Not necessary and has
2368 /******************/
2369 /* Function: 0x2e */
2372 [string,charset
(URF16
)] uint16
*monitor_name
;
2373 } spoolss_AddMonitorInfo1
;
2376 [string,charset
(URF16
)] uint16
*monitor_name
;
2377 [string,charset
(URF16
)] uint16
*environment
;
2378 [string,charset
(URF16
)] uint16
*dll_name
;
2379 } spoolss_AddMonitorInfo2
;
2381 typedef [ms_union,switch_type(uint32
)] union {
2382 [case(1)] spoolss_AddMonitorInfo1
*info1
;
2383 [case(2)] spoolss_AddMonitorInfo2
*info2
;
2384 } spoolss_AddMonitorInfo
;
2386 typedef [public] struct {
2388 [switch_is(level
)] spoolss_MonitorInfo info
;
2389 } spoolss_MonitorContainer
;
2391 [todo
] WERROR spoolss_AddMonitor
(
2394 /******************/
2395 /* Function: 0x2f */
2396 [todo
] WERROR spoolss_DeleteMonitor
(
2399 /******************/
2400 /* Function: 0x30 */
2401 WERROR spoolss_DeletePrintProcessor
(
2402 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
2403 [in,unique] [string,charset
(UTF16
)] uint16
*architecture
,
2404 [in] [string,charset
(UTF16
)] uint16 print_processor_name
[]
2407 /******************/
2408 /* Function: 0x31 */
2409 [todo
] WERROR spoolss_AddPrintProvidor
(
2412 /******************/
2413 /* Function: 0x32 */
2414 [todo
] WERROR spoolss_DeletePrintProvidor
(
2417 /******************/
2418 /* Function: 0x33 */
2420 typedef [public,gensize
] struct {
2421 [relative
] nstring
*name_array
;
2422 } spoolss_PrintProcDataTypesInfo1
;
2424 typedef [nodiscriminant
,relative_base
,public,flag
(NDR_RELATIVE_REVERSE
)] union {
2425 [case(1)] spoolss_PrintProcDataTypesInfo1 info1
;
2427 } spoolss_PrintProcDataTypesInfo
;
2429 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrintProcessorDataTypes
(
2430 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2431 [in,unique] [string,charset
(UTF16
)] uint16
*print_processor_name
,
2433 [in,unique] DATA_BLOB
*buffer
,
2434 [in] uint32 offered
,
2435 [out,unique] DATA_BLOB
*info
,
2436 [out,ref] uint32
*needed
,
2437 [out,ref] uint32
*count
2439 [public,noopnum
,noprint
] void __spoolss_EnumPrintProcessorDataTypes
(
2442 [out,switch_is(level
)] spoolss_PrintProcDataTypesInfo info
[count
]
2444 [nopull
,nopush
] WERROR spoolss_EnumPrintProcessorDataTypes
(
2445 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2446 [in,unique] [string,charset
(UTF16
)] uint16
*print_processor_name
,
2448 [in,unique] DATA_BLOB
*buffer
,
2449 [in] uint32 offered
,
2450 [out,ref] uint32
*count
,
2451 [out,ref,switch_is(level
),size_is(,*count
)] spoolss_PrintProcDataTypesInfo
**info
,
2452 [out,ref] uint32
*needed
2455 /******************/
2456 /* Function: 0x34 */
2457 WERROR spoolss_ResetPrinter
(
2458 [in,ref] policy_handle
*handle,
2459 [in,unique] [string,charset
(UTF16
)] uint16
*data_type
,
2460 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
2463 /******************/
2464 /* Function: 0x35 */
2465 [public] WERROR spoolss_GetPrinterDriver2
(
2466 [in,ref] policy_handle
*handle,
2467 [in,unique] [string,charset
(UTF16
)] uint16
*architecture
,
2469 [in,unique] DATA_BLOB
*buffer
,
2470 [in] uint32 offered
,
2471 [in] uint32 client_major_version
,
2472 [in] uint32 client_minor_version
,
2473 [out,unique,subcontext
(4),subcontext_size
(offered
),switch_is(level
)] spoolss_DriverInfo
*info
,
2474 [out,ref] uint32
*needed
,
2475 [out,ref] uint32
*server_major_version
,
2476 [out,ref] uint32
*server_minor_version
2479 /******************/
2480 /* Function: 0x36 */
2481 [todo
] WERROR spoolss_FindFirstPrinterChangeNotification
(
2484 /******************/
2485 /* Function: 0x37 */
2486 [todo
] WERROR spoolss_FindNextPrinterChangeNotification
(
2489 /******************/
2490 /* Function: 0x38 */
2491 [public] WERROR spoolss_FindClosePrinterNotify
(
2492 [in,ref] policy_handle
*handle
2495 /******************/
2496 /* Function: 0x39 */
2497 [todo
] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld
(
2500 /******************/
2501 /* Function: 0x3a */
2502 [public] WERROR spoolss_ReplyOpenPrinter
(
2503 [in,string,charset
(UTF16
)] uint16 server_name
[],
2504 [in] uint32 printer_local
,
2505 [in] winreg_Type type
,
2506 [in,range(0,512)] uint32 bufsize
,
2507 [in,unique,size_is(bufsize
)] uint8
*buffer
,
2508 [out,ref] policy_handle
*handle
2511 /******************/
2512 /* Function: 0x3b */
2514 typedef [bitmap32bit
] bitmap
{
2515 PRINTER_CHANGE_ADD_PRINTER
= 0x00000001,
2516 PRINTER_CHANGE_SET_PRINTER
= 0x00000002,
2517 PRINTER_CHANGE_DELETE_PRINTER
= 0x00000004,
2518 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER
= 0x00000008,
2519 PRINTER_CHANGE_ADD_JOB
= 0x00000100,
2520 PRINTER_CHANGE_SET_JOB
= 0x00000200,
2521 PRINTER_CHANGE_DELETE_JOB
= 0x00000400,
2522 PRINTER_CHANGE_WRITE_JOB
= 0x00000800,
2523 PRINTER_CHANGE_ADD_FORM
= 0x00010000,
2524 PRINTER_CHANGE_SET_FORM
= 0x00020000,
2525 PRINTER_CHANGE_DELETE_FORM
= 0x00040000,
2526 PRINTER_CHANGE_ADD_PORT
= 0x00100000,
2527 PRINTER_CHANGE_CONFIGURE_PORT
= 0x00200000,
2528 PRINTER_CHANGE_DELETE_PORT
= 0x00400000,
2529 PRINTER_CHANGE_ADD_PRINT_PROCESSOR
= 0x01000000,
2530 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR
= 0x04000000,
2531 PRINTER_CHANGE_SERVER
= 0x08000000,
2532 PRINTER_CHANGE_ADD_PRINTER_DRIVER
= 0x10000000,
2533 PRINTER_CHANGE_SET_PRINTER_DRIVER
= 0x20000000,
2534 PRINTER_CHANGE_DELETE_PRINTER_DRIVER
= 0x40000000,
2535 PRINTER_CHANGE_TIMEOUT
= 0x80000000
2536 } spoolss_PrinterChangeFlags
;
2538 const int PRINTER_CHANGE_PRINTER
= 0x000000FF;
2540 const int PRINTER_CHANGE_JOB
= 0x0000FF00;
2542 const int PRINTER_CHANGE_FORM
= (PRINTER_CHANGE_ADD_FORM |
2543 PRINTER_CHANGE_SET_FORM |
2544 PRINTER_CHANGE_DELETE_FORM
); /* 0x00070000 */
2546 const int PRINTER_CHANGE_PORT
= (PRINTER_CHANGE_ADD_PORT |
2547 PRINTER_CHANGE_CONFIGURE_PORT |
2548 PRINTER_CHANGE_DELETE_PORT
); /* 0x00700000 */
2550 const int PRINTER_CHANGE_PRINT_PROCESSOR
= 0x07000000;
2552 const int PRINTER_CHANGE_PRINTER_DRIVER
= (PRINTER_CHANGE_ADD_PRINTER_DRIVER |
2553 PRINTER_CHANGE_SET_PRINTER_DRIVER |
2554 PRINTER_CHANGE_DELETE_PRINTER_DRIVER
); /* 0x70000000 */
2556 const int PRINTER_CHANGE_ALL
= (PRINTER_CHANGE_PRINTER |
2557 PRINTER_CHANGE_JOB |
2558 PRINTER_CHANGE_FORM |
2559 PRINTER_CHANGE_PORT |
2560 PRINTER_CHANGE_PRINT_PROCESSOR |
2561 PRINTER_CHANGE_PRINTER_DRIVER
); /* 0x7777FFFF */
2562 WERROR spoolss_RouterReplyPrinter
(
2563 [in,ref] policy_handle
*handle,
2564 [in] spoolss_PrinterChangeFlags flags
,
2565 [in,range(0,512)] uint32 bufsize
,
2566 [in,unique,size_is(bufsize
)] uint8
*buffer
2569 /******************/
2570 /* Function: 0x3c */
2571 [public] WERROR spoolss_ReplyClosePrinter
(
2572 [in,out,ref] policy_handle
*handle
2575 /******************/
2576 /* Function: 0x3d */
2578 typedef [public] struct {
2579 uint32 monitor_data_size
;
2580 [size_is(monitor_data_size
),unique] uint8
*monitor_data
;
2581 } spoolss_PortVarContainer
;
2583 WERROR spoolss_AddPortEx
(
2584 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2585 [in,ref] spoolss_SetPortInfoContainer
*port_ctr
,
2586 [in,ref] spoolss_PortVarContainer
*port_var_ctr
,
2587 [in,unique] [string,charset
(UTF16
)] uint16
*monitor_name
2590 /******************/
2591 /* Function: 0x3e */
2592 [todo
] WERROR spoolss_RouterFindFirstPrinterChangeNotification
(
2595 /******************/
2596 /* Function: 0x3f */
2597 [todo
] WERROR spoolss_SpoolerInit
(
2600 /******************/
2601 /* Function: 0x40 */
2602 [todo
] WERROR spoolss_ResetPrinterEx
(
2605 typedef [enum16bit
,public] enum {
2606 JOB_NOTIFY_FIELD_PRINTER_NAME
= 0x00,
2607 JOB_NOTIFY_FIELD_MACHINE_NAME
= 0x01,
2608 JOB_NOTIFY_FIELD_PORT_NAME
= 0x02,
2609 JOB_NOTIFY_FIELD_USER_NAME
= 0x03,
2610 JOB_NOTIFY_FIELD_NOTIFY_NAME
= 0x04,
2611 JOB_NOTIFY_FIELD_DATATYPE
= 0x05,
2612 JOB_NOTIFY_FIELD_PRINT_PROCESSOR
= 0x06,
2613 JOB_NOTIFY_FIELD_PARAMETERS
= 0x07,
2614 JOB_NOTIFY_FIELD_DRIVER_NAME
= 0x08,
2615 JOB_NOTIFY_FIELD_DEVMODE
= 0x09,
2616 JOB_NOTIFY_FIELD_STATUS
= 0x0a,
2617 JOB_NOTIFY_FIELD_STATUS_STRING
= 0x0b,
2618 JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR
= 0x0c,
2619 JOB_NOTIFY_FIELD_DOCUMENT
= 0x0d,
2620 JOB_NOTIFY_FIELD_PRIORITY
= 0x0e,
2621 JOB_NOTIFY_FIELD_POSITION
= 0x0f,
2622 JOB_NOTIFY_FIELD_SUBMITTED
= 0x10,
2623 JOB_NOTIFY_FIELD_START_TIME
= 0x11,
2624 JOB_NOTIFY_FIELD_UNTIL_TIME
= 0x12,
2625 JOB_NOTIFY_FIELD_TIME
= 0x13,
2626 JOB_NOTIFY_FIELD_TOTAL_PAGES
= 0x14,
2627 JOB_NOTIFY_FIELD_PAGES_PRINTED
= 0x15,
2628 JOB_NOTIFY_FIELD_TOTAL_BYTES
= 0x16,
2629 JOB_NOTIFY_FIELD_BYTES_PRINTED
= 0x17
2630 } spoolss_JobNotifyField
;
2632 typedef [enum16bit
,public] enum {
2633 PRINTER_NOTIFY_FIELD_SERVER_NAME
= 0x00,
2634 PRINTER_NOTIFY_FIELD_PRINTER_NAME
= 0x01,
2635 PRINTER_NOTIFY_FIELD_SHARE_NAME
= 0x02,
2636 PRINTER_NOTIFY_FIELD_PORT_NAME
= 0x03,
2637 PRINTER_NOTIFY_FIELD_DRIVER_NAME
= 0x04,
2638 PRINTER_NOTIFY_FIELD_COMMENT
= 0x05,
2639 PRINTER_NOTIFY_FIELD_LOCATION
= 0x06,
2640 PRINTER_NOTIFY_FIELD_DEVMODE
= 0x07,
2641 PRINTER_NOTIFY_FIELD_SEPFILE
= 0x08,
2642 PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR
= 0x09,
2643 PRINTER_NOTIFY_FIELD_PARAMETERS
= 0x0a,
2644 PRINTER_NOTIFY_FIELD_DATATYPE
= 0x0b,
2645 PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR
= 0x0c,
2646 PRINTER_NOTIFY_FIELD_ATTRIBUTES
= 0x0d,
2647 PRINTER_NOTIFY_FIELD_PRIORITY
= 0x0e,
2648 PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY
= 0x0f,
2649 PRINTER_NOTIFY_FIELD_START_TIME
= 0x10,
2650 PRINTER_NOTIFY_FIELD_UNTIL_TIME
= 0x11,
2651 PRINTER_NOTIFY_FIELD_STATUS
= 0x12,
2652 PRINTER_NOTIFY_FIELD_STATUS_STRING
= 0x13,
2653 PRINTER_NOTIFY_FIELD_CJOBS
= 0x14,
2654 PRINTER_NOTIFY_FIELD_AVERAGE_PPM
= 0x15,
2655 PRINTER_NOTIFY_FIELD_TOTAL_PAGES
= 0x16,
2656 PRINTER_NOTIFY_FIELD_PAGES_PRINTED
= 0x17,
2657 PRINTER_NOTIFY_FIELD_TOTAL_BYTES
= 0x18,
2658 PRINTER_NOTIFY_FIELD_BYTES_PRINTED
= 0x19,
2659 PRINTER_NOTIFY_FIELD_OBJECT_GUID
= 0x1a,
2660 PRINTER_NOTIFY_FIELD_FRIENDLY_NAME
= 0x1b
2661 } spoolss_PrintNotifyField
;
2663 typedef [enum16bit
] enum {
2664 PRINTER_NOTIFY_TYPE
= 0x00,
2665 JOB_NOTIFY_TYPE
= 0x01
2666 } spoolss_NotifyType
;
2668 typedef [nodiscriminant
,noprint
] union {
2669 [case(PRINTER_NOTIFY_TYPE
)] uint16 field
;
2670 [case(JOB_NOTIFY_TYPE
)] uint16 field
;
2671 [default] uint16 field
;
2674 /******************/
2675 /* Function: 0x41 */
2677 spoolss_NotifyType type
;
2682 [size_is(count
),switch_is(type
)] spoolss_Field
*fields
;
2683 } spoolss_NotifyOptionType
;
2685 typedef [bitmap32bit
] bitmap
{
2686 PRINTER_NOTIFY_OPTIONS_REFRESH
= 0x00000001
2687 } spoolssNotifyOptionFlags
;
2689 typedef [public] struct {
2690 [value
(2)] uint32
version;
2691 spoolssNotifyOptionFlags flags
;
2693 [size_is(count
)] spoolss_NotifyOptionType
*types
;
2694 } spoolss_NotifyOption
;
2696 [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx
(
2697 [in,ref] policy_handle
*handle,
2698 [in] spoolss_PrinterChangeFlags flags
,
2699 [in] uint32 options
,
2700 [in,unique] [string,charset
(UTF16
)] uint16
*local_machine
,
2701 [in] uint32 printer_local
,
2702 [in,unique] spoolss_NotifyOption
*notify_options
2705 /******************/
2706 /* Function: 0x42 */
2710 [size_is(size
/2),unique,charset
(UTF16
)] uint16
*string;
2711 } spoolss_NotifyString
;
2713 typedef [v1_enum] enum {
2714 NOTIFY_TABLE_DWORD
= 0x0001,
2715 NOTIFY_TABLE_STRING
= 0x0002,
2716 NOTIFY_TABLE_DEVMODE
= 0x0003,
2717 NOTIFY_TABLE_TIME
= 0x0004,
2718 NOTIFY_TABLE_SECURITYDESCRIPTOR
= 0x0005
2719 } spoolss_NotifyTable
;
2721 typedef [ms_union, switch_type(uint32
)] union {
2722 [case(1)] uint32 integer
[2];
2723 [case(2)] spoolss_NotifyString
string;
2724 [case(3)] spoolss_DevmodeContainer devmode
;
2725 [case(4)] spoolss_TimeCtr time
;
2726 [case(5)] sec_desc_buf sd
;
2727 } spoolss_NotifyData
;
2730 spoolss_NotifyType type
;
2731 [switch_is(type
)] spoolss_Field field
;
2732 spoolss_NotifyTable variable_type
;
2734 [switch_is(variable_type
)] spoolss_NotifyData data
;
2737 typedef [public] struct {
2738 [value
(2)] uint32
version;
2741 [size_is(count
)] spoolss_Notify notifies
[];
2742 } spoolss_NotifyInfo
;
2744 typedef [ms_union,switch_type(uint32
)] union {
2745 [case(0)] spoolss_NotifyInfo
*info0
;
2746 } spoolss_ReplyPrinterInfo
;
2748 typedef [bitmap32bit
] bitmap
{
2749 PRINTER_NOTIFY_INFO_DISCARDED
= 0x00000001,
2750 PRINTER_NOTIFY_INFO_DISCARDNOTED
= 0x00010000,
2751 PRINTER_NOTIFY_INFO_COLOR_MISMATCH
= 0x00080000
2752 } spoolss_PrinterNotifyFlags
;
2754 WERROR spoolss_RouterReplyPrinterEx
(
2755 [in,ref] policy_handle
*handle,
2757 [in] spoolss_PrinterChangeFlags flags
,
2758 [out,ref] spoolss_PrinterNotifyFlags
*reply_result
,
2759 [in] uint32 reply_type
,
2760 [in,switch_is(reply_type
)] spoolss_ReplyPrinterInfo info
2763 /******************/
2764 /* Function: 0x43 */
2765 [public] WERROR spoolss_RouterRefreshPrinterChangeNotify
(
2766 [in,ref] policy_handle
*handle,
2767 [in] uint32 change_low
,
2768 [in,unique] spoolss_NotifyOption
*options
,
2769 [out,ref] spoolss_NotifyInfo
**info
2772 /******************/
2773 /* Function: 0x44 */
2774 [todo
] WERROR spoolss_44
(
2779 [string,charset
(UTF16
)] uint16
*client
;
2780 [string,charset
(UTF16
)] uint16
*user
;
2782 spoolss_MajorVersion major
;
2783 spoolss_MinorVersion minor
;
2784 spoolss_ProcessorArchitecture processor
;
2785 } spoolss_UserLevel1
;
2789 } spoolss_UserLevel2
;
2795 [string,charset
(UTF16
)] uint16
*client
;
2796 [string,charset
(UTF16
)] uint16
*user
;
2798 spoolss_MajorVersion major
;
2799 spoolss_MinorVersion minor
;
2800 spoolss_ProcessorArchitecture processor
;
2802 } spoolss_UserLevel3
;
2804 typedef [ms_union,switch_type(uint32
)] union {
2805 [case(1)] spoolss_UserLevel1
*level1
;
2806 [case(2)] spoolss_UserLevel2
*level2
;
2807 [case(3)] spoolss_UserLevel3
*level3
;
2808 } spoolss_UserLevel
;
2810 typedef [public] struct {
2812 [switch_is(level
)] spoolss_UserLevel user_info
;
2813 } spoolss_UserLevelCtr
;
2816 SERVER_ACCESS_ADMINISTER
= 0x00000001,
2817 SERVER_ACCESS_ENUMERATE
= 0x00000002,
2818 PRINTER_ACCESS_ADMINISTER
= 0x00000004,
2819 PRINTER_ACCESS_USE
= 0x00000008,
2820 JOB_ACCESS_ADMINISTER
= 0x00000010,
2821 JOB_ACCESS_READ
= 0x00000020
2822 } spoolss_AccessRights
;
2824 /* Access rights for print servers */
2825 const int SERVER_ALL_ACCESS
= SEC_STD_REQUIRED |
2826 SERVER_ACCESS_ADMINISTER |
2827 SERVER_ACCESS_ENUMERATE
;
2829 const int SERVER_READ
= SEC_STD_READ_CONTROL |
2830 SERVER_ACCESS_ENUMERATE
;
2832 const int SERVER_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2833 SERVER_ACCESS_ADMINISTER |
2834 SERVER_ACCESS_ENUMERATE
;
2836 const int SERVER_EXECUTE
= SEC_STD_READ_CONTROL |
2837 SERVER_ACCESS_ENUMERATE
;
2839 /* Access rights for printers */
2840 const int PRINTER_ALL_ACCESS
= SEC_STD_REQUIRED |
2841 PRINTER_ACCESS_ADMINISTER |
2844 const int PRINTER_READ
= SEC_STD_READ_CONTROL |
2847 const int PRINTER_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2850 const int PRINTER_EXECUTE
= SEC_STD_READ_CONTROL |
2853 /* Access rights for jobs */
2854 const int JOB_ALL_ACCESS
= SEC_STD_REQUIRED |
2855 JOB_ACCESS_ADMINISTER
;
2857 const int JOB_READ
= SEC_STD_READ_CONTROL |
2858 JOB_ACCESS_ADMINISTER
;
2860 const int JOB_WRITE
= STANDARD_RIGHTS_WRITE_ACCESS |
2861 JOB_ACCESS_ADMINISTER
;
2863 const int JOB_EXECUTE
= SEC_STD_READ_CONTROL |
2864 JOB_ACCESS_ADMINISTER
;
2866 /* ACE masks for various print permissions */
2867 const int PRINTER_ACE_FULL_CONTROL
= SEC_GENERIC_ALL |
2870 const int PRINTER_ACE_MANAGE_DOCUMENTS
= SEC_GENERIC_ALL |
2871 SEC_STD_READ_CONTROL
;
2873 const int PRINTER_ACE_PRINT
= SEC_GENERIC_EXECUTE |
2874 SEC_STD_READ_CONTROL |
2877 /******************/
2878 /* Function: 0x45 */
2879 [public] WERROR spoolss_OpenPrinterEx
(
2880 [in,unique] [string,charset
(UTF16
)] uint16
*printername
,
2881 [in,unique] [string,charset
(UTF16
)] uint16
*datatype
,
2882 [in] spoolss_DevmodeContainer devmode_ctr
,
2883 [in] spoolss_AccessRights access_mask
,
2884 [in] spoolss_UserLevelCtr userlevel_ctr
,
2885 [out,ref] policy_handle
*handle
2888 /******************/
2889 /* Function: 0x46 */
2890 WERROR spoolss_AddPrinterEx
(
2891 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
2892 [in,ref] spoolss_SetPrinterInfoCtr
*info_ctr
,
2893 [in,ref] spoolss_DevmodeContainer
*devmode_ctr
,
2894 [in,ref] sec_desc_buf
*secdesc_ctr
,
2895 [in,ref] spoolss_UserLevelCtr
*userlevel_ctr
,
2896 [out,ref] policy_handle
*handle
2899 /******************/
2900 /* Function: 0x47 */
2901 WERROR spoolss_SetPort
(
2902 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
2903 [in,unique] [string,charset
(UTF16
)] uint16
*port_name
,
2904 [in,ref] spoolss_SetPortInfoContainer
*port_ctr
2907 /******************/
2908 /* Function: 0x48 */
2909 WERROR spoolss_EnumPrinterData
(
2910 [in,ref] policy_handle
*handle,
2911 [in] uint32 enum_index
,
2912 [out,size_is(value_offered
/2),charset
(UTF16
)] uint16 value_name
[],
2913 [in] uint32 value_offered
,
2914 [out,ref] uint32
*value_needed
,
2915 [out,ref] winreg_Type
*type
,
2916 [out,ref,size_is(data_offered
),flag
(LIBNDR_PRINT_ARRAY_HEX
)] uint8
*data
,
2917 [in] uint32 data_offered
,
2918 [out,ref] uint32
*data_needed
2921 /******************/
2922 /* Function: 0x49 */
2923 WERROR spoolss_DeletePrinterData
(
2924 [in,ref] policy_handle
*handle,
2925 [in] [string,charset
(UTF16
)] uint16 value_name
[]
2928 /******************/
2929 /* Function: 0x4a */
2930 [todo
] WERROR spoolss_4a
(
2933 /******************/
2934 /* Function: 0x4b */
2935 [todo
] WERROR spoolss_4b
(
2938 /******************/
2939 /* Function: 0x4c */
2940 [todo
] WERROR spoolss_4c
(
2943 /******************/
2944 /* Function: 0x4d */
2945 WERROR spoolss_SetPrinterDataEx
(
2946 [in,ref] policy_handle
*handle,
2947 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2948 [in] [string,charset
(UTF16
)] uint16 value_name
[],
2949 [in] winreg_Type type
,
2950 [in,ref] [size_is(offered
)] uint8
*data
,
2954 /******************/
2955 /* Function: 0x4e */
2956 WERROR spoolss_GetPrinterDataEx
(
2957 [in,ref] policy_handle
*handle,
2958 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2959 [in] [string,charset
(UTF16
)] uint16 value_name
[],
2960 [out,ref] winreg_Type
*type
,
2961 [out,ref,size_is(offered
)] uint8
*data
,
2962 [in] uint32 offered
,
2963 [out,ref] uint32
*needed
2966 /******************/
2967 /* Function: 0x4f */
2969 typedef [relative_base
,public,gensize
] struct {
2970 [relative
] nstring
*value_name
;
2971 [value
(2*strlen_m_term
(value_name
))] uint32 value_name_len
;
2973 [relative
,subcontext
(0),subcontext_size
(data_length
),flag
(NDR_REMAINING|ndr_spoolss_PrinterEnumValues_align
(r
->type
))] DATA_BLOB
*data
;
2974 [value
(data ? data
->length
: 0)] uint32 data_length
;
2975 } spoolss_PrinterEnumValues
;
2977 [public,noopnum
,noprint
] WERROR _spoolss_EnumPrinterDataEx
(
2978 [in,ref] policy_handle
*handle,
2979 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2980 [out] DATA_BLOB info
,
2981 [in] uint32 offered
,
2982 [out,ref] uint32
*needed
,
2983 [out,ref] uint32
*count
2985 [public,noopnum
,noprint
] void __spoolss_EnumPrinterDataEx
(
2987 [out] spoolss_PrinterEnumValues info
[count
]
2989 [nopull
,nopush
] WERROR spoolss_EnumPrinterDataEx
(
2990 [in,ref] policy_handle
*handle,
2991 [in] [string,charset
(UTF16
)] uint16 key_name
[],
2992 [in] uint32 offered
,
2993 [out,ref] uint32
*count
,
2994 [out,ref,size_is(,*count
)] spoolss_PrinterEnumValues
**info
,
2995 [out,ref] uint32
*needed
2998 typedef [nodiscriminant
] union {
3001 [default] nstring_array string_array
;
3004 /******************/
3005 /* Function: 0x50 */
3006 [public] WERROR spoolss_EnumPrinterKey
(
3007 [in, ref] policy_handle
*handle,
3008 [in] [string,charset
(UTF16
)] uint16 key_name
[],
3009 [out,ref] uint32
*_ndr_size
,
3010 [out,ref,subcontext
(0),subcontext_size
(*_ndr_size
*2),switch_is(*_ndr_size
)] spoolss_KeyNames
*key_buffer
,
3011 [in] uint32 offered
,
3012 [out,ref] uint32
*needed
3015 /******************/
3016 /* Function: 0x51 */
3017 WERROR spoolss_DeletePrinterDataEx
(
3018 [in,ref] policy_handle
*handle,
3019 [in] [string,charset
(UTF16
)] uint16 key_name
[],
3020 [in] [string,charset
(UTF16
)] uint16 value_name
[]
3023 /******************/
3024 /* Function: 0x52 */
3025 WERROR spoolss_DeletePrinterKey
(
3026 [in,ref] policy_handle
*handle,
3027 [in] [string,charset
(UTF16
)] uint16 key_name
[]
3030 /******************/
3031 /* Function: 0x53 */
3032 [todo
] WERROR spoolss_53
(
3035 /******************/
3036 /* Function: 0x54 */
3037 typedef [public,bitmap32bit
] bitmap
{
3038 DPD_DELETE_UNUSED_FILES
= 0x00000001,
3039 DPD_DELETE_SPECIFIC_VERSION
= 0x00000002,
3040 DPD_DELETE_ALL_FILES
= 0x00000004
3041 } spoolss_DeleteDriverFlags
;
3043 WERROR spoolss_DeletePrinterDriverEx
(
3044 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
3045 [in] [string,charset
(UTF16
)] uint16 architecture
[],
3046 [in] [string,charset
(UTF16
)] uint16 driver
[],
3047 [in] spoolss_DeleteDriverFlags delete_flags
,
3051 /******************/
3052 /* Function: 0x55 */
3053 WERROR spoolss_AddPerMachineConnection
(
3054 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
3055 [in,ref] [string,charset
(UTF16
)] uint16
*printername
,
3056 [in,ref] [string,charset
(UTF16
)] uint16
*printserver
,
3057 [in,ref] [string,charset
(UTF16
)] uint16
*provider
3060 /******************/
3061 /* Function: 0x56 */
3062 WERROR spoolss_DeletePerMachineConnection
(
3063 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
3064 [in,ref] [string,charset
(UTF16
)] uint16
*printername
3067 /******************/
3068 /* Function: 0x57 */
3069 [public,noopnum
,noprint
] WERROR _spoolss_EnumPerMachineConnections
(
3070 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
3071 [in,unique] DATA_BLOB
*buffer
,
3072 [in] uint32 offered
,
3073 [out,unique] DATA_BLOB
*info
,
3074 [out,ref] uint32
*needed
,
3075 [out,ref] uint32
*count
3077 [public,noopnum
,noprint
] void __spoolss_EnumPerMachineConnections
(
3079 [out] spoolss_PrinterInfo4 info
[count
]
3081 [nopull
,nopush
] WERROR spoolss_EnumPerMachineConnections
(
3082 [in,unique] [string,charset
(UTF16
)] uint16
*server
,
3083 [in,unique] DATA_BLOB
*buffer
,
3084 [in] uint32 offered
,
3085 [out,ref] uint32
*count
,
3086 [out,ref,size_is(,*count
)] spoolss_PrinterInfo4
**info
,
3087 [out,ref] uint32
*needed
3090 /******************/
3091 /* Function: 0x58 */
3093 typedef [v1_enum] enum {
3094 PROTOCOL_RAWTCP_TYPE
= 1,
3095 PROTOCOL_LPR_TYPE
= 2
3096 } spoolss_PortProtocol
;
3098 typedef [public,gensize
] struct {
3099 [charset
(UTF16
)] uint16 portname
[64];
3100 [value
(0x00000001)] uint32
version;
3101 spoolss_PortProtocol protocol
;
3102 [value
(ndr_size_spoolss_PortData1
(r
, ndr
->flags
))] uint32 size
;
3104 [charset
(UTF16
)] uint16 hostaddress
[49];
3105 [charset
(UTF16
)] uint16 snmpcommunity
[33];
3107 [charset
(UTF16
)] uint16 queue
[33];
3108 [charset
(UTF16
)] uint16 ip_address
[16]; /* s3 had 17 */
3109 [charset
(UTF16
)] uint16 hardware_address
[13];
3110 [charset
(UTF16
)] uint16 device_type
[257];
3112 boolean32 snmp_enabled
;
3113 uint32 snmp_dev_index
;
3114 } spoolss_PortData1
;
3116 typedef [public,gensize
] struct {
3117 [charset
(UTF16
)] uint16 portname
[64];
3118 [value
(0x00000002)] uint32
version;
3119 spoolss_PortProtocol protocol
;
3120 [value
(ndr_size_spoolss_PortData2
(r
, ndr
->flags
))] uint32 size
;
3122 [charset
(UTF16
)] uint16 hostaddress
[128];
3123 [charset
(UTF16
)] uint16 snmpcommunity
[33];
3125 [charset
(UTF16
)] uint16 queue
[33];
3126 [charset
(UTF16
)] uint16 device_type
[257];
3128 boolean32 snmp_enabled
;
3129 uint32 snmp_dev_index
;
3130 uint32 port_monitor_mib_index
;
3131 } spoolss_PortData2
;
3133 typedef [public] struct {
3135 } spoolss_MonitorUi
;
3137 WERROR spoolss_XcvData
(
3138 [in,ref] policy_handle
*handle,
3139 [in] [string,charset
(UTF16
)] uint16 function_name
[],
3140 [in] DATA_BLOB in_data
,
3141 [in,value
(r
->in.in_data.length
)] uint32 _in_data_length
,
3142 [out,ref] [size_is(out_data_size
)] uint8
*out_data
,
3143 [in] uint32 out_data_size
,
3144 [out,ref] uint32
*needed
,
3145 [in,out,ref] uint32
*status_code
3148 /******************/
3149 /* Function: 0x59 */
3151 typedef [bitmap32bit
] bitmap
{
3152 APD_STRICT_UPGRADE
= 0x00000001,
3153 APD_STRICT_DOWNGRADE
= 0x00000002,
3154 APD_COPY_ALL_FILES
= 0x00000004,
3155 APD_COPY_NEW_FILES
= 0x00000008,
3156 APD_COPY_FROM_DIRECTORY
= 0x00000010,
3157 APD_DONT_COPY_FILES_TO_CLUSTER
= 0x00001000,
3158 APD_COPY_TO_ALL_SPOOLERS
= 0x00002000,
3159 APD_RETURN_BLOCKING_STATUS_CODE
= 0x00010000
3160 } spoolss_AddPrinterDriverExFlags
;
3162 [public] WERROR spoolss_AddPrinterDriverEx
(
3163 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3164 [in,ref] spoolss_AddDriverInfoCtr
*info_ctr
,
3165 [in] spoolss_AddPrinterDriverExFlags flags
3168 /******************/
3169 /* Function: 0x5a */
3170 [todo
] WERROR spoolss_5a
(
3173 /******************/
3174 /* Function: 0x5b */
3175 [todo
] WERROR spoolss_5b
(
3178 /******************/
3179 /* Function: 0x5c */
3180 [todo
] WERROR spoolss_5c
(
3183 /******************/
3184 /* Function: 0x5d */
3185 [todo
] WERROR spoolss_5d
(
3188 /******************/
3189 /* Function: 0x5e */
3190 [todo
] WERROR spoolss_5e
(
3193 /******************/
3194 /* Function: 0x5f */
3195 [todo
] WERROR spoolss_5f
(
3198 /******************/
3199 /* Function: 0x60 */
3200 [todo
] WERROR spoolss_60
(
3203 /******************/
3204 /* Function: 0x61 */
3206 const string BIDI_ACTION_ENUM_SCHEMA
= "EnumSchema";
3207 const string BIDI_ACTION_GET
= "Get";
3208 const string BIDI_ACTION_SET
= "Set";
3209 const string BIDI_ACTION_GET_ALL
= "GetAll";
3212 BIDI_NULL
= 0x00000000,
3213 BIDI_INT
= 0x00000001,
3214 BIDI_FLOAT
= 0x00000002,
3215 BIDI_BOOL
= 0x00000003,
3216 BIDI_STRING
= 0x00000004,
3217 BIDI_TEXT
= 0x00000005,
3218 BIDI_ENUM
= 0x00000006,
3219 BIDI_BLOB
= 0x00000007
3224 [size_is(cbBuf
), unique] uint8
*pszString
;
3225 } RPC_BINARY_CONTAINER
;
3227 typedef [ms_union,switch_type(uint32
)] union {
3228 [case(BIDI_NULL
)] uint32 bData
;
3229 [case(BIDI_BOOL
)] uint32 bData
;
3230 [case(BIDI_INT
)] uint32 iData
;
3231 [case(BIDI_STRING
)] [unique] [string,charset
(UTF16
)] uint16
*sData
;
3232 [case(BIDI_TEXT
)] [unique] [string,charset
(UTF16
)] uint16
*sData
;
3233 [case(BIDI_ENUM
)] [unique] [string,charset
(UTF16
)] uint16
*sData
;
3234 /*[case(BIDI_FLOAT)] float fData;*/
3235 [case(BIDI_BLOB
)] RPC_BINARY_CONTAINER biData
;
3240 [switch_is(dwBidiType
)] RPC_BIDI_DATA_u u
;
3245 [unique] [string,charset
(UTF16
)] uint16
*pSchema
;
3247 } RPC_BIDI_REQUEST_DATA
;
3249 typedef [public] struct {
3250 [value
(1)] uint32
Version;
3253 [size_is(Count
), unique] RPC_BIDI_REQUEST_DATA
*aData
[];
3254 } RPC_BIDI_REQUEST_CONTAINER
;
3259 [unique] [string,charset
(UTF16
)] uint16
*pSchema
;
3261 } RPC_BIDI_RESPONSE_DATA
;
3263 typedef [public] struct {
3264 [value
(1)] uint32
Version;
3267 [size_is(Count
), unique] RPC_BIDI_RESPONSE_DATA
*aData
[];
3268 } RPC_BIDI_RESPONSE_CONTAINER
;
3270 WERROR spoolss_SendRecvBidiData
(
3271 [in] policy_handle hPrinter
,
3272 [in,unique] [string,charset
(UTF16
)] uint16
*pAction
,
3273 [in] RPC_BIDI_REQUEST_CONTAINER
*pReqData
,
3274 [out] RPC_BIDI_RESPONSE_CONTAINER
**ppRespData
3277 /******************/
3278 /* Function: 0x62 */
3279 [todo
] WERROR spoolss_62
(
3282 /******************/
3283 /* Function: 0x63 */
3284 [todo
] WERROR spoolss_63
(
3287 /******************/
3288 /* Function: 0x64 */
3289 [todo
] WERROR spoolss_64
(
3292 /******************/
3293 /* Function: 0x65 */
3294 [todo
] WERROR spoolss_65
(
3297 /******************/
3298 /* Function: 0x66 */
3300 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_UNIDRV
= "{D20EA372-DD35-4950-9ED8-A6335AFE79F0}";
3301 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_PSCRIPT
= "{D20EA372-DD35-4950-9ED8-A6335AFE79F1}";
3302 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_PCLXL
= "{D20EA372-DD35-4950-9ED8-A6335AFE79F2}";
3303 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_PLOTTER
= "{D20EA372-DD35-4950-9ED8-A6335AFE79F4}";
3304 const string SPOOLSS_CORE_PRINT_PACKAGE_FILES_XPSDRV
= "{D20EA372-DD35-4950-9ED8-A6335AFE79F5}";
3306 typedef [public] struct {
3307 GUID core_driver_guid
;
3309 hyper driver_version
;
3310 [charset
(UTF16
),to_null
] uint16 szPackageID
[260];
3311 } spoolss_CorePrinterDriver
;
3313 [public] HRESULT spoolss_GetCorePrinterDrivers
(
3314 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3315 [in,ref] [string,charset
(UTF16
)] uint16
*architecture
,
3316 [in] uint32 core_driver_size
,
3317 [in,size_is(core_driver_size
)] uint16
*core_driver_dependencies
,
3318 [in] uint32 core_printer_driver_count
,
3319 [out,size_is(core_printer_driver_count
)] spoolss_CorePrinterDriver
*core_printer_drivers
3322 /******************/
3323 /* Function: 0x67 */
3324 [todo
] WERROR spoolss_67
(
3327 /******************/
3328 /* Function: 0x68 */
3329 HRESULT spoolss_GetPrinterDriverPackagePath
(
3330 [in,unique] [string,charset
(UTF16
)] uint16
*servername
,
3331 [in,ref] [string,charset
(UTF16
)] uint16
*architecture
,
3332 [in,unique] [string,charset
(UTF16
)] uint16
*language
,
3333 [in,ref] [string,charset
(UTF16
)] uint16
*package_id
,
3334 [in,out,unique,size_is(driver_package_cab_size
)] [charset
(UTF16
)] uint16
*driver_package_cab
,
3335 [in] uint32 driver_package_cab_size
,
3336 [out,ref] uint32
*required
3339 /******************/
3340 /* Function: 0x69 */
3341 [todo
] WERROR spoolss_69
(
3344 /******************/
3345 /* Function: 0x6a */
3346 [todo
] WERROR spoolss_6a
(
3349 /******************/
3350 /* Function: 0x6b */
3351 [todo
] WERROR spoolss_6b
(
3354 /******************/
3355 /* Function: 0x6c */
3356 [todo
] WERROR spoolss_6c
(
3359 /******************/
3360 /* Function: 0x6d */
3361 [todo
] WERROR spoolss_6d
(
3364 /******************/
3365 /* Function: 0x6e */
3367 const string SPLFILE_CONTENT_TYPE_PROP_NAME
= "Spool File Contents";
3368 const string SPLFILE_CONTENT_TYPE_XPS_MS
= "TYPE_XPS_MS";
3369 const string SPLFILE_CONTENT_TYPE_XPS_OPEN
= "TYPE_XPS_OPEN";
3370 const string SPLFILE_CONTENT_TYPE_PDL_POSTSCRIPT
= "TYPE_PDL_POSTSCRIPT";
3371 const string SPLFILE_CONTENT_TYPE_PDL_UNKNOWN
= "TYPE_PDL_UNKNOWN";
3374 kRpcPropertyTypeString
= 1,
3375 kRpcPropertyTypeInt32
= 2,
3376 kRpcPropertyTypeInt64
= 3,
3377 kRpcPropertyTypeByte
= 4,
3378 kRpcPropertyTypeBuffer
= 5
3379 } spoolss_EPrintPropertyType
;
3383 [size_is(cbBuf
)] uint8
*pBuf
;
3386 typedef [ms_union,switch_type(spoolss_EPrintPropertyType
)] union {
3387 [case(kRpcPropertyTypeString
)] [string,charset
(UTF16
)] uint16
*propertyString
;
3388 [case(kRpcPropertyTypeInt32
)] uint32 propertyInt32
;
3389 [case(kRpcPropertyTypeInt64
)] hyper propertyInt64
;
3390 [case(kRpcPropertyTypeByte
)] uint8 propertyByte
;
3391 [case(kRpcPropertyTypeBuffer
)] propertyBlob propertyBlob
;
3392 } spoolss_PrintPropertyValueUnion
;
3394 typedef [public] struct {
3395 spoolss_EPrintPropertyType ePropertyType
;
3396 [switch_is(ePropertyType
)] spoolss_PrintPropertyValueUnion value
;
3397 } spoolss_PrintPropertyValue
;
3399 typedef [public] struct {
3400 [string,charset
(UTF16
)] uint16
*propertyName
;
3401 spoolss_PrintPropertyValue propertyValue
;
3402 } spoolss_PrintNamedProperty
;
3404 WERROR spoolss_GetJobNamedPropertyValue
(
3405 [in,ref] policy_handle
*hPrinter
,
3407 [in] [string,charset
(UTF16
)] uint16
*pszName
,
3408 [out,ref] spoolss_PrintPropertyValue
*pValue
3411 /******************/
3412 /* Function: 0x6f */
3413 [public] WERROR spoolss_SetJobNamedProperty
(
3414 [in,ref] policy_handle
*hPrinter
,
3416 [in,ref] spoolss_PrintNamedProperty
*pProperty
3419 /******************/
3420 /* Function: 0x70 */
3421 WERROR spoolss_DeleteJobNamedProperty
(
3422 [in,ref] policy_handle
*hPrinter
,
3424 [in] [string,charset
(UTF16
)] uint16
*pszName
3427 /******************/
3428 /* Function: 0x71 */
3429 WERROR spoolss_EnumJobNamedProperties
(
3430 [in,ref] policy_handle
*hPrinter
,
3432 [out,ref] uint32
*pcProperties
,
3433 [out,ref,size_is(,*pcProperties
)] spoolss_PrintNamedProperty
**ppProperties
3436 /******************/
3437 /* Function: 0x72 */
3438 [todo
] WERROR spoolss_72
(
3441 /******************/
3442 /* Function: 0x73 */
3443 [todo
] WERROR spoolss_73
(
3446 /******************/
3447 /* Function: 0x71 */
3449 kInvalidJobState
= 0,
3451 kLogJobRendered
= 2,
3453 kLogJobPipelineError
= 4,
3454 kLogOfflineFileFull
= 5
3455 } EBranchOfficeJobEventType
;
3459 [string,charset
(UTF16
)] uint16
*pDocumentName
;
3460 [string,charset
(UTF16
)] uint16
*pUserName
;
3461 [string,charset
(UTF16
)] uint16
*pMachineName
;
3462 [string,charset
(UTF16
)] uint16
*pPrinterName
;
3463 [string,charset
(UTF16
)] uint16
*pPortName
;
3466 } spoolss_BranchOfficeJobDataPrinted
;
3476 } spoolss_BranchOfficeJobDataRendered
;
3480 [string,charset
(UTF16
)] uint16
*pDocumentName
;
3481 [string,charset
(UTF16
)] uint16
*pUserName
;
3482 [string,charset
(UTF16
)] uint16
*pPrinterName
;
3483 [string,charset
(UTF16
)] uint16
*pDataType
;
3488 [string,charset
(UTF16
)] uint16
*pMachineName
;
3489 [string,charset
(UTF16
)] uint16
*pJobError
;
3490 [string,charset
(UTF16
)] uint16
*pErrorDescription
;
3491 } spoolss_BranchOfficeJobDataError
;
3494 [string,charset
(UTF16
)] uint16
*pDocumentName
;
3495 [string,charset
(UTF16
)] uint16
*pPrinterName
;
3496 [string,charset
(UTF16
)] uint16
*pExtraErrorInfo
;
3497 } spoolss_BranchOfficeJobDataPipelineFailed
;
3500 [string,charset
(UTF16
)] uint16
*pMachineName
;
3501 } spoolss_BranchOfficeLogOfflineFileFull
;
3503 typedef [ms_union,switch_type(EBranchOfficeJobEventType
)] union {
3504 [case(kLogJobPrinted
)]
3505 spoolss_BranchOfficeJobDataPrinted LogJobPrinted
;
3506 [case(kLogJobRendered
)]
3507 spoolss_BranchOfficeJobDataRendered LogJobRendered
;
3508 [case(kLogJobError
)]
3509 spoolss_BranchOfficeJobDataError LogJobError
;
3510 [case(kLogJobPipelineError
)]
3511 spoolss_BranchOfficeJobDataPipelineFailed LogPipelineFailed
;
3512 [case(kLogOfflineFileFull
)]
3513 spoolss_BranchOfficeLogOfflineFileFull LogOfflineFileFull
;
3514 } spoolss_BranchOfficeJobInfo
;
3517 EBranchOfficeJobEventType eEventType
;
3519 [switch_is(eEventType
)] spoolss_BranchOfficeJobInfo JobInfo
;
3520 } spoolss_BranchOfficeJobData
;
3522 typedef [public] struct {
3523 DWORD cJobDataEntries
;
3524 [size_is(cJobDataEntries
)] spoolss_BranchOfficeJobData JobData
[];
3525 } spoolss_BranchOfficeJobDataContainer
;
3527 WERROR spoolss_LogJobInfoForBranchOffice
(
3528 [in,ref] policy_handle
*hPrinter
,
3529 [in,ref] spoolss_BranchOfficeJobDataContainer
*pBranchOfficeJobDataContainer