OpenPrinter() merge from 2.2
[samba.git] / source3 / include / rpc_spoolss.h
1 /* 
2    Unix SMB/CIFS implementation.
3    SMB parameters and setup
4    Copyright (C) Andrew Tridgell              1992-2000,
5    Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
6    Copyright (C) Jean Francois Micouleau      1998-2000.
7    
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef _RPC_SPOOLSS_H          /* _RPC_SPOOLSS_H */
24 #define _RPC_SPOOLSS_H
25
26 #define INTEGER 1
27 #define STRING 2
28
29 /* spoolss pipe: this are the calls which are not implemented ...
30 #define SPOOLSS_GETPRINTERDRIVER                        0x0b
31 #define SPOOLSS_READPRINTER                             0x16
32 #define SPOOLSS_WAITFORPRINTERCHANGE                    0x1c
33 #define SPOOLSS_ADDPORT                                 0x25
34 #define SPOOLSS_CONFIGUREPORT                           0x26
35 #define SPOOLSS_DELETEPORT                              0x27
36 #define SPOOLSS_CREATEPRINTERIC                         0x28
37 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC                0x29
38 #define SPOOLSS_DELETEPRINTERIC                         0x2a
39 #define SPOOLSS_ADDPRINTERCONNECTION                    0x2b
40 #define SPOOLSS_DELETEPRINTERCONNECTION                 0x2c
41 #define SPOOLSS_PRINTERMESSAGEBOX                       0x2d
42 #define SPOOLSS_ADDMONITOR                              0x2e
43 #define SPOOLSS_DELETEMONITOR                           0x2f
44 #define SPOOLSS_DELETEPRINTPROCESSOR                    0x30
45 #define SPOOLSS_ADDPRINTPROVIDOR                        0x31
46 #define SPOOLSS_DELETEPRINTPROVIDOR                     0x32
47 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION      0x36
48 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION       0x37
49 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD   0x39
50 #define SPOOLSS_ADDPORTEX                               0x3d
51 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
52 #define SPOOLSS_SPOOLERINIT                             0x3f
53 #define SPOOLSS_RESETPRINTEREX                          0x40
54 #define SPOOLSS_DELETEPRINTERDATAEX                     0x51
55 #define SPOOLSS_DELETEPRINTERDRIVEREX                   0x54
56 #define SPOOLSS_ADDPRINTERDRIVEREX                      0x59
57 */
58
59 /* those are implemented */
60 #define SPOOLSS_ENUMPRINTERS                            0x00
61 #define SPOOLSS_OPENPRINTER                             0x01
62 #define SPOOLSS_SETJOB                                  0x02
63 #define SPOOLSS_GETJOB                                  0x03
64 #define SPOOLSS_ENUMJOBS                                0x04
65 #define SPOOLSS_ADDPRINTER                              0x05
66 #define SPOOLSS_DELETEPRINTER                           0x06
67 #define SPOOLSS_SETPRINTER                              0x07
68 #define SPOOLSS_GETPRINTER                              0x08
69 #define SPOOLSS_ADDPRINTERDRIVER                        0x09
70 #define SPOOLSS_ENUMPRINTERDRIVERS                      0x0a
71 #define SPOOLSS_GETPRINTERDRIVERDIRECTORY               0x0c
72 #define SPOOLSS_DELETEPRINTERDRIVER                     0x0d
73 #define SPOOLSS_ADDPRINTPROCESSOR                       0x0e
74 #define SPOOLSS_ENUMPRINTPROCESSORS                     0x0f
75 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY              0x10
76 #define SPOOLSS_STARTDOCPRINTER                         0x11
77 #define SPOOLSS_STARTPAGEPRINTER                        0x12
78 #define SPOOLSS_WRITEPRINTER                            0x13
79 #define SPOOLSS_ENDPAGEPRINTER                          0x14
80 #define SPOOLSS_ABORTPRINTER                            0x15
81 #define SPOOLSS_ENDDOCPRINTER                           0x17
82 #define SPOOLSS_ADDJOB                                  0x18
83 #define SPOOLSS_SCHEDULEJOB                             0x19
84 #define SPOOLSS_GETPRINTERDATA                          0x1a
85 #define SPOOLSS_SETPRINTERDATA                          0x1b
86 #define SPOOLSS_CLOSEPRINTER                            0x1d
87 #define SPOOLSS_ADDFORM                                 0x1e
88 #define SPOOLSS_DELETEFORM                              0x1f
89 #define SPOOLSS_GETFORM                                 0x20
90 #define SPOOLSS_SETFORM                                 0x21
91 #define SPOOLSS_ENUMFORMS                               0x22
92 #define SPOOLSS_ENUMPORTS                               0x23
93 #define SPOOLSS_ENUMMONITORS                            0x24
94 #define SPOOLSS_ENUMPRINTPROCDATATYPES                  0x33
95 #define SPOOLSS_RESETPRINTER                            0x34
96 #define SPOOLSS_GETPRINTERDRIVER2                       0x35
97 #define SPOOLSS_FCPN                                    0x38    /* FindClosePrinterNotify */
98 #define SPOOLSS_REPLYOPENPRINTER                        0x3a
99 #define SPOOLSS_ROUTERREPLYPRINTER                      0x3b
100 #define SPOOLSS_REPLYCLOSEPRINTER                       0x3c
101 #define SPOOLSS_RFFPCNEX                                0x41    /* RemoteFindFirstPrinterChangeNotifyEx */
102 #define SPOOLSS_RRPCN                                   0x42    /* RouteRefreshPrinterChangeNotification */
103 #define SPOOLSS_RFNPCNEX                                0x43    /* RemoteFindNextPrinterChangeNotifyEx */
104 #define SPOOLSS_OPENPRINTEREX                           0x45
105 #define SPOOLSS_ADDPRINTEREX                            0x46
106 #define SPOOLSS_ENUMPRINTERDATA                         0x48
107 #define SPOOLSS_DELETEPRINTERDATA                       0x49
108 #define SPOOLSS_SETPRINTERDATAEX                        0x4d
109 #define SPOOLSS_GETPRINTERDATAEX                        0x4e
110 #define SPOOLSS_ENUMPRINTERDATAEX                       0x4f
111 #define SPOOLSS_ENUMPRINTERKEY                          0x50
112
113
114 #define PRINTER_CONTROL_UNPAUSE         0x00000000
115 #define PRINTER_CONTROL_PAUSE           0x00000001
116 #define PRINTER_CONTROL_RESUME          0x00000002
117 #define PRINTER_CONTROL_PURGE           0x00000003
118 #define PRINTER_CONTROL_SET_STATUS      0x00000004
119
120 #define PRINTER_STATUS_PAUSED           0x00000001
121 #define PRINTER_STATUS_ERROR            0x00000002
122 #define PRINTER_STATUS_PENDING_DELETION 0x00000004
123 #define PRINTER_STATUS_PAPER_JAM        0x00000008
124
125 #define PRINTER_STATUS_PAPER_OUT        0x00000010
126 #define PRINTER_STATUS_MANUAL_FEED      0x00000020
127 #define PRINTER_STATUS_PAPER_PROBLEM    0x00000040
128 #define PRINTER_STATUS_OFFLINE          0x00000080
129
130 #define PRINTER_STATUS_IO_ACTIVE        0x00000100
131 #define PRINTER_STATUS_BUSY             0x00000200
132 #define PRINTER_STATUS_PRINTING         0x00000400
133 #define PRINTER_STATUS_OUTPUT_BIN_FULL  0x00000800
134
135 #define PRINTER_STATUS_NOT_AVAILABLE    0x00001000
136 #define PRINTER_STATUS_WAITING          0x00002000
137 #define PRINTER_STATUS_PROCESSING       0x00004000
138 #define PRINTER_STATUS_INITIALIZING     0x00008000
139
140 #define PRINTER_STATUS_WARMING_UP       0x00010000
141 #define PRINTER_STATUS_TONER_LOW        0x00020000
142 #define PRINTER_STATUS_NO_TONER         0x00040000
143 #define PRINTER_STATUS_PAGE_PUNT        0x00080000
144
145 #define PRINTER_STATUS_USER_INTERVENTION        0x00100000
146 #define PRINTER_STATUS_OUT_OF_MEMORY    0x00200000
147 #define PRINTER_STATUS_DOOR_OPEN        0x00400000
148 #define PRINTER_STATUS_SERVER_UNKNOWN   0x00800000
149
150 #define PRINTER_STATUS_POWER_SAVE       0x01000000
151
152 #define SERVER_ACCESS_ADMINISTER        0x00000001
153 #define SERVER_ACCESS_ENUMERATE         0x00000002
154 #define PRINTER_ACCESS_ADMINISTER       0x00000004
155 #define PRINTER_ACCESS_USE              0x00000008
156 #define JOB_ACCESS_ADMINISTER           0x00000010
157
158 /* JOB status codes. */
159
160 #define JOB_STATUS_PAUSED               0x001
161 #define JOB_STATUS_ERROR                0x002
162 #define JOB_STATUS_DELETING             0x004
163 #define JOB_STATUS_SPOOLING             0x008
164 #define JOB_STATUS_PRINTING             0x010
165 #define JOB_STATUS_OFFLINE              0x020
166 #define JOB_STATUS_PAPEROUT             0x040
167 #define JOB_STATUS_PRINTED              0x080
168 #define JOB_STATUS_DELETED              0x100
169 #define JOB_STATUS_BLOCKED              0x200
170 #define JOB_STATUS_USER_INTERVENTION    0x400
171
172 /* ACE masks for the various print permissions */
173
174 #define PRINTER_ACE_FULL_CONTROL      GENERIC_ALL_ACCESS
175 #define PRINTER_ACE_MANAGE_DOCUMENTS  READ_CONTROL_ACCESS
176 #define PRINTER_ACE_PRINT             \
177     (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
178
179 /* Access rights for print servers */
180 #define SERVER_ALL_ACCESS       STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
181 #define SERVER_READ             STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
182 #define SERVER_WRITE            STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
183 #define SERVER_EXECUTE          STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE
184
185 /* Access rights for printers */
186 #define PRINTER_ALL_ACCESS      STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE
187 #define PRINTER_READ          STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE
188 #define PRINTER_WRITE         STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE
189 #define PRINTER_EXECUTE       STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE
190
191 /* Access rights for jobs */
192 #define JOB_ALL_ACCESS  STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER
193 #define JOB_READ        STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER
194 #define JOB_WRITE       STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
195 #define JOB_EXECUTE     STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
196
197 #define ONE_VALUE 1
198 #define TWO_VALUE 2
199 #define POINTER   3
200
201 #define PRINTER_NOTIFY_TYPE 0x00
202 #define JOB_NOTIFY_TYPE     0x01
203
204 #define MAX_PRINTER_NOTIFY 26
205 #define MAX_JOB_NOTIFY 24
206
207 #define MAX_NOTIFY_TYPE_FOR_NOW 26
208
209 #define PRINTER_NOTIFY_SERVER_NAME              0x00
210 #define PRINTER_NOTIFY_PRINTER_NAME             0x01
211 #define PRINTER_NOTIFY_SHARE_NAME               0x02
212 #define PRINTER_NOTIFY_PORT_NAME                0x03
213 #define PRINTER_NOTIFY_DRIVER_NAME              0x04
214 #define PRINTER_NOTIFY_COMMENT                  0x05
215 #define PRINTER_NOTIFY_LOCATION                 0x06
216 #define PRINTER_NOTIFY_DEVMODE                  0x07
217 #define PRINTER_NOTIFY_SEPFILE                  0x08
218 #define PRINTER_NOTIFY_PRINT_PROCESSOR          0x09
219 #define PRINTER_NOTIFY_PARAMETERS               0x0A
220 #define PRINTER_NOTIFY_DATATYPE                 0x0B
221 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR      0x0C
222 #define PRINTER_NOTIFY_ATTRIBUTES               0x0D
223 #define PRINTER_NOTIFY_PRIORITY                 0x0E
224 #define PRINTER_NOTIFY_DEFAULT_PRIORITY         0x0F
225 #define PRINTER_NOTIFY_START_TIME               0x10
226 #define PRINTER_NOTIFY_UNTIL_TIME               0x11
227 #define PRINTER_NOTIFY_STATUS                   0x12
228 #define PRINTER_NOTIFY_STATUS_STRING            0x13
229 #define PRINTER_NOTIFY_CJOBS                    0x14
230 #define PRINTER_NOTIFY_AVERAGE_PPM              0x15
231 #define PRINTER_NOTIFY_TOTAL_PAGES              0x16
232 #define PRINTER_NOTIFY_PAGES_PRINTED            0x17
233 #define PRINTER_NOTIFY_TOTAL_BYTES              0x18
234 #define PRINTER_NOTIFY_BYTES_PRINTED            0x19
235
236 #define JOB_NOTIFY_PRINTER_NAME                 0x00
237 #define JOB_NOTIFY_MACHINE_NAME                 0x01
238 #define JOB_NOTIFY_PORT_NAME                    0x02
239 #define JOB_NOTIFY_USER_NAME                    0x03
240 #define JOB_NOTIFY_NOTIFY_NAME                  0x04
241 #define JOB_NOTIFY_DATATYPE                     0x05
242 #define JOB_NOTIFY_PRINT_PROCESSOR              0x06
243 #define JOB_NOTIFY_PARAMETERS                   0x07
244 #define JOB_NOTIFY_DRIVER_NAME                  0x08
245 #define JOB_NOTIFY_DEVMODE                      0x09
246 #define JOB_NOTIFY_STATUS                       0x0A
247 #define JOB_NOTIFY_STATUS_STRING                0x0B
248 #define JOB_NOTIFY_SECURITY_DESCRIPTOR          0x0C
249 #define JOB_NOTIFY_DOCUMENT                     0x0D
250 #define JOB_NOTIFY_PRIORITY                     0x0E
251 #define JOB_NOTIFY_POSITION                     0x0F
252 #define JOB_NOTIFY_SUBMITTED                    0x10
253 #define JOB_NOTIFY_START_TIME                   0x11
254 #define JOB_NOTIFY_UNTIL_TIME                   0x12
255 #define JOB_NOTIFY_TIME                         0x13
256 #define JOB_NOTIFY_TOTAL_PAGES                  0x14
257 #define JOB_NOTIFY_PAGES_PRINTED                0x15
258 #define JOB_NOTIFY_TOTAL_BYTES                  0x16
259 #define JOB_NOTIFY_BYTES_PRINTED                0x17
260
261 #define PRINTER_NOTIFY_OPTIONS_REFRESH          0x01
262
263 #define PRINTER_CHANGE_ADD_PRINTER                      0x00000001
264 #define PRINTER_CHANGE_SET_PRINTER                      0x00000002
265 #define PRINTER_CHANGE_DELETE_PRINTER                   0x00000004
266 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER        0x00000008
267 #define PRINTER_CHANGE_PRINTER  (PRINTER_CHANGE_ADD_PRINTER | \
268                                  PRINTER_CHANGE_SET_PRINTER | \
269                                  PRINTER_CHANGE_DELETE_PRINTER | \
270                                  PRINTER_CHANGE_FAILED_CONNECTION_PRINTER )
271
272 #define PRINTER_CHANGE_ADD_JOB                          0x00000100
273 #define PRINTER_CHANGE_SET_JOB                          0x00000200
274 #define PRINTER_CHANGE_DELETE_JOB                       0x00000400
275 #define PRINTER_CHANGE_WRITE_JOB                        0x00000800
276 #define PRINTER_CHANGE_JOB      (PRINTER_CHANGE_ADD_JOB | \
277                                  PRINTER_CHANGE_SET_JOB | \
278                                  PRINTER_CHANGE_DELETE_JOB | \
279                                  PRINTER_CHANGE_WRITE_JOB )
280
281 #define PRINTER_CHANGE_ADD_FORM                         0x00010000
282 #define PRINTER_CHANGE_SET_FORM                         0x00020000
283 #define PRINTER_CHANGE_DELETE_FORM                      0x00040000
284 #define PRINTER_CHANGE_FORM     (PRINTER_CHANGE_ADD_FORM | \
285                                  PRINTER_CHANGE_SET_FORM | \
286                                  PRINTER_CHANGE_DELETE_FORM )
287
288 #define PRINTER_CHANGE_ADD_PORT                         0x00100000
289 #define PRINTER_CHANGE_CONFIGURE_PORT                   0x00200000
290 #define PRINTER_CHANGE_DELETE_PORT                      0x00400000
291 #define PRINTER_CHANGE_PORT     (PRINTER_CHANGE_ADD_PORT | \
292                                  PRINTER_CHANGE_CONFIGURE_PORT | \
293                                  PRINTER_CHANGE_DELETE_PORT )
294
295 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR              0x01000000
296 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR           0x04000000
297 #define PRINTER_CHANGE_PRINT_PROCESSOR  (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \
298                                          PRINTER_CHANGE_DELETE_PRINT_PROCESSOR )
299
300 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER               0x10000000
301 #define PRINTER_CHANGE_SET_PRINTER_DRIVER               0x20000000
302 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER            0x40000000
303 #define PRINTER_CHANGE_PRINTER_DRIVER   (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \
304                                          PRINTER_CHANGE_SET_PRINTER_DRIVER | \
305                                          PRINTER_CHANGE_DELETE_PRINTER_DRIVER )
306
307 #define PRINTER_CHANGE_TIMEOUT                          0x80000000
308 #define PRINTER_CHANGE_ALL      (PRINTER_CHANGE_JOB | \
309                                  PRINTER_CHANGE_FORM | \
310                                  PRINTER_CHANGE_PORT | \
311                                  PRINTER_CHANGE_PRINT_PROCESSOR | \
312                                  PRINTER_CHANGE_PRINTER_DRIVER )
313
314 #define PRINTER_NOTIFY_INFO_DISCARDED   0x1
315
316 /*
317  * Set of macros for flagging what changed in the PRINTER_INFO_2 struct
318  * when sending messages to other smbd's
319  */
320 #define PRINTER_MESSAGE_NULL            0x00000000
321 #define PRINTER_MESSAGE_DRIVER          0x00000001
322 #define PRINTER_MESSAGE_COMMENT         0x00000002
323 #define PRINTER_MESSAGE_PRINTERNAME     0x00000004
324 #define PRINTER_MESSAGE_LOCATION        0x00000008
325 #define PRINTER_MESSAGE_DEVMODE         0x00000010      /* not curently supported */
326 #define PRINTER_MESSAGE_SEPFILE         0x00000020
327 #define PRINTER_MESSAGE_PRINTPROC       0x00000040
328 #define PRINTER_MESSAGE_PARAMS          0x00000080
329 #define PRINTER_MESSAGE_DATATYPE        0x00000100
330 #define PRINTER_MESSAGE_SECDESC         0x00000200
331 #define PRINTER_MESSAGE_CJOBS           0x00000400
332 #define PRINTER_MESSAGE_PORT            0x00000800
333 #define PRINTER_MESSAGE_SHARENAME       0x00001000
334 #define PRINTER_MESSAGE_ATTRIBUTES      0x00002000
335
336 typedef struct printer_message_info {
337         uint32 low;             /* PRINTER_CHANGE_XXX */
338         uint32 high;            /* PRINTER_CHANGE_XXX */
339         fstring printer_name;
340         uint32 flags;           /* PRINTER_MESSAGE_XXX */
341 }
342 PRINTER_MESSAGE_INFO;
343
344 /*
345  * The printer attributes.
346  * I #defined all of them (grabbed form MSDN)
347  * I'm only using:
348  * ( SHARED | NETWORK | RAW_ONLY )
349  * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
350  */
351
352 #define PRINTER_ATTRIBUTE_QUEUED                0x00000001
353 #define PRINTER_ATTRIBUTE_DIRECT                0x00000002
354 #define PRINTER_ATTRIBUTE_DEFAULT               0x00000004
355 #define PRINTER_ATTRIBUTE_SHARED                0x00000008
356
357 #define PRINTER_ATTRIBUTE_NETWORK               0x00000010
358 #define PRINTER_ATTRIBUTE_HIDDEN                0x00000020
359 #define PRINTER_ATTRIBUTE_LOCAL                 0x00000040
360 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ           0x00000080
361
362 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS       0x00000100
363 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST     0x00000200
364 #define PRINTER_ATTRIBUTE_WORK_OFFLINE          0x00000400
365 #define PRINTER_ATTRIBUTE_ENABLE_BIDI           0x00000800
366
367 #define PRINTER_ATTRIBUTE_RAW_ONLY              0x00001000
368
369 #define NO_PRIORITY      0
370 #define MAX_PRIORITY    99
371 #define MIN_PRIORITY     1
372 #define DEF_PRIORITY     1
373
374 /* the flags of the query */
375 #define PRINTER_ENUM_DEFAULT            0x00000001
376 #define PRINTER_ENUM_LOCAL              0x00000002
377 #define PRINTER_ENUM_CONNECTIONS        0x00000004
378 #define PRINTER_ENUM_FAVORITE           0x00000004
379 #define PRINTER_ENUM_NAME               0x00000008
380 #define PRINTER_ENUM_REMOTE             0x00000010
381 #define PRINTER_ENUM_SHARED             0x00000020
382 #define PRINTER_ENUM_NETWORK            0x00000040
383
384 /* the flags of each printers */
385 #define PRINTER_ENUM_UNKNOWN_8          0x00000008
386 #define PRINTER_ENUM_EXPAND             0x00004000
387 #define PRINTER_ENUM_CONTAINER          0x00008000
388 #define PRINTER_ENUM_ICONMASK           0x00ff0000
389 #define PRINTER_ENUM_ICON1              0x00010000
390 #define PRINTER_ENUM_ICON2              0x00020000
391 #define PRINTER_ENUM_ICON3              0x00040000
392 #define PRINTER_ENUM_ICON4              0x00080000
393 #define PRINTER_ENUM_ICON5              0x00100000
394 #define PRINTER_ENUM_ICON6              0x00200000
395 #define PRINTER_ENUM_ICON7              0x00400000
396 #define PRINTER_ENUM_ICON8              0x00800000
397
398 /* this struct is undocumented */
399 /* thanks to the ddk ... */
400 typedef struct spool_user_1
401 {
402         uint32 size;            /* length of user_name & client_name + 2? */
403         uint32 client_name_ptr;
404         uint32 user_name_ptr;
405         uint32 build;
406         uint32 major;
407         uint32 minor;
408         uint32 processor;
409         UNISTR2 client_name;
410         UNISTR2 user_name;
411 }
412 SPOOL_USER_1;
413
414 typedef struct spool_user_ctr_info
415 {
416         uint32 level;
417         uint32 ptr;
418         SPOOL_USER_1 user1;
419 }
420 SPOOL_USER_CTR;
421
422 /*
423  * various bits in the DEVICEMODE.fields member
424  */
425
426 #define DEVMODE_ORIENTATION             0x00000001
427 #define DEVMODE_PAPERSIZE               0x00000002
428 #define DEVMODE_PAPERLENGTH             0x00000004
429 #define DEVMODE_PAPERWIDTH              0x00000008
430 #define DEVMODE_SCALE                   0x00000010
431 #define DEVMODE_POSITION                0x00000020
432 #define DEVMODE_NUP                     0x00000040
433 #define DEVMODE_COPIES                  0x00000100
434 #define DEVMODE_DEFAULTSOURCE           0x00000200
435 #define DEVMODE_PRINTQUALITY            0x00000400
436 #define DEVMODE_COLOR                   0x00000800
437 #define DEVMODE_DUPLEX                  0x00001000
438 #define DEVMODE_YRESOLUTION             0x00002000
439 #define DEVMODE_TTOPTION                0x00004000
440 #define DEVMODE_COLLATE                 0x00008000
441 #define DEVMODE_FORMNAME                0x00010000
442 #define DEVMODE_LOGPIXELS               0x00020000
443 #define DEVMODE_BITSPERPEL              0x00040000
444 #define DEVMODE_PELSWIDTH               0x00080000
445 #define DEVMODE_PELSHEIGHT              0x00100000
446 #define DEVMODE_DISPLAYFLAGS            0x00200000
447 #define DEVMODE_DISPLAYFREQUENCY        0x00400000
448 #define DEVMODE_ICMMETHOD               0x00800000
449 #define DEVMODE_ICMINTENT               0x01000000
450 #define DEVMODE_MEDIATYPE               0x02000000
451 #define DEVMODE_DITHERTYPE              0x04000000
452 #define DEVMODE_PANNINGWIDTH            0x08000000
453 #define DEVMODE_PANNINGHEIGHT           0x10000000
454
455
456 /* 
457  * Devicemode structure
458  */
459
460 typedef struct devicemode
461 {
462         UNISTR devicename;
463         uint16 specversion;
464         uint16 driverversion;
465         uint16 size;
466         uint16 driverextra;
467         uint32 fields;
468         uint16 orientation;
469         uint16 papersize;
470         uint16 paperlength;
471         uint16 paperwidth;
472         uint16 scale;
473         uint16 copies;
474         uint16 defaultsource;
475         uint16 printquality;
476         uint16 color;
477         uint16 duplex;
478         uint16 yresolution;
479         uint16 ttoption;
480         uint16 collate;
481         UNISTR formname;
482         uint16 logpixels;
483         uint32 bitsperpel;
484         uint32 pelswidth;
485         uint32 pelsheight;
486         uint32 displayflags;
487         uint32 displayfrequency;
488         uint32 icmmethod;
489         uint32 icmintent;
490         uint32 mediatype;
491         uint32 dithertype;
492         uint32 reserved1;
493         uint32 reserved2;
494         uint32 panningwidth;
495         uint32 panningheight;
496         uint8 *private;
497 }
498 DEVICEMODE;
499
500 typedef struct _devmode_cont
501 {
502         uint32 size;
503         uint32 devmode_ptr;
504         DEVICEMODE *devmode;
505 }
506 DEVMODE_CTR;
507
508 typedef struct _printer_default
509 {
510         uint32 datatype_ptr;
511         UNISTR2 datatype;
512         DEVMODE_CTR devmode_cont;
513         uint32 access_required;
514 }
515 PRINTER_DEFAULT;
516
517 /* SPOOL_Q_OPEN_PRINTER request to open a printer */
518 typedef struct spool_q_open_printer
519 {
520         uint32 printername_ptr;
521         UNISTR2 printername;
522         PRINTER_DEFAULT printer_default;
523 }
524 SPOOL_Q_OPEN_PRINTER;
525
526 /* SPOOL_R_OPEN_PRINTER reply to an open printer */
527 typedef struct spool_r_open_printer
528 {
529         POLICY_HND handle;      /* handle used along all transactions (20*uint8) */
530         WERROR status;
531 }
532 SPOOL_R_OPEN_PRINTER;
533
534 /* SPOOL_Q_OPEN_PRINTER_EX request to open a printer */
535 typedef struct spool_q_open_printer_ex
536 {
537         uint32 printername_ptr;
538         UNISTR2 printername;
539         PRINTER_DEFAULT printer_default;
540         uint32 user_switch;
541         SPOOL_USER_CTR user_ctr;
542 }
543 SPOOL_Q_OPEN_PRINTER_EX;
544
545 /* SPOOL_R_OPEN_PRINTER_EX reply to an open printer */
546 typedef struct spool_r_open_printer_ex
547 {
548         POLICY_HND handle;      /* handle used along all transactions (20*uint8) */
549         WERROR status;
550 }
551 SPOOL_R_OPEN_PRINTER_EX;
552
553 typedef struct spool_notify_option_type
554 {
555         uint16 type;
556         uint16 reserved0;
557         uint32 reserved1;
558         uint32 reserved2;
559         uint32 count;
560         uint32 fields_ptr;
561         uint32 count2;
562         uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW];
563 }
564 SPOOL_NOTIFY_OPTION_TYPE;
565
566 typedef struct spool_notify_option_type_ctr
567 {
568         uint32 count;
569         SPOOL_NOTIFY_OPTION_TYPE *type;
570 }
571 SPOOL_NOTIFY_OPTION_TYPE_CTR;
572
573
574
575 typedef struct s_header_type
576 {
577         uint32 type;
578         union
579         {
580                 uint32 value;
581                 UNISTR string;
582         }
583         data;
584 }
585 HEADER_TYPE;
586
587 typedef struct new_buffer
588 {
589         uint32 ptr;
590         uint32 size;
591         prs_struct prs;
592         uint32 struct_start;
593         uint32 string_at_end;
594 }
595 NEW_BUFFER;
596
597 typedef struct spool_q_getprinterdata
598 {
599         POLICY_HND handle;
600         UNISTR2 valuename;
601         uint32 size;
602 }
603 SPOOL_Q_GETPRINTERDATA;
604
605 typedef struct spool_r_getprinterdata
606 {
607         uint32 type;
608         uint32 size;
609         uint8 *data;
610         uint32 needed;
611         WERROR status;
612 }
613 SPOOL_R_GETPRINTERDATA;
614
615 typedef struct spool_q_deleteprinterdata
616 {
617         POLICY_HND handle;
618         UNISTR2 valuename;
619 }
620 SPOOL_Q_DELETEPRINTERDATA;
621
622 typedef struct spool_r_deleteprinterdata
623 {
624         WERROR status;
625 }
626 SPOOL_R_DELETEPRINTERDATA;
627
628 typedef struct spool_q_closeprinter
629 {
630         POLICY_HND handle;
631 }
632 SPOOL_Q_CLOSEPRINTER;
633
634 typedef struct spool_r_closeprinter
635 {
636         POLICY_HND handle;
637         WERROR status;
638 }
639 SPOOL_R_CLOSEPRINTER;
640
641 typedef struct spool_q_startpageprinter
642 {
643         POLICY_HND handle;
644 }
645 SPOOL_Q_STARTPAGEPRINTER;
646
647 typedef struct spool_r_startpageprinter
648 {
649         WERROR status;
650 }
651 SPOOL_R_STARTPAGEPRINTER;
652
653 typedef struct spool_q_endpageprinter
654 {
655         POLICY_HND handle;
656 }
657 SPOOL_Q_ENDPAGEPRINTER;
658
659 typedef struct spool_r_endpageprinter
660 {
661         WERROR status;
662 }
663 SPOOL_R_ENDPAGEPRINTER;
664
665
666 typedef struct spool_q_deleteprinterdriver
667 {
668         uint32 server_ptr;
669         UNISTR2 server;
670         UNISTR2 arch;
671         UNISTR2 driver;
672 }
673 SPOOL_Q_DELETEPRINTERDRIVER;
674
675 typedef struct spool_r_deleteprinterdriver
676 {
677         WERROR status;
678 }
679 SPOOL_R_DELETEPRINTERDRIVER;
680
681
682 typedef struct spool_doc_info_1
683 {
684         uint32 p_docname;
685         uint32 p_outputfile;
686         uint32 p_datatype;
687         UNISTR2 docname;
688         UNISTR2 outputfile;
689         UNISTR2 datatype;
690 }
691 DOC_INFO_1;
692
693 typedef struct spool_doc_info
694 {
695         uint32 switch_value;
696         DOC_INFO_1 doc_info_1;
697 }
698 DOC_INFO;
699
700 typedef struct spool_doc_info_container
701 {
702         uint32 level;
703         DOC_INFO docinfo;
704 }
705 DOC_INFO_CONTAINER;
706
707 typedef struct spool_q_startdocprinter
708 {
709         POLICY_HND handle;
710         DOC_INFO_CONTAINER doc_info_container;
711 }
712 SPOOL_Q_STARTDOCPRINTER;
713
714 typedef struct spool_r_startdocprinter
715 {
716         uint32 jobid;
717         WERROR status;
718 }
719 SPOOL_R_STARTDOCPRINTER;
720
721 typedef struct spool_q_enddocprinter
722 {
723         POLICY_HND handle;
724 }
725 SPOOL_Q_ENDDOCPRINTER;
726
727 typedef struct spool_r_enddocprinter
728 {
729         WERROR status;
730 }
731 SPOOL_R_ENDDOCPRINTER;
732
733 typedef struct spool_q_writeprinter
734 {
735         POLICY_HND handle;
736         uint32 buffer_size;
737         uint8 *buffer;
738         uint32 buffer_size2;
739 }
740 SPOOL_Q_WRITEPRINTER;
741
742 typedef struct spool_r_writeprinter
743 {
744         uint32 buffer_written;
745         WERROR status;
746 }
747 SPOOL_R_WRITEPRINTER;
748
749 typedef struct spool_notify_option
750 {
751         uint32 version;
752         uint32 flags;
753         uint32 count;
754         uint32 option_type_ptr;
755         SPOOL_NOTIFY_OPTION_TYPE_CTR ctr;
756 }
757 SPOOL_NOTIFY_OPTION;
758
759 typedef struct spool_notify_info_data
760 {
761         uint16 type;
762         uint16 field;
763         uint32 reserved;
764         uint32 id;
765         union
766         {
767                 uint32 value[2];
768                 struct
769                 {
770                         uint32 length;
771                         uint16 *string;
772                 }
773                 data;
774         }
775         notify_data;
776         uint32 size;
777         BOOL enc_type;
778 } SPOOL_NOTIFY_INFO_DATA;
779
780 typedef struct spool_notify_info
781 {
782         uint32 version;
783         uint32 flags;
784         uint32 count;
785         SPOOL_NOTIFY_INFO_DATA *data;
786 }
787 SPOOL_NOTIFY_INFO;
788
789 /* If the struct name looks obscure, yes it is ! */
790 /* RemoteFindFirstPrinterChangeNotificationEx query struct */
791 typedef struct spoolss_q_rffpcnex
792 {
793         POLICY_HND handle;
794         uint32 flags;
795         uint32 options;
796         uint32 localmachine_ptr;
797         UNISTR2 localmachine;
798         uint32 printerlocal;
799         uint32 option_ptr;
800         SPOOL_NOTIFY_OPTION *option;
801 }
802 SPOOL_Q_RFFPCNEX;
803
804 typedef struct spool_r_rffpcnex
805 {
806         WERROR status;
807 }
808 SPOOL_R_RFFPCNEX;
809
810 /* Remote Find Next Printer Change Notify Ex */
811 typedef struct spool_q_rfnpcnex
812 {
813         POLICY_HND handle;
814         uint32 change;
815         uint32 option_ptr;
816         SPOOL_NOTIFY_OPTION *option;
817 }
818 SPOOL_Q_RFNPCNEX;
819
820 typedef struct spool_r_rfnpcnex
821 {
822         uint32 info_ptr;
823         SPOOL_NOTIFY_INFO info;
824         WERROR status;
825 }
826 SPOOL_R_RFNPCNEX;
827
828 /* Find Close Printer Notify */
829 typedef struct spool_q_fcpn
830 {
831         POLICY_HND handle;
832 }
833 SPOOL_Q_FCPN;
834
835 typedef struct spool_r_fcpn
836 {
837         WERROR status;
838 }
839 SPOOL_R_FCPN;
840
841
842 typedef struct printer_info_0
843 {
844         UNISTR printername;
845         UNISTR servername;
846         uint32 cjobs;
847         uint32 total_jobs;
848         uint32 total_bytes;
849         
850         uint16 year;
851         uint16 month;
852         uint16 dayofweek;
853         uint16 day;
854         uint16 hour;
855         uint16 minute;
856         uint16 second;
857         uint16 milliseconds;
858
859         uint32 global_counter;
860         uint32 total_pages;
861
862         uint16 major_version;
863         uint16 build_version;
864
865         uint32 unknown7;
866         uint32 unknown8;
867         uint32 unknown9;
868         uint32 session_counter;
869         uint32 unknown11;
870         uint32 printer_errors;
871         uint32 unknown13;
872         uint32 unknown14;
873         uint32 unknown15;
874         uint32 unknown16;
875         uint32 change_id;
876         uint32 unknown18;
877         uint32 status;
878         uint32 unknown20;
879         uint32 c_setprinter;
880
881         uint16 unknown22;
882         uint16 unknown23;
883         uint16 unknown24;
884         uint16 unknown25;
885         uint16 unknown26;
886         uint16 unknown27;
887         uint16 unknown28;
888         uint16 unknown29;
889 } PRINTER_INFO_0;
890
891 typedef struct printer_info_1
892 {
893         uint32 flags;
894         UNISTR description;
895         UNISTR name;
896         UNISTR comment;
897 }
898 PRINTER_INFO_1;
899
900 typedef struct printer_info_2
901 {
902         UNISTR servername;
903         UNISTR printername;
904         UNISTR sharename;
905         UNISTR portname;
906         UNISTR drivername;
907         UNISTR comment;
908         UNISTR location;
909         DEVICEMODE *devmode;
910         UNISTR sepfile;
911         UNISTR printprocessor;
912         UNISTR datatype;
913         UNISTR parameters;
914         SEC_DESC *secdesc;
915         uint32 attributes;
916         uint32 priority;
917         uint32 defaultpriority;
918         uint32 starttime;
919         uint32 untiltime;
920         uint32 status;
921         uint32 cjobs;
922         uint32 averageppm;
923 }
924 PRINTER_INFO_2;
925
926 typedef struct printer_info_3
927 {
928         uint32 flags;
929         SEC_DESC *secdesc;
930 }
931 PRINTER_INFO_3;
932
933 typedef struct printer_info_4
934 {
935         UNISTR printername;
936         UNISTR servername;
937         uint32 attributes;
938 }
939 PRINTER_INFO_4;
940
941 typedef struct printer_info_5
942 {
943         UNISTR printername;
944         UNISTR portname;
945         uint32 attributes;
946         uint32 device_not_selected_timeout;
947         uint32 transmission_retry_timeout;
948 }
949 PRINTER_INFO_5;
950
951 typedef struct spool_q_enumprinters
952 {
953         uint32 flags;
954         uint32 servername_ptr;
955         UNISTR2 servername;
956         uint32 level;
957         NEW_BUFFER *buffer;
958         uint32 offered;
959 }
960 SPOOL_Q_ENUMPRINTERS;
961
962 typedef struct printer_info_ctr_info
963 {
964         PRINTER_INFO_0 *printers_0;
965         PRINTER_INFO_1 *printers_1;
966         PRINTER_INFO_2 *printers_2;
967         PRINTER_INFO_3 *printers_3;
968         PRINTER_INFO_4 *printers_4;
969         PRINTER_INFO_5 *printers_5;
970 }
971 PRINTER_INFO_CTR;
972
973 typedef struct spool_r_enumprinters
974 {
975         NEW_BUFFER *buffer;
976         uint32 needed;          /* bytes needed */
977         uint32 returned;        /* number of printers */
978         WERROR status;
979 }
980 SPOOL_R_ENUMPRINTERS;
981
982
983 typedef struct spool_q_getprinter
984 {
985         POLICY_HND handle;
986         uint32 level;
987         NEW_BUFFER *buffer;
988         uint32 offered;
989 }
990 SPOOL_Q_GETPRINTER;
991
992 typedef struct printer_info_info
993 {
994         union
995         {
996                 PRINTER_INFO_0 *info0;
997                 PRINTER_INFO_1 *info1;
998                 PRINTER_INFO_2 *info2;
999                 void *info;
1000         } printer;
1001 } PRINTER_INFO;
1002
1003 typedef struct spool_r_getprinter
1004 {
1005         NEW_BUFFER *buffer;
1006         uint32 needed;
1007         WERROR status;
1008 } SPOOL_R_GETPRINTER;
1009
1010 typedef struct driver_info_1
1011 {
1012         UNISTR name;
1013 } DRIVER_INFO_1;
1014
1015 typedef struct driver_info_2
1016 {
1017         uint32 version;
1018         UNISTR name;
1019         UNISTR architecture;
1020         UNISTR driverpath;
1021         UNISTR datafile;
1022         UNISTR configfile;
1023 } DRIVER_INFO_2;
1024
1025 typedef struct driver_info_3
1026 {
1027         uint32 version;
1028         UNISTR name;
1029         UNISTR architecture;
1030         UNISTR driverpath;
1031         UNISTR datafile;
1032         UNISTR configfile;
1033         UNISTR helpfile;
1034         uint16 *dependentfiles;
1035         UNISTR monitorname;
1036         UNISTR defaultdatatype;
1037 }
1038 DRIVER_INFO_3;
1039
1040 typedef struct driver_info_6
1041 {
1042         uint32 version;
1043         UNISTR name;
1044         UNISTR architecture;
1045         UNISTR driverpath;
1046         UNISTR datafile;
1047         UNISTR configfile;
1048         UNISTR helpfile;
1049         uint16 *dependentfiles;
1050         UNISTR monitorname;
1051         UNISTR defaultdatatype;
1052         uint16* previousdrivernames;
1053         NTTIME driver_date;
1054         uint32 padding;
1055         uint32 driver_version_low;
1056         uint32 driver_version_high;
1057         UNISTR mfgname;
1058         UNISTR oem_url;
1059         UNISTR hardware_id;
1060         UNISTR provider;
1061 }
1062 DRIVER_INFO_6;
1063
1064 typedef struct driver_info_info
1065 {
1066         DRIVER_INFO_1 *info1;
1067         DRIVER_INFO_2 *info2;
1068         DRIVER_INFO_3 *info3;
1069         DRIVER_INFO_6 *info6;
1070 }
1071 PRINTER_DRIVER_CTR;
1072
1073 typedef struct spool_q_getprinterdriver2
1074 {
1075         POLICY_HND handle;
1076         uint32 architecture_ptr;
1077         UNISTR2 architecture;
1078         uint32 level;
1079         NEW_BUFFER *buffer;
1080         uint32 offered;
1081         uint32 clientmajorversion;
1082         uint32 clientminorversion;
1083 }
1084 SPOOL_Q_GETPRINTERDRIVER2;
1085
1086 typedef struct spool_r_getprinterdriver2
1087 {
1088         NEW_BUFFER *buffer;
1089         uint32 needed;
1090         uint32 servermajorversion;
1091         uint32 serverminorversion;
1092         WERROR status;
1093 }
1094 SPOOL_R_GETPRINTERDRIVER2;
1095
1096
1097 typedef struct add_jobinfo_1
1098 {
1099         UNISTR path;
1100         uint32 job_number;
1101 }
1102 ADD_JOBINFO_1;
1103
1104
1105 typedef struct spool_q_addjob
1106 {
1107         POLICY_HND handle;
1108         uint32 level;
1109         NEW_BUFFER *buffer;
1110         uint32 offered;
1111 }
1112 SPOOL_Q_ADDJOB;
1113
1114 typedef struct spool_r_addjob
1115 {
1116         NEW_BUFFER *buffer;
1117         uint32 needed;
1118         WERROR status;
1119 }
1120 SPOOL_R_ADDJOB;
1121
1122 /*
1123  * I'm really wondering how many different time formats
1124  * I will have to cope with
1125  *
1126  * JFM, 09/13/98 In a mad mood ;-(
1127 */
1128 typedef struct systemtime
1129 {
1130         uint16 year;
1131         uint16 month;
1132         uint16 dayofweek;
1133         uint16 day;
1134         uint16 hour;
1135         uint16 minute;
1136         uint16 second;
1137         uint16 milliseconds;
1138 }
1139 SYSTEMTIME;
1140
1141 typedef struct s_job_info_1
1142 {
1143         uint32 jobid;
1144         UNISTR printername;
1145         UNISTR machinename;
1146         UNISTR username;
1147         UNISTR document;
1148         UNISTR datatype;
1149         UNISTR text_status;
1150         uint32 status;
1151         uint32 priority;
1152         uint32 position;
1153         uint32 totalpages;
1154         uint32 pagesprinted;
1155         SYSTEMTIME submitted;
1156 }
1157 JOB_INFO_1;
1158
1159 typedef struct s_job_info_2
1160 {
1161         uint32 jobid;
1162         UNISTR printername;
1163         UNISTR machinename;
1164         UNISTR username;
1165         UNISTR document;
1166         UNISTR notifyname;
1167         UNISTR datatype;
1168         UNISTR printprocessor;
1169         UNISTR parameters;
1170         UNISTR drivername;
1171         DEVICEMODE *devmode;
1172         UNISTR text_status;
1173 /*      SEC_DESC sec_desc;*/
1174         uint32 status;
1175         uint32 priority;
1176         uint32 position;
1177         uint32 starttime;
1178         uint32 untiltime;
1179         uint32 totalpages;
1180         uint32 size;
1181         SYSTEMTIME submitted;
1182         uint32 timeelapsed;
1183         uint32 pagesprinted;
1184 }
1185 JOB_INFO_2;
1186
1187 typedef struct spool_q_enumjobs
1188 {
1189         POLICY_HND handle;
1190         uint32 firstjob;
1191         uint32 numofjobs;
1192         uint32 level;
1193         NEW_BUFFER *buffer;
1194         uint32 offered;
1195 }
1196 SPOOL_Q_ENUMJOBS;
1197
1198 typedef struct job_info_ctr_info
1199 {
1200         union
1201         {
1202                 JOB_INFO_1 **job_info_1;
1203                 JOB_INFO_2 **job_info_2;
1204                 void *info;
1205         } job;
1206
1207 } JOB_INFO_CTR;
1208
1209 typedef struct spool_r_enumjobs
1210 {
1211         NEW_BUFFER *buffer;
1212         uint32 needed;
1213         uint32 returned;
1214         WERROR status;
1215 }
1216 SPOOL_R_ENUMJOBS;
1217
1218 typedef struct spool_q_schedulejob
1219 {
1220         POLICY_HND handle;
1221         uint32 jobid;
1222 }
1223 SPOOL_Q_SCHEDULEJOB;
1224
1225 typedef struct spool_r_schedulejob
1226 {
1227         WERROR status;
1228 }
1229 SPOOL_R_SCHEDULEJOB;
1230
1231 typedef struct s_port_info_1
1232 {
1233         UNISTR port_name;
1234 }
1235 PORT_INFO_1;
1236
1237 typedef struct s_port_info_2
1238 {
1239         UNISTR port_name;
1240         UNISTR monitor_name;
1241         UNISTR description;
1242         uint32 port_type;
1243         uint32 reserved;
1244 }
1245 PORT_INFO_2;
1246
1247 typedef struct spool_q_enumports
1248 {
1249         uint32 name_ptr;
1250         UNISTR2 name;
1251         uint32 level;
1252         NEW_BUFFER *buffer;
1253         uint32 offered;
1254 }
1255 SPOOL_Q_ENUMPORTS;
1256
1257 typedef struct port_info_ctr_info
1258 {
1259         union
1260         {
1261                 PORT_INFO_1 *info_1;
1262                 PORT_INFO_2 *info_2;
1263         }
1264         port;
1265
1266 }
1267 PORT_INFO_CTR;
1268
1269 typedef struct spool_r_enumports
1270 {
1271         NEW_BUFFER *buffer;
1272         uint32 needed;          /* bytes needed */
1273         uint32 returned;        /* number of printers */
1274         WERROR status;
1275 }
1276 SPOOL_R_ENUMPORTS;
1277
1278 #define JOB_CONTROL_PAUSE              1
1279 #define JOB_CONTROL_RESUME             2
1280 #define JOB_CONTROL_CANCEL             3
1281 #define JOB_CONTROL_RESTART            4
1282 #define JOB_CONTROL_DELETE             5
1283
1284 typedef struct job_info_info
1285 {
1286         union
1287         {
1288                 JOB_INFO_1 job_info_1;
1289                 JOB_INFO_2 job_info_2;
1290         }
1291         job;
1292
1293 }
1294 JOB_INFO;
1295
1296 typedef struct spool_q_setjob
1297 {
1298         POLICY_HND handle;
1299         uint32 jobid;
1300         uint32 level;
1301         JOB_INFO ctr;
1302         uint32 command;
1303
1304 }
1305 SPOOL_Q_SETJOB;
1306
1307 typedef struct spool_r_setjob
1308 {
1309         WERROR status;
1310
1311 }
1312 SPOOL_R_SETJOB;
1313
1314 typedef struct spool_q_enumprinterdrivers
1315 {
1316         uint32 name_ptr;
1317         UNISTR2 name;
1318         uint32 environment_ptr;
1319         UNISTR2 environment;
1320         uint32 level;
1321         NEW_BUFFER *buffer;
1322         uint32 offered;
1323 }
1324 SPOOL_Q_ENUMPRINTERDRIVERS;
1325
1326 typedef struct spool_r_enumprinterdrivers
1327 {
1328         NEW_BUFFER *buffer;
1329         uint32 needed;
1330         uint32 returned;
1331         WERROR status;
1332 }
1333 SPOOL_R_ENUMPRINTERDRIVERS;
1334
1335 #define FORM_USER    0
1336 #define FORM_BUILTIN 1
1337 #define FORM_PRINTER 2
1338
1339 typedef struct spool_form_1
1340 {
1341         uint32 flag;
1342         UNISTR name;
1343         uint32 width;
1344         uint32 length;
1345         uint32 left;
1346         uint32 top;
1347         uint32 right;
1348         uint32 bottom;
1349 }
1350 FORM_1;
1351
1352 typedef struct spool_q_enumforms
1353 {
1354         POLICY_HND handle;
1355         uint32 level;
1356         NEW_BUFFER *buffer;
1357         uint32 offered;
1358 }
1359 SPOOL_Q_ENUMFORMS;
1360
1361 typedef struct spool_r_enumforms
1362 {
1363         NEW_BUFFER *buffer;
1364         uint32 needed;
1365         uint32 numofforms;
1366         WERROR status;
1367 }
1368 SPOOL_R_ENUMFORMS;
1369
1370 typedef struct spool_q_getform
1371 {
1372         POLICY_HND handle;
1373         UNISTR2 formname;
1374         uint32 level;
1375         NEW_BUFFER *buffer;
1376         uint32 offered;
1377 }
1378 SPOOL_Q_GETFORM;
1379
1380 typedef struct spool_r_getform
1381 {
1382         NEW_BUFFER *buffer;
1383         uint32 needed;
1384         WERROR status;
1385 }
1386 SPOOL_R_GETFORM;
1387
1388 typedef struct spool_printer_info_level_1
1389 {
1390         uint32 flags;
1391         uint32 description_ptr;
1392         uint32 name_ptr;
1393         uint32 comment_ptr;
1394         UNISTR2 description;
1395         UNISTR2 name;
1396         UNISTR2 comment;        
1397 } SPOOL_PRINTER_INFO_LEVEL_1;
1398
1399 typedef struct spool_printer_info_level_2
1400 {
1401         uint32 servername_ptr;
1402         uint32 printername_ptr;
1403         uint32 sharename_ptr;
1404         uint32 portname_ptr;
1405         uint32 drivername_ptr;
1406         uint32 comment_ptr;
1407         uint32 location_ptr;
1408         uint32 devmode_ptr;
1409         uint32 sepfile_ptr;
1410         uint32 printprocessor_ptr;
1411         uint32 datatype_ptr;
1412         uint32 parameters_ptr;
1413         uint32 secdesc_ptr;
1414         uint32 attributes;
1415         uint32 priority;
1416         uint32 default_priority;
1417         uint32 starttime;
1418         uint32 untiltime;
1419         uint32 status;
1420         uint32 cjobs;
1421         uint32 averageppm;
1422         UNISTR2 servername;
1423         UNISTR2 printername;
1424         UNISTR2 sharename;
1425         UNISTR2 portname;
1426         UNISTR2 drivername;
1427         UNISTR2 comment;
1428         UNISTR2 location;
1429         UNISTR2 sepfile;
1430         UNISTR2 printprocessor;
1431         UNISTR2 datatype;
1432         UNISTR2 parameters;
1433 }
1434 SPOOL_PRINTER_INFO_LEVEL_2;
1435
1436 typedef struct spool_printer_info_level_3
1437 {
1438         uint32 secdesc_ptr;
1439 }
1440 SPOOL_PRINTER_INFO_LEVEL_3;
1441
1442 typedef struct spool_printer_info_level
1443 {
1444         uint32 level;
1445         uint32 info_ptr;
1446         SPOOL_PRINTER_INFO_LEVEL_1 *info_1;
1447         SPOOL_PRINTER_INFO_LEVEL_2 *info_2;
1448         SPOOL_PRINTER_INFO_LEVEL_3 *info_3;
1449 }
1450 SPOOL_PRINTER_INFO_LEVEL;
1451
1452 typedef struct spool_printer_driver_info_level_3
1453 {
1454         uint32 cversion;
1455         uint32 name_ptr;
1456         uint32 environment_ptr;
1457         uint32 driverpath_ptr;
1458         uint32 datafile_ptr;
1459         uint32 configfile_ptr;
1460         uint32 helpfile_ptr;
1461         uint32 monitorname_ptr;
1462         uint32 defaultdatatype_ptr;
1463         uint32 dependentfilessize;
1464         uint32 dependentfiles_ptr;
1465
1466         UNISTR2 name;
1467         UNISTR2 environment;
1468         UNISTR2 driverpath;
1469         UNISTR2 datafile;
1470         UNISTR2 configfile;
1471         UNISTR2 helpfile;
1472         UNISTR2 monitorname;
1473         UNISTR2 defaultdatatype;
1474         BUFFER5 dependentfiles;
1475
1476 }
1477 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3;
1478
1479 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
1480 typedef struct {
1481         uint32 version;
1482         uint32 name_ptr;
1483         uint32 environment_ptr;
1484         uint32 driverpath_ptr;
1485         uint32 datafile_ptr;
1486         uint32 configfile_ptr;
1487         uint32 helpfile_ptr;
1488         uint32 monitorname_ptr;
1489         uint32 defaultdatatype_ptr;
1490         uint32 dependentfiles_len;
1491         uint32 dependentfiles_ptr;
1492         uint32 previousnames_len;
1493         uint32 previousnames_ptr;
1494         NTTIME  driverdate;
1495         UINT64_S        driverversion;
1496         uint32  dummy4;
1497         uint32 mfgname_ptr;
1498         uint32 oemurl_ptr;
1499         uint32 hardwareid_ptr;
1500         uint32 provider_ptr;
1501         UNISTR2 name;
1502         UNISTR2 environment;
1503         UNISTR2 driverpath;
1504         UNISTR2 datafile;
1505         UNISTR2 configfile;
1506         UNISTR2 helpfile;
1507         UNISTR2 monitorname;
1508         UNISTR2 defaultdatatype;
1509         BUFFER5 dependentfiles;
1510         BUFFER5 previousnames;
1511         UNISTR2 mfgname;
1512         UNISTR2 oemurl;
1513         UNISTR2 hardwareid;
1514         UNISTR2 provider;
1515 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6;
1516
1517
1518 typedef struct spool_printer_driver_info_level
1519 {
1520         uint32 level;
1521         uint32 ptr;
1522         SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
1523         SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
1524 }
1525 SPOOL_PRINTER_DRIVER_INFO_LEVEL;
1526
1527
1528 /* this struct is undocumented */
1529 /* thanks to the ddk ... */
1530 typedef struct spool_user_level_1
1531 {
1532         uint32 size;
1533         uint32 client_name_ptr;
1534         uint32 user_name_ptr;
1535         uint32 build;
1536         uint32 major;
1537         uint32 minor;
1538         uint32 processor;
1539         UNISTR2 client_name;
1540         UNISTR2 user_name;
1541 }
1542 SPOOL_USER_LEVEL_1;
1543
1544 typedef struct spool_user_level
1545 {
1546         SPOOL_USER_LEVEL_1 *user_level_1;
1547 }
1548 SPOOL_USER_LEVEL;
1549
1550 typedef struct spool_q_setprinter
1551 {
1552         POLICY_HND handle;
1553         uint32 level;
1554         SPOOL_PRINTER_INFO_LEVEL info;
1555         SEC_DESC_BUF *secdesc_ctr;
1556         DEVMODE_CTR devmode_ctr;
1557
1558         uint32 command;
1559
1560 }
1561 SPOOL_Q_SETPRINTER;
1562
1563 typedef struct spool_r_setprinter
1564 {
1565         WERROR status;
1566 }
1567 SPOOL_R_SETPRINTER;
1568
1569 typedef struct spool_q_addprinter
1570 {
1571         UNISTR2 server_name;
1572         uint32 level;
1573         SPOOL_PRINTER_INFO_LEVEL info;
1574         DEVMODE_CTR devmode_ctr;
1575         SEC_DESC_BUF *secdesc_ctr;
1576         uint32 user_level;
1577         SPOOL_USER_LEVEL user;
1578 }
1579 SPOOL_Q_ADDPRINTER;
1580
1581 typedef struct spool_r_addprinter
1582 {
1583         WERROR status;
1584 }
1585 SPOOL_R_ADDPRINTER;
1586
1587 typedef struct spool_q_deleteprinter
1588 {
1589         POLICY_HND handle;
1590 }
1591 SPOOL_Q_DELETEPRINTER;
1592
1593 typedef struct spool_r_deleteprinter
1594 {
1595         POLICY_HND handle;
1596         WERROR status;
1597 }
1598 SPOOL_R_DELETEPRINTER;
1599
1600 typedef struct spool_q_abortprinter
1601 {
1602         POLICY_HND handle;
1603 }
1604 SPOOL_Q_ABORTPRINTER;
1605
1606 typedef struct spool_r_abortprinter
1607 {
1608         WERROR status;
1609 }
1610 SPOOL_R_ABORTPRINTER;
1611
1612
1613 typedef struct spool_q_addprinterex
1614 {
1615         uint32 server_name_ptr;
1616         UNISTR2 server_name;
1617         uint32 level;
1618         SPOOL_PRINTER_INFO_LEVEL info;
1619         DEVMODE_CTR devmode_ctr;
1620         SEC_DESC_BUF *secdesc_ctr;
1621         uint32 user_switch;
1622         SPOOL_USER_CTR user_ctr;
1623 }
1624 SPOOL_Q_ADDPRINTEREX;
1625
1626 typedef struct spool_r_addprinterex
1627 {
1628         POLICY_HND handle;
1629         WERROR status;
1630 }
1631 SPOOL_R_ADDPRINTEREX;
1632
1633
1634 typedef struct spool_q_addprinterdriver
1635 {
1636         uint32 server_name_ptr;
1637         UNISTR2 server_name;
1638         uint32 level;
1639         SPOOL_PRINTER_DRIVER_INFO_LEVEL info;
1640 }
1641 SPOOL_Q_ADDPRINTERDRIVER;
1642
1643 typedef struct spool_r_addprinterdriver
1644 {
1645         WERROR status;
1646 }
1647 SPOOL_R_ADDPRINTERDRIVER;
1648
1649
1650 typedef struct driver_directory_1
1651 {
1652         UNISTR name;
1653 }
1654 DRIVER_DIRECTORY_1;
1655
1656 typedef struct driver_info_ctr_info
1657 {
1658         DRIVER_DIRECTORY_1 *info1;
1659 }
1660 DRIVER_DIRECTORY_CTR;
1661
1662 typedef struct spool_q_getprinterdriverdirectory
1663 {
1664         uint32 name_ptr;
1665         UNISTR2 name;
1666         uint32 environment_ptr;
1667         UNISTR2 environment;
1668         uint32 level;
1669         NEW_BUFFER *buffer;
1670         uint32 offered;
1671 }
1672 SPOOL_Q_GETPRINTERDRIVERDIR;
1673
1674 typedef struct spool_r_getprinterdriverdirectory
1675 {
1676         NEW_BUFFER *buffer;
1677         uint32 needed;
1678         WERROR status;
1679 }
1680 SPOOL_R_GETPRINTERDRIVERDIR;
1681
1682 typedef struct spool_q_addprintprocessor
1683 {
1684         uint32 server_ptr;
1685         UNISTR2 server;
1686         UNISTR2 environment;
1687         UNISTR2 path;
1688         UNISTR2 name;
1689 }
1690 SPOOL_Q_ADDPRINTPROCESSOR;
1691
1692 typedef struct spool_r_addprintprocessor
1693 {
1694         WERROR status;
1695 }
1696 SPOOL_R_ADDPRINTPROCESSOR;
1697
1698
1699 typedef struct spool_q_enumprintprocessors
1700 {
1701         uint32 name_ptr;
1702         UNISTR2 name;
1703         uint32 environment_ptr;
1704         UNISTR2 environment;
1705         uint32 level;
1706         NEW_BUFFER *buffer;
1707         uint32 offered;
1708 }
1709 SPOOL_Q_ENUMPRINTPROCESSORS;
1710
1711 typedef struct printprocessor_1
1712 {
1713         UNISTR name;
1714 }
1715 PRINTPROCESSOR_1;
1716
1717 typedef struct spool_r_enumprintprocessors
1718 {
1719         NEW_BUFFER *buffer;
1720         uint32 needed;
1721         uint32 returned;
1722         WERROR status;
1723 }
1724 SPOOL_R_ENUMPRINTPROCESSORS;
1725
1726 typedef struct spool_q_enumprintprocdatatypes
1727 {
1728         uint32 name_ptr;
1729         UNISTR2 name;
1730         uint32 processor_ptr;
1731         UNISTR2 processor;
1732         uint32 level;
1733         NEW_BUFFER *buffer;
1734         uint32 offered;
1735 }
1736 SPOOL_Q_ENUMPRINTPROCDATATYPES;
1737
1738 typedef struct ppdatatype_1
1739 {
1740         UNISTR name;
1741 }
1742 PRINTPROCDATATYPE_1;
1743
1744 typedef struct spool_r_enumprintprocdatatypes
1745 {
1746         NEW_BUFFER *buffer;
1747         uint32 needed;
1748         uint32 returned;
1749         WERROR status;
1750 }
1751 SPOOL_R_ENUMPRINTPROCDATATYPES;
1752
1753 typedef struct printmonitor_1
1754 {
1755         UNISTR name;
1756 }
1757 PRINTMONITOR_1;
1758
1759 typedef struct printmonitor_2
1760 {
1761         UNISTR name;
1762         UNISTR environment;
1763         UNISTR dll_name;
1764 }
1765 PRINTMONITOR_2;
1766
1767 typedef struct spool_q_enumprintmonitors
1768 {
1769         uint32 name_ptr;
1770         UNISTR2 name;
1771         uint32 level;
1772         NEW_BUFFER *buffer;
1773         uint32 offered;
1774 }
1775 SPOOL_Q_ENUMPRINTMONITORS;
1776
1777 typedef struct spool_r_enumprintmonitors
1778 {
1779         NEW_BUFFER *buffer;
1780         uint32 needed;
1781         uint32 returned;
1782         WERROR status;
1783 }
1784 SPOOL_R_ENUMPRINTMONITORS;
1785
1786
1787 typedef struct spool_q_enumprinterdata
1788 {
1789         POLICY_HND handle;
1790         uint32 index;
1791         uint32 valuesize;
1792         uint32 datasize;
1793 }
1794 SPOOL_Q_ENUMPRINTERDATA;
1795
1796 typedef struct spool_r_enumprinterdata
1797 {
1798         uint32 valuesize;
1799         uint16 *value;
1800         uint32 realvaluesize;
1801         uint32 type;
1802         uint32 datasize;
1803         uint8 *data;
1804         uint32 realdatasize;
1805         WERROR status;
1806 }
1807 SPOOL_R_ENUMPRINTERDATA;
1808
1809 typedef struct spool_q_setprinterdata
1810 {
1811         POLICY_HND handle;
1812         UNISTR2 value;
1813         uint32 type;
1814         uint32 max_len;
1815         uint8 *data;
1816         uint32 real_len;
1817         uint32 numeric_data;
1818 }
1819 SPOOL_Q_SETPRINTERDATA;
1820
1821 typedef struct spool_r_setprinterdata
1822 {
1823         WERROR status;
1824 }
1825 SPOOL_R_SETPRINTERDATA;
1826
1827 typedef struct spool_q_resetprinter
1828 {
1829         POLICY_HND handle;
1830         uint32 datatype_ptr;
1831         UNISTR2 datatype;
1832         DEVMODE_CTR devmode_ctr;
1833
1834 } SPOOL_Q_RESETPRINTER;
1835
1836 typedef struct spool_r_resetprinter
1837 {
1838         WERROR status;
1839
1840 SPOOL_R_RESETPRINTER;
1841
1842
1843
1844 typedef struct _form
1845 {
1846         uint32 flags;
1847         uint32 name_ptr;
1848         uint32 size_x;
1849         uint32 size_y;
1850         uint32 left;
1851         uint32 top;
1852         uint32 right;
1853         uint32 bottom;
1854         UNISTR2 name;
1855 }
1856 FORM;
1857
1858 typedef struct spool_q_addform
1859 {
1860         POLICY_HND handle;
1861         uint32 level;
1862         uint32 level2;          /* This should really be part of the FORM structure */
1863         FORM form;
1864 }
1865 SPOOL_Q_ADDFORM;
1866
1867 typedef struct spool_r_addform
1868 {
1869         WERROR status;
1870 }
1871 SPOOL_R_ADDFORM;
1872
1873 typedef struct spool_q_setform
1874 {
1875         POLICY_HND handle;
1876         UNISTR2 name;
1877         uint32 level;
1878         uint32 level2;
1879         FORM form;
1880 }
1881 SPOOL_Q_SETFORM;
1882
1883 typedef struct spool_r_setform
1884 {
1885         WERROR status;
1886 }
1887 SPOOL_R_SETFORM;
1888
1889 typedef struct spool_q_deleteform
1890 {
1891         POLICY_HND handle;
1892         UNISTR2 name;
1893 }
1894 SPOOL_Q_DELETEFORM;
1895
1896 typedef struct spool_r_deleteform
1897 {
1898         WERROR status;
1899 }
1900 SPOOL_R_DELETEFORM;
1901
1902 typedef struct spool_q_getjob
1903 {
1904         POLICY_HND handle;
1905         uint32 jobid;
1906         uint32 level;
1907         NEW_BUFFER *buffer;
1908         uint32 offered;
1909 }
1910 SPOOL_Q_GETJOB;
1911
1912 typedef struct pjob_info_info
1913 {
1914         union
1915         {
1916                 JOB_INFO_1 *job_info_1;
1917                 JOB_INFO_2 *job_info_2;
1918                 void *info;
1919         }
1920         job;
1921
1922 }
1923 PJOB_INFO;
1924
1925 typedef struct spool_r_getjob
1926 {
1927         NEW_BUFFER *buffer;
1928         uint32 needed;
1929         WERROR status;
1930 }
1931 SPOOL_R_GETJOB;
1932
1933 typedef struct spool_q_replyopenprinter
1934 {
1935         UNISTR2 string;
1936         uint32 printer;
1937         uint32 type;
1938         uint32 unknown0;
1939         uint32 unknown1;
1940 }
1941 SPOOL_Q_REPLYOPENPRINTER;
1942
1943 typedef struct spool_r_replyopenprinter
1944 {
1945         POLICY_HND handle;
1946         WERROR status;
1947 }
1948 SPOOL_R_REPLYOPENPRINTER;
1949
1950 typedef struct spool_q_routerreplyprinter
1951 {
1952         POLICY_HND handle;
1953         uint32 condition;
1954         uint32 unknown1;        /* 0x00000001 */
1955         uint32 change_id;
1956         uint8  unknown2[5];     /* 0x0000000001 */
1957 }
1958 SPOOL_Q_ROUTERREPLYPRINTER;
1959
1960 typedef struct spool_r_routerreplyprinter
1961 {
1962         WERROR status;
1963 }
1964 SPOOL_R_ROUTERREPLYPRINTER;
1965
1966 typedef struct spool_q_replycloseprinter
1967 {
1968         POLICY_HND handle;
1969 }
1970 SPOOL_Q_REPLYCLOSEPRINTER;
1971
1972 typedef struct spool_r_replycloseprinter
1973 {
1974         POLICY_HND handle;
1975         WERROR status;
1976 }
1977 SPOOL_R_REPLYCLOSEPRINTER;
1978
1979 typedef struct spool_q_rrpcn
1980 {
1981         POLICY_HND handle;
1982         uint32 change_low;
1983         uint32 change_high;
1984         uint32 unknown0;
1985         uint32 unknown1;
1986         uint32 info_ptr;
1987         SPOOL_NOTIFY_INFO info; 
1988 }
1989 SPOOL_Q_REPLY_RRPCN;
1990
1991 typedef struct spool_r_rrpcn
1992 {
1993         uint32 unknown0;
1994         WERROR status;
1995 }
1996 SPOOL_R_REPLY_RRPCN;
1997
1998 typedef struct spool_q_getprinterdataex
1999 {
2000         POLICY_HND handle;
2001         UNISTR2 keyname;
2002         UNISTR2 valuename;
2003         uint32 size;
2004 }
2005 SPOOL_Q_GETPRINTERDATAEX;
2006
2007 typedef struct spool_r_getprinterdataex
2008 {
2009         uint32 type;
2010         uint32 size;
2011         uint8 *data;
2012         uint32 needed;
2013         WERROR status;
2014 }
2015 SPOOL_R_GETPRINTERDATAEX;
2016
2017 typedef struct spool_q_setprinterdataex
2018 {
2019         POLICY_HND handle;
2020         UNISTR2 key;
2021         UNISTR2 value;
2022         uint32 type;
2023         uint32 max_len;
2024         uint8 *data;
2025         uint32 real_len;
2026         uint32 numeric_data;
2027 }
2028 SPOOL_Q_SETPRINTERDATAEX;
2029
2030 typedef struct spool_r_setprinterdataex
2031 {
2032         WERROR status;
2033 }
2034 SPOOL_R_SETPRINTERDATAEX;
2035
2036
2037 typedef struct spool_q_enumprinterkey
2038 {
2039         POLICY_HND handle;
2040         UNISTR2 key;
2041         uint32 size;
2042 }
2043 SPOOL_Q_ENUMPRINTERKEY;
2044
2045 typedef struct spool_r_enumprinterkey
2046 {
2047         BUFFER5 keys;
2048         uint32 needed;  /* in bytes */
2049         WERROR status;
2050 }
2051 SPOOL_R_ENUMPRINTERKEY;
2052
2053 typedef struct printer_enum_values
2054 {
2055         UNISTR valuename;
2056         uint32 value_len;
2057         uint32 type;
2058         uint8  *data;
2059         uint32 data_len; 
2060         
2061 }
2062 PRINTER_ENUM_VALUES;
2063
2064 typedef struct printer_enum_values_ctr
2065 {
2066         uint32 size;
2067         uint32 size_of_array;
2068         PRINTER_ENUM_VALUES *values;
2069 }
2070 PRINTER_ENUM_VALUES_CTR;
2071
2072 typedef struct spool_q_enumprinterdataex
2073 {
2074         POLICY_HND handle;
2075         UNISTR2 key;
2076         uint32 size;
2077 }
2078 SPOOL_Q_ENUMPRINTERDATAEX;
2079
2080 typedef struct spool_r_enumprinterdataex
2081 {
2082         PRINTER_ENUM_VALUES_CTR ctr;
2083         uint32 needed;
2084         uint32 returned;
2085         WERROR status;
2086 }
2087 SPOOL_R_ENUMPRINTERDATAEX;
2088
2089 typedef struct printprocessor_directory_1
2090 {
2091         UNISTR name;
2092 }
2093 PRINTPROCESSOR_DIRECTORY_1;
2094
2095 typedef struct spool_q_getprintprocessordirectory
2096 {
2097         UNISTR2 name;
2098         UNISTR2 environment;
2099         uint32 level;
2100         NEW_BUFFER *buffer;
2101         uint32 offered;
2102 }
2103 SPOOL_Q_GETPRINTPROCESSORDIRECTORY;
2104
2105 typedef struct spool_r_getprintprocessordirectory
2106 {
2107         NEW_BUFFER *buffer;
2108         uint32 needed;
2109         WERROR status;
2110 }
2111 SPOOL_R_GETPRINTPROCESSORDIRECTORY;
2112
2113 #define PRINTER_DRIVER_VERSION 2
2114 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
2115
2116 #endif /* _RPC_SPOOLSS_H */
2117