2 Unix SMB/Netbios implementation.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1998
6 Copyright (C) Luke Kenneth Casson Leighton 1996-1998
7 Copyright (C) Jean Francois Micouleau 1998-1999
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_DELETEPRINTER 0x06
33 #define SPOOLSS_GETPRINTERDRIVER 0x0b
34 #define SPOOLSS_DELETEPRINTERDRIVER 0x0d
35 #define SPOOLSS_ADDPRINTPROCESSOR 0x0e
36 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
37 #define SPOOLSS_ABORTPRINTER 0x15
38 #define SPOOLSS_READPRINTER 0x16
39 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
40 #define SPOOLSS_DELETEFORM 0x1f
41 #define SPOOLSS_GETFORM 0x20
42 #define SPOOLSS_ADDPORT 0x25
43 #define SPOOLSS_CONFIGUREPORT 0x26
44 #define SPOOLSS_DELETEPORT 0x27
45 #define SPOOLSS_CREATEPRINTERIC 0x28
46 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29
47 #define SPOOLSS_DELETEPRINTERIC 0x2a
48 #define SPOOLSS_ADDPRINTERCONNECTION 0x2b
49 #define SPOOLSS_DELETEPRINTERCONNECTION 0x2c
50 #define SPOOLSS_PRINTERMESSAGEBOX 0x2d
51 #define SPOOLSS_ADDMONITOR 0x2e
52 #define SPOOLSS_DELETEMONITOR 0x2f
53 #define SPOOLSS_DELETEPRINTPROCESSOR 0x30
54 #define SPOOLSS_ADDPRINTPROVIDOR 0x31
55 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32
56 #define SPOOLSS_RESETPRINTER 0x34
57 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36
58 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
59 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
60 #define SPOOLSS_REPLYOPENPRINTER 0x3a
61 #define SPOOLSS_ROUTERREPLYPRINTER 0x3b
62 #define SPOOLSS_REPLYCLOSEPRINTER 0x3c
63 #define SPOOLSS_ADDPORTEX 0x3d
64 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
65 #define SPOOLSS_SPOOLERINIT 0x3f
66 #define SPOOLSS_RESETPRINTEREX 0x40
67 #define SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION 0x42
70 /* those are implemented */
72 #define SPOOLSS_ENUMPRINTERS 0x00
73 #define SPOOLSS_SETJOB 0x02
74 #define SPOOLSS_GETJOB 0x03
75 #define SPOOLSS_ENUMJOBS 0x04
76 #define SPOOLSS_ADDPRINTER 0x05
77 #define SPOOLSS_SETPRINTER 0x07
78 #define SPOOLSS_GETPRINTER 0x08
79 #define SPOOLSS_ADDPRINTERDRIVER 0x09
80 #define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
81 #define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
82 #define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
83 #define SPOOLSS_STARTDOCPRINTER 0x11
84 #define SPOOLSS_STARTPAGEPRINTER 0x12
85 #define SPOOLSS_WRITEPRINTER 0x13
86 #define SPOOLSS_ENDPAGEPRINTER 0x14
87 #define SPOOLSS_ENDDOCPRINTER 0x17
88 #define SPOOLSS_ADDJOB 0x18
89 #define SPOOLSS_SCHEDULEJOB 0x19
90 #define SPOOLSS_GETPRINTERDATA 0x1a
91 #define SPOOLSS_SETPRINTERDATA 0x1b
92 #define SPOOLSS_CLOSEPRINTER 0x1d
93 #define SPOOLSS_ADDFORM 0x1e
94 #define SPOOLSS_SETFORM 0x21
95 #define SPOOLSS_ENUMFORMS 0x22
96 #define SPOOLSS_ENUMPORTS 0x23
97 #define SPOOLSS_ENUMMONITORS 0x24
98 #define SPOOLSS_ENUMPRINTPROCESSORDATATYPES 0x33
99 #define SPOOLSS_GETPRINTERDRIVER2 0x35
100 /* find close printer notification */
101 #define SPOOLSS_FCPN 0x38
102 /* remote find first printer change notifyEx */
103 #define SPOOLSS_RFFPCNEX 0x41
104 /* remote find next printer change notifyEx */
105 #define SPOOLSS_RFNPCNEX 0x43
106 #define SPOOLSS_OPENPRINTEREX 0x45
107 #define SPOOLSS_ADDPRINTEREX 0x46
108 #define SPOOLSS_ENUMPRINTERDATA 0x48
111 #define SERVER_ACCESS_ADMINISTER 0x00000001
112 #define SERVER_ACCESS_ENUMERATE 0x00000002
114 #define PRINTER_ACCESS_ADMINISTER 0x00000004
115 #define PRINTER_ACCESS_USE 0x00000008
117 #define PRINTER_CONTROL_UNPAUSE 0x00000000
118 #define PRINTER_CONTROL_PAUSE 0x00000001
119 #define PRINTER_CONTROL_RESUME 0x00000002
120 #define PRINTER_CONTROL_PURGE 0x00000003
121 #define PRINTER_CONTROL_SET_STATUS 0x00000004
123 #define PRINTER_STATUS_PAUSED 0x00000001
124 #define PRINTER_STATUS_ERROR 0x00000002
125 #define PRINTER_STATUS_PENDING_DELETION 0x00000004
126 #define PRINTER_STATUS_PAPER_JAM 0x00000008
128 #define PRINTER_STATUS_PAPER_OUT 0x00000010
129 #define PRINTER_STATUS_MANUAL_FEED 0x00000020
130 #define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
131 #define PRINTER_STATUS_OFFLINE 0x00000080
133 #define PRINTER_STATUS_IO_ACTIVE 0x00000100
134 #define PRINTER_STATUS_BUSY 0x00000200
135 #define PRINTER_STATUS_PRINTING 0x00000400
136 #define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
138 #define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
139 #define PRINTER_STATUS_WAITING 0x00002000
140 #define PRINTER_STATUS_PROCESSING 0x00004000
141 #define PRINTER_STATUS_INITIALIZING 0x00008000
143 #define PRINTER_STATUS_WARMING_UP 0x00010000
144 #define PRINTER_STATUS_TONER_LOW 0x00020000
145 #define PRINTER_STATUS_NO_TONER 0x00040000
146 #define PRINTER_STATUS_PAGE_PUNT 0x00080000
148 #define PRINTER_STATUS_USER_INTERVENTION 0x00100000
149 #define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
150 #define PRINTER_STATUS_DOOR_OPEN 0x00400000
151 #define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
153 #define PRINTER_STATUS_POWER_SAVE 0x01000000
155 #define JOB_ACCESS_ADMINISTER 0x00000010
157 #define STANDARD_RIGHTS_READ 0x00020000
158 #define STANDARD_RIGHTS_WRITE STANDARD_RIGHTS_READ
159 #define STANDARD_RIGHTS_EXECUTE STANDARD_RIGHTS_READ
160 #define STANDARD_RIGHTS_REQUIRED 0x000F0000
162 /* Access rights for print servers */
163 #define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
164 #define SERVER_READ STANDARD_RIGHTS_READ|SERVER_ACCESS_ENUMERATE
165 #define SERVER_WRITE STANDARD_RIGHTS_WRITE|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
166 #define SERVER_EXECUTE STANDARD_RIGHTS_EXECUTE|SERVER_ACCESS_ENUMERATE
168 /* Access rights for printers */
169 #define PRINTER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
170 #define PRINTER_READ STANDARD_RIGHTS_READ|PRINTER_ACCESS_USE
171 #define PRINTER_WRITE STANDARD_RIGHTS_WRITE|PRINTER_ACCESS_USE
172 #define PRINTER_EXECUTE STANDARD_RIGHTS_EXECUTE|PRINTER_ACCESS_USE
174 /* Access rights for jobs */
175 #define JOB_ALL_ACCESS STANDARD_RIGHTS_REQUIRED|JOB_ACCESS_ADMINISTER
176 #define JOB_READ STANDARD_RIGHTS_READ|JOB_ACCESS_ADMINISTER
177 #define JOB_WRITE STANDARD_RIGHTS_WRITE|JOB_ACCESS_ADMINISTER
178 #define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE|JOB_ACCESS_ADMINISTER
180 #define POLICY_HND_SIZE 20
186 #define PRINTER_NOTIFY_TYPE 0x00
187 #define JOB_NOTIFY_TYPE 0x01
189 #define MAX_PRINTER_NOTIFY 26
191 #define PRINTER_NOTIFY_SERVER_NAME 0x00
192 #define PRINTER_NOTIFY_PRINTER_NAME 0x01
193 #define PRINTER_NOTIFY_SHARE_NAME 0x02
194 #define PRINTER_NOTIFY_PORT_NAME 0x03
195 #define PRINTER_NOTIFY_DRIVER_NAME 0x04
196 #define PRINTER_NOTIFY_COMMENT 0x05
197 #define PRINTER_NOTIFY_LOCATION 0x06
198 #define PRINTER_NOTIFY_DEVMODE 0x07
199 #define PRINTER_NOTIFY_SEPFILE 0x08
200 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09
201 #define PRINTER_NOTIFY_PARAMETERS 0x0A
202 #define PRINTER_NOTIFY_DATATYPE 0x0B
203 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C
204 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D
205 #define PRINTER_NOTIFY_PRIORITY 0x0E
206 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F
207 #define PRINTER_NOTIFY_START_TIME 0x10
208 #define PRINTER_NOTIFY_UNTIL_TIME 0x11
209 #define PRINTER_NOTIFY_STATUS 0x12
210 #define PRINTER_NOTIFY_STATUS_STRING 0x13
211 #define PRINTER_NOTIFY_CJOBS 0x14
212 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15
213 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16
214 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17
215 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18
216 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19
218 #define MAX_JOB_NOTIFY 24
220 #define JOB_NOTIFY_PRINTER_NAME 0x00
221 #define JOB_NOTIFY_MACHINE_NAME 0x01
222 #define JOB_NOTIFY_PORT_NAME 0x02
223 #define JOB_NOTIFY_USER_NAME 0x03
224 #define JOB_NOTIFY_NOTIFY_NAME 0x04
225 #define JOB_NOTIFY_DATATYPE 0x05
226 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06
227 #define JOB_NOTIFY_PARAMETERS 0x07
228 #define JOB_NOTIFY_DRIVER_NAME 0x08
229 #define JOB_NOTIFY_DEVMODE 0x09
230 #define JOB_NOTIFY_STATUS 0x0A
231 #define JOB_NOTIFY_STATUS_STRING 0x0B
232 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C
233 #define JOB_NOTIFY_DOCUMENT 0x0D
234 #define JOB_NOTIFY_PRIORITY 0x0E
235 #define JOB_NOTIFY_POSITION 0x0F
236 #define JOB_NOTIFY_SUBMITTED 0x10
237 #define JOB_NOTIFY_START_TIME 0x11
238 #define JOB_NOTIFY_UNTIL_TIME 0x12
239 #define JOB_NOTIFY_TIME 0x13
240 #define JOB_NOTIFY_TOTAL_PAGES 0x14
241 #define JOB_NOTIFY_PAGES_PRINTED 0x15
242 #define JOB_NOTIFY_TOTAL_BYTES 0x16
243 #define JOB_NOTIFY_BYTES_PRINTED 0x17
246 * The printer attributes.
247 * I #defined all of them (grabbed form MSDN)
249 * ( SHARED | NETWORK | RAW_ONLY )
250 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
253 #define PRINTER_ATTRIBUTE_QUEUED 0x00000001
254 #define PRINTER_ATTRIBUTE_DIRECT 0x00000002
255 #define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
256 #define PRINTER_ATTRIBUTE_SHARED 0x00000008
258 #define PRINTER_ATTRIBUTE_NETWORK 0x00000010
259 #define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
260 #define PRINTER_ATTRIBUTE_LOCAL 0x00000040
261 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
263 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
264 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
265 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
266 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
268 #define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000
270 #define NO_PRIORITY 0
271 #define MAX_PRIORITY 99
272 #define MIN_PRIORITY 1
273 #define DEF_PRIORITY 1
275 #define PRINTER_ENUM_DEFAULT 0x00000001
276 #define PRINTER_ENUM_LOCAL 0x00000002
277 #define PRINTER_ENUM_CONNECTIONS 0x00000004
278 #define PRINTER_ENUM_FAVORITE 0x00000004
279 #define PRINTER_ENUM_NAME 0x00000008
280 #define PRINTER_ENUM_REMOTE 0x00000010
281 #define PRINTER_ENUM_SHARED 0x00000020
282 #define PRINTER_ENUM_NETWORK 0x00000040
284 #define PRINTER_ENUM_EXPAND 0x00004000
285 #define PRINTER_ENUM_CONTAINER 0x00008000
287 #define PRINTER_ENUM_ICONMASK 0x00ff0000
288 #define PRINTER_ENUM_ICON1 0x00010000
289 #define PRINTER_ENUM_ICON2 0x00020000
290 #define PRINTER_ENUM_ICON3 0x00040000
291 #define PRINTER_ENUM_ICON4 0x00080000
292 #define PRINTER_ENUM_ICON5 0x00100000
293 #define PRINTER_ENUM_ICON6 0x00200000
294 #define PRINTER_ENUM_ICON7 0x00400000
295 #define PRINTER_ENUM_ICON8 0x00800000
312 char architecture[100];
314 char default_form[30];
318 char configfile[100];
321 char monitor_name[100];
325 typedef struct devicemode
329 uint16 driverversion;
339 uint16 defaultsource;
352 uint32 displayfrequency;
360 uint32 panningheight;
364 typedef struct devicemode_container
368 uint32 size_of_buffer;
369 } DEVICEMODE_CONTAINER;
371 #define ORIENTATION 0x00000001L
372 #define PAPERSIZE 0x00000002L
373 #define PAPERLENGTH 0x00000004L
374 #define PAPERWIDTH 0x00000008L
375 #define SCALE 0x00000010L
376 #define COPIES 0x00000100L
377 #define DEFAULTSOURCE 0x00000200L
378 #define PRINTQUALITY 0x00000400L
379 #define COLOR 0x00000800L
380 #define DUPLEX 0x00001000L
381 #define YRESOLUTION 0x00002000L
382 #define TTOPTION 0x00004000L
383 #define COLLATE 0x00008000L
384 #define FORMNAME 0x00010000L
385 #define LOGPIXELS 0x00020000L
386 #define BITSPERPEL 0x00040000L
387 #define PELSWIDTH 0x00080000L
388 #define PELSHEIGHT 0x00100000L
389 #define DISPLAYFLAGS 0x00200000L
390 #define DISPLAYFREQUENCY 0x00400000L
391 #define PANNINGWIDTH 0x00800000L
392 #define PANNINGHEIGHT 0x01000000L
394 #define ORIENT_PORTRAIT 1
395 #define ORIENT_LANDSCAPE 2
397 #define PAPER_FIRST PAPER_LETTER
398 #define PAPER_LETTER 1 /* Letter 8 1/2 x 11 in */
399 #define PAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */
400 #define PAPER_TABLOID 3 /* Tabloid 11 x 17 in */
401 #define PAPER_LEDGER 4 /* Ledger 17 x 11 in */
402 #define PAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */
403 #define PAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */
404 #define PAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */
405 #define PAPER_A3 8 /* A3 297 x 420 mm */
406 #define PAPER_A4 9 /* A4 210 x 297 mm */
407 #define PAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */
408 #define PAPER_A5 11 /* A5 148 x 210 mm */
409 #define PAPER_B4 12 /* B4 (JIS) 250 x 354 */
410 #define PAPER_B5 13 /* B5 (JIS) 182 x 257 mm */
411 #define PAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */
412 #define PAPER_QUARTO 15 /* Quarto 215 x 275 mm */
413 #define PAPER_10X14 16 /* 10x14 in */
414 #define PAPER_11X17 17 /* 11x17 in */
415 #define PAPER_NOTE 18 /* Note 8 1/2 x 11 in */
416 #define PAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */
417 #define PAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */
418 #define PAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */
419 #define PAPER_ENV_12 22 /* Envelope #12 4 \276 x 11 */
420 #define PAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 */
421 #define PAPER_CSHEET 24 /* C size sheet */
422 #define PAPER_DSHEET 25 /* D size sheet */
423 #define PAPER_ESHEET 26 /* E size sheet */
424 #define PAPER_ENV_DL 27 /* Envelope DL 110 x 220mm */
425 #define PAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */
426 #define PAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */
427 #define PAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */
428 #define PAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */
429 #define PAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */
430 #define PAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */
431 #define PAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */
432 #define PAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */
433 #define PAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */
434 #define PAPER_ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */
435 #define PAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
436 #define PAPER_FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */
437 #define PAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */
438 #define PAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */
440 #define PAPER_LAST PAPER_FANFOLD_LGL_GERMAN
441 #define PAPER_USER 256
443 #define BIN_FIRST BIN_UPPER
445 #define BIN_ONLYONE 1
449 #define BIN_ENVELOPE 5
450 #define BIN_ENVMANUAL 6
452 #define BIN_TRACTOR 8
453 #define BIN_SMALLFMT 9
454 #define BIN_LARGEFMT 10
455 #define BIN_LARGECAPACITY 11
456 #define BIN_CASSETTE 14
457 #define BIN_FORMSOURCE 15
458 #define BIN_LAST BIN_FORMSOURCE
460 #define BIN_USER 256 /* device specific bins start here */
462 #define RES_DRAFT (-1)
464 #define RES_MEDIUM (-3)
465 #define RES_HIGH (-4)
467 #define COLOR_MONOCHROME 1
468 #define COLOR_COLOR 2
470 #define DUP_SIMPLEX 1
471 #define DUP_VERTICAL 2
472 #define DUP_HORIZONTAL 3
474 #define TT_BITMAP 1 /* print TT fonts as graphics */
475 #define TT_DOWNLOAD 2 /* download TT fonts as soft fonts */
476 #define TT_SUBDEV 3 /* substitute device fonts for TT fonts */
478 #define COLLATE_FALSE 0
479 #define COLLATE_TRUE 1
481 typedef struct s_header_type
491 typedef struct s_buffer
501 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
502 typedef struct spool_q_open_printer_ex
509 uint32 access_required;
510 uint32 unknown1; /* 0x0000 0001 */
511 uint32 unknown2; /* 0x0000 0001 */
512 uint32 unknown3; /* ??? pointer? */
513 uint32 unknown4; /* 0x0000 001c */
514 uint32 unknown5; /* ??? e.g 0xb94dd0 */
515 uint32 unknown6; /* ??? pointer? */
516 uint32 unknown7; /* 0x0000 0565 */
517 uint32 unknown8; /* 0x0000 0002 */
518 uint32 unknown9; /* 0x0000 0000 */
519 uint32 unknown10; /* 0x0000 0000 */
523 } SPOOL_Q_OPEN_PRINTER_EX;
525 /* SPOOL_Q_OPEN_PRINTER_EX reply to an open printer */
526 typedef struct spool_r_open_printer_ex
528 POLICY_HND handle; /* handle used along all transactions (20*uint8) */
531 } SPOOL_R_OPEN_PRINTER_EX;
533 typedef struct spool_q_getprinterdata
538 } SPOOL_Q_GETPRINTERDATA;
540 typedef struct spool_r_getprinterdata
548 } SPOOL_R_GETPRINTERDATA;
550 typedef struct spool_q_closeprinter
553 } SPOOL_Q_CLOSEPRINTER;
555 typedef struct spool_r_closeprinter
559 } SPOOL_R_CLOSEPRINTER;
561 typedef struct spool_q_startpageprinter
564 } SPOOL_Q_STARTPAGEPRINTER;
566 typedef struct spool_r_startpageprinter
569 } SPOOL_R_STARTPAGEPRINTER;
571 typedef struct spool_q_endpageprinter
574 } SPOOL_Q_ENDPAGEPRINTER;
576 typedef struct spool_r_endpageprinter
579 } SPOOL_R_ENDPAGEPRINTER;
581 typedef struct spool_doc_info_1
591 typedef struct spool_doc_info
594 DOC_INFO_1 doc_info_1;
597 typedef struct spool_doc_info_container
601 } DOC_INFO_CONTAINER;
603 typedef struct spool_q_startdocprinter
606 DOC_INFO_CONTAINER doc_info_container;
607 } SPOOL_Q_STARTDOCPRINTER;
609 typedef struct spool_r_startdocprinter
613 } SPOOL_R_STARTDOCPRINTER;
615 typedef struct spool_q_enddocprinter
618 } SPOOL_Q_ENDDOCPRINTER;
620 typedef struct spool_r_enddocprinter
623 } SPOOL_R_ENDDOCPRINTER;
625 typedef struct spool_q_writeprinter
631 } SPOOL_Q_WRITEPRINTER;
633 typedef struct spool_r_writeprinter
635 uint32 buffer_written;
637 } SPOOL_R_WRITEPRINTER;
639 typedef struct spool_notify_option_type
647 } SPOOL_NOTIFY_OPTION_TYPE;
649 typedef struct spool_notify_option
654 SPOOL_NOTIFY_OPTION_TYPE type[16]; /* totally arbitrary !!! */
655 } SPOOL_NOTIFY_OPTION;
657 typedef struct spool_notify_info_data
674 } SPOOL_NOTIFY_INFO_DATA;
676 typedef struct spool_notify_info
681 SPOOL_NOTIFY_INFO_DATA data[26*16];
682 /* 26 differents data types */
683 /* so size it for 16 printers at max */
684 /* jfmxxxx: Have to make it dynamic !!!*/
687 /* If the struct name looks obscure, yes it is ! */
688 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
689 typedef struct spoolss_q_rffpcnex
694 UNISTR2 localmachine;
696 SPOOL_NOTIFY_OPTION option;
699 typedef struct spool_r_rffpcnex
704 /* Remote Find Next Printer Change Notify Ex */
705 typedef struct spool_q_rfnpcnex
709 SPOOL_NOTIFY_OPTION option;
712 typedef struct spool_r_rfnpcnex
715 SPOOL_NOTIFY_INFO info;
718 /* Find Close Printer Notify */
719 typedef struct spool_q_fcpn
724 typedef struct spool_r_fcpn
730 typedef struct printer_info_0
764 typedef struct printer_info_1
772 typedef struct printer_info_2
783 UNISTR printprocessor;
786 /*SECURITY_DESCRIPTOR securitydescriptor;*/
789 uint32 defaultpriority;
797 typedef struct spool_q_enumprinters
804 } SPOOL_Q_ENUMPRINTERS;
806 typedef struct spool_r_enumprinters
808 uint32 offered; /* number of bytes offered */
809 uint32 needed; /* bytes needed */
810 uint32 returned; /* number of printers */
815 PRINTER_INFO_1 **printers_1;
816 PRINTER_INFO_2 **printers_2;
819 } SPOOL_R_ENUMPRINTERS;
822 typedef struct spool_q_getprinter
829 } SPOOL_Q_GETPRINTER;
831 typedef struct spool_r_getprinter
840 PRINTER_INFO_0 *info0;
841 PRINTER_INFO_1 *info1;
842 PRINTER_INFO_2 *info2;
845 } SPOOL_R_GETPRINTER;
847 struct s_notify_info_data_table
853 void (*fn) (int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer);
856 typedef struct spool_q_getprinterdriver2
859 UNISTR2 architecture;
864 } SPOOL_Q_GETPRINTERDRIVER2;
866 typedef struct driver_info_1
871 typedef struct driver_info_2
881 typedef struct driver_info_3
890 UNISTR **dependentfiles;
892 UNISTR defaultdatatype;
895 typedef struct spool_r_getprinterdriver2
903 DRIVER_INFO_1 *info1;
904 DRIVER_INFO_2 *info2;
905 DRIVER_INFO_3 *info3;
907 } SPOOL_R_GETPRINTERDRIVER2;
909 typedef struct add_jobinfo_1
916 typedef struct spool_q_addjob
924 typedef struct spool_r_addjob
930 * I'm really wondering how many different time formats
931 * I will have to cope with
933 * JFM, 09/13/98 In a mad mood ;-(
935 typedef struct systemtime
947 typedef struct s_job_info_1
961 SYSTEMTIME submitted;
964 typedef struct s_job_info_2
973 UNISTR printprocessor;
978 /* SEC_DESC sec_desc;*/
986 SYSTEMTIME submitted;
991 typedef struct spool_q_enumjobs
1001 typedef struct spool_r_enumjobs
1005 JOB_INFO_1 **job_info_1;
1006 JOB_INFO_2 **job_info_2;
1014 typedef struct spool_q_schedulejob
1018 } SPOOL_Q_SCHEDULEJOB;
1020 typedef struct spool_r_schedulejob
1023 } SPOOL_R_SCHEDULEJOB;
1025 typedef struct s_port_info_1
1030 typedef struct s_port_info_2
1033 UNISTR monitor_name;
1039 typedef struct spool_q_enumports
1045 } SPOOL_Q_ENUMPORTS;
1047 typedef struct spool_r_enumports
1051 PORT_INFO_1 *port_info_1;
1052 PORT_INFO_2 *port_info_2;
1057 } SPOOL_R_ENUMPORTS;
1059 #define JOB_CONTROL_PAUSE 1
1060 #define JOB_CONTROL_RESUME 2
1061 #define JOB_CONTROL_CANCEL 3
1062 #define JOB_CONTROL_RESTART 4
1063 #define JOB_CONTROL_DELETE 5
1065 typedef struct spool_q_setjob
1071 JOB_INFO_1 job_info_1;
1072 JOB_INFO_2 job_info_2;
1077 typedef struct spool_r_setjob
1082 typedef struct spool_q_enumprinterdrivers
1085 UNISTR2 environment;
1089 } SPOOL_Q_ENUMPRINTERDRIVERS;
1091 typedef struct spool_r_enumprinterdrivers
1095 DRIVER_INFO_1 *driver_info_1;
1096 DRIVER_INFO_2 *driver_info_2;
1097 DRIVER_INFO_3 *driver_info_3;
1100 uint32 numofdrivers;
1102 } SPOOL_R_ENUMPRINTERDRIVERS;
1104 typedef struct spool_form_1
1116 typedef struct spool_q_enumforms
1122 } SPOOL_Q_ENUMFORMS;
1124 typedef struct spool_r_enumforms
1131 } SPOOL_R_ENUMFORMS;
1134 typedef struct spool_printer_info_level_2
1136 uint32 servername_ptr;
1137 uint32 printername_ptr;
1138 uint32 sharename_ptr;
1139 uint32 portname_ptr;
1140 uint32 drivername_ptr;
1142 uint32 location_ptr;
1145 uint32 printprocessor_ptr;
1146 uint32 datatype_ptr;
1147 uint32 parameters_ptr;
1151 uint32 default_priority;
1158 UNISTR2 printername;
1165 UNISTR2 printprocessor;
1168 SEC_DESC_BUF *secdesc;
1169 } SPOOL_PRINTER_INFO_LEVEL_2;
1171 typedef struct spool_printer_info_level
1173 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1174 } SPOOL_PRINTER_INFO_LEVEL;
1176 typedef struct spool_printer_driver_info_level_3
1180 uint32 environment_ptr;
1181 uint32 driverpath_ptr;
1182 uint32 datafile_ptr;
1183 uint32 configfile_ptr;
1184 uint32 helpfile_ptr;
1185 uint32 monitorname_ptr;
1186 uint32 defaultdatatype_ptr;
1187 uint32 dependentfilessize;
1188 uint32 dependentfiles_ptr;
1191 UNISTR2 environment;
1196 UNISTR2 monitorname;
1197 UNISTR2 defaultdatatype;
1198 BUFFER5 dependentfiles;
1200 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1202 typedef struct spool_printer_driver_info_level
1204 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1205 } SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1208 /* this struct is undocumented */
1209 /* thanks to the ddk ... */
1210 typedef struct spool_user_level_1
1213 uint32 client_name_ptr;
1214 uint32 user_name_ptr;
1219 UNISTR2 client_name;
1221 } SPOOL_USER_LEVEL_1;
1223 typedef struct spool_user_level
1225 SPOOL_USER_LEVEL_1 *user_level_1;
1228 typedef struct spool_q_setprinter
1232 SPOOL_PRINTER_INFO_LEVEL info;
1234 DEVICEMODE *devmode;
1237 uint32 size_of_buffer;
1242 } SPOOL_Q_SETPRINTER;
1244 typedef struct spool_r_setprinter
1247 } SPOOL_R_SETPRINTER;
1249 typedef struct spool_q_addprinter
1251 UNISTR2 server_name;
1253 SPOOL_PRINTER_INFO_LEVEL info;
1259 SPOOL_USER_LEVEL user;
1260 } SPOOL_Q_ADDPRINTER;
1262 typedef struct spool_r_addprinter
1265 } SPOOL_R_ADDPRINTER;
1267 typedef struct spool_q_addprinterex
1269 UNISTR2 server_name;
1271 SPOOL_PRINTER_INFO_LEVEL info;
1277 SPOOL_USER_LEVEL user;
1278 } SPOOL_Q_ADDPRINTEREX;
1281 typedef struct spool_r_addprinterex
1285 } SPOOL_R_ADDPRINTEREX;
1287 typedef struct spool_q_addprinterdriver
1289 UNISTR2 server_name;
1291 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1292 } SPOOL_Q_ADDPRINTERDRIVER;
1294 typedef struct spool_r_addprinterdriver
1297 } SPOOL_R_ADDPRINTERDRIVER;
1299 typedef struct spool_q_getprinterdriverdirectory
1302 UNISTR2 environment;
1306 } SPOOL_Q_GETPRINTERDRIVERDIR;
1308 typedef struct driver_directory_1
1311 } DRIVER_DIRECTORY_1 ;
1313 typedef struct spool_r_getprinterdriverdirectory
1317 DRIVER_DIRECTORY_1 driver_info_1;
1321 } SPOOL_R_GETPRINTERDRIVERDIR;
1323 typedef struct spool_q_enumprintprocessors
1326 UNISTR2 environment;
1330 } SPOOL_Q_ENUMPRINTPROCESSORS;
1332 typedef struct printprocessor_1
1337 typedef struct spool_r_enumprintprocessors
1340 PRINTPROCESSOR_1 *info_1;
1342 uint32 numofprintprocessors;
1344 } SPOOL_R_ENUMPRINTPROCESSORS;
1346 typedef struct spool_q_enumprintprocessordatatypes
1349 UNISTR2 printprocessor;
1353 } SPOOL_Q_ENUMPRINTPROCESSORDATATYPES;
1355 typedef struct ppdatatype_1
1360 typedef struct spool_r_enumprintprocessordatatypes
1363 PPDATATYPE_1 *info_1;
1365 uint32 numofppdatatypes;
1367 } SPOOL_R_ENUMPRINTPROCESSORDATATYPES;
1369 typedef struct spool_q_enumprintmonitors
1375 } SPOOL_Q_ENUMPRINTMONITORS;
1377 typedef struct printmonitor_1
1382 typedef struct spool_r_enumprintmonitors
1385 PRINTMONITOR_1 *info_1;
1387 uint32 numofprintmonitors;
1389 } SPOOL_R_ENUMPRINTMONITORS;
1391 typedef struct spool_q_enumprinterdata
1397 } SPOOL_Q_ENUMPRINTERDATA;
1399 typedef struct spool_r_enumprinterdata
1403 uint32 realvaluesize;
1407 uint32 realdatasize;
1409 } SPOOL_R_ENUMPRINTERDATA;
1411 typedef struct spool_q_setprinterdata
1419 uint32 numeric_data;
1420 } SPOOL_Q_SETPRINTERDATA;
1422 typedef struct spool_r_setprinterdata
1425 } SPOOL_R_SETPRINTERDATA;
1427 typedef struct _form
1440 typedef struct spool_q_addform
1448 typedef struct spool_r_addform
1453 typedef struct spool_q_setform
1462 typedef struct spool_r_setform
1467 typedef struct spool_q_getjob
1476 typedef struct spool_r_getjob
1480 JOB_INFO_1 *job_info_1;
1481 JOB_INFO_2 *job_info_2;
1487 #define PRINTER_DRIVER_VERSION 2
1488 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
1491 #endif /* _RPC_SPOOLSS_H */