/* spoolss pipe: this are the calls which are not implemented ...
#define SPOOLSS_OPENPRINTER 0x01
#define SPOOLSS_GETPRINTERDRIVER 0x0b
-#define SPOOLSS_DELETEPRINTERDRIVER 0x0d
-#define SPOOLSS_ADDPRINTPROCESSOR 0x0e
#define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10
#define SPOOLSS_READPRINTER 0x16
#define SPOOLSS_WAITFORPRINTERCHANGE 0x1c
#define SPOOLSS_SPOOLERINIT 0x3f
#define SPOOLSS_RESETPRINTEREX 0x40
#define SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION 0x42
-#define SPOOLSS_GETPRINTERDATAEX 0x4e
+*/
+
+/*
+ * Unimplement Win2k specific RPC's
+
+#define SPOOLSS_ADDPRINTERDRIVEREX 0x59
+
*/
/* those are implemented */
#define SPOOLSS_ADDPRINTERDRIVER 0x09
#define SPOOLSS_ENUMPRINTERDRIVERS 0x0a
#define SPOOLSS_GETPRINTERDRIVERDIRECTORY 0x0c
+#define SPOOLSS_DELETEPRINTERDRIVER 0x0d
+#define SPOOLSS_ADDPRINTPROCESSOR 0x0e
#define SPOOLSS_ENUMPRINTPROCESSORS 0x0f
#define SPOOLSS_STARTDOCPRINTER 0x11
#define SPOOLSS_STARTPAGEPRINTER 0x12
#define SPOOLSS_ADDPRINTEREX 0x46
#define SPOOLSS_ENUMPRINTERDATA 0x48
#define SPOOLSS_DELETEPRINTERDATA 0x49
+#define SPOOLSS_GETPRINTERDATAEX 0x4e
+#define SPOOLSS_SETPRINTERDATAEX 0x50
#define PRINTER_CONTROL_UNPAUSE 0x00000000
#define PRINTER_CONTROL_PAUSE 0x00000001
#define PRINTER_STATUS_POWER_SAVE 0x01000000
-/* Printer permissions ACE settings. NT4 uses generic and standard access
- rights whereas NT5 converts them all to object specific access rights. */
-
-#define PRINTER_ACE_FULL_CONTROL GENERIC_ALL_ACCESS
-#define PRINTER_ACE_MANAGE_DOCUMENTS READ_CONTROL_ACCESS
-#define PRINTER_ACE_PRINT \
- (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
-
-#define PRINTER_ACE_NT5_FULL_CONTROL 0x000f000c
-#define PRINTER_ACE_NT5_PRINT 0x00020000
-#define PRINTER_ACE_NT5_MANAGE_DOCUMENTS 0x00020008
-
#define SERVER_ACCESS_ADMINISTER 0x00000001
#define SERVER_ACCESS_ENUMERATE 0x00000002
#define PRINTER_ACCESS_ADMINISTER 0x00000004
#define PRINTER_ACCESS_USE 0x00000008
#define JOB_ACCESS_ADMINISTER 0x00000010
+/* JOB status codes. */
+
+#define JOB_STATUS_PAUSED 0x001
+#define JOB_STATUS_ERROR 0x002
+#define JOB_STATUS_DELETING 0x004
+#define JOB_STATUS_SPOOLING 0x008
+#define JOB_STATUS_PRINTING 0x010
+#define JOB_STATUS_OFFLINE 0x020
+#define JOB_STATUS_PAPEROUT 0x040
+#define JOB_STATUS_PRINTED 0x080
+#define JOB_STATUS_DELETED 0x100
+#define JOB_STATUS_BLOCKED 0x200
+#define JOB_STATUS_USER_INTERVENTION 0x400
+
+/* ACE masks for the various print permissions */
+
+#define PRINTER_ACE_FULL_CONTROL GENERIC_ALL_ACCESS
+#define PRINTER_ACE_MANAGE_DOCUMENTS READ_CONTROL_ACCESS
+#define PRINTER_ACE_PRINT \
+ (GENERIC_READ_ACCESS | GENERIC_WRITE_ACCESS | GENERIC_EXECUTE_ACCESS)
+
/* Access rights for print servers */
#define SERVER_ALL_ACCESS STANDARD_RIGHTS_REQUIRED_ACCESS|SERVER_ACCESS_ADMINISTER|SERVER_ACCESS_ENUMERATE
#define SERVER_READ STANDARD_RIGHTS_READ_ACCESS|SERVER_ACCESS_ENUMERATE
#define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
#define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
-#define POLICY_HND_SIZE 20
-
#define ONE_VALUE 01
#define TWO_VALUE 02
#define POINTER 03
typedef struct spool_r_open_printer_ex
{
POLICY_HND handle; /* handle used along all transactions (20*uint8) */
- uint32 status;
-
+ WERROR status;
}
SPOOL_R_OPEN_PRINTER_EX;
uint32 size;
uint8 *data;
uint32 needed;
- uint32 status;
+ WERROR status;
}
SPOOL_R_GETPRINTERDATA;
typedef struct spool_r_deleteprinterdata
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_DELETEPRINTERDATA;
typedef struct spool_r_closeprinter
{
POLICY_HND handle;
- uint32 status;
+ WERROR status;
}
SPOOL_R_CLOSEPRINTER;
typedef struct spool_r_startpageprinter
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_STARTPAGEPRINTER;
typedef struct spool_r_endpageprinter
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENDPAGEPRINTER;
+
+typedef struct spool_q_deleteprinterdriver
+{
+ uint32 server_ptr;
+ UNISTR2 server;
+ UNISTR2 arch;
+ UNISTR2 driver;
+}
+SPOOL_Q_DELETEPRINTERDRIVER;
+
+typedef struct spool_r_deleteprinterdriver
+{
+ WERROR status;
+}
+SPOOL_R_DELETEPRINTERDRIVER;
+
+
typedef struct spool_doc_info_1
{
uint32 p_docname;
typedef struct spool_r_startdocprinter
{
uint32 jobid;
- uint32 status;
+ WERROR status;
}
SPOOL_R_STARTDOCPRINTER;
typedef struct spool_r_enddocprinter
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENDDOCPRINTER;
typedef struct spool_r_writeprinter
{
uint32 buffer_written;
- uint32 status;
+ WERROR status;
}
SPOOL_R_WRITEPRINTER;
struct
{
uint32 length;
- uint16 string[1024];
+ uint16 *string;
}
data;
}
typedef struct spool_r_rffpcnex
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_RFFPCNEX;
{
uint32 info_ptr;
SPOOL_NOTIFY_INFO info;
- uint32 status;
+ WERROR status;
}
SPOOL_R_RFNPCNEX;
typedef struct spool_r_fcpn
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_FCPN;
NEW_BUFFER *buffer;
uint32 needed; /* bytes needed */
uint32 returned; /* number of printers */
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMPRINTERS;
{
NEW_BUFFER *buffer;
uint32 needed;
- uint32 status;
+ WERROR status;
} SPOOL_R_GETPRINTER;
typedef struct driver_info_1
uint32 needed;
uint32 servermajorversion;
uint32 serverminorversion;
- uint32 status;
+ WERROR status;
}
SPOOL_R_GETPRINTERDRIVER2;
{
NEW_BUFFER *buffer;
uint32 needed;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ADDJOB;
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMJOBS;
typedef struct spool_r_schedulejob
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_SCHEDULEJOB;
NEW_BUFFER *buffer;
uint32 needed; /* bytes needed */
uint32 returned; /* number of printers */
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMPORTS;
typedef struct spool_r_setjob
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_SETJOB;
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMPRINTERDRIVERS;
NEW_BUFFER *buffer;
uint32 needed;
uint32 numofforms;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMFORMS;
{
NEW_BUFFER *buffer;
uint32 needed;
- uint32 status;
+ WERROR status;
}
SPOOL_R_GETFORM;
uint32 default_priority;
uint32 starttime;
uint32 untiltime;
- uint32 status;
+ WERROR status;
uint32 cjobs;
uint32 averageppm;
UNISTR2 servername;
typedef struct spool_r_setprinter
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_SETPRINTER;
typedef struct spool_r_addprinter
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_ADDPRINTER;
typedef struct spool_r_deleteprinter
{
POLICY_HND handle;
- uint32 status;
+ WERROR status;
}
SPOOL_R_DELETEPRINTER;
typedef struct spool_r_abortprinter
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_ABORTPRINTER;
typedef struct spool_r_addprinterex
{
POLICY_HND handle;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ADDPRINTEREX;
typedef struct spool_r_addprinterdriver
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_ADDPRINTERDRIVER;
typedef struct driver_info_ctr_info
{
- union
- {
- DRIVER_DIRECTORY_1 info_1;
- }
- driver;
+ DRIVER_DIRECTORY_1 *info1;
}
DRIVER_DIRECTORY_CTR;
{
NEW_BUFFER *buffer;
uint32 needed;
- uint32 status;
+ WERROR status;
}
SPOOL_R_GETPRINTERDRIVERDIR;
+typedef struct spool_q_addprintprocessor
+{
+ uint32 server_ptr;
+ UNISTR2 server;
+ UNISTR2 environment;
+ UNISTR2 path;
+ UNISTR2 name;
+}
+SPOOL_Q_ADDPRINTPROCESSOR;
+
+typedef struct spool_r_addprintprocessor
+{
+ WERROR status;
+}
+SPOOL_R_ADDPRINTPROCESSOR;
+
+
typedef struct spool_q_enumprintprocessors
{
uint32 name_ptr;
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMPRINTPROCESSORS;
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMPRINTPROCDATATYPES;
NEW_BUFFER *buffer;
uint32 needed;
uint32 returned;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMPRINTMONITORS;
uint32 datasize;
uint8 *data;
uint32 realdatasize;
- uint32 status;
+ WERROR status;
}
SPOOL_R_ENUMPRINTERDATA;
typedef struct spool_r_setprinterdata
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_SETPRINTERDATA;
typedef struct spool_r_addform
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_ADDFORM;
typedef struct spool_r_setform
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_SETFORM;
typedef struct spool_r_deleteform
{
- uint32 status;
+ WERROR status;
}
SPOOL_R_DELETEFORM;
{
NEW_BUFFER *buffer;
uint32 needed;
- uint32 status;
+ WERROR status;
}
SPOOL_R_GETJOB;
typedef struct spool_r_replyopenprinter
{
POLICY_HND handle;
- uint32 status;
+ WERROR status;
}
SPOOL_R_REPLYOPENPRINTER;
typedef struct spool_r_replycloseprinter
{
POLICY_HND handle;
- uint32 status;
+ WERROR status;
}
SPOOL_R_REPLYCLOSEPRINTER;
typedef struct spool_r_rrpcn
{
uint32 unknown0;
- uint32 status;
+ WERROR status;
}
SPOOL_R_REPLY_RRPCN;
+typedef struct spool_q_getprinterdataex
+{
+ POLICY_HND handle;
+ UNISTR2 keyname;
+ UNISTR2 valuename;
+ uint32 size;
+}
+SPOOL_Q_GETPRINTERDATAEX;
+
+typedef struct spool_r_getprinterdataex
+{
+ uint32 type;
+ uint32 size;
+ uint8 *data;
+ uint32 needed;
+ WERROR status;
+}
+SPOOL_R_GETPRINTERDATAEX;
+
+typedef struct spool_q_setprinterdataex
+{
+ POLICY_HND handle;
+ UNISTR2 key;
+ UNISTR2 value;
+ uint32 type;
+ uint32 max_len;
+ uint8 *data;
+ uint32 real_len;
+ uint32 numeric_data;
+}
+SPOOL_Q_SETPRINTERDATAEX;
+
+typedef struct spool_r_setprinterdataex
+{
+ WERROR status;
+}
+SPOOL_R_SETPRINTERDATAEX;
+
#define PRINTER_DRIVER_VERSION 2
#define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
-
#endif /* _RPC_SPOOLSS_H */