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