spoolss: add generated spoolss code.
authorGünther Deschner <gd@samba.org>
Thu, 5 Feb 2009 14:50:47 +0000 (15:50 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 5 Feb 2009 15:05:30 +0000 (16:05 +0100)
Guenther

librpc/gen_ndr/cli_spoolss.c [new file with mode: 0644]
librpc/gen_ndr/cli_spoolss.h [new file with mode: 0644]
librpc/gen_ndr/ndr_spoolss.c [new file with mode: 0644]
librpc/gen_ndr/ndr_spoolss.h [new file with mode: 0644]
librpc/gen_ndr/srv_spoolss.c [new file with mode: 0644]
librpc/gen_ndr/srv_spoolss.h [new file with mode: 0644]

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
new file mode 100644 (file)
index 0000000..1071f2a
--- /dev/null
@@ -0,0 +1,4433 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/cli_spoolss.h"
+
+NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    uint32_t flags /* [in]  */,
+                                    const char *server /* [in] [unique,charset(UTF16)] */,
+                                    uint32_t level /* [in]  */,
+                                    DATA_BLOB *buffer /* [in] [unique] */,
+                                    uint32_t offered /* [in]  */,
+                                    union spoolss_PrinterInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                    uint32_t needed /* [out]  */,
+                                    uint32_t count /* [out]  */,
+                                    WERROR *werror)
+{
+       struct spoolss_EnumPrinters r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.flags = flags;
+       r.in.server = server;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPRINTERS,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               memcpy(info, r.out.info, count * sizeof(*info));
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   const char *printername /* [in] [unique,charset(UTF16)] */,
+                                   const char *datatype /* [in] [unique,charset(UTF16)] */,
+                                   struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                   uint32_t access_mask /* [in]  */,
+                                   struct policy_handle *handle /* [out] [ref] */,
+                                   WERROR *werror)
+{
+       struct spoolss_OpenPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.printername = printername;
+       r.in.datatype = datatype;
+       r.in.devmode_ctr = devmode_ctr;
+       r.in.access_mask = access_mask;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_OPENPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       *handle = *r.out.handle;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli,
+                              TALLOC_CTX *mem_ctx,
+                              struct policy_handle *handle /* [in] [ref] */,
+                              uint32_t job_id /* [in]  */,
+                              struct spoolss_JobInfoContainer *ctr /* [in] [unique] */,
+                              enum spoolss_JobControl command /* [in]  */,
+                              WERROR *werror)
+{
+       struct spoolss_SetJob r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.job_id = job_id;
+       r.in.ctr = ctr;
+       r.in.command = command;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_SetJob, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_SETJOB,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_SetJob, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli,
+                              TALLOC_CTX *mem_ctx,
+                              struct policy_handle *handle /* [in] [ref] */,
+                              uint32_t job_id /* [in]  */,
+                              uint32_t level /* [in]  */,
+                              DATA_BLOB *buffer /* [in] [unique] */,
+                              uint32_t offered /* [in]  */,
+                              union spoolss_JobInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                              uint32_t needed /* [out]  */,
+                              WERROR *werror)
+{
+       struct spoolss_GetJob r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.job_id = job_id;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetJob, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETJOB,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetJob, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               *info = *r.out.info;
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli,
+                                TALLOC_CTX *mem_ctx,
+                                struct policy_handle *handle /* [in] [ref] */,
+                                uint32_t firstjob /* [in]  */,
+                                uint32_t numjobs /* [in]  */,
+                                uint32_t level /* [in]  */,
+                                DATA_BLOB *buffer /* [in] [unique] */,
+                                uint32_t offered /* [in]  */,
+                                union spoolss_JobInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                uint32_t needed /* [out]  */,
+                                uint32_t count /* [out]  */,
+                                WERROR *werror)
+{
+       struct spoolss_EnumJobs r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.firstjob = firstjob;
+       r.in.numjobs = numjobs;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMJOBS,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               memcpy(info, r.out.info, count * sizeof(*info));
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  WERROR *werror)
+{
+       struct spoolss_AddPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     struct policy_handle *handle /* [in] [ref] */,
+                                     WERROR *werror)
+{
+       struct spoolss_DeletePrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  struct policy_handle *handle /* [in] [ref] */,
+                                  uint32_t level /* [in]  */,
+                                  union spoolss_SetPrinterInfo info /* [in] [switch_is(level)] */,
+                                  struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                  struct sec_desc_buf secdesc_ctr /* [in]  */,
+                                  enum spoolss_PrinterControl command /* [in]  */,
+                                  WERROR *werror)
+{
+       struct spoolss_SetPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       r.in.info = info;
+       r.in.devmode_ctr = devmode_ctr;
+       r.in.secdesc_ctr = secdesc_ctr;
+       r.in.command = command;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_SETPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  struct policy_handle *handle /* [in] [ref] */,
+                                  uint32_t level /* [in]  */,
+                                  DATA_BLOB *buffer /* [in] [unique] */,
+                                  uint32_t offered /* [in]  */,
+                                  union spoolss_PrinterInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                                  uint32_t needed /* [out]  */,
+                                  WERROR *werror)
+{
+       struct spoolss_GetPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               *info = *r.out.info;
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror)
+{
+       struct spoolss_AddPrinterDriver r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPRINTERDRIVER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
+                                          TALLOC_CTX *mem_ctx,
+                                          const char *server /* [in] [unique,charset(UTF16)] */,
+                                          const char *environment /* [in] [unique,charset(UTF16)] */,
+                                          uint32_t level /* [in]  */,
+                                          DATA_BLOB *buffer /* [in] [unique] */,
+                                          uint32_t offered /* [in]  */,
+                                          union spoolss_DriverInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                          uint32_t needed /* [out]  */,
+                                          uint32_t count /* [out]  */,
+                                          WERROR *werror)
+{
+       struct spoolss_EnumPrinterDrivers r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.server = server;
+       r.in.environment = environment;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPRINTERDRIVERS,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               memcpy(info, r.out.info, count * sizeof(*info));
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror)
+{
+       struct spoolss_GetPrinterDriver r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETPRINTERDRIVER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
+                                                 TALLOC_CTX *mem_ctx,
+                                                 const char *server /* [in] [unique,charset(UTF16)] */,
+                                                 const char *environment /* [in] [unique,charset(UTF16)] */,
+                                                 uint32_t level /* [in]  */,
+                                                 DATA_BLOB *buffer /* [in] [unique] */,
+                                                 uint32_t offered /* [in]  */,
+                                                 union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                                                 uint32_t needed /* [out]  */,
+                                                 WERROR *werror)
+{
+       struct spoolss_GetPrinterDriverDirectory r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.server = server;
+       r.in.environment = environment;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               *info = *r.out.info;
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           struct policy_handle *handle /* [in] [ref] */,
+                                           const char *server /* [in] [unique,charset(UTF16)] */,
+                                           const char *architecture /* [in] [charset(UTF16)] */,
+                                           const char *driver /* [in] [charset(UTF16)] */,
+                                           WERROR *werror)
+{
+       struct spoolss_DeletePrinterDriver r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.server = server;
+       r.in.architecture = architecture;
+       r.in.driver = driver;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTERDRIVER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         WERROR *werror)
+{
+       struct spoolss_AddPrintProcessor r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPRINTPROCESSOR,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           const char *servername /* [in] [unique,charset(UTF16)] */,
+                                           const char *environment /* [in] [unique,charset(UTF16)] */,
+                                           uint32_t level /* [in]  */,
+                                           DATA_BLOB *buffer /* [in] [unique] */,
+                                           uint32_t offered /* [in]  */,
+                                           union spoolss_PrintProcessorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                           uint32_t needed /* [out]  */,
+                                           uint32_t count /* [out]  */,
+                                           WERROR *werror)
+{
+       struct spoolss_EnumPrintProcessors r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.servername = servername;
+       r.in.environment = environment;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPRINTPROCESSORS,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               memcpy(info, r.out.info, count * sizeof(*info));
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
+                                                  TALLOC_CTX *mem_ctx,
+                                                  WERROR *werror)
+{
+       struct spoolss_GetPrintProcessorDirectory r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       struct policy_handle *handle /* [in] [ref] */,
+                                       uint32_t level /* [in]  */,
+                                       union spoolss_DocumentInfo info /* [in] [switch_is(level)] */,
+                                       uint32_t job_id /* [out]  */,
+                                       WERROR *werror)
+{
+       struct spoolss_StartDocPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       r.in.info = info;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_STARTDOCPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        WERROR *werror)
+{
+       struct spoolss_StartPagePrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_STARTPAGEPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct policy_handle *handle /* [in] [ref] */,
+                                    DATA_BLOB data /* [in]  */,
+                                    uint32_t _data_size /* [in] [value(r->in.data.length)] */,
+                                    uint32_t num_written /* [out]  */,
+                                    WERROR *werror)
+{
+       struct spoolss_WritePrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.data = data;
+       r.in._data_size = _data_size;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_WRITEPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      WERROR *werror)
+{
+       struct spoolss_EndPagePrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENDPAGEPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct policy_handle *handle /* [in] [ref] */,
+                                    WERROR *werror)
+{
+       struct spoolss_AbortPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ABORTPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   struct policy_handle *handle /* [in] [ref] */,
+                                   uint32_t data_size /* [in]  */,
+                                   DATA_BLOB data /* [out]  */,
+                                   uint32_t _data_size /* [out] [value(r->out.data.length)] */,
+                                   WERROR *werror)
+{
+       struct spoolss_ReadPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.data_size = data_size;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_READPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     struct policy_handle *handle /* [in] [ref] */,
+                                     WERROR *werror)
+{
+       struct spoolss_EndDocPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENDDOCPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
+                              TALLOC_CTX *mem_ctx,
+                              WERROR *werror)
+{
+       struct spoolss_AddJob r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddJob, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDJOB,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   WERROR *werror)
+{
+       struct spoolss_ScheduleJob r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_SCHEDULEJOB,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      const char *value_name /* [in] [charset(UTF16)] */,
+                                      uint32_t offered /* [in]  */,
+                                      enum spoolss_PrinterDataType type /* [out]  */,
+                                      union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(type)] */,
+                                      uint32_t needed /* [out]  */,
+                                      WERROR *werror)
+{
+       struct spoolss_GetPrinterData r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.value_name = value_name;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETPRINTERDATA,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      const char *value_name /* [in] [charset(UTF16)] */,
+                                      enum spoolss_PrinterDataType type /* [in]  */,
+                                      union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */,
+                                      uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
+                                      WERROR *werror)
+{
+       struct spoolss_SetPrinterData r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.value_name = value_name;
+       r.in.type = type;
+       r.in.data = data;
+       r.in._offered = _offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_SETPRINTERDATA,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
+                                            TALLOC_CTX *mem_ctx,
+                                            WERROR *werror)
+{
+       struct spoolss_WaitForPrinterChange r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_WAITFORPRINTERCHANGE,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct policy_handle *handle /* [in,out] [ref] */,
+                                    WERROR *werror)
+{
+       struct spoolss_ClosePrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_CLOSEPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       *handle = *r.out.handle;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               uint32_t level /* [in]  */,
+                               union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
+                               WERROR *werror)
+{
+       struct spoolss_AddForm r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       r.in.info = info;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddForm, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDFORM,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  struct policy_handle *handle /* [in] [ref] */,
+                                  const char *form_name /* [in] [charset(UTF16)] */,
+                                  WERROR *werror)
+{
+       struct spoolss_DeleteForm r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.form_name = form_name;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEFORM,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               const char *form_name /* [in] [charset(UTF16)] */,
+                               uint32_t level /* [in]  */,
+                               DATA_BLOB *buffer /* [in] [unique] */,
+                               uint32_t offered /* [in]  */,
+                               union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                               uint32_t needed /* [out]  */,
+                               WERROR *werror)
+{
+       struct spoolss_GetForm r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.form_name = form_name;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetForm, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETFORM,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               *info = *r.out.info;
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               const char *form_name /* [in] [charset(UTF16)] */,
+                               uint32_t level /* [in]  */,
+                               union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
+                               WERROR *werror)
+{
+       struct spoolss_SetForm r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.form_name = form_name;
+       r.in.level = level;
+       r.in.info = info;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_SetForm, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_SETFORM,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
+                                 TALLOC_CTX *mem_ctx,
+                                 struct policy_handle *handle /* [in] [ref] */,
+                                 uint32_t level /* [in]  */,
+                                 DATA_BLOB *buffer /* [in] [unique] */,
+                                 uint32_t offered /* [in]  */,
+                                 union spoolss_FormInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                 uint32_t needed /* [out]  */,
+                                 uint32_t count /* [out]  */,
+                                 WERROR *werror)
+{
+       struct spoolss_EnumForms r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMFORMS,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               memcpy(info, r.out.info, count * sizeof(*info));
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
+                                 TALLOC_CTX *mem_ctx,
+                                 const char *servername /* [in] [unique,charset(UTF16)] */,
+                                 uint32_t level /* [in]  */,
+                                 DATA_BLOB *buffer /* [in] [unique] */,
+                                 uint32_t offered /* [in]  */,
+                                 union spoolss_PortInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                 uint32_t needed /* [out]  */,
+                                 uint32_t count /* [out]  */,
+                                 WERROR *werror)
+{
+       struct spoolss_EnumPorts r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.servername = servername;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPORTS,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               memcpy(info, r.out.info, count * sizeof(*info));
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    const char *servername /* [in] [unique,charset(UTF16)] */,
+                                    uint32_t level /* [in]  */,
+                                    DATA_BLOB *buffer /* [in] [unique] */,
+                                    uint32_t offered /* [in]  */,
+                                    union spoolss_MonitorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                    uint32_t needed /* [out]  */,
+                                    uint32_t count /* [out]  */,
+                                    WERROR *werror)
+{
+       struct spoolss_EnumMonitors r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.servername = servername;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMMONITORS,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               memcpy(info, r.out.info, count * sizeof(*info));
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               const char *server_name /* [in] [unique,charset(UTF16)] */,
+                               uint32_t unknown /* [in]  */,
+                               const char *monitor_name /* [in] [charset(UTF16)] */,
+                               WERROR *werror)
+{
+       struct spoolss_AddPort r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.server_name = server_name;
+       r.in.unknown = unknown;
+       r.in.monitor_name = monitor_name;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPort, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPORT,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     WERROR *werror)
+{
+       struct spoolss_ConfigurePort r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_CONFIGUREPORT,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  WERROR *werror)
+{
+       struct spoolss_DeletePort r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPORT,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       WERROR *werror)
+{
+       struct spoolss_CreatePrinterIC r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_CREATEPRINTERIC,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
+                                                TALLOC_CTX *mem_ctx,
+                                                WERROR *werror)
+{
+       struct spoolss_PlayGDIScriptOnPrinterIC r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       WERROR *werror)
+{
+       struct spoolss_DeletePrinterIC r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTERIC,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
+                                            TALLOC_CTX *mem_ctx,
+                                            WERROR *werror)
+{
+       struct spoolss_AddPrinterConnection r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPRINTERCONNECTION,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
+                                               TALLOC_CTX *mem_ctx,
+                                               WERROR *werror)
+{
+       struct spoolss_DeletePrinterConnection r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTERCONNECTION,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         WERROR *werror)
+{
+       struct spoolss_PrinterMessageBox r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_PRINTERMESSAGEBOX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  WERROR *werror)
+{
+       struct spoolss_AddMonitor r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDMONITOR,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     WERROR *werror)
+{
+       struct spoolss_DeleteMonitor r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEMONITOR,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
+                                            TALLOC_CTX *mem_ctx,
+                                            WERROR *werror)
+{
+       struct spoolss_DeletePrintProcessor r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTPROCESSOR,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror)
+{
+       struct spoolss_AddPrintProvidor r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPRINTPROVIDOR,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           WERROR *werror)
+{
+       struct spoolss_DeletePrintProvidor r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTPROVIDOR,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
+                                              TALLOC_CTX *mem_ctx,
+                                              WERROR *werror)
+{
+       struct spoolss_EnumPrintProcDataTypes r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPRINTPROCDATATYPES,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    WERROR *werror)
+{
+       struct spoolss_ResetPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_RESETPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in] [ref] */,
+                                         const char *architecture /* [in] [unique,charset(UTF16)] */,
+                                         uint32_t level /* [in]  */,
+                                         DATA_BLOB *buffer /* [in] [unique] */,
+                                         uint32_t offered /* [in]  */,
+                                         uint32_t client_major_version /* [in]  */,
+                                         uint32_t client_minor_version /* [in]  */,
+                                         DATA_BLOB *info /* [out] [unique] */,
+                                         uint32_t needed /* [out]  */,
+                                         uint32_t server_major_version /* [out]  */,
+                                         uint32_t server_minor_version /* [out]  */,
+                                         WERROR *werror)
+{
+       struct spoolss_GetPrinterDriver2 r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.architecture = architecture;
+       r.in.level = level;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+       r.in.client_major_version = client_major_version;
+       r.in.client_minor_version = client_minor_version;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETPRINTERDRIVER2,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       if (info && r.out.info) {
+               *info = *r.out.info;
+       }
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                          TALLOC_CTX *mem_ctx,
+                                                          WERROR *werror)
+{
+       struct spoolss_FindFirstPrinterChangeNotification r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                         TALLOC_CTX *mem_ctx,
+                                                         WERROR *werror)
+{
+       struct spoolss_FindNextPrinterChangeNotification r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
+                                              TALLOC_CTX *mem_ctx,
+                                              struct policy_handle *handle /* [in] [ref] */,
+                                              WERROR *werror)
+{
+       struct spoolss_FindClosePrinterNotify r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
+                                                                   TALLOC_CTX *mem_ctx,
+                                                                   WERROR *werror)
+{
+       struct spoolss_RouterFindFirstPrinterChangeNotificationOld r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        const char *server_name /* [in] [charset(UTF16)] */,
+                                        uint32_t printer_local /* [in]  */,
+                                        enum winreg_Type type /* [in]  */,
+                                        uint32_t unknown1 /* [in]  */,
+                                        uint32_t unknown2 /* [in]  */,
+                                        struct policy_handle *handle /* [out] [ref] */,
+                                        WERROR *werror)
+{
+       struct spoolss_ReplyOpenPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.server_name = server_name;
+       r.in.printer_local = printer_local;
+       r.in.type = type;
+       r.in.unknown1 = unknown1;
+       r.in.unknown2 = unknown2;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_REPLYOPENPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       *handle = *r.out.handle;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
+                                          TALLOC_CTX *mem_ctx,
+                                          WERROR *werror)
+{
+       struct spoolss_RouterReplyPrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ROUTERREPLYPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in,out] [ref] */,
+                                         WERROR *werror)
+{
+       struct spoolss_ReplyClosePrinter r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_REPLYCLOSEPRINTER,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       *handle = *r.out.handle;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
+                                 TALLOC_CTX *mem_ctx,
+                                 WERROR *werror)
+{
+       struct spoolss_AddPortEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPORTEX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                                TALLOC_CTX *mem_ctx,
+                                                                WERROR *werror)
+{
+       struct spoolss_RouterFindFirstPrinterChangeNotification r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   WERROR *werror)
+{
+       struct spoolss_SpoolerInit r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_SPOOLERINIT,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      WERROR *werror)
+{
+       struct spoolss_ResetPrinterEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_RESETPRINTEREX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
+                                                            TALLOC_CTX *mem_ctx,
+                                                            struct policy_handle *handle /* [in] [ref] */,
+                                                            uint32_t flags /* [in]  */,
+                                                            uint32_t options /* [in]  */,
+                                                            const char *str /* [in] [unique,charset(UTF16)] */,
+                                                            uint32_t printer_local /* [in]  */,
+                                                            struct spoolss_NotifyOptionsContainer *t1 /* [in] [unique] */,
+                                                            WERROR *werror)
+{
+       struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.flags = flags;
+       r.in.options = options;
+       r.in.str = str;
+       r.in.printer_local = printer_local;
+       r.in.t1 = t1;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                              TALLOC_CTX *mem_ctx,
+                                                              WERROR *werror)
+{
+       struct spoolss_RouterRefreshPrinterChangeNotification r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
+                                                           TALLOC_CTX *mem_ctx,
+                                                           struct policy_handle *handle /* [in] [ref] */,
+                                                           uint32_t change_low /* [in]  */,
+                                                           struct spoolss_NotifyOptionsContainer *container /* [in] [unique] */,
+                                                           struct spoolss_NotifyInfo **info /* [out] [ref] */,
+                                                           WERROR *werror)
+{
+       struct spoolss_RemoteFindNextPrinterChangeNotifyEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.change_low = change_low;
+       r.in.container = container;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       *info = *r.out.info;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_44 r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_44, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_44,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_44, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     const char *printername /* [in] [unique,charset(UTF16)] */,
+                                     const char *datatype /* [in] [unique,charset(UTF16)] */,
+                                     struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                     uint32_t access_mask /* [in]  */,
+                                     uint32_t level /* [in]  */,
+                                     union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */,
+                                     struct policy_handle *handle /* [out] [ref] */,
+                                     WERROR *werror)
+{
+       struct spoolss_OpenPrinterEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.printername = printername;
+       r.in.datatype = datatype;
+       r.in.devmode_ctr = devmode_ctr;
+       r.in.access_mask = access_mask;
+       r.in.level = level;
+       r.in.userlevel = userlevel;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_OPENPRINTEREX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       *handle = *r.out.handle;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    const char *server /* [in] [unique,charset(UTF16)] */,
+                                    uint32_t level /* [in]  */,
+                                    union spoolss_PrinterInfo *info /* [in] [unique,switch_is(level)] */,
+                                    struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                    struct security_descriptor *secdesc /* [in] [unique] */,
+                                    uint32_t ulevel /* [in]  */,
+                                    union spoolss_UserLevel userlevel /* [in] [switch_is(ulevel)] */,
+                                    WERROR *werror)
+{
+       struct spoolss_AddPrinterEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.server = server;
+       r.in.level = level;
+       r.in.info = info;
+       r.in.devmode_ctr = devmode_ctr;
+       r.in.secdesc = secdesc;
+       r.in.ulevel = ulevel;
+       r.in.userlevel = userlevel;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPRINTEREX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_47 r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_47, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_47,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_47, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       struct policy_handle *handle /* [in] [ref] */,
+                                       uint32_t enum_index /* [in]  */,
+                                       const char *value_name /* [out] [ref,charset(UTF16),size_is(value_offered/2)] */,
+                                       uint32_t value_offered /* [in]  */,
+                                       uint32_t *value_needed /* [out] [ref] */,
+                                       uint32_t *printerdata_type /* [out] [ref] */,
+                                       DATA_BLOB *buffer /* [out] [ref] */,
+                                       uint32_t data_offered /* [in]  */,
+                                       uint32_t *data_needed /* [out] [ref] */,
+                                       WERROR *werror)
+{
+       struct spoolss_EnumPrinterData r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.enum_index = enum_index;
+       r.in.value_offered = value_offered;
+       r.in.data_offered = data_offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPRINTERDATA,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       memcpy(value_name, r.out.value_name, r.in.value_offered / 2 * sizeof(*value_name));
+       *value_needed = *r.out.value_needed;
+       *printerdata_type = *r.out.printerdata_type;
+       *buffer = *r.out.buffer;
+       *data_needed = *r.out.data_needed;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in] [ref] */,
+                                         const char *value_name /* [in] [charset(UTF16)] */,
+                                         WERROR *werror)
+{
+       struct spoolss_DeletePrinterData r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.value_name = value_name;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTERDATA,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_4a r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_4a, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_4A,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_4a, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_4b r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_4b, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_4B,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_4b, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_4c r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_4c, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_4C,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_4c, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        const char *key_name /* [in] [charset(UTF16)] */,
+                                        const char *value_name /* [in] [charset(UTF16)] */,
+                                        uint32_t type /* [in]  */,
+                                        DATA_BLOB buffer /* [in]  */,
+                                        uint32_t offered /* [in]  */,
+                                        WERROR *werror)
+{
+       struct spoolss_SetPrinterDataEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.key_name = key_name;
+       r.in.value_name = value_name;
+       r.in.type = type;
+       r.in.buffer = buffer;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_SETPRINTERDATAEX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        const char *key_name /* [in] [charset(UTF16)] */,
+                                        const char *value_name /* [in] [charset(UTF16)] */,
+                                        uint32_t offered /* [in]  */,
+                                        uint32_t type /* [out]  */,
+                                        DATA_BLOB buffer /* [out]  */,
+                                        uint32_t needed /* [out]  */,
+                                        WERROR *werror)
+{
+       struct spoolss_GetPrinterDataEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.key_name = key_name;
+       r.in.value_name = value_name;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_GETPRINTERDATAEX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in] [ref] */,
+                                         const char *key_name /* [in] [charset(UTF16)] */,
+                                         uint32_t offered /* [in]  */,
+                                         DATA_BLOB buffer /* [out]  */,
+                                         uint32_t needed /* [out]  */,
+                                         uint32_t count /* [out]  */,
+                                         WERROR *werror)
+{
+       struct spoolss_EnumPrinterDataEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.key_name = key_name;
+       r.in.offered = offered;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPRINTERDATAEX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      const char *key_name /* [in] [charset(UTF16)] */,
+                                      uint32_t key_buffer_size /* [out]  */,
+                                      uint16_t *key_buffer /* [out]  */,
+                                      uint32_t needed /* [in,out]  */,
+                                      WERROR *werror)
+{
+       struct spoolss_EnumPrinterKey r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.key_name = key_name;
+       r.in.needed = needed;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ENUMPRINTERKEY,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+       memcpy(key_buffer, r.out.key_buffer, key_buffer_size * sizeof(*key_buffer));
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           struct policy_handle *handle /* [in] [ref] */,
+                                           const char *key_name /* [in] [charset(UTF16)] */,
+                                           const char *value_name /* [in] [charset(UTF16)] */,
+                                           WERROR *werror)
+{
+       struct spoolss_DeletePrinterDataEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.key_name = key_name;
+       r.in.value_name = value_name;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTERDATAEX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror)
+{
+       struct spoolss_DeletePrinterKey r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTERKEY,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_53 r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_53, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_53,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_53, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
+                                             TALLOC_CTX *mem_ctx,
+                                             WERROR *werror)
+{
+       struct spoolss_DeletePrinterDriverEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_DELETEPRINTERDRIVEREX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_55 r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_55, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_55,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_55, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_56 r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_56, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_56,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_56, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_57 r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_57, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_57,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_57, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               const char *function_name /* [in] [charset(UTF16)] */,
+                               DATA_BLOB in_data /* [in]  */,
+                               uint32_t _in_data_length /* [in] [value(r->in.in_data.length)] */,
+                               uint32_t offered /* [in]  */,
+                               uint32_t unknown1 /* [in]  */,
+                               DATA_BLOB out_data /* [out]  */,
+                               uint32_t needed /* [out]  */,
+                               uint32_t unknown2 /* [out]  */,
+                               WERROR *werror)
+{
+       struct spoolss_XcvData r;
+       NTSTATUS status;
+
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.function_name = function_name;
+       r.in.in_data = in_data;
+       r.in._in_data_length = _in_data_length;
+       r.in.offered = offered;
+       r.in.unknown1 = unknown1;
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_XcvData, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_XCVDATA,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+       return NT_STATUS_NOT_SUPPORTED;
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
+                                          TALLOC_CTX *mem_ctx,
+                                          WERROR *werror)
+{
+       struct spoolss_AddPrinterDriverEx r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_ADDPRINTERDRIVEREX,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_5a r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_5a, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_5A,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_5a, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_5b r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_5b, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_5B,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_5b, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_5c r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_5c, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_5C,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_5c, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_5d r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_5d, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_5D,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_5d, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_5e r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_5e, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_5E,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_5e, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
+NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror)
+{
+       struct spoolss_5f r;
+       NTSTATUS status;
+
+       /* In parameters */
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_IN_DEBUG(spoolss_5f, &r);
+       }
+
+       status = cli->dispatch(cli,
+                               mem_ctx,
+                               &ndr_table_spoolss,
+                               NDR_SPOOLSS_5F,
+                               &r);
+
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
+       if (DEBUGLEVEL >= 10) {
+               NDR_PRINT_OUT_DEBUG(spoolss_5f, &r);
+       }
+
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+
+       /* Return variables */
+
+       /* Return result */
+       if (werror) {
+               *werror = r.out.result;
+       }
+
+       return werror_to_ntstatus(r.out.result);
+}
+
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
new file mode 100644 (file)
index 0000000..ba7de89
--- /dev/null
@@ -0,0 +1,523 @@
+#include "../librpc/gen_ndr/ndr_spoolss.h"
+#ifndef __CLI_SPOOLSS__
+#define __CLI_SPOOLSS__
+NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    uint32_t flags /* [in]  */,
+                                    const char *server /* [in] [unique,charset(UTF16)] */,
+                                    uint32_t level /* [in]  */,
+                                    DATA_BLOB *buffer /* [in] [unique] */,
+                                    uint32_t offered /* [in]  */,
+                                    union spoolss_PrinterInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                    uint32_t needed /* [out]  */,
+                                    uint32_t count /* [out]  */,
+                                    WERROR *werror);
+NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   const char *printername /* [in] [unique,charset(UTF16)] */,
+                                   const char *datatype /* [in] [unique,charset(UTF16)] */,
+                                   struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                   uint32_t access_mask /* [in]  */,
+                                   struct policy_handle *handle /* [out] [ref] */,
+                                   WERROR *werror);
+NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli,
+                              TALLOC_CTX *mem_ctx,
+                              struct policy_handle *handle /* [in] [ref] */,
+                              uint32_t job_id /* [in]  */,
+                              struct spoolss_JobInfoContainer *ctr /* [in] [unique] */,
+                              enum spoolss_JobControl command /* [in]  */,
+                              WERROR *werror);
+NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli,
+                              TALLOC_CTX *mem_ctx,
+                              struct policy_handle *handle /* [in] [ref] */,
+                              uint32_t job_id /* [in]  */,
+                              uint32_t level /* [in]  */,
+                              DATA_BLOB *buffer /* [in] [unique] */,
+                              uint32_t offered /* [in]  */,
+                              union spoolss_JobInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                              uint32_t needed /* [out]  */,
+                              WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli,
+                                TALLOC_CTX *mem_ctx,
+                                struct policy_handle *handle /* [in] [ref] */,
+                                uint32_t firstjob /* [in]  */,
+                                uint32_t numjobs /* [in]  */,
+                                uint32_t level /* [in]  */,
+                                DATA_BLOB *buffer /* [in] [unique] */,
+                                uint32_t offered /* [in]  */,
+                                union spoolss_JobInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                uint32_t needed /* [out]  */,
+                                uint32_t count /* [out]  */,
+                                WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     struct policy_handle *handle /* [in] [ref] */,
+                                     WERROR *werror);
+NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  struct policy_handle *handle /* [in] [ref] */,
+                                  uint32_t level /* [in]  */,
+                                  union spoolss_SetPrinterInfo info /* [in] [switch_is(level)] */,
+                                  struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                  struct sec_desc_buf secdesc_ctr /* [in]  */,
+                                  enum spoolss_PrinterControl command /* [in]  */,
+                                  WERROR *werror);
+NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  struct policy_handle *handle /* [in] [ref] */,
+                                  uint32_t level /* [in]  */,
+                                  DATA_BLOB *buffer /* [in] [unique] */,
+                                  uint32_t offered /* [in]  */,
+                                  union spoolss_PrinterInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                                  uint32_t needed /* [out]  */,
+                                  WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
+                                          TALLOC_CTX *mem_ctx,
+                                          const char *server /* [in] [unique,charset(UTF16)] */,
+                                          const char *environment /* [in] [unique,charset(UTF16)] */,
+                                          uint32_t level /* [in]  */,
+                                          DATA_BLOB *buffer /* [in] [unique] */,
+                                          uint32_t offered /* [in]  */,
+                                          union spoolss_DriverInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                          uint32_t needed /* [out]  */,
+                                          uint32_t count /* [out]  */,
+                                          WERROR *werror);
+NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
+                                                 TALLOC_CTX *mem_ctx,
+                                                 const char *server /* [in] [unique,charset(UTF16)] */,
+                                                 const char *environment /* [in] [unique,charset(UTF16)] */,
+                                                 uint32_t level /* [in]  */,
+                                                 DATA_BLOB *buffer /* [in] [unique] */,
+                                                 uint32_t offered /* [in]  */,
+                                                 union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                                                 uint32_t needed /* [out]  */,
+                                                 WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           struct policy_handle *handle /* [in] [ref] */,
+                                           const char *server /* [in] [unique,charset(UTF16)] */,
+                                           const char *architecture /* [in] [charset(UTF16)] */,
+                                           const char *driver /* [in] [charset(UTF16)] */,
+                                           WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           const char *servername /* [in] [unique,charset(UTF16)] */,
+                                           const char *environment /* [in] [unique,charset(UTF16)] */,
+                                           uint32_t level /* [in]  */,
+                                           DATA_BLOB *buffer /* [in] [unique] */,
+                                           uint32_t offered /* [in]  */,
+                                           union spoolss_PrintProcessorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                           uint32_t needed /* [out]  */,
+                                           uint32_t count /* [out]  */,
+                                           WERROR *werror);
+NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
+                                                  TALLOC_CTX *mem_ctx,
+                                                  WERROR *werror);
+NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       struct policy_handle *handle /* [in] [ref] */,
+                                       uint32_t level /* [in]  */,
+                                       union spoolss_DocumentInfo info /* [in] [switch_is(level)] */,
+                                       uint32_t job_id /* [out]  */,
+                                       WERROR *werror);
+NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct policy_handle *handle /* [in] [ref] */,
+                                    DATA_BLOB data /* [in]  */,
+                                    uint32_t _data_size /* [in] [value(r->in.data.length)] */,
+                                    uint32_t num_written /* [out]  */,
+                                    WERROR *werror);
+NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      WERROR *werror);
+NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct policy_handle *handle /* [in] [ref] */,
+                                    WERROR *werror);
+NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   struct policy_handle *handle /* [in] [ref] */,
+                                   uint32_t data_size /* [in]  */,
+                                   DATA_BLOB data /* [out]  */,
+                                   uint32_t _data_size /* [out] [value(r->out.data.length)] */,
+                                   WERROR *werror);
+NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     struct policy_handle *handle /* [in] [ref] */,
+                                     WERROR *werror);
+NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
+                              TALLOC_CTX *mem_ctx,
+                              WERROR *werror);
+NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   WERROR *werror);
+NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      const char *value_name /* [in] [charset(UTF16)] */,
+                                      uint32_t offered /* [in]  */,
+                                      enum spoolss_PrinterDataType type /* [out]  */,
+                                      union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(type)] */,
+                                      uint32_t needed /* [out]  */,
+                                      WERROR *werror);
+NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      const char *value_name /* [in] [charset(UTF16)] */,
+                                      enum spoolss_PrinterDataType type /* [in]  */,
+                                      union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */,
+                                      uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
+                                      WERROR *werror);
+NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
+                                            TALLOC_CTX *mem_ctx,
+                                            WERROR *werror);
+NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    struct policy_handle *handle /* [in,out] [ref] */,
+                                    WERROR *werror);
+NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               uint32_t level /* [in]  */,
+                               union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
+                               WERROR *werror);
+NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  struct policy_handle *handle /* [in] [ref] */,
+                                  const char *form_name /* [in] [charset(UTF16)] */,
+                                  WERROR *werror);
+NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               const char *form_name /* [in] [charset(UTF16)] */,
+                               uint32_t level /* [in]  */,
+                               DATA_BLOB *buffer /* [in] [unique] */,
+                               uint32_t offered /* [in]  */,
+                               union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
+                               uint32_t needed /* [out]  */,
+                               WERROR *werror);
+NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               const char *form_name /* [in] [charset(UTF16)] */,
+                               uint32_t level /* [in]  */,
+                               union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
+                               WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
+                                 TALLOC_CTX *mem_ctx,
+                                 struct policy_handle *handle /* [in] [ref] */,
+                                 uint32_t level /* [in]  */,
+                                 DATA_BLOB *buffer /* [in] [unique] */,
+                                 uint32_t offered /* [in]  */,
+                                 union spoolss_FormInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                 uint32_t needed /* [out]  */,
+                                 uint32_t count /* [out]  */,
+                                 WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
+                                 TALLOC_CTX *mem_ctx,
+                                 const char *servername /* [in] [unique,charset(UTF16)] */,
+                                 uint32_t level /* [in]  */,
+                                 DATA_BLOB *buffer /* [in] [unique] */,
+                                 uint32_t offered /* [in]  */,
+                                 union spoolss_PortInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                 uint32_t needed /* [out]  */,
+                                 uint32_t count /* [out]  */,
+                                 WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    const char *servername /* [in] [unique,charset(UTF16)] */,
+                                    uint32_t level /* [in]  */,
+                                    DATA_BLOB *buffer /* [in] [unique] */,
+                                    uint32_t offered /* [in]  */,
+                                    union spoolss_MonitorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
+                                    uint32_t needed /* [out]  */,
+                                    uint32_t count /* [out]  */,
+                                    WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               const char *server_name /* [in] [unique,charset(UTF16)] */,
+                               uint32_t unknown /* [in]  */,
+                               const char *monitor_name /* [in] [charset(UTF16)] */,
+                               WERROR *werror);
+NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  WERROR *werror);
+NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       WERROR *werror);
+NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
+                                                TALLOC_CTX *mem_ctx,
+                                                WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
+                                            TALLOC_CTX *mem_ctx,
+                                            WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
+                                               TALLOC_CTX *mem_ctx,
+                                               WERROR *werror);
+NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         WERROR *werror);
+NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
+                                  TALLOC_CTX *mem_ctx,
+                                  WERROR *werror);
+NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
+                                            TALLOC_CTX *mem_ctx,
+                                            WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
+                                              TALLOC_CTX *mem_ctx,
+                                              WERROR *werror);
+NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    WERROR *werror);
+NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in] [ref] */,
+                                         const char *architecture /* [in] [unique,charset(UTF16)] */,
+                                         uint32_t level /* [in]  */,
+                                         DATA_BLOB *buffer /* [in] [unique] */,
+                                         uint32_t offered /* [in]  */,
+                                         uint32_t client_major_version /* [in]  */,
+                                         uint32_t client_minor_version /* [in]  */,
+                                         DATA_BLOB *info /* [out] [unique] */,
+                                         uint32_t needed /* [out]  */,
+                                         uint32_t server_major_version /* [out]  */,
+                                         uint32_t server_minor_version /* [out]  */,
+                                         WERROR *werror);
+NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                          TALLOC_CTX *mem_ctx,
+                                                          WERROR *werror);
+NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                         TALLOC_CTX *mem_ctx,
+                                                         WERROR *werror);
+NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
+                                              TALLOC_CTX *mem_ctx,
+                                              struct policy_handle *handle /* [in] [ref] */,
+                                              WERROR *werror);
+NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
+                                                                   TALLOC_CTX *mem_ctx,
+                                                                   WERROR *werror);
+NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        const char *server_name /* [in] [charset(UTF16)] */,
+                                        uint32_t printer_local /* [in]  */,
+                                        enum winreg_Type type /* [in]  */,
+                                        uint32_t unknown1 /* [in]  */,
+                                        uint32_t unknown2 /* [in]  */,
+                                        struct policy_handle *handle /* [out] [ref] */,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
+                                          TALLOC_CTX *mem_ctx,
+                                          WERROR *werror);
+NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in,out] [ref] */,
+                                         WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
+                                 TALLOC_CTX *mem_ctx,
+                                 WERROR *werror);
+NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                                TALLOC_CTX *mem_ctx,
+                                                                WERROR *werror);
+NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
+                                   TALLOC_CTX *mem_ctx,
+                                   WERROR *werror);
+NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      WERROR *werror);
+NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
+                                                            TALLOC_CTX *mem_ctx,
+                                                            struct policy_handle *handle /* [in] [ref] */,
+                                                            uint32_t flags /* [in]  */,
+                                                            uint32_t options /* [in]  */,
+                                                            const char *str /* [in] [unique,charset(UTF16)] */,
+                                                            uint32_t printer_local /* [in]  */,
+                                                            struct spoolss_NotifyOptionsContainer *t1 /* [in] [unique] */,
+                                                            WERROR *werror);
+NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_client *cli,
+                                                              TALLOC_CTX *mem_ctx,
+                                                              WERROR *werror);
+NTSTATUS rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
+                                                           TALLOC_CTX *mem_ctx,
+                                                           struct policy_handle *handle /* [in] [ref] */,
+                                                           uint32_t change_low /* [in]  */,
+                                                           struct spoolss_NotifyOptionsContainer *container /* [in] [unique] */,
+                                                           struct spoolss_NotifyInfo **info /* [out] [ref] */,
+                                                           WERROR *werror);
+NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
+                                     TALLOC_CTX *mem_ctx,
+                                     const char *printername /* [in] [unique,charset(UTF16)] */,
+                                     const char *datatype /* [in] [unique,charset(UTF16)] */,
+                                     struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                     uint32_t access_mask /* [in]  */,
+                                     uint32_t level /* [in]  */,
+                                     union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */,
+                                     struct policy_handle *handle /* [out] [ref] */,
+                                     WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
+                                    TALLOC_CTX *mem_ctx,
+                                    const char *server /* [in] [unique,charset(UTF16)] */,
+                                    uint32_t level /* [in]  */,
+                                    union spoolss_PrinterInfo *info /* [in] [unique,switch_is(level)] */,
+                                    struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
+                                    struct security_descriptor *secdesc /* [in] [unique] */,
+                                    uint32_t ulevel /* [in]  */,
+                                    union spoolss_UserLevel userlevel /* [in] [switch_is(ulevel)] */,
+                                    WERROR *werror);
+NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
+                                       TALLOC_CTX *mem_ctx,
+                                       struct policy_handle *handle /* [in] [ref] */,
+                                       uint32_t enum_index /* [in]  */,
+                                       const char *value_name /* [out] [ref,charset(UTF16),size_is(value_offered/2)] */,
+                                       uint32_t value_offered /* [in]  */,
+                                       uint32_t *value_needed /* [out] [ref] */,
+                                       uint32_t *printerdata_type /* [out] [ref] */,
+                                       DATA_BLOB *buffer /* [out] [ref] */,
+                                       uint32_t data_offered /* [in]  */,
+                                       uint32_t *data_needed /* [out] [ref] */,
+                                       WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in] [ref] */,
+                                         const char *value_name /* [in] [charset(UTF16)] */,
+                                         WERROR *werror);
+NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        const char *key_name /* [in] [charset(UTF16)] */,
+                                        const char *value_name /* [in] [charset(UTF16)] */,
+                                        uint32_t type /* [in]  */,
+                                        DATA_BLOB buffer /* [in]  */,
+                                        uint32_t offered /* [in]  */,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        struct policy_handle *handle /* [in] [ref] */,
+                                        const char *key_name /* [in] [charset(UTF16)] */,
+                                        const char *value_name /* [in] [charset(UTF16)] */,
+                                        uint32_t offered /* [in]  */,
+                                        uint32_t type /* [out]  */,
+                                        DATA_BLOB buffer /* [out]  */,
+                                        uint32_t needed /* [out]  */,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
+                                         TALLOC_CTX *mem_ctx,
+                                         struct policy_handle *handle /* [in] [ref] */,
+                                         const char *key_name /* [in] [charset(UTF16)] */,
+                                         uint32_t offered /* [in]  */,
+                                         DATA_BLOB buffer /* [out]  */,
+                                         uint32_t needed /* [out]  */,
+                                         uint32_t count /* [out]  */,
+                                         WERROR *werror);
+NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle /* [in] [ref] */,
+                                      const char *key_name /* [in] [charset(UTF16)] */,
+                                      uint32_t key_buffer_size /* [out]  */,
+                                      uint16_t *key_buffer /* [out]  */,
+                                      uint32_t needed /* [in,out]  */,
+                                      WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli,
+                                           TALLOC_CTX *mem_ctx,
+                                           struct policy_handle *handle /* [in] [ref] */,
+                                           const char *key_name /* [in] [charset(UTF16)] */,
+                                           const char *value_name /* [in] [charset(UTF16)] */,
+                                           WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
+                                        TALLOC_CTX *mem_ctx,
+                                        WERROR *werror);
+NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
+                                             TALLOC_CTX *mem_ctx,
+                                             WERROR *werror);
+NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
+                               TALLOC_CTX *mem_ctx,
+                               struct policy_handle *handle /* [in] [ref] */,
+                               const char *function_name /* [in] [charset(UTF16)] */,
+                               DATA_BLOB in_data /* [in]  */,
+                               uint32_t _in_data_length /* [in] [value(r->in.in_data.length)] */,
+                               uint32_t offered /* [in]  */,
+                               uint32_t unknown1 /* [in]  */,
+                               DATA_BLOB out_data /* [out]  */,
+                               uint32_t needed /* [out]  */,
+                               uint32_t unknown2 /* [out]  */,
+                               WERROR *werror);
+NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
+                                          TALLOC_CTX *mem_ctx,
+                                          WERROR *werror);
+NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
+                          TALLOC_CTX *mem_ctx,
+                          WERROR *werror);
+#endif /* __CLI_SPOOLSS__ */
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
new file mode 100644 (file)
index 0000000..a677f53
--- /dev/null
@@ -0,0 +1,16993 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "../librpc/gen_ndr/ndr_spoolss.h"
+
+#include "librpc/gen_ndr/ndr_misc.h"
+#include "librpc/gen_ndr/ndr_security.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
+static enum ndr_err_code ndr_push_spoolss_Time(struct ndr_push *ndr, int ndr_flags, const struct spoolss_Time *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 2));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->year));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->month));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day_of_week));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hour));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->millisecond));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_Time(struct ndr_pull *ndr, int ndr_flags, struct spoolss_Time *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 2));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->year));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->month));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day_of_week));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hour));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->millisecond));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_Time(struct ndr_print *ndr, const char *name, const struct spoolss_Time *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_Time");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "year", r->year);
+       ndr_print_uint16(ndr, "month", r->month);
+       ndr_print_uint16(ndr, "day_of_week", r->day_of_week);
+       ndr_print_uint16(ndr, "day", r->day);
+       ndr_print_uint16(ndr, "hour", r->hour);
+       ndr_print_uint16(ndr, "minute", r->minute);
+       ndr_print_uint16(ndr, "second", r->second);
+       ndr_print_uint16(ndr, "millisecond", r->millisecond);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo0(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo0 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_jobs));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_bytes));
+               NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->time));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown10));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown11));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown12));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_counter));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown14));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->printer_errors));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown16));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown17));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown18));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown19));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->change_id));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown21));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown23));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->c_setprinter));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown25));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown26));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown27));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown28));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown29));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->servername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->servername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo0(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo0 *r)
+{
+       uint32_t _ptr_printername;
+       TALLOC_CTX *_mem_save_printername_0;
+       uint32_t _ptr_servername;
+       TALLOC_CTX *_mem_save_servername_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
+                       if (_ptr_printername) {
+                               NDR_PULL_ALLOC(ndr, r->printername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
+                       } else {
+                               r->printername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
+                       if (_ptr_servername) {
+                               NDR_PULL_ALLOC(ndr, r->servername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
+                       } else {
+                               r->servername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_jobs));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_bytes));
+               NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->time));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->global_counter));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown10));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown11));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown12));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_counter));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown14));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->printer_errors));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown16));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown17));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown18));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown19));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->change_id));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown21));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown23));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->c_setprinter));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown25));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown26));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown27));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown28));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown29));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
+                               _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->servername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
+                               _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo0(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo0 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo0");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "printername", r->printername);
+       ndr->depth++;
+       if (r->printername) {
+               ndr_print_string(ndr, "printername", r->printername);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "servername", r->servername);
+       ndr->depth++;
+       if (r->servername) {
+               ndr_print_string(ndr, "servername", r->servername);
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "cjobs", r->cjobs);
+       ndr_print_uint32(ndr, "total_jobs", r->total_jobs);
+       ndr_print_uint32(ndr, "total_bytes", r->total_bytes);
+       ndr_print_spoolss_Time(ndr, "time", &r->time);
+       ndr_print_uint32(ndr, "global_counter", r->global_counter);
+       ndr_print_uint32(ndr, "total_pages", r->total_pages);
+       ndr_print_uint32(ndr, "version", r->version);
+       ndr_print_uint32(ndr, "unknown10", r->unknown10);
+       ndr_print_uint32(ndr, "unknown11", r->unknown11);
+       ndr_print_uint32(ndr, "unknown12", r->unknown12);
+       ndr_print_uint32(ndr, "session_counter", r->session_counter);
+       ndr_print_uint32(ndr, "unknown14", r->unknown14);
+       ndr_print_uint32(ndr, "printer_errors", r->printer_errors);
+       ndr_print_uint32(ndr, "unknown16", r->unknown16);
+       ndr_print_uint32(ndr, "unknown17", r->unknown17);
+       ndr_print_uint32(ndr, "unknown18", r->unknown18);
+       ndr_print_uint32(ndr, "unknown19", r->unknown19);
+       ndr_print_uint32(ndr, "change_id", r->change_id);
+       ndr_print_uint32(ndr, "unknown21", r->unknown21);
+       ndr_print_uint32(ndr, "status", r->status);
+       ndr_print_uint32(ndr, "unknown23", r->unknown23);
+       ndr_print_uint32(ndr, "c_setprinter", r->c_setprinter);
+       ndr_print_uint16(ndr, "unknown25", r->unknown25);
+       ndr_print_uint16(ndr, "unknown26", r->unknown26);
+       ndr_print_uint32(ndr, "unknown27", r->unknown27);
+       ndr_print_uint32(ndr, "unknown28", r->unknown28);
+       ndr_print_uint32(ndr, "unknown29", r->unknown29);
+       ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeviceMode(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DeviceMode *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devicename, 32, sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->specversion));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverversion));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverextra_data.length));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fields));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->orientation));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->papersize));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperlength));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperwidth));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->scale));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->copies));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->defaultsource));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->printquality));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->color));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->duplex));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->yresolution));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ttoption));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->collate));
+               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->formname, 32, sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logpixels));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bitsperpel));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelswidth));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelsheight));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->displayflags));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->displayfrequency));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->icmmethod));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->icmintent));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mediatype));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dithertype));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved1));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningwidth));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningheight));
+               {
+                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+                       {
+                               struct ndr_push *_ndr_driverextra_data;
+                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->driverextra_data.length));
+                               NDR_CHECK(ndr_push_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, r->driverextra_data));
+                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_driverextra_data, 0, r->driverextra_data.length));
+                       }
+                       ndr->flags = _flags_save_DATA_BLOB;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeviceMode(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceMode *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devicename, 32, sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->specversion));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->driverversion));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__driverextra_length));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fields));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->orientation));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->papersize));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperlength));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperwidth));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->scale));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->copies));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->defaultsource));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->printquality));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->color));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->duplex));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->yresolution));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ttoption));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->collate));
+               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->formname, 32, sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logpixels));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bitsperpel));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelswidth));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelsheight));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->displayflags));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->displayfrequency));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->icmmethod));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->icmintent));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mediatype));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dithertype));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningwidth));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningheight));
+               {
+                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+                       {
+                               struct ndr_pull *_ndr_driverextra_data;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->__driverextra_length));
+                               NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, &r->driverextra_data));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_driverextra_data, 0, r->__driverextra_length));
+                       }
+                       ndr->flags = _flags_save_DATA_BLOB;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceMode *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_DeviceMode");
+       ndr->depth++;
+       ndr_print_string(ndr, "devicename", r->devicename);
+       ndr_print_uint16(ndr, "specversion", r->specversion);
+       ndr_print_uint16(ndr, "driverversion", r->driverversion);
+       ndr_print_uint16(ndr, "size", r->size);
+       ndr_print_uint16(ndr, "__driverextra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->driverextra_data.length:r->__driverextra_length);
+       ndr_print_uint32(ndr, "fields", r->fields);
+       ndr_print_uint16(ndr, "orientation", r->orientation);
+       ndr_print_uint16(ndr, "papersize", r->papersize);
+       ndr_print_uint16(ndr, "paperlength", r->paperlength);
+       ndr_print_uint16(ndr, "paperwidth", r->paperwidth);
+       ndr_print_uint16(ndr, "scale", r->scale);
+       ndr_print_uint16(ndr, "copies", r->copies);
+       ndr_print_uint16(ndr, "defaultsource", r->defaultsource);
+       ndr_print_uint16(ndr, "printquality", r->printquality);
+       ndr_print_uint16(ndr, "color", r->color);
+       ndr_print_uint16(ndr, "duplex", r->duplex);
+       ndr_print_uint16(ndr, "yresolution", r->yresolution);
+       ndr_print_uint16(ndr, "ttoption", r->ttoption);
+       ndr_print_uint16(ndr, "collate", r->collate);
+       ndr_print_string(ndr, "formname", r->formname);
+       ndr_print_uint16(ndr, "logpixels", r->logpixels);
+       ndr_print_uint32(ndr, "bitsperpel", r->bitsperpel);
+       ndr_print_uint32(ndr, "pelswidth", r->pelswidth);
+       ndr_print_uint32(ndr, "pelsheight", r->pelsheight);
+       ndr_print_uint32(ndr, "displayflags", r->displayflags);
+       ndr_print_uint32(ndr, "displayfrequency", r->displayfrequency);
+       ndr_print_uint32(ndr, "icmmethod", r->icmmethod);
+       ndr_print_uint32(ndr, "icmintent", r->icmintent);
+       ndr_print_uint32(ndr, "mediatype", r->mediatype);
+       ndr_print_uint32(ndr, "dithertype", r->dithertype);
+       ndr_print_uint32(ndr, "reserved1", r->reserved1);
+       ndr_print_uint32(ndr, "reserved2", r->reserved2);
+       ndr_print_uint32(ndr, "panningwidth", r->panningwidth);
+       ndr_print_uint32(ndr, "panningheight", r->panningheight);
+       ndr_print_DATA_BLOB(ndr, "driverextra_data", r->driverextra_data);
+       ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_spoolss_DeviceMode(const struct spoolss_DeviceMode *r, struct smb_iconv_convenience *ic, int flags)
+{
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DeviceMode, ic);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_EnumPrinterFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_DEFAULT", PRINTER_ENUM_DEFAULT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONNECTIONS", PRINTER_ENUM_CONNECTIONS, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_FAVORITE", PRINTER_ENUM_FAVORITE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NAME", PRINTER_ENUM_NAME, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_REMOTE", PRINTER_ENUM_REMOTE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_SHARED", PRINTER_ENUM_SHARED, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NETWORK", PRINTER_ENUM_NETWORK, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_EXPAND", PRINTER_ENUM_EXPAND, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONTAINER", PRINTER_ENUM_CONTAINER, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON1", PRINTER_ENUM_ICON1, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON2", PRINTER_ENUM_ICON2, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON3", PRINTER_ENUM_ICON3, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON4", PRINTER_ENUM_ICON4, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON5", PRINTER_ENUM_ICON5, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON6", PRINTER_ENUM_ICON6, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON7", PRINTER_ENUM_ICON7, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON8", PRINTER_ENUM_ICON8, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_HIDE", PRINTER_ENUM_HIDE, r);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo1 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, r->flags));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment));
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->name) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->name));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->description) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->description));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->comment) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->comment));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo1 *r)
+{
+       uint32_t _ptr_name;
+       TALLOC_CTX *_mem_save_name_0;
+       uint32_t _ptr_description;
+       TALLOC_CTX *_mem_save_description_0;
+       uint32_t _ptr_comment;
+       TALLOC_CTX *_mem_save_comment_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, &r->flags));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+                       if (_ptr_name) {
+                               NDR_PULL_ALLOC(ndr, r->name);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name, _ptr_name));
+                       } else {
+                               r->name = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
+                       if (_ptr_description) {
+                               NDR_PULL_ALLOC(ndr, r->description);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
+                       } else {
+                               r->description = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+                       if (_ptr_comment) {
+                               NDR_PULL_ALLOC(ndr, r->comment);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
+                       } else {
+                               r->comment = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->name) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name));
+                               _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->description) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
+                               _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->comment) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
+                               _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo1 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo1");
+       ndr->depth++;
+       ndr_print_spoolss_EnumPrinterFlags(ndr, "flags", r->flags);
+       ndr_print_ptr(ndr, "name", r->name);
+       ndr->depth++;
+       if (r->name) {
+               ndr_print_string(ndr, "name", r->name);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "description", r->description);
+       ndr->depth++;
+       if (r->description) {
+               ndr_print_string(ndr, "description", r->description);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "comment", r->comment);
+       ndr->depth++;
+       if (r->comment) {
+               ndr_print_string(ndr, "comment", r->comment);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS, r);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterStatus(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterStatus(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterStatus(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAUSED", PRINTER_STATUS_PAUSED, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_ERROR", PRINTER_STATUS_ERROR, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PENDING_DELETION", PRINTER_STATUS_PENDING_DELETION, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_JAM", PRINTER_STATUS_PAPER_JAM, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_OUT", PRINTER_STATUS_PAPER_OUT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_MANUAL_FEED", PRINTER_STATUS_MANUAL_FEED, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_PROBLEM", PRINTER_STATUS_PAPER_PROBLEM, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OFFLINE", PRINTER_STATUS_OFFLINE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_IO_ACTIVE", PRINTER_STATUS_IO_ACTIVE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_BUSY", PRINTER_STATUS_BUSY, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PRINTING", PRINTER_STATUS_PRINTING, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUTPUT_BIN_FULL", PRINTER_STATUS_OUTPUT_BIN_FULL, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NOT_AVAILABLE", PRINTER_STATUS_NOT_AVAILABLE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WAITING", PRINTER_STATUS_WAITING, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PROCESSING", PRINTER_STATUS_PROCESSING, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_INITIALIZING", PRINTER_STATUS_INITIALIZING, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WARMING_UP", PRINTER_STATUS_WARMING_UP, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_TONER_LOW", PRINTER_STATUS_TONER_LOW, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NO_TONER", PRINTER_STATUS_NO_TONER, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAGE_PUNT", PRINTER_STATUS_PAGE_PUNT, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_USER_INTERVENTION", PRINTER_STATUS_USER_INTERVENTION, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUT_OF_MEMORY", PRINTER_STATUS_OUT_OF_MEMORY, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_DOOR_OPEN", PRINTER_STATUS_DOOR_OPEN, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_SERVER_UNKNOWN", PRINTER_STATUS_SERVER_UNKNOWN, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_POWER_SAVE", PRINTER_STATUS_POWER_SAVE, r);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo2 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sharename));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->drivername));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->location));
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sepfile));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printprocessor));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->datatype));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
+               NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->defaultpriority));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->untiltime));
+               NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->servername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->servername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->sharename) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->sharename));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sharename));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->portname) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->portname));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->drivername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->drivername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->drivername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->comment) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->comment));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->location) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->location));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->location));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               if (r->devmode) {
+                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->devmode));
+                       {
+                               struct ndr_push *_ndr_devmode;
+                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
+                               NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
+                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
+                       }
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->sepfile) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->sepfile));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sepfile));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printprocessor) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printprocessor));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printprocessor));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->datatype) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->datatype));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->datatype));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->parameters) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->parameters));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               if (r->secdesc) {
+                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->secdesc));
+                       {
+                               struct ndr_push *_ndr_secdesc;
+                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
+                               NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
+                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
+                       }
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo2 *r)
+{
+       uint32_t _ptr_servername;
+       TALLOC_CTX *_mem_save_servername_0;
+       uint32_t _ptr_printername;
+       TALLOC_CTX *_mem_save_printername_0;
+       uint32_t _ptr_sharename;
+       TALLOC_CTX *_mem_save_sharename_0;
+       uint32_t _ptr_portname;
+       TALLOC_CTX *_mem_save_portname_0;
+       uint32_t _ptr_drivername;
+       TALLOC_CTX *_mem_save_drivername_0;
+       uint32_t _ptr_comment;
+       TALLOC_CTX *_mem_save_comment_0;
+       uint32_t _ptr_location;
+       TALLOC_CTX *_mem_save_location_0;
+       uint32_t _ptr_devmode;
+       TALLOC_CTX *_mem_save_devmode_0;
+       uint32_t _ptr_sepfile;
+       TALLOC_CTX *_mem_save_sepfile_0;
+       uint32_t _ptr_printprocessor;
+       TALLOC_CTX *_mem_save_printprocessor_0;
+       uint32_t _ptr_datatype;
+       TALLOC_CTX *_mem_save_datatype_0;
+       uint32_t _ptr_parameters;
+       TALLOC_CTX *_mem_save_parameters_0;
+       uint32_t _ptr_secdesc;
+       TALLOC_CTX *_mem_save_secdesc_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
+                       if (_ptr_servername) {
+                               NDR_PULL_ALLOC(ndr, r->servername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
+                       } else {
+                               r->servername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
+                       if (_ptr_printername) {
+                               NDR_PULL_ALLOC(ndr, r->printername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
+                       } else {
+                               r->printername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
+                       if (_ptr_sharename) {
+                               NDR_PULL_ALLOC(ndr, r->sharename);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sharename, _ptr_sharename));
+                       } else {
+                               r->sharename = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
+                       if (_ptr_portname) {
+                               NDR_PULL_ALLOC(ndr, r->portname);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
+                       } else {
+                               r->portname = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_drivername));
+                       if (_ptr_drivername) {
+                               NDR_PULL_ALLOC(ndr, r->drivername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->drivername, _ptr_drivername));
+                       } else {
+                               r->drivername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
+                       if (_ptr_comment) {
+                               NDR_PULL_ALLOC(ndr, r->comment);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
+                       } else {
+                               r->comment = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
+                       if (_ptr_location) {
+                               NDR_PULL_ALLOC(ndr, r->location);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->location, _ptr_location));
+                       } else {
+                               r->location = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
+               if (_ptr_devmode) {
+                       NDR_PULL_ALLOC(ndr, r->devmode);
+                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
+               } else {
+                       r->devmode = NULL;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sepfile));
+                       if (_ptr_sepfile) {
+                               NDR_PULL_ALLOC(ndr, r->sepfile);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sepfile, _ptr_sepfile));
+                       } else {
+                               r->sepfile = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printprocessor));
+                       if (_ptr_printprocessor) {
+                               NDR_PULL_ALLOC(ndr, r->printprocessor);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printprocessor, _ptr_printprocessor));
+                       } else {
+                               r->printprocessor = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
+                       if (_ptr_datatype) {
+                               NDR_PULL_ALLOC(ndr, r->datatype);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->datatype, _ptr_datatype));
+                       } else {
+                               r->datatype = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
+                       if (_ptr_parameters) {
+                               NDR_PULL_ALLOC(ndr, r->parameters);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
+                       } else {
+                               r->parameters = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
+               if (_ptr_secdesc) {
+                       NDR_PULL_ALLOC(ndr, r->secdesc);
+                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
+               } else {
+                       r->secdesc = NULL;
+               }
+               NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->defaultpriority));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->starttime));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->untiltime));
+               NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->servername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
+                               _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
+                               _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->sharename) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sharename));
+                               _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->sharename, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sharename));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->portname) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
+                               _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->drivername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->drivername));
+                               _mem_save_drivername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->drivername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->drivername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_drivername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->comment) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
+                               _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->location) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->location));
+                               _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->location));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               if (r->devmode) {
+                       uint32_t _relative_save_offset;
+                       _relative_save_offset = ndr->offset;
+                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
+                       _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
+                       {
+                               struct ndr_pull *_ndr_devmode;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
+                               NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
+                       ndr->offset = _relative_save_offset;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->sepfile) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sepfile));
+                               _mem_save_sepfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->sepfile, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sepfile));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sepfile_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printprocessor) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printprocessor));
+                               _mem_save_printprocessor_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->printprocessor, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printprocessor));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printprocessor_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->datatype) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->datatype));
+                               _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->datatype));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->parameters) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
+                               _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               if (r->secdesc) {
+                       uint32_t _relative_save_offset;
+                       _relative_save_offset = ndr->offset;
+                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
+                       _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
+                       {
+                               struct ndr_pull *_ndr_secdesc;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
+                               NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
+                       ndr->offset = _relative_save_offset;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo2 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo2");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "servername", r->servername);
+       ndr->depth++;
+       if (r->servername) {
+               ndr_print_string(ndr, "servername", r->servername);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "printername", r->printername);
+       ndr->depth++;
+       if (r->printername) {
+               ndr_print_string(ndr, "printername", r->printername);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "sharename", r->sharename);
+       ndr->depth++;
+       if (r->sharename) {
+               ndr_print_string(ndr, "sharename", r->sharename);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "portname", r->portname);
+       ndr->depth++;
+       if (r->portname) {
+               ndr_print_string(ndr, "portname", r->portname);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "drivername", r->drivername);
+       ndr->depth++;
+       if (r->drivername) {
+               ndr_print_string(ndr, "drivername", r->drivername);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "comment", r->comment);
+       ndr->depth++;
+       if (r->comment) {
+               ndr_print_string(ndr, "comment", r->comment);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "location", r->location);
+       ndr->depth++;
+       if (r->location) {
+               ndr_print_string(ndr, "location", r->location);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "devmode", r->devmode);
+       ndr->depth++;
+       if (r->devmode) {
+               ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "sepfile", r->sepfile);
+       ndr->depth++;
+       if (r->sepfile) {
+               ndr_print_string(ndr, "sepfile", r->sepfile);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "printprocessor", r->printprocessor);
+       ndr->depth++;
+       if (r->printprocessor) {
+               ndr_print_string(ndr, "printprocessor", r->printprocessor);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "datatype", r->datatype);
+       ndr->depth++;
+       if (r->datatype) {
+               ndr_print_string(ndr, "datatype", r->datatype);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "parameters", r->parameters);
+       ndr->depth++;
+       if (r->parameters) {
+               ndr_print_string(ndr, "parameters", r->parameters);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "secdesc", r->secdesc);
+       ndr->depth++;
+       if (r->secdesc) {
+               ndr_print_security_descriptor(ndr, "secdesc", r->secdesc);
+       }
+       ndr->depth--;
+       ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
+       ndr_print_uint32(ndr, "priority", r->priority);
+       ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority);
+       ndr_print_uint32(ndr, "starttime", r->starttime);
+       ndr_print_uint32(ndr, "untiltime", r->untiltime);
+       ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
+       ndr_print_uint32(ndr, "cjobs", r->cjobs);
+       ndr_print_uint32(ndr, "averageppm", r->averageppm);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo3 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->secdesc) {
+                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->secdesc));
+                       {
+                               struct ndr_push *_ndr_secdesc;
+                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
+                               NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
+                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
+                       }
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo3 *r)
+{
+       uint32_t _ptr_secdesc;
+       TALLOC_CTX *_mem_save_secdesc_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
+               if (_ptr_secdesc) {
+                       NDR_PULL_ALLOC(ndr, r->secdesc);
+                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
+               } else {
+                       r->secdesc = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->secdesc) {
+                       uint32_t _relative_save_offset;
+                       _relative_save_offset = ndr->offset;
+                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
+                       _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
+                       {
+                               struct ndr_pull *_ndr_secdesc;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
+                               NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
+                       ndr->offset = _relative_save_offset;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo3 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo3");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "secdesc", r->secdesc);
+       ndr->depth++;
+       if (r->secdesc) {
+               ndr_print_security_descriptor(ndr, "secdesc", r->secdesc);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo4 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->servername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->servername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo4 *r)
+{
+       uint32_t _ptr_printername;
+       TALLOC_CTX *_mem_save_printername_0;
+       uint32_t _ptr_servername;
+       TALLOC_CTX *_mem_save_servername_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
+                       if (_ptr_printername) {
+                               NDR_PULL_ALLOC(ndr, r->printername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
+                       } else {
+                               r->printername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
+                       if (_ptr_servername) {
+                               NDR_PULL_ALLOC(ndr, r->servername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
+                       } else {
+                               r->servername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
+                               _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->servername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
+                               _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo4 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo4");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "printername", r->printername);
+       ndr->depth++;
+       if (r->printername) {
+               ndr_print_string(ndr, "printername", r->printername);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "servername", r->servername);
+       ndr->depth++;
+       if (r->servername) {
+               ndr_print_string(ndr, "servername", r->servername);
+       }
+       ndr->depth--;
+       ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo5(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo5 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname));
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->portname) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->portname));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo5(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo5 *r)
+{
+       uint32_t _ptr_printername;
+       TALLOC_CTX *_mem_save_printername_0;
+       uint32_t _ptr_portname;
+       TALLOC_CTX *_mem_save_portname_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
+                       if (_ptr_printername) {
+                               NDR_PULL_ALLOC(ndr, r->printername);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
+                       } else {
+                               r->printername = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
+                       if (_ptr_portname) {
+                               NDR_PULL_ALLOC(ndr, r->portname);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
+                       } else {
+                               r->portname = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->printername) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
+                               _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->portname) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
+                               _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo5 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo5");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "printername", r->printername);
+       ndr->depth++;
+       if (r->printername) {
+               ndr_print_string(ndr, "printername", r->printername);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "portname", r->portname);
+       ndr->depth++;
+       if (r->portname) {
+               ndr_print_string(ndr, "portname", r->portname);
+       }
+       ndr->depth--;
+       ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
+       ndr_print_uint32(ndr, "device_not_selected_timeout", r->device_not_selected_timeout);
+       ndr_print_uint32(ndr, "transmission_retry_timeout", r->transmission_retry_timeout);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo6(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo6 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo6(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo6 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo6 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo6");
+       ndr->depth++;
+       ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_DsPrintAction(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_DsPrintAction(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_DsPrintAction(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PUBLISH", DSPRINT_PUBLISH, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UPDATE", DSPRINT_UPDATE, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UNPUBLISH", DSPRINT_UNPUBLISH, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_REPUBLISH", DSPRINT_REPUBLISH, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PENDING", DSPRINT_PENDING, r);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_PrinterInfo7(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo7 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->guid));
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->guid) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->guid));
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->guid));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_PrinterInfo7(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo7 *r)
+{
+       uint32_t _ptr_guid;
+       TALLOC_CTX *_mem_save_guid_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guid));
+                       if (_ptr_guid) {
+                               NDR_PULL_ALLOC(ndr, r->guid);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->guid, _ptr_guid));
+                       } else {
+                               r->guid = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+               NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
+                       if (r->guid) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->guid));
+                               _mem_save_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->guid, 0);
+                               NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->guid));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guid_0, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_PrinterInfo7(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo7 *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_PrinterInfo7");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "guid", r->guid);
+       ndr->depth++;
+       if (r->guid) {
+               ndr_print_string(ndr, "guid", r->guid);
+       }
+       ndr->depth--;
+       ndr_print_spoolss_DsPrintAction(ndr, "action", r->action);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_spoolss_DeviceModeInfo(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DeviceModeInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->devmode) {
+                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->devmode));
+                       {
+                               struct ndr_push *_ndr_devmode;
+                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
+                               NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
+                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
+                       }
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_spoolss_DeviceModeInfo(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceModeInfo *r)
+{
+       uint32_t _ptr_devmode;
+       TALLOC_CTX *_mem_save_devmode_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
+               if (_ptr_devmode) {
+                       NDR_PULL_ALLOC(ndr, r->devmode);
+                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
+               } else {
+                       r->devmode = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->devmode) {
+                       uint32_t _relative_save_offset;
+                       _relative_save_offset = ndr->offset;
+                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
+                       _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
+                       {
+                               struct ndr_pull *_ndr_devmode;
+                               NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
+                               NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
+                               NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
+                       ndr->offset = _relative_save_offset;
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_DeviceModeInfo(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceModeInfo *r)
+{
+       ndr_print_struct(ndr, name, "spoolss_DeviceModeInfo");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "devmode", r->devmode);
+       ndr->depth++;
+       if (r->devmode) {
+               ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrinterInfo *r)
+{
+       uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case 0: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
+                       break; }
+
+                       case 1: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
+                       break; }
+
+                       case 2: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
+                       break; }
+
+                       case 3: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
+                       break; }
+
+                       case 4: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4));
+                       break; }
+
+                       case 5: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5));
+                       break; }
+
+                       case 6: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6));
+                       break; }
+
+                       case 7: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7));
+                       break; }
+
+                       case 8: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info8));
+                       break; }
+
+                       case 9: {
+                               NDR_CHECK(ndr_push_align(ndr, 4));
+                               NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info9));
+                       break; }
+
+                       default: {
+                       break; }
+
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
+               switch (level) {
+                       case 0:
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_BUFFERS, &r->info0));
+                       break;
+
+                       case 1:
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1));
+                       break;
+
+                       case 2:
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2));
+                       break;
+
+                       case 3:
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3));
+                       break;
+
+                       case 4:
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4));
+                       break;
+
+                       case 5:
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5));
+                       break;
+
+                       case 6:
+                       break;
+
+                       case 7:
+                               NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7));
+                       break;
+
+                       case 8:
+                               NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info8));
+                       break;
+
+                       case 9:
+                               NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info9));
+                       break;
+
+                       default:
+                       break;
+
+               }
+       }
+       ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrinterInfo *r)
+{
+       uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
+       int level;
+       level = ndr_pull_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               switch (level) {
+                       case 0: {
+                               NDR_CHECK(ndr_pull_align(ndr, 4));
+                               NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
+                       break; }
+
+                       case 1: {
+                               NDR_CHECK(ndr_pull_align(ndr, 4));
+                               NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
+                       break; }
+
+                       case 2: {
+                               NDR_CHECK(ndr_pull_align(ndr, 4));
+                               NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
+                       break; }
+
+                       case 3: {
+                               NDR_CHECK(ndr_pull_align(ndr, 4));
+                               NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
+                       break; }
+
+                       case 4: {
+                               NDR_CHECK(ndr_pull_align(ndr, 4));
+                               NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
+                               NDR_CHECK(ndr_pull_spools