00001 /* 00002 Unix SMB/Netbios implementation. 00003 00004 Copyright (C) Andrew Tridgell 1992-2000, 00005 Copyright (C) Luke Kenneth Casson Leighton 1996-2000, 00006 Copyright (C) Jean Francois Micouleau 1998-2000. 00007 Copyright (C) Gerald Carter 2001-2006. 00008 00009 This program is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00022 */ 00023 00024 #ifndef _RPC_SPOOLSS_H /* _RPC_SPOOLSS_H */ 00025 #define _RPC_SPOOLSS_H 00026 00027 /* spoolss pipe: this are the calls which are not implemented ... 00028 #define SPOOLSS_GETPRINTERDRIVER 0x0b 00029 #define SPOOLSS_READPRINTER 0x16 00030 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c 00031 #define SPOOLSS_ADDPORT 0x25 00032 #define SPOOLSS_CONFIGUREPORT 0x26 00033 #define SPOOLSS_DELETEPORT 0x27 00034 #define SPOOLSS_CREATEPRINTERIC 0x28 00035 #define SPOOLSS_PLAYGDISCRIPTONPRINTERIC 0x29 00036 #define SPOOLSS_DELETEPRINTERIC 0x2a 00037 #define SPOOLSS_ADDPRINTERCONNECTION 0x2b 00038 #define SPOOLSS_DELETEPRINTERCONNECTION 0x2c 00039 #define SPOOLSS_PRINTERMESSAGEBOX 0x2d 00040 #define SPOOLSS_ADDMONITOR 0x2e 00041 #define SPOOLSS_DELETEMONITOR 0x2f 00042 #define SPOOLSS_DELETEPRINTPROCESSOR 0x30 00043 #define SPOOLSS_ADDPRINTPROVIDOR 0x31 00044 #define SPOOLSS_DELETEPRINTPROVIDOR 0x32 00045 #define SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION 0x36 00046 #define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37 00047 #define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39 00048 #define SPOOLSS_ADDPORTEX 0x3d 00049 #define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e 00050 #define SPOOLSS_SPOOLERINIT 0x3f 00051 #define SPOOLSS_RESETPRINTEREX 0x40 00052 */ 00053 00054 /* those are implemented */ 00055 #define SPOOLSS_ENUMPRINTERS 0x00 00056 #define SPOOLSS_OPENPRINTER 0x01 00057 #define SPOOLSS_SETJOB 0x02 00058 #define SPOOLSS_GETJOB 0x03 00059 #define SPOOLSS_ENUMJOBS 0x04 00060 #define SPOOLSS_ADDPRINTER 0x05 00061 #define SPOOLSS_DELETEPRINTER 0x06 00062 #define SPOOLSS_SETPRINTER 0x07 00063 #define SPOOLSS_GETPRINTER 0x08 00064 #define SPOOLSS_ADDPRINTERDRIVER 0x09 00065 #define SPOOLSS_ENUMPRINTERDRIVERS 0x0a 00066 #define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c 00067 #define SPOOLSS_DELETEPRINTERDRIVER 0x0d 00068 #define SPOOLSS_ADDPRINTPROCESSOR 0x0e 00069 #define SPOOLSS_ENUMPRINTPROCESSORS 0x0f 00070 #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10 00071 #define SPOOLSS_STARTDOCPRINTER 0x11 00072 #define SPOOLSS_STARTPAGEPRINTER 0x12 00073 #define SPOOLSS_WRITEPRINTER 0x13 00074 #define SPOOLSS_ENDPAGEPRINTER 0x14 00075 #define SPOOLSS_ABORTPRINTER 0x15 00076 #define SPOOLSS_ENDDOCPRINTER 0x17 00077 #define SPOOLSS_ADDJOB 0x18 00078 #define SPOOLSS_SCHEDULEJOB 0x19 00079 #define SPOOLSS_GETPRINTERDATA 0x1a 00080 #define SPOOLSS_SETPRINTERDATA 0x1b 00081 #define SPOOLSS_CLOSEPRINTER 0x1d 00082 #define SPOOLSS_ADDFORM 0x1e 00083 #define SPOOLSS_DELETEFORM 0x1f 00084 #define SPOOLSS_GETFORM 0x20 00085 #define SPOOLSS_SETFORM 0x21 00086 #define SPOOLSS_ENUMFORMS 0x22 00087 #define SPOOLSS_ENUMPORTS 0x23 00088 #define SPOOLSS_ENUMMONITORS 0x24 00089 #define SPOOLSS_ENUMPRINTPROCDATATYPES 0x33 00090 #define SPOOLSS_RESETPRINTER 0x34 00091 #define SPOOLSS_GETPRINTERDRIVER2 0x35 00092 #define SPOOLSS_FCPN 0x38 /* FindClosePrinterNotify */ 00093 #define SPOOLSS_REPLYOPENPRINTER 0x3a 00094 #define SPOOLSS_ROUTERREPLYPRINTER 0x3b 00095 #define SPOOLSS_REPLYCLOSEPRINTER 0x3c 00096 #define SPOOLSS_RFFPCNEX 0x41 /* RemoteFindFirstPrinterChangeNotifyEx */ 00097 #define SPOOLSS_RRPCN 0x42 /* RouteRefreshPrinterChangeNotification */ 00098 #define SPOOLSS_RFNPCNEX 0x43 /* RemoteFindNextPrinterChangeNotifyEx */ 00099 #define SPOOLSS_OPENPRINTEREX 0x45 00100 #define SPOOLSS_ADDPRINTEREX 0x46 00101 #define SPOOLSS_ENUMPRINTERDATA 0x48 00102 #define SPOOLSS_DELETEPRINTERDATA 0x49 00103 #define SPOOLSS_SETPRINTERDATAEX 0x4d 00104 #define SPOOLSS_GETPRINTERDATAEX 0x4e 00105 #define SPOOLSS_ENUMPRINTERDATAEX 0x4f 00106 #define SPOOLSS_ENUMPRINTERKEY 0x50 00107 #define SPOOLSS_DELETEPRINTERDATAEX 0x51 00108 #define SPOOLSS_DELETEPRINTERKEY 0x52 00109 #define SPOOLSS_DELETEPRINTERDRIVEREX 0x54 00110 #define SPOOLSS_XCVDATAPORT 0x58 00111 #define SPOOLSS_ADDPRINTERDRIVEREX 0x59 00112 00113 /* 00114 * Special strings for the OpenPrinter() call. See the MSDN DDK 00115 * docs on the XcvDataPort() for more details. 00116 */ 00117 00118 #define SPL_LOCAL_PORT "Local Port" 00119 #define SPL_TCPIP_PORT "Standard TCP/IP Port" 00120 #define SPL_XCV_MONITOR_LOCALMON ",XcvMonitor Local Port" 00121 #define SPL_XCV_MONITOR_TCPMON ",XcvMonitor Standard TCP/IP Port" 00122 00123 00124 #define PRINTER_CONTROL_UNPAUSE 0x00000000 00125 #define PRINTER_CONTROL_PAUSE 0x00000001 00126 #define PRINTER_CONTROL_RESUME 0x00000002 00127 #define PRINTER_CONTROL_PURGE 0x00000003 00128 #define PRINTER_CONTROL_SET_STATUS 0x00000004 00129 00130 #define PRINTER_STATUS_OK 0x00000000 00131 #define PRINTER_STATUS_PAUSED 0x00000001 00132 #define PRINTER_STATUS_ERROR 0x00000002 00133 #define PRINTER_STATUS_PENDING_DELETION 0x00000004 00134 #define PRINTER_STATUS_PAPER_JAM 0x00000008 00135 00136 #define PRINTER_STATUS_PAPER_OUT 0x00000010 00137 #define PRINTER_STATUS_MANUAL_FEED 0x00000020 00138 #define PRINTER_STATUS_PAPER_PROBLEM 0x00000040 00139 #define PRINTER_STATUS_OFFLINE 0x00000080 00140 00141 #define PRINTER_STATUS_IO_ACTIVE 0x00000100 00142 #define PRINTER_STATUS_BUSY 0x00000200 00143 #define PRINTER_STATUS_PRINTING 0x00000400 00144 #define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800 00145 00146 #define PRINTER_STATUS_NOT_AVAILABLE 0x00001000 00147 #define PRINTER_STATUS_WAITING 0x00002000 00148 #define PRINTER_STATUS_PROCESSING 0x00004000 00149 #define PRINTER_STATUS_INITIALIZING 0x00008000 00150 00151 #define PRINTER_STATUS_WARMING_UP 0x00010000 00152 #define PRINTER_STATUS_TONER_LOW 0x00020000 00153 #define PRINTER_STATUS_NO_TONER 0x00040000 00154 #define PRINTER_STATUS_PAGE_PUNT 0x00080000 00155 00156 #define PRINTER_STATUS_USER_INTERVENTION 0x00100000 00157 #define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000 00158 #define PRINTER_STATUS_DOOR_OPEN 0x00400000 00159 #define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000 00160 00161 #define PRINTER_STATUS_POWER_SAVE 0x01000000 00162 00163 #define SERVER_ACCESS_ADMINISTER 0x00000001 00164 #define SERVER_ACCESS_ENUMERATE 0x00000002 00165 #define PRINTER_ACCESS_ADMINISTER 0x00000004 00166 #define PRINTER_ACCESS_USE 0x00000008 00167 #define JOB_ACCESS_ADMINISTER 0x00000010 00168 #define JOB_ACCESS_READ 0x00000020 00169 00170 /* JOB status codes. */ 00171 00172 #define JOB_STATUS_QUEUED 0x0000 00173 #define JOB_STATUS_PAUSED 0x0001 00174 #define JOB_STATUS_ERROR 0x0002 00175 #define JOB_STATUS_DELETING 0x0004 00176 #define JOB_STATUS_SPOOLING 0x0008 00177 #define JOB_STATUS_PRINTING 0x0010 00178 #define JOB_STATUS_OFFLINE 0x0020 00179 #define JOB_STATUS_PAPEROUT 0x0040 00180 #define JOB_STATUS_PRINTED 0x0080 00181 #define JOB_STATUS_DELETED 0x0100 00182 #define JOB_STATUS_BLOCKED 0x0200 00183 #define JOB_STATUS_USER_INTERVENTION 0x0400 00184 00185 /* Access rights for print servers */ 00186 #define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE 00187 #define SERVER_READ STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE 00188 #define SERVER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE 00189 #define SERVER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|SERVER_ACCESS_ENUMERATE 00190 00191 /* Access rights for printers */ 00192 #define PRINTER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|PRINTER_ACCESS_ADMINISTER|PRINTER_ACCESS_USE 00193 #define PRINTER_READ STANDARD_RIGHTS_READ_ACCESS|PRINTER_ACCESS_USE 00194 #define PRINTER_WRITE STANDARD_RIGHTS_WRITE_ACCESS|PRINTER_ACCESS_USE 00195 #define PRINTER_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|PRINTER_ACCESS_USE 00196 00197 /* Access rights for jobs */ 00198 #define JOB_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|JOB_ACCESS_ADMINISTER|JOB_ACCESS_READ|PRINTER_ACCESS_USE 00199 #define JOB_READ STANDARD_RIGHTS_READ_ACCESS|JOB_ACCESS_ADMINISTER|JOB_ACCESS_READ 00200 #define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER|PRINTER_ACCESS_USE 00201 #define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER|PRINTER_ACCESS_USE 00202 00203 /* ACE masks for the various print permissions */ 00204 00205 #define PRINTER_ACE_FULL_CONTROL (GENERIC_ALL_ACCESS|PRINTER_ALL_ACCESS) 00206 #define PRINTER_ACE_MANAGE_DOCUMENTS (GENERIC_ALL_ACCESS|READ_CONTROL_ACCESS) 00207 #define PRINTER_ACE_PRINT (GENERIC_EXECUTE_ACCESS|READ_CONTROL_ACCESS|PRINTER_ACCESS_USE) 00208 00209 00210 /* Notify field types */ 00211 00212 #define NOTIFY_ONE_VALUE 1 /* Notify data is stored in value1 */ 00213 #define NOTIFY_TWO_VALUE 2 /* Notify data is stored in value2 */ 00214 #define NOTIFY_POINTER 3 /* Data is a pointer to a buffer */ 00215 #define NOTIFY_STRING 4 /* Data is a pointer to a buffer w/length */ 00216 #define NOTIFY_SECDESC 5 /* Data is a security descriptor */ 00217 00218 #define PRINTER_NOTIFY_TYPE 0x00 00219 #define JOB_NOTIFY_TYPE 0x01 00220 #define PRINT_TABLE_END 0xFF 00221 00222 #define MAX_PRINTER_NOTIFY 26 00223 #define MAX_JOB_NOTIFY 24 00224 00225 #define MAX_NOTIFY_TYPE_FOR_NOW 26 00226 00227 #define PRINTER_NOTIFY_SERVER_NAME 0x00 00228 #define PRINTER_NOTIFY_PRINTER_NAME 0x01 00229 #define PRINTER_NOTIFY_SHARE_NAME 0x02 00230 #define PRINTER_NOTIFY_PORT_NAME 0x03 00231 #define PRINTER_NOTIFY_DRIVER_NAME 0x04 00232 #define PRINTER_NOTIFY_COMMENT 0x05 00233 #define PRINTER_NOTIFY_LOCATION 0x06 00234 #define PRINTER_NOTIFY_DEVMODE 0x07 00235 #define PRINTER_NOTIFY_SEPFILE 0x08 00236 #define PRINTER_NOTIFY_PRINT_PROCESSOR 0x09 00237 #define PRINTER_NOTIFY_PARAMETERS 0x0A 00238 #define PRINTER_NOTIFY_DATATYPE 0x0B 00239 #define PRINTER_NOTIFY_SECURITY_DESCRIPTOR 0x0C 00240 #define PRINTER_NOTIFY_ATTRIBUTES 0x0D 00241 #define PRINTER_NOTIFY_PRIORITY 0x0E 00242 #define PRINTER_NOTIFY_DEFAULT_PRIORITY 0x0F 00243 #define PRINTER_NOTIFY_START_TIME 0x10 00244 #define PRINTER_NOTIFY_UNTIL_TIME 0x11 00245 #define PRINTER_NOTIFY_STATUS 0x12 00246 #define PRINTER_NOTIFY_STATUS_STRING 0x13 00247 #define PRINTER_NOTIFY_CJOBS 0x14 00248 #define PRINTER_NOTIFY_AVERAGE_PPM 0x15 00249 #define PRINTER_NOTIFY_TOTAL_PAGES 0x16 00250 #define PRINTER_NOTIFY_PAGES_PRINTED 0x17 00251 #define PRINTER_NOTIFY_TOTAL_BYTES 0x18 00252 #define PRINTER_NOTIFY_BYTES_PRINTED 0x19 00253 00254 #define JOB_NOTIFY_PRINTER_NAME 0x00 00255 #define JOB_NOTIFY_MACHINE_NAME 0x01 00256 #define JOB_NOTIFY_PORT_NAME 0x02 00257 #define JOB_NOTIFY_USER_NAME 0x03 00258 #define JOB_NOTIFY_NOTIFY_NAME 0x04 00259 #define JOB_NOTIFY_DATATYPE 0x05 00260 #define JOB_NOTIFY_PRINT_PROCESSOR 0x06 00261 #define JOB_NOTIFY_PARAMETERS 0x07 00262 #define JOB_NOTIFY_DRIVER_NAME 0x08 00263 #define JOB_NOTIFY_DEVMODE 0x09 00264 #define JOB_NOTIFY_STATUS 0x0A 00265 #define JOB_NOTIFY_STATUS_STRING 0x0B 00266 #define JOB_NOTIFY_SECURITY_DESCRIPTOR 0x0C 00267 #define JOB_NOTIFY_DOCUMENT 0x0D 00268 #define JOB_NOTIFY_PRIORITY 0x0E 00269 #define JOB_NOTIFY_POSITION 0x0F 00270 #define JOB_NOTIFY_SUBMITTED 0x10 00271 #define JOB_NOTIFY_START_TIME 0x11 00272 #define JOB_NOTIFY_UNTIL_TIME 0x12 00273 #define JOB_NOTIFY_TIME 0x13 00274 #define JOB_NOTIFY_TOTAL_PAGES 0x14 00275 #define JOB_NOTIFY_PAGES_PRINTED 0x15 00276 #define JOB_NOTIFY_TOTAL_BYTES 0x16 00277 #define JOB_NOTIFY_BYTES_PRINTED 0x17 00278 00279 #define PRINTER_NOTIFY_OPTIONS_REFRESH 0x01 00280 00281 #define PRINTER_CHANGE_ADD_PRINTER 0x00000001 00282 #define PRINTER_CHANGE_SET_PRINTER 0x00000002 00283 #define PRINTER_CHANGE_DELETE_PRINTER 0x00000004 00284 #define PRINTER_CHANGE_FAILED_CONNECTION_PRINTER 0x00000008 00285 #define PRINTER_CHANGE_PRINTER (PRINTER_CHANGE_ADD_PRINTER | \ 00286 PRINTER_CHANGE_SET_PRINTER | \ 00287 PRINTER_CHANGE_DELETE_PRINTER | \ 00288 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER ) 00289 00290 #define PRINTER_CHANGE_ADD_JOB 0x00000100 00291 #define PRINTER_CHANGE_SET_JOB 0x00000200 00292 #define PRINTER_CHANGE_DELETE_JOB 0x00000400 00293 #define PRINTER_CHANGE_WRITE_JOB 0x00000800 00294 #define PRINTER_CHANGE_JOB (PRINTER_CHANGE_ADD_JOB | \ 00295 PRINTER_CHANGE_SET_JOB | \ 00296 PRINTER_CHANGE_DELETE_JOB | \ 00297 PRINTER_CHANGE_WRITE_JOB ) 00298 00299 #define PRINTER_CHANGE_ADD_FORM 0x00010000 00300 #define PRINTER_CHANGE_SET_FORM 0x00020000 00301 #define PRINTER_CHANGE_DELETE_FORM 0x00040000 00302 #define PRINTER_CHANGE_FORM (PRINTER_CHANGE_ADD_FORM | \ 00303 PRINTER_CHANGE_SET_FORM | \ 00304 PRINTER_CHANGE_DELETE_FORM ) 00305 00306 #define PRINTER_CHANGE_ADD_PORT 0x00100000 00307 #define PRINTER_CHANGE_CONFIGURE_PORT 0x00200000 00308 #define PRINTER_CHANGE_DELETE_PORT 0x00400000 00309 #define PRINTER_CHANGE_PORT (PRINTER_CHANGE_ADD_PORT | \ 00310 PRINTER_CHANGE_CONFIGURE_PORT | \ 00311 PRINTER_CHANGE_DELETE_PORT ) 00312 00313 #define PRINTER_CHANGE_ADD_PRINT_PROCESSOR 0x01000000 00314 #define PRINTER_CHANGE_DELETE_PRINT_PROCESSOR 0x04000000 00315 #define PRINTER_CHANGE_PRINT_PROCESSOR (PRINTER_CHANGE_ADD_PRINT_PROCESSOR | \ 00316 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR ) 00317 00318 #define PRINTER_CHANGE_ADD_PRINTER_DRIVER 0x10000000 00319 #define PRINTER_CHANGE_SET_PRINTER_DRIVER 0x20000000 00320 #define PRINTER_CHANGE_DELETE_PRINTER_DRIVER 0x40000000 00321 #define PRINTER_CHANGE_PRINTER_DRIVER (PRINTER_CHANGE_ADD_PRINTER_DRIVER | \ 00322 PRINTER_CHANGE_SET_PRINTER_DRIVER | \ 00323 PRINTER_CHANGE_DELETE_PRINTER_DRIVER ) 00324 00325 #define PRINTER_CHANGE_TIMEOUT 0x80000000 00326 #define PRINTER_CHANGE_ALL (PRINTER_CHANGE_JOB | \ 00327 PRINTER_CHANGE_FORM | \ 00328 PRINTER_CHANGE_PORT | \ 00329 PRINTER_CHANGE_PRINT_PROCESSOR | \ 00330 PRINTER_CHANGE_PRINTER_DRIVER ) 00331 00332 #define PRINTER_NOTIFY_INFO_DISCARDED 0x1 00333 00334 /* 00335 * Set of macros for flagging what changed in the PRINTER_INFO_2 struct 00336 * when sending messages to other smbd's 00337 */ 00338 #define PRINTER_MESSAGE_NULL 0x00000000 00339 #define PRINTER_MESSAGE_DRIVER 0x00000001 00340 #define PRINTER_MESSAGE_COMMENT 0x00000002 00341 #define PRINTER_MESSAGE_PRINTERNAME 0x00000004 00342 #define PRINTER_MESSAGE_LOCATION 0x00000008 00343 #define PRINTER_MESSAGE_DEVMODE 0x00000010 /* not curently supported */ 00344 #define PRINTER_MESSAGE_SEPFILE 0x00000020 00345 #define PRINTER_MESSAGE_PRINTPROC 0x00000040 00346 #define PRINTER_MESSAGE_PARAMS 0x00000080 00347 #define PRINTER_MESSAGE_DATATYPE 0x00000100 00348 #define PRINTER_MESSAGE_SECDESC 0x00000200 00349 #define PRINTER_MESSAGE_CJOBS 0x00000400 00350 #define PRINTER_MESSAGE_PORT 0x00000800 00351 #define PRINTER_MESSAGE_SHARENAME 0x00001000 00352 #define PRINTER_MESSAGE_ATTRIBUTES 0x00002000 00353 00354 typedef struct printer_message_info { 00355 uint32 low; /* PRINTER_CHANGE_XXX */ 00356 uint32 high; /* PRINTER_CHANGE_XXX */ 00357 fstring printer_name; 00358 uint32 flags; /* PRINTER_MESSAGE_XXX */ 00359 } 00360 PRINTER_MESSAGE_INFO; 00361 00362 /* 00363 * The printer attributes. 00364 * I #defined all of them (grabbed form MSDN) 00365 * I'm only using: 00366 * ( SHARED | NETWORK | RAW_ONLY ) 00367 * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file 00368 */ 00369 00370 #define PRINTER_ATTRIBUTE_QUEUED 0x00000001 00371 #define PRINTER_ATTRIBUTE_DIRECT 0x00000002 00372 #define PRINTER_ATTRIBUTE_DEFAULT 0x00000004 00373 #define PRINTER_ATTRIBUTE_SHARED 0x00000008 00374 00375 #define PRINTER_ATTRIBUTE_NETWORK 0x00000010 00376 #define PRINTER_ATTRIBUTE_HIDDEN 0x00000020 00377 #define PRINTER_ATTRIBUTE_LOCAL 0x00000040 00378 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080 00379 00380 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100 00381 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200 00382 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400 00383 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800 00384 00385 #define PRINTER_ATTRIBUTE_RAW_ONLY 0x00001000 00386 #define PRINTER_ATTRIBUTE_PUBLISHED 0x00002000 00387 00388 #define PRINTER_ATTRIBUTE_SAMBA (PRINTER_ATTRIBUTE_RAW_ONLY|\ 00389 PRINTER_ATTRIBUTE_SHARED|\ 00390 PRINTER_ATTRIBUTE_LOCAL) 00391 #define PRINTER_ATTRIBUTE_NOT_SAMBA (PRINTER_ATTRIBUTE_NETWORK) 00392 00393 #define NO_PRIORITY 0 00394 #define MAX_PRIORITY 99 00395 #define MIN_PRIORITY 1 00396 #define DEF_PRIORITY 1 00397 00398 /* the flags of the query */ 00399 #define PRINTER_ENUM_DEFAULT 0x00000001 00400 #define PRINTER_ENUM_LOCAL 0x00000002 00401 #define PRINTER_ENUM_CONNECTIONS 0x00000004 00402 #define PRINTER_ENUM_FAVORITE 0x00000004 00403 #define PRINTER_ENUM_NAME 0x00000008 00404 #define PRINTER_ENUM_REMOTE 0x00000010 00405 #define PRINTER_ENUM_SHARED 0x00000020 00406 #define PRINTER_ENUM_NETWORK 0x00000040 00407 00408 /* the flags of each printers */ 00409 #define PRINTER_ENUM_UNKNOWN_8 0x00000008 00410 #define PRINTER_ENUM_EXPAND 0x00004000 00411 #define PRINTER_ENUM_CONTAINER 0x00008000 00412 #define PRINTER_ENUM_ICONMASK 0x00ff0000 00413 #define PRINTER_ENUM_ICON1 0x00010000 00414 #define PRINTER_ENUM_ICON2 0x00020000 00415 #define PRINTER_ENUM_ICON3 0x00040000 00416 #define PRINTER_ENUM_ICON4 0x00080000 00417 #define PRINTER_ENUM_ICON5 0x00100000 00418 #define PRINTER_ENUM_ICON6 0x00200000 00419 #define PRINTER_ENUM_ICON7 0x00400000 00420 #define PRINTER_ENUM_ICON8 0x00800000 00421 00422 /* FLAGS for SPOOLSS_DELETEPRINTERDRIVEREX */ 00423 00424 #define DPD_DELETE_UNUSED_FILES 0x00000001 00425 #define DPD_DELETE_SPECIFIC_VERSION 0x00000002 00426 #define DPD_DELETE_ALL_FILES 0x00000004 00427 00428 #define DRIVER_ANY_VERSION 0xffffffff 00429 #define DRIVER_MAX_VERSION 4 00430 00431 /* FLAGS for SPOOLSS_ADDPRINTERDRIVEREX */ 00432 00433 #define APD_STRICT_UPGRADE 0x00000001 00434 #define APD_STRICT_DOWNGRADE 0x00000002 00435 #define APD_COPY_ALL_FILES 0x00000004 00436 #define APD_COPY_NEW_FILES 0x00000008 00437 00438 00439 /* this struct is undocumented */ 00440 /* thanks to the ddk ... */ 00441 typedef struct { 00442 uint32 size; /* length of user_name & client_name + 2? */ 00443 UNISTR2 *client_name; 00444 UNISTR2 *user_name; 00445 uint32 build; 00446 uint32 major; 00447 uint32 minor; 00448 uint32 processor; 00449 } SPOOL_USER_1; 00450 00451 typedef struct { 00452 uint32 level; 00453 union { 00454 SPOOL_USER_1 *user1; 00455 } user; 00456 } SPOOL_USER_CTR; 00457 00458 /* 00459 * various bits in the DEVICEMODE.fields member 00460 */ 00461 00462 #define DEVMODE_ORIENTATION 0x00000001 00463 #define DEVMODE_PAPERSIZE 0x00000002 00464 #define DEVMODE_PAPERLENGTH 0x00000004 00465 #define DEVMODE_PAPERWIDTH 0x00000008 00466 #define DEVMODE_SCALE 0x00000010 00467 #define DEVMODE_POSITION 0x00000020 00468 #define DEVMODE_NUP 0x00000040 00469 #define DEVMODE_COPIES 0x00000100 00470 #define DEVMODE_DEFAULTSOURCE 0x00000200 00471 #define DEVMODE_PRINTQUALITY 0x00000400 00472 #define DEVMODE_COLOR 0x00000800 00473 #define DEVMODE_DUPLEX 0x00001000 00474 #define DEVMODE_YRESOLUTION 0x00002000 00475 #define DEVMODE_TTOPTION 0x00004000 00476 #define DEVMODE_COLLATE 0x00008000 00477 #define DEVMODE_FORMNAME 0x00010000 00478 #define DEVMODE_LOGPIXELS 0x00020000 00479 #define DEVMODE_BITSPERPEL 0x00040000 00480 #define DEVMODE_PELSWIDTH 0x00080000 00481 #define DEVMODE_PELSHEIGHT 0x00100000 00482 #define DEVMODE_DISPLAYFLAGS 0x00200000 00483 #define DEVMODE_DISPLAYFREQUENCY 0x00400000 00484 #define DEVMODE_ICMMETHOD 0x00800000 00485 #define DEVMODE_ICMINTENT 0x01000000 00486 #define DEVMODE_MEDIATYPE 0x02000000 00487 #define DEVMODE_DITHERTYPE 0x04000000 00488 #define DEVMODE_PANNINGWIDTH 0x08000000 00489 #define DEVMODE_PANNINGHEIGHT 0x10000000 00490 00491 00492 /* 00493 * Devicemode structure 00494 */ 00495 00496 typedef struct devicemode 00497 { 00498 UNISTR devicename; 00499 uint16 specversion; 00500 uint16 driverversion; 00501 uint16 size; 00502 uint16 driverextra; 00503 uint32 fields; 00504 uint16 orientation; 00505 uint16 papersize; 00506 uint16 paperlength; 00507 uint16 paperwidth; 00508 uint16 scale; 00509 uint16 copies; 00510 uint16 defaultsource; 00511 uint16 printquality; 00512 uint16 color; 00513 uint16 duplex; 00514 uint16 yresolution; 00515 uint16 ttoption; 00516 uint16 collate; 00517 UNISTR formname; 00518 uint16 logpixels; 00519 uint32 bitsperpel; 00520 uint32 pelswidth; 00521 uint32 pelsheight; 00522 uint32 displayflags; 00523 uint32 displayfrequency; 00524 uint32 icmmethod; 00525 uint32 icmintent; 00526 uint32 mediatype; 00527 uint32 dithertype; 00528 uint32 reserved1; 00529 uint32 reserved2; 00530 uint32 panningwidth; 00531 uint32 panningheight; 00532 uint8 *dev_private; 00533 } 00534 DEVICEMODE; 00535 00536 typedef struct _devmode_cont 00537 { 00538 uint32 size; 00539 uint32 devmode_ptr; 00540 DEVICEMODE *devmode; 00541 } 00542 DEVMODE_CTR; 00543 00544 typedef struct _printer_default 00545 { 00546 uint32 datatype_ptr; 00547 UNISTR2 datatype; 00548 DEVMODE_CTR devmode_cont; 00549 uint32 access_required; 00550 } 00551 PRINTER_DEFAULT; 00552 00553 /********************************************/ 00554 00555 typedef struct { 00556 UNISTR2 *printername; 00557 PRINTER_DEFAULT printer_default; 00558 } SPOOL_Q_OPEN_PRINTER; 00559 00560 typedef struct { 00561 POLICY_HND handle; /* handle used along all transactions (20*uint8) */ 00562 WERROR status; 00563 } SPOOL_R_OPEN_PRINTER; 00564 00565 /********************************************/ 00566 00567 typedef struct { 00568 UNISTR2 *printername; 00569 PRINTER_DEFAULT printer_default; 00570 uint32 user_switch; 00571 SPOOL_USER_CTR user_ctr; 00572 } SPOOL_Q_OPEN_PRINTER_EX; 00573 00574 typedef struct { 00575 POLICY_HND handle; /* handle used along all transactions (20*uint8) */ 00576 WERROR status; 00577 } SPOOL_R_OPEN_PRINTER_EX; 00578 00579 /********************************************/ 00580 00581 typedef struct spool_notify_option_type 00582 { 00583 uint16 type; 00584 uint16 reserved0; 00585 uint32 reserved1; 00586 uint32 reserved2; 00587 uint32 count; 00588 uint32 fields_ptr; 00589 uint32 count2; 00590 uint16 fields[MAX_NOTIFY_TYPE_FOR_NOW]; 00591 } 00592 SPOOL_NOTIFY_OPTION_TYPE; 00593 00594 typedef struct spool_notify_option_type_ctr 00595 { 00596 uint32 count; 00597 SPOOL_NOTIFY_OPTION_TYPE *type; 00598 } 00599 SPOOL_NOTIFY_OPTION_TYPE_CTR; 00600 00601 00602 00603 typedef struct s_header_type 00604 { 00605 uint32 type; 00606 union 00607 { 00608 uint32 value; 00609 UNISTR string; 00610 } 00611 data; 00612 } 00613 HEADER_TYPE; 00614 00615 00616 typedef struct spool_q_getprinterdata 00617 { 00618 POLICY_HND handle; 00619 UNISTR2 valuename; 00620 uint32 size; 00621 } 00622 SPOOL_Q_GETPRINTERDATA; 00623 00624 typedef struct spool_r_getprinterdata 00625 { 00626 uint32 type; 00627 uint32 size; 00628 uint8 *data; 00629 uint32 needed; 00630 WERROR status; 00631 } 00632 SPOOL_R_GETPRINTERDATA; 00633 00634 typedef struct spool_q_deleteprinterdata 00635 { 00636 POLICY_HND handle; 00637 UNISTR2 valuename; 00638 } 00639 SPOOL_Q_DELETEPRINTERDATA; 00640 00641 typedef struct spool_r_deleteprinterdata 00642 { 00643 WERROR status; 00644 } 00645 SPOOL_R_DELETEPRINTERDATA; 00646 00647 typedef struct spool_q_closeprinter 00648 { 00649 POLICY_HND handle; 00650 } 00651 SPOOL_Q_CLOSEPRINTER; 00652 00653 typedef struct spool_r_closeprinter 00654 { 00655 POLICY_HND handle; 00656 WERROR status; 00657 } 00658 SPOOL_R_CLOSEPRINTER; 00659 00660 typedef struct spool_q_startpageprinter 00661 { 00662 POLICY_HND handle; 00663 } 00664 SPOOL_Q_STARTPAGEPRINTER; 00665 00666 typedef struct spool_r_startpageprinter 00667 { 00668 WERROR status; 00669 } 00670 SPOOL_R_STARTPAGEPRINTER; 00671 00672 typedef struct spool_q_endpageprinter 00673 { 00674 POLICY_HND handle; 00675 } 00676 SPOOL_Q_ENDPAGEPRINTER; 00677 00678 typedef struct spool_r_endpageprinter 00679 { 00680 WERROR status; 00681 } 00682 SPOOL_R_ENDPAGEPRINTER; 00683 00684 00685 typedef struct spool_q_deleteprinterdriver 00686 { 00687 uint32 server_ptr; 00688 UNISTR2 server; 00689 UNISTR2 arch; 00690 UNISTR2 driver; 00691 } 00692 SPOOL_Q_DELETEPRINTERDRIVER; 00693 00694 typedef struct spool_r_deleteprinterdriver 00695 { 00696 WERROR status; 00697 } 00698 SPOOL_R_DELETEPRINTERDRIVER; 00699 00700 typedef struct spool_q_deleteprinterdriverex 00701 { 00702 uint32 server_ptr; 00703 UNISTR2 server; 00704 UNISTR2 arch; 00705 UNISTR2 driver; 00706 uint32 delete_flags; 00707 uint32 version; 00708 } 00709 SPOOL_Q_DELETEPRINTERDRIVEREX; 00710 00711 typedef struct spool_r_deleteprinterdriverex 00712 { 00713 WERROR status; 00714 } 00715 SPOOL_R_DELETEPRINTERDRIVEREX; 00716 00717 00718 typedef struct spool_doc_info_1 00719 { 00720 uint32 p_docname; 00721 uint32 p_outputfile; 00722 uint32 p_datatype; 00723 UNISTR2 docname; 00724 UNISTR2 outputfile; 00725 UNISTR2 datatype; 00726 } 00727 DOC_INFO_1; 00728 00729 typedef struct spool_doc_info 00730 { 00731 uint32 switch_value; 00732 DOC_INFO_1 doc_info_1; 00733 } 00734 DOC_INFO; 00735 00736 typedef struct spool_doc_info_container 00737 { 00738 uint32 level; 00739 DOC_INFO docinfo; 00740 } 00741 DOC_INFO_CONTAINER; 00742 00743 typedef struct spool_q_startdocprinter 00744 { 00745 POLICY_HND handle; 00746 DOC_INFO_CONTAINER doc_info_container; 00747 } 00748 SPOOL_Q_STARTDOCPRINTER; 00749 00750 typedef struct spool_r_startdocprinter 00751 { 00752 uint32 jobid; 00753 WERROR status; 00754 } 00755 SPOOL_R_STARTDOCPRINTER; 00756 00757 typedef struct spool_q_enddocprinter 00758 { 00759 POLICY_HND handle; 00760 } 00761 SPOOL_Q_ENDDOCPRINTER; 00762 00763 typedef struct spool_r_enddocprinter 00764 { 00765 WERROR status; 00766 } 00767 SPOOL_R_ENDDOCPRINTER; 00768 00769 typedef struct spool_q_writeprinter 00770 { 00771 POLICY_HND handle; 00772 uint32 buffer_size; 00773 uint8 *buffer; 00774 uint32 buffer_size2; 00775 } 00776 SPOOL_Q_WRITEPRINTER; 00777 00778 typedef struct spool_r_writeprinter 00779 { 00780 uint32 buffer_written; 00781 WERROR status; 00782 } 00783 SPOOL_R_WRITEPRINTER; 00784 00785 typedef struct spool_notify_option 00786 { 00787 uint32 version; 00788 uint32 flags; 00789 uint32 count; 00790 uint32 option_type_ptr; 00791 SPOOL_NOTIFY_OPTION_TYPE_CTR ctr; 00792 } 00793 SPOOL_NOTIFY_OPTION; 00794 00795 typedef struct spool_notify_info_data 00796 { 00797 uint16 type; 00798 uint16 field; 00799 uint32 reserved; 00800 uint32 id; 00801 union { 00802 uint32 value[2]; 00803 struct { 00804 uint32 length; 00805 uint16 *string; 00806 } data; 00807 struct { 00808 uint32 size; 00809 SEC_DESC *desc; 00810 } sd; 00811 } 00812 notify_data; 00813 uint32 size; 00814 uint32 enc_type; 00815 } SPOOL_NOTIFY_INFO_DATA; 00816 00817 typedef struct spool_notify_info 00818 { 00819 uint32 version; 00820 uint32 flags; 00821 uint32 count; 00822 SPOOL_NOTIFY_INFO_DATA *data; 00823 } 00824 SPOOL_NOTIFY_INFO; 00825 00826 /* If the struct name looks obscure, yes it is ! */ 00827 /* RemoteFindFirstPrinterChangeNotificationEx query struct */ 00828 typedef struct spoolss_q_rffpcnex 00829 { 00830 POLICY_HND handle; 00831 uint32 flags; 00832 uint32 options; 00833 uint32 localmachine_ptr; 00834 UNISTR2 localmachine; 00835 uint32 printerlocal; 00836 uint32 option_ptr; 00837 SPOOL_NOTIFY_OPTION *option; 00838 } 00839 SPOOL_Q_RFFPCNEX; 00840 00841 typedef struct spool_r_rffpcnex 00842 { 00843 WERROR status; 00844 } 00845 SPOOL_R_RFFPCNEX; 00846 00847 /* Remote Find Next Printer Change Notify Ex */ 00848 typedef struct spool_q_rfnpcnex 00849 { 00850 POLICY_HND handle; 00851 uint32 change; 00852 uint32 option_ptr; 00853 SPOOL_NOTIFY_OPTION *option; 00854 } 00855 SPOOL_Q_RFNPCNEX; 00856 00857 typedef struct spool_r_rfnpcnex 00858 { 00859 uint32 info_ptr; 00860 SPOOL_NOTIFY_INFO info; 00861 WERROR status; 00862 } 00863 SPOOL_R_RFNPCNEX; 00864 00865 /* Find Close Printer Notify */ 00866 typedef struct spool_q_fcpn 00867 { 00868 POLICY_HND handle; 00869 } 00870 SPOOL_Q_FCPN; 00871 00872 typedef struct spool_r_fcpn 00873 { 00874 WERROR status; 00875 } 00876 SPOOL_R_FCPN; 00877 00878 00879 typedef struct printer_info_0 00880 { 00881 UNISTR printername; 00882 UNISTR servername; 00883 uint32 cjobs; 00884 uint32 total_jobs; 00885 uint32 total_bytes; 00886 00887 uint16 year; 00888 uint16 month; 00889 uint16 dayofweek; 00890 uint16 day; 00891 uint16 hour; 00892 uint16 minute; 00893 uint16 second; 00894 uint16 milliseconds; 00895 00896 uint32 global_counter; 00897 uint32 total_pages; 00898 00899 uint16 major_version; 00900 uint16 build_version; 00901 00902 uint32 unknown7; 00903 uint32 unknown8; 00904 uint32 unknown9; 00905 uint32 session_counter; 00906 uint32 unknown11; 00907 uint32 printer_errors; 00908 uint32 unknown13; 00909 uint32 unknown14; 00910 uint32 unknown15; 00911 uint32 unknown16; 00912 uint32 change_id; 00913 uint32 unknown18; 00914 uint32 status; 00915 uint32 unknown20; 00916 uint32 c_setprinter; 00917 00918 uint16 unknown22; 00919 uint16 unknown23; 00920 uint16 unknown24; 00921 uint16 unknown25; 00922 uint16 unknown26; 00923 uint16 unknown27; 00924 uint16 unknown28; 00925 uint16 unknown29; 00926 } PRINTER_INFO_0; 00927 00928 typedef struct printer_info_1 00929 { 00930 uint32 flags; 00931 UNISTR description; 00932 UNISTR name; 00933 UNISTR comment; 00934 } 00935 PRINTER_INFO_1; 00936 00937 typedef struct printer_info_2 00938 { 00939 UNISTR servername; 00940 UNISTR printername; 00941 UNISTR sharename; 00942 UNISTR portname; 00943 UNISTR drivername; 00944 UNISTR comment; 00945 UNISTR location; 00946 DEVICEMODE *devmode; 00947 UNISTR sepfile; 00948 UNISTR printprocessor; 00949 UNISTR datatype; 00950 UNISTR parameters; 00951 SEC_DESC *secdesc; 00952 uint32 attributes; 00953 uint32 priority; 00954 uint32 defaultpriority; 00955 uint32 starttime; 00956 uint32 untiltime; 00957 uint32 status; 00958 uint32 cjobs; 00959 uint32 averageppm; 00960 } 00961 PRINTER_INFO_2; 00962 00963 typedef struct printer_info_3 00964 { 00965 SEC_DESC *secdesc; 00966 } 00967 PRINTER_INFO_3; 00968 00969 typedef struct printer_info_4 00970 { 00971 UNISTR printername; 00972 UNISTR servername; 00973 uint32 attributes; 00974 } 00975 PRINTER_INFO_4; 00976 00977 typedef struct printer_info_5 00978 { 00979 UNISTR printername; 00980 UNISTR portname; 00981 uint32 attributes; 00982 uint32 device_not_selected_timeout; 00983 uint32 transmission_retry_timeout; 00984 } 00985 PRINTER_INFO_5; 00986 00987 typedef struct printer_info_6 00988 { 00989 uint32 status; 00990 } 00991 PRINTER_INFO_6; 00992 00993 #define SPOOL_DS_PUBLISH 1 00994 #define SPOOL_DS_UPDATE 2 00995 #define SPOOL_DS_UNPUBLISH 4 00996 #define SPOOL_DS_PENDING 0x80000000 00997 00998 typedef struct printer_info_7 00999 { 01000 UNISTR guid; /* text form of printer guid */ 01001 uint32 action; 01002 } 01003 PRINTER_INFO_7; 01004 01005 typedef struct spool_q_enumprinters 01006 { 01007 uint32 flags; 01008 uint32 servername_ptr; 01009 UNISTR2 servername; 01010 uint32 level; 01011 RPC_BUFFER *buffer; 01012 uint32 offered; 01013 } 01014 SPOOL_Q_ENUMPRINTERS; 01015 01016 typedef struct printer_info_ctr_info 01017 { 01018 PRINTER_INFO_0 *printers_0; 01019 PRINTER_INFO_1 *printers_1; 01020 PRINTER_INFO_2 *printers_2; 01021 PRINTER_INFO_3 *printers_3; 01022 PRINTER_INFO_4 *printers_4; 01023 PRINTER_INFO_5 *printers_5; 01024 PRINTER_INFO_7 *printers_7; 01025 } 01026 PRINTER_INFO_CTR; 01027 01028 typedef struct spool_r_enumprinters 01029 { 01030 RPC_BUFFER *buffer; 01031 uint32 needed; /* bytes needed */ 01032 uint32 returned; /* number of printers */ 01033 WERROR status; 01034 } 01035 SPOOL_R_ENUMPRINTERS; 01036 01037 01038 typedef struct spool_q_getprinter 01039 { 01040 POLICY_HND handle; 01041 uint32 level; 01042 RPC_BUFFER *buffer; 01043 uint32 offered; 01044 } 01045 SPOOL_Q_GETPRINTER; 01046 01047 typedef struct printer_info_info 01048 { 01049 union 01050 { 01051 PRINTER_INFO_0 *info0; 01052 PRINTER_INFO_1 *info1; 01053 PRINTER_INFO_2 *info2; 01054 void *info; 01055 } printer; 01056 } PRINTER_INFO; 01057 01058 typedef struct spool_r_getprinter 01059 { 01060 RPC_BUFFER *buffer; 01061 uint32 needed; 01062 WERROR status; 01063 } SPOOL_R_GETPRINTER; 01064 01065 typedef struct driver_info_1 01066 { 01067 UNISTR name; 01068 } DRIVER_INFO_1; 01069 01070 typedef struct driver_info_2 01071 { 01072 uint32 version; 01073 UNISTR name; 01074 UNISTR architecture; 01075 UNISTR driverpath; 01076 UNISTR datafile; 01077 UNISTR configfile; 01078 } DRIVER_INFO_2; 01079 01080 typedef struct driver_info_3 01081 { 01082 uint32 version; 01083 UNISTR name; 01084 UNISTR architecture; 01085 UNISTR driverpath; 01086 UNISTR datafile; 01087 UNISTR configfile; 01088 UNISTR helpfile; 01089 uint16 *dependentfiles; 01090 UNISTR monitorname; 01091 UNISTR defaultdatatype; 01092 } 01093 DRIVER_INFO_3; 01094 01095 typedef struct driver_info_6 01096 { 01097 uint32 version; 01098 UNISTR name; 01099 UNISTR architecture; 01100 UNISTR driverpath; 01101 UNISTR datafile; 01102 UNISTR configfile; 01103 UNISTR helpfile; 01104 uint16 *dependentfiles; 01105 UNISTR monitorname; 01106 UNISTR defaultdatatype; 01107 uint16* previousdrivernames; 01108 NTTIME driver_date; 01109 uint32 padding; 01110 uint32 driver_version_low; 01111 uint32 driver_version_high; 01112 UNISTR mfgname; 01113 UNISTR oem_url; 01114 UNISTR hardware_id; 01115 UNISTR provider; 01116 } 01117 DRIVER_INFO_6; 01118 01119 typedef struct driver_info_info 01120 { 01121 DRIVER_INFO_1 *info1; 01122 DRIVER_INFO_2 *info2; 01123 DRIVER_INFO_3 *info3; 01124 DRIVER_INFO_6 *info6; 01125 } 01126 PRINTER_DRIVER_CTR; 01127 01128 typedef struct spool_q_getprinterdriver2 01129 { 01130 POLICY_HND handle; 01131 uint32 architecture_ptr; 01132 UNISTR2 architecture; 01133 uint32 level; 01134 RPC_BUFFER *buffer; 01135 uint32 offered; 01136 uint32 clientmajorversion; 01137 uint32 clientminorversion; 01138 } 01139 SPOOL_Q_GETPRINTERDRIVER2; 01140 01141 typedef struct spool_r_getprinterdriver2 01142 { 01143 RPC_BUFFER *buffer; 01144 uint32 needed; 01145 uint32 servermajorversion; 01146 uint32 serverminorversion; 01147 WERROR status; 01148 } 01149 SPOOL_R_GETPRINTERDRIVER2; 01150 01151 01152 typedef struct add_jobinfo_1 01153 { 01154 UNISTR path; 01155 uint32 job_number; 01156 } 01157 ADD_JOBINFO_1; 01158 01159 01160 typedef struct spool_q_addjob 01161 { 01162 POLICY_HND handle; 01163 uint32 level; 01164 RPC_BUFFER *buffer; 01165 uint32 offered; 01166 } 01167 SPOOL_Q_ADDJOB; 01168 01169 typedef struct spool_r_addjob 01170 { 01171 RPC_BUFFER *buffer; 01172 uint32 needed; 01173 WERROR status; 01174 } 01175 SPOOL_R_ADDJOB; 01176 01177 /* 01178 * I'm really wondering how many different time formats 01179 * I will have to cope with 01180 * 01181 * JFM, 09/13/98 In a mad mood ;-( 01182 */ 01183 typedef struct systemtime 01184 { 01185 uint16 year; 01186 uint16 month; 01187 uint16 dayofweek; 01188 uint16 day; 01189 uint16 hour; 01190 uint16 minute; 01191 uint16 second; 01192 uint16 milliseconds; 01193 } 01194 SYSTEMTIME; 01195 01196 typedef struct s_job_info_1 01197 { 01198 uint32 jobid; 01199 UNISTR printername; 01200 UNISTR machinename; 01201 UNISTR username; 01202 UNISTR document; 01203 UNISTR datatype; 01204 UNISTR text_status; 01205 uint32 status; 01206 uint32 priority; 01207 uint32 position; 01208 uint32 totalpages; 01209 uint32 pagesprinted; 01210 SYSTEMTIME submitted; 01211 } 01212 JOB_INFO_1; 01213 01214 typedef struct s_job_info_2 01215 { 01216 uint32 jobid; 01217 UNISTR printername; 01218 UNISTR machinename; 01219 UNISTR username; 01220 UNISTR document; 01221 UNISTR notifyname; 01222 UNISTR datatype; 01223 UNISTR printprocessor; 01224 UNISTR parameters; 01225 UNISTR drivername; 01226 DEVICEMODE *devmode; 01227 UNISTR text_status; 01228 /* SEC_DESC sec_desc;*/ 01229 uint32 status; 01230 uint32 priority; 01231 uint32 position; 01232 uint32 starttime; 01233 uint32 untiltime; 01234 uint32 totalpages; 01235 uint32 size; 01236 SYSTEMTIME submitted; 01237 uint32 timeelapsed; 01238 uint32 pagesprinted; 01239 } 01240 JOB_INFO_2; 01241 01242 typedef struct spool_q_enumjobs 01243 { 01244 POLICY_HND handle; 01245 uint32 firstjob; 01246 uint32 numofjobs; 01247 uint32 level; 01248 RPC_BUFFER *buffer; 01249 uint32 offered; 01250 } 01251 SPOOL_Q_ENUMJOBS; 01252 01253 typedef struct job_info_ctr_info 01254 { 01255 union 01256 { 01257 JOB_INFO_1 *job_info_1; 01258 JOB_INFO_2 *job_info_2; 01259 void *info; 01260 } job; 01261 01262 } JOB_INFO_CTR; 01263 01264 typedef struct spool_r_enumjobs 01265 { 01266 RPC_BUFFER *buffer; 01267 uint32 needed; 01268 uint32 returned; 01269 WERROR status; 01270 } 01271 SPOOL_R_ENUMJOBS; 01272 01273 typedef struct spool_q_schedulejob 01274 { 01275 POLICY_HND handle; 01276 uint32 jobid; 01277 } 01278 SPOOL_Q_SCHEDULEJOB; 01279 01280 typedef struct spool_r_schedulejob 01281 { 01282 WERROR status; 01283 } 01284 SPOOL_R_SCHEDULEJOB; 01285 01286 typedef struct s_port_info_1 01287 { 01288 UNISTR port_name; 01289 } 01290 PORT_INFO_1; 01291 01292 typedef struct s_port_info_2 01293 { 01294 UNISTR port_name; 01295 UNISTR monitor_name; 01296 UNISTR description; 01297 uint32 port_type; 01298 uint32 reserved; 01299 } 01300 PORT_INFO_2; 01301 01302 /* Port Type bits */ 01303 #define PORT_TYPE_WRITE 0x0001 01304 #define PORT_TYPE_READ 0x0002 01305 #define PORT_TYPE_REDIRECTED 0x0004 01306 #define PORT_TYPE_NET_ATTACHED 0x0008 01307 01308 typedef struct spool_q_enumports 01309 { 01310 uint32 name_ptr; 01311 UNISTR2 name; 01312 uint32 level; 01313 RPC_BUFFER *buffer; 01314 uint32 offered; 01315 } 01316 SPOOL_Q_ENUMPORTS; 01317 01318 typedef struct port_info_ctr_info 01319 { 01320 union 01321 { 01322 PORT_INFO_1 *info_1; 01323 PORT_INFO_2 *info_2; 01324 } 01325 port; 01326 01327 } 01328 PORT_INFO_CTR; 01329 01330 typedef struct spool_r_enumports 01331 { 01332 RPC_BUFFER *buffer; 01333 uint32 needed; /* bytes needed */ 01334 uint32 returned; /* number of printers */ 01335 WERROR status; 01336 } 01337 SPOOL_R_ENUMPORTS; 01338 01339 #define JOB_CONTROL_PAUSE 1 01340 #define JOB_CONTROL_RESUME 2 01341 #define JOB_CONTROL_CANCEL 3 01342 #define JOB_CONTROL_RESTART 4 01343 #define JOB_CONTROL_DELETE 5 01344 01345 typedef struct job_info_info 01346 { 01347 union 01348 { 01349 JOB_INFO_1 job_info_1; 01350 JOB_INFO_2 job_info_2; 01351 } 01352 job; 01353 01354 } 01355 JOB_INFO; 01356 01357 typedef struct spool_q_setjob 01358 { 01359 POLICY_HND handle; 01360 uint32 jobid; 01361 uint32 level; 01362 JOB_INFO ctr; 01363 uint32 command; 01364 01365 } 01366 SPOOL_Q_SETJOB; 01367 01368 typedef struct spool_r_setjob 01369 { 01370 WERROR status; 01371 01372 } 01373 SPOOL_R_SETJOB; 01374 01375 typedef struct spool_q_enumprinterdrivers 01376 { 01377 uint32 name_ptr; 01378 UNISTR2 name; 01379 uint32 environment_ptr; 01380 UNISTR2 environment; 01381 uint32 level; 01382 RPC_BUFFER *buffer; 01383 uint32 offered; 01384 } 01385 SPOOL_Q_ENUMPRINTERDRIVERS; 01386 01387 typedef struct spool_r_enumprinterdrivers 01388 { 01389 RPC_BUFFER *buffer; 01390 uint32 needed; 01391 uint32 returned; 01392 WERROR status; 01393 } 01394 SPOOL_R_ENUMPRINTERDRIVERS; 01395 01396 #define FORM_USER 0 01397 #define FORM_BUILTIN 1 01398 #define FORM_PRINTER 2 01399 01400 typedef struct spool_form_1 01401 { 01402 uint32 flag; 01403 UNISTR name; 01404 uint32 width; 01405 uint32 length; 01406 uint32 left; 01407 uint32 top; 01408 uint32 right; 01409 uint32 bottom; 01410 } 01411 FORM_1; 01412 01413 typedef struct spool_q_enumforms 01414 { 01415 POLICY_HND handle; 01416 uint32 level; 01417 RPC_BUFFER *buffer; 01418 uint32 offered; 01419 } 01420 SPOOL_Q_ENUMFORMS; 01421 01422 typedef struct spool_r_enumforms 01423 { 01424 RPC_BUFFER *buffer; 01425 uint32 needed; 01426 uint32 numofforms; 01427 WERROR status; 01428 } 01429 SPOOL_R_ENUMFORMS; 01430 01431 typedef struct spool_q_getform 01432 { 01433 POLICY_HND handle; 01434 UNISTR2 formname; 01435 uint32 level; 01436 RPC_BUFFER *buffer; 01437 uint32 offered; 01438 } 01439 SPOOL_Q_GETFORM; 01440 01441 typedef struct spool_r_getform 01442 { 01443 RPC_BUFFER *buffer; 01444 uint32 needed; 01445 WERROR status; 01446 } 01447 SPOOL_R_GETFORM; 01448 01449 typedef struct spool_printer_info_level_1 01450 { 01451 uint32 flags; 01452 uint32 description_ptr; 01453 uint32 name_ptr; 01454 uint32 comment_ptr; 01455 UNISTR2 description; 01456 UNISTR2 name; 01457 UNISTR2 comment; 01458 } SPOOL_PRINTER_INFO_LEVEL_1; 01459 01460 typedef struct spool_printer_info_level_2 01461 { 01462 uint32 servername_ptr; 01463 uint32 printername_ptr; 01464 uint32 sharename_ptr; 01465 uint32 portname_ptr; 01466 uint32 drivername_ptr; 01467 uint32 comment_ptr; 01468 uint32 location_ptr; 01469 uint32 devmode_ptr; 01470 uint32 sepfile_ptr; 01471 uint32 printprocessor_ptr; 01472 uint32 datatype_ptr; 01473 uint32 parameters_ptr; 01474 uint32 secdesc_ptr; 01475 uint32 attributes; 01476 uint32 priority; 01477 uint32 default_priority; 01478 uint32 starttime; 01479 uint32 untiltime; 01480 uint32 status; 01481 uint32 cjobs; 01482 uint32 averageppm; 01483 UNISTR2 servername; 01484 UNISTR2 printername; 01485 UNISTR2 sharename; 01486 UNISTR2 portname; 01487 UNISTR2 drivername; 01488 UNISTR2 comment; 01489 UNISTR2 location; 01490 UNISTR2 sepfile; 01491 UNISTR2 printprocessor; 01492 UNISTR2 datatype; 01493 UNISTR2 parameters; 01494 } 01495 SPOOL_PRINTER_INFO_LEVEL_2; 01496 01497 typedef struct spool_printer_info_level_3 01498 { 01499 uint32 secdesc_ptr; 01500 } 01501 SPOOL_PRINTER_INFO_LEVEL_3; 01502 01503 typedef struct spool_printer_info_level_7 01504 { 01505 uint32 guid_ptr; 01506 uint32 action; 01507 UNISTR2 guid; 01508 } 01509 SPOOL_PRINTER_INFO_LEVEL_7; 01510 01511 typedef struct spool_printer_info_level 01512 { 01513 uint32 level; 01514 uint32 info_ptr; 01515 SPOOL_PRINTER_INFO_LEVEL_1 *info_1; 01516 SPOOL_PRINTER_INFO_LEVEL_2 *info_2; 01517 SPOOL_PRINTER_INFO_LEVEL_3 *info_3; 01518 SPOOL_PRINTER_INFO_LEVEL_7 *info_7; 01519 } 01520 SPOOL_PRINTER_INFO_LEVEL; 01521 01522 typedef struct spool_printer_driver_info_level_3 01523 { 01524 uint32 cversion; 01525 uint32 name_ptr; 01526 uint32 environment_ptr; 01527 uint32 driverpath_ptr; 01528 uint32 datafile_ptr; 01529 uint32 configfile_ptr; 01530 uint32 helpfile_ptr; 01531 uint32 monitorname_ptr; 01532 uint32 defaultdatatype_ptr; 01533 uint32 dependentfilessize; 01534 uint32 dependentfiles_ptr; 01535 01536 UNISTR2 name; 01537 UNISTR2 environment; 01538 UNISTR2 driverpath; 01539 UNISTR2 datafile; 01540 UNISTR2 configfile; 01541 UNISTR2 helpfile; 01542 UNISTR2 monitorname; 01543 UNISTR2 defaultdatatype; 01544 BUFFER5 dependentfiles; 01545 01546 } 01547 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3; 01548 01549 /* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */ 01550 typedef struct { 01551 uint32 version; 01552 uint32 name_ptr; 01553 uint32 environment_ptr; 01554 uint32 driverpath_ptr; 01555 uint32 datafile_ptr; 01556 uint32 configfile_ptr; 01557 uint32 helpfile_ptr; 01558 uint32 monitorname_ptr; 01559 uint32 defaultdatatype_ptr; 01560 uint32 dependentfiles_len; 01561 uint32 dependentfiles_ptr; 01562 uint32 previousnames_len; 01563 uint32 previousnames_ptr; 01564 NTTIME driverdate; 01565 uint64 driverversion; 01566 uint32 dummy4; 01567 uint32 mfgname_ptr; 01568 uint32 oemurl_ptr; 01569 uint32 hardwareid_ptr; 01570 uint32 provider_ptr; 01571 UNISTR2 name; 01572 UNISTR2 environment; 01573 UNISTR2 driverpath; 01574 UNISTR2 datafile; 01575 UNISTR2 configfile; 01576 UNISTR2 helpfile; 01577 UNISTR2 monitorname; 01578 UNISTR2 defaultdatatype; 01579 BUFFER5 dependentfiles; 01580 BUFFER5 previousnames; 01581 UNISTR2 mfgname; 01582 UNISTR2 oemurl; 01583 UNISTR2 hardwareid; 01584 UNISTR2 provider; 01585 } SPOOL_PRINTER_DRIVER_INFO_LEVEL_6; 01586 01587 01588 typedef struct spool_printer_driver_info_level 01589 { 01590 uint32 level; 01591 uint32 ptr; 01592 SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *info_3; 01593 SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 *info_6; 01594 } 01595 SPOOL_PRINTER_DRIVER_INFO_LEVEL; 01596 01597 01598 typedef struct spool_q_setprinter 01599 { 01600 POLICY_HND handle; 01601 uint32 level; 01602 SPOOL_PRINTER_INFO_LEVEL info; 01603 SEC_DESC_BUF *secdesc_ctr; 01604 DEVMODE_CTR devmode_ctr; 01605 01606 uint32 command; 01607 01608 } 01609 SPOOL_Q_SETPRINTER; 01610 01611 typedef struct spool_r_setprinter 01612 { 01613 WERROR status; 01614 } 01615 SPOOL_R_SETPRINTER; 01616 01617 /********************************************/ 01618 01619 typedef struct { 01620 POLICY_HND handle; 01621 } SPOOL_Q_DELETEPRINTER; 01622 01623 typedef struct { 01624 POLICY_HND handle; 01625 WERROR status; 01626 } SPOOL_R_DELETEPRINTER; 01627 01628 /********************************************/ 01629 01630 typedef struct { 01631 POLICY_HND handle; 01632 } SPOOL_Q_ABORTPRINTER; 01633 01634 typedef struct { 01635 WERROR status; 01636 } SPOOL_R_ABORTPRINTER; 01637 01638 01639 /********************************************/ 01640 01641 typedef struct { 01642 UNISTR2 *server_name; 01643 uint32 level; 01644 SPOOL_PRINTER_INFO_LEVEL info; 01645 DEVMODE_CTR devmode_ctr; 01646 SEC_DESC_BUF *secdesc_ctr; 01647 uint32 user_switch; 01648 SPOOL_USER_CTR user_ctr; 01649 } SPOOL_Q_ADDPRINTEREX; 01650 01651 typedef struct { 01652 POLICY_HND handle; 01653 WERROR status; 01654 } SPOOL_R_ADDPRINTEREX; 01655 01656 /********************************************/ 01657 01658 typedef struct spool_q_addprinterdriver 01659 { 01660 uint32 server_name_ptr; 01661 UNISTR2 server_name; 01662 uint32 level; 01663 SPOOL_PRINTER_DRIVER_INFO_LEVEL info; 01664 } 01665 SPOOL_Q_ADDPRINTERDRIVER; 01666 01667 typedef struct spool_r_addprinterdriver 01668 { 01669 WERROR status; 01670 } 01671 SPOOL_R_ADDPRINTERDRIVER; 01672 01673 typedef struct spool_q_addprinterdriverex 01674 { 01675 uint32 server_name_ptr; 01676 UNISTR2 server_name; 01677 uint32 level; 01678 SPOOL_PRINTER_DRIVER_INFO_LEVEL info; 01679 uint32 copy_flags; 01680 } 01681 SPOOL_Q_ADDPRINTERDRIVEREX; 01682 01683 typedef struct spool_r_addprinterdriverex 01684 { 01685 WERROR status; 01686 } 01687 SPOOL_R_ADDPRINTERDRIVEREX; 01688 01689 01690 typedef struct driver_directory_1 01691 { 01692 UNISTR name; 01693 } 01694 DRIVER_DIRECTORY_1; 01695 01696 typedef struct driver_info_ctr_info 01697 { 01698 DRIVER_DIRECTORY_1 *info1; 01699 } 01700 DRIVER_DIRECTORY_CTR; 01701 01702 typedef struct spool_q_getprinterdriverdirectory 01703 { 01704 uint32 name_ptr; 01705 UNISTR2 name; 01706 uint32 environment_ptr; 01707 UNISTR2 environment; 01708 uint32 level; 01709 RPC_BUFFER *buffer; 01710 uint32 offered; 01711 } 01712 SPOOL_Q_GETPRINTERDRIVERDIR; 01713 01714 typedef struct spool_r_getprinterdriverdirectory 01715 { 01716 RPC_BUFFER *buffer; 01717 uint32 needed; 01718 WERROR status; 01719 } 01720 SPOOL_R_GETPRINTERDRIVERDIR; 01721 01722 typedef struct spool_q_addprintprocessor 01723 { 01724 uint32 server_ptr; 01725 UNISTR2 server; 01726 UNISTR2 environment; 01727 UNISTR2 path; 01728 UNISTR2 name; 01729 } 01730 SPOOL_Q_ADDPRINTPROCESSOR; 01731 01732 typedef struct spool_r_addprintprocessor 01733 { 01734 WERROR status; 01735 } 01736 SPOOL_R_ADDPRINTPROCESSOR; 01737 01738 01739 typedef struct spool_q_enumprintprocessors 01740 { 01741 uint32 name_ptr; 01742 UNISTR2 name; 01743 uint32 environment_ptr; 01744 UNISTR2 environment; 01745 uint32 level; 01746 RPC_BUFFER *buffer; 01747 uint32 offered; 01748 } 01749 SPOOL_Q_ENUMPRINTPROCESSORS; 01750 01751 typedef struct printprocessor_1 01752 { 01753 UNISTR name; 01754 } 01755 PRINTPROCESSOR_1; 01756 01757 typedef struct spool_r_enumprintprocessors 01758 { 01759 RPC_BUFFER *buffer; 01760 uint32 needed; 01761 uint32 returned; 01762 WERROR status; 01763 } 01764 SPOOL_R_ENUMPRINTPROCESSORS; 01765 01766 typedef struct spool_q_enumprintprocdatatypes 01767 { 01768 uint32 name_ptr; 01769 UNISTR2 name; 01770 uint32 processor_ptr; 01771 UNISTR2 processor; 01772 uint32 level; 01773 RPC_BUFFER *buffer; 01774 uint32 offered; 01775 } 01776 SPOOL_Q_ENUMPRINTPROCDATATYPES; 01777 01778 typedef struct ppdatatype_1 01779 { 01780 UNISTR name; 01781 } 01782 PRINTPROCDATATYPE_1; 01783 01784 typedef struct spool_r_enumprintprocdatatypes 01785 { 01786 RPC_BUFFER *buffer; 01787 uint32 needed; 01788 uint32 returned; 01789 WERROR status; 01790 } 01791 SPOOL_R_ENUMPRINTPROCDATATYPES; 01792 01793 typedef struct printmonitor_1 01794 { 01795 UNISTR name; 01796 } 01797 PRINTMONITOR_1; 01798 01799 typedef struct printmonitor_2 01800 { 01801 UNISTR name; 01802 UNISTR environment; 01803 UNISTR dll_name; 01804 } 01805 PRINTMONITOR_2; 01806 01807 typedef struct spool_q_enumprintmonitors 01808 { 01809 uint32 name_ptr; 01810 UNISTR2 name; 01811 uint32 level; 01812 RPC_BUFFER *buffer; 01813 uint32 offered; 01814 } 01815 SPOOL_Q_ENUMPRINTMONITORS; 01816 01817 typedef struct spool_r_enumprintmonitors 01818 { 01819 RPC_BUFFER *buffer; 01820 uint32 needed; 01821 uint32 returned; 01822 WERROR status; 01823 } 01824 SPOOL_R_ENUMPRINTMONITORS; 01825 01826 01827 typedef struct spool_q_enumprinterdata 01828 { 01829 POLICY_HND handle; 01830 uint32 index; 01831 uint32 valuesize; 01832 uint32 datasize; 01833 } 01834 SPOOL_Q_ENUMPRINTERDATA; 01835 01836 typedef struct spool_r_enumprinterdata 01837 { 01838 uint32 valuesize; 01839 uint16 *value; 01840 uint32 realvaluesize; 01841 uint32 type; 01842 uint32 datasize; 01843 uint8 *data; 01844 uint32 realdatasize; 01845 WERROR status; 01846 } 01847 SPOOL_R_ENUMPRINTERDATA; 01848 01849 typedef struct spool_q_setprinterdata 01850 { 01851 POLICY_HND handle; 01852 UNISTR2 value; 01853 uint32 type; 01854 uint32 max_len; 01855 uint8 *data; 01856 uint32 real_len; 01857 uint32 numeric_data; 01858 } 01859 SPOOL_Q_SETPRINTERDATA; 01860 01861 typedef struct spool_r_setprinterdata 01862 { 01863 WERROR status; 01864 } 01865 SPOOL_R_SETPRINTERDATA; 01866 01867 typedef struct spool_q_resetprinter 01868 { 01869 POLICY_HND handle; 01870 uint32 datatype_ptr; 01871 UNISTR2 datatype; 01872 DEVMODE_CTR devmode_ctr; 01873 01874 } SPOOL_Q_RESETPRINTER; 01875 01876 typedef struct spool_r_resetprinter 01877 { 01878 WERROR status; 01879 } 01880 SPOOL_R_RESETPRINTER; 01881 01882 01883 01884 typedef struct _form 01885 { 01886 uint32 flags; 01887 uint32 name_ptr; 01888 uint32 size_x; 01889 uint32 size_y; 01890 uint32 left; 01891 uint32 top; 01892 uint32 right; 01893 uint32 bottom; 01894 UNISTR2 name; 01895 } 01896 FORM; 01897 01898 typedef struct spool_q_addform 01899 { 01900 POLICY_HND handle; 01901 uint32 level; 01902 uint32 level2; /* This should really be part of the FORM structure */ 01903 FORM form; 01904 } 01905 SPOOL_Q_ADDFORM; 01906 01907 typedef struct spool_r_addform 01908 { 01909 WERROR status; 01910 } 01911 SPOOL_R_ADDFORM; 01912 01913 typedef struct spool_q_setform 01914 { 01915 POLICY_HND handle; 01916 UNISTR2 name; 01917 uint32 level; 01918 uint32 level2; 01919 FORM form; 01920 } 01921 SPOOL_Q_SETFORM; 01922 01923 typedef struct spool_r_setform 01924 { 01925 WERROR status; 01926 } 01927 SPOOL_R_SETFORM; 01928 01929 typedef struct spool_q_deleteform 01930 { 01931 POLICY_HND handle; 01932 UNISTR2 name; 01933 } 01934 SPOOL_Q_DELETEFORM; 01935 01936 typedef struct spool_r_deleteform 01937 { 01938 WERROR status; 01939 } 01940 SPOOL_R_DELETEFORM; 01941 01942 typedef struct spool_q_getjob 01943 { 01944 POLICY_HND handle; 01945 uint32 jobid; 01946 uint32 level; 01947 RPC_BUFFER *buffer; 01948 uint32 offered; 01949 } 01950 SPOOL_Q_GETJOB; 01951 01952 typedef struct pjob_info_info 01953 { 01954 union 01955 { 01956 JOB_INFO_1 *job_info_1; 01957 JOB_INFO_2 *job_info_2; 01958 void *info; 01959 } 01960 job; 01961 01962 } 01963 PJOB_INFO; 01964 01965 typedef struct spool_r_getjob 01966 { 01967 RPC_BUFFER *buffer; 01968 uint32 needed; 01969 WERROR status; 01970 } 01971 SPOOL_R_GETJOB; 01972 01973 typedef struct spool_q_replyopenprinter 01974 { 01975 UNISTR2 string; 01976 uint32 printer; 01977 uint32 type; 01978 uint32 unknown0; 01979 uint32 unknown1; 01980 } 01981 SPOOL_Q_REPLYOPENPRINTER; 01982 01983 typedef struct spool_r_replyopenprinter 01984 { 01985 POLICY_HND handle; 01986 WERROR status; 01987 } 01988 SPOOL_R_REPLYOPENPRINTER; 01989 01990 typedef struct spool_q_routerreplyprinter 01991 { 01992 POLICY_HND handle; 01993 uint32 condition; 01994 uint32 unknown1; /* 0x00000001 */ 01995 uint32 change_id; 01996 uint8 unknown2[5]; /* 0x0000000001 */ 01997 } 01998 SPOOL_Q_ROUTERREPLYPRINTER; 01999 02000 typedef struct spool_r_routerreplyprinter 02001 { 02002 WERROR status; 02003 } 02004 SPOOL_R_ROUTERREPLYPRINTER; 02005 02006 typedef struct spool_q_replycloseprinter 02007 { 02008 POLICY_HND handle; 02009 } 02010 SPOOL_Q_REPLYCLOSEPRINTER; 02011 02012 typedef struct spool_r_replycloseprinter 02013 { 02014 POLICY_HND handle; 02015 WERROR status; 02016 } 02017 SPOOL_R_REPLYCLOSEPRINTER; 02018 02019 typedef struct spool_q_rrpcn 02020 { 02021 POLICY_HND handle; 02022 uint32 change_low; 02023 uint32 change_high; 02024 uint32 unknown0; 02025 uint32 unknown1; 02026 uint32 info_ptr; 02027 SPOOL_NOTIFY_INFO info; 02028 } 02029 SPOOL_Q_REPLY_RRPCN; 02030 02031 typedef struct spool_r_rrpcn 02032 { 02033 uint32 unknown0; 02034 WERROR status; 02035 } 02036 SPOOL_R_REPLY_RRPCN; 02037 02038 typedef struct spool_q_getprinterdataex 02039 { 02040 POLICY_HND handle; 02041 UNISTR2 keyname; 02042 UNISTR2 valuename; 02043 uint32 size; 02044 } 02045 SPOOL_Q_GETPRINTERDATAEX; 02046 02047 typedef struct spool_r_getprinterdataex 02048 { 02049 uint32 type; 02050 uint32 size; 02051 uint8 *data; 02052 uint32 needed; 02053 WERROR status; 02054 } 02055 SPOOL_R_GETPRINTERDATAEX; 02056 02057 typedef struct spool_q_setprinterdataex 02058 { 02059 POLICY_HND handle; 02060 UNISTR2 key; 02061 UNISTR2 value; 02062 uint32 type; 02063 uint32 max_len; 02064 uint8 *data; 02065 uint32 real_len; 02066 uint32 numeric_data; 02067 } 02068 SPOOL_Q_SETPRINTERDATAEX; 02069 02070 typedef struct spool_r_setprinterdataex 02071 { 02072 WERROR status; 02073 } 02074 SPOOL_R_SETPRINTERDATAEX; 02075 02076 02077 typedef struct spool_q_deleteprinterdataex 02078 { 02079 POLICY_HND handle; 02080 UNISTR2 keyname; 02081 UNISTR2 valuename; 02082 } 02083 SPOOL_Q_DELETEPRINTERDATAEX; 02084 02085 typedef struct spool_r_deleteprinterdataex 02086 { 02087 WERROR status; 02088 } 02089 SPOOL_R_DELETEPRINTERDATAEX; 02090 02091 02092 typedef struct spool_q_enumprinterkey 02093 { 02094 POLICY_HND handle; 02095 UNISTR2 key; 02096 uint32 size; 02097 } 02098 SPOOL_Q_ENUMPRINTERKEY; 02099 02100 typedef struct spool_r_enumprinterkey 02101 { 02102 BUFFER5 keys; 02103 uint32 needed; /* in bytes */ 02104 WERROR status; 02105 } 02106 SPOOL_R_ENUMPRINTERKEY; 02107 02108 typedef struct spool_q_deleteprinterkey 02109 { 02110 POLICY_HND handle; 02111 UNISTR2 keyname; 02112 } 02113 SPOOL_Q_DELETEPRINTERKEY; 02114 02115 typedef struct spool_r_deleteprinterkey 02116 { 02117 WERROR status; 02118 } 02119 SPOOL_R_DELETEPRINTERKEY; 02120 02121 typedef struct printer_enum_values 02122 { 02123 UNISTR valuename; 02124 uint32 value_len; 02125 uint32 type; 02126 uint8 *data; 02127 uint32 data_len; 02128 02129 } 02130 PRINTER_ENUM_VALUES; 02131 02132 typedef struct printer_enum_values_ctr 02133 { 02134 uint32 size; 02135 uint32 size_of_array; 02136 PRINTER_ENUM_VALUES *values; 02137 } 02138 PRINTER_ENUM_VALUES_CTR; 02139 02140 typedef struct spool_q_enumprinterdataex 02141 { 02142 POLICY_HND handle; 02143 UNISTR2 key; 02144 uint32 size; 02145 } 02146 SPOOL_Q_ENUMPRINTERDATAEX; 02147 02148 typedef struct spool_r_enumprinterdataex 02149 { 02150 PRINTER_ENUM_VALUES_CTR ctr; 02151 uint32 needed; 02152 uint32 returned; 02153 WERROR status; 02154 } 02155 SPOOL_R_ENUMPRINTERDATAEX; 02156 02157 typedef struct printprocessor_directory_1 02158 { 02159 UNISTR name; 02160 } 02161 PRINTPROCESSOR_DIRECTORY_1; 02162 02163 typedef struct spool_q_getprintprocessordirectory 02164 { 02165 UNISTR2 name; 02166 UNISTR2 environment; 02167 uint32 level; 02168 RPC_BUFFER *buffer; 02169 uint32 offered; 02170 } 02171 SPOOL_Q_GETPRINTPROCESSORDIRECTORY; 02172 02173 typedef struct spool_r_getprintprocessordirectory 02174 { 02175 RPC_BUFFER *buffer; 02176 uint32 needed; 02177 WERROR status; 02178 } 02179 SPOOL_R_GETPRINTPROCESSORDIRECTORY; 02180 02181 /**************************************/ 02182 02183 #define MAX_PORTNAME 64 02184 #define MAX_NETWORK_NAME 49 02185 #define MAX_SNMP_COMM_NAME 33 02186 #define MAX_QUEUE_NAME 33 02187 #define MAX_IPADDR_STRING 17 02188 02189 typedef struct { 02190 uint16 portname[MAX_PORTNAME]; 02191 uint32 version; 02192 uint32 protocol; 02193 uint32 size; 02194 uint32 reserved; 02195 uint16 hostaddress[MAX_NETWORK_NAME]; 02196 uint16 snmpcommunity[MAX_SNMP_COMM_NAME]; 02197 uint32 dblspool; 02198 uint16 queue[MAX_QUEUE_NAME]; 02199 uint16 ipaddress[MAX_IPADDR_STRING]; 02200 uint32 port; 02201 uint32 snmpenabled; 02202 uint32 snmpdevindex; 02203 } SPOOL_PORT_DATA_1; 02204 02205 typedef struct { 02206 POLICY_HND handle; 02207 UNISTR2 dataname; 02208 RPC_BUFFER indata; 02209 uint32 indata_len; 02210 uint32 offered; 02211 uint32 unknown; 02212 } SPOOL_Q_XCVDATAPORT; 02213 02214 typedef struct { 02215 RPC_BUFFER outdata; 02216 uint32 needed; 02217 uint32 unknown; 02218 WERROR status; 02219 } SPOOL_R_XCVDATAPORT; 02220 02221 #define PRINTER_DRIVER_VERSION 2 02222 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86" 02223 02224 #endif /* _RPC_SPOOLSS_H */ 02225