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 PRINTER_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 #define ERROR_INVALID_HANDLE 6
482 #define ERROR_INVALID_PARAMETER 87
483 #define ERROR_INSUFFICIENT_BUFFER 122
485 typedef struct s_header_type
495 typedef struct s_buffer
506 typedef struct printer_policy_info
508 uint8 data[PRINTER_HND_SIZE]; /* printer handle */
512 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
513 typedef struct spool_q_open_printer_ex
520 uint32 access_required;
521 uint32 unknown1; /* 0x0000 0001 */
522 uint32 unknown2; /* 0x0000 0001 */
523 uint32 unknown3; /* ??? pointer? */
524 uint32 unknown4; /* 0x0000 001c */
525 uint32 unknown5; /* ??? e.g 0xb94dd0 */
526 uint32 unknown6; /* ??? pointer? */
527 uint32 unknown7; /* 0x0000 0565 */
528 uint32 unknown8; /* 0x0000 0002 */
529 uint32 unknown9; /* 0x0000 0000 */
530 uint32 unknown10; /* 0x0000 0000 */
534 } SPOOL_Q_OPEN_PRINTER_EX;
536 /* SPOOL_Q_OPEN_PRINTER_EX reply to an open printer */
537 typedef struct spool_r_open_printer_ex
539 PRINTER_HND handle; /* handle used along all transactions (20*uint8) */
542 } SPOOL_R_OPEN_PRINTER_EX;
544 typedef struct spool_q_getprinterdata
549 } SPOOL_Q_GETPRINTERDATA;
551 typedef struct spool_r_getprinterdata
559 } SPOOL_R_GETPRINTERDATA;
561 typedef struct spool_q_closeprinter
564 } SPOOL_Q_CLOSEPRINTER;
566 typedef struct spool_r_closeprinter
570 } SPOOL_R_CLOSEPRINTER;
572 typedef struct spool_q_startpageprinter
575 } SPOOL_Q_STARTPAGEPRINTER;
577 typedef struct spool_r_startpageprinter
580 } SPOOL_R_STARTPAGEPRINTER;
582 typedef struct spool_q_endpageprinter
585 } SPOOL_Q_ENDPAGEPRINTER;
587 typedef struct spool_r_endpageprinter
590 } SPOOL_R_ENDPAGEPRINTER;
592 typedef struct spool_doc_info_1
602 typedef struct spool_doc_info
605 DOC_INFO_1 doc_info_1;
608 typedef struct spool_doc_info_container
612 } DOC_INFO_CONTAINER;
614 typedef struct spool_q_startdocprinter
617 DOC_INFO_CONTAINER doc_info_container;
618 } SPOOL_Q_STARTDOCPRINTER;
620 typedef struct spool_r_startdocprinter
624 } SPOOL_R_STARTDOCPRINTER;
626 typedef struct spool_q_enddocprinter
629 } SPOOL_Q_ENDDOCPRINTER;
631 typedef struct spool_r_enddocprinter
634 } SPOOL_R_ENDDOCPRINTER;
636 typedef struct spool_q_writeprinter
642 } SPOOL_Q_WRITEPRINTER;
644 typedef struct spool_r_writeprinter
646 uint32 buffer_written;
648 } SPOOL_R_WRITEPRINTER;
650 typedef struct spool_notify_option_type
658 } SPOOL_NOTIFY_OPTION_TYPE;
660 typedef struct spool_notify_option
665 SPOOL_NOTIFY_OPTION_TYPE type[16]; /* totally arbitrary !!! */
666 } SPOOL_NOTIFY_OPTION;
668 typedef struct spool_notify_info_data
685 } SPOOL_NOTIFY_INFO_DATA;
687 typedef struct spool_notify_info
692 SPOOL_NOTIFY_INFO_DATA data[26*16];
693 /* 26 differents data types */
694 /* so size it for 16 printers at max */
695 /* jfmxxxx: Have to make it dynamic !!!*/
698 /* If the struct name looks obscure, yes it is ! */
699 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
700 typedef struct spoolss_q_rffpcnex
705 UNISTR2 localmachine;
707 SPOOL_NOTIFY_OPTION option;
710 typedef struct spool_r_rffpcnex
715 /* Remote Find Next Printer Change Notify Ex */
716 typedef struct spool_q_rfnpcnex
720 SPOOL_NOTIFY_OPTION option;
723 typedef struct spool_r_rfnpcnex
726 SPOOL_NOTIFY_INFO info;
729 /* Find Close Printer Notify */
730 typedef struct spool_q_fcpn
735 typedef struct spool_r_fcpn
741 typedef struct printer_info_0
775 typedef struct printer_info_1
783 typedef struct printer_info_2
794 UNISTR printprocessor;
797 /*SECURITY_DESCRIPTOR securitydescriptor;*/
800 uint32 defaultpriority;
808 typedef struct spool_q_enumprinters
815 } SPOOL_Q_ENUMPRINTERS;
817 typedef struct spool_r_enumprinters
819 uint32 offered; /* number of bytes offered */
820 uint32 needed; /* bytes needed */
821 uint32 returned; /* number of printers */
826 PRINTER_INFO_1 **printers_1;
827 PRINTER_INFO_2 **printers_2;
830 } SPOOL_R_ENUMPRINTERS;
833 typedef struct spool_q_getprinter
840 } SPOOL_Q_GETPRINTER;
842 typedef struct spool_r_getprinter
851 PRINTER_INFO_0 *info0;
852 PRINTER_INFO_1 *info1;
853 PRINTER_INFO_2 *info2;
856 } SPOOL_R_GETPRINTER;
858 struct s_notify_info_data_table
864 void (*fn) (connection_struct *conn, int snum, SPOOL_NOTIFY_INFO_DATA *data, print_queue_struct *queue, NT_PRINTER_INFO_LEVEL *printer);
867 typedef struct spool_q_getprinterdriver2
870 UNISTR2 architecture;
875 } SPOOL_Q_GETPRINTERDRIVER2;
877 typedef struct driver_info_1
882 typedef struct driver_info_2
892 typedef struct driver_info_3
901 UNISTR **dependentfiles;
903 UNISTR defaultdatatype;
906 typedef struct spool_r_getprinterdriver2
914 DRIVER_INFO_1 *info1;
915 DRIVER_INFO_2 *info2;
916 DRIVER_INFO_3 *info3;
918 } SPOOL_R_GETPRINTERDRIVER2;
920 typedef struct add_jobinfo_1
927 typedef struct spool_q_addjob
935 typedef struct spool_r_addjob
941 * I'm really wondering how many different time formats
942 * I will have to cope with
944 * JFM, 09/13/98 In a mad mood ;-(
946 typedef struct systemtime
958 typedef struct s_job_info_1
972 SYSTEMTIME submitted;
975 typedef struct s_job_info_2
984 UNISTR printprocessor;
989 /* SEC_DESC sec_desc;*/
997 SYSTEMTIME submitted;
1002 typedef struct spool_q_enumjobs
1012 typedef struct spool_r_enumjobs
1016 JOB_INFO_1 **job_info_1;
1017 JOB_INFO_2 **job_info_2;
1024 typedef struct spool_q_schedulejob
1028 } SPOOL_Q_SCHEDULEJOB;
1030 typedef struct spool_r_schedulejob
1033 } SPOOL_R_SCHEDULEJOB;
1035 typedef struct s_port_info_1
1040 typedef struct s_port_info_2
1043 UNISTR monitor_name;
1049 typedef struct spool_q_enumports
1055 } SPOOL_Q_ENUMPORTS;
1057 typedef struct spool_r_enumports
1061 PORT_INFO_1 *port_info_1;
1062 PORT_INFO_2 *port_info_2;
1067 } SPOOL_R_ENUMPORTS;
1069 #define JOB_CONTROL_PAUSE 1
1070 #define JOB_CONTROL_RESUME 2
1071 #define JOB_CONTROL_CANCEL 3
1072 #define JOB_CONTROL_RESTART 4
1073 #define JOB_CONTROL_DELETE 5
1075 typedef struct spool_q_setjob
1081 JOB_INFO_1 job_info_1;
1082 JOB_INFO_2 job_info_2;
1087 typedef struct spool_r_setjob
1092 typedef struct spool_q_enumprinterdrivers
1095 UNISTR2 environment;
1099 } SPOOL_Q_ENUMPRINTERDRIVERS;
1101 typedef struct spool_r_enumprinterdrivers
1105 DRIVER_INFO_1 *driver_info_1;
1106 DRIVER_INFO_2 *driver_info_2;
1107 DRIVER_INFO_3 *driver_info_3;
1110 uint32 numofdrivers;
1112 } SPOOL_R_ENUMPRINTERDRIVERS;
1114 typedef struct spool_form_1
1126 typedef struct spool_q_enumforms
1132 } SPOOL_Q_ENUMFORMS;
1134 typedef struct spool_r_enumforms
1141 } SPOOL_R_ENUMFORMS;
1144 typedef struct spool_printer_info_level_2
1146 uint32 servername_ptr;
1147 uint32 printername_ptr;
1148 uint32 sharename_ptr;
1149 uint32 portname_ptr;
1150 uint32 drivername_ptr;
1152 uint32 location_ptr;
1155 uint32 printprocessor_ptr;
1156 uint32 datatype_ptr;
1157 uint32 parameters_ptr;
1161 uint32 default_priority;
1168 UNISTR2 printername;
1175 UNISTR2 printprocessor;
1178 SEC_DESC_BUF *secdesc;
1179 } SPOOL_PRINTER_INFO_LEVEL_2;
1181 typedef struct spool_printer_info_level
1183 SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1184 } SPOOL_PRINTER_INFO_LEVEL;
1186 typedef struct spool_printer_driver_info_level_3
1190 uint32 environment_ptr;
1191 uint32 driverpath_ptr;
1192 uint32 datafile_ptr;
1193 uint32 configfile_ptr;
1194 uint32 helpfile_ptr;
1195 uint32 monitorname_ptr;
1196 uint32 defaultdatatype_ptr;
1197 uint32 dependentfilessize;
1198 uint32 dependentfiles_ptr;
1201 UNISTR2 environment;
1206 UNISTR2 monitorname;
1207 UNISTR2 defaultdatatype;
1208 BUFFER5 dependentfiles;
1210 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1212 typedef struct spool_printer_driver_info_level
1214 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1215 } SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1218 /* this struct is undocumented */
1219 /* thanks to the ddk ... */
1220 typedef struct spool_user_level_1
1223 uint32 client_name_ptr;
1224 uint32 user_name_ptr;
1229 UNISTR2 client_name;
1231 } SPOOL_USER_LEVEL_1;
1233 typedef struct spool_user_level
1235 SPOOL_USER_LEVEL_1 *user_level_1;
1238 typedef struct spool_q_setprinter
1242 SPOOL_PRINTER_INFO_LEVEL info;
1244 DEVICEMODE *devmode;
1247 uint32 size_of_buffer;
1252 } SPOOL_Q_SETPRINTER;
1254 typedef struct spool_r_setprinter
1257 } SPOOL_R_SETPRINTER;
1259 typedef struct spool_q_addprinter
1261 UNISTR2 server_name;
1263 SPOOL_PRINTER_INFO_LEVEL info;
1269 SPOOL_USER_LEVEL user;
1270 } SPOOL_Q_ADDPRINTER;
1272 typedef struct spool_r_addprinter
1275 } SPOOL_R_ADDPRINTER;
1277 typedef struct spool_q_addprinterex
1279 UNISTR2 server_name;
1281 SPOOL_PRINTER_INFO_LEVEL info;
1287 SPOOL_USER_LEVEL user;
1288 } SPOOL_Q_ADDPRINTEREX;
1291 typedef struct spool_r_addprinterex
1295 } SPOOL_R_ADDPRINTEREX;
1297 typedef struct spool_q_addprinterdriver
1299 UNISTR2 server_name;
1301 SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1302 } SPOOL_Q_ADDPRINTERDRIVER;
1304 typedef struct spool_r_addprinterdriver
1307 } SPOOL_R_ADDPRINTERDRIVER;
1309 typedef struct spool_q_getprinterdriverdirectory
1312 UNISTR2 environment;
1316 } SPOOL_Q_GETPRINTERDRIVERDIR;
1318 typedef struct driver_directory_1
1321 } DRIVER_DIRECTORY_1 ;
1323 typedef struct spool_r_getprinterdriverdirectory
1327 DRIVER_DIRECTORY_1 driver_info_1;
1331 } SPOOL_R_GETPRINTERDRIVERDIR;
1333 typedef struct spool_q_enumprintprocessors
1336 UNISTR2 environment;
1340 } SPOOL_Q_ENUMPRINTPROCESSORS;
1342 typedef struct printprocessor_1
1347 typedef struct spool_r_enumprintprocessors
1350 PRINTPROCESSOR_1 *info_1;
1352 uint32 numofprintprocessors;
1354 } SPOOL_R_ENUMPRINTPROCESSORS;
1356 typedef struct spool_q_enumprintprocessordatatypes
1359 UNISTR2 printprocessor;
1363 } SPOOL_Q_ENUMPRINTPROCESSORDATATYPES;
1365 typedef struct ppdatatype_1
1370 typedef struct spool_r_enumprintprocessordatatypes
1373 PPDATATYPE_1 *info_1;
1375 uint32 numofppdatatypes;
1377 } SPOOL_R_ENUMPRINTPROCESSORDATATYPES;
1379 typedef struct spool_q_enumprintmonitors
1385 } SPOOL_Q_ENUMPRINTMONITORS;
1387 typedef struct printmonitor_1
1392 typedef struct spool_r_enumprintmonitors
1395 PRINTMONITOR_1 *info_1;
1397 uint32 numofprintmonitors;
1399 } SPOOL_R_ENUMPRINTMONITORS;
1401 typedef struct spool_q_enumprinterdata
1407 } SPOOL_Q_ENUMPRINTERDATA;
1409 typedef struct spool_r_enumprinterdata
1413 uint32 realvaluesize;
1417 uint32 realdatasize;
1419 } SPOOL_R_ENUMPRINTERDATA;
1421 typedef struct spool_q_setprinterdata
1429 uint32 numeric_data;
1430 } SPOOL_Q_SETPRINTERDATA;
1432 typedef struct spool_r_setprinterdata
1435 } SPOOL_R_SETPRINTERDATA;
1437 typedef struct _form
1450 typedef struct spool_q_addform
1458 typedef struct spool_r_addform
1463 typedef struct spool_q_setform
1472 typedef struct spool_r_setform
1477 typedef struct spool_q_getjob
1486 typedef struct spool_r_getjob
1490 JOB_INFO_1 *job_info_1;
1491 JOB_INFO_2 *job_info_2;
1497 #define PRINTER_DRIVER_VERSION 2
1498 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
1501 #endif /* _RPC_SPOOLSS_H */