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.
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_DELETEPRINTERDRIVER 0x0d
34 #define SPOOLSS_ADDPRINTPROCESSOR 0x0e
35 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
36 #define SPOOLSS_READPRINTER 0x16
37 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
38 #define SPOOLSS_ADDPORT 0x25
39 #define SPOOLSS_CONFIGUREPORT 0x26
40 #define SPOOLSS_DELETEPORT 0x27
41 #define SPOOLSS_CREATEPRINTERIC 0x28
42 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
43 #define SPOOLSS_DELETEPRINTERIC 0x2a
44 #define SPOOLSS_ADDPRINTERCONNECTION 0x2b
45 #define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
46 #define SPOOLSS_PRINTERMESSAGEBOX 0x2d
47 #define SPOOLSS_ADDMONITOR 0x2e
48 #define SPOOLSS_DELETEMONITOR 0x2f
49 #define SPOOLSS_DELETEPRINTPROCESSOR 0x30
50 #define SPOOLSS_ADDPRINTPROVIDOR 0x31
51 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32
52 #define SPOOLSS_RESETPRINTER 0x34
53 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
54 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
55 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
56 #define SPOOLSS_ROUTERREPLYPRINTER 0x3b
57 #define SPOOLSS_ADDPORTEX 0x3d
58 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
59 #define SPOOLSS_SPOOLERINIT 0x3f
60 #define SPOOLSS_RESETPRINTEREX 0x40
61 #define SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION 0x42
62 #define SPOOLSS_GETPRINTERDATAEX 0x4e
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_ENUMPRINTPROCESSORS 0x0f
78 #define SPOOLSS_STARTDOCPRINTER 0x11
79 #define SPOOLSS_STARTPAGEPRINTER 0x12
80 #define SPOOLSS_WRITEPRINTER 0x13
81 #define SPOOLSS_ENDPAGEPRINTER 0x14
82 #define SPOOLSS_ABORTPRINTER 0x15
83 #define SPOOLSS_ENDDOCPRINTER 0x17
84 #define SPOOLSS_ADDJOB 0x18
85 #define SPOOLSS_SCHEDULEJOB 0x19
86 #define SPOOLSS_GETPRINTERDATA 0x1a
87 #define SPOOLSS_SETPRINTERDATA 0x1b
88 #define SPOOLSS_CLOSEPRINTER 0x1d
89 #define SPOOLSS_ADDFORM 0x1e
90 #define SPOOLSS_DELETEFORM 0x1f
91 #define SPOOLSS_GETFORM 0x20
92 #define SPOOLSS_SETFORM 0x21
93 #define SPOOLSS_ENUMFORMS 0x22
94 #define SPOOLSS_ENUMPORTS 0x23
95 #define SPOOLSS_ENUMMONITORS 0x24
96 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33
97 #define SPOOLSS_GETPRINTERDRIVER2 0x35
98 /* find close printer notification */
99 #define SPOOLSS_FCPN 0x38
100 #define SPOOLSS_REPLYOPENPRINTER 0x3a
101 #define SPOOLSS_REPLYCLOSEPRINTER 0x3c
102 /* remote find first printer change notifyEx */
103 #define SPOOLSS_RFFPCNEX 0x41
104 /*SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION */
105 #define SPOOLSS_RRPCN 0x42
106 /* remote find next printer change notifyEx */
107 #define SPOOLSS_RFNPCNEX 0x43
108 #define SPOOLSS_OPENPRINTEREX 0x45
109 #define SPOOLSS_ADDPRINTEREX 0x46
110 #define SPOOLSS_ENUMPRINTERDATA 0x48
111 #define SPOOLSS_DELETEPRINTERDATA 0x49
113 #define PRINTER_CONTROL_UNPAUSE 0x00000000
114 #define PRINTER_CONTROL_PAUSE 0x00000001
115 #define PRINTER_CONTROL_RESUME 0x00000002
116 #define PRINTER_CONTROL_PURGE 0x00000003
117 #define PRINTER_CONTROL_SET_STATUS 0x00000004
119 #define PRINTER_STATUS_PAUSED 0x00000001
120 #define PRINTER_STATUS_ERROR 0x00000002
121 #define PRINTER_STATUS_PENDING_DELETION 0x00000004
122 #define PRINTER_STATUS_PAPER_JAM 0x00000008
124 #define PRINTER_STATUS_PAPER_OUT 0x00000010
125 #define PRINTER_STATUS_MANUAL_FEED 0x00000020
126 #define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
127 #define PRINTER_STATUS_OFFLINE 0x00000080
129 #define PRINTER_STATUS_IO_ACTIVE 0x00000100
130 #define PRINTER_STATUS_BUSY 0x00000200
131 #define PRINTER_STATUS_PRINTING 0x00000400
132 #define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
134 #define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
135 #define PRINTER_STATUS_WAITING 0x00002000
136 #define PRINTER_STATUS_PROCESSING 0x00004000
137 #define PRINTER_STATUS_INITIALIZING 0x00008000
139 #define PRINTER_STATUS_WARMING_UP 0x00010000
140 #define PRINTER_STATUS_TONER_LOW 0x00020000
141 #define PRINTER_STATUS_NO_TONER 0x00040000
142 #define PRINTER_STATUS_PAGE_PUNT 0x00080000
144 #define PRINTER_STATUS_USER_INTERVENTION 0x00100000
145 #define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
146 #define PRINTER_STATUS_DOOR_OPEN 0x00400000
147 #define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
149 #define PRINTER_STATUS_POWER_SAVE 0x01000000
151 #define SERVER_ACCESS_ADMINISTER 0x00000001
152 #define SERVER_ACCESS_ENUMERATE 0x00000002
153 #define PRINTER_ACCESS_ADMINISTER 0x00000004
154 #define PRINTER_ACCESS_USE 0x00000008
155 #define JOB_ACCESS_ADMINISTER 0x00000010
157 /* ACE masks for the various print permissions */
159 #define PRINTER_ACE_FULL_CONTROL GENERIC_ALL_ACCESS
160 #define PRINTER_ACE_MANAGE_DOCUMENTS READ_CONTROL_ACCESS
161 #define PRINTER_ACE_PRINT \
162 (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
164 /* Access rights for print servers */
165 #define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
166 #define SERVER_READ STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
167 #define SERVER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
168 #define SERVER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE
170 /* Access rights for printers */
171 #define PRINTER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
172 #define PRINTER_READ STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE
173 #define PRINTER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE
174 #define PRINTER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE
176 /* Access rights for jobs */
177 #define JOB_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER
178 #define JOB_READ STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER
179 #define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
180 #define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
182 #define POLICY_HND_SIZE 20
188 #define PRINTER_NOTIFY_TYPE 0x00
189 #define JOB_NOTIFY_TYPE 0x01
191 #define MAX_PRINTER_NOTIFY 26
192 #define MAX_JOB_NOTIFY 24
194 #define MAX_NOTIFY_TYPE_FOR_NOW 26
196 #define PRINTER_NOTIFY_SERVER_NAME 0x00
197 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
198 #define PRINTER_NOTIFY_SHARE_NAME 0x02
199 #define PRINTER_NOTIFY_PORT_NAME 0x03
200 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
201 #define PRINTER_NOTIFY_COMMENT 0x05
202 #define PRINTER_NOTIFY_LOCATION 0x06
203 #define PRINTER_NOTIFY_DEVMODE 0x07
204 #define PRINTER_NOTIFY_SEPFILE 0x08
205 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
206 #define PRINTER_NOTIFY_PARAMETERS 0x0A
207 #define PRINTER_NOTIFY_DATATYPE 0x0B
208 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
209 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
210 #define PRINTER_NOTIFY_PRIORITY 0x0E
211 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
212 #define PRINTER_NOTIFY_START_TIME 0x10
213 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
214 #define PRINTER_NOTIFY_STATUS 0x12
215 #define PRINTER_NOTIFY_STATUS_STRING 0x13
216 #define PRINTER_NOTIFY_CJOBS 0x14
217 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
218 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
219 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
220 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
221 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
223 #define JOB_NOTIFY_PRINTER_NAME 0x00
224 #define JOB_NOTIFY_MACHINE_NAME 0x01
225 #define JOB_NOTIFY_PORT_NAME 0x02
226 #define JOB_NOTIFY_USER_NAME 0x03
227 #define JOB_NOTIFY_NOTIFY_NAME 0x04
228 #define JOB_NOTIFY_DATATYPE 0x05
229 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
230 #define JOB_NOTIFY_PARAMETERS 0x07
231 #define JOB_NOTIFY_DRIVER_NAME 0x08
232 #define JOB_NOTIFY_DEVMODE 0x09
233 #define JOB_NOTIFY_STATUS 0x0A
234 #define JOB_NOTIFY_STATUS_STRING 0x0B
235 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
236 #define JOB_NOTIFY_DOCUMENT 0x0D
237 #define JOB_NOTIFY_PRIORITY 0x0E
238 #define JOB_NOTIFY_POSITION 0x0F
239 #define JOB_NOTIFY_SUBMITTED 0x10
240 #define JOB_NOTIFY_START_TIME 0x11
241 #define JOB_NOTIFY_UNTIL_TIME 0x12
242 #define JOB_NOTIFY_TIME 0x13
243 #define JOB_NOTIFY_TOTAL_PAGES 0x14
244 #define JOB_NOTIFY_PAGES_PRINTED 0x15
245 #define JOB_NOTIFY_TOTAL_BYTES 0x16
246 #define JOB_NOTIFY_BYTES_PRINTED 0x17
248 #define PRINTER_CHANGE_ADD_PRINTER 0x00000001
249 #define PRINTER_CHANGE_SET_PRINTER 0x00000002
250 #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
251 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
252 #define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \
253 PRINTER_CHANGE_SET_PRINTER | \
254 PRINTER_CHANGE_DELETE_PRINTER | \
255 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
257 #define PRINTER_CHANGE_ADD_JOB 0x00000100
258 #define PRINTER_CHANGE_SET_JOB 0x00000200
259 #define PRINTER_CHANGE_DELETE_JOB 0x00000400
260 #define PRINTER_CHANGE_WRITE_JOB 0x00000800
261 #define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \
262 PRINTER_CHANGE_SET_JOB | \
263 PRINTER_CHANGE_DELETE_JOB | \
264 PRINTER_CHANGE_WRITE_JOB )
266 #define PRINTER_CHANGE_ADD_FORM 0x00010000
267 #define PRINTER_CHANGE_SET_FORM 0x00020000
268 #define PRINTER_CHANGE_DELETE_FORM 0x00040000
269 #define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \
270 PRINTER_CHANGE_SET_FORM | \
271 PRINTER_CHANGE_DELETE_FORM )
273 #define PRINTER_CHANGE_ADD_PORT 0x00100000
274 #define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
275 #define PRINTER_CHANGE_DELETE_PORT 0x00400000
276 #define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \
277 PRINTER_CHANGE_CONFIGURE_PORT | \
278 PRINTER_CHANGE_DELETE_PORT )
280 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
281 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
282 #define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
283 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
285 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
286 #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
287 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
288 #define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
289 PRINTER_CHANGE_SET_PRINTER_DRIVER | \
290 PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
292 #define PRINTER_CHANGE_TIMEOUT 0x80000000
293 #define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \
294 PRINTER_CHANGE_FORM | \
295 PRINTER_CHANGE_PORT | \
296 PRINTER_CHANGE_PRINT_PROCESSOR | \
297 PRINTER_CHANGE_PRINTER_DRIVER )
299 #define PRINTER_NOTIFY_INFO_DISCARDED 0x1
302 * The printer attributes.
303 * I #defined all of them (grabbed form MSDN)
305 * ( SHARED | NETWORK | RAW_ONLY )
306 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
309 #define PRINTER_ATTRIBUTE_QUEUED 0x00000001
310 #define PRINTER_ATTRIBUTE_DIRECT 0x00000002
311 #define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
312 #define PRINTER_ATTRIBUTE_SHARED 0x00000008
314 #define PRINTER_ATTRIBUTE_NETWORK 0x00000010
315 #define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
316 #define PRINTER_ATTRIBUTE_LOCAL 0x00000040
317 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
319 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
320 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
321 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
322 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
324 #define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
326 #define NO_PRIORITY 0
327 #define MAX_PRIORITY 99
328 #define MIN_PRIORITY 1
329 #define DEF_PRIORITY 1
331 /* the flags of the query */
332 #define PRINTER_ENUM_DEFAULT 0x00000001
333 #define PRINTER_ENUM_LOCAL 0x00000002
334 #define PRINTER_ENUM_CONNECTIONS 0x00000004
335 #define PRINTER_ENUM_FAVORITE 0x00000004
336 #define PRINTER_ENUM_NAME 0x00000008
337 #define PRINTER_ENUM_REMOTE 0x00000010
338 #define PRINTER_ENUM_SHARED 0x00000020
339 #define PRINTER_ENUM_NETWORK 0x00000040
341 /* the flags of each printers */
342 #define PRINTER_ENUM_UNKNOWN_8 0x00000008
343 #define PRINTER_ENUM_EXPAND 0x00004000
344 #define PRINTER_ENUM_CONTAINER 0x00008000
345 #define PRINTER_ENUM_ICONMASK 0x00ff0000
346 #define PRINTER_ENUM_ICON1 0x00010000
347 #define PRINTER_ENUM_ICON2 0x00020000
348 #define PRINTER_ENUM_ICON3 0x00040000
349 #define PRINTER_ENUM_ICON4 0x00080000
350 #define PRINTER_ENUM_ICON5 0x00100000
351 #define PRINTER_ENUM_ICON6 0x00200000
352 #define PRINTER_ENUM_ICON7 0x00400000
353 #define PRINTER_ENUM_ICON8 0x00800000
355 /* this struct is undocumented */
356 /* thanks to the ddk ... */
357 typedef struct spool_user_1
359 uint32 size; /* length of user_name & client_name + 2? */
360 uint32 client_name_ptr;
361 uint32 user_name_ptr;
371 typedef struct spool_user_ctr_info
379 typedef struct devicemode
383 uint16 driverversion;
393 uint16 defaultsource;
406 uint32 displayfrequency;
414 uint32 panningheight;
419 typedef struct _devmode_cont
427 typedef struct _printer_default
431 DEVMODE_CTR devmode_cont;
432 uint32 access_required;
436 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
437 typedef struct spool_q_open_printer_ex
439 uint32 printername_ptr;
441 PRINTER_DEFAULT printer_default;
443 SPOOL_USER_CTR user_ctr;
445 SPOOL_Q_OPEN_PRINTER_EX;
447 /* SPOOL_R_OPEN_PRINTER_EX reply to an open printer */
448 typedef struct spool_r_open_printer_ex
450 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
454 SPOOL_R_OPEN_PRINTER_EX;
456 typedef struct spool_notify_option_type
465 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
467 SPOOL_NOTIFY_OPTION_TYPE;
469 typedef struct spool_notify_option_type_ctr
472 SPOOL_NOTIFY_OPTION_TYPE *type;
474 SPOOL_NOTIFY_OPTION_TYPE_CTR;
478 typedef struct s_header_type
490 typedef struct new_buffer
496 uint32 string_at_end;
500 typedef struct spool_q_getprinterdata
506 SPOOL_Q_GETPRINTERDATA;
508 typedef struct spool_r_getprinterdata
516 SPOOL_R_GETPRINTERDATA;
518 typedef struct spool_q_deleteprinterdata
523 SPOOL_Q_DELETEPRINTERDATA;
525 typedef struct spool_r_deleteprinterdata
529 SPOOL_R_DELETEPRINTERDATA;
531 typedef struct spool_q_closeprinter
535 SPOOL_Q_CLOSEPRINTER;
537 typedef struct spool_r_closeprinter
542 SPOOL_R_CLOSEPRINTER;
544 typedef struct spool_q_startpageprinter
548 SPOOL_Q_STARTPAGEPRINTER;
550 typedef struct spool_r_startpageprinter
554 SPOOL_R_STARTPAGEPRINTER;
556 typedef struct spool_q_endpageprinter
560 SPOOL_Q_ENDPAGEPRINTER;
562 typedef struct spool_r_endpageprinter
566 SPOOL_R_ENDPAGEPRINTER;
568 typedef struct spool_doc_info_1
579 typedef struct spool_doc_info
582 DOC_INFO_1 doc_info_1;
586 typedef struct spool_doc_info_container
593 typedef struct spool_q_startdocprinter
596 DOC_INFO_CONTAINER doc_info_container;
598 SPOOL_Q_STARTDOCPRINTER;
600 typedef struct spool_r_startdocprinter
605 SPOOL_R_STARTDOCPRINTER;
607 typedef struct spool_q_enddocprinter
611 SPOOL_Q_ENDDOCPRINTER;
613 typedef struct spool_r_enddocprinter
617 SPOOL_R_ENDDOCPRINTER;
619 typedef struct spool_q_writeprinter
626 SPOOL_Q_WRITEPRINTER;
628 typedef struct spool_r_writeprinter
630 uint32 buffer_written;
633 SPOOL_R_WRITEPRINTER;
635 typedef struct spool_notify_option
640 uint32 option_type_ptr;
641 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
645 typedef struct spool_notify_info_data
664 } SPOOL_NOTIFY_INFO_DATA;
666 typedef struct spool_notify_info
671 SPOOL_NOTIFY_INFO_DATA *data;
675 /* If the struct name looks obscure, yes it is ! */
676 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
677 typedef struct spoolss_q_rffpcnex
682 uint32 localmachine_ptr;
683 UNISTR2 localmachine;
686 SPOOL_NOTIFY_OPTION *option;
690 typedef struct spool_r_rffpcnex
696 /* Remote Find Next Printer Change Notify Ex */
697 typedef struct spool_q_rfnpcnex
702 SPOOL_NOTIFY_OPTION *option;
706 typedef struct spool_r_rfnpcnex
709 SPOOL_NOTIFY_INFO info;
714 /* Find Close Printer Notify */
715 typedef struct spool_q_fcpn
721 typedef struct spool_r_fcpn
728 typedef struct printer_info_0
745 uint32 global_counter;
748 uint16 major_version;
749 uint16 build_version;
754 uint32 session_counter;
756 uint32 printer_errors;
777 typedef struct printer_info_1
786 typedef struct printer_info_2
797 UNISTR printprocessor;
803 uint32 defaultpriority;
812 typedef struct printer_info_3
819 typedef struct spool_q_enumprinters
822 uint32 servername_ptr;
828 SPOOL_Q_ENUMPRINTERS;
830 typedef struct printer_info_ctr_info
832 PRINTER_INFO_0 *printers_0;
833 PRINTER_INFO_1 *printers_1;
834 PRINTER_INFO_2 *printers_2;
835 PRINTER_INFO_3 *printers_3;
839 typedef struct spool_r_enumprinters
842 uint32 needed; /* bytes needed */
843 uint32 returned; /* number of printers */
846 SPOOL_R_ENUMPRINTERS;
849 typedef struct spool_q_getprinter
858 typedef struct printer_info_info
862 PRINTER_INFO_0 *info0;
863 PRINTER_INFO_1 *info1;
864 PRINTER_INFO_2 *info2;
869 typedef struct spool_r_getprinter
874 } SPOOL_R_GETPRINTER;
876 typedef struct driver_info_1
881 typedef struct driver_info_2
891 typedef struct driver_info_3
900 uint16 *dependentfiles;
902 UNISTR defaultdatatype;
906 typedef struct driver_info_6
915 uint16 *dependentfiles;
917 UNISTR defaultdatatype;
918 uint16* previousdrivernames;
921 uint32 driver_version_low;
922 uint32 driver_version_high;
930 typedef struct driver_info_info
932 DRIVER_INFO_1 *info1;
933 DRIVER_INFO_2 *info2;
934 DRIVER_INFO_3 *info3;
935 DRIVER_INFO_6 *info6;
939 typedef struct spool_q_getprinterdriver2
942 uint32 architecture_ptr;
943 UNISTR2 architecture;
947 uint32 clientmajorversion;
948 uint32 clientminorversion;
950 SPOOL_Q_GETPRINTERDRIVER2;
952 typedef struct spool_r_getprinterdriver2
956 uint32 servermajorversion;
957 uint32 serverminorversion;
960 SPOOL_R_GETPRINTERDRIVER2;
963 typedef struct add_jobinfo_1
971 typedef struct spool_q_addjob
980 typedef struct spool_r_addjob
989 * I'm really wondering how many different time formats
990 * I will have to cope with
992 * JFM, 09/13/98 In a mad mood ;-(
994 typedef struct systemtime
1003 uint16 milliseconds;
1007 typedef struct s_job_info_1
1020 uint32 pagesprinted;
1021 SYSTEMTIME submitted;
1025 typedef struct s_job_info_2
1034 UNISTR printprocessor;
1037 DEVICEMODE *devmode;
1039 /* SEC_DESC sec_desc;*/
1047 SYSTEMTIME submitted;
1049 uint32 pagesprinted;
1053 typedef struct spool_q_enumjobs
1064 typedef struct job_info_ctr_info
1068 JOB_INFO_1 **job_info_1;
1069 JOB_INFO_2 **job_info_2;
1075 typedef struct spool_r_enumjobs
1084 typedef struct spool_q_schedulejob
1089 SPOOL_Q_SCHEDULEJOB;
1091 typedef struct spool_r_schedulejob
1095 SPOOL_R_SCHEDULEJOB;
1097 typedef struct s_port_info_1
1103 typedef struct s_port_info_2
1106 UNISTR monitor_name;
1113 typedef struct spool_q_enumports
1123 typedef struct port_info_ctr_info
1127 PORT_INFO_1 *info_1;
1128 PORT_INFO_2 *info_2;
1135 typedef struct spool_r_enumports
1138 uint32 needed; /* bytes needed */
1139 uint32 returned; /* number of printers */
1144 #define JOB_CONTROL_PAUSE 1
1145 #define JOB_CONTROL_RESUME 2
1146 #define JOB_CONTROL_CANCEL 3
1147 #define JOB_CONTROL_RESTART 4
1148 #define JOB_CONTROL_DELETE 5
1150 typedef struct job_info_info
1154 JOB_INFO_1 job_info_1;
1155 JOB_INFO_2 job_info_2;
1162 typedef struct spool_q_setjob
1173 typedef struct spool_r_setjob
1180 typedef struct spool_q_enumprinterdrivers
1184 uint32 environment_ptr;
1185 UNISTR2 environment;
1190 SPOOL_Q_ENUMPRINTERDRIVERS;
1192 typedef struct spool_r_enumprinterdrivers
1199 SPOOL_R_ENUMPRINTERDRIVERS;
1201 typedef struct spool_form_1
1214 typedef struct spool_q_enumforms
1223 typedef struct spool_r_enumforms
1232 typedef struct spool_q_getform
1242 typedef struct spool_r_getform
1250 typedef struct spool_printer_info_level_1
1253 uint32 description_ptr;
1256 UNISTR2 description;
1259 } SPOOL_PRINTER_INFO_LEVEL_1;
1261 typedef struct spool_printer_info_level_2
1263 uint32 servername_ptr;
1264 uint32 printername_ptr;
1265 uint32 sharename_ptr;
1266 uint32 portname_ptr;
1267 uint32 drivername_ptr;
1269 uint32 location_ptr;
1272 uint32 printprocessor_ptr;
1273 uint32 datatype_ptr;
1274 uint32 parameters_ptr;
1278 uint32 default_priority;
1285 UNISTR2 printername;
1292 UNISTR2 printprocessor;
1295 SEC_DESC_BUF *secdesc;
1297 SPOOL_PRINTER_INFO_LEVEL_2;
1299 typedef struct spool_printer_info_level_3
1303 SPOOL_PRINTER_INFO_LEVEL_3;
1305 typedef struct spool_printer_info_level
1309 SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
1310 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1311 SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
1313 SPOOL_PRINTER_INFO_LEVEL;
1315 typedef struct spool_printer_driver_info_level_3
1319 uint32 environment_ptr;
1320 uint32 driverpath_ptr;
1321 uint32 datafile_ptr;
1322 uint32 configfile_ptr;
1323 uint32 helpfile_ptr;
1324 uint32 monitorname_ptr;
1325 uint32 defaultdatatype_ptr;
1326 uint32 dependentfilessize;
1327 uint32 dependentfiles_ptr;
1330 UNISTR2 environment;
1335 UNISTR2 monitorname;
1336 UNISTR2 defaultdatatype;
1337 BUFFER5 dependentfiles;
1340 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1342 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
1346 uint32 environment_ptr;
1347 uint32 driverpath_ptr;
1348 uint32 datafile_ptr;
1349 uint32 configfile_ptr;
1350 uint32 helpfile_ptr;
1351 uint32 monitorname_ptr;
1352 uint32 defaultdatatype_ptr;
1353 uint32 dependentfiles_len;
1354 uint32 dependentfiles_ptr;
1355 uint32 previousnames_len;
1356 uint32 previousnames_ptr;
1358 UINT64_S driverversion;
1362 uint32 hardwareid_ptr;
1363 uint32 provider_ptr;
1365 UNISTR2 environment;
1370 UNISTR2 monitorname;
1371 UNISTR2 defaultdatatype;
1372 BUFFER5 dependentfiles;
1373 BUFFER5 previousnames;
1378 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1381 typedef struct spool_printer_driver_info_level
1385 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1386 SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
1388 SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1391 /* this struct is undocumented */
1392 /* thanks to the ddk ... */
1393 typedef struct spool_user_level_1
1396 uint32 client_name_ptr;
1397 uint32 user_name_ptr;
1402 UNISTR2 client_name;
1407 typedef struct spool_user_level
1409 SPOOL_USER_LEVEL_1 *user_level_1;
1413 typedef struct spool_q_setprinter
1417 SPOOL_PRINTER_INFO_LEVEL info;
1418 SEC_DESC_BUF *secdesc_ctr;
1419 DEVMODE_CTR devmode_ctr;
1426 typedef struct spool_r_setprinter
1432 typedef struct spool_q_addprinter
1434 UNISTR2 server_name;
1436 SPOOL_PRINTER_INFO_LEVEL info;
1442 SPOOL_USER_LEVEL user;
1446 typedef struct spool_r_addprinter
1452 typedef struct spool_q_deleteprinter
1456 SPOOL_Q_DELETEPRINTER;
1458 typedef struct spool_r_deleteprinter
1463 SPOOL_R_DELETEPRINTER;
1465 typedef struct spool_q_abortprinter
1469 SPOOL_Q_ABORTPRINTER;
1471 typedef struct spool_r_abortprinter
1475 SPOOL_R_ABORTPRINTER;
1478 typedef struct spool_q_addprinterex
1480 uint32 server_name_ptr;
1481 UNISTR2 server_name;
1483 SPOOL_PRINTER_INFO_LEVEL info;
1489 SPOOL_USER_CTR user_ctr;
1491 SPOOL_Q_ADDPRINTEREX;
1493 typedef struct spool_r_addprinterex
1498 SPOOL_R_ADDPRINTEREX;
1501 typedef struct spool_q_addprinterdriver
1503 uint32 server_name_ptr;
1504 UNISTR2 server_name;
1506 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1508 SPOOL_Q_ADDPRINTERDRIVER;
1510 typedef struct spool_r_addprinterdriver
1514 SPOOL_R_ADDPRINTERDRIVER;
1517 typedef struct driver_directory_1
1523 typedef struct driver_info_ctr_info
1527 DRIVER_DIRECTORY_1 info_1;
1531 DRIVER_DIRECTORY_CTR;
1533 typedef struct spool_q_getprinterdriverdirectory
1537 uint32 environment_ptr;
1538 UNISTR2 environment;
1543 SPOOL_Q_GETPRINTERDRIVERDIR;
1545 typedef struct spool_r_getprinterdriverdirectory
1551 SPOOL_R_GETPRINTERDRIVERDIR;
1553 typedef struct spool_q_enumprintprocessors
1557 uint32 environment_ptr;
1558 UNISTR2 environment;
1563 SPOOL_Q_ENUMPRINTPROCESSORS;
1565 typedef struct printprocessor_1
1571 typedef struct spool_r_enumprintprocessors
1578 SPOOL_R_ENUMPRINTPROCESSORS;
1580 typedef struct spool_q_enumprintprocdatatypes
1584 uint32 processor_ptr;
1590 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1592 typedef struct ppdatatype_1
1596 PRINTPROCDATATYPE_1;
1598 typedef struct spool_r_enumprintprocdatatypes
1605 SPOOL_R_ENUMPRINTPROCDATATYPES;
1607 typedef struct printmonitor_1
1613 typedef struct printmonitor_2
1621 typedef struct spool_q_enumprintmonitors
1629 SPOOL_Q_ENUMPRINTMONITORS;
1631 typedef struct spool_r_enumprintmonitors
1638 SPOOL_R_ENUMPRINTMONITORS;
1641 typedef struct spool_q_enumprinterdata
1648 SPOOL_Q_ENUMPRINTERDATA;
1650 typedef struct spool_r_enumprinterdata
1654 uint32 realvaluesize;
1658 uint32 realdatasize;
1661 SPOOL_R_ENUMPRINTERDATA;
1663 typedef struct spool_q_setprinterdata
1671 uint32 numeric_data;
1673 SPOOL_Q_SETPRINTERDATA;
1675 typedef struct spool_r_setprinterdata
1679 SPOOL_R_SETPRINTERDATA;
1681 typedef struct _form
1695 typedef struct spool_q_addform
1704 typedef struct spool_r_addform
1710 typedef struct spool_q_setform
1720 typedef struct spool_r_setform
1726 typedef struct spool_q_deleteform
1733 typedef struct spool_r_deleteform
1739 typedef struct spool_q_getjob
1749 typedef struct pjob_info_info
1753 JOB_INFO_1 *job_info_1;
1754 JOB_INFO_2 *job_info_2;
1762 typedef struct spool_r_getjob
1770 typedef struct spool_q_replyopenprinter
1778 SPOOL_Q_REPLYOPENPRINTER;
1780 typedef struct spool_r_replyopenprinter
1785 SPOOL_R_REPLYOPENPRINTER;
1787 typedef struct spool_q_replycloseprinter
1791 SPOOL_Q_REPLYCLOSEPRINTER;
1793 typedef struct spool_r_replycloseprinter
1798 SPOOL_R_REPLYCLOSEPRINTER;
1800 typedef struct spool_q_rrpcn
1808 SPOOL_NOTIFY_INFO info;
1810 SPOOL_Q_REPLY_RRPCN;
1812 typedef struct spool_r_rrpcn
1817 SPOOL_R_REPLY_RRPCN;
1819 #define PRINTER_DRIVER_VERSION 2
1820 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
1822 #endif /* _RPC_SPOOLSS_H */