Fix all other modules to use ldb_module.h instead of ldb_private.h
[Samba.git] / source3 / include / rpc_spoolss.h
blob32909335d6a239cd0e242721ada5999a0721e36b
1 /*
2 Unix SMB/Netbios implementation.
4 Copyright (C) Andrew Tridgell 1992-2000,
5 Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
6 Copyright (C) Jean Francois Micouleau 1998-2000.
7 Copyright (C) Gerald Carter 2001-2006.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "librpc/gen_ndr/spoolss.h"
25 #ifndef _RPC_SPOOLSS_H /* _RPC_SPOOLSS_H */
26 #define _RPC_SPOOLSS_H
28 /* spoolss pipe: this are the calls which are not implemented ...
29 #define SPOOLSS_GETPRINTERDRIVER 0x0b
30 #define SPOOLSS_READPRINTER 0x16
31 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
32 #define SPOOLSS_ADDPORT 0x25
33 #define SPOOLSS_CONFIGUREPORT 0x26
34 #define SPOOLSS_DELETEPORT 0x27
35 #define SPOOLSS_CREATEPRINTERIC 0x28
36 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
37 #define SPOOLSS_DELETEPRINTERIC 0x2a
38 #define SPOOLSS_ADDPRINTERCONNECTION 0x2b
39 #define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
40 #define SPOOLSS_PRINTERMESSAGEBOX 0x2d
41 #define SPOOLSS_ADDMONITOR 0x2e
42 #define SPOOLSS_DELETEMONITOR 0x2f
43 #define SPOOLSS_DELETEPRINTPROCESSOR 0x30
44 #define SPOOLSS_ADDPRINTPROVIDOR 0x31
45 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32
46 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
47 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
48 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
49 #define SPOOLSS_ADDPORTEX 0x3d
50 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
51 #define SPOOLSS_SPOOLERINIT 0x3f
52 #define SPOOLSS_RESETPRINTEREX 0x40
55 /* those are implemented */
56 #define SPOOLSS_ENUMPRINTERS 0x00
57 #define SPOOLSS_OPENPRINTER 0x01
58 #define SPOOLSS_SETJOB 0x02
59 #define SPOOLSS_GETJOB 0x03
60 #define SPOOLSS_ENUMJOBS 0x04
61 #define SPOOLSS_ADDPRINTER 0x05
62 #define SPOOLSS_DELETEPRINTER 0x06
63 #define SPOOLSS_SETPRINTER 0x07
64 #define SPOOLSS_GETPRINTER 0x08
65 #define SPOOLSS_ADDPRINTERDRIVER 0x09
66 #define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
67 #define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
68 #define SPOOLSS_DELETEPRINTERDRIVER 0x0d
69 #define SPOOLSS_ADDPRINTPROCESSOR 0x0e
70 #define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
71 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
72 #define SPOOLSS_STARTDOCPRINTER 0x11
73 #define SPOOLSS_STARTPAGEPRINTER 0x12
74 #define SPOOLSS_WRITEPRINTER 0x13
75 #define SPOOLSS_ENDPAGEPRINTER 0x14
76 #define SPOOLSS_ABORTPRINTER 0x15
77 #define SPOOLSS_ENDDOCPRINTER 0x17
78 #define SPOOLSS_ADDJOB 0x18
79 #define SPOOLSS_SCHEDULEJOB 0x19
80 #define SPOOLSS_GETPRINTERDATA 0x1a
81 #define SPOOLSS_SETPRINTERDATA 0x1b
82 #define SPOOLSS_CLOSEPRINTER 0x1d
83 #define SPOOLSS_ADDFORM 0x1e
84 #define SPOOLSS_DELETEFORM 0x1f
85 #define SPOOLSS_GETFORM 0x20
86 #define SPOOLSS_SETFORM 0x21
87 #define SPOOLSS_ENUMFORMS 0x22
88 #define SPOOLSS_ENUMPORTS 0x23
89 #define SPOOLSS_ENUMMONITORS 0x24
90 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
91 #define SPOOLSS_RESETPRINTER 0x34
92 #define SPOOLSS_GETPRINTERDRIVER2 0x35
93 #define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */
94 #define SPOOLSS_REPLYOPENPRINTER 0x3a
95 #define SPOOLSS_ROUTERREPLYPRINTER 0x3b
96 #define SPOOLSS_REPLYCLOSEPRINTER 0x3c
97 #define SPOOLSS_RFFPCNEX 0x41 /* RemoteFindFirstPrinterChangeNotifyEx */
98 #define SPOOLSS_RRPCN 0x42 /* RouteRefreshPrinterChangeNotification */
99 #define SPOOLSS_RFNPCNEX 0x43 /* RemoteFindNextPrinterChangeNotifyEx */
100 #define SPOOLSS_OPENPRINTEREX 0x45
101 #define SPOOLSS_ADDPRINTEREX 0x46
102 #define SPOOLSS_ENUMPRINTERDATA 0x48
103 #define SPOOLSS_DELETEPRINTERDATA 0x49
104 #define SPOOLSS_SETPRINTERDATAEX 0x4d
105 #define SPOOLSS_GETPRINTERDATAEX 0x4e
106 #define SPOOLSS_ENUMPRINTERDATAEX 0x4f
107 #define SPOOLSS_ENUMPRINTERKEY 0x50
108 #define SPOOLSS_DELETEPRINTERDATAEX 0x51
109 #define SPOOLSS_DELETEPRINTERKEY 0x52
110 #define SPOOLSS_DELETEPRINTERDRIVEREX 0x54
111 #define SPOOLSS_XCVDATAPORT 0x58
112 #define SPOOLSS_ADDPRINTERDRIVEREX 0x59
115 * Special strings for the OpenPrinter() call. See the MSDN DDK
116 * docs on the XcvDataPort() for more details.
119 #define SPL_LOCAL_PORT "Local Port"
120 #define SPL_TCPIP_PORT "Standard TCP/IP Port"
121 #define SPL_XCV_MONITOR_LOCALMON ",XcvMonitor Local Port"
122 #define SPL_XCV_MONITOR_TCPMON ",XcvMonitor Standard TCP/IP Port"
125 #define PRINTER_CONTROL_UNPAUSE 0x00000000
126 #define PRINTER_CONTROL_PAUSE 0x00000001
127 #define PRINTER_CONTROL_RESUME 0x00000002
128 #define PRINTER_CONTROL_PURGE 0x00000003
129 #define PRINTER_CONTROL_SET_STATUS 0x00000004
131 #define PRINTER_STATUS_OK 0x00000000
132 #define JOB_ACCESS_READ 0x00000020
134 /* JOB status codes. */
136 #define JOB_STATUS_QUEUED 0x0000
137 #define JOB_STATUS_PAUSED 0x0001
138 #define JOB_STATUS_ERROR 0x0002
139 #define JOB_STATUS_DELETING 0x0004
140 #define JOB_STATUS_SPOOLING 0x0008
141 #define JOB_STATUS_PRINTING 0x0010
142 #define JOB_STATUS_OFFLINE 0x0020
143 #define JOB_STATUS_PAPEROUT 0x0040
144 #define JOB_STATUS_PRINTED 0x0080
145 #define JOB_STATUS_DELETED 0x0100
146 #define JOB_STATUS_BLOCKED 0x0200
147 #define JOB_STATUS_USER_INTERVENTION 0x0400
149 /* Notify field types */
151 #define NOTIFY_ONE_VALUE 1 /* Notify data is stored in value1 */
152 #define NOTIFY_TWO_VALUE 2 /* Notify data is stored in value2 */
153 #define NOTIFY_POINTER 3 /* Data is a pointer to a buffer */
154 #define NOTIFY_STRING 4 /* Data is a pointer to a buffer w/length */
155 #define NOTIFY_SECDESC 5 /* Data is a security descriptor */
157 #define PRINTER_NOTIFY_TYPE 0x00
158 #define JOB_NOTIFY_TYPE 0x01
159 #define PRINT_TABLE_END 0xFF
161 #define MAX_PRINTER_NOTIFY 26
162 #define MAX_JOB_NOTIFY 24
164 #define MAX_NOTIFY_TYPE_FOR_NOW 26
166 #define PRINTER_NOTIFY_SERVER_NAME 0x00
167 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
168 #define PRINTER_NOTIFY_SHARE_NAME 0x02
169 #define PRINTER_NOTIFY_PORT_NAME 0x03
170 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
171 #define PRINTER_NOTIFY_COMMENT 0x05
172 #define PRINTER_NOTIFY_LOCATION 0x06
173 #define PRINTER_NOTIFY_DEVMODE 0x07
174 #define PRINTER_NOTIFY_SEPFILE 0x08
175 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
176 #define PRINTER_NOTIFY_PARAMETERS 0x0A
177 #define PRINTER_NOTIFY_DATATYPE 0x0B
178 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
179 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
180 #define PRINTER_NOTIFY_PRIORITY 0x0E
181 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
182 #define PRINTER_NOTIFY_START_TIME 0x10
183 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
184 #define PRINTER_NOTIFY_STATUS 0x12
185 #define PRINTER_NOTIFY_STATUS_STRING 0x13
186 #define PRINTER_NOTIFY_CJOBS 0x14
187 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
188 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
189 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
190 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
191 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
193 #define JOB_NOTIFY_PRINTER_NAME 0x00
194 #define JOB_NOTIFY_MACHINE_NAME 0x01
195 #define JOB_NOTIFY_PORT_NAME 0x02
196 #define JOB_NOTIFY_USER_NAME 0x03
197 #define JOB_NOTIFY_NOTIFY_NAME 0x04
198 #define JOB_NOTIFY_DATATYPE 0x05
199 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
200 #define JOB_NOTIFY_PARAMETERS 0x07
201 #define JOB_NOTIFY_DRIVER_NAME 0x08
202 #define JOB_NOTIFY_DEVMODE 0x09
203 #define JOB_NOTIFY_STATUS 0x0A
204 #define JOB_NOTIFY_STATUS_STRING 0x0B
205 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
206 #define JOB_NOTIFY_DOCUMENT 0x0D
207 #define JOB_NOTIFY_PRIORITY 0x0E
208 #define JOB_NOTIFY_POSITION 0x0F
209 #define JOB_NOTIFY_SUBMITTED 0x10
210 #define JOB_NOTIFY_START_TIME 0x11
211 #define JOB_NOTIFY_UNTIL_TIME 0x12
212 #define JOB_NOTIFY_TIME 0x13
213 #define JOB_NOTIFY_TOTAL_PAGES 0x14
214 #define JOB_NOTIFY_PAGES_PRINTED 0x15
215 #define JOB_NOTIFY_TOTAL_BYTES 0x16
216 #define JOB_NOTIFY_BYTES_PRINTED 0x17
218 #define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01
220 #define PRINTER_CHANGE_ADD_PRINTER 0x00000001
221 #define PRINTER_CHANGE_SET_PRINTER 0x00000002
222 #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
223 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
224 #define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \
225 PRINTER_CHANGE_SET_PRINTER | \
226 PRINTER_CHANGE_DELETE_PRINTER | \
227 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
229 #define PRINTER_CHANGE_ADD_JOB 0x00000100
230 #define PRINTER_CHANGE_SET_JOB 0x00000200
231 #define PRINTER_CHANGE_DELETE_JOB 0x00000400
232 #define PRINTER_CHANGE_WRITE_JOB 0x00000800
233 #define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \
234 PRINTER_CHANGE_SET_JOB | \
235 PRINTER_CHANGE_DELETE_JOB | \
236 PRINTER_CHANGE_WRITE_JOB )
238 #define PRINTER_CHANGE_ADD_FORM 0x00010000
239 #define PRINTER_CHANGE_SET_FORM 0x00020000
240 #define PRINTER_CHANGE_DELETE_FORM 0x00040000
241 #define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \
242 PRINTER_CHANGE_SET_FORM | \
243 PRINTER_CHANGE_DELETE_FORM )
245 #define PRINTER_CHANGE_ADD_PORT 0x00100000
246 #define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
247 #define PRINTER_CHANGE_DELETE_PORT 0x00400000
248 #define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \
249 PRINTER_CHANGE_CONFIGURE_PORT | \
250 PRINTER_CHANGE_DELETE_PORT )
252 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
253 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
254 #define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
255 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
257 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
258 #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
259 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
260 #define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
261 PRINTER_CHANGE_SET_PRINTER_DRIVER | \
262 PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
264 #define PRINTER_CHANGE_TIMEOUT 0x80000000
265 #define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \
266 PRINTER_CHANGE_FORM | \
267 PRINTER_CHANGE_PORT | \
268 PRINTER_CHANGE_PRINT_PROCESSOR | \
269 PRINTER_CHANGE_PRINTER_DRIVER )
271 #define PRINTER_NOTIFY_INFO_DISCARDED 0x1
274 * Set of macros for flagging what changed in the PRINTER_INFO_2 struct
275 * when sending messages to other smbd's
277 #define PRINTER_MESSAGE_NULL 0x00000000
278 #define PRINTER_MESSAGE_DRIVER 0x00000001
279 #define PRINTER_MESSAGE_COMMENT 0x00000002
280 #define PRINTER_MESSAGE_PRINTERNAME 0x00000004
281 #define PRINTER_MESSAGE_LOCATION 0x00000008
282 #define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */
283 #define PRINTER_MESSAGE_SEPFILE 0x00000020
284 #define PRINTER_MESSAGE_PRINTPROC 0x00000040
285 #define PRINTER_MESSAGE_PARAMS 0x00000080
286 #define PRINTER_MESSAGE_DATATYPE 0x00000100
287 #define PRINTER_MESSAGE_SECDESC 0x00000200
288 #define PRINTER_MESSAGE_CJOBS 0x00000400
289 #define PRINTER_MESSAGE_PORT 0x00000800
290 #define PRINTER_MESSAGE_SHARENAME 0x00001000
291 #define PRINTER_MESSAGE_ATTRIBUTES 0x00002000
293 typedef struct printer_message_info {
294 uint32 low; /* PRINTER_CHANGE_XXX */
295 uint32 high; /* PRINTER_CHANGE_XXX */
296 fstring printer_name;
297 uint32 flags; /* PRINTER_MESSAGE_XXX */
299 PRINTER_MESSAGE_INFO;
302 * The printer attributes.
303 * I #defined all of them (grabbed form MSDN)
304 * I'm only using:
305 * ( SHARED | NETWORK | RAW_ONLY )
306 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
309 #define PRINTER_ATTRIBUTE_SAMBA (PRINTER_ATTRIBUTE_RAW_ONLY|\
310 PRINTER_ATTRIBUTE_SHARED|\
311 PRINTER_ATTRIBUTE_LOCAL)
312 #define PRINTER_ATTRIBUTE_NOT_SAMBA (PRINTER_ATTRIBUTE_NETWORK)
314 #define NO_PRIORITY 0
315 #define MAX_PRIORITY 99
316 #define MIN_PRIORITY 1
317 #define DEF_PRIORITY 1
319 /* the flags of each printers */
320 #define PRINTER_ENUM_UNKNOWN_8 0x00000008
321 #define PRINTER_ENUM_ICONMASK 0x00ff0000
323 /* FLAGS for SPOOLSS_DELETEPRINTERDRIVEREX */
325 #define DPD_DELETE_UNUSED_FILES 0x00000001
326 #define DPD_DELETE_SPECIFIC_VERSION 0x00000002
327 #define DPD_DELETE_ALL_FILES 0x00000004
329 #define DRIVER_ANY_VERSION 0xffffffff
330 #define DRIVER_MAX_VERSION 4
332 /* FLAGS for SPOOLSS_ADDPRINTERDRIVEREX */
334 #define APD_STRICT_UPGRADE 0x00000001
335 #define APD_STRICT_DOWNGRADE 0x00000002
336 #define APD_COPY_ALL_FILES 0x00000004
337 #define APD_COPY_NEW_FILES 0x00000008
340 /* this struct is undocumented */
341 /* thanks to the ddk ... */
342 typedef struct {
343 uint32 size; /* length of user_name & client_name + 2? */
344 UNISTR2 *client_name;
345 UNISTR2 *user_name;
346 uint32 build;
347 uint32 major;
348 uint32 minor;
349 uint32 processor;
350 } SPOOL_USER_1;
352 typedef struct {
353 uint32 level;
354 union {
355 SPOOL_USER_1 *user1;
356 } user;
357 } SPOOL_USER_CTR;
360 * various bits in the DEVICEMODE.fields member
363 #define DEVMODE_ORIENTATION 0x00000001
364 #define DEVMODE_PAPERSIZE 0x00000002
365 #define DEVMODE_PAPERLENGTH 0x00000004
366 #define DEVMODE_PAPERWIDTH 0x00000008
367 #define DEVMODE_SCALE 0x00000010
368 #define DEVMODE_POSITION 0x00000020
369 #define DEVMODE_NUP 0x00000040
370 #define DEVMODE_COPIES 0x00000100
371 #define DEVMODE_DEFAULTSOURCE 0x00000200
372 #define DEVMODE_PRINTQUALITY 0x00000400
373 #define DEVMODE_COLOR 0x00000800
374 #define DEVMODE_DUPLEX 0x00001000
375 #define DEVMODE_YRESOLUTION 0x00002000
376 #define DEVMODE_TTOPTION 0x00004000
377 #define DEVMODE_COLLATE 0x00008000
378 #define DEVMODE_FORMNAME 0x00010000
379 #define DEVMODE_LOGPIXELS 0x00020000
380 #define DEVMODE_BITSPERPEL 0x00040000
381 #define DEVMODE_PELSWIDTH 0x00080000
382 #define DEVMODE_PELSHEIGHT 0x00100000
383 #define DEVMODE_DISPLAYFLAGS 0x00200000
384 #define DEVMODE_DISPLAYFREQUENCY 0x00400000
385 #define DEVMODE_ICMMETHOD 0x00800000
386 #define DEVMODE_ICMINTENT 0x01000000
387 #define DEVMODE_MEDIATYPE 0x02000000
388 #define DEVMODE_DITHERTYPE 0x04000000
389 #define DEVMODE_PANNINGWIDTH 0x08000000
390 #define DEVMODE_PANNINGHEIGHT 0x10000000
394 * Devicemode structure
397 typedef struct devicemode
399 UNISTR devicename;
400 uint16 specversion;
401 uint16 driverversion;
402 uint16 size;
403 uint16 driverextra;
404 uint32 fields;
405 uint16 orientation;
406 uint16 papersize;
407 uint16 paperlength;
408 uint16 paperwidth;
409 uint16 scale;
410 uint16 copies;
411 uint16 defaultsource;
412 uint16 printquality;
413 uint16 color;
414 uint16 duplex;
415 uint16 yresolution;
416 uint16 ttoption;
417 uint16 collate;
418 UNISTR formname;
419 uint16 logpixels;
420 uint32 bitsperpel;
421 uint32 pelswidth;
422 uint32 pelsheight;
423 uint32 displayflags;
424 uint32 displayfrequency;
425 uint32 icmmethod;
426 uint32 icmintent;
427 uint32 mediatype;
428 uint32 dithertype;
429 uint32 reserved1;
430 uint32 reserved2;
431 uint32 panningwidth;
432 uint32 panningheight;
433 uint8 *dev_private;
435 DEVICEMODE;
437 typedef struct _devmode_cont
439 uint32 size;
440 uint32 devmode_ptr;
441 DEVICEMODE *devmode;
443 DEVMODE_CTR;
445 typedef struct _printer_default
447 uint32 datatype_ptr;
448 UNISTR2 datatype;
449 DEVMODE_CTR devmode_cont;
450 uint32 access_required;
452 PRINTER_DEFAULT;
454 /********************************************/
456 typedef struct {
457 UNISTR2 *printername;
458 PRINTER_DEFAULT printer_default;
459 } SPOOL_Q_OPEN_PRINTER;
461 typedef struct {
462 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
463 WERROR status;
464 } SPOOL_R_OPEN_PRINTER;
466 /********************************************/
468 typedef struct {
469 UNISTR2 *printername;
470 PRINTER_DEFAULT printer_default;
471 uint32 user_switch;
472 SPOOL_USER_CTR user_ctr;
473 } SPOOL_Q_OPEN_PRINTER_EX;
475 typedef struct {
476 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
477 WERROR status;
478 } SPOOL_R_OPEN_PRINTER_EX;
480 /********************************************/
482 typedef struct spool_notify_option_type
484 uint16 type;
485 uint16 reserved0;
486 uint32 reserved1;
487 uint32 reserved2;
488 uint32 count;
489 uint32 fields_ptr;
490 uint32 count2;
491 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
493 SPOOL_NOTIFY_OPTION_TYPE;
495 typedef struct spool_notify_option_type_ctr
497 uint32 count;
498 SPOOL_NOTIFY_OPTION_TYPE *type;
500 SPOOL_NOTIFY_OPTION_TYPE_CTR;
504 typedef struct s_header_type
506 uint32 type;
507 union
509 uint32 value;
510 UNISTR string;
512 data;
514 HEADER_TYPE;
517 typedef struct spool_q_getprinterdata
519 POLICY_HND handle;
520 UNISTR2 valuename;
521 uint32 size;
523 SPOOL_Q_GETPRINTERDATA;
525 typedef struct spool_r_getprinterdata
527 uint32 type;
528 uint32 size;
529 uint8 *data;
530 uint32 needed;
531 WERROR status;
533 SPOOL_R_GETPRINTERDATA;
535 typedef struct spool_q_deleteprinterdata
537 POLICY_HND handle;
538 UNISTR2 valuename;
540 SPOOL_Q_DELETEPRINTERDATA;
542 typedef struct spool_r_deleteprinterdata
544 WERROR status;
546 SPOOL_R_DELETEPRINTERDATA;
548 typedef struct spool_q_closeprinter
550 POLICY_HND handle;
552 SPOOL_Q_CLOSEPRINTER;
554 typedef struct spool_r_closeprinter
556 POLICY_HND handle;
557 WERROR status;
559 SPOOL_R_CLOSEPRINTER;
561 typedef struct spool_q_startpageprinter
563 POLICY_HND handle;
565 SPOOL_Q_STARTPAGEPRINTER;
567 typedef struct spool_r_startpageprinter
569 WERROR status;
571 SPOOL_R_STARTPAGEPRINTER;
573 typedef struct spool_q_endpageprinter
575 POLICY_HND handle;
577 SPOOL_Q_ENDPAGEPRINTER;
579 typedef struct spool_r_endpageprinter
581 WERROR status;
583 SPOOL_R_ENDPAGEPRINTER;
586 typedef struct spool_q_deleteprinterdriver
588 uint32 server_ptr;
589 UNISTR2 server;
590 UNISTR2 arch;
591 UNISTR2 driver;
593 SPOOL_Q_DELETEPRINTERDRIVER;
595 typedef struct spool_r_deleteprinterdriver
597 WERROR status;
599 SPOOL_R_DELETEPRINTERDRIVER;
601 typedef struct spool_q_deleteprinterdriverex
603 uint32 server_ptr;
604 UNISTR2 server;
605 UNISTR2 arch;
606 UNISTR2 driver;
607 uint32 delete_flags;
608 uint32 version;
610 SPOOL_Q_DELETEPRINTERDRIVEREX;
612 typedef struct spool_r_deleteprinterdriverex
614 WERROR status;
616 SPOOL_R_DELETEPRINTERDRIVEREX;
619 typedef struct spool_doc_info_1
621 uint32 p_docname;
622 uint32 p_outputfile;
623 uint32 p_datatype;
624 UNISTR2 docname;
625 UNISTR2 outputfile;
626 UNISTR2 datatype;
628 DOC_INFO_1;
630 typedef struct spool_doc_info
632 uint32 switch_value;
633 DOC_INFO_1 doc_info_1;
635 DOC_INFO;
637 typedef struct spool_doc_info_container
639 uint32 level;
640 DOC_INFO docinfo;
642 DOC_INFO_CONTAINER;
644 typedef struct spool_q_startdocprinter
646 POLICY_HND handle;
647 DOC_INFO_CONTAINER doc_info_container;
649 SPOOL_Q_STARTDOCPRINTER;
651 typedef struct spool_r_startdocprinter
653 uint32 jobid;
654 WERROR status;
656 SPOOL_R_STARTDOCPRINTER;
658 typedef struct spool_q_enddocprinter
660 POLICY_HND handle;
662 SPOOL_Q_ENDDOCPRINTER;
664 typedef struct spool_r_enddocprinter
666 WERROR status;
668 SPOOL_R_ENDDOCPRINTER;
670 typedef struct spool_q_writeprinter
672 POLICY_HND handle;
673 uint32 buffer_size;
674 uint8 *buffer;
675 uint32 buffer_size2;
677 SPOOL_Q_WRITEPRINTER;
679 typedef struct spool_r_writeprinter
681 uint32 buffer_written;
682 WERROR status;
684 SPOOL_R_WRITEPRINTER;
686 typedef struct spool_notify_option
688 uint32 version;
689 uint32 flags;
690 uint32 count;
691 uint32 option_type_ptr;
692 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
694 SPOOL_NOTIFY_OPTION;
696 typedef struct spool_notify_info_data
698 uint16 type;
699 uint16 field;
700 uint32 reserved;
701 uint32 id;
702 union {
703 uint32 value[2];
704 struct {
705 uint32 length;
706 uint16 *string;
707 } data;
708 struct {
709 uint32 size;
710 SEC_DESC *desc;
711 } sd;
713 notify_data;
714 uint32 size;
715 uint32 enc_type;
716 } SPOOL_NOTIFY_INFO_DATA;
718 typedef struct spool_notify_info
720 uint32 version;
721 uint32 flags;
722 uint32 count;
723 SPOOL_NOTIFY_INFO_DATA *data;
725 SPOOL_NOTIFY_INFO;
727 /* If the struct name looks obscure, yes it is ! */
728 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
729 typedef struct spoolss_q_rffpcnex
731 POLICY_HND handle;
732 uint32 flags;
733 uint32 options;
734 uint32 localmachine_ptr;
735 UNISTR2 localmachine;
736 uint32 printerlocal;
737 uint32 option_ptr;
738 SPOOL_NOTIFY_OPTION *option;
740 SPOOL_Q_RFFPCNEX;
742 typedef struct spool_r_rffpcnex
744 WERROR status;
746 SPOOL_R_RFFPCNEX;
748 /* Remote Find Next Printer Change Notify Ex */
749 typedef struct spool_q_rfnpcnex
751 POLICY_HND handle;
752 uint32 change;
753 uint32 option_ptr;
754 SPOOL_NOTIFY_OPTION *option;
756 SPOOL_Q_RFNPCNEX;
758 typedef struct spool_r_rfnpcnex
760 uint32 info_ptr;
761 SPOOL_NOTIFY_INFO info;
762 WERROR status;
764 SPOOL_R_RFNPCNEX;
766 /* Find Close Printer Notify */
767 typedef struct spool_q_fcpn
769 POLICY_HND handle;
771 SPOOL_Q_FCPN;
773 typedef struct spool_r_fcpn
775 WERROR status;
777 SPOOL_R_FCPN;
780 typedef struct printer_info_0
782 UNISTR printername;
783 UNISTR servername;
784 uint32 cjobs;
785 uint32 total_jobs;
786 uint32 total_bytes;
788 uint16 year;
789 uint16 month;
790 uint16 dayofweek;
791 uint16 day;
792 uint16 hour;
793 uint16 minute;
794 uint16 second;
795 uint16 milliseconds;
797 uint32 global_counter;
798 uint32 total_pages;
800 uint16 major_version;
801 uint16 build_version;
803 uint32 unknown7;
804 uint32 unknown8;
805 uint32 unknown9;
806 uint32 session_counter;
807 uint32 unknown11;
808 uint32 printer_errors;
809 uint32 unknown13;
810 uint32 unknown14;
811 uint32 unknown15;
812 uint32 unknown16;
813 uint32 change_id;
814 uint32 unknown18;
815 uint32 status;
816 uint32 unknown20;
817 uint32 c_setprinter;
819 uint16 unknown22;
820 uint16 unknown23;
821 uint16 unknown24;
822 uint16 unknown25;
823 uint16 unknown26;
824 uint16 unknown27;
825 uint16 unknown28;
826 uint16 unknown29;
827 } PRINTER_INFO_0;
829 typedef struct printer_info_1
831 uint32 flags;
832 UNISTR description;
833 UNISTR name;
834 UNISTR comment;
836 PRINTER_INFO_1;
838 typedef struct printer_info_2
840 UNISTR servername;
841 UNISTR printername;
842 UNISTR sharename;
843 UNISTR portname;
844 UNISTR drivername;
845 UNISTR comment;
846 UNISTR location;
847 DEVICEMODE *devmode;
848 UNISTR sepfile;
849 UNISTR printprocessor;
850 UNISTR datatype;
851 UNISTR parameters;
852 SEC_DESC *secdesc;
853 uint32 attributes;
854 uint32 priority;
855 uint32 defaultpriority;
856 uint32 starttime;
857 uint32 untiltime;
858 uint32 status;
859 uint32 cjobs;
860 uint32 averageppm;
862 PRINTER_INFO_2;
864 typedef struct printer_info_3
866 SEC_DESC *secdesc;
868 PRINTER_INFO_3;
870 typedef struct printer_info_4
872 UNISTR printername;
873 UNISTR servername;
874 uint32 attributes;
876 PRINTER_INFO_4;
878 typedef struct printer_info_5
880 UNISTR printername;
881 UNISTR portname;
882 uint32 attributes;
883 uint32 device_not_selected_timeout;
884 uint32 transmission_retry_timeout;
886 PRINTER_INFO_5;
888 typedef struct printer_info_6
890 uint32 status;
892 PRINTER_INFO_6;
894 #define SPOOL_DS_PUBLISH 1
895 #define SPOOL_DS_UPDATE 2
896 #define SPOOL_DS_UNPUBLISH 4
897 #define SPOOL_DS_PENDING 0x80000000
899 typedef struct printer_info_7
901 UNISTR guid; /* text form of printer guid */
902 uint32 action;
904 PRINTER_INFO_7;
906 typedef struct spool_q_enumprinters
908 uint32 flags;
909 uint32 servername_ptr;
910 UNISTR2 servername;
911 uint32 level;
912 RPC_BUFFER *buffer;
913 uint32 offered;
915 SPOOL_Q_ENUMPRINTERS;
917 typedef struct printer_info_ctr_info
919 PRINTER_INFO_0 *printers_0;
920 PRINTER_INFO_1 *printers_1;
921 PRINTER_INFO_2 *printers_2;
922 PRINTER_INFO_3 *printers_3;
923 PRINTER_INFO_4 *printers_4;
924 PRINTER_INFO_5 *printers_5;
925 PRINTER_INFO_7 *printers_7;
927 PRINTER_INFO_CTR;
929 typedef struct spool_r_enumprinters
931 RPC_BUFFER *buffer;
932 uint32 needed; /* bytes needed */
933 uint32 returned; /* number of printers */
934 WERROR status;
936 SPOOL_R_ENUMPRINTERS;
939 typedef struct spool_q_getprinter
941 POLICY_HND handle;
942 uint32 level;
943 RPC_BUFFER *buffer;
944 uint32 offered;
946 SPOOL_Q_GETPRINTER;
948 typedef struct printer_info_info
950 union
952 PRINTER_INFO_0 *info0;
953 PRINTER_INFO_1 *info1;
954 PRINTER_INFO_2 *info2;
955 void *info;
956 } printer;
957 } PRINTER_INFO;
959 typedef struct spool_r_getprinter
961 RPC_BUFFER *buffer;
962 uint32 needed;
963 WERROR status;
964 } SPOOL_R_GETPRINTER;
966 typedef struct driver_info_1
968 UNISTR name;
969 } DRIVER_INFO_1;
971 typedef struct driver_info_2
973 uint32 version;
974 UNISTR name;
975 UNISTR architecture;
976 UNISTR driverpath;
977 UNISTR datafile;
978 UNISTR configfile;
979 } DRIVER_INFO_2;
981 typedef struct driver_info_3
983 uint32 version;
984 UNISTR name;
985 UNISTR architecture;
986 UNISTR driverpath;
987 UNISTR datafile;
988 UNISTR configfile;
989 UNISTR helpfile;
990 uint16 *dependentfiles;
991 UNISTR monitorname;
992 UNISTR defaultdatatype;
994 DRIVER_INFO_3;
996 typedef struct driver_info_6
998 uint32 version;
999 UNISTR name;
1000 UNISTR architecture;
1001 UNISTR driverpath;
1002 UNISTR datafile;
1003 UNISTR configfile;
1004 UNISTR helpfile;
1005 uint16 *dependentfiles;
1006 UNISTR monitorname;
1007 UNISTR defaultdatatype;
1008 uint16* previousdrivernames;
1009 NTTIME driver_date;
1010 uint32 padding;
1011 uint32 driver_version_low;
1012 uint32 driver_version_high;
1013 UNISTR mfgname;
1014 UNISTR oem_url;
1015 UNISTR hardware_id;
1016 UNISTR provider;
1018 DRIVER_INFO_6;
1020 typedef struct driver_info_info
1022 DRIVER_INFO_1 *info1;
1023 DRIVER_INFO_2 *info2;
1024 DRIVER_INFO_3 *info3;
1025 DRIVER_INFO_6 *info6;
1027 PRINTER_DRIVER_CTR;
1029 typedef struct spool_q_getprinterdriver2
1031 POLICY_HND handle;
1032 uint32 architecture_ptr;
1033 UNISTR2 architecture;
1034 uint32 level;
1035 RPC_BUFFER *buffer;
1036 uint32 offered;
1037 uint32 clientmajorversion;
1038 uint32 clientminorversion;
1040 SPOOL_Q_GETPRINTERDRIVER2;
1042 typedef struct spool_r_getprinterdriver2
1044 RPC_BUFFER *buffer;
1045 uint32 needed;
1046 uint32 servermajorversion;
1047 uint32 serverminorversion;
1048 WERROR status;
1050 SPOOL_R_GETPRINTERDRIVER2;
1053 typedef struct add_jobinfo_1
1055 UNISTR path;
1056 uint32 job_number;
1058 ADD_JOBINFO_1;
1061 typedef struct spool_q_addjob
1063 POLICY_HND handle;
1064 uint32 level;
1065 RPC_BUFFER *buffer;
1066 uint32 offered;
1068 SPOOL_Q_ADDJOB;
1070 typedef struct spool_r_addjob
1072 RPC_BUFFER *buffer;
1073 uint32 needed;
1074 WERROR status;
1076 SPOOL_R_ADDJOB;
1079 * I'm really wondering how many different time formats
1080 * I will have to cope with
1082 * JFM, 09/13/98 In a mad mood ;-(
1084 typedef struct systemtime
1086 uint16 year;
1087 uint16 month;
1088 uint16 dayofweek;
1089 uint16 day;
1090 uint16 hour;
1091 uint16 minute;
1092 uint16 second;
1093 uint16 milliseconds;
1095 SYSTEMTIME;
1097 typedef struct s_job_info_1
1099 uint32 jobid;
1100 UNISTR printername;
1101 UNISTR machinename;
1102 UNISTR username;
1103 UNISTR document;
1104 UNISTR datatype;
1105 UNISTR text_status;
1106 uint32 status;
1107 uint32 priority;
1108 uint32 position;
1109 uint32 totalpages;
1110 uint32 pagesprinted;
1111 SYSTEMTIME submitted;
1113 JOB_INFO_1;
1115 typedef struct s_job_info_2
1117 uint32 jobid;
1118 UNISTR printername;
1119 UNISTR machinename;
1120 UNISTR username;
1121 UNISTR document;
1122 UNISTR notifyname;
1123 UNISTR datatype;
1124 UNISTR printprocessor;
1125 UNISTR parameters;
1126 UNISTR drivername;
1127 DEVICEMODE *devmode;
1128 UNISTR text_status;
1129 /* SEC_DESC sec_desc;*/
1130 uint32 status;
1131 uint32 priority;
1132 uint32 position;
1133 uint32 starttime;
1134 uint32 untiltime;
1135 uint32 totalpages;
1136 uint32 size;
1137 SYSTEMTIME submitted;
1138 uint32 timeelapsed;
1139 uint32 pagesprinted;
1141 JOB_INFO_2;
1143 typedef struct spool_q_enumjobs
1145 POLICY_HND handle;
1146 uint32 firstjob;
1147 uint32 numofjobs;
1148 uint32 level;
1149 RPC_BUFFER *buffer;
1150 uint32 offered;
1152 SPOOL_Q_ENUMJOBS;
1154 typedef struct job_info_ctr_info
1156 union
1158 JOB_INFO_1 *job_info_1;
1159 JOB_INFO_2 *job_info_2;
1160 void *info;
1161 } job;
1163 } JOB_INFO_CTR;
1165 typedef struct spool_r_enumjobs
1167 RPC_BUFFER *buffer;
1168 uint32 needed;
1169 uint32 returned;
1170 WERROR status;
1172 SPOOL_R_ENUMJOBS;
1174 typedef struct spool_q_schedulejob
1176 POLICY_HND handle;
1177 uint32 jobid;
1179 SPOOL_Q_SCHEDULEJOB;
1181 typedef struct spool_r_schedulejob
1183 WERROR status;
1185 SPOOL_R_SCHEDULEJOB;
1187 typedef struct s_port_info_1
1189 UNISTR port_name;
1191 PORT_INFO_1;
1193 typedef struct s_port_info_2
1195 UNISTR port_name;
1196 UNISTR monitor_name;
1197 UNISTR description;
1198 uint32 port_type;
1199 uint32 reserved;
1201 PORT_INFO_2;
1203 /* Port Type bits */
1204 #define PORT_TYPE_WRITE 0x0001
1205 #define PORT_TYPE_READ 0x0002
1206 #define PORT_TYPE_REDIRECTED 0x0004
1207 #define PORT_TYPE_NET_ATTACHED 0x0008
1209 typedef struct spool_q_enumports
1211 uint32 name_ptr;
1212 UNISTR2 name;
1213 uint32 level;
1214 RPC_BUFFER *buffer;
1215 uint32 offered;
1217 SPOOL_Q_ENUMPORTS;
1219 typedef struct port_info_ctr_info
1221 union
1223 PORT_INFO_1 *info_1;
1224 PORT_INFO_2 *info_2;
1226 port;
1229 PORT_INFO_CTR;
1231 typedef struct spool_r_enumports
1233 RPC_BUFFER *buffer;
1234 uint32 needed; /* bytes needed */
1235 uint32 returned; /* number of printers */
1236 WERROR status;
1238 SPOOL_R_ENUMPORTS;
1240 #define JOB_CONTROL_PAUSE 1
1241 #define JOB_CONTROL_RESUME 2
1242 #define JOB_CONTROL_CANCEL 3
1243 #define JOB_CONTROL_RESTART 4
1244 #define JOB_CONTROL_DELETE 5
1246 typedef struct job_info_info
1248 union
1250 JOB_INFO_1 job_info_1;
1251 JOB_INFO_2 job_info_2;
1253 job;
1256 JOB_INFO;
1258 typedef struct spool_q_setjob
1260 POLICY_HND handle;
1261 uint32 jobid;
1262 uint32 level;
1263 JOB_INFO ctr;
1264 uint32 command;
1267 SPOOL_Q_SETJOB;
1269 typedef struct spool_r_setjob
1271 WERROR status;
1274 SPOOL_R_SETJOB;
1276 typedef struct spool_q_enumprinterdrivers
1278 uint32 name_ptr;
1279 UNISTR2 name;
1280 uint32 environment_ptr;
1281 UNISTR2 environment;
1282 uint32 level;
1283 RPC_BUFFER *buffer;
1284 uint32 offered;
1286 SPOOL_Q_ENUMPRINTERDRIVERS;
1288 typedef struct spool_r_enumprinterdrivers
1290 RPC_BUFFER *buffer;
1291 uint32 needed;
1292 uint32 returned;
1293 WERROR status;
1295 SPOOL_R_ENUMPRINTERDRIVERS;
1297 #define FORM_USER 0
1298 #define FORM_BUILTIN 1
1299 #define FORM_PRINTER 2
1301 typedef struct spool_form_1
1303 uint32 flag;
1304 UNISTR name;
1305 uint32 width;
1306 uint32 length;
1307 uint32 left;
1308 uint32 top;
1309 uint32 right;
1310 uint32 bottom;
1312 FORM_1;
1314 typedef struct spool_q_enumforms
1316 POLICY_HND handle;
1317 uint32 level;
1318 RPC_BUFFER *buffer;
1319 uint32 offered;
1321 SPOOL_Q_ENUMFORMS;
1323 typedef struct spool_r_enumforms
1325 RPC_BUFFER *buffer;
1326 uint32 needed;
1327 uint32 numofforms;
1328 WERROR status;
1330 SPOOL_R_ENUMFORMS;
1332 typedef struct spool_q_getform
1334 POLICY_HND handle;
1335 UNISTR2 formname;
1336 uint32 level;
1337 RPC_BUFFER *buffer;
1338 uint32 offered;
1340 SPOOL_Q_GETFORM;
1342 typedef struct spool_r_getform
1344 RPC_BUFFER *buffer;
1345 uint32 needed;
1346 WERROR status;
1348 SPOOL_R_GETFORM;
1350 typedef struct spool_printer_info_level_1
1352 uint32 flags;
1353 uint32 description_ptr;
1354 uint32 name_ptr;
1355 uint32 comment_ptr;
1356 UNISTR2 description;
1357 UNISTR2 name;
1358 UNISTR2 comment;
1359 } SPOOL_PRINTER_INFO_LEVEL_1;
1361 typedef struct spool_printer_info_level_2
1363 uint32 servername_ptr;
1364 uint32 printername_ptr;
1365 uint32 sharename_ptr;
1366 uint32 portname_ptr;
1367 uint32 drivername_ptr;
1368 uint32 comment_ptr;
1369 uint32 location_ptr;
1370 uint32 devmode_ptr;
1371 uint32 sepfile_ptr;
1372 uint32 printprocessor_ptr;
1373 uint32 datatype_ptr;
1374 uint32 parameters_ptr;
1375 uint32 secdesc_ptr;
1376 uint32 attributes;
1377 uint32 priority;
1378 uint32 default_priority;
1379 uint32 starttime;
1380 uint32 untiltime;
1381 uint32 status;
1382 uint32 cjobs;
1383 uint32 averageppm;
1384 UNISTR2 servername;
1385 UNISTR2 printername;
1386 UNISTR2 sharename;
1387 UNISTR2 portname;
1388 UNISTR2 drivername;
1389 UNISTR2 comment;
1390 UNISTR2 location;
1391 UNISTR2 sepfile;
1392 UNISTR2 printprocessor;
1393 UNISTR2 datatype;
1394 UNISTR2 parameters;
1396 SPOOL_PRINTER_INFO_LEVEL_2;
1398 typedef struct spool_printer_info_level_3
1400 uint32 secdesc_ptr;
1402 SPOOL_PRINTER_INFO_LEVEL_3;
1404 typedef struct spool_printer_info_level_7
1406 uint32 guid_ptr;
1407 uint32 action;
1408 UNISTR2 guid;
1410 SPOOL_PRINTER_INFO_LEVEL_7;
1412 typedef struct spool_printer_info_level
1414 uint32 level;
1415 uint32 info_ptr;
1416 SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
1417 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1418 SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
1419 SPOOL_PRINTER_INFO_LEVEL_7 *info_7;
1421 SPOOL_PRINTER_INFO_LEVEL;
1423 typedef struct spool_printer_driver_info_level_3
1425 uint32 cversion;
1426 uint32 name_ptr;
1427 uint32 environment_ptr;
1428 uint32 driverpath_ptr;
1429 uint32 datafile_ptr;
1430 uint32 configfile_ptr;
1431 uint32 helpfile_ptr;
1432 uint32 monitorname_ptr;
1433 uint32 defaultdatatype_ptr;
1434 uint32 dependentfilessize;
1435 uint32 dependentfiles_ptr;
1437 UNISTR2 name;
1438 UNISTR2 environment;
1439 UNISTR2 driverpath;
1440 UNISTR2 datafile;
1441 UNISTR2 configfile;
1442 UNISTR2 helpfile;
1443 UNISTR2 monitorname;
1444 UNISTR2 defaultdatatype;
1445 BUFFER5 dependentfiles;
1448 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1450 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
1451 typedef struct {
1452 uint32 version;
1453 uint32 name_ptr;
1454 uint32 environment_ptr;
1455 uint32 driverpath_ptr;
1456 uint32 datafile_ptr;
1457 uint32 configfile_ptr;
1458 uint32 helpfile_ptr;
1459 uint32 monitorname_ptr;
1460 uint32 defaultdatatype_ptr;
1461 uint32 dependentfiles_len;
1462 uint32 dependentfiles_ptr;
1463 uint32 previousnames_len;
1464 uint32 previousnames_ptr;
1465 NTTIME driverdate;
1466 uint64 driverversion;
1467 uint32 dummy4;
1468 uint32 mfgname_ptr;
1469 uint32 oemurl_ptr;
1470 uint32 hardwareid_ptr;
1471 uint32 provider_ptr;
1472 UNISTR2 name;
1473 UNISTR2 environment;
1474 UNISTR2 driverpath;
1475 UNISTR2 datafile;
1476 UNISTR2 configfile;
1477 UNISTR2 helpfile;
1478 UNISTR2 monitorname;
1479 UNISTR2 defaultdatatype;
1480 BUFFER5 dependentfiles;
1481 BUFFER5 previousnames;
1482 UNISTR2 mfgname;
1483 UNISTR2 oemurl;
1484 UNISTR2 hardwareid;
1485 UNISTR2 provider;
1486 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1489 typedef struct spool_printer_driver_info_level
1491 uint32 level;
1492 uint32 ptr;
1493 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1494 SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
1496 SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1499 typedef struct spool_q_setprinter
1501 POLICY_HND handle;
1502 uint32 level;
1503 SPOOL_PRINTER_INFO_LEVEL info;
1504 SEC_DESC_BUF *secdesc_ctr;
1505 DEVMODE_CTR devmode_ctr;
1507 uint32 command;
1510 SPOOL_Q_SETPRINTER;
1512 typedef struct spool_r_setprinter
1514 WERROR status;
1516 SPOOL_R_SETPRINTER;
1518 /********************************************/
1520 typedef struct {
1521 POLICY_HND handle;
1522 } SPOOL_Q_DELETEPRINTER;
1524 typedef struct {
1525 POLICY_HND handle;
1526 WERROR status;
1527 } SPOOL_R_DELETEPRINTER;
1529 /********************************************/
1531 typedef struct {
1532 POLICY_HND handle;
1533 } SPOOL_Q_ABORTPRINTER;
1535 typedef struct {
1536 WERROR status;
1537 } SPOOL_R_ABORTPRINTER;
1540 /********************************************/
1542 typedef struct {
1543 UNISTR2 *server_name;
1544 uint32 level;
1545 SPOOL_PRINTER_INFO_LEVEL info;
1546 DEVMODE_CTR devmode_ctr;
1547 SEC_DESC_BUF *secdesc_ctr;
1548 uint32 user_switch;
1549 SPOOL_USER_CTR user_ctr;
1550 } SPOOL_Q_ADDPRINTEREX;
1552 typedef struct {
1553 POLICY_HND handle;
1554 WERROR status;
1555 } SPOOL_R_ADDPRINTEREX;
1557 /********************************************/
1559 typedef struct spool_q_addprinterdriver
1561 uint32 server_name_ptr;
1562 UNISTR2 server_name;
1563 uint32 level;
1564 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1566 SPOOL_Q_ADDPRINTERDRIVER;
1568 typedef struct spool_r_addprinterdriver
1570 WERROR status;
1572 SPOOL_R_ADDPRINTERDRIVER;
1574 typedef struct spool_q_addprinterdriverex
1576 uint32 server_name_ptr;
1577 UNISTR2 server_name;
1578 uint32 level;
1579 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1580 uint32 copy_flags;
1582 SPOOL_Q_ADDPRINTERDRIVEREX;
1584 typedef struct spool_r_addprinterdriverex
1586 WERROR status;
1588 SPOOL_R_ADDPRINTERDRIVEREX;
1591 typedef struct driver_directory_1
1593 UNISTR name;
1595 DRIVER_DIRECTORY_1;
1597 typedef struct driver_info_ctr_info
1599 DRIVER_DIRECTORY_1 *info1;
1601 DRIVER_DIRECTORY_CTR;
1603 typedef struct spool_q_getprinterdriverdirectory
1605 uint32 name_ptr;
1606 UNISTR2 name;
1607 uint32 environment_ptr;
1608 UNISTR2 environment;
1609 uint32 level;
1610 RPC_BUFFER *buffer;
1611 uint32 offered;
1613 SPOOL_Q_GETPRINTERDRIVERDIR;
1615 typedef struct spool_r_getprinterdriverdirectory
1617 RPC_BUFFER *buffer;
1618 uint32 needed;
1619 WERROR status;
1621 SPOOL_R_GETPRINTERDRIVERDIR;
1623 typedef struct spool_q_addprintprocessor
1625 uint32 server_ptr;
1626 UNISTR2 server;
1627 UNISTR2 environment;
1628 UNISTR2 path;
1629 UNISTR2 name;
1631 SPOOL_Q_ADDPRINTPROCESSOR;
1633 typedef struct spool_r_addprintprocessor
1635 WERROR status;
1637 SPOOL_R_ADDPRINTPROCESSOR;
1640 typedef struct spool_q_enumprintprocessors
1642 uint32 name_ptr;
1643 UNISTR2 name;
1644 uint32 environment_ptr;
1645 UNISTR2 environment;
1646 uint32 level;
1647 RPC_BUFFER *buffer;
1648 uint32 offered;
1650 SPOOL_Q_ENUMPRINTPROCESSORS;
1652 typedef struct printprocessor_1
1654 UNISTR name;
1656 PRINTPROCESSOR_1;
1658 typedef struct spool_r_enumprintprocessors
1660 RPC_BUFFER *buffer;
1661 uint32 needed;
1662 uint32 returned;
1663 WERROR status;
1665 SPOOL_R_ENUMPRINTPROCESSORS;
1667 typedef struct spool_q_enumprintprocdatatypes
1669 uint32 name_ptr;
1670 UNISTR2 name;
1671 uint32 processor_ptr;
1672 UNISTR2 processor;
1673 uint32 level;
1674 RPC_BUFFER *buffer;
1675 uint32 offered;
1677 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1679 typedef struct ppdatatype_1
1681 UNISTR name;
1683 PRINTPROCDATATYPE_1;
1685 typedef struct spool_r_enumprintprocdatatypes
1687 RPC_BUFFER *buffer;
1688 uint32 needed;
1689 uint32 returned;
1690 WERROR status;
1692 SPOOL_R_ENUMPRINTPROCDATATYPES;
1694 typedef struct printmonitor_1
1696 UNISTR name;
1698 PRINTMONITOR_1;
1700 typedef struct printmonitor_2
1702 UNISTR name;
1703 UNISTR environment;
1704 UNISTR dll_name;
1706 PRINTMONITOR_2;
1708 typedef struct spool_q_enumprintmonitors
1710 uint32 name_ptr;
1711 UNISTR2 name;
1712 uint32 level;
1713 RPC_BUFFER *buffer;
1714 uint32 offered;
1716 SPOOL_Q_ENUMPRINTMONITORS;
1718 typedef struct spool_r_enumprintmonitors
1720 RPC_BUFFER *buffer;
1721 uint32 needed;
1722 uint32 returned;
1723 WERROR status;
1725 SPOOL_R_ENUMPRINTMONITORS;
1728 typedef struct spool_q_enumprinterdata
1730 POLICY_HND handle;
1731 uint32 index;
1732 uint32 valuesize;
1733 uint32 datasize;
1735 SPOOL_Q_ENUMPRINTERDATA;
1737 typedef struct spool_r_enumprinterdata
1739 uint32 valuesize;
1740 uint16 *value;
1741 uint32 realvaluesize;
1742 uint32 type;
1743 uint32 datasize;
1744 uint8 *data;
1745 uint32 realdatasize;
1746 WERROR status;
1748 SPOOL_R_ENUMPRINTERDATA;
1750 typedef struct spool_q_setprinterdata
1752 POLICY_HND handle;
1753 UNISTR2 value;
1754 uint32 type;
1755 uint32 max_len;
1756 uint8 *data;
1757 uint32 real_len;
1758 uint32 numeric_data;
1760 SPOOL_Q_SETPRINTERDATA;
1762 typedef struct spool_r_setprinterdata
1764 WERROR status;
1766 SPOOL_R_SETPRINTERDATA;
1768 typedef struct spool_q_resetprinter
1770 POLICY_HND handle;
1771 uint32 datatype_ptr;
1772 UNISTR2 datatype;
1773 DEVMODE_CTR devmode_ctr;
1775 } SPOOL_Q_RESETPRINTER;
1777 typedef struct spool_r_resetprinter
1779 WERROR status;
1781 SPOOL_R_RESETPRINTER;
1785 typedef struct _form
1787 uint32 flags;
1788 uint32 name_ptr;
1789 uint32 size_x;
1790 uint32 size_y;
1791 uint32 left;
1792 uint32 top;
1793 uint32 right;
1794 uint32 bottom;
1795 UNISTR2 name;
1797 FORM;
1799 typedef struct spool_q_addform
1801 POLICY_HND handle;
1802 uint32 level;
1803 uint32 level2; /* This should really be part of the FORM structure */
1804 FORM form;
1806 SPOOL_Q_ADDFORM;
1808 typedef struct spool_r_addform
1810 WERROR status;
1812 SPOOL_R_ADDFORM;
1814 typedef struct spool_q_setform
1816 POLICY_HND handle;
1817 UNISTR2 name;
1818 uint32 level;
1819 uint32 level2;
1820 FORM form;
1822 SPOOL_Q_SETFORM;
1824 typedef struct spool_r_setform
1826 WERROR status;
1828 SPOOL_R_SETFORM;
1830 typedef struct spool_q_deleteform
1832 POLICY_HND handle;
1833 UNISTR2 name;
1835 SPOOL_Q_DELETEFORM;
1837 typedef struct spool_r_deleteform
1839 WERROR status;
1841 SPOOL_R_DELETEFORM;
1843 typedef struct spool_q_getjob
1845 POLICY_HND handle;
1846 uint32 jobid;
1847 uint32 level;
1848 RPC_BUFFER *buffer;
1849 uint32 offered;
1851 SPOOL_Q_GETJOB;
1853 typedef struct pjob_info_info
1855 union
1857 JOB_INFO_1 *job_info_1;
1858 JOB_INFO_2 *job_info_2;
1859 void *info;
1861 job;
1864 PJOB_INFO;
1866 typedef struct spool_r_getjob
1868 RPC_BUFFER *buffer;
1869 uint32 needed;
1870 WERROR status;
1872 SPOOL_R_GETJOB;
1874 typedef struct spool_q_replyopenprinter
1876 UNISTR2 string;
1877 uint32 printer;
1878 uint32 type;
1879 uint32 unknown0;
1880 uint32 unknown1;
1882 SPOOL_Q_REPLYOPENPRINTER;
1884 typedef struct spool_r_replyopenprinter
1886 POLICY_HND handle;
1887 WERROR status;
1889 SPOOL_R_REPLYOPENPRINTER;
1891 typedef struct spool_q_routerreplyprinter
1893 POLICY_HND handle;
1894 uint32 condition;
1895 uint32 unknown1; /* 0x00000001 */
1896 uint32 change_id;
1897 uint8 unknown2[5]; /* 0x0000000001 */
1899 SPOOL_Q_ROUTERREPLYPRINTER;
1901 typedef struct spool_r_routerreplyprinter
1903 WERROR status;
1905 SPOOL_R_ROUTERREPLYPRINTER;
1907 typedef struct spool_q_replycloseprinter
1909 POLICY_HND handle;
1911 SPOOL_Q_REPLYCLOSEPRINTER;
1913 typedef struct spool_r_replycloseprinter
1915 POLICY_HND handle;
1916 WERROR status;
1918 SPOOL_R_REPLYCLOSEPRINTER;
1920 typedef struct spool_q_rrpcn
1922 POLICY_HND handle;
1923 uint32 change_low;
1924 uint32 change_high;
1925 uint32 unknown0;
1926 uint32 unknown1;
1927 uint32 info_ptr;
1928 SPOOL_NOTIFY_INFO info;
1930 SPOOL_Q_REPLY_RRPCN;
1932 typedef struct spool_r_rrpcn
1934 uint32 unknown0;
1935 WERROR status;
1937 SPOOL_R_REPLY_RRPCN;
1939 typedef struct spool_q_getprinterdataex
1941 POLICY_HND handle;
1942 UNISTR2 keyname;
1943 UNISTR2 valuename;
1944 uint32 size;
1946 SPOOL_Q_GETPRINTERDATAEX;
1948 typedef struct spool_r_getprinterdataex
1950 uint32 type;
1951 uint32 size;
1952 uint8 *data;
1953 uint32 needed;
1954 WERROR status;
1956 SPOOL_R_GETPRINTERDATAEX;
1958 typedef struct spool_q_setprinterdataex
1960 POLICY_HND handle;
1961 UNISTR2 key;
1962 UNISTR2 value;
1963 uint32 type;
1964 uint32 max_len;
1965 uint8 *data;
1966 uint32 real_len;
1967 uint32 numeric_data;
1969 SPOOL_Q_SETPRINTERDATAEX;
1971 typedef struct spool_r_setprinterdataex
1973 WERROR status;
1975 SPOOL_R_SETPRINTERDATAEX;
1978 typedef struct spool_q_deleteprinterdataex
1980 POLICY_HND handle;
1981 UNISTR2 keyname;
1982 UNISTR2 valuename;
1984 SPOOL_Q_DELETEPRINTERDATAEX;
1986 typedef struct spool_r_deleteprinterdataex
1988 WERROR status;
1990 SPOOL_R_DELETEPRINTERDATAEX;
1993 typedef struct spool_q_enumprinterkey
1995 POLICY_HND handle;
1996 UNISTR2 key;
1997 uint32 size;
1999 SPOOL_Q_ENUMPRINTERKEY;
2001 typedef struct spool_r_enumprinterkey
2003 BUFFER5 keys;
2004 uint32 needed; /* in bytes */
2005 WERROR status;
2007 SPOOL_R_ENUMPRINTERKEY;
2009 typedef struct spool_q_deleteprinterkey
2011 POLICY_HND handle;
2012 UNISTR2 keyname;
2014 SPOOL_Q_DELETEPRINTERKEY;
2016 typedef struct spool_r_deleteprinterkey
2018 WERROR status;
2020 SPOOL_R_DELETEPRINTERKEY;
2022 typedef struct printer_enum_values
2024 UNISTR valuename;
2025 uint32 value_len;
2026 uint32 type;
2027 uint8 *data;
2028 uint32 data_len;
2031 PRINTER_ENUM_VALUES;
2033 typedef struct printer_enum_values_ctr
2035 uint32 size;
2036 uint32 size_of_array;
2037 PRINTER_ENUM_VALUES *values;
2039 PRINTER_ENUM_VALUES_CTR;
2041 typedef struct spool_q_enumprinterdataex
2043 POLICY_HND handle;
2044 UNISTR2 key;
2045 uint32 size;
2047 SPOOL_Q_ENUMPRINTERDATAEX;
2049 typedef struct spool_r_enumprinterdataex
2051 PRINTER_ENUM_VALUES_CTR ctr;
2052 uint32 needed;
2053 uint32 returned;
2054 WERROR status;
2056 SPOOL_R_ENUMPRINTERDATAEX;
2058 typedef struct printprocessor_directory_1
2060 UNISTR name;
2062 PRINTPROCESSOR_DIRECTORY_1;
2064 typedef struct spool_q_getprintprocessordirectory
2066 UNISTR2 name;
2067 UNISTR2 environment;
2068 uint32 level;
2069 RPC_BUFFER *buffer;
2070 uint32 offered;
2072 SPOOL_Q_GETPRINTPROCESSORDIRECTORY;
2074 typedef struct spool_r_getprintprocessordirectory
2076 RPC_BUFFER *buffer;
2077 uint32 needed;
2078 WERROR status;
2080 SPOOL_R_GETPRINTPROCESSORDIRECTORY;
2082 /**************************************/
2084 #define MAX_PORTNAME 64
2085 #define MAX_NETWORK_NAME 49
2086 #define MAX_SNMP_COMM_NAME 33
2087 #define MAX_QUEUE_NAME 33
2088 #define MAX_IPADDR_STRING 17
2090 typedef struct {
2091 uint16 portname[MAX_PORTNAME];
2092 uint32 version;
2093 uint32 protocol;
2094 uint32 size;
2095 uint32 reserved;
2096 uint16 hostaddress[MAX_NETWORK_NAME];
2097 uint16 snmpcommunity[MAX_SNMP_COMM_NAME];
2098 uint32 dblspool;
2099 uint16 queue[MAX_QUEUE_NAME];
2100 uint16 ipaddress[MAX_IPADDR_STRING];
2101 uint32 port;
2102 uint32 snmpenabled;
2103 uint32 snmpdevindex;
2104 } SPOOL_PORT_DATA_1;
2106 typedef struct {
2107 POLICY_HND handle;
2108 UNISTR2 dataname;
2109 RPC_BUFFER indata;
2110 uint32 indata_len;
2111 uint32 offered;
2112 uint32 unknown;
2113 } SPOOL_Q_XCVDATAPORT;
2115 typedef struct {
2116 RPC_BUFFER outdata;
2117 uint32 needed;
2118 uint32 unknown;
2119 WERROR status;
2120 } SPOOL_R_XCVDATAPORT;
2122 #define PRINTER_DRIVER_VERSION 2
2123 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
2125 #endif /* _RPC_SPOOLSS_H */