2 Unix SMB/CIFS implementation.
3 SMB parameters and setup
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) Tim Potter 2001.
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
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
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)
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;
390 typedef struct spool_user_ctr_info
398 typedef struct devicemode
402 uint16 driverversion;
412 uint16 defaultsource;
425 uint32 displayfrequency;
433 uint32 panningheight;
438 typedef struct _devmode_cont
446 typedef struct _printer_default
450 DEVMODE_CTR devmode_cont;
451 uint32 access_required;
455 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
456 typedef struct spool_q_open_printer_ex
458 uint32 printername_ptr;
460 PRINTER_DEFAULT printer_default;
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) */
472 SPOOL_R_OPEN_PRINTER_EX;
474 typedef struct spool_notify_option_type
483 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
485 SPOOL_NOTIFY_OPTION_TYPE;
487 typedef struct spool_notify_option_type_ctr
490 SPOOL_NOTIFY_OPTION_TYPE *type;
492 SPOOL_NOTIFY_OPTION_TYPE_CTR;
496 typedef struct s_header_type
508 typedef struct new_buffer
514 uint32 string_at_end;
518 typedef struct spool_q_getprinterdata
524 SPOOL_Q_GETPRINTERDATA;
526 typedef struct spool_r_getprinterdata
534 SPOOL_R_GETPRINTERDATA;
536 typedef struct spool_q_deleteprinterdata
541 SPOOL_Q_DELETEPRINTERDATA;
543 typedef struct spool_r_deleteprinterdata
547 SPOOL_R_DELETEPRINTERDATA;
549 typedef struct spool_q_closeprinter
553 SPOOL_Q_CLOSEPRINTER;
555 typedef struct spool_r_closeprinter
560 SPOOL_R_CLOSEPRINTER;
562 typedef struct spool_q_startpageprinter
566 SPOOL_Q_STARTPAGEPRINTER;
568 typedef struct spool_r_startpageprinter
572 SPOOL_R_STARTPAGEPRINTER;
574 typedef struct spool_q_endpageprinter
578 SPOOL_Q_ENDPAGEPRINTER;
580 typedef struct spool_r_endpageprinter
584 SPOOL_R_ENDPAGEPRINTER;
587 typedef struct spool_q_deleteprinterdriver
594 SPOOL_Q_DELETEPRINTERDRIVER;
596 typedef struct spool_r_deleteprinterdriver
600 SPOOL_R_DELETEPRINTERDRIVER;
603 typedef struct spool_doc_info_1
614 typedef struct spool_doc_info
617 DOC_INFO_1 doc_info_1;
621 typedef struct spool_doc_info_container
628 typedef struct spool_q_startdocprinter
631 DOC_INFO_CONTAINER doc_info_container;
633 SPOOL_Q_STARTDOCPRINTER;
635 typedef struct spool_r_startdocprinter
640 SPOOL_R_STARTDOCPRINTER;
642 typedef struct spool_q_enddocprinter
646 SPOOL_Q_ENDDOCPRINTER;
648 typedef struct spool_r_enddocprinter
652 SPOOL_R_ENDDOCPRINTER;
654 typedef struct spool_q_writeprinter
661 SPOOL_Q_WRITEPRINTER;
663 typedef struct spool_r_writeprinter
665 uint32 buffer_written;
668 SPOOL_R_WRITEPRINTER;
670 typedef struct spool_notify_option
675 uint32 option_type_ptr;
676 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
680 typedef struct spool_notify_info_data
699 } SPOOL_NOTIFY_INFO_DATA;
701 typedef struct spool_notify_info
706 SPOOL_NOTIFY_INFO_DATA *data;
710 /* If the struct name looks obscure, yes it is ! */
711 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
712 typedef struct spoolss_q_rffpcnex
717 uint32 localmachine_ptr;
718 UNISTR2 localmachine;
721 SPOOL_NOTIFY_OPTION *option;
725 typedef struct spool_r_rffpcnex
731 /* Remote Find Next Printer Change Notify Ex */
732 typedef struct spool_q_rfnpcnex
737 SPOOL_NOTIFY_OPTION *option;
741 typedef struct spool_r_rfnpcnex
744 SPOOL_NOTIFY_INFO info;
749 /* Find Close Printer Notify */
750 typedef struct spool_q_fcpn
756 typedef struct spool_r_fcpn
763 typedef struct printer_info_0
780 uint32 global_counter;
783 uint16 major_version;
784 uint16 build_version;
789 uint32 session_counter;
791 uint32 printer_errors;
812 typedef struct printer_info_1
821 typedef struct printer_info_2
832 UNISTR printprocessor;
838 uint32 defaultpriority;
847 typedef struct printer_info_3
854 typedef struct printer_info_4
862 typedef struct printer_info_5
867 uint32 device_not_selected_timeout;
868 uint32 transmission_retry_timeout;
872 typedef struct spool_q_enumprinters
875 uint32 servername_ptr;
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;
894 typedef struct spool_r_enumprinters
897 uint32 needed; /* bytes needed */
898 uint32 returned; /* number of printers */
901 SPOOL_R_ENUMPRINTERS;
904 typedef struct spool_q_getprinter
913 typedef struct printer_info_info
917 PRINTER_INFO_0 *info0;
918 PRINTER_INFO_1 *info1;
919 PRINTER_INFO_2 *info2;
924 typedef struct spool_r_getprinter
929 } SPOOL_R_GETPRINTER;
931 typedef struct driver_info_1
936 typedef struct driver_info_2
946 typedef struct driver_info_3
955 uint16 *dependentfiles;
957 UNISTR defaultdatatype;
961 typedef struct driver_info_6
970 uint16 *dependentfiles;
972 UNISTR defaultdatatype;
973 uint16* previousdrivernames;
976 uint32 driver_version_low;
977 uint32 driver_version_high;
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;
994 typedef struct spool_q_getprinterdriver2
997 uint32 architecture_ptr;
998 UNISTR2 architecture;
1002 uint32 clientmajorversion;
1003 uint32 clientminorversion;
1005 SPOOL_Q_GETPRINTERDRIVER2;
1007 typedef struct spool_r_getprinterdriver2
1011 uint32 servermajorversion;
1012 uint32 serverminorversion;
1015 SPOOL_R_GETPRINTERDRIVER2;
1018 typedef struct add_jobinfo_1
1026 typedef struct spool_q_addjob
1035 typedef struct 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
1058 uint16 milliseconds;
1062 typedef struct s_job_info_1
1075 uint32 pagesprinted;
1076 SYSTEMTIME submitted;
1080 typedef struct s_job_info_2
1089 UNISTR printprocessor;
1092 DEVICEMODE *devmode;
1094 /* SEC_DESC sec_desc;*/
1102 SYSTEMTIME submitted;
1104 uint32 pagesprinted;
1108 typedef struct spool_q_enumjobs
1119 typedef struct job_info_ctr_info
1123 JOB_INFO_1 **job_info_1;
1124 JOB_INFO_2 **job_info_2;
1130 typedef struct spool_r_enumjobs
1139 typedef struct spool_q_schedulejob
1144 SPOOL_Q_SCHEDULEJOB;
1146 typedef struct spool_r_schedulejob
1150 SPOOL_R_SCHEDULEJOB;
1152 typedef struct s_port_info_1
1158 typedef struct s_port_info_2
1161 UNISTR monitor_name;
1168 typedef struct spool_q_enumports
1178 typedef struct port_info_ctr_info
1182 PORT_INFO_1 *info_1;
1183 PORT_INFO_2 *info_2;
1190 typedef struct spool_r_enumports
1193 uint32 needed; /* bytes needed */
1194 uint32 returned; /* number of printers */
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
1209 JOB_INFO_1 job_info_1;
1210 JOB_INFO_2 job_info_2;
1217 typedef struct spool_q_setjob
1228 typedef struct spool_r_setjob
1235 typedef struct spool_q_enumprinterdrivers
1239 uint32 environment_ptr;
1240 UNISTR2 environment;
1245 SPOOL_Q_ENUMPRINTERDRIVERS;
1247 typedef struct spool_r_enumprinterdrivers
1254 SPOOL_R_ENUMPRINTERDRIVERS;
1256 typedef struct spool_form_1
1269 typedef struct spool_q_enumforms
1278 typedef struct spool_r_enumforms
1287 typedef struct spool_q_getform
1297 typedef struct spool_r_getform
1305 typedef struct spool_printer_info_level_1
1308 uint32 description_ptr;
1311 UNISTR2 description;
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;
1324 uint32 location_ptr;
1327 uint32 printprocessor_ptr;
1328 uint32 datatype_ptr;
1329 uint32 parameters_ptr;
1333 uint32 default_priority;
1340 UNISTR2 printername;
1347 UNISTR2 printprocessor;
1351 SPOOL_PRINTER_INFO_LEVEL_2;
1353 typedef struct spool_printer_info_level_3
1357 SPOOL_PRINTER_INFO_LEVEL_3;
1359 typedef struct spool_printer_info_level
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
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;
1384 UNISTR2 environment;
1389 UNISTR2 monitorname;
1390 UNISTR2 defaultdatatype;
1391 BUFFER5 dependentfiles;
1394 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1396 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
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;
1412 UINT64_S driverversion;
1416 uint32 hardwareid_ptr;
1417 uint32 provider_ptr;
1419 UNISTR2 environment;
1424 UNISTR2 monitorname;
1425 UNISTR2 defaultdatatype;
1426 BUFFER5 dependentfiles;
1427 BUFFER5 previousnames;
1432 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1435 typedef struct spool_printer_driver_info_level
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
1450 uint32 client_name_ptr;
1451 uint32 user_name_ptr;
1456 UNISTR2 client_name;
1461 typedef struct spool_user_level
1463 SPOOL_USER_LEVEL_1 *user_level_1;
1467 typedef struct spool_q_setprinter
1471 SPOOL_PRINTER_INFO_LEVEL info;
1472 SEC_DESC_BUF *secdesc_ctr;
1473 DEVMODE_CTR devmode_ctr;
1480 typedef struct spool_r_setprinter
1486 typedef struct spool_q_addprinter
1488 UNISTR2 server_name;
1490 SPOOL_PRINTER_INFO_LEVEL info;
1491 DEVMODE_CTR devmode_ctr;
1492 SEC_DESC_BUF *secdesc_ctr;
1494 SPOOL_USER_LEVEL user;
1498 typedef struct spool_r_addprinter
1504 typedef struct spool_q_deleteprinter
1508 SPOOL_Q_DELETEPRINTER;
1510 typedef struct spool_r_deleteprinter
1515 SPOOL_R_DELETEPRINTER;
1517 typedef struct spool_q_abortprinter
1521 SPOOL_Q_ABORTPRINTER;
1523 typedef struct spool_r_abortprinter
1527 SPOOL_R_ABORTPRINTER;
1530 typedef struct spool_q_addprinterex
1532 uint32 server_name_ptr;
1533 UNISTR2 server_name;
1535 SPOOL_PRINTER_INFO_LEVEL info;
1536 DEVMODE_CTR devmode_ctr;
1537 SEC_DESC_BUF *secdesc_ctr;
1539 SPOOL_USER_CTR user_ctr;
1541 SPOOL_Q_ADDPRINTEREX;
1543 typedef struct spool_r_addprinterex
1548 SPOOL_R_ADDPRINTEREX;
1551 typedef struct spool_q_addprinterdriver
1553 uint32 server_name_ptr;
1554 UNISTR2 server_name;
1556 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1558 SPOOL_Q_ADDPRINTERDRIVER;
1560 typedef struct spool_r_addprinterdriver
1564 SPOOL_R_ADDPRINTERDRIVER;
1567 typedef struct 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
1583 uint32 environment_ptr;
1584 UNISTR2 environment;
1589 SPOOL_Q_GETPRINTERDRIVERDIR;
1591 typedef struct spool_r_getprinterdriverdirectory
1597 SPOOL_R_GETPRINTERDRIVERDIR;
1599 typedef struct spool_q_addprintprocessor
1603 UNISTR2 environment;
1607 SPOOL_Q_ADDPRINTPROCESSOR;
1609 typedef struct spool_r_addprintprocessor
1613 SPOOL_R_ADDPRINTPROCESSOR;
1616 typedef struct spool_q_enumprintprocessors
1620 uint32 environment_ptr;
1621 UNISTR2 environment;
1626 SPOOL_Q_ENUMPRINTPROCESSORS;
1628 typedef struct printprocessor_1
1634 typedef struct spool_r_enumprintprocessors
1641 SPOOL_R_ENUMPRINTPROCESSORS;
1643 typedef struct spool_q_enumprintprocdatatypes
1647 uint32 processor_ptr;
1653 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1655 typedef struct ppdatatype_1
1659 PRINTPROCDATATYPE_1;
1661 typedef struct spool_r_enumprintprocdatatypes
1668 SPOOL_R_ENUMPRINTPROCDATATYPES;
1670 typedef struct printmonitor_1
1676 typedef struct printmonitor_2
1684 typedef struct spool_q_enumprintmonitors
1692 SPOOL_Q_ENUMPRINTMONITORS;
1694 typedef struct spool_r_enumprintmonitors
1701 SPOOL_R_ENUMPRINTMONITORS;
1704 typedef struct spool_q_enumprinterdata
1711 SPOOL_Q_ENUMPRINTERDATA;
1713 typedef struct spool_r_enumprinterdata
1717 uint32 realvaluesize;
1721 uint32 realdatasize;
1724 SPOOL_R_ENUMPRINTERDATA;
1726 typedef struct spool_q_setprinterdata
1734 uint32 numeric_data;
1736 SPOOL_Q_SETPRINTERDATA;
1738 typedef struct spool_r_setprinterdata
1742 SPOOL_R_SETPRINTERDATA;
1744 typedef struct _form
1758 typedef struct spool_q_addform
1767 typedef struct spool_r_addform
1773 typedef struct spool_q_setform
1783 typedef struct spool_r_setform
1789 typedef struct spool_q_deleteform
1796 typedef struct spool_r_deleteform
1802 typedef struct spool_q_getjob
1812 typedef struct pjob_info_info
1816 JOB_INFO_1 *job_info_1;
1817 JOB_INFO_2 *job_info_2;
1825 typedef struct spool_r_getjob
1833 typedef struct spool_q_replyopenprinter
1841 SPOOL_Q_REPLYOPENPRINTER;
1843 typedef struct spool_r_replyopenprinter
1848 SPOOL_R_REPLYOPENPRINTER;
1850 typedef struct spool_q_replycloseprinter
1854 SPOOL_Q_REPLYCLOSEPRINTER;
1856 typedef struct spool_r_replycloseprinter
1861 SPOOL_R_REPLYCLOSEPRINTER;
1863 typedef struct spool_q_rrpcn
1871 SPOOL_NOTIFY_INFO info;
1873 SPOOL_Q_REPLY_RRPCN;
1875 typedef struct spool_r_rrpcn
1880 SPOOL_R_REPLY_RRPCN;
1882 typedef struct spool_q_getprinterdataex
1889 SPOOL_Q_GETPRINTERDATAEX;
1891 typedef struct spool_r_getprinterdataex
1899 SPOOL_R_GETPRINTERDATAEX;
1901 typedef struct spool_q_setprinterdataex
1910 uint32 numeric_data;
1912 SPOOL_Q_SETPRINTERDATAEX;
1914 typedef struct spool_r_setprinterdataex
1918 SPOOL_R_SETPRINTERDATAEX;
1921 typedef struct spool_q_enumprinterkey
1927 SPOOL_Q_ENUMPRINTERKEY;
1929 typedef struct spool_r_enumprinterkey
1932 uint32 needed; /* in bytes */
1935 SPOOL_R_ENUMPRINTERKEY;
1937 typedef struct printer_enum_values
1946 PRINTER_ENUM_VALUES;
1948 typedef struct printer_enum_values_ctr
1951 uint32 size_of_array;
1952 PRINTER_ENUM_VALUES *values;
1954 PRINTER_ENUM_VALUES_CTR;
1956 typedef struct spool_q_enumprinterdataex
1962 SPOOL_Q_ENUMPRINTERDATAEX;
1964 typedef struct spool_r_enumprinterdataex
1966 PRINTER_ENUM_VALUES_CTR ctr;
1971 SPOOL_R_ENUMPRINTERDATAEX;
1973 typedef struct printprocessor_directory_1
1977 PRINTPROCESSOR_DIRECTORY_1;
1979 typedef struct spool_q_getprintprocessordirectory
1982 UNISTR2 environment;
1987 SPOOL_Q_GETPRINTPROCESSORDIRECTORY;
1989 typedef struct spool_r_getprintprocessordirectory
1995 SPOOL_R_GETPRINTPROCESSORDIRECTORY;
1997 #define PRINTER_DRIVER_VERSION 2
1998 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
2000 #endif /* _RPC_SPOOLSS_H */