2 Unix SMB/Netbios implementation.
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,
8 Copyright (C) Tim Potter 2001.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef _RPC_SPOOLSS_H /* _RPC_SPOOLSS_H */
26 #define _RPC_SPOOLSS_H
31 /* spoolss pipe: this are the calls which are not implemented ...
32 #define SPOOLSS_OPENPRINTER 0x01
33 #define SPOOLSS_GETPRINTERDRIVER 0x0b
34 #define SPOOLSS_READPRINTER 0x16
35 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
36 #define SPOOLSS_ADDPORT 0x25
37 #define SPOOLSS_CONFIGUREPORT 0x26
38 #define SPOOLSS_DELETEPORT 0x27
39 #define SPOOLSS_CREATEPRINTERIC 0x28
40 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
41 #define SPOOLSS_DELETEPRINTERIC 0x2a
42 #define SPOOLSS_ADDPRINTERCONNECTION 0x2b
43 #define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
44 #define SPOOLSS_PRINTERMESSAGEBOX 0x2d
45 #define SPOOLSS_ADDMONITOR 0x2e
46 #define SPOOLSS_DELETEMONITOR 0x2f
47 #define SPOOLSS_DELETEPRINTPROCESSOR 0x30
48 #define SPOOLSS_ADDPRINTPROVIDOR 0x31
49 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32
50 #define SPOOLSS_RESETPRINTER 0x34
51 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
52 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
53 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
54 #define SPOOLSS_ROUTERREPLYPRINTER 0x3b
55 #define SPOOLSS_ADDPORTEX 0x3d
56 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
57 #define SPOOLSS_SPOOLERINIT 0x3f
58 #define SPOOLSS_RESETPRINTEREX 0x40
59 #define SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION 0x42
60 #define SPOOLSS_DELETEPRINTERDATAEX 0x51
61 #define SPOOLSS_DELETEPRINTERDRIVEREX 0x54
62 #define SPOOLSS_ADDPRINTERDRIVEREX 0x59
65 /* those are implemented */
66 #define SPOOLSS_ENUMPRINTERS 0x00
67 #define SPOOLSS_SETJOB 0x02
68 #define SPOOLSS_GETJOB 0x03
69 #define SPOOLSS_ENUMJOBS 0x04
70 #define SPOOLSS_ADDPRINTER 0x05
71 #define SPOOLSS_DELETEPRINTER 0x06
72 #define SPOOLSS_SETPRINTER 0x07
73 #define SPOOLSS_GETPRINTER 0x08
74 #define SPOOLSS_ADDPRINTERDRIVER 0x09
75 #define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
76 #define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
77 #define SPOOLSS_DELETEPRINTERDRIVER 0x0d
78 #define SPOOLSS_ADDPRINTPROCESSOR 0x0e
79 #define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
80 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
81 #define SPOOLSS_STARTDOCPRINTER 0x11
82 #define SPOOLSS_STARTPAGEPRINTER 0x12
83 #define SPOOLSS_WRITEPRINTER 0x13
84 #define SPOOLSS_ENDPAGEPRINTER 0x14
85 #define SPOOLSS_ABORTPRINTER 0x15
86 #define SPOOLSS_ENDDOCPRINTER 0x17
87 #define SPOOLSS_ADDJOB 0x18
88 #define SPOOLSS_SCHEDULEJOB 0x19
89 #define SPOOLSS_GETPRINTERDATA 0x1a
90 #define SPOOLSS_SETPRINTERDATA 0x1b
91 #define SPOOLSS_CLOSEPRINTER 0x1d
92 #define SPOOLSS_ADDFORM 0x1e
93 #define SPOOLSS_DELETEFORM 0x1f
94 #define SPOOLSS_GETFORM 0x20
95 #define SPOOLSS_SETFORM 0x21
96 #define SPOOLSS_ENUMFORMS 0x22
97 #define SPOOLSS_ENUMPORTS 0x23
98 #define SPOOLSS_ENUMMONITORS 0x24
99 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
100 #define SPOOLSS_GETPRINTERDRIVER2 0x35
101 /* find close printer notification */
102 #define SPOOLSS_FCPN 0x38
103 #define SPOOLSS_REPLYOPENPRINTER 0x3a
104 #define SPOOLSS_REPLYCLOSEPRINTER 0x3c
105 /* remote find first printer change notifyEx */
106 #define SPOOLSS_RFFPCNEX 0x41
107 /*SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION */
108 #define SPOOLSS_RRPCN 0x42
109 /* remote find next printer change notifyEx */
110 #define SPOOLSS_RFNPCNEX 0x43
111 #define SPOOLSS_OPENPRINTEREX 0x45
112 #define SPOOLSS_ADDPRINTEREX 0x46
113 #define SPOOLSS_ENUMPRINTERDATA 0x48
114 #define SPOOLSS_DELETEPRINTERDATA 0x49
115 #define SPOOLSS_SETPRINTERDATAEX 0x4d
116 #define SPOOLSS_GETPRINTERDATAEX 0x4e
117 #define SPOOLSS_ENUMPRINTERDATAEX 0x4f
118 #define SPOOLSS_ENUMPRINTERKEY 0x50
121 #define PRINTER_CONTROL_UNPAUSE 0x00000000
122 #define PRINTER_CONTROL_PAUSE 0x00000001
123 #define PRINTER_CONTROL_RESUME 0x00000002
124 #define PRINTER_CONTROL_PURGE 0x00000003
125 #define PRINTER_CONTROL_SET_STATUS 0x00000004
127 #define PRINTER_STATUS_PAUSED 0x00000001
128 #define PRINTER_STATUS_ERROR 0x00000002
129 #define PRINTER_STATUS_PENDING_DELETION 0x00000004
130 #define PRINTER_STATUS_PAPER_JAM 0x00000008
132 #define PRINTER_STATUS_PAPER_OUT 0x00000010
133 #define PRINTER_STATUS_MANUAL_FEED 0x00000020
134 #define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
135 #define PRINTER_STATUS_OFFLINE 0x00000080
137 #define PRINTER_STATUS_IO_ACTIVE 0x00000100
138 #define PRINTER_STATUS_BUSY 0x00000200
139 #define PRINTER_STATUS_PRINTING 0x00000400
140 #define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
142 #define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
143 #define PRINTER_STATUS_WAITING 0x00002000
144 #define PRINTER_STATUS_PROCESSING 0x00004000
145 #define PRINTER_STATUS_INITIALIZING 0x00008000
147 #define PRINTER_STATUS_WARMING_UP 0x00010000
148 #define PRINTER_STATUS_TONER_LOW 0x00020000
149 #define PRINTER_STATUS_NO_TONER 0x00040000
150 #define PRINTER_STATUS_PAGE_PUNT 0x00080000
152 #define PRINTER_STATUS_USER_INTERVENTION 0x00100000
153 #define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
154 #define PRINTER_STATUS_DOOR_OPEN 0x00400000
155 #define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
157 #define PRINTER_STATUS_POWER_SAVE 0x01000000
159 #define SERVER_ACCESS_ADMINISTER 0x00000001
160 #define SERVER_ACCESS_ENUMERATE 0x00000002
161 #define PRINTER_ACCESS_ADMINISTER 0x00000004
162 #define PRINTER_ACCESS_USE 0x00000008
163 #define JOB_ACCESS_ADMINISTER 0x00000010
165 /* JOB status codes. */
167 #define JOB_STATUS_PAUSED 0x001
168 #define JOB_STATUS_ERROR 0x002
169 #define JOB_STATUS_DELETING 0x004
170 #define JOB_STATUS_SPOOLING 0x008
171 #define JOB_STATUS_PRINTING 0x010
172 #define JOB_STATUS_OFFLINE 0x020
173 #define JOB_STATUS_PAPEROUT 0x040
174 #define JOB_STATUS_PRINTED 0x080
175 #define JOB_STATUS_DELETED 0x100
176 #define JOB_STATUS_BLOCKED 0x200
177 #define JOB_STATUS_USER_INTERVENTION 0x400
179 /* ACE masks for the various print permissions */
181 #define PRINTER_ACE_FULL_CONTROL GENERIC_ALL_ACCESS
182 #define PRINTER_ACE_MANAGE_DOCUMENTS READ_CONTROL_ACCESS
183 #define PRINTER_ACE_PRINT \
184 (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
186 /* Access rights for print servers */
187 #define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
188 #define SERVER_READ STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
189 #define SERVER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
190 #define SERVER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE
192 /* Access rights for printers */
193 #define PRINTER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
194 #define PRINTER_READ STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE
195 #define PRINTER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE
196 #define PRINTER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE
198 /* Access rights for jobs */
199 #define JOB_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER
200 #define JOB_READ STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER
201 #define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
202 #define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
208 #define PRINTER_NOTIFY_TYPE 0x00
209 #define JOB_NOTIFY_TYPE 0x01
211 #define MAX_PRINTER_NOTIFY 26
212 #define MAX_JOB_NOTIFY 24
214 #define MAX_NOTIFY_TYPE_FOR_NOW 26
216 #define PRINTER_NOTIFY_SERVER_NAME 0x00
217 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
218 #define PRINTER_NOTIFY_SHARE_NAME 0x02
219 #define PRINTER_NOTIFY_PORT_NAME 0x03
220 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
221 #define PRINTER_NOTIFY_COMMENT 0x05
222 #define PRINTER_NOTIFY_LOCATION 0x06
223 #define PRINTER_NOTIFY_DEVMODE 0x07
224 #define PRINTER_NOTIFY_SEPFILE 0x08
225 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
226 #define PRINTER_NOTIFY_PARAMETERS 0x0A
227 #define PRINTER_NOTIFY_DATATYPE 0x0B
228 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
229 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
230 #define PRINTER_NOTIFY_PRIORITY 0x0E
231 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
232 #define PRINTER_NOTIFY_START_TIME 0x10
233 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
234 #define PRINTER_NOTIFY_STATUS 0x12
235 #define PRINTER_NOTIFY_STATUS_STRING 0x13
236 #define PRINTER_NOTIFY_CJOBS 0x14
237 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
238 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
239 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
240 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
241 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
243 #define JOB_NOTIFY_PRINTER_NAME 0x00
244 #define JOB_NOTIFY_MACHINE_NAME 0x01
245 #define JOB_NOTIFY_PORT_NAME 0x02
246 #define JOB_NOTIFY_USER_NAME 0x03
247 #define JOB_NOTIFY_NOTIFY_NAME 0x04
248 #define JOB_NOTIFY_DATATYPE 0x05
249 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
250 #define JOB_NOTIFY_PARAMETERS 0x07
251 #define JOB_NOTIFY_DRIVER_NAME 0x08
252 #define JOB_NOTIFY_DEVMODE 0x09
253 #define JOB_NOTIFY_STATUS 0x0A
254 #define JOB_NOTIFY_STATUS_STRING 0x0B
255 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
256 #define JOB_NOTIFY_DOCUMENT 0x0D
257 #define JOB_NOTIFY_PRIORITY 0x0E
258 #define JOB_NOTIFY_POSITION 0x0F
259 #define JOB_NOTIFY_SUBMITTED 0x10
260 #define JOB_NOTIFY_START_TIME 0x11
261 #define JOB_NOTIFY_UNTIL_TIME 0x12
262 #define JOB_NOTIFY_TIME 0x13
263 #define JOB_NOTIFY_TOTAL_PAGES 0x14
264 #define JOB_NOTIFY_PAGES_PRINTED 0x15
265 #define JOB_NOTIFY_TOTAL_BYTES 0x16
266 #define JOB_NOTIFY_BYTES_PRINTED 0x17
268 #define PRINTER_CHANGE_ADD_PRINTER 0x00000001
269 #define PRINTER_CHANGE_SET_PRINTER 0x00000002
270 #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
271 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
272 #define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \
273 PRINTER_CHANGE_SET_PRINTER | \
274 PRINTER_CHANGE_DELETE_PRINTER | \
275 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
277 #define PRINTER_CHANGE_ADD_JOB 0x00000100
278 #define PRINTER_CHANGE_SET_JOB 0x00000200
279 #define PRINTER_CHANGE_DELETE_JOB 0x00000400
280 #define PRINTER_CHANGE_WRITE_JOB 0x00000800
281 #define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \
282 PRINTER_CHANGE_SET_JOB | \
283 PRINTER_CHANGE_DELETE_JOB | \
284 PRINTER_CHANGE_WRITE_JOB )
286 #define PRINTER_CHANGE_ADD_FORM 0x00010000
287 #define PRINTER_CHANGE_SET_FORM 0x00020000
288 #define PRINTER_CHANGE_DELETE_FORM 0x00040000
289 #define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \
290 PRINTER_CHANGE_SET_FORM | \
291 PRINTER_CHANGE_DELETE_FORM )
293 #define PRINTER_CHANGE_ADD_PORT 0x00100000
294 #define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
295 #define PRINTER_CHANGE_DELETE_PORT 0x00400000
296 #define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \
297 PRINTER_CHANGE_CONFIGURE_PORT | \
298 PRINTER_CHANGE_DELETE_PORT )
300 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
301 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
302 #define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
303 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
305 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
306 #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
307 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
308 #define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
309 PRINTER_CHANGE_SET_PRINTER_DRIVER | \
310 PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
312 #define PRINTER_CHANGE_TIMEOUT 0x80000000
313 #define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \
314 PRINTER_CHANGE_FORM | \
315 PRINTER_CHANGE_PORT | \
316 PRINTER_CHANGE_PRINT_PROCESSOR | \
317 PRINTER_CHANGE_PRINTER_DRIVER )
319 #define PRINTER_NOTIFY_INFO_DISCARDED 0x1
322 * The printer attributes.
323 * I #defined all of them (grabbed form MSDN)
325 * ( SHARED | NETWORK | RAW_ONLY )
326 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
329 #define PRINTER_ATTRIBUTE_QUEUED 0x00000001
330 #define PRINTER_ATTRIBUTE_DIRECT 0x00000002
331 #define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
332 #define PRINTER_ATTRIBUTE_SHARED 0x00000008
334 #define PRINTER_ATTRIBUTE_NETWORK 0x00000010
335 #define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
336 #define PRINTER_ATTRIBUTE_LOCAL 0x00000040
337 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
339 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
340 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
341 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
342 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
344 #define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
346 #define NO_PRIORITY 0
347 #define MAX_PRIORITY 99
348 #define MIN_PRIORITY 1
349 #define DEF_PRIORITY 1
351 /* the flags of the query */
352 #define PRINTER_ENUM_DEFAULT 0x00000001
353 #define PRINTER_ENUM_LOCAL 0x00000002
354 #define PRINTER_ENUM_CONNECTIONS 0x00000004
355 #define PRINTER_ENUM_FAVORITE 0x00000004
356 #define PRINTER_ENUM_NAME 0x00000008
357 #define PRINTER_ENUM_REMOTE 0x00000010
358 #define PRINTER_ENUM_SHARED 0x00000020
359 #define PRINTER_ENUM_NETWORK 0x00000040
361 /* the flags of each printers */
362 #define PRINTER_ENUM_UNKNOWN_8 0x00000008
363 #define PRINTER_ENUM_EXPAND 0x00004000
364 #define PRINTER_ENUM_CONTAINER 0x00008000
365 #define PRINTER_ENUM_ICONMASK 0x00ff0000
366 #define PRINTER_ENUM_ICON1 0x00010000
367 #define PRINTER_ENUM_ICON2 0x00020000
368 #define PRINTER_ENUM_ICON3 0x00040000
369 #define PRINTER_ENUM_ICON4 0x00080000
370 #define PRINTER_ENUM_ICON5 0x00100000
371 #define PRINTER_ENUM_ICON6 0x00200000
372 #define PRINTER_ENUM_ICON7 0x00400000
373 #define PRINTER_ENUM_ICON8 0x00800000
375 /* this struct is undocumented */
376 /* thanks to the ddk ... */
377 typedef struct spool_user_1
379 uint32 size; /* length of user_name & client_name + 2? */
380 uint32 client_name_ptr;
381 uint32 user_name_ptr;
391 typedef struct spool_user_ctr_info
399 typedef struct devicemode
403 uint16 driverversion;
413 uint16 defaultsource;
426 uint32 displayfrequency;
434 uint32 panningheight;
439 typedef struct _devmode_cont
447 typedef struct _printer_default
451 DEVMODE_CTR devmode_cont;
452 uint32 access_required;
456 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
457 typedef struct spool_q_open_printer_ex
459 uint32 printername_ptr;
461 PRINTER_DEFAULT printer_default;
463 SPOOL_USER_CTR user_ctr;
465 SPOOL_Q_OPEN_PRINTER_EX;
467 /* SPOOL_R_OPEN_PRINTER_EX reply to an open printer */
468 typedef struct spool_r_open_printer_ex
470 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
473 SPOOL_R_OPEN_PRINTER_EX;
475 typedef struct spool_notify_option_type
484 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
486 SPOOL_NOTIFY_OPTION_TYPE;
488 typedef struct spool_notify_option_type_ctr
491 SPOOL_NOTIFY_OPTION_TYPE *type;
493 SPOOL_NOTIFY_OPTION_TYPE_CTR;
497 typedef struct s_header_type
509 typedef struct new_buffer
515 uint32 string_at_end;
519 typedef struct spool_q_getprinterdata
525 SPOOL_Q_GETPRINTERDATA;
527 typedef struct spool_r_getprinterdata
535 SPOOL_R_GETPRINTERDATA;
537 typedef struct spool_q_deleteprinterdata
542 SPOOL_Q_DELETEPRINTERDATA;
544 typedef struct spool_r_deleteprinterdata
548 SPOOL_R_DELETEPRINTERDATA;
550 typedef struct spool_q_closeprinter
554 SPOOL_Q_CLOSEPRINTER;
556 typedef struct spool_r_closeprinter
561 SPOOL_R_CLOSEPRINTER;
563 typedef struct spool_q_startpageprinter
567 SPOOL_Q_STARTPAGEPRINTER;
569 typedef struct spool_r_startpageprinter
573 SPOOL_R_STARTPAGEPRINTER;
575 typedef struct spool_q_endpageprinter
579 SPOOL_Q_ENDPAGEPRINTER;
581 typedef struct spool_r_endpageprinter
585 SPOOL_R_ENDPAGEPRINTER;
588 typedef struct spool_q_deleteprinterdriver
595 SPOOL_Q_DELETEPRINTERDRIVER;
597 typedef struct spool_r_deleteprinterdriver
601 SPOOL_R_DELETEPRINTERDRIVER;
604 typedef struct spool_doc_info_1
615 typedef struct spool_doc_info
618 DOC_INFO_1 doc_info_1;
622 typedef struct spool_doc_info_container
629 typedef struct spool_q_startdocprinter
632 DOC_INFO_CONTAINER doc_info_container;
634 SPOOL_Q_STARTDOCPRINTER;
636 typedef struct spool_r_startdocprinter
641 SPOOL_R_STARTDOCPRINTER;
643 typedef struct spool_q_enddocprinter
647 SPOOL_Q_ENDDOCPRINTER;
649 typedef struct spool_r_enddocprinter
653 SPOOL_R_ENDDOCPRINTER;
655 typedef struct spool_q_writeprinter
662 SPOOL_Q_WRITEPRINTER;
664 typedef struct spool_r_writeprinter
666 uint32 buffer_written;
669 SPOOL_R_WRITEPRINTER;
671 typedef struct spool_notify_option
676 uint32 option_type_ptr;
677 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
681 typedef struct spool_notify_info_data
700 } SPOOL_NOTIFY_INFO_DATA;
702 typedef struct spool_notify_info
707 SPOOL_NOTIFY_INFO_DATA *data;
711 /* If the struct name looks obscure, yes it is ! */
712 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
713 typedef struct spoolss_q_rffpcnex
718 uint32 localmachine_ptr;
719 UNISTR2 localmachine;
722 SPOOL_NOTIFY_OPTION *option;
726 typedef struct spool_r_rffpcnex
732 /* Remote Find Next Printer Change Notify Ex */
733 typedef struct spool_q_rfnpcnex
738 SPOOL_NOTIFY_OPTION *option;
742 typedef struct spool_r_rfnpcnex
745 SPOOL_NOTIFY_INFO info;
750 /* Find Close Printer Notify */
751 typedef struct spool_q_fcpn
757 typedef struct spool_r_fcpn
764 typedef struct printer_info_0
781 uint32 global_counter;
784 uint16 major_version;
785 uint16 build_version;
790 uint32 session_counter;
792 uint32 printer_errors;
813 typedef struct printer_info_1
822 typedef struct printer_info_2
833 UNISTR printprocessor;
839 uint32 defaultpriority;
848 typedef struct printer_info_3
855 typedef struct spool_q_enumprinters
858 uint32 servername_ptr;
864 SPOOL_Q_ENUMPRINTERS;
866 typedef struct printer_info_ctr_info
868 PRINTER_INFO_0 *printers_0;
869 PRINTER_INFO_1 *printers_1;
870 PRINTER_INFO_2 *printers_2;
871 PRINTER_INFO_3 *printers_3;
875 typedef struct spool_r_enumprinters
878 uint32 needed; /* bytes needed */
879 uint32 returned; /* number of printers */
882 SPOOL_R_ENUMPRINTERS;
885 typedef struct spool_q_getprinter
894 typedef struct printer_info_info
898 PRINTER_INFO_0 *info0;
899 PRINTER_INFO_1 *info1;
900 PRINTER_INFO_2 *info2;
905 typedef struct spool_r_getprinter
910 } SPOOL_R_GETPRINTER;
912 typedef struct driver_info_1
917 typedef struct driver_info_2
927 typedef struct driver_info_3
936 uint16 *dependentfiles;
938 UNISTR defaultdatatype;
942 typedef struct driver_info_6
951 uint16 *dependentfiles;
953 UNISTR defaultdatatype;
954 uint16* previousdrivernames;
957 uint32 driver_version_low;
958 uint32 driver_version_high;
966 typedef struct driver_info_info
968 DRIVER_INFO_1 *info1;
969 DRIVER_INFO_2 *info2;
970 DRIVER_INFO_3 *info3;
971 DRIVER_INFO_6 *info6;
975 typedef struct spool_q_getprinterdriver2
978 uint32 architecture_ptr;
979 UNISTR2 architecture;
983 uint32 clientmajorversion;
984 uint32 clientminorversion;
986 SPOOL_Q_GETPRINTERDRIVER2;
988 typedef struct spool_r_getprinterdriver2
992 uint32 servermajorversion;
993 uint32 serverminorversion;
996 SPOOL_R_GETPRINTERDRIVER2;
999 typedef struct add_jobinfo_1
1007 typedef struct spool_q_addjob
1016 typedef struct spool_r_addjob
1025 * I'm really wondering how many different time formats
1026 * I will have to cope with
1028 * JFM, 09/13/98 In a mad mood ;-(
1030 typedef struct systemtime
1039 uint16 milliseconds;
1043 typedef struct s_job_info_1
1056 uint32 pagesprinted;
1057 SYSTEMTIME submitted;
1061 typedef struct s_job_info_2
1070 UNISTR printprocessor;
1073 DEVICEMODE *devmode;
1075 /* SEC_DESC sec_desc;*/
1083 SYSTEMTIME submitted;
1085 uint32 pagesprinted;
1089 typedef struct spool_q_enumjobs
1100 typedef struct job_info_ctr_info
1104 JOB_INFO_1 **job_info_1;
1105 JOB_INFO_2 **job_info_2;
1111 typedef struct spool_r_enumjobs
1120 typedef struct spool_q_schedulejob
1125 SPOOL_Q_SCHEDULEJOB;
1127 typedef struct spool_r_schedulejob
1131 SPOOL_R_SCHEDULEJOB;
1133 typedef struct s_port_info_1
1139 typedef struct s_port_info_2
1142 UNISTR monitor_name;
1149 typedef struct spool_q_enumports
1159 typedef struct port_info_ctr_info
1163 PORT_INFO_1 *info_1;
1164 PORT_INFO_2 *info_2;
1171 typedef struct spool_r_enumports
1174 uint32 needed; /* bytes needed */
1175 uint32 returned; /* number of printers */
1180 #define JOB_CONTROL_PAUSE 1
1181 #define JOB_CONTROL_RESUME 2
1182 #define JOB_CONTROL_CANCEL 3
1183 #define JOB_CONTROL_RESTART 4
1184 #define JOB_CONTROL_DELETE 5
1186 typedef struct job_info_info
1190 JOB_INFO_1 job_info_1;
1191 JOB_INFO_2 job_info_2;
1198 typedef struct spool_q_setjob
1209 typedef struct spool_r_setjob
1216 typedef struct spool_q_enumprinterdrivers
1220 uint32 environment_ptr;
1221 UNISTR2 environment;
1226 SPOOL_Q_ENUMPRINTERDRIVERS;
1228 typedef struct spool_r_enumprinterdrivers
1235 SPOOL_R_ENUMPRINTERDRIVERS;
1237 typedef struct spool_form_1
1250 typedef struct spool_q_enumforms
1259 typedef struct spool_r_enumforms
1268 typedef struct spool_q_getform
1278 typedef struct spool_r_getform
1286 typedef struct spool_printer_info_level_1
1289 uint32 description_ptr;
1292 UNISTR2 description;
1295 } SPOOL_PRINTER_INFO_LEVEL_1;
1297 typedef struct spool_printer_info_level_2
1299 uint32 servername_ptr;
1300 uint32 printername_ptr;
1301 uint32 sharename_ptr;
1302 uint32 portname_ptr;
1303 uint32 drivername_ptr;
1305 uint32 location_ptr;
1308 uint32 printprocessor_ptr;
1309 uint32 datatype_ptr;
1310 uint32 parameters_ptr;
1314 uint32 default_priority;
1321 UNISTR2 printername;
1328 UNISTR2 printprocessor;
1331 SEC_DESC_BUF *secdesc;
1333 SPOOL_PRINTER_INFO_LEVEL_2;
1335 typedef struct spool_printer_info_level_3
1339 SPOOL_PRINTER_INFO_LEVEL_3;
1341 typedef struct spool_printer_info_level
1345 SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
1346 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1347 SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
1349 SPOOL_PRINTER_INFO_LEVEL;
1351 typedef struct spool_printer_driver_info_level_3
1355 uint32 environment_ptr;
1356 uint32 driverpath_ptr;
1357 uint32 datafile_ptr;
1358 uint32 configfile_ptr;
1359 uint32 helpfile_ptr;
1360 uint32 monitorname_ptr;
1361 uint32 defaultdatatype_ptr;
1362 uint32 dependentfilessize;
1363 uint32 dependentfiles_ptr;
1366 UNISTR2 environment;
1371 UNISTR2 monitorname;
1372 UNISTR2 defaultdatatype;
1373 BUFFER5 dependentfiles;
1376 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1378 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
1382 uint32 environment_ptr;
1383 uint32 driverpath_ptr;
1384 uint32 datafile_ptr;
1385 uint32 configfile_ptr;
1386 uint32 helpfile_ptr;
1387 uint32 monitorname_ptr;
1388 uint32 defaultdatatype_ptr;
1389 uint32 dependentfiles_len;
1390 uint32 dependentfiles_ptr;
1391 uint32 previousnames_len;
1392 uint32 previousnames_ptr;
1394 UINT64_S driverversion;
1398 uint32 hardwareid_ptr;
1399 uint32 provider_ptr;
1401 UNISTR2 environment;
1406 UNISTR2 monitorname;
1407 UNISTR2 defaultdatatype;
1408 BUFFER5 dependentfiles;
1409 BUFFER5 previousnames;
1414 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1417 typedef struct spool_printer_driver_info_level
1421 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1422 SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
1424 SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1427 /* this struct is undocumented */
1428 /* thanks to the ddk ... */
1429 typedef struct spool_user_level_1
1432 uint32 client_name_ptr;
1433 uint32 user_name_ptr;
1438 UNISTR2 client_name;
1443 typedef struct spool_user_level
1445 SPOOL_USER_LEVEL_1 *user_level_1;
1449 typedef struct spool_q_setprinter
1453 SPOOL_PRINTER_INFO_LEVEL info;
1454 SEC_DESC_BUF *secdesc_ctr;
1455 DEVMODE_CTR devmode_ctr;
1462 typedef struct spool_r_setprinter
1468 typedef struct spool_q_addprinter
1470 UNISTR2 server_name;
1472 SPOOL_PRINTER_INFO_LEVEL info;
1478 SPOOL_USER_LEVEL user;
1482 typedef struct spool_r_addprinter
1488 typedef struct spool_q_deleteprinter
1492 SPOOL_Q_DELETEPRINTER;
1494 typedef struct spool_r_deleteprinter
1499 SPOOL_R_DELETEPRINTER;
1501 typedef struct spool_q_abortprinter
1505 SPOOL_Q_ABORTPRINTER;
1507 typedef struct spool_r_abortprinter
1511 SPOOL_R_ABORTPRINTER;
1514 typedef struct spool_q_addprinterex
1516 uint32 server_name_ptr;
1517 UNISTR2 server_name;
1519 SPOOL_PRINTER_INFO_LEVEL info;
1525 SPOOL_USER_CTR user_ctr;
1527 SPOOL_Q_ADDPRINTEREX;
1529 typedef struct spool_r_addprinterex
1534 SPOOL_R_ADDPRINTEREX;
1537 typedef struct spool_q_addprinterdriver
1539 uint32 server_name_ptr;
1540 UNISTR2 server_name;
1542 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1544 SPOOL_Q_ADDPRINTERDRIVER;
1546 typedef struct spool_r_addprinterdriver
1550 SPOOL_R_ADDPRINTERDRIVER;
1553 typedef struct driver_directory_1
1559 typedef struct driver_info_ctr_info
1561 DRIVER_DIRECTORY_1 *info1;
1563 DRIVER_DIRECTORY_CTR;
1565 typedef struct spool_q_getprinterdriverdirectory
1569 uint32 environment_ptr;
1570 UNISTR2 environment;
1575 SPOOL_Q_GETPRINTERDRIVERDIR;
1577 typedef struct spool_r_getprinterdriverdirectory
1583 SPOOL_R_GETPRINTERDRIVERDIR;
1585 typedef struct spool_q_addprintprocessor
1589 UNISTR2 environment;
1593 SPOOL_Q_ADDPRINTPROCESSOR;
1595 typedef struct spool_r_addprintprocessor
1599 SPOOL_R_ADDPRINTPROCESSOR;
1602 typedef struct spool_q_enumprintprocessors
1606 uint32 environment_ptr;
1607 UNISTR2 environment;
1612 SPOOL_Q_ENUMPRINTPROCESSORS;
1614 typedef struct printprocessor_1
1620 typedef struct spool_r_enumprintprocessors
1627 SPOOL_R_ENUMPRINTPROCESSORS;
1629 typedef struct spool_q_enumprintprocdatatypes
1633 uint32 processor_ptr;
1639 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1641 typedef struct ppdatatype_1
1645 PRINTPROCDATATYPE_1;
1647 typedef struct spool_r_enumprintprocdatatypes
1654 SPOOL_R_ENUMPRINTPROCDATATYPES;
1656 typedef struct printmonitor_1
1662 typedef struct printmonitor_2
1670 typedef struct spool_q_enumprintmonitors
1678 SPOOL_Q_ENUMPRINTMONITORS;
1680 typedef struct spool_r_enumprintmonitors
1687 SPOOL_R_ENUMPRINTMONITORS;
1690 typedef struct spool_q_enumprinterdata
1697 SPOOL_Q_ENUMPRINTERDATA;
1699 typedef struct spool_r_enumprinterdata
1703 uint32 realvaluesize;
1707 uint32 realdatasize;
1710 SPOOL_R_ENUMPRINTERDATA;
1712 typedef struct spool_q_setprinterdata
1720 uint32 numeric_data;
1722 SPOOL_Q_SETPRINTERDATA;
1724 typedef struct spool_r_setprinterdata
1728 SPOOL_R_SETPRINTERDATA;
1730 typedef struct _form
1744 typedef struct spool_q_addform
1753 typedef struct spool_r_addform
1759 typedef struct spool_q_setform
1769 typedef struct spool_r_setform
1775 typedef struct spool_q_deleteform
1782 typedef struct spool_r_deleteform
1788 typedef struct spool_q_getjob
1798 typedef struct pjob_info_info
1802 JOB_INFO_1 *job_info_1;
1803 JOB_INFO_2 *job_info_2;
1811 typedef struct spool_r_getjob
1819 typedef struct spool_q_replyopenprinter
1827 SPOOL_Q_REPLYOPENPRINTER;
1829 typedef struct spool_r_replyopenprinter
1834 SPOOL_R_REPLYOPENPRINTER;
1836 typedef struct spool_q_replycloseprinter
1840 SPOOL_Q_REPLYCLOSEPRINTER;
1842 typedef struct spool_r_replycloseprinter
1847 SPOOL_R_REPLYCLOSEPRINTER;
1849 typedef struct spool_q_rrpcn
1857 SPOOL_NOTIFY_INFO info;
1859 SPOOL_Q_REPLY_RRPCN;
1861 typedef struct spool_r_rrpcn
1866 SPOOL_R_REPLY_RRPCN;
1868 typedef struct spool_q_getprinterdataex
1875 SPOOL_Q_GETPRINTERDATAEX;
1877 typedef struct spool_r_getprinterdataex
1885 SPOOL_R_GETPRINTERDATAEX;
1887 typedef struct spool_q_setprinterdataex
1896 uint32 numeric_data;
1898 SPOOL_Q_SETPRINTERDATAEX;
1900 typedef struct spool_r_setprinterdataex
1904 SPOOL_R_SETPRINTERDATAEX;
1907 typedef struct spool_q_enumprinterkey
1913 SPOOL_Q_ENUMPRINTERKEY;
1915 typedef struct spool_r_enumprinterkey
1918 uint32 needed; /* in bytes */
1921 SPOOL_R_ENUMPRINTERKEY;
1923 typedef struct printer_enum_values
1932 PRINTER_ENUM_VALUES;
1934 typedef struct printer_enum_values_ctr
1937 uint32 size_of_array;
1938 PRINTER_ENUM_VALUES *values;
1940 PRINTER_ENUM_VALUES_CTR;
1942 typedef struct spool_q_enumprinterdataex
1948 SPOOL_Q_ENUMPRINTERDATAEX;
1950 typedef struct spool_r_enumprinterdataex
1952 PRINTER_ENUM_VALUES_CTR ctr;
1957 SPOOL_R_ENUMPRINTERDATAEX;
1959 typedef struct printprocessor_directory_1
1963 PRINTPROCESSOR_DIRECTORY_1;
1965 typedef struct spool_q_getprintprocessordirectory
1968 UNISTR2 environment;
1973 SPOOL_Q_GETPRINTPROCESSORDIRECTORY;
1975 typedef struct spool_r_getprintprocessordirectory
1981 SPOOL_R_GETPRINTPROCESSORDIRECTORY;
1983 #define PRINTER_DRIVER_VERSION 2
1984 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
1986 #endif /* _RPC_SPOOLSS_H */