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 /* JOB status codes. */
159 #define JOB_STATUS_PAUSED 0x001
160 #define JOB_STATUS_ERROR 0x002
161 #define JOB_STATUS_DELETING 0x004
162 #define JOB_STATUS_SPOOLING 0x008
163 #define JOB_STATUS_PRINTING 0x010
164 #define JOB_STATUS_OFFLINE 0x020
165 #define JOB_STATUS_PAPEROUT 0x040
166 #define JOB_STATUS_PRINTED 0x080
167 #define JOB_STATUS_DELETED 0x100
168 #define JOB_STATUS_BLOCKED 0x200
169 #define JOB_STATUS_USER_INTERVENTION 0x400
171 /* ACE masks for the various print permissions */
173 #define PRINTER_ACE_FULL_CONTROL GENERIC_ALL_ACCESS
174 #define PRINTER_ACE_MANAGE_DOCUMENTS READ_CONTROL_ACCESS
175 #define PRINTER_ACE_PRINT \
176 (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
178 /* Access rights for print servers */
179 #define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
180 #define SERVER_READ STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
181 #define SERVER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
182 #define SERVER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE
184 /* Access rights for printers */
185 #define PRINTER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
186 #define PRINTER_READ STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE
187 #define PRINTER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE
188 #define PRINTER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE
190 /* Access rights for jobs */
191 #define JOB_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER
192 #define JOB_READ STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER
193 #define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
194 #define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
196 #define POLICY_HND_SIZE 20
202 #define PRINTER_NOTIFY_TYPE 0x00
203 #define JOB_NOTIFY_TYPE 0x01
205 #define MAX_PRINTER_NOTIFY 26
206 #define MAX_JOB_NOTIFY 24
208 #define MAX_NOTIFY_TYPE_FOR_NOW 26
210 #define PRINTER_NOTIFY_SERVER_NAME 0x00
211 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
212 #define PRINTER_NOTIFY_SHARE_NAME 0x02
213 #define PRINTER_NOTIFY_PORT_NAME 0x03
214 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
215 #define PRINTER_NOTIFY_COMMENT 0x05
216 #define PRINTER_NOTIFY_LOCATION 0x06
217 #define PRINTER_NOTIFY_DEVMODE 0x07
218 #define PRINTER_NOTIFY_SEPFILE 0x08
219 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
220 #define PRINTER_NOTIFY_PARAMETERS 0x0A
221 #define PRINTER_NOTIFY_DATATYPE 0x0B
222 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
223 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
224 #define PRINTER_NOTIFY_PRIORITY 0x0E
225 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
226 #define PRINTER_NOTIFY_START_TIME 0x10
227 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
228 #define PRINTER_NOTIFY_STATUS 0x12
229 #define PRINTER_NOTIFY_STATUS_STRING 0x13
230 #define PRINTER_NOTIFY_CJOBS 0x14
231 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
232 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
233 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
234 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
235 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
237 #define JOB_NOTIFY_PRINTER_NAME 0x00
238 #define JOB_NOTIFY_MACHINE_NAME 0x01
239 #define JOB_NOTIFY_PORT_NAME 0x02
240 #define JOB_NOTIFY_USER_NAME 0x03
241 #define JOB_NOTIFY_NOTIFY_NAME 0x04
242 #define JOB_NOTIFY_DATATYPE 0x05
243 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
244 #define JOB_NOTIFY_PARAMETERS 0x07
245 #define JOB_NOTIFY_DRIVER_NAME 0x08
246 #define JOB_NOTIFY_DEVMODE 0x09
247 #define JOB_NOTIFY_STATUS 0x0A
248 #define JOB_NOTIFY_STATUS_STRING 0x0B
249 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
250 #define JOB_NOTIFY_DOCUMENT 0x0D
251 #define JOB_NOTIFY_PRIORITY 0x0E
252 #define JOB_NOTIFY_POSITION 0x0F
253 #define JOB_NOTIFY_SUBMITTED 0x10
254 #define JOB_NOTIFY_START_TIME 0x11
255 #define JOB_NOTIFY_UNTIL_TIME 0x12
256 #define JOB_NOTIFY_TIME 0x13
257 #define JOB_NOTIFY_TOTAL_PAGES 0x14
258 #define JOB_NOTIFY_PAGES_PRINTED 0x15
259 #define JOB_NOTIFY_TOTAL_BYTES 0x16
260 #define JOB_NOTIFY_BYTES_PRINTED 0x17
262 #define PRINTER_CHANGE_ADD_PRINTER 0x00000001
263 #define PRINTER_CHANGE_SET_PRINTER 0x00000002
264 #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004
265 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008
266 #define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \
267 PRINTER_CHANGE_SET_PRINTER | \
268 PRINTER_CHANGE_DELETE_PRINTER | \
269 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
271 #define PRINTER_CHANGE_ADD_JOB 0x00000100
272 #define PRINTER_CHANGE_SET_JOB 0x00000200
273 #define PRINTER_CHANGE_DELETE_JOB 0x00000400
274 #define PRINTER_CHANGE_WRITE_JOB 0x00000800
275 #define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \
276 PRINTER_CHANGE_SET_JOB | \
277 PRINTER_CHANGE_DELETE_JOB | \
278 PRINTER_CHANGE_WRITE_JOB )
280 #define PRINTER_CHANGE_ADD_FORM 0x00010000
281 #define PRINTER_CHANGE_SET_FORM 0x00020000
282 #define PRINTER_CHANGE_DELETE_FORM 0x00040000
283 #define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \
284 PRINTER_CHANGE_SET_FORM | \
285 PRINTER_CHANGE_DELETE_FORM )
287 #define PRINTER_CHANGE_ADD_PORT 0x00100000
288 #define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000
289 #define PRINTER_CHANGE_DELETE_PORT 0x00400000
290 #define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \
291 PRINTER_CHANGE_CONFIGURE_PORT | \
292 PRINTER_CHANGE_DELETE_PORT )
294 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000
295 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000
296 #define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
297 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
299 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000
300 #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000
301 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000
302 #define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
303 PRINTER_CHANGE_SET_PRINTER_DRIVER | \
304 PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
306 #define PRINTER_CHANGE_TIMEOUT 0x80000000
307 #define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \
308 PRINTER_CHANGE_FORM | \
309 PRINTER_CHANGE_PORT | \
310 PRINTER_CHANGE_PRINT_PROCESSOR | \
311 PRINTER_CHANGE_PRINTER_DRIVER )
313 #define PRINTER_NOTIFY_INFO_DISCARDED 0x1
316 * The printer attributes.
317 * I #defined all of them (grabbed form MSDN)
319 * ( SHARED | NETWORK | RAW_ONLY )
320 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
323 #define PRINTER_ATTRIBUTE_QUEUED 0x00000001
324 #define PRINTER_ATTRIBUTE_DIRECT 0x00000002
325 #define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
326 #define PRINTER_ATTRIBUTE_SHARED 0x00000008
328 #define PRINTER_ATTRIBUTE_NETWORK 0x00000010
329 #define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
330 #define PRINTER_ATTRIBUTE_LOCAL 0x00000040
331 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
333 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
334 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
335 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
336 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
338 #define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
340 #define NO_PRIORITY 0
341 #define MAX_PRIORITY 99
342 #define MIN_PRIORITY 1
343 #define DEF_PRIORITY 1
345 /* the flags of the query */
346 #define PRINTER_ENUM_DEFAULT 0x00000001
347 #define PRINTER_ENUM_LOCAL 0x00000002
348 #define PRINTER_ENUM_CONNECTIONS 0x00000004
349 #define PRINTER_ENUM_FAVORITE 0x00000004
350 #define PRINTER_ENUM_NAME 0x00000008
351 #define PRINTER_ENUM_REMOTE 0x00000010
352 #define PRINTER_ENUM_SHARED 0x00000020
353 #define PRINTER_ENUM_NETWORK 0x00000040
355 /* the flags of each printers */
356 #define PRINTER_ENUM_UNKNOWN_8 0x00000008
357 #define PRINTER_ENUM_EXPAND 0x00004000
358 #define PRINTER_ENUM_CONTAINER 0x00008000
359 #define PRINTER_ENUM_ICONMASK 0x00ff0000
360 #define PRINTER_ENUM_ICON1 0x00010000
361 #define PRINTER_ENUM_ICON2 0x00020000
362 #define PRINTER_ENUM_ICON3 0x00040000
363 #define PRINTER_ENUM_ICON4 0x00080000
364 #define PRINTER_ENUM_ICON5 0x00100000
365 #define PRINTER_ENUM_ICON6 0x00200000
366 #define PRINTER_ENUM_ICON7 0x00400000
367 #define PRINTER_ENUM_ICON8 0x00800000
369 /* this struct is undocumented */
370 /* thanks to the ddk ... */
371 typedef struct spool_user_1
373 uint32 size; /* length of user_name & client_name + 2? */
374 uint32 client_name_ptr;
375 uint32 user_name_ptr;
385 typedef struct spool_user_ctr_info
393 typedef struct devicemode
397 uint16 driverversion;
407 uint16 defaultsource;
420 uint32 displayfrequency;
428 uint32 panningheight;
433 typedef struct _devmode_cont
441 typedef struct _printer_default
445 DEVMODE_CTR devmode_cont;
446 uint32 access_required;
450 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
451 typedef struct spool_q_open_printer_ex
453 uint32 printername_ptr;
455 PRINTER_DEFAULT printer_default;
457 SPOOL_USER_CTR user_ctr;
459 SPOOL_Q_OPEN_PRINTER_EX;
461 /* SPOOL_R_OPEN_PRINTER_EX reply to an open printer */
462 typedef struct spool_r_open_printer_ex
464 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
468 SPOOL_R_OPEN_PRINTER_EX;
470 typedef struct spool_notify_option_type
479 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
481 SPOOL_NOTIFY_OPTION_TYPE;
483 typedef struct spool_notify_option_type_ctr
486 SPOOL_NOTIFY_OPTION_TYPE *type;
488 SPOOL_NOTIFY_OPTION_TYPE_CTR;
492 typedef struct s_header_type
504 typedef struct new_buffer
510 uint32 string_at_end;
514 typedef struct spool_q_getprinterdata
520 SPOOL_Q_GETPRINTERDATA;
522 typedef struct spool_r_getprinterdata
530 SPOOL_R_GETPRINTERDATA;
532 typedef struct spool_q_deleteprinterdata
537 SPOOL_Q_DELETEPRINTERDATA;
539 typedef struct spool_r_deleteprinterdata
543 SPOOL_R_DELETEPRINTERDATA;
545 typedef struct spool_q_closeprinter
549 SPOOL_Q_CLOSEPRINTER;
551 typedef struct spool_r_closeprinter
556 SPOOL_R_CLOSEPRINTER;
558 typedef struct spool_q_startpageprinter
562 SPOOL_Q_STARTPAGEPRINTER;
564 typedef struct spool_r_startpageprinter
568 SPOOL_R_STARTPAGEPRINTER;
570 typedef struct spool_q_endpageprinter
574 SPOOL_Q_ENDPAGEPRINTER;
576 typedef struct spool_r_endpageprinter
580 SPOOL_R_ENDPAGEPRINTER;
582 typedef struct spool_doc_info_1
593 typedef struct spool_doc_info
596 DOC_INFO_1 doc_info_1;
600 typedef struct spool_doc_info_container
607 typedef struct spool_q_startdocprinter
610 DOC_INFO_CONTAINER doc_info_container;
612 SPOOL_Q_STARTDOCPRINTER;
614 typedef struct spool_r_startdocprinter
619 SPOOL_R_STARTDOCPRINTER;
621 typedef struct spool_q_enddocprinter
625 SPOOL_Q_ENDDOCPRINTER;
627 typedef struct spool_r_enddocprinter
631 SPOOL_R_ENDDOCPRINTER;
633 typedef struct spool_q_writeprinter
640 SPOOL_Q_WRITEPRINTER;
642 typedef struct spool_r_writeprinter
644 uint32 buffer_written;
647 SPOOL_R_WRITEPRINTER;
649 typedef struct spool_notify_option
654 uint32 option_type_ptr;
655 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
659 typedef struct spool_notify_info_data
678 } SPOOL_NOTIFY_INFO_DATA;
680 typedef struct spool_notify_info
685 SPOOL_NOTIFY_INFO_DATA *data;
689 /* If the struct name looks obscure, yes it is ! */
690 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
691 typedef struct spoolss_q_rffpcnex
696 uint32 localmachine_ptr;
697 UNISTR2 localmachine;
700 SPOOL_NOTIFY_OPTION *option;
704 typedef struct spool_r_rffpcnex
710 /* Remote Find Next Printer Change Notify Ex */
711 typedef struct spool_q_rfnpcnex
716 SPOOL_NOTIFY_OPTION *option;
720 typedef struct spool_r_rfnpcnex
723 SPOOL_NOTIFY_INFO info;
728 /* Find Close Printer Notify */
729 typedef struct spool_q_fcpn
735 typedef struct spool_r_fcpn
742 typedef struct printer_info_0
759 uint32 global_counter;
762 uint16 major_version;
763 uint16 build_version;
768 uint32 session_counter;
770 uint32 printer_errors;
791 typedef struct printer_info_1
800 typedef struct printer_info_2
811 UNISTR printprocessor;
817 uint32 defaultpriority;
826 typedef struct printer_info_3
833 typedef struct spool_q_enumprinters
836 uint32 servername_ptr;
842 SPOOL_Q_ENUMPRINTERS;
844 typedef struct printer_info_ctr_info
846 PRINTER_INFO_0 *printers_0;
847 PRINTER_INFO_1 *printers_1;
848 PRINTER_INFO_2 *printers_2;
849 PRINTER_INFO_3 *printers_3;
853 typedef struct spool_r_enumprinters
856 uint32 needed; /* bytes needed */
857 uint32 returned; /* number of printers */
860 SPOOL_R_ENUMPRINTERS;
863 typedef struct spool_q_getprinter
872 typedef struct printer_info_info
876 PRINTER_INFO_0 *info0;
877 PRINTER_INFO_1 *info1;
878 PRINTER_INFO_2 *info2;
883 typedef struct spool_r_getprinter
888 } SPOOL_R_GETPRINTER;
890 typedef struct driver_info_1
895 typedef struct driver_info_2
905 typedef struct driver_info_3
914 uint16 *dependentfiles;
916 UNISTR defaultdatatype;
920 typedef struct driver_info_6
929 uint16 *dependentfiles;
931 UNISTR defaultdatatype;
932 uint16* previousdrivernames;
935 uint32 driver_version_low;
936 uint32 driver_version_high;
944 typedef struct driver_info_info
946 DRIVER_INFO_1 *info1;
947 DRIVER_INFO_2 *info2;
948 DRIVER_INFO_3 *info3;
949 DRIVER_INFO_6 *info6;
953 typedef struct spool_q_getprinterdriver2
956 uint32 architecture_ptr;
957 UNISTR2 architecture;
961 uint32 clientmajorversion;
962 uint32 clientminorversion;
964 SPOOL_Q_GETPRINTERDRIVER2;
966 typedef struct spool_r_getprinterdriver2
970 uint32 servermajorversion;
971 uint32 serverminorversion;
974 SPOOL_R_GETPRINTERDRIVER2;
977 typedef struct add_jobinfo_1
985 typedef struct spool_q_addjob
994 typedef struct spool_r_addjob
1003 * I'm really wondering how many different time formats
1004 * I will have to cope with
1006 * JFM, 09/13/98 In a mad mood ;-(
1008 typedef struct systemtime
1017 uint16 milliseconds;
1021 typedef struct s_job_info_1
1034 uint32 pagesprinted;
1035 SYSTEMTIME submitted;
1039 typedef struct s_job_info_2
1048 UNISTR printprocessor;
1051 DEVICEMODE *devmode;
1053 /* SEC_DESC sec_desc;*/
1061 SYSTEMTIME submitted;
1063 uint32 pagesprinted;
1067 typedef struct spool_q_enumjobs
1078 typedef struct job_info_ctr_info
1082 JOB_INFO_1 **job_info_1;
1083 JOB_INFO_2 **job_info_2;
1089 typedef struct spool_r_enumjobs
1098 typedef struct spool_q_schedulejob
1103 SPOOL_Q_SCHEDULEJOB;
1105 typedef struct spool_r_schedulejob
1109 SPOOL_R_SCHEDULEJOB;
1111 typedef struct s_port_info_1
1117 typedef struct s_port_info_2
1120 UNISTR monitor_name;
1127 typedef struct spool_q_enumports
1137 typedef struct port_info_ctr_info
1141 PORT_INFO_1 *info_1;
1142 PORT_INFO_2 *info_2;
1149 typedef struct spool_r_enumports
1152 uint32 needed; /* bytes needed */
1153 uint32 returned; /* number of printers */
1158 #define JOB_CONTROL_PAUSE 1
1159 #define JOB_CONTROL_RESUME 2
1160 #define JOB_CONTROL_CANCEL 3
1161 #define JOB_CONTROL_RESTART 4
1162 #define JOB_CONTROL_DELETE 5
1164 typedef struct job_info_info
1168 JOB_INFO_1 job_info_1;
1169 JOB_INFO_2 job_info_2;
1176 typedef struct spool_q_setjob
1187 typedef struct spool_r_setjob
1194 typedef struct spool_q_enumprinterdrivers
1198 uint32 environment_ptr;
1199 UNISTR2 environment;
1204 SPOOL_Q_ENUMPRINTERDRIVERS;
1206 typedef struct spool_r_enumprinterdrivers
1213 SPOOL_R_ENUMPRINTERDRIVERS;
1215 typedef struct spool_form_1
1228 typedef struct spool_q_enumforms
1237 typedef struct spool_r_enumforms
1246 typedef struct spool_q_getform
1256 typedef struct spool_r_getform
1264 typedef struct spool_printer_info_level_1
1267 uint32 description_ptr;
1270 UNISTR2 description;
1273 } SPOOL_PRINTER_INFO_LEVEL_1;
1275 typedef struct spool_printer_info_level_2
1277 uint32 servername_ptr;
1278 uint32 printername_ptr;
1279 uint32 sharename_ptr;
1280 uint32 portname_ptr;
1281 uint32 drivername_ptr;
1283 uint32 location_ptr;
1286 uint32 printprocessor_ptr;
1287 uint32 datatype_ptr;
1288 uint32 parameters_ptr;
1292 uint32 default_priority;
1299 UNISTR2 printername;
1306 UNISTR2 printprocessor;
1309 SEC_DESC_BUF *secdesc;
1311 SPOOL_PRINTER_INFO_LEVEL_2;
1313 typedef struct spool_printer_info_level_3
1317 SPOOL_PRINTER_INFO_LEVEL_3;
1319 typedef struct spool_printer_info_level
1323 SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
1324 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1325 SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
1327 SPOOL_PRINTER_INFO_LEVEL;
1329 typedef struct spool_printer_driver_info_level_3
1333 uint32 environment_ptr;
1334 uint32 driverpath_ptr;
1335 uint32 datafile_ptr;
1336 uint32 configfile_ptr;
1337 uint32 helpfile_ptr;
1338 uint32 monitorname_ptr;
1339 uint32 defaultdatatype_ptr;
1340 uint32 dependentfilessize;
1341 uint32 dependentfiles_ptr;
1344 UNISTR2 environment;
1349 UNISTR2 monitorname;
1350 UNISTR2 defaultdatatype;
1351 BUFFER5 dependentfiles;
1354 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1356 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
1360 uint32 environment_ptr;
1361 uint32 driverpath_ptr;
1362 uint32 datafile_ptr;
1363 uint32 configfile_ptr;
1364 uint32 helpfile_ptr;
1365 uint32 monitorname_ptr;
1366 uint32 defaultdatatype_ptr;
1367 uint32 dependentfiles_len;
1368 uint32 dependentfiles_ptr;
1369 uint32 previousnames_len;
1370 uint32 previousnames_ptr;
1372 UINT64_S driverversion;
1376 uint32 hardwareid_ptr;
1377 uint32 provider_ptr;
1379 UNISTR2 environment;
1384 UNISTR2 monitorname;
1385 UNISTR2 defaultdatatype;
1386 BUFFER5 dependentfiles;
1387 BUFFER5 previousnames;
1392 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1395 typedef struct spool_printer_driver_info_level
1399 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1400 SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
1402 SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1405 /* this struct is undocumented */
1406 /* thanks to the ddk ... */
1407 typedef struct spool_user_level_1
1410 uint32 client_name_ptr;
1411 uint32 user_name_ptr;
1416 UNISTR2 client_name;
1421 typedef struct spool_user_level
1423 SPOOL_USER_LEVEL_1 *user_level_1;
1427 typedef struct spool_q_setprinter
1431 SPOOL_PRINTER_INFO_LEVEL info;
1432 SEC_DESC_BUF *secdesc_ctr;
1433 DEVMODE_CTR devmode_ctr;
1440 typedef struct spool_r_setprinter
1446 typedef struct spool_q_addprinter
1448 UNISTR2 server_name;
1450 SPOOL_PRINTER_INFO_LEVEL info;
1456 SPOOL_USER_LEVEL user;
1460 typedef struct spool_r_addprinter
1466 typedef struct spool_q_deleteprinter
1470 SPOOL_Q_DELETEPRINTER;
1472 typedef struct spool_r_deleteprinter
1477 SPOOL_R_DELETEPRINTER;
1479 typedef struct spool_q_abortprinter
1483 SPOOL_Q_ABORTPRINTER;
1485 typedef struct spool_r_abortprinter
1489 SPOOL_R_ABORTPRINTER;
1492 typedef struct spool_q_addprinterex
1494 uint32 server_name_ptr;
1495 UNISTR2 server_name;
1497 SPOOL_PRINTER_INFO_LEVEL info;
1503 SPOOL_USER_CTR user_ctr;
1505 SPOOL_Q_ADDPRINTEREX;
1507 typedef struct spool_r_addprinterex
1512 SPOOL_R_ADDPRINTEREX;
1515 typedef struct spool_q_addprinterdriver
1517 uint32 server_name_ptr;
1518 UNISTR2 server_name;
1520 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1522 SPOOL_Q_ADDPRINTERDRIVER;
1524 typedef struct spool_r_addprinterdriver
1528 SPOOL_R_ADDPRINTERDRIVER;
1531 typedef struct driver_directory_1
1537 typedef struct driver_info_ctr_info
1541 DRIVER_DIRECTORY_1 info_1;
1545 DRIVER_DIRECTORY_CTR;
1547 typedef struct spool_q_getprinterdriverdirectory
1551 uint32 environment_ptr;
1552 UNISTR2 environment;
1557 SPOOL_Q_GETPRINTERDRIVERDIR;
1559 typedef struct spool_r_getprinterdriverdirectory
1565 SPOOL_R_GETPRINTERDRIVERDIR;
1567 typedef struct spool_q_enumprintprocessors
1571 uint32 environment_ptr;
1572 UNISTR2 environment;
1577 SPOOL_Q_ENUMPRINTPROCESSORS;
1579 typedef struct printprocessor_1
1585 typedef struct spool_r_enumprintprocessors
1592 SPOOL_R_ENUMPRINTPROCESSORS;
1594 typedef struct spool_q_enumprintprocdatatypes
1598 uint32 processor_ptr;
1604 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1606 typedef struct ppdatatype_1
1610 PRINTPROCDATATYPE_1;
1612 typedef struct spool_r_enumprintprocdatatypes
1619 SPOOL_R_ENUMPRINTPROCDATATYPES;
1621 typedef struct printmonitor_1
1627 typedef struct printmonitor_2
1635 typedef struct spool_q_enumprintmonitors
1643 SPOOL_Q_ENUMPRINTMONITORS;
1645 typedef struct spool_r_enumprintmonitors
1652 SPOOL_R_ENUMPRINTMONITORS;
1655 typedef struct spool_q_enumprinterdata
1662 SPOOL_Q_ENUMPRINTERDATA;
1664 typedef struct spool_r_enumprinterdata
1668 uint32 realvaluesize;
1672 uint32 realdatasize;
1675 SPOOL_R_ENUMPRINTERDATA;
1677 typedef struct spool_q_setprinterdata
1685 uint32 numeric_data;
1687 SPOOL_Q_SETPRINTERDATA;
1689 typedef struct spool_r_setprinterdata
1693 SPOOL_R_SETPRINTERDATA;
1695 typedef struct _form
1709 typedef struct spool_q_addform
1718 typedef struct spool_r_addform
1724 typedef struct spool_q_setform
1734 typedef struct spool_r_setform
1740 typedef struct spool_q_deleteform
1747 typedef struct spool_r_deleteform
1753 typedef struct spool_q_getjob
1763 typedef struct pjob_info_info
1767 JOB_INFO_1 *job_info_1;
1768 JOB_INFO_2 *job_info_2;
1776 typedef struct spool_r_getjob
1784 typedef struct spool_q_replyopenprinter
1792 SPOOL_Q_REPLYOPENPRINTER;
1794 typedef struct spool_r_replyopenprinter
1799 SPOOL_R_REPLYOPENPRINTER;
1801 typedef struct spool_q_replycloseprinter
1805 SPOOL_Q_REPLYCLOSEPRINTER;
1807 typedef struct spool_r_replycloseprinter
1812 SPOOL_R_REPLYCLOSEPRINTER;
1814 typedef struct spool_q_rrpcn
1822 SPOOL_NOTIFY_INFO info;
1824 SPOOL_Q_REPLY_RRPCN;
1826 typedef struct spool_r_rrpcn
1831 SPOOL_R_REPLY_RRPCN;
1833 #define PRINTER_DRIVER_VERSION 2
1834 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
1836 #endif /* _RPC_SPOOLSS_H */