preparing for release of 2.2.3a
[Samba.git] / source / include / rpc_spoolss.h
blob9ed83b18d8afae414d914445cd2c7b874ec0ecfd
1 /*
2 Unix SMB/Netbios implementation.
3 Version 1.9.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-2000,
6 Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
7 Copyright (C) Jean Francois Micouleau 1998-2000.
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 2 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, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _RPC_SPOOLSS_H /* _RPC_SPOOLSS_H */
25 #define _RPC_SPOOLSS_H
27 #define INTEGER 1
28 #define STRING 2
30 /* spoolss pipe: this are the calls which are not implemented ...
31 #define SPOOLSS_OPENPRINTER 0x01
32 #define SPOOLSS_GETPRINTERDRIVER 0x0b
33 #define SPOOLSS_READPRINTER 0x16
34 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
35 #define SPOOLSS_ADDPORT 0x25
36 #define SPOOLSS_CONFIGUREPORT 0x26
37 #define SPOOLSS_DELETEPORT 0x27
38 #define SPOOLSS_CREATEPRINTERIC 0x28
39 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
40 #define SPOOLSS_DELETEPRINTERIC 0x2a
41 #define SPOOLSS_ADDPRINTERCONNECTION 0x2b
42 #define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
43 #define SPOOLSS_PRINTERMESSAGEBOX 0x2d
44 #define SPOOLSS_ADDMONITOR 0x2e
45 #define SPOOLSS_DELETEMONITOR 0x2f
46 #define SPOOLSS_DELETEPRINTPROCESSOR 0x30
47 #define SPOOLSS_ADDPRINTPROVIDOR 0x31
48 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32
49 #define SPOOLSS_RESETPRINTER 0x34
50 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
51 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
52 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
53 #define SPOOLSS_ROUTERREPLYPRINTER 0x3b
54 #define SPOOLSS_ADDPORTEX 0x3d
55 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
56 #define SPOOLSS_SPOOLERINIT 0x3f
57 #define SPOOLSS_RESETPRINTEREX 0x40
58 #define SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION 0x42
59 #define SPOOLSS_DELETEPRINTERDATAEX 0x51
60 #define SPOOLSS_DELETEPRINTERDRIVEREX 0x54
61 #define SPOOLSS_ADDPRINTERDRIVEREX 0x59
64 /* those are implemented */
65 #define SPOOLSS_ENUMPRINTERS 0x00
66 #define SPOOLSS_SETJOB 0x02
67 #define SPOOLSS_GETJOB 0x03
68 #define SPOOLSS_ENUMJOBS 0x04
69 #define SPOOLSS_ADDPRINTER 0x05
70 #define SPOOLSS_DELETEPRINTER 0x06
71 #define SPOOLSS_SETPRINTER 0x07
72 #define SPOOLSS_GETPRINTER 0x08
73 #define SPOOLSS_ADDPRINTERDRIVER 0x09
74 #define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
75 #define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
76 #define SPOOLSS_DELETEPRINTERDRIVER 0x0d
77 #define SPOOLSS_ADDPRINTPROCESSOR 0x0e
78 #define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
79 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
80 #define SPOOLSS_STARTDOCPRINTER 0x11
81 #define SPOOLSS_STARTPAGEPRINTER 0x12
82 #define SPOOLSS_WRITEPRINTER 0x13
83 #define SPOOLSS_ENDPAGEPRINTER 0x14
84 #define SPOOLSS_ABORTPRINTER 0x15
85 #define SPOOLSS_ENDDOCPRINTER 0x17
86 #define SPOOLSS_ADDJOB 0x18
87 #define SPOOLSS_SCHEDULEJOB 0x19
88 #define SPOOLSS_GETPRINTERDATA 0x1a
89 #define SPOOLSS_SETPRINTERDATA 0x1b
90 #define SPOOLSS_CLOSEPRINTER 0x1d
91 #define SPOOLSS_ADDFORM 0x1e
92 #define SPOOLSS_DELETEFORM 0x1f
93 #define SPOOLSS_GETFORM 0x20
94 #define SPOOLSS_SETFORM 0x21
95 #define SPOOLSS_ENUMFORMS 0x22
96 #define SPOOLSS_ENUMPORTS 0x23
97 #define SPOOLSS_ENUMMONITORS 0x24
98 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
99 #define SPOOLSS_GETPRINTERDRIVER2 0x35
100 /* find close printer notification */
101 #define SPOOLSS_FCPN 0x38
102 #define SPOOLSS_REPLYOPENPRINTER 0x3a
103 #define SPOOLSS_REPLYCLOSEPRINTER 0x3c
104 /* remote find first printer change notifyEx */
105 #define SPOOLSS_RFFPCNEX 0x41
106 /*SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION */
107 #define SPOOLSS_RRPCN 0x42
108 /* remote find next printer change notifyEx */
109 #define SPOOLSS_RFNPCNEX 0x43
110 #define SPOOLSS_OPENPRINTEREX 0x45
111 #define SPOOLSS_ADDPRINTEREX 0x46
112 #define SPOOLSS_ENUMPRINTERDATA 0x48
113 #define SPOOLSS_DELETEPRINTERDATA 0x49
114 #define SPOOLSS_SETPRINTERDATAEX 0x4d
115 #define SPOOLSS_GETPRINTERDATAEX 0x4e
116 #define SPOOLSS_ENUMPRINTERDATAEX 0x4f
117 #define SPOOLSS_ENUMPRINTERKEY 0x50
120 #define PRINTER_CONTROL_UNPAUSE 0x00000000
121 #define PRINTER_CONTROL_PAUSE 0x00000001
122 #define PRINTER_CONTROL_RESUME 0x00000002
123 #define PRINTER_CONTROL_PURGE 0x00000003
124 #define PRINTER_CONTROL_SET_STATUS 0x00000004
126 #define PRINTER_STATUS_PAUSED 0x00000001
127 #define PRINTER_STATUS_ERROR 0x00000002
128 #define PRINTER_STATUS_PENDING_DELETION 0x00000004
129 #define PRINTER_STATUS_PAPER_JAM 0x00000008
131 #define PRINTER_STATUS_PAPER_OUT 0x00000010
132 #define PRINTER_STATUS_MANUAL_FEED 0x00000020
133 #define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
134 #define PRINTER_STATUS_OFFLINE 0x00000080
136 #define PRINTER_STATUS_IO_ACTIVE 0x00000100
137 #define PRINTER_STATUS_BUSY 0x00000200
138 #define PRINTER_STATUS_PRINTING 0x00000400
139 #define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
141 #define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
142 #define PRINTER_STATUS_WAITING 0x00002000
143 #define PRINTER_STATUS_PROCESSING 0x00004000
144 #define PRINTER_STATUS_INITIALIZING 0x00008000
146 #define PRINTER_STATUS_WARMING_UP 0x00010000
147 #define PRINTER_STATUS_TONER_LOW 0x00020000
148 #define PRINTER_STATUS_NO_TONER 0x00040000
149 #define PRINTER_STATUS_PAGE_PUNT 0x00080000
151 #define PRINTER_STATUS_USER_INTERVENTION 0x00100000
152 #define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
153 #define PRINTER_STATUS_DOOR_OPEN 0x00400000
154 #define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
156 #define PRINTER_STATUS_POWER_SAVE 0x01000000
158 #define SERVER_ACCESS_ADMINISTER 0x00000001
159 #define SERVER_ACCESS_ENUMERATE 0x00000002
160 #define PRINTER_ACCESS_ADMINISTER 0x00000004
161 #define PRINTER_ACCESS_USE 0x00000008
162 #define JOB_ACCESS_ADMINISTER 0x00000010
164 /* JOB status codes. */
166 #define JOB_STATUS_PAUSED 0x001
167 #define JOB_STATUS_ERROR 0x002
168 #define JOB_STATUS_DELETING 0x004
169 #define JOB_STATUS_SPOOLING 0x008
170 #define JOB_STATUS_PRINTING 0x010
171 #define JOB_STATUS_OFFLINE 0x020
172 #define JOB_STATUS_PAPEROUT 0x040
173 #define JOB_STATUS_PRINTED 0x080
174 #define JOB_STATUS_DELETED 0x100
175 #define JOB_STATUS_BLOCKED 0x200
176 #define JOB_STATUS_USER_INTERVENTION 0x400
178 /* ACE masks for the various print permissions */
180 #define PRINTER_ACE_FULL_CONTROL GENERIC_ALL_ACCESS
181 #define PRINTER_ACE_MANAGE_DOCUMENTS READ_CONTROL_ACCESS
182 #define PRINTER_ACE_PRINT \
183 (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
185 /* Access rights for print servers */
186 #define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
187 #define SERVER_READ STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
188 #define SERVER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
189 #define SERVER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE
191 /* Access rights for printers */
192 #define PRINTER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
193 #define PRINTER_READ STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE
194 #define PRINTER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE
195 #define PRINTER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE
197 /* Access rights for jobs */
198 #define JOB_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER
199 #define JOB_READ STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER
200 #define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
201 #define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
203 #define ONE_VALUE 1
204 #define TWO_VALUE 2
205 #define POINTER 3
207 #define PRINTER_NOTIFY_TYPE 0x00
208 #define JOB_NOTIFY_TYPE 0x01
210 #define MAX_PRINTER_NOTIFY 26
211 #define MAX_JOB_NOTIFY 24
213 #define MAX_NOTIFY_TYPE_FOR_NOW 26
215 #define PRINTER_NOTIFY_SERVER_NAME 0x00
216 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
217 #define PRINTER_NOTIFY_SHARE_NAME 0x02
218 #define PRINTER_NOTIFY_PORT_NAME 0x03
219 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
220 #define PRINTER_NOTIFY_COMMENT 0x05
221 #define PRINTER_NOTIFY_LOCATION 0x06
222 #define PRINTER_NOTIFY_DEVMODE 0x07
223 #define PRINTER_NOTIFY_SEPFILE 0x08
224 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
225 #define PRINTER_NOTIFY_PARAMETERS 0x0A
226 #define PRINTER_NOTIFY_DATATYPE 0x0B
227 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
228 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
229 #define PRINTER_NOTIFY_PRIORITY 0x0E
230 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
231 #define PRINTER_NOTIFY_START_TIME 0x10
232 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
233 #define PRINTER_NOTIFY_STATUS 0x12
234 #define PRINTER_NOTIFY_STATUS_STRING 0x13
235 #define PRINTER_NOTIFY_CJOBS 0x14
236 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
237 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
238 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
239 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
240 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
242 #define JOB_NOTIFY_PRINTER_NAME 0x00
243 #define JOB_NOTIFY_MACHINE_NAME 0x01
244 #define JOB_NOTIFY_PORT_NAME 0x02
245 #define JOB_NOTIFY_USER_NAME 0x03
246 #define JOB_NOTIFY_NOTIFY_NAME 0x04
247 #define JOB_NOTIFY_DATATYPE 0x05
248 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
249 #define JOB_NOTIFY_PARAMETERS 0x07
250 #define JOB_NOTIFY_DRIVER_NAME 0x08
251 #define JOB_NOTIFY_DEVMODE 0x09
252 #define JOB_NOTIFY_STATUS 0x0A
253 #define JOB_NOTIFY_STATUS_STRING 0x0B
254 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
255 #define JOB_NOTIFY_DOCUMENT 0x0D
256 #define JOB_NOTIFY_PRIORITY 0x0E
257 #define JOB_NOTIFY_POSITION 0x0F
258 #define JOB_NOTIFY_SUBMITTED 0x10
259 #define JOB_NOTIFY_START_TIME 0x11
260 #define JOB_NOTIFY_UNTIL_TIME 0x12
261 #define JOB_NOTIFY_TIME 0x13
262 #define JOB_NOTIFY_TOTAL_PAGES 0x14
263 #define JOB_NOTIFY_PAGES_PRINTED 0x15
264 #define JOB_NOTIFY_TOTAL_BYTES 0x16
265 #define JOB_NOTIFY_BYTES_PRINTED 0x17
267 #define PRINTER_CHANGE_ADD_PRINTER 0x00000001
268 #define PRINTER_CHANGE_SET_PRINTER 0x00000002
269 #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
270 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
271 #define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \
272 PRINTER_CHANGE_SET_PRINTER | \
273 PRINTER_CHANGE_DELETE_PRINTER | \
274 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
276 #define PRINTER_CHANGE_ADD_JOB 0x00000100
277 #define PRINTER_CHANGE_SET_JOB 0x00000200
278 #define PRINTER_CHANGE_DELETE_JOB 0x00000400
279 #define PRINTER_CHANGE_WRITE_JOB 0x00000800
280 #define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \
281 PRINTER_CHANGE_SET_JOB | \
282 PRINTER_CHANGE_DELETE_JOB | \
283 PRINTER_CHANGE_WRITE_JOB )
285 #define PRINTER_CHANGE_ADD_FORM 0x00010000
286 #define PRINTER_CHANGE_SET_FORM 0x00020000
287 #define PRINTER_CHANGE_DELETE_FORM 0x00040000
288 #define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \
289 PRINTER_CHANGE_SET_FORM | \
290 PRINTER_CHANGE_DELETE_FORM )
292 #define PRINTER_CHANGE_ADD_PORT 0x00100000
293 #define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
294 #define PRINTER_CHANGE_DELETE_PORT 0x00400000
295 #define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \
296 PRINTER_CHANGE_CONFIGURE_PORT | \
297 PRINTER_CHANGE_DELETE_PORT )
299 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
300 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
301 #define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
302 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
304 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
305 #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
306 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
307 #define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
308 PRINTER_CHANGE_SET_PRINTER_DRIVER | \
309 PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
311 #define PRINTER_CHANGE_TIMEOUT 0x80000000
312 #define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \
313 PRINTER_CHANGE_FORM | \
314 PRINTER_CHANGE_PORT | \
315 PRINTER_CHANGE_PRINT_PROCESSOR | \
316 PRINTER_CHANGE_PRINTER_DRIVER )
318 #define PRINTER_NOTIFY_INFO_DISCARDED 0x1
321 * The printer attributes.
322 * I #defined all of them (grabbed form MSDN)
323 * I'm only using:
324 * ( SHARED | NETWORK | RAW_ONLY )
325 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
328 #define PRINTER_ATTRIBUTE_QUEUED 0x00000001
329 #define PRINTER_ATTRIBUTE_DIRECT 0x00000002
330 #define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
331 #define PRINTER_ATTRIBUTE_SHARED 0x00000008
333 #define PRINTER_ATTRIBUTE_NETWORK 0x00000010
334 #define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
335 #define PRINTER_ATTRIBUTE_LOCAL 0x00000040
336 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
338 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
339 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
340 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
341 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
343 #define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
345 #define NO_PRIORITY 0
346 #define MAX_PRIORITY 99
347 #define MIN_PRIORITY 1
348 #define DEF_PRIORITY 1
350 /* the flags of the query */
351 #define PRINTER_ENUM_DEFAULT 0x00000001
352 #define PRINTER_ENUM_LOCAL 0x00000002
353 #define PRINTER_ENUM_CONNECTIONS 0x00000004
354 #define PRINTER_ENUM_FAVORITE 0x00000004
355 #define PRINTER_ENUM_NAME 0x00000008
356 #define PRINTER_ENUM_REMOTE 0x00000010
357 #define PRINTER_ENUM_SHARED 0x00000020
358 #define PRINTER_ENUM_NETWORK 0x00000040
360 /* the flags of each printers */
361 #define PRINTER_ENUM_UNKNOWN_8 0x00000008
362 #define PRINTER_ENUM_EXPAND 0x00004000
363 #define PRINTER_ENUM_CONTAINER 0x00008000
364 #define PRINTER_ENUM_ICONMASK 0x00ff0000
365 #define PRINTER_ENUM_ICON1 0x00010000
366 #define PRINTER_ENUM_ICON2 0x00020000
367 #define PRINTER_ENUM_ICON3 0x00040000
368 #define PRINTER_ENUM_ICON4 0x00080000
369 #define PRINTER_ENUM_ICON5 0x00100000
370 #define PRINTER_ENUM_ICON6 0x00200000
371 #define PRINTER_ENUM_ICON7 0x00400000
372 #define PRINTER_ENUM_ICON8 0x00800000
374 /* this struct is undocumented */
375 /* thanks to the ddk ... */
376 typedef struct spool_user_1
378 uint32 size; /* length of user_name & client_name + 2? */
379 uint32 client_name_ptr;
380 uint32 user_name_ptr;
381 uint32 build;
382 uint32 major;
383 uint32 minor;
384 uint32 processor;
385 UNISTR2 client_name;
386 UNISTR2 user_name;
388 SPOOL_USER_1;
390 typedef struct spool_user_ctr_info
392 uint32 level;
393 uint32 ptr;
394 SPOOL_USER_1 user1;
396 SPOOL_USER_CTR;
398 typedef struct devicemode
400 UNISTR devicename;
401 uint16 specversion;
402 uint16 driverversion;
403 uint16 size;
404 uint16 driverextra;
405 uint32 fields;
406 uint16 orientation;
407 uint16 papersize;
408 uint16 paperlength;
409 uint16 paperwidth;
410 uint16 scale;
411 uint16 copies;
412 uint16 defaultsource;
413 uint16 printquality;
414 uint16 color;
415 uint16 duplex;
416 uint16 yresolution;
417 uint16 ttoption;
418 uint16 collate;
419 UNISTR formname;
420 uint16 logpixels;
421 uint32 bitsperpel;
422 uint32 pelswidth;
423 uint32 pelsheight;
424 uint32 displayflags;
425 uint32 displayfrequency;
426 uint32 icmmethod;
427 uint32 icmintent;
428 uint32 mediatype;
429 uint32 dithertype;
430 uint32 reserved1;
431 uint32 reserved2;
432 uint32 panningwidth;
433 uint32 panningheight;
434 uint8 *private;
436 DEVICEMODE;
438 typedef struct _devmode_cont
440 uint32 size;
441 uint32 devmode_ptr;
442 DEVICEMODE *devmode;
444 DEVMODE_CTR;
446 typedef struct _printer_default
448 uint32 datatype_ptr;
449 UNISTR2 datatype;
450 DEVMODE_CTR devmode_cont;
451 uint32 access_required;
453 PRINTER_DEFAULT;
455 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
456 typedef struct spool_q_open_printer_ex
458 uint32 printername_ptr;
459 UNISTR2 printername;
460 PRINTER_DEFAULT printer_default;
461 uint32 user_switch;
462 SPOOL_USER_CTR user_ctr;
464 SPOOL_Q_OPEN_PRINTER_EX;
466 /* SPOOL_R_OPEN_PRINTER_EX reply to an open printer */
467 typedef struct spool_r_open_printer_ex
469 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
470 WERROR status;
472 SPOOL_R_OPEN_PRINTER_EX;
474 typedef struct spool_notify_option_type
476 uint16 type;
477 uint16 reserved0;
478 uint32 reserved1;
479 uint32 reserved2;
480 uint32 count;
481 uint32 fields_ptr;
482 uint32 count2;
483 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
485 SPOOL_NOTIFY_OPTION_TYPE;
487 typedef struct spool_notify_option_type_ctr
489 uint32 count;
490 SPOOL_NOTIFY_OPTION_TYPE *type;
492 SPOOL_NOTIFY_OPTION_TYPE_CTR;
496 typedef struct s_header_type
498 uint32 type;
499 union
501 uint32 value;
502 UNISTR string;
504 data;
506 HEADER_TYPE;
508 typedef struct new_buffer
510 uint32 ptr;
511 uint32 size;
512 prs_struct prs;
513 uint32 struct_start;
514 uint32 string_at_end;
516 NEW_BUFFER;
518 typedef struct spool_q_getprinterdata
520 POLICY_HND handle;
521 UNISTR2 valuename;
522 uint32 size;
524 SPOOL_Q_GETPRINTERDATA;
526 typedef struct spool_r_getprinterdata
528 uint32 type;
529 uint32 size;
530 uint8 *data;
531 uint32 needed;
532 WERROR status;
534 SPOOL_R_GETPRINTERDATA;
536 typedef struct spool_q_deleteprinterdata
538 POLICY_HND handle;
539 UNISTR2 valuename;
541 SPOOL_Q_DELETEPRINTERDATA;
543 typedef struct spool_r_deleteprinterdata
545 WERROR status;
547 SPOOL_R_DELETEPRINTERDATA;
549 typedef struct spool_q_closeprinter
551 POLICY_HND handle;
553 SPOOL_Q_CLOSEPRINTER;
555 typedef struct spool_r_closeprinter
557 POLICY_HND handle;
558 WERROR status;
560 SPOOL_R_CLOSEPRINTER;
562 typedef struct spool_q_startpageprinter
564 POLICY_HND handle;
566 SPOOL_Q_STARTPAGEPRINTER;
568 typedef struct spool_r_startpageprinter
570 WERROR status;
572 SPOOL_R_STARTPAGEPRINTER;
574 typedef struct spool_q_endpageprinter
576 POLICY_HND handle;
578 SPOOL_Q_ENDPAGEPRINTER;
580 typedef struct spool_r_endpageprinter
582 WERROR status;
584 SPOOL_R_ENDPAGEPRINTER;
587 typedef struct spool_q_deleteprinterdriver
589 uint32 server_ptr;
590 UNISTR2 server;
591 UNISTR2 arch;
592 UNISTR2 driver;
594 SPOOL_Q_DELETEPRINTERDRIVER;
596 typedef struct spool_r_deleteprinterdriver
598 WERROR status;
600 SPOOL_R_DELETEPRINTERDRIVER;
603 typedef struct spool_doc_info_1
605 uint32 p_docname;
606 uint32 p_outputfile;
607 uint32 p_datatype;
608 UNISTR2 docname;
609 UNISTR2 outputfile;
610 UNISTR2 datatype;
612 DOC_INFO_1;
614 typedef struct spool_doc_info
616 uint32 switch_value;
617 DOC_INFO_1 doc_info_1;
619 DOC_INFO;
621 typedef struct spool_doc_info_container
623 uint32 level;
624 DOC_INFO docinfo;
626 DOC_INFO_CONTAINER;
628 typedef struct spool_q_startdocprinter
630 POLICY_HND handle;
631 DOC_INFO_CONTAINER doc_info_container;
633 SPOOL_Q_STARTDOCPRINTER;
635 typedef struct spool_r_startdocprinter
637 uint32 jobid;
638 WERROR status;
640 SPOOL_R_STARTDOCPRINTER;
642 typedef struct spool_q_enddocprinter
644 POLICY_HND handle;
646 SPOOL_Q_ENDDOCPRINTER;
648 typedef struct spool_r_enddocprinter
650 WERROR status;
652 SPOOL_R_ENDDOCPRINTER;
654 typedef struct spool_q_writeprinter
656 POLICY_HND handle;
657 uint32 buffer_size;
658 uint8 *buffer;
659 uint32 buffer_size2;
661 SPOOL_Q_WRITEPRINTER;
663 typedef struct spool_r_writeprinter
665 uint32 buffer_written;
666 WERROR status;
668 SPOOL_R_WRITEPRINTER;
670 typedef struct spool_notify_option
672 uint32 version;
673 uint32 flags;
674 uint32 count;
675 uint32 option_type_ptr;
676 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
678 SPOOL_NOTIFY_OPTION;
680 typedef struct spool_notify_info_data
682 uint16 type;
683 uint16 field;
684 uint32 reserved;
685 uint32 id;
686 union
688 uint32 value[2];
689 struct
691 uint32 length;
692 uint16 *string;
694 data;
696 notify_data;
697 uint32 size;
698 BOOL enc_type;
699 } SPOOL_NOTIFY_INFO_DATA;
701 typedef struct spool_notify_info
703 uint32 version;
704 uint32 flags;
705 uint32 count;
706 SPOOL_NOTIFY_INFO_DATA *data;
708 SPOOL_NOTIFY_INFO;
710 /* If the struct name looks obscure, yes it is ! */
711 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
712 typedef struct spoolss_q_rffpcnex
714 POLICY_HND handle;
715 uint32 flags;
716 uint32 options;
717 uint32 localmachine_ptr;
718 UNISTR2 localmachine;
719 uint32 printerlocal;
720 uint32 option_ptr;
721 SPOOL_NOTIFY_OPTION *option;
723 SPOOL_Q_RFFPCNEX;
725 typedef struct spool_r_rffpcnex
727 WERROR status;
729 SPOOL_R_RFFPCNEX;
731 /* Remote Find Next Printer Change Notify Ex */
732 typedef struct spool_q_rfnpcnex
734 POLICY_HND handle;
735 uint32 change;
736 uint32 option_ptr;
737 SPOOL_NOTIFY_OPTION *option;
739 SPOOL_Q_RFNPCNEX;
741 typedef struct spool_r_rfnpcnex
743 uint32 info_ptr;
744 SPOOL_NOTIFY_INFO info;
745 WERROR status;
747 SPOOL_R_RFNPCNEX;
749 /* Find Close Printer Notify */
750 typedef struct spool_q_fcpn
752 POLICY_HND handle;
754 SPOOL_Q_FCPN;
756 typedef struct spool_r_fcpn
758 WERROR status;
760 SPOOL_R_FCPN;
763 typedef struct printer_info_0
765 UNISTR printername;
766 UNISTR servername;
767 uint32 cjobs;
768 uint32 total_jobs;
769 uint32 total_bytes;
771 uint16 year;
772 uint16 month;
773 uint16 dayofweek;
774 uint16 day;
775 uint16 hour;
776 uint16 minute;
777 uint16 second;
778 uint16 milliseconds;
780 uint32 global_counter;
781 uint32 total_pages;
783 uint16 major_version;
784 uint16 build_version;
786 uint32 unknown7;
787 uint32 unknown8;
788 uint32 unknown9;
789 uint32 session_counter;
790 uint32 unknown11;
791 uint32 printer_errors;
792 uint32 unknown13;
793 uint32 unknown14;
794 uint32 unknown15;
795 uint32 unknown16;
796 uint32 change_id;
797 uint32 unknown18;
798 uint32 status;
799 uint32 unknown20;
800 uint32 c_setprinter;
802 uint16 unknown22;
803 uint16 unknown23;
804 uint16 unknown24;
805 uint16 unknown25;
806 uint16 unknown26;
807 uint16 unknown27;
808 uint16 unknown28;
809 uint16 unknown29;
810 } PRINTER_INFO_0;
812 typedef struct printer_info_1
814 uint32 flags;
815 UNISTR description;
816 UNISTR name;
817 UNISTR comment;
819 PRINTER_INFO_1;
821 typedef struct printer_info_2
823 UNISTR servername;
824 UNISTR printername;
825 UNISTR sharename;
826 UNISTR portname;
827 UNISTR drivername;
828 UNISTR comment;
829 UNISTR location;
830 DEVICEMODE *devmode;
831 UNISTR sepfile;
832 UNISTR printprocessor;
833 UNISTR datatype;
834 UNISTR parameters;
835 SEC_DESC *secdesc;
836 uint32 attributes;
837 uint32 priority;
838 uint32 defaultpriority;
839 uint32 starttime;
840 uint32 untiltime;
841 uint32 status;
842 uint32 cjobs;
843 uint32 averageppm;
845 PRINTER_INFO_2;
847 typedef struct printer_info_3
849 uint32 flags;
850 SEC_DESC *secdesc;
852 PRINTER_INFO_3;
854 typedef struct printer_info_4
856 UNISTR printername;
857 UNISTR servername;
858 uint32 attributes;
860 PRINTER_INFO_4;
862 typedef struct printer_info_5
864 UNISTR printername;
865 UNISTR portname;
866 uint32 attributes;
867 uint32 device_not_selected_timeout;
868 uint32 transmission_retry_timeout;
870 PRINTER_INFO_5;
872 typedef struct spool_q_enumprinters
874 uint32 flags;
875 uint32 servername_ptr;
876 UNISTR2 servername;
877 uint32 level;
878 NEW_BUFFER *buffer;
879 uint32 offered;
881 SPOOL_Q_ENUMPRINTERS;
883 typedef struct printer_info_ctr_info
885 PRINTER_INFO_0 *printers_0;
886 PRINTER_INFO_1 *printers_1;
887 PRINTER_INFO_2 *printers_2;
888 PRINTER_INFO_3 *printers_3;
889 PRINTER_INFO_4 *printers_4;
890 PRINTER_INFO_5 *printers_5;
892 PRINTER_INFO_CTR;
894 typedef struct spool_r_enumprinters
896 NEW_BUFFER *buffer;
897 uint32 needed; /* bytes needed */
898 uint32 returned; /* number of printers */
899 WERROR status;
901 SPOOL_R_ENUMPRINTERS;
904 typedef struct spool_q_getprinter
906 POLICY_HND handle;
907 uint32 level;
908 NEW_BUFFER *buffer;
909 uint32 offered;
911 SPOOL_Q_GETPRINTER;
913 typedef struct printer_info_info
915 union
917 PRINTER_INFO_0 *info0;
918 PRINTER_INFO_1 *info1;
919 PRINTER_INFO_2 *info2;
920 void *info;
921 } printer;
922 } PRINTER_INFO;
924 typedef struct spool_r_getprinter
926 NEW_BUFFER *buffer;
927 uint32 needed;
928 WERROR status;
929 } SPOOL_R_GETPRINTER;
931 typedef struct driver_info_1
933 UNISTR name;
934 } DRIVER_INFO_1;
936 typedef struct driver_info_2
938 uint32 version;
939 UNISTR name;
940 UNISTR architecture;
941 UNISTR driverpath;
942 UNISTR datafile;
943 UNISTR configfile;
944 } DRIVER_INFO_2;
946 typedef struct driver_info_3
948 uint32 version;
949 UNISTR name;
950 UNISTR architecture;
951 UNISTR driverpath;
952 UNISTR datafile;
953 UNISTR configfile;
954 UNISTR helpfile;
955 uint16 *dependentfiles;
956 UNISTR monitorname;
957 UNISTR defaultdatatype;
959 DRIVER_INFO_3;
961 typedef struct driver_info_6
963 uint32 version;
964 UNISTR name;
965 UNISTR architecture;
966 UNISTR driverpath;
967 UNISTR datafile;
968 UNISTR configfile;
969 UNISTR helpfile;
970 uint16 *dependentfiles;
971 UNISTR monitorname;
972 UNISTR defaultdatatype;
973 uint16* previousdrivernames;
974 NTTIME driver_date;
975 uint32 padding;
976 uint32 driver_version_low;
977 uint32 driver_version_high;
978 UNISTR mfgname;
979 UNISTR oem_url;
980 UNISTR hardware_id;
981 UNISTR provider;
983 DRIVER_INFO_6;
985 typedef struct driver_info_info
987 DRIVER_INFO_1 *info1;
988 DRIVER_INFO_2 *info2;
989 DRIVER_INFO_3 *info3;
990 DRIVER_INFO_6 *info6;
992 PRINTER_DRIVER_CTR;
994 typedef struct spool_q_getprinterdriver2
996 POLICY_HND handle;
997 uint32 architecture_ptr;
998 UNISTR2 architecture;
999 uint32 level;
1000 NEW_BUFFER *buffer;
1001 uint32 offered;
1002 uint32 clientmajorversion;
1003 uint32 clientminorversion;
1005 SPOOL_Q_GETPRINTERDRIVER2;
1007 typedef struct spool_r_getprinterdriver2
1009 NEW_BUFFER *buffer;
1010 uint32 needed;
1011 uint32 servermajorversion;
1012 uint32 serverminorversion;
1013 WERROR status;
1015 SPOOL_R_GETPRINTERDRIVER2;
1018 typedef struct add_jobinfo_1
1020 UNISTR path;
1021 uint32 job_number;
1023 ADD_JOBINFO_1;
1026 typedef struct spool_q_addjob
1028 POLICY_HND handle;
1029 uint32 level;
1030 NEW_BUFFER *buffer;
1031 uint32 offered;
1033 SPOOL_Q_ADDJOB;
1035 typedef struct spool_r_addjob
1037 NEW_BUFFER *buffer;
1038 uint32 needed;
1039 WERROR status;
1041 SPOOL_R_ADDJOB;
1044 * I'm really wondering how many different time formats
1045 * I will have to cope with
1047 * JFM, 09/13/98 In a mad mood ;-(
1049 typedef struct systemtime
1051 uint16 year;
1052 uint16 month;
1053 uint16 dayofweek;
1054 uint16 day;
1055 uint16 hour;
1056 uint16 minute;
1057 uint16 second;
1058 uint16 milliseconds;
1060 SYSTEMTIME;
1062 typedef struct s_job_info_1
1064 uint32 jobid;
1065 UNISTR printername;
1066 UNISTR machinename;
1067 UNISTR username;
1068 UNISTR document;
1069 UNISTR datatype;
1070 UNISTR text_status;
1071 uint32 status;
1072 uint32 priority;
1073 uint32 position;
1074 uint32 totalpages;
1075 uint32 pagesprinted;
1076 SYSTEMTIME submitted;
1078 JOB_INFO_1;
1080 typedef struct s_job_info_2
1082 uint32 jobid;
1083 UNISTR printername;
1084 UNISTR machinename;
1085 UNISTR username;
1086 UNISTR document;
1087 UNISTR notifyname;
1088 UNISTR datatype;
1089 UNISTR printprocessor;
1090 UNISTR parameters;
1091 UNISTR drivername;
1092 DEVICEMODE *devmode;
1093 UNISTR text_status;
1094 /* SEC_DESC sec_desc;*/
1095 uint32 status;
1096 uint32 priority;
1097 uint32 position;
1098 uint32 starttime;
1099 uint32 untiltime;
1100 uint32 totalpages;
1101 uint32 size;
1102 SYSTEMTIME submitted;
1103 uint32 timeelapsed;
1104 uint32 pagesprinted;
1106 JOB_INFO_2;
1108 typedef struct spool_q_enumjobs
1110 POLICY_HND handle;
1111 uint32 firstjob;
1112 uint32 numofjobs;
1113 uint32 level;
1114 NEW_BUFFER *buffer;
1115 uint32 offered;
1117 SPOOL_Q_ENUMJOBS;
1119 typedef struct job_info_ctr_info
1121 union
1123 JOB_INFO_1 **job_info_1;
1124 JOB_INFO_2 **job_info_2;
1125 void *info;
1126 } job;
1128 } JOB_INFO_CTR;
1130 typedef struct spool_r_enumjobs
1132 NEW_BUFFER *buffer;
1133 uint32 needed;
1134 uint32 returned;
1135 WERROR status;
1137 SPOOL_R_ENUMJOBS;
1139 typedef struct spool_q_schedulejob
1141 POLICY_HND handle;
1142 uint32 jobid;
1144 SPOOL_Q_SCHEDULEJOB;
1146 typedef struct spool_r_schedulejob
1148 WERROR status;
1150 SPOOL_R_SCHEDULEJOB;
1152 typedef struct s_port_info_1
1154 UNISTR port_name;
1156 PORT_INFO_1;
1158 typedef struct s_port_info_2
1160 UNISTR port_name;
1161 UNISTR monitor_name;
1162 UNISTR description;
1163 uint32 port_type;
1164 uint32 reserved;
1166 PORT_INFO_2;
1168 typedef struct spool_q_enumports
1170 uint32 name_ptr;
1171 UNISTR2 name;
1172 uint32 level;
1173 NEW_BUFFER *buffer;
1174 uint32 offered;
1176 SPOOL_Q_ENUMPORTS;
1178 typedef struct port_info_ctr_info
1180 union
1182 PORT_INFO_1 *info_1;
1183 PORT_INFO_2 *info_2;
1185 port;
1188 PORT_INFO_CTR;
1190 typedef struct spool_r_enumports
1192 NEW_BUFFER *buffer;
1193 uint32 needed; /* bytes needed */
1194 uint32 returned; /* number of printers */
1195 WERROR status;
1197 SPOOL_R_ENUMPORTS;
1199 #define JOB_CONTROL_PAUSE 1
1200 #define JOB_CONTROL_RESUME 2
1201 #define JOB_CONTROL_CANCEL 3
1202 #define JOB_CONTROL_RESTART 4
1203 #define JOB_CONTROL_DELETE 5
1205 typedef struct job_info_info
1207 union
1209 JOB_INFO_1 job_info_1;
1210 JOB_INFO_2 job_info_2;
1212 job;
1215 JOB_INFO;
1217 typedef struct spool_q_setjob
1219 POLICY_HND handle;
1220 uint32 jobid;
1221 uint32 level;
1222 JOB_INFO ctr;
1223 uint32 command;
1226 SPOOL_Q_SETJOB;
1228 typedef struct spool_r_setjob
1230 WERROR status;
1233 SPOOL_R_SETJOB;
1235 typedef struct spool_q_enumprinterdrivers
1237 uint32 name_ptr;
1238 UNISTR2 name;
1239 uint32 environment_ptr;
1240 UNISTR2 environment;
1241 uint32 level;
1242 NEW_BUFFER *buffer;
1243 uint32 offered;
1245 SPOOL_Q_ENUMPRINTERDRIVERS;
1247 typedef struct spool_r_enumprinterdrivers
1249 NEW_BUFFER *buffer;
1250 uint32 needed;
1251 uint32 returned;
1252 WERROR status;
1254 SPOOL_R_ENUMPRINTERDRIVERS;
1256 typedef struct spool_form_1
1258 uint32 flag;
1259 UNISTR name;
1260 uint32 width;
1261 uint32 length;
1262 uint32 left;
1263 uint32 top;
1264 uint32 right;
1265 uint32 bottom;
1267 FORM_1;
1269 typedef struct spool_q_enumforms
1271 POLICY_HND handle;
1272 uint32 level;
1273 NEW_BUFFER *buffer;
1274 uint32 offered;
1276 SPOOL_Q_ENUMFORMS;
1278 typedef struct spool_r_enumforms
1280 NEW_BUFFER *buffer;
1281 uint32 needed;
1282 uint32 numofforms;
1283 WERROR status;
1285 SPOOL_R_ENUMFORMS;
1287 typedef struct spool_q_getform
1289 POLICY_HND handle;
1290 UNISTR2 formname;
1291 uint32 level;
1292 NEW_BUFFER *buffer;
1293 uint32 offered;
1295 SPOOL_Q_GETFORM;
1297 typedef struct spool_r_getform
1299 NEW_BUFFER *buffer;
1300 uint32 needed;
1301 WERROR status;
1303 SPOOL_R_GETFORM;
1305 typedef struct spool_printer_info_level_1
1307 uint32 flags;
1308 uint32 description_ptr;
1309 uint32 name_ptr;
1310 uint32 comment_ptr;
1311 UNISTR2 description;
1312 UNISTR2 name;
1313 UNISTR2 comment;
1314 } SPOOL_PRINTER_INFO_LEVEL_1;
1316 typedef struct spool_printer_info_level_2
1318 uint32 servername_ptr;
1319 uint32 printername_ptr;
1320 uint32 sharename_ptr;
1321 uint32 portname_ptr;
1322 uint32 drivername_ptr;
1323 uint32 comment_ptr;
1324 uint32 location_ptr;
1325 uint32 devmode_ptr;
1326 uint32 sepfile_ptr;
1327 uint32 printprocessor_ptr;
1328 uint32 datatype_ptr;
1329 uint32 parameters_ptr;
1330 uint32 secdesc_ptr;
1331 uint32 attributes;
1332 uint32 priority;
1333 uint32 default_priority;
1334 uint32 starttime;
1335 uint32 untiltime;
1336 uint32 status;
1337 uint32 cjobs;
1338 uint32 averageppm;
1339 UNISTR2 servername;
1340 UNISTR2 printername;
1341 UNISTR2 sharename;
1342 UNISTR2 portname;
1343 UNISTR2 drivername;
1344 UNISTR2 comment;
1345 UNISTR2 location;
1346 UNISTR2 sepfile;
1347 UNISTR2 printprocessor;
1348 UNISTR2 datatype;
1349 UNISTR2 parameters;
1351 SPOOL_PRINTER_INFO_LEVEL_2;
1353 typedef struct spool_printer_info_level_3
1355 uint32 secdesc_ptr;
1357 SPOOL_PRINTER_INFO_LEVEL_3;
1359 typedef struct spool_printer_info_level
1361 uint32 level;
1362 uint32 info_ptr;
1363 SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
1364 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1365 SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
1367 SPOOL_PRINTER_INFO_LEVEL;
1369 typedef struct spool_printer_driver_info_level_3
1371 uint32 cversion;
1372 uint32 name_ptr;
1373 uint32 environment_ptr;
1374 uint32 driverpath_ptr;
1375 uint32 datafile_ptr;
1376 uint32 configfile_ptr;
1377 uint32 helpfile_ptr;
1378 uint32 monitorname_ptr;
1379 uint32 defaultdatatype_ptr;
1380 uint32 dependentfilessize;
1381 uint32 dependentfiles_ptr;
1383 UNISTR2 name;
1384 UNISTR2 environment;
1385 UNISTR2 driverpath;
1386 UNISTR2 datafile;
1387 UNISTR2 configfile;
1388 UNISTR2 helpfile;
1389 UNISTR2 monitorname;
1390 UNISTR2 defaultdatatype;
1391 BUFFER5 dependentfiles;
1394 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1396 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
1397 typedef struct {
1398 uint32 version;
1399 uint32 name_ptr;
1400 uint32 environment_ptr;
1401 uint32 driverpath_ptr;
1402 uint32 datafile_ptr;
1403 uint32 configfile_ptr;
1404 uint32 helpfile_ptr;
1405 uint32 monitorname_ptr;
1406 uint32 defaultdatatype_ptr;
1407 uint32 dependentfiles_len;
1408 uint32 dependentfiles_ptr;
1409 uint32 previousnames_len;
1410 uint32 previousnames_ptr;
1411 NTTIME driverdate;
1412 UINT64_S driverversion;
1413 uint32 dummy4;
1414 uint32 mfgname_ptr;
1415 uint32 oemurl_ptr;
1416 uint32 hardwareid_ptr;
1417 uint32 provider_ptr;
1418 UNISTR2 name;
1419 UNISTR2 environment;
1420 UNISTR2 driverpath;
1421 UNISTR2 datafile;
1422 UNISTR2 configfile;
1423 UNISTR2 helpfile;
1424 UNISTR2 monitorname;
1425 UNISTR2 defaultdatatype;
1426 BUFFER5 dependentfiles;
1427 BUFFER5 previousnames;
1428 UNISTR2 mfgname;
1429 UNISTR2 oemurl;
1430 UNISTR2 hardwareid;
1431 UNISTR2 provider;
1432 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1435 typedef struct spool_printer_driver_info_level
1437 uint32 level;
1438 uint32 ptr;
1439 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1440 SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
1442 SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1445 /* this struct is undocumented */
1446 /* thanks to the ddk ... */
1447 typedef struct spool_user_level_1
1449 uint32 size;
1450 uint32 client_name_ptr;
1451 uint32 user_name_ptr;
1452 uint32 build;
1453 uint32 major;
1454 uint32 minor;
1455 uint32 processor;
1456 UNISTR2 client_name;
1457 UNISTR2 user_name;
1459 SPOOL_USER_LEVEL_1;
1461 typedef struct spool_user_level
1463 SPOOL_USER_LEVEL_1 *user_level_1;
1465 SPOOL_USER_LEVEL;
1467 typedef struct spool_q_setprinter
1469 POLICY_HND handle;
1470 uint32 level;
1471 SPOOL_PRINTER_INFO_LEVEL info;
1472 SEC_DESC_BUF *secdesc_ctr;
1473 DEVMODE_CTR devmode_ctr;
1475 uint32 command;
1478 SPOOL_Q_SETPRINTER;
1480 typedef struct spool_r_setprinter
1482 WERROR status;
1484 SPOOL_R_SETPRINTER;
1486 typedef struct spool_q_addprinter
1488 UNISTR2 server_name;
1489 uint32 level;
1490 SPOOL_PRINTER_INFO_LEVEL info;
1491 DEVMODE_CTR devmode_ctr;
1492 SEC_DESC_BUF *secdesc_ctr;
1493 uint32 user_level;
1494 SPOOL_USER_LEVEL user;
1496 SPOOL_Q_ADDPRINTER;
1498 typedef struct spool_r_addprinter
1500 WERROR status;
1502 SPOOL_R_ADDPRINTER;
1504 typedef struct spool_q_deleteprinter
1506 POLICY_HND handle;
1508 SPOOL_Q_DELETEPRINTER;
1510 typedef struct spool_r_deleteprinter
1512 POLICY_HND handle;
1513 WERROR status;
1515 SPOOL_R_DELETEPRINTER;
1517 typedef struct spool_q_abortprinter
1519 POLICY_HND handle;
1521 SPOOL_Q_ABORTPRINTER;
1523 typedef struct spool_r_abortprinter
1525 WERROR status;
1527 SPOOL_R_ABORTPRINTER;
1530 typedef struct spool_q_addprinterex
1532 uint32 server_name_ptr;
1533 UNISTR2 server_name;
1534 uint32 level;
1535 SPOOL_PRINTER_INFO_LEVEL info;
1536 DEVMODE_CTR devmode_ctr;
1537 SEC_DESC_BUF *secdesc_ctr;
1538 uint32 user_switch;
1539 SPOOL_USER_CTR user_ctr;
1541 SPOOL_Q_ADDPRINTEREX;
1543 typedef struct spool_r_addprinterex
1545 POLICY_HND handle;
1546 WERROR status;
1548 SPOOL_R_ADDPRINTEREX;
1551 typedef struct spool_q_addprinterdriver
1553 uint32 server_name_ptr;
1554 UNISTR2 server_name;
1555 uint32 level;
1556 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1558 SPOOL_Q_ADDPRINTERDRIVER;
1560 typedef struct spool_r_addprinterdriver
1562 WERROR status;
1564 SPOOL_R_ADDPRINTERDRIVER;
1567 typedef struct driver_directory_1
1569 UNISTR name;
1571 DRIVER_DIRECTORY_1;
1573 typedef struct driver_info_ctr_info
1575 DRIVER_DIRECTORY_1 *info1;
1577 DRIVER_DIRECTORY_CTR;
1579 typedef struct spool_q_getprinterdriverdirectory
1581 uint32 name_ptr;
1582 UNISTR2 name;
1583 uint32 environment_ptr;
1584 UNISTR2 environment;
1585 uint32 level;
1586 NEW_BUFFER *buffer;
1587 uint32 offered;
1589 SPOOL_Q_GETPRINTERDRIVERDIR;
1591 typedef struct spool_r_getprinterdriverdirectory
1593 NEW_BUFFER *buffer;
1594 uint32 needed;
1595 WERROR status;
1597 SPOOL_R_GETPRINTERDRIVERDIR;
1599 typedef struct spool_q_addprintprocessor
1601 uint32 server_ptr;
1602 UNISTR2 server;
1603 UNISTR2 environment;
1604 UNISTR2 path;
1605 UNISTR2 name;
1607 SPOOL_Q_ADDPRINTPROCESSOR;
1609 typedef struct spool_r_addprintprocessor
1611 WERROR status;
1613 SPOOL_R_ADDPRINTPROCESSOR;
1616 typedef struct spool_q_enumprintprocessors
1618 uint32 name_ptr;
1619 UNISTR2 name;
1620 uint32 environment_ptr;
1621 UNISTR2 environment;
1622 uint32 level;
1623 NEW_BUFFER *buffer;
1624 uint32 offered;
1626 SPOOL_Q_ENUMPRINTPROCESSORS;
1628 typedef struct printprocessor_1
1630 UNISTR name;
1632 PRINTPROCESSOR_1;
1634 typedef struct spool_r_enumprintprocessors
1636 NEW_BUFFER *buffer;
1637 uint32 needed;
1638 uint32 returned;
1639 WERROR status;
1641 SPOOL_R_ENUMPRINTPROCESSORS;
1643 typedef struct spool_q_enumprintprocdatatypes
1645 uint32 name_ptr;
1646 UNISTR2 name;
1647 uint32 processor_ptr;
1648 UNISTR2 processor;
1649 uint32 level;
1650 NEW_BUFFER *buffer;
1651 uint32 offered;
1653 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1655 typedef struct ppdatatype_1
1657 UNISTR name;
1659 PRINTPROCDATATYPE_1;
1661 typedef struct spool_r_enumprintprocdatatypes
1663 NEW_BUFFER *buffer;
1664 uint32 needed;
1665 uint32 returned;
1666 WERROR status;
1668 SPOOL_R_ENUMPRINTPROCDATATYPES;
1670 typedef struct printmonitor_1
1672 UNISTR name;
1674 PRINTMONITOR_1;
1676 typedef struct printmonitor_2
1678 UNISTR name;
1679 UNISTR environment;
1680 UNISTR dll_name;
1682 PRINTMONITOR_2;
1684 typedef struct spool_q_enumprintmonitors
1686 uint32 name_ptr;
1687 UNISTR2 name;
1688 uint32 level;
1689 NEW_BUFFER *buffer;
1690 uint32 offered;
1692 SPOOL_Q_ENUMPRINTMONITORS;
1694 typedef struct spool_r_enumprintmonitors
1696 NEW_BUFFER *buffer;
1697 uint32 needed;
1698 uint32 returned;
1699 WERROR status;
1701 SPOOL_R_ENUMPRINTMONITORS;
1704 typedef struct spool_q_enumprinterdata
1706 POLICY_HND handle;
1707 uint32 index;
1708 uint32 valuesize;
1709 uint32 datasize;
1711 SPOOL_Q_ENUMPRINTERDATA;
1713 typedef struct spool_r_enumprinterdata
1715 uint32 valuesize;
1716 uint16 *value;
1717 uint32 realvaluesize;
1718 uint32 type;
1719 uint32 datasize;
1720 uint8 *data;
1721 uint32 realdatasize;
1722 WERROR status;
1724 SPOOL_R_ENUMPRINTERDATA;
1726 typedef struct spool_q_setprinterdata
1728 POLICY_HND handle;
1729 UNISTR2 value;
1730 uint32 type;
1731 uint32 max_len;
1732 uint8 *data;
1733 uint32 real_len;
1734 uint32 numeric_data;
1736 SPOOL_Q_SETPRINTERDATA;
1738 typedef struct spool_r_setprinterdata
1740 WERROR status;
1742 SPOOL_R_SETPRINTERDATA;
1744 typedef struct _form
1746 uint32 flags;
1747 uint32 name_ptr;
1748 uint32 size_x;
1749 uint32 size_y;
1750 uint32 left;
1751 uint32 top;
1752 uint32 right;
1753 uint32 bottom;
1754 UNISTR2 name;
1756 FORM;
1758 typedef struct spool_q_addform
1760 POLICY_HND handle;
1761 uint32 level;
1762 uint32 level2;
1763 FORM form;
1765 SPOOL_Q_ADDFORM;
1767 typedef struct spool_r_addform
1769 WERROR status;
1771 SPOOL_R_ADDFORM;
1773 typedef struct spool_q_setform
1775 POLICY_HND handle;
1776 UNISTR2 name;
1777 uint32 level;
1778 uint32 level2;
1779 FORM form;
1781 SPOOL_Q_SETFORM;
1783 typedef struct spool_r_setform
1785 WERROR status;
1787 SPOOL_R_SETFORM;
1789 typedef struct spool_q_deleteform
1791 POLICY_HND handle;
1792 UNISTR2 name;
1794 SPOOL_Q_DELETEFORM;
1796 typedef struct spool_r_deleteform
1798 WERROR status;
1800 SPOOL_R_DELETEFORM;
1802 typedef struct spool_q_getjob
1804 POLICY_HND handle;
1805 uint32 jobid;
1806 uint32 level;
1807 NEW_BUFFER *buffer;
1808 uint32 offered;
1810 SPOOL_Q_GETJOB;
1812 typedef struct pjob_info_info
1814 union
1816 JOB_INFO_1 *job_info_1;
1817 JOB_INFO_2 *job_info_2;
1818 void *info;
1820 job;
1823 PJOB_INFO;
1825 typedef struct spool_r_getjob
1827 NEW_BUFFER *buffer;
1828 uint32 needed;
1829 WERROR status;
1831 SPOOL_R_GETJOB;
1833 typedef struct spool_q_replyopenprinter
1835 UNISTR2 string;
1836 uint32 printer;
1837 uint32 type;
1838 uint32 unknown0;
1839 uint32 unknown1;
1841 SPOOL_Q_REPLYOPENPRINTER;
1843 typedef struct spool_r_replyopenprinter
1845 POLICY_HND handle;
1846 WERROR status;
1848 SPOOL_R_REPLYOPENPRINTER;
1850 typedef struct spool_q_replycloseprinter
1852 POLICY_HND handle;
1854 SPOOL_Q_REPLYCLOSEPRINTER;
1856 typedef struct spool_r_replycloseprinter
1858 POLICY_HND handle;
1859 WERROR status;
1861 SPOOL_R_REPLYCLOSEPRINTER;
1863 typedef struct spool_q_rrpcn
1865 POLICY_HND handle;
1866 uint32 change_low;
1867 uint32 change_high;
1868 uint32 unknown0;
1869 uint32 unknown1;
1870 uint32 info_ptr;
1871 SPOOL_NOTIFY_INFO info;
1873 SPOOL_Q_REPLY_RRPCN;
1875 typedef struct spool_r_rrpcn
1877 uint32 unknown0;
1878 WERROR status;
1880 SPOOL_R_REPLY_RRPCN;
1882 typedef struct spool_q_getprinterdataex
1884 POLICY_HND handle;
1885 UNISTR2 keyname;
1886 UNISTR2 valuename;
1887 uint32 size;
1889 SPOOL_Q_GETPRINTERDATAEX;
1891 typedef struct spool_r_getprinterdataex
1893 uint32 type;
1894 uint32 size;
1895 uint8 *data;
1896 uint32 needed;
1897 WERROR status;
1899 SPOOL_R_GETPRINTERDATAEX;
1901 typedef struct spool_q_setprinterdataex
1903 POLICY_HND handle;
1904 UNISTR2 key;
1905 UNISTR2 value;
1906 uint32 type;
1907 uint32 max_len;
1908 uint8 *data;
1909 uint32 real_len;
1910 uint32 numeric_data;
1912 SPOOL_Q_SETPRINTERDATAEX;
1914 typedef struct spool_r_setprinterdataex
1916 WERROR status;
1918 SPOOL_R_SETPRINTERDATAEX;
1921 typedef struct spool_q_enumprinterkey
1923 POLICY_HND handle;
1924 UNISTR2 key;
1925 uint32 size;
1927 SPOOL_Q_ENUMPRINTERKEY;
1929 typedef struct spool_r_enumprinterkey
1931 BUFFER5 keys;
1932 uint32 needed; /* in bytes */
1933 WERROR status;
1935 SPOOL_R_ENUMPRINTERKEY;
1937 typedef struct printer_enum_values
1939 UNISTR valuename;
1940 uint32 value_len;
1941 uint32 type;
1942 uint8 *data;
1943 uint32 data_len;
1946 PRINTER_ENUM_VALUES;
1948 typedef struct printer_enum_values_ctr
1950 uint32 size;
1951 uint32 size_of_array;
1952 PRINTER_ENUM_VALUES *values;
1954 PRINTER_ENUM_VALUES_CTR;
1956 typedef struct spool_q_enumprinterdataex
1958 POLICY_HND handle;
1959 UNISTR2 key;
1960 uint32 size;
1962 SPOOL_Q_ENUMPRINTERDATAEX;
1964 typedef struct spool_r_enumprinterdataex
1966 PRINTER_ENUM_VALUES_CTR ctr;
1967 uint32 needed;
1968 uint32 returned;
1969 WERROR status;
1971 SPOOL_R_ENUMPRINTERDATAEX;
1973 typedef struct printprocessor_directory_1
1975 UNISTR name;
1977 PRINTPROCESSOR_DIRECTORY_1;
1979 typedef struct spool_q_getprintprocessordirectory
1981 UNISTR2 name;
1982 UNISTR2 environment;
1983 uint32 level;
1984 NEW_BUFFER *buffer;
1985 uint32 offered;
1987 SPOOL_Q_GETPRINTPROCESSORDIRECTORY;
1989 typedef struct spool_r_getprintprocessordirectory
1991 NEW_BUFFER *buffer;
1992 uint32 needed;
1993 WERROR status;
1995 SPOOL_R_GETPRINTPROCESSORDIRECTORY;
1997 #define PRINTER_DRIVER_VERSION 2
1998 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
2000 #endif /* _RPC_SPOOLSS_H */