root/librpc/gen_ndr/cli_spoolss.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. rpccli_spoolss_EnumPrinters
  2. rpccli_spoolss_OpenPrinter
  3. rpccli_spoolss_SetJob
  4. rpccli_spoolss_GetJob
  5. rpccli_spoolss_EnumJobs
  6. rpccli_spoolss_AddPrinter
  7. rpccli_spoolss_DeletePrinter
  8. rpccli_spoolss_SetPrinter
  9. rpccli_spoolss_GetPrinter
  10. rpccli_spoolss_AddPrinterDriver
  11. rpccli_spoolss_EnumPrinterDrivers
  12. rpccli_spoolss_GetPrinterDriver
  13. rpccli_spoolss_GetPrinterDriverDirectory
  14. rpccli_spoolss_DeletePrinterDriver
  15. rpccli_spoolss_AddPrintProcessor
  16. rpccli_spoolss_EnumPrintProcessors
  17. rpccli_spoolss_GetPrintProcessorDirectory
  18. rpccli_spoolss_StartDocPrinter
  19. rpccli_spoolss_StartPagePrinter
  20. rpccli_spoolss_WritePrinter
  21. rpccli_spoolss_EndPagePrinter
  22. rpccli_spoolss_AbortPrinter
  23. rpccli_spoolss_ReadPrinter
  24. rpccli_spoolss_EndDocPrinter
  25. rpccli_spoolss_AddJob
  26. rpccli_spoolss_ScheduleJob
  27. rpccli_spoolss_GetPrinterData
  28. rpccli_spoolss_SetPrinterData
  29. rpccli_spoolss_WaitForPrinterChange
  30. rpccli_spoolss_ClosePrinter
  31. rpccli_spoolss_AddForm
  32. rpccli_spoolss_DeleteForm
  33. rpccli_spoolss_GetForm
  34. rpccli_spoolss_SetForm
  35. rpccli_spoolss_EnumForms
  36. rpccli_spoolss_EnumPorts
  37. rpccli_spoolss_EnumMonitors
  38. rpccli_spoolss_AddPort
  39. rpccli_spoolss_ConfigurePort
  40. rpccli_spoolss_DeletePort
  41. rpccli_spoolss_CreatePrinterIC
  42. rpccli_spoolss_PlayGDIScriptOnPrinterIC
  43. rpccli_spoolss_DeletePrinterIC
  44. rpccli_spoolss_AddPrinterConnection
  45. rpccli_spoolss_DeletePrinterConnection
  46. rpccli_spoolss_PrinterMessageBox
  47. rpccli_spoolss_AddMonitor
  48. rpccli_spoolss_DeleteMonitor
  49. rpccli_spoolss_DeletePrintProcessor
  50. rpccli_spoolss_AddPrintProvidor
  51. rpccli_spoolss_DeletePrintProvidor
  52. rpccli_spoolss_EnumPrintProcDataTypes
  53. rpccli_spoolss_ResetPrinter
  54. rpccli_spoolss_GetPrinterDriver2
  55. rpccli_spoolss_FindFirstPrinterChangeNotification
  56. rpccli_spoolss_FindNextPrinterChangeNotification
  57. rpccli_spoolss_FindClosePrinterNotify
  58. rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld
  59. rpccli_spoolss_ReplyOpenPrinter
  60. rpccli_spoolss_RouterReplyPrinter
  61. rpccli_spoolss_ReplyClosePrinter
  62. rpccli_spoolss_AddPortEx
  63. rpccli_spoolss_RouterFindFirstPrinterChangeNotification
  64. rpccli_spoolss_SpoolerInit
  65. rpccli_spoolss_ResetPrinterEx
  66. rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx
  67. rpccli_spoolss_RouterReplyPrinterEx
  68. rpccli_spoolss_RouterRefreshPrinterChangeNotify
  69. rpccli_spoolss_44
  70. rpccli_spoolss_OpenPrinterEx
  71. rpccli_spoolss_AddPrinterEx
  72. rpccli_spoolss_47
  73. rpccli_spoolss_EnumPrinterData
  74. rpccli_spoolss_DeletePrinterData
  75. rpccli_spoolss_4a
  76. rpccli_spoolss_4b
  77. rpccli_spoolss_4c
  78. rpccli_spoolss_SetPrinterDataEx
  79. rpccli_spoolss_GetPrinterDataEx
  80. rpccli_spoolss_EnumPrinterDataEx
  81. rpccli_spoolss_EnumPrinterKey
  82. rpccli_spoolss_DeletePrinterDataEx
  83. rpccli_spoolss_DeletePrinterKey
  84. rpccli_spoolss_53
  85. rpccli_spoolss_DeletePrinterDriverEx
  86. rpccli_spoolss_55
  87. rpccli_spoolss_56
  88. rpccli_spoolss_57
  89. rpccli_spoolss_XcvData
  90. rpccli_spoolss_AddPrinterDriverEx
  91. rpccli_spoolss_5a
  92. rpccli_spoolss_5b
  93. rpccli_spoolss_5c
  94. rpccli_spoolss_5d
  95. rpccli_spoolss_5e
  96. rpccli_spoolss_5f

   1 /*
   2  * Unix SMB/CIFS implementation.
   3  * client auto-generated by pidl. DO NOT MODIFY!
   4  */
   5 
   6 #include "includes.h"
   7 #include "../librpc/gen_ndr/cli_spoolss.h"
   8 
   9 NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
  10                                      TALLOC_CTX *mem_ctx,
  11                                      uint32_t flags /* [in]  */,
  12                                      const char *server /* [in] [unique,charset(UTF16)] */,
  13                                      uint32_t level /* [in]  */,
  14                                      DATA_BLOB *buffer /* [in] [unique] */,
  15                                      uint32_t offered /* [in]  */,
  16                                      uint32_t *count /* [out] [ref] */,
  17                                      union spoolss_PrinterInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
  18                                      uint32_t *needed /* [out] [ref] */,
  19                                      WERROR *werror)
  20 {
  21         struct spoolss_EnumPrinters r;
  22         NTSTATUS status;
  23 
  24         /* In parameters */
  25         r.in.flags = flags;
  26         r.in.server = server;
  27         r.in.level = level;
  28         r.in.buffer = buffer;
  29         r.in.offered = offered;
  30 
  31         if (DEBUGLEVEL >= 10) {
  32                 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, &r);
  33         }
  34 
  35         status = cli->dispatch(cli,
  36                                 mem_ctx,
  37                                 &ndr_table_spoolss,
  38                                 NDR_SPOOLSS_ENUMPRINTERS,
  39                                 &r);
  40 
  41         if (!NT_STATUS_IS_OK(status)) {
  42                 return status;
  43         }
  44 
  45         if (DEBUGLEVEL >= 10) {
  46                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, &r);
  47         }
  48 
  49         if (NT_STATUS_IS_ERR(status)) {
  50                 return status;
  51         }
  52 
  53         /* Return variables */
  54         *count = *r.out.count;
  55         *info = *r.out.info;
  56         *needed = *r.out.needed;
  57 
  58         /* Return result */
  59         if (werror) {
  60                 *werror = r.out.result;
  61         }
  62 
  63         return werror_to_ntstatus(r.out.result);
  64 }
  65 
  66 NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
  67                                     TALLOC_CTX *mem_ctx,
  68                                     const char *printername /* [in] [unique,charset(UTF16)] */,
  69                                     const char *datatype /* [in] [unique,charset(UTF16)] */,
  70                                     struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
  71                                     uint32_t access_mask /* [in]  */,
  72                                     struct policy_handle *handle /* [out] [ref] */,
  73                                     WERROR *werror)
  74 {
  75         struct spoolss_OpenPrinter r;
  76         NTSTATUS status;
  77 
  78         /* In parameters */
  79         r.in.printername = printername;
  80         r.in.datatype = datatype;
  81         r.in.devmode_ctr = devmode_ctr;
  82         r.in.access_mask = access_mask;
  83 
  84         if (DEBUGLEVEL >= 10) {
  85                 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, &r);
  86         }
  87 
  88         status = cli->dispatch(cli,
  89                                 mem_ctx,
  90                                 &ndr_table_spoolss,
  91                                 NDR_SPOOLSS_OPENPRINTER,
  92                                 &r);
  93 
  94         if (!NT_STATUS_IS_OK(status)) {
  95                 return status;
  96         }
  97 
  98         if (DEBUGLEVEL >= 10) {
  99                 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, &r);
 100         }
 101 
 102         if (NT_STATUS_IS_ERR(status)) {
 103                 return status;
 104         }
 105 
 106         /* Return variables */
 107         *handle = *r.out.handle;
 108 
 109         /* Return result */
 110         if (werror) {
 111                 *werror = r.out.result;
 112         }
 113 
 114         return werror_to_ntstatus(r.out.result);
 115 }
 116 
 117 NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 118                                TALLOC_CTX *mem_ctx,
 119                                struct policy_handle *handle /* [in] [ref] */,
 120                                uint32_t job_id /* [in]  */,
 121                                struct spoolss_JobInfoContainer *ctr /* [in] [unique] */,
 122                                enum spoolss_JobControl command /* [in]  */,
 123                                WERROR *werror)
 124 {
 125         struct spoolss_SetJob r;
 126         NTSTATUS status;
 127 
 128         /* In parameters */
 129         r.in.handle = handle;
 130         r.in.job_id = job_id;
 131         r.in.ctr = ctr;
 132         r.in.command = command;
 133 
 134         if (DEBUGLEVEL >= 10) {
 135                 NDR_PRINT_IN_DEBUG(spoolss_SetJob, &r);
 136         }
 137 
 138         status = cli->dispatch(cli,
 139                                 mem_ctx,
 140                                 &ndr_table_spoolss,
 141                                 NDR_SPOOLSS_SETJOB,
 142                                 &r);
 143 
 144         if (!NT_STATUS_IS_OK(status)) {
 145                 return status;
 146         }
 147 
 148         if (DEBUGLEVEL >= 10) {
 149                 NDR_PRINT_OUT_DEBUG(spoolss_SetJob, &r);
 150         }
 151 
 152         if (NT_STATUS_IS_ERR(status)) {
 153                 return status;
 154         }
 155 
 156         /* Return variables */
 157 
 158         /* Return result */
 159         if (werror) {
 160                 *werror = r.out.result;
 161         }
 162 
 163         return werror_to_ntstatus(r.out.result);
 164 }
 165 
 166 NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 167                                TALLOC_CTX *mem_ctx,
 168                                struct policy_handle *handle /* [in] [ref] */,
 169                                uint32_t job_id /* [in]  */,
 170                                uint32_t level /* [in]  */,
 171                                DATA_BLOB *buffer /* [in] [unique] */,
 172                                uint32_t offered /* [in]  */,
 173                                union spoolss_JobInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
 174                                uint32_t *needed /* [out] [ref] */,
 175                                WERROR *werror)
 176 {
 177         struct spoolss_GetJob r;
 178         NTSTATUS status;
 179 
 180         /* In parameters */
 181         r.in.handle = handle;
 182         r.in.job_id = job_id;
 183         r.in.level = level;
 184         r.in.buffer = buffer;
 185         r.in.offered = offered;
 186 
 187         if (DEBUGLEVEL >= 10) {
 188                 NDR_PRINT_IN_DEBUG(spoolss_GetJob, &r);
 189         }
 190 
 191         status = cli->dispatch(cli,
 192                                 mem_ctx,
 193                                 &ndr_table_spoolss,
 194                                 NDR_SPOOLSS_GETJOB,
 195                                 &r);
 196 
 197         if (!NT_STATUS_IS_OK(status)) {
 198                 return status;
 199         }
 200 
 201         if (DEBUGLEVEL >= 10) {
 202                 NDR_PRINT_OUT_DEBUG(spoolss_GetJob, &r);
 203         }
 204 
 205         if (NT_STATUS_IS_ERR(status)) {
 206                 return status;
 207         }
 208 
 209         /* Return variables */
 210         if (info && r.out.info) {
 211                 *info = *r.out.info;
 212         }
 213         *needed = *r.out.needed;
 214 
 215         /* Return result */
 216         if (werror) {
 217                 *werror = r.out.result;
 218         }
 219 
 220         return werror_to_ntstatus(r.out.result);
 221 }
 222 
 223 NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 224                                  TALLOC_CTX *mem_ctx,
 225                                  struct policy_handle *handle /* [in] [ref] */,
 226                                  uint32_t firstjob /* [in]  */,
 227                                  uint32_t numjobs /* [in]  */,
 228                                  uint32_t level /* [in]  */,
 229                                  DATA_BLOB *buffer /* [in] [unique] */,
 230                                  uint32_t offered /* [in]  */,
 231                                  uint32_t *count /* [out] [ref] */,
 232                                  union spoolss_JobInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
 233                                  uint32_t *needed /* [out] [ref] */,
 234                                  WERROR *werror)
 235 {
 236         struct spoolss_EnumJobs r;
 237         NTSTATUS status;
 238 
 239         /* In parameters */
 240         r.in.handle = handle;
 241         r.in.firstjob = firstjob;
 242         r.in.numjobs = numjobs;
 243         r.in.level = level;
 244         r.in.buffer = buffer;
 245         r.in.offered = offered;
 246 
 247         if (DEBUGLEVEL >= 10) {
 248                 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, &r);
 249         }
 250 
 251         status = cli->dispatch(cli,
 252                                 mem_ctx,
 253                                 &ndr_table_spoolss,
 254                                 NDR_SPOOLSS_ENUMJOBS,
 255                                 &r);
 256 
 257         if (!NT_STATUS_IS_OK(status)) {
 258                 return status;
 259         }
 260 
 261         if (DEBUGLEVEL >= 10) {
 262                 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, &r);
 263         }
 264 
 265         if (NT_STATUS_IS_ERR(status)) {
 266                 return status;
 267         }
 268 
 269         /* Return variables */
 270         *count = *r.out.count;
 271         *info = *r.out.info;
 272         *needed = *r.out.needed;
 273 
 274         /* Return result */
 275         if (werror) {
 276                 *werror = r.out.result;
 277         }
 278 
 279         return werror_to_ntstatus(r.out.result);
 280 }
 281 
 282 NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 283                                    TALLOC_CTX *mem_ctx,
 284                                    WERROR *werror)
 285 {
 286         struct spoolss_AddPrinter r;
 287         NTSTATUS status;
 288 
 289         /* In parameters */
 290 
 291         if (DEBUGLEVEL >= 10) {
 292                 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, &r);
 293         }
 294 
 295         status = cli->dispatch(cli,
 296                                 mem_ctx,
 297                                 &ndr_table_spoolss,
 298                                 NDR_SPOOLSS_ADDPRINTER,
 299                                 &r);
 300 
 301         if (!NT_STATUS_IS_OK(status)) {
 302                 return status;
 303         }
 304 
 305         if (DEBUGLEVEL >= 10) {
 306                 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, &r);
 307         }
 308 
 309         if (NT_STATUS_IS_ERR(status)) {
 310                 return status;
 311         }
 312 
 313         /* Return variables */
 314 
 315         /* Return result */
 316         if (werror) {
 317                 *werror = r.out.result;
 318         }
 319 
 320         return werror_to_ntstatus(r.out.result);
 321 }
 322 
 323 NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 324                                       TALLOC_CTX *mem_ctx,
 325                                       struct policy_handle *handle /* [in] [ref] */,
 326                                       WERROR *werror)
 327 {
 328         struct spoolss_DeletePrinter r;
 329         NTSTATUS status;
 330 
 331         /* In parameters */
 332         r.in.handle = handle;
 333 
 334         if (DEBUGLEVEL >= 10) {
 335                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, &r);
 336         }
 337 
 338         status = cli->dispatch(cli,
 339                                 mem_ctx,
 340                                 &ndr_table_spoolss,
 341                                 NDR_SPOOLSS_DELETEPRINTER,
 342                                 &r);
 343 
 344         if (!NT_STATUS_IS_OK(status)) {
 345                 return status;
 346         }
 347 
 348         if (DEBUGLEVEL >= 10) {
 349                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, &r);
 350         }
 351 
 352         if (NT_STATUS_IS_ERR(status)) {
 353                 return status;
 354         }
 355 
 356         /* Return variables */
 357 
 358         /* Return result */
 359         if (werror) {
 360                 *werror = r.out.result;
 361         }
 362 
 363         return werror_to_ntstatus(r.out.result);
 364 }
 365 
 366 NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 367                                    TALLOC_CTX *mem_ctx,
 368                                    struct policy_handle *handle /* [in] [ref] */,
 369                                    struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
 370                                    struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
 371                                    struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
 372                                    enum spoolss_PrinterControl command /* [in]  */,
 373                                    WERROR *werror)
 374 {
 375         struct spoolss_SetPrinter r;
 376         NTSTATUS status;
 377 
 378         /* In parameters */
 379         r.in.handle = handle;
 380         r.in.info_ctr = info_ctr;
 381         r.in.devmode_ctr = devmode_ctr;
 382         r.in.secdesc_ctr = secdesc_ctr;
 383         r.in.command = command;
 384 
 385         if (DEBUGLEVEL >= 10) {
 386                 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, &r);
 387         }
 388 
 389         status = cli->dispatch(cli,
 390                                 mem_ctx,
 391                                 &ndr_table_spoolss,
 392                                 NDR_SPOOLSS_SETPRINTER,
 393                                 &r);
 394 
 395         if (!NT_STATUS_IS_OK(status)) {
 396                 return status;
 397         }
 398 
 399         if (DEBUGLEVEL >= 10) {
 400                 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, &r);
 401         }
 402 
 403         if (NT_STATUS_IS_ERR(status)) {
 404                 return status;
 405         }
 406 
 407         /* Return variables */
 408 
 409         /* Return result */
 410         if (werror) {
 411                 *werror = r.out.result;
 412         }
 413 
 414         return werror_to_ntstatus(r.out.result);
 415 }
 416 
 417 NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 418                                    TALLOC_CTX *mem_ctx,
 419                                    struct policy_handle *handle /* [in] [ref] */,
 420                                    uint32_t level /* [in]  */,
 421                                    DATA_BLOB *buffer /* [in] [unique] */,
 422                                    uint32_t offered /* [in]  */,
 423                                    union spoolss_PrinterInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
 424                                    uint32_t *needed /* [out] [ref] */,
 425                                    WERROR *werror)
 426 {
 427         struct spoolss_GetPrinter r;
 428         NTSTATUS status;
 429 
 430         /* In parameters */
 431         r.in.handle = handle;
 432         r.in.level = level;
 433         r.in.buffer = buffer;
 434         r.in.offered = offered;
 435 
 436         if (DEBUGLEVEL >= 10) {
 437                 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, &r);
 438         }
 439 
 440         status = cli->dispatch(cli,
 441                                 mem_ctx,
 442                                 &ndr_table_spoolss,
 443                                 NDR_SPOOLSS_GETPRINTER,
 444                                 &r);
 445 
 446         if (!NT_STATUS_IS_OK(status)) {
 447                 return status;
 448         }
 449 
 450         if (DEBUGLEVEL >= 10) {
 451                 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, &r);
 452         }
 453 
 454         if (NT_STATUS_IS_ERR(status)) {
 455                 return status;
 456         }
 457 
 458         /* Return variables */
 459         if (info && r.out.info) {
 460                 *info = *r.out.info;
 461         }
 462         *needed = *r.out.needed;
 463 
 464         /* Return result */
 465         if (werror) {
 466                 *werror = r.out.result;
 467         }
 468 
 469         return werror_to_ntstatus(r.out.result);
 470 }
 471 
 472 NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 473                                          TALLOC_CTX *mem_ctx,
 474                                          const char *servername /* [in] [unique,charset(UTF16)] */,
 475                                          struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
 476                                          WERROR *werror)
 477 {
 478         struct spoolss_AddPrinterDriver r;
 479         NTSTATUS status;
 480 
 481         /* In parameters */
 482         r.in.servername = servername;
 483         r.in.info_ctr = info_ctr;
 484 
 485         if (DEBUGLEVEL >= 10) {
 486                 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, &r);
 487         }
 488 
 489         status = cli->dispatch(cli,
 490                                 mem_ctx,
 491                                 &ndr_table_spoolss,
 492                                 NDR_SPOOLSS_ADDPRINTERDRIVER,
 493                                 &r);
 494 
 495         if (!NT_STATUS_IS_OK(status)) {
 496                 return status;
 497         }
 498 
 499         if (DEBUGLEVEL >= 10) {
 500                 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, &r);
 501         }
 502 
 503         if (NT_STATUS_IS_ERR(status)) {
 504                 return status;
 505         }
 506 
 507         /* Return variables */
 508 
 509         /* Return result */
 510         if (werror) {
 511                 *werror = r.out.result;
 512         }
 513 
 514         return werror_to_ntstatus(r.out.result);
 515 }
 516 
 517 NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 518                                            TALLOC_CTX *mem_ctx,
 519                                            const char *server /* [in] [unique,charset(UTF16)] */,
 520                                            const char *environment /* [in] [unique,charset(UTF16)] */,
 521                                            uint32_t level /* [in]  */,
 522                                            DATA_BLOB *buffer /* [in] [unique] */,
 523                                            uint32_t offered /* [in]  */,
 524                                            uint32_t *count /* [out] [ref] */,
 525                                            union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
 526                                            uint32_t *needed /* [out] [ref] */,
 527                                            WERROR *werror)
 528 {
 529         struct spoolss_EnumPrinterDrivers r;
 530         NTSTATUS status;
 531 
 532         /* In parameters */
 533         r.in.server = server;
 534         r.in.environment = environment;
 535         r.in.level = level;
 536         r.in.buffer = buffer;
 537         r.in.offered = offered;
 538 
 539         if (DEBUGLEVEL >= 10) {
 540                 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, &r);
 541         }
 542 
 543         status = cli->dispatch(cli,
 544                                 mem_ctx,
 545                                 &ndr_table_spoolss,
 546                                 NDR_SPOOLSS_ENUMPRINTERDRIVERS,
 547                                 &r);
 548 
 549         if (!NT_STATUS_IS_OK(status)) {
 550                 return status;
 551         }
 552 
 553         if (DEBUGLEVEL >= 10) {
 554                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, &r);
 555         }
 556 
 557         if (NT_STATUS_IS_ERR(status)) {
 558                 return status;
 559         }
 560 
 561         /* Return variables */
 562         *count = *r.out.count;
 563         *info = *r.out.info;
 564         *needed = *r.out.needed;
 565 
 566         /* Return result */
 567         if (werror) {
 568                 *werror = r.out.result;
 569         }
 570 
 571         return werror_to_ntstatus(r.out.result);
 572 }
 573 
 574 NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 575                                          TALLOC_CTX *mem_ctx,
 576                                          WERROR *werror)
 577 {
 578         struct spoolss_GetPrinterDriver r;
 579         NTSTATUS status;
 580 
 581         /* In parameters */
 582 
 583         if (DEBUGLEVEL >= 10) {
 584                 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &r);
 585         }
 586 
 587         status = cli->dispatch(cli,
 588                                 mem_ctx,
 589                                 &ndr_table_spoolss,
 590                                 NDR_SPOOLSS_GETPRINTERDRIVER,
 591                                 &r);
 592 
 593         if (!NT_STATUS_IS_OK(status)) {
 594                 return status;
 595         }
 596 
 597         if (DEBUGLEVEL >= 10) {
 598                 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &r);
 599         }
 600 
 601         if (NT_STATUS_IS_ERR(status)) {
 602                 return status;
 603         }
 604 
 605         /* Return variables */
 606 
 607         /* Return result */
 608         if (werror) {
 609                 *werror = r.out.result;
 610         }
 611 
 612         return werror_to_ntstatus(r.out.result);
 613 }
 614 
 615 NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 616                                                   TALLOC_CTX *mem_ctx,
 617                                                   const char *server /* [in] [unique,charset(UTF16)] */,
 618                                                   const char *environment /* [in] [unique,charset(UTF16)] */,
 619                                                   uint32_t level /* [in]  */,
 620                                                   DATA_BLOB *buffer /* [in] [unique] */,
 621                                                   uint32_t offered /* [in]  */,
 622                                                   union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
 623                                                   uint32_t *needed /* [out] [ref] */,
 624                                                   WERROR *werror)
 625 {
 626         struct spoolss_GetPrinterDriverDirectory r;
 627         NTSTATUS status;
 628 
 629         /* In parameters */
 630         r.in.server = server;
 631         r.in.environment = environment;
 632         r.in.level = level;
 633         r.in.buffer = buffer;
 634         r.in.offered = offered;
 635 
 636         if (DEBUGLEVEL >= 10) {
 637                 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
 638         }
 639 
 640         status = cli->dispatch(cli,
 641                                 mem_ctx,
 642                                 &ndr_table_spoolss,
 643                                 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY,
 644                                 &r);
 645 
 646         if (!NT_STATUS_IS_OK(status)) {
 647                 return status;
 648         }
 649 
 650         if (DEBUGLEVEL >= 10) {
 651                 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
 652         }
 653 
 654         if (NT_STATUS_IS_ERR(status)) {
 655                 return status;
 656         }
 657 
 658         /* Return variables */
 659         if (info && r.out.info) {
 660                 *info = *r.out.info;
 661         }
 662         *needed = *r.out.needed;
 663 
 664         /* Return result */
 665         if (werror) {
 666                 *werror = r.out.result;
 667         }
 668 
 669         return werror_to_ntstatus(r.out.result);
 670 }
 671 
 672 NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 673                                             TALLOC_CTX *mem_ctx,
 674                                             const char *server /* [in] [unique,charset(UTF16)] */,
 675                                             const char *architecture /* [in] [charset(UTF16)] */,
 676                                             const char *driver /* [in] [charset(UTF16)] */,
 677                                             WERROR *werror)
 678 {
 679         struct spoolss_DeletePrinterDriver r;
 680         NTSTATUS status;
 681 
 682         /* In parameters */
 683         r.in.server = server;
 684         r.in.architecture = architecture;
 685         r.in.driver = driver;
 686 
 687         if (DEBUGLEVEL >= 10) {
 688                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &r);
 689         }
 690 
 691         status = cli->dispatch(cli,
 692                                 mem_ctx,
 693                                 &ndr_table_spoolss,
 694                                 NDR_SPOOLSS_DELETEPRINTERDRIVER,
 695                                 &r);
 696 
 697         if (!NT_STATUS_IS_OK(status)) {
 698                 return status;
 699         }
 700 
 701         if (DEBUGLEVEL >= 10) {
 702                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &r);
 703         }
 704 
 705         if (NT_STATUS_IS_ERR(status)) {
 706                 return status;
 707         }
 708 
 709         /* Return variables */
 710 
 711         /* Return result */
 712         if (werror) {
 713                 *werror = r.out.result;
 714         }
 715 
 716         return werror_to_ntstatus(r.out.result);
 717 }
 718 
 719 NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 720                                           TALLOC_CTX *mem_ctx,
 721                                           const char *server /* [in] [unique,charset(UTF16)] */,
 722                                           const char *architecture /* [in] [charset(UTF16)] */,
 723                                           const char *path_name /* [in] [charset(UTF16)] */,
 724                                           const char *print_processor_name /* [in] [charset(UTF16)] */,
 725                                           WERROR *werror)
 726 {
 727         struct spoolss_AddPrintProcessor r;
 728         NTSTATUS status;
 729 
 730         /* In parameters */
 731         r.in.server = server;
 732         r.in.architecture = architecture;
 733         r.in.path_name = path_name;
 734         r.in.print_processor_name = print_processor_name;
 735 
 736         if (DEBUGLEVEL >= 10) {
 737                 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &r);
 738         }
 739 
 740         status = cli->dispatch(cli,
 741                                 mem_ctx,
 742                                 &ndr_table_spoolss,
 743                                 NDR_SPOOLSS_ADDPRINTPROCESSOR,
 744                                 &r);
 745 
 746         if (!NT_STATUS_IS_OK(status)) {
 747                 return status;
 748         }
 749 
 750         if (DEBUGLEVEL >= 10) {
 751                 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &r);
 752         }
 753 
 754         if (NT_STATUS_IS_ERR(status)) {
 755                 return status;
 756         }
 757 
 758         /* Return variables */
 759 
 760         /* Return result */
 761         if (werror) {
 762                 *werror = r.out.result;
 763         }
 764 
 765         return werror_to_ntstatus(r.out.result);
 766 }
 767 
 768 NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 769                                             TALLOC_CTX *mem_ctx,
 770                                             const char *servername /* [in] [unique,charset(UTF16)] */,
 771                                             const char *environment /* [in] [unique,charset(UTF16)] */,
 772                                             uint32_t level /* [in]  */,
 773                                             DATA_BLOB *buffer /* [in] [unique] */,
 774                                             uint32_t offered /* [in]  */,
 775                                             uint32_t *count /* [out] [ref] */,
 776                                             union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
 777                                             uint32_t *needed /* [out] [ref] */,
 778                                             WERROR *werror)
 779 {
 780         struct spoolss_EnumPrintProcessors r;
 781         NTSTATUS status;
 782 
 783         /* In parameters */
 784         r.in.servername = servername;
 785         r.in.environment = environment;
 786         r.in.level = level;
 787         r.in.buffer = buffer;
 788         r.in.offered = offered;
 789 
 790         if (DEBUGLEVEL >= 10) {
 791                 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &r);
 792         }
 793 
 794         status = cli->dispatch(cli,
 795                                 mem_ctx,
 796                                 &ndr_table_spoolss,
 797                                 NDR_SPOOLSS_ENUMPRINTPROCESSORS,
 798                                 &r);
 799 
 800         if (!NT_STATUS_IS_OK(status)) {
 801                 return status;
 802         }
 803 
 804         if (DEBUGLEVEL >= 10) {
 805                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &r);
 806         }
 807 
 808         if (NT_STATUS_IS_ERR(status)) {
 809                 return status;
 810         }
 811 
 812         /* Return variables */
 813         *count = *r.out.count;
 814         *info = *r.out.info;
 815         *needed = *r.out.needed;
 816 
 817         /* Return result */
 818         if (werror) {
 819                 *werror = r.out.result;
 820         }
 821 
 822         return werror_to_ntstatus(r.out.result);
 823 }
 824 
 825 NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 826                                                    TALLOC_CTX *mem_ctx,
 827                                                    const char *server /* [in] [unique,charset(UTF16)] */,
 828                                                    const char *environment /* [in] [unique,charset(UTF16)] */,
 829                                                    uint32_t level /* [in]  */,
 830                                                    DATA_BLOB *buffer /* [in] [unique] */,
 831                                                    uint32_t offered /* [in]  */,
 832                                                    union spoolss_PrintProcessorDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
 833                                                    uint32_t *needed /* [out] [ref] */,
 834                                                    WERROR *werror)
 835 {
 836         struct spoolss_GetPrintProcessorDirectory r;
 837         NTSTATUS status;
 838 
 839         /* In parameters */
 840         r.in.server = server;
 841         r.in.environment = environment;
 842         r.in.level = level;
 843         r.in.buffer = buffer;
 844         r.in.offered = offered;
 845 
 846         if (DEBUGLEVEL >= 10) {
 847                 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
 848         }
 849 
 850         status = cli->dispatch(cli,
 851                                 mem_ctx,
 852                                 &ndr_table_spoolss,
 853                                 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY,
 854                                 &r);
 855 
 856         if (!NT_STATUS_IS_OK(status)) {
 857                 return status;
 858         }
 859 
 860         if (DEBUGLEVEL >= 10) {
 861                 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
 862         }
 863 
 864         if (NT_STATUS_IS_ERR(status)) {
 865                 return status;
 866         }
 867 
 868         /* Return variables */
 869         if (info && r.out.info) {
 870                 *info = *r.out.info;
 871         }
 872         *needed = *r.out.needed;
 873 
 874         /* Return result */
 875         if (werror) {
 876                 *werror = r.out.result;
 877         }
 878 
 879         return werror_to_ntstatus(r.out.result);
 880 }
 881 
 882 NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 883                                         TALLOC_CTX *mem_ctx,
 884                                         struct policy_handle *handle /* [in] [ref] */,
 885                                         uint32_t level /* [in]  */,
 886                                         union spoolss_DocumentInfo info /* [in] [switch_is(level)] */,
 887                                         uint32_t *job_id /* [out] [ref] */,
 888                                         WERROR *werror)
 889 {
 890         struct spoolss_StartDocPrinter r;
 891         NTSTATUS status;
 892 
 893         /* In parameters */
 894         r.in.handle = handle;
 895         r.in.level = level;
 896         r.in.info = info;
 897 
 898         if (DEBUGLEVEL >= 10) {
 899                 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &r);
 900         }
 901 
 902         status = cli->dispatch(cli,
 903                                 mem_ctx,
 904                                 &ndr_table_spoolss,
 905                                 NDR_SPOOLSS_STARTDOCPRINTER,
 906                                 &r);
 907 
 908         if (!NT_STATUS_IS_OK(status)) {
 909                 return status;
 910         }
 911 
 912         if (DEBUGLEVEL >= 10) {
 913                 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &r);
 914         }
 915 
 916         if (NT_STATUS_IS_ERR(status)) {
 917                 return status;
 918         }
 919 
 920         /* Return variables */
 921         *job_id = *r.out.job_id;
 922 
 923         /* Return result */
 924         if (werror) {
 925                 *werror = r.out.result;
 926         }
 927 
 928         return werror_to_ntstatus(r.out.result);
 929 }
 930 
 931 NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 932                                          TALLOC_CTX *mem_ctx,
 933                                          struct policy_handle *handle /* [in] [ref] */,
 934                                          WERROR *werror)
 935 {
 936         struct spoolss_StartPagePrinter r;
 937         NTSTATUS status;
 938 
 939         /* In parameters */
 940         r.in.handle = handle;
 941 
 942         if (DEBUGLEVEL >= 10) {
 943                 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &r);
 944         }
 945 
 946         status = cli->dispatch(cli,
 947                                 mem_ctx,
 948                                 &ndr_table_spoolss,
 949                                 NDR_SPOOLSS_STARTPAGEPRINTER,
 950                                 &r);
 951 
 952         if (!NT_STATUS_IS_OK(status)) {
 953                 return status;
 954         }
 955 
 956         if (DEBUGLEVEL >= 10) {
 957                 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &r);
 958         }
 959 
 960         if (NT_STATUS_IS_ERR(status)) {
 961                 return status;
 962         }
 963 
 964         /* Return variables */
 965 
 966         /* Return result */
 967         if (werror) {
 968                 *werror = r.out.result;
 969         }
 970 
 971         return werror_to_ntstatus(r.out.result);
 972 }
 973 
 974 NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
 975                                      TALLOC_CTX *mem_ctx,
 976                                      struct policy_handle *handle /* [in] [ref] */,
 977                                      DATA_BLOB data /* [in]  */,
 978                                      uint32_t _data_size /* [in] [value(r->in.data.length)] */,
 979                                      uint32_t *num_written /* [out] [ref] */,
 980                                      WERROR *werror)
 981 {
 982         struct spoolss_WritePrinter r;
 983         NTSTATUS status;
 984 
 985         /* In parameters */
 986         r.in.handle = handle;
 987         r.in.data = data;
 988         r.in._data_size = _data_size;
 989 
 990         if (DEBUGLEVEL >= 10) {
 991                 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &r);
 992         }
 993 
 994         status = cli->dispatch(cli,
 995                                 mem_ctx,
 996                                 &ndr_table_spoolss,
 997                                 NDR_SPOOLSS_WRITEPRINTER,
 998                                 &r);
 999 
1000         if (!NT_STATUS_IS_OK(status)) {
1001                 return status;
1002         }
1003 
1004         if (DEBUGLEVEL >= 10) {
1005                 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &r);
1006         }
1007 
1008         if (NT_STATUS_IS_ERR(status)) {
1009                 return status;
1010         }
1011 
1012         /* Return variables */
1013         *num_written = *r.out.num_written;
1014 
1015         /* Return result */
1016         if (werror) {
1017                 *werror = r.out.result;
1018         }
1019 
1020         return werror_to_ntstatus(r.out.result);
1021 }
1022 
1023 NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1024                                        TALLOC_CTX *mem_ctx,
1025                                        struct policy_handle *handle /* [in] [ref] */,
1026                                        WERROR *werror)
1027 {
1028         struct spoolss_EndPagePrinter r;
1029         NTSTATUS status;
1030 
1031         /* In parameters */
1032         r.in.handle = handle;
1033 
1034         if (DEBUGLEVEL >= 10) {
1035                 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &r);
1036         }
1037 
1038         status = cli->dispatch(cli,
1039                                 mem_ctx,
1040                                 &ndr_table_spoolss,
1041                                 NDR_SPOOLSS_ENDPAGEPRINTER,
1042                                 &r);
1043 
1044         if (!NT_STATUS_IS_OK(status)) {
1045                 return status;
1046         }
1047 
1048         if (DEBUGLEVEL >= 10) {
1049                 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &r);
1050         }
1051 
1052         if (NT_STATUS_IS_ERR(status)) {
1053                 return status;
1054         }
1055 
1056         /* Return variables */
1057 
1058         /* Return result */
1059         if (werror) {
1060                 *werror = r.out.result;
1061         }
1062 
1063         return werror_to_ntstatus(r.out.result);
1064 }
1065 
1066 NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1067                                      TALLOC_CTX *mem_ctx,
1068                                      struct policy_handle *handle /* [in] [ref] */,
1069                                      WERROR *werror)
1070 {
1071         struct spoolss_AbortPrinter r;
1072         NTSTATUS status;
1073 
1074         /* In parameters */
1075         r.in.handle = handle;
1076 
1077         if (DEBUGLEVEL >= 10) {
1078                 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &r);
1079         }
1080 
1081         status = cli->dispatch(cli,
1082                                 mem_ctx,
1083                                 &ndr_table_spoolss,
1084                                 NDR_SPOOLSS_ABORTPRINTER,
1085                                 &r);
1086 
1087         if (!NT_STATUS_IS_OK(status)) {
1088                 return status;
1089         }
1090 
1091         if (DEBUGLEVEL >= 10) {
1092                 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &r);
1093         }
1094 
1095         if (NT_STATUS_IS_ERR(status)) {
1096                 return status;
1097         }
1098 
1099         /* Return variables */
1100 
1101         /* Return result */
1102         if (werror) {
1103                 *werror = r.out.result;
1104         }
1105 
1106         return werror_to_ntstatus(r.out.result);
1107 }
1108 
1109 NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1110                                     TALLOC_CTX *mem_ctx,
1111                                     struct policy_handle *handle /* [in] [ref] */,
1112                                     uint8_t *data /* [out] [ref,size_is(data_size)] */,
1113                                     uint32_t data_size /* [in]  */,
1114                                     uint32_t *_data_size /* [out] [ref] */,
1115                                     WERROR *werror)
1116 {
1117         struct spoolss_ReadPrinter r;
1118         NTSTATUS status;
1119 
1120         /* In parameters */
1121         r.in.handle = handle;
1122         r.in.data_size = data_size;
1123 
1124         if (DEBUGLEVEL >= 10) {
1125                 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &r);
1126         }
1127 
1128         status = cli->dispatch(cli,
1129                                 mem_ctx,
1130                                 &ndr_table_spoolss,
1131                                 NDR_SPOOLSS_READPRINTER,
1132                                 &r);
1133 
1134         if (!NT_STATUS_IS_OK(status)) {
1135                 return status;
1136         }
1137 
1138         if (DEBUGLEVEL >= 10) {
1139                 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &r);
1140         }
1141 
1142         if (NT_STATUS_IS_ERR(status)) {
1143                 return status;
1144         }
1145 
1146         /* Return variables */
1147         memcpy(data, r.out.data, r.in.data_size * sizeof(*data));
1148         *_data_size = *r.out._data_size;
1149 
1150         /* Return result */
1151         if (werror) {
1152                 *werror = r.out.result;
1153         }
1154 
1155         return werror_to_ntstatus(r.out.result);
1156 }
1157 
1158 NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1159                                       TALLOC_CTX *mem_ctx,
1160                                       struct policy_handle *handle /* [in] [ref] */,
1161                                       WERROR *werror)
1162 {
1163         struct spoolss_EndDocPrinter r;
1164         NTSTATUS status;
1165 
1166         /* In parameters */
1167         r.in.handle = handle;
1168 
1169         if (DEBUGLEVEL >= 10) {
1170                 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &r);
1171         }
1172 
1173         status = cli->dispatch(cli,
1174                                 mem_ctx,
1175                                 &ndr_table_spoolss,
1176                                 NDR_SPOOLSS_ENDDOCPRINTER,
1177                                 &r);
1178 
1179         if (!NT_STATUS_IS_OK(status)) {
1180                 return status;
1181         }
1182 
1183         if (DEBUGLEVEL >= 10) {
1184                 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &r);
1185         }
1186 
1187         if (NT_STATUS_IS_ERR(status)) {
1188                 return status;
1189         }
1190 
1191         /* Return variables */
1192 
1193         /* Return result */
1194         if (werror) {
1195                 *werror = r.out.result;
1196         }
1197 
1198         return werror_to_ntstatus(r.out.result);
1199 }
1200 
1201 NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1202                                TALLOC_CTX *mem_ctx,
1203                                struct policy_handle *handle /* [in] [ref] */,
1204                                uint32_t level /* [in]  */,
1205                                uint8_t *buffer /* [in,out] [unique,size_is(offered)] */,
1206                                uint32_t offered /* [in]  */,
1207                                uint32_t *needed /* [out] [ref] */,
1208                                WERROR *werror)
1209 {
1210         struct spoolss_AddJob r;
1211         NTSTATUS status;
1212 
1213         /* In parameters */
1214         r.in.handle = handle;
1215         r.in.level = level;
1216         r.in.buffer = buffer;
1217         r.in.offered = offered;
1218 
1219         if (DEBUGLEVEL >= 10) {
1220                 NDR_PRINT_IN_DEBUG(spoolss_AddJob, &r);
1221         }
1222 
1223         status = cli->dispatch(cli,
1224                                 mem_ctx,
1225                                 &ndr_table_spoolss,
1226                                 NDR_SPOOLSS_ADDJOB,
1227                                 &r);
1228 
1229         if (!NT_STATUS_IS_OK(status)) {
1230                 return status;
1231         }
1232 
1233         if (DEBUGLEVEL >= 10) {
1234                 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &r);
1235         }
1236 
1237         if (NT_STATUS_IS_ERR(status)) {
1238                 return status;
1239         }
1240 
1241         /* Return variables */
1242         if (buffer && r.out.buffer) {
1243                 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
1244         }
1245         *needed = *r.out.needed;
1246 
1247         /* Return result */
1248         if (werror) {
1249                 *werror = r.out.result;
1250         }
1251 
1252         return werror_to_ntstatus(r.out.result);
1253 }
1254 
1255 NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1256                                     TALLOC_CTX *mem_ctx,
1257                                     struct policy_handle *handle /* [in] [ref] */,
1258                                     uint32_t jobid /* [in]  */,
1259                                     WERROR *werror)
1260 {
1261         struct spoolss_ScheduleJob r;
1262         NTSTATUS status;
1263 
1264         /* In parameters */
1265         r.in.handle = handle;
1266         r.in.jobid = jobid;
1267 
1268         if (DEBUGLEVEL >= 10) {
1269                 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &r);
1270         }
1271 
1272         status = cli->dispatch(cli,
1273                                 mem_ctx,
1274                                 &ndr_table_spoolss,
1275                                 NDR_SPOOLSS_SCHEDULEJOB,
1276                                 &r);
1277 
1278         if (!NT_STATUS_IS_OK(status)) {
1279                 return status;
1280         }
1281 
1282         if (DEBUGLEVEL >= 10) {
1283                 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &r);
1284         }
1285 
1286         if (NT_STATUS_IS_ERR(status)) {
1287                 return status;
1288         }
1289 
1290         /* Return variables */
1291 
1292         /* Return result */
1293         if (werror) {
1294                 *werror = r.out.result;
1295         }
1296 
1297         return werror_to_ntstatus(r.out.result);
1298 }
1299 
1300 NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1301                                        TALLOC_CTX *mem_ctx,
1302                                        struct policy_handle *handle /* [in] [ref] */,
1303                                        const char *value_name /* [in] [charset(UTF16)] */,
1304                                        uint32_t offered /* [in]  */,
1305                                        enum winreg_Type *type /* [out] [ref] */,
1306                                        union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
1307                                        uint32_t *needed /* [out] [ref] */,
1308                                        WERROR *werror)
1309 {
1310         struct spoolss_GetPrinterData r;
1311         NTSTATUS status;
1312 
1313         /* In parameters */
1314         r.in.handle = handle;
1315         r.in.value_name = value_name;
1316         r.in.offered = offered;
1317 
1318         if (DEBUGLEVEL >= 10) {
1319                 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &r);
1320         }
1321 
1322         status = cli->dispatch(cli,
1323                                 mem_ctx,
1324                                 &ndr_table_spoolss,
1325                                 NDR_SPOOLSS_GETPRINTERDATA,
1326                                 &r);
1327 
1328         if (!NT_STATUS_IS_OK(status)) {
1329                 return status;
1330         }
1331 
1332         if (DEBUGLEVEL >= 10) {
1333                 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &r);
1334         }
1335 
1336         if (NT_STATUS_IS_ERR(status)) {
1337                 return status;
1338         }
1339 
1340         /* Return variables */
1341         *type = *r.out.type;
1342         *data = *r.out.data;
1343         *needed = *r.out.needed;
1344 
1345         /* Return result */
1346         if (werror) {
1347                 *werror = r.out.result;
1348         }
1349 
1350         return werror_to_ntstatus(r.out.result);
1351 }
1352 
1353 NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1354                                        TALLOC_CTX *mem_ctx,
1355                                        struct policy_handle *handle /* [in] [ref] */,
1356                                        const char *value_name /* [in] [charset(UTF16)] */,
1357                                        enum winreg_Type type /* [in]  */,
1358                                        union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */,
1359                                        uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1360                                        WERROR *werror)
1361 {
1362         struct spoolss_SetPrinterData r;
1363         NTSTATUS status;
1364 
1365         /* In parameters */
1366         r.in.handle = handle;
1367         r.in.value_name = value_name;
1368         r.in.type = type;
1369         r.in.data = data;
1370         r.in._offered = _offered;
1371 
1372         if (DEBUGLEVEL >= 10) {
1373                 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &r);
1374         }
1375 
1376         status = cli->dispatch(cli,
1377                                 mem_ctx,
1378                                 &ndr_table_spoolss,
1379                                 NDR_SPOOLSS_SETPRINTERDATA,
1380                                 &r);
1381 
1382         if (!NT_STATUS_IS_OK(status)) {
1383                 return status;
1384         }
1385 
1386         if (DEBUGLEVEL >= 10) {
1387                 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &r);
1388         }
1389 
1390         if (NT_STATUS_IS_ERR(status)) {
1391                 return status;
1392         }
1393 
1394         /* Return variables */
1395 
1396         /* Return result */
1397         if (werror) {
1398                 *werror = r.out.result;
1399         }
1400 
1401         return werror_to_ntstatus(r.out.result);
1402 }
1403 
1404 NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1405                                              TALLOC_CTX *mem_ctx,
1406                                              WERROR *werror)
1407 {
1408         struct spoolss_WaitForPrinterChange r;
1409         NTSTATUS status;
1410 
1411         /* In parameters */
1412 
1413         if (DEBUGLEVEL >= 10) {
1414                 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &r);
1415         }
1416 
1417         status = cli->dispatch(cli,
1418                                 mem_ctx,
1419                                 &ndr_table_spoolss,
1420                                 NDR_SPOOLSS_WAITFORPRINTERCHANGE,
1421                                 &r);
1422 
1423         if (!NT_STATUS_IS_OK(status)) {
1424                 return status;
1425         }
1426 
1427         if (DEBUGLEVEL >= 10) {
1428                 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &r);
1429         }
1430 
1431         if (NT_STATUS_IS_ERR(status)) {
1432                 return status;
1433         }
1434 
1435         /* Return variables */
1436 
1437         /* Return result */
1438         if (werror) {
1439                 *werror = r.out.result;
1440         }
1441 
1442         return werror_to_ntstatus(r.out.result);
1443 }
1444 
1445 NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1446                                      TALLOC_CTX *mem_ctx,
1447                                      struct policy_handle *handle /* [in,out] [ref] */,
1448                                      WERROR *werror)
1449 {
1450         struct spoolss_ClosePrinter r;
1451         NTSTATUS status;
1452 
1453         /* In parameters */
1454         r.in.handle = handle;
1455 
1456         if (DEBUGLEVEL >= 10) {
1457                 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &r);
1458         }
1459 
1460         status = cli->dispatch(cli,
1461                                 mem_ctx,
1462                                 &ndr_table_spoolss,
1463                                 NDR_SPOOLSS_CLOSEPRINTER,
1464                                 &r);
1465 
1466         if (!NT_STATUS_IS_OK(status)) {
1467                 return status;
1468         }
1469 
1470         if (DEBUGLEVEL >= 10) {
1471                 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &r);
1472         }
1473 
1474         if (NT_STATUS_IS_ERR(status)) {
1475                 return status;
1476         }
1477 
1478         /* Return variables */
1479         *handle = *r.out.handle;
1480 
1481         /* Return result */
1482         if (werror) {
1483                 *werror = r.out.result;
1484         }
1485 
1486         return werror_to_ntstatus(r.out.result);
1487 }
1488 
1489 NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1490                                 TALLOC_CTX *mem_ctx,
1491                                 struct policy_handle *handle /* [in] [ref] */,
1492                                 uint32_t level /* [in]  */,
1493                                 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1494                                 WERROR *werror)
1495 {
1496         struct spoolss_AddForm r;
1497         NTSTATUS status;
1498 
1499         /* In parameters */
1500         r.in.handle = handle;
1501         r.in.level = level;
1502         r.in.info = info;
1503 
1504         if (DEBUGLEVEL >= 10) {
1505                 NDR_PRINT_IN_DEBUG(spoolss_AddForm, &r);
1506         }
1507 
1508         status = cli->dispatch(cli,
1509                                 mem_ctx,
1510                                 &ndr_table_spoolss,
1511                                 NDR_SPOOLSS_ADDFORM,
1512                                 &r);
1513 
1514         if (!NT_STATUS_IS_OK(status)) {
1515                 return status;
1516         }
1517 
1518         if (DEBUGLEVEL >= 10) {
1519                 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &r);
1520         }
1521 
1522         if (NT_STATUS_IS_ERR(status)) {
1523                 return status;
1524         }
1525 
1526         /* Return variables */
1527 
1528         /* Return result */
1529         if (werror) {
1530                 *werror = r.out.result;
1531         }
1532 
1533         return werror_to_ntstatus(r.out.result);
1534 }
1535 
1536 NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1537                                    TALLOC_CTX *mem_ctx,
1538                                    struct policy_handle *handle /* [in] [ref] */,
1539                                    const char *form_name /* [in] [charset(UTF16)] */,
1540                                    WERROR *werror)
1541 {
1542         struct spoolss_DeleteForm r;
1543         NTSTATUS status;
1544 
1545         /* In parameters */
1546         r.in.handle = handle;
1547         r.in.form_name = form_name;
1548 
1549         if (DEBUGLEVEL >= 10) {
1550                 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &r);
1551         }
1552 
1553         status = cli->dispatch(cli,
1554                                 mem_ctx,
1555                                 &ndr_table_spoolss,
1556                                 NDR_SPOOLSS_DELETEFORM,
1557                                 &r);
1558 
1559         if (!NT_STATUS_IS_OK(status)) {
1560                 return status;
1561         }
1562 
1563         if (DEBUGLEVEL >= 10) {
1564                 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &r);
1565         }
1566 
1567         if (NT_STATUS_IS_ERR(status)) {
1568                 return status;
1569         }
1570 
1571         /* Return variables */
1572 
1573         /* Return result */
1574         if (werror) {
1575                 *werror = r.out.result;
1576         }
1577 
1578         return werror_to_ntstatus(r.out.result);
1579 }
1580 
1581 NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1582                                 TALLOC_CTX *mem_ctx,
1583                                 struct policy_handle *handle /* [in] [ref] */,
1584                                 const char *form_name /* [in] [charset(UTF16)] */,
1585                                 uint32_t level /* [in]  */,
1586                                 DATA_BLOB *buffer /* [in] [unique] */,
1587                                 uint32_t offered /* [in]  */,
1588                                 union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1589                                 uint32_t *needed /* [out] [ref] */,
1590                                 WERROR *werror)
1591 {
1592         struct spoolss_GetForm r;
1593         NTSTATUS status;
1594 
1595         /* In parameters */
1596         r.in.handle = handle;
1597         r.in.form_name = form_name;
1598         r.in.level = level;
1599         r.in.buffer = buffer;
1600         r.in.offered = offered;
1601 
1602         if (DEBUGLEVEL >= 10) {
1603                 NDR_PRINT_IN_DEBUG(spoolss_GetForm, &r);
1604         }
1605 
1606         status = cli->dispatch(cli,
1607                                 mem_ctx,
1608                                 &ndr_table_spoolss,
1609                                 NDR_SPOOLSS_GETFORM,
1610                                 &r);
1611 
1612         if (!NT_STATUS_IS_OK(status)) {
1613                 return status;
1614         }
1615 
1616         if (DEBUGLEVEL >= 10) {
1617                 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &r);
1618         }
1619 
1620         if (NT_STATUS_IS_ERR(status)) {
1621                 return status;
1622         }
1623 
1624         /* Return variables */
1625         if (info && r.out.info) {
1626                 *info = *r.out.info;
1627         }
1628         *needed = *r.out.needed;
1629 
1630         /* Return result */
1631         if (werror) {
1632                 *werror = r.out.result;
1633         }
1634 
1635         return werror_to_ntstatus(r.out.result);
1636 }
1637 
1638 NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1639                                 TALLOC_CTX *mem_ctx,
1640                                 struct policy_handle *handle /* [in] [ref] */,
1641                                 const char *form_name /* [in] [charset(UTF16)] */,
1642                                 uint32_t level /* [in]  */,
1643                                 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1644                                 WERROR *werror)
1645 {
1646         struct spoolss_SetForm r;
1647         NTSTATUS status;
1648 
1649         /* In parameters */
1650         r.in.handle = handle;
1651         r.in.form_name = form_name;
1652         r.in.level = level;
1653         r.in.info = info;
1654 
1655         if (DEBUGLEVEL >= 10) {
1656                 NDR_PRINT_IN_DEBUG(spoolss_SetForm, &r);
1657         }
1658 
1659         status = cli->dispatch(cli,
1660                                 mem_ctx,
1661                                 &ndr_table_spoolss,
1662                                 NDR_SPOOLSS_SETFORM,
1663                                 &r);
1664 
1665         if (!NT_STATUS_IS_OK(status)) {
1666                 return status;
1667         }
1668 
1669         if (DEBUGLEVEL >= 10) {
1670                 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &r);
1671         }
1672 
1673         if (NT_STATUS_IS_ERR(status)) {
1674                 return status;
1675         }
1676 
1677         /* Return variables */
1678 
1679         /* Return result */
1680         if (werror) {
1681                 *werror = r.out.result;
1682         }
1683 
1684         return werror_to_ntstatus(r.out.result);
1685 }
1686 
1687 NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1688                                   TALLOC_CTX *mem_ctx,
1689                                   struct policy_handle *handle /* [in] [ref] */,
1690                                   uint32_t level /* [in]  */,
1691                                   DATA_BLOB *buffer /* [in] [unique] */,
1692                                   uint32_t offered /* [in]  */,
1693                                   uint32_t *count /* [out] [ref] */,
1694                                   union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1695                                   uint32_t *needed /* [out] [ref] */,
1696                                   WERROR *werror)
1697 {
1698         struct spoolss_EnumForms r;
1699         NTSTATUS status;
1700 
1701         /* In parameters */
1702         r.in.handle = handle;
1703         r.in.level = level;
1704         r.in.buffer = buffer;
1705         r.in.offered = offered;
1706 
1707         if (DEBUGLEVEL >= 10) {
1708                 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &r);
1709         }
1710 
1711         status = cli->dispatch(cli,
1712                                 mem_ctx,
1713                                 &ndr_table_spoolss,
1714                                 NDR_SPOOLSS_ENUMFORMS,
1715                                 &r);
1716 
1717         if (!NT_STATUS_IS_OK(status)) {
1718                 return status;
1719         }
1720 
1721         if (DEBUGLEVEL >= 10) {
1722                 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &r);
1723         }
1724 
1725         if (NT_STATUS_IS_ERR(status)) {
1726                 return status;
1727         }
1728 
1729         /* Return variables */
1730         *count = *r.out.count;
1731         *info = *r.out.info;
1732         *needed = *r.out.needed;
1733 
1734         /* Return result */
1735         if (werror) {
1736                 *werror = r.out.result;
1737         }
1738 
1739         return werror_to_ntstatus(r.out.result);
1740 }
1741 
1742 NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1743                                   TALLOC_CTX *mem_ctx,
1744                                   const char *servername /* [in] [unique,charset(UTF16)] */,
1745                                   uint32_t level /* [in]  */,
1746                                   DATA_BLOB *buffer /* [in] [unique] */,
1747                                   uint32_t offered /* [in]  */,
1748                                   uint32_t *count /* [out] [ref] */,
1749                                   union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1750                                   uint32_t *needed /* [out] [ref] */,
1751                                   WERROR *werror)
1752 {
1753         struct spoolss_EnumPorts r;
1754         NTSTATUS status;
1755 
1756         /* In parameters */
1757         r.in.servername = servername;
1758         r.in.level = level;
1759         r.in.buffer = buffer;
1760         r.in.offered = offered;
1761 
1762         if (DEBUGLEVEL >= 10) {
1763                 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &r);
1764         }
1765 
1766         status = cli->dispatch(cli,
1767                                 mem_ctx,
1768                                 &ndr_table_spoolss,
1769                                 NDR_SPOOLSS_ENUMPORTS,
1770                                 &r);
1771 
1772         if (!NT_STATUS_IS_OK(status)) {
1773                 return status;
1774         }
1775 
1776         if (DEBUGLEVEL >= 10) {
1777                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &r);
1778         }
1779 
1780         if (NT_STATUS_IS_ERR(status)) {
1781                 return status;
1782         }
1783 
1784         /* Return variables */
1785         *count = *r.out.count;
1786         *info = *r.out.info;
1787         *needed = *r.out.needed;
1788 
1789         /* Return result */
1790         if (werror) {
1791                 *werror = r.out.result;
1792         }
1793 
1794         return werror_to_ntstatus(r.out.result);
1795 }
1796 
1797 NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1798                                      TALLOC_CTX *mem_ctx,
1799                                      const char *servername /* [in] [unique,charset(UTF16)] */,
1800                                      uint32_t level /* [in]  */,
1801                                      DATA_BLOB *buffer /* [in] [unique] */,
1802                                      uint32_t offered /* [in]  */,
1803                                      uint32_t *count /* [out] [ref] */,
1804                                      union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1805                                      uint32_t *needed /* [out] [ref] */,
1806                                      WERROR *werror)
1807 {
1808         struct spoolss_EnumMonitors r;
1809         NTSTATUS status;
1810 
1811         /* In parameters */
1812         r.in.servername = servername;
1813         r.in.level = level;
1814         r.in.buffer = buffer;
1815         r.in.offered = offered;
1816 
1817         if (DEBUGLEVEL >= 10) {
1818                 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &r);
1819         }
1820 
1821         status = cli->dispatch(cli,
1822                                 mem_ctx,
1823                                 &ndr_table_spoolss,
1824                                 NDR_SPOOLSS_ENUMMONITORS,
1825                                 &r);
1826 
1827         if (!NT_STATUS_IS_OK(status)) {
1828                 return status;
1829         }
1830 
1831         if (DEBUGLEVEL >= 10) {
1832                 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &r);
1833         }
1834 
1835         if (NT_STATUS_IS_ERR(status)) {
1836                 return status;
1837         }
1838 
1839         /* Return variables */
1840         *count = *r.out.count;
1841         *info = *r.out.info;
1842         *needed = *r.out.needed;
1843 
1844         /* Return result */
1845         if (werror) {
1846                 *werror = r.out.result;
1847         }
1848 
1849         return werror_to_ntstatus(r.out.result);
1850 }
1851 
1852 NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1853                                 TALLOC_CTX *mem_ctx,
1854                                 const char *server_name /* [in] [unique,charset(UTF16)] */,
1855                                 uint32_t unknown /* [in]  */,
1856                                 const char *monitor_name /* [in] [charset(UTF16)] */,
1857                                 WERROR *werror)
1858 {
1859         struct spoolss_AddPort r;
1860         NTSTATUS status;
1861 
1862         /* In parameters */
1863         r.in.server_name = server_name;
1864         r.in.unknown = unknown;
1865         r.in.monitor_name = monitor_name;
1866 
1867         if (DEBUGLEVEL >= 10) {
1868                 NDR_PRINT_IN_DEBUG(spoolss_AddPort, &r);
1869         }
1870 
1871         status = cli->dispatch(cli,
1872                                 mem_ctx,
1873                                 &ndr_table_spoolss,
1874                                 NDR_SPOOLSS_ADDPORT,
1875                                 &r);
1876 
1877         if (!NT_STATUS_IS_OK(status)) {
1878                 return status;
1879         }
1880 
1881         if (DEBUGLEVEL >= 10) {
1882                 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &r);
1883         }
1884 
1885         if (NT_STATUS_IS_ERR(status)) {
1886                 return status;
1887         }
1888 
1889         /* Return variables */
1890 
1891         /* Return result */
1892         if (werror) {
1893                 *werror = r.out.result;
1894         }
1895 
1896         return werror_to_ntstatus(r.out.result);
1897 }
1898 
1899 NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1900                                       TALLOC_CTX *mem_ctx,
1901                                       WERROR *werror)
1902 {
1903         struct spoolss_ConfigurePort r;
1904         NTSTATUS status;
1905 
1906         /* In parameters */
1907 
1908         if (DEBUGLEVEL >= 10) {
1909                 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &r);
1910         }
1911 
1912         status = cli->dispatch(cli,
1913                                 mem_ctx,
1914                                 &ndr_table_spoolss,
1915                                 NDR_SPOOLSS_CONFIGUREPORT,
1916                                 &r);
1917 
1918         if (!NT_STATUS_IS_OK(status)) {
1919                 return status;
1920         }
1921 
1922         if (DEBUGLEVEL >= 10) {
1923                 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &r);
1924         }
1925 
1926         if (NT_STATUS_IS_ERR(status)) {
1927                 return status;
1928         }
1929 
1930         /* Return variables */
1931 
1932         /* Return result */
1933         if (werror) {
1934                 *werror = r.out.result;
1935         }
1936 
1937         return werror_to_ntstatus(r.out.result);
1938 }
1939 
1940 NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1941                                    TALLOC_CTX *mem_ctx,
1942                                    WERROR *werror)
1943 {
1944         struct spoolss_DeletePort r;
1945         NTSTATUS status;
1946 
1947         /* In parameters */
1948 
1949         if (DEBUGLEVEL >= 10) {
1950                 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &r);
1951         }
1952 
1953         status = cli->dispatch(cli,
1954                                 mem_ctx,
1955                                 &ndr_table_spoolss,
1956                                 NDR_SPOOLSS_DELETEPORT,
1957                                 &r);
1958 
1959         if (!NT_STATUS_IS_OK(status)) {
1960                 return status;
1961         }
1962 
1963         if (DEBUGLEVEL >= 10) {
1964                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &r);
1965         }
1966 
1967         if (NT_STATUS_IS_ERR(status)) {
1968                 return status;
1969         }
1970 
1971         /* Return variables */
1972 
1973         /* Return result */
1974         if (werror) {
1975                 *werror = r.out.result;
1976         }
1977 
1978         return werror_to_ntstatus(r.out.result);
1979 }
1980 
1981 NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
1982                                         TALLOC_CTX *mem_ctx,
1983                                         WERROR *werror)
1984 {
1985         struct spoolss_CreatePrinterIC r;
1986         NTSTATUS status;
1987 
1988         /* In parameters */
1989 
1990         if (DEBUGLEVEL >= 10) {
1991                 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r);
1992         }
1993 
1994         status = cli->dispatch(cli,
1995                                 mem_ctx,
1996                                 &ndr_table_spoolss,
1997                                 NDR_SPOOLSS_CREATEPRINTERIC,
1998                                 &r);
1999 
2000         if (!NT_STATUS_IS_OK(status)) {
2001                 return status;
2002         }
2003 
2004         if (DEBUGLEVEL >= 10) {
2005                 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &r);
2006         }
2007 
2008         if (NT_STATUS_IS_ERR(status)) {
2009                 return status;
2010         }
2011 
2012         /* Return variables */
2013 
2014         /* Return result */
2015         if (werror) {
2016                 *werror = r.out.result;
2017         }
2018 
2019         return werror_to_ntstatus(r.out.result);
2020 }
2021 
2022 NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2023                                                  TALLOC_CTX *mem_ctx,
2024                                                  WERROR *werror)
2025 {
2026         struct spoolss_PlayGDIScriptOnPrinterIC r;
2027         NTSTATUS status;
2028 
2029         /* In parameters */
2030 
2031         if (DEBUGLEVEL >= 10) {
2032                 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2033         }
2034 
2035         status = cli->dispatch(cli,
2036                                 mem_ctx,
2037                                 &ndr_table_spoolss,
2038                                 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC,
2039                                 &r);
2040 
2041         if (!NT_STATUS_IS_OK(status)) {
2042                 return status;
2043         }
2044 
2045         if (DEBUGLEVEL >= 10) {
2046                 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2047         }
2048 
2049         if (NT_STATUS_IS_ERR(status)) {
2050                 return status;
2051         }
2052 
2053         /* Return variables */
2054 
2055         /* Return result */
2056         if (werror) {
2057                 *werror = r.out.result;
2058         }
2059 
2060         return werror_to_ntstatus(r.out.result);
2061 }
2062 
2063 NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2064                                         TALLOC_CTX *mem_ctx,
2065                                         WERROR *werror)
2066 {
2067         struct spoolss_DeletePrinterIC r;
2068         NTSTATUS status;
2069 
2070         /* In parameters */
2071 
2072         if (DEBUGLEVEL >= 10) {
2073                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r);
2074         }
2075 
2076         status = cli->dispatch(cli,
2077                                 mem_ctx,
2078                                 &ndr_table_spoolss,
2079                                 NDR_SPOOLSS_DELETEPRINTERIC,
2080                                 &r);
2081 
2082         if (!NT_STATUS_IS_OK(status)) {
2083                 return status;
2084         }
2085 
2086         if (DEBUGLEVEL >= 10) {
2087                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &r);
2088         }
2089 
2090         if (NT_STATUS_IS_ERR(status)) {
2091                 return status;
2092         }
2093 
2094         /* Return variables */
2095 
2096         /* Return result */
2097         if (werror) {
2098                 *werror = r.out.result;
2099         }
2100 
2101         return werror_to_ntstatus(r.out.result);
2102 }
2103 
2104 NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2105                                              TALLOC_CTX *mem_ctx,
2106                                              WERROR *werror)
2107 {
2108         struct spoolss_AddPrinterConnection r;
2109         NTSTATUS status;
2110 
2111         /* In parameters */
2112 
2113         if (DEBUGLEVEL >= 10) {
2114                 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &r);
2115         }
2116 
2117         status = cli->dispatch(cli,
2118                                 mem_ctx,
2119                                 &ndr_table_spoolss,
2120                                 NDR_SPOOLSS_ADDPRINTERCONNECTION,
2121                                 &r);
2122 
2123         if (!NT_STATUS_IS_OK(status)) {
2124                 return status;
2125         }
2126 
2127         if (DEBUGLEVEL >= 10) {
2128                 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &r);
2129         }
2130 
2131         if (NT_STATUS_IS_ERR(status)) {
2132                 return status;
2133         }
2134 
2135         /* Return variables */
2136 
2137         /* Return result */
2138         if (werror) {
2139                 *werror = r.out.result;
2140         }
2141 
2142         return werror_to_ntstatus(r.out.result);
2143 }
2144 
2145 NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2146                                                 TALLOC_CTX *mem_ctx,
2147                                                 WERROR *werror)
2148 {
2149         struct spoolss_DeletePrinterConnection r;
2150         NTSTATUS status;
2151 
2152         /* In parameters */
2153 
2154         if (DEBUGLEVEL >= 10) {
2155                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &r);
2156         }
2157 
2158         status = cli->dispatch(cli,
2159                                 mem_ctx,
2160                                 &ndr_table_spoolss,
2161                                 NDR_SPOOLSS_DELETEPRINTERCONNECTION,
2162                                 &r);
2163 
2164         if (!NT_STATUS_IS_OK(status)) {
2165                 return status;
2166         }
2167 
2168         if (DEBUGLEVEL >= 10) {
2169                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &r);
2170         }
2171 
2172         if (NT_STATUS_IS_ERR(status)) {
2173                 return status;
2174         }
2175 
2176         /* Return variables */
2177 
2178         /* Return result */
2179         if (werror) {
2180                 *werror = r.out.result;
2181         }
2182 
2183         return werror_to_ntstatus(r.out.result);
2184 }
2185 
2186 NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2187                                           TALLOC_CTX *mem_ctx,
2188                                           WERROR *werror)
2189 {
2190         struct spoolss_PrinterMessageBox r;
2191         NTSTATUS status;
2192 
2193         /* In parameters */
2194 
2195         if (DEBUGLEVEL >= 10) {
2196                 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &r);
2197         }
2198 
2199         status = cli->dispatch(cli,
2200                                 mem_ctx,
2201                                 &ndr_table_spoolss,
2202                                 NDR_SPOOLSS_PRINTERMESSAGEBOX,
2203                                 &r);
2204 
2205         if (!NT_STATUS_IS_OK(status)) {
2206                 return status;
2207         }
2208 
2209         if (DEBUGLEVEL >= 10) {
2210                 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &r);
2211         }
2212 
2213         if (NT_STATUS_IS_ERR(status)) {
2214                 return status;
2215         }
2216 
2217         /* Return variables */
2218 
2219         /* Return result */
2220         if (werror) {
2221                 *werror = r.out.result;
2222         }
2223 
2224         return werror_to_ntstatus(r.out.result);
2225 }
2226 
2227 NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2228                                    TALLOC_CTX *mem_ctx,
2229                                    WERROR *werror)
2230 {
2231         struct spoolss_AddMonitor r;
2232         NTSTATUS status;
2233 
2234         /* In parameters */
2235 
2236         if (DEBUGLEVEL >= 10) {
2237                 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &r);
2238         }
2239 
2240         status = cli->dispatch(cli,
2241                                 mem_ctx,
2242                                 &ndr_table_spoolss,
2243                                 NDR_SPOOLSS_ADDMONITOR,
2244                                 &r);
2245 
2246         if (!NT_STATUS_IS_OK(status)) {
2247                 return status;
2248         }
2249 
2250         if (DEBUGLEVEL >= 10) {
2251                 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &r);
2252         }
2253 
2254         if (NT_STATUS_IS_ERR(status)) {
2255                 return status;
2256         }
2257 
2258         /* Return variables */
2259 
2260         /* Return result */
2261         if (werror) {
2262                 *werror = r.out.result;
2263         }
2264 
2265         return werror_to_ntstatus(r.out.result);
2266 }
2267 
2268 NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2269                                       TALLOC_CTX *mem_ctx,
2270                                       WERROR *werror)
2271 {
2272         struct spoolss_DeleteMonitor r;
2273         NTSTATUS status;
2274 
2275         /* In parameters */
2276 
2277         if (DEBUGLEVEL >= 10) {
2278                 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &r);
2279         }
2280 
2281         status = cli->dispatch(cli,
2282                                 mem_ctx,
2283                                 &ndr_table_spoolss,
2284                                 NDR_SPOOLSS_DELETEMONITOR,
2285                                 &r);
2286 
2287         if (!NT_STATUS_IS_OK(status)) {
2288                 return status;
2289         }
2290 
2291         if (DEBUGLEVEL >= 10) {
2292                 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &r);
2293         }
2294 
2295         if (NT_STATUS_IS_ERR(status)) {
2296                 return status;
2297         }
2298 
2299         /* Return variables */
2300 
2301         /* Return result */
2302         if (werror) {
2303                 *werror = r.out.result;
2304         }
2305 
2306         return werror_to_ntstatus(r.out.result);
2307 }
2308 
2309 NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2310                                              TALLOC_CTX *mem_ctx,
2311                                              WERROR *werror)
2312 {
2313         struct spoolss_DeletePrintProcessor r;
2314         NTSTATUS status;
2315 
2316         /* In parameters */
2317 
2318         if (DEBUGLEVEL >= 10) {
2319                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &r);
2320         }
2321 
2322         status = cli->dispatch(cli,
2323                                 mem_ctx,
2324                                 &ndr_table_spoolss,
2325                                 NDR_SPOOLSS_DELETEPRINTPROCESSOR,
2326                                 &r);
2327 
2328         if (!NT_STATUS_IS_OK(status)) {
2329                 return status;
2330         }
2331 
2332         if (DEBUGLEVEL >= 10) {
2333                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &r);
2334         }
2335 
2336         if (NT_STATUS_IS_ERR(status)) {
2337                 return status;
2338         }
2339 
2340         /* Return variables */
2341 
2342         /* Return result */
2343         if (werror) {
2344                 *werror = r.out.result;
2345         }
2346 
2347         return werror_to_ntstatus(r.out.result);
2348 }
2349 
2350 NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2351                                          TALLOC_CTX *mem_ctx,
2352                                          WERROR *werror)
2353 {
2354         struct spoolss_AddPrintProvidor r;
2355         NTSTATUS status;
2356 
2357         /* In parameters */
2358 
2359         if (DEBUGLEVEL >= 10) {
2360                 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &r);
2361         }
2362 
2363         status = cli->dispatch(cli,
2364                                 mem_ctx,
2365                                 &ndr_table_spoolss,
2366                                 NDR_SPOOLSS_ADDPRINTPROVIDOR,
2367                                 &r);
2368 
2369         if (!NT_STATUS_IS_OK(status)) {
2370                 return status;
2371         }
2372 
2373         if (DEBUGLEVEL >= 10) {
2374                 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &r);
2375         }
2376 
2377         if (NT_STATUS_IS_ERR(status)) {
2378                 return status;
2379         }
2380 
2381         /* Return variables */
2382 
2383         /* Return result */
2384         if (werror) {
2385                 *werror = r.out.result;
2386         }
2387 
2388         return werror_to_ntstatus(r.out.result);
2389 }
2390 
2391 NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2392                                             TALLOC_CTX *mem_ctx,
2393                                             WERROR *werror)
2394 {
2395         struct spoolss_DeletePrintProvidor r;
2396         NTSTATUS status;
2397 
2398         /* In parameters */
2399 
2400         if (DEBUGLEVEL >= 10) {
2401                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &r);
2402         }
2403 
2404         status = cli->dispatch(cli,
2405                                 mem_ctx,
2406                                 &ndr_table_spoolss,
2407                                 NDR_SPOOLSS_DELETEPRINTPROVIDOR,
2408                                 &r);
2409 
2410         if (!NT_STATUS_IS_OK(status)) {
2411                 return status;
2412         }
2413 
2414         if (DEBUGLEVEL >= 10) {
2415                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &r);
2416         }
2417 
2418         if (NT_STATUS_IS_ERR(status)) {
2419                 return status;
2420         }
2421 
2422         /* Return variables */
2423 
2424         /* Return result */
2425         if (werror) {
2426                 *werror = r.out.result;
2427         }
2428 
2429         return werror_to_ntstatus(r.out.result);
2430 }
2431 
2432 NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2433                                                TALLOC_CTX *mem_ctx,
2434                                                const char *servername /* [in] [unique,charset(UTF16)] */,
2435                                                const char *print_processor_name /* [in] [unique,charset(UTF16)] */,
2436                                                uint32_t level /* [in]  */,
2437                                                DATA_BLOB *buffer /* [in] [unique] */,
2438                                                uint32_t offered /* [in]  */,
2439                                                uint32_t *count /* [out] [ref] */,
2440                                                union spoolss_PrintProcDataTypesInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
2441                                                uint32_t *needed /* [out] [ref] */,
2442                                                WERROR *werror)
2443 {
2444         struct spoolss_EnumPrintProcDataTypes r;
2445         NTSTATUS status;
2446 
2447         /* In parameters */
2448         r.in.servername = servername;
2449         r.in.print_processor_name = print_processor_name;
2450         r.in.level = level;
2451         r.in.buffer = buffer;
2452         r.in.offered = offered;
2453 
2454         if (DEBUGLEVEL >= 10) {
2455                 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2456         }
2457 
2458         status = cli->dispatch(cli,
2459                                 mem_ctx,
2460                                 &ndr_table_spoolss,
2461                                 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES,
2462                                 &r);
2463 
2464         if (!NT_STATUS_IS_OK(status)) {
2465                 return status;
2466         }
2467 
2468         if (DEBUGLEVEL >= 10) {
2469                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2470         }
2471 
2472         if (NT_STATUS_IS_ERR(status)) {
2473                 return status;
2474         }
2475 
2476         /* Return variables */
2477         *count = *r.out.count;
2478         *info = *r.out.info;
2479         *needed = *r.out.needed;
2480 
2481         /* Return result */
2482         if (werror) {
2483                 *werror = r.out.result;
2484         }
2485 
2486         return werror_to_ntstatus(r.out.result);
2487 }
2488 
2489 NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2490                                      TALLOC_CTX *mem_ctx,
2491                                      struct policy_handle *handle /* [in] [ref] */,
2492                                      const char *data_type /* [in] [unique,charset(UTF16)] */,
2493                                      struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
2494                                      WERROR *werror)
2495 {
2496         struct spoolss_ResetPrinter r;
2497         NTSTATUS status;
2498 
2499         /* In parameters */
2500         r.in.handle = handle;
2501         r.in.data_type = data_type;
2502         r.in.devmode_ctr = devmode_ctr;
2503 
2504         if (DEBUGLEVEL >= 10) {
2505                 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &r);
2506         }
2507 
2508         status = cli->dispatch(cli,
2509                                 mem_ctx,
2510                                 &ndr_table_spoolss,
2511                                 NDR_SPOOLSS_RESETPRINTER,
2512                                 &r);
2513 
2514         if (!NT_STATUS_IS_OK(status)) {
2515                 return status;
2516         }
2517 
2518         if (DEBUGLEVEL >= 10) {
2519                 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &r);
2520         }
2521 
2522         if (NT_STATUS_IS_ERR(status)) {
2523                 return status;
2524         }
2525 
2526         /* Return variables */
2527 
2528         /* Return result */
2529         if (werror) {
2530                 *werror = r.out.result;
2531         }
2532 
2533         return werror_to_ntstatus(r.out.result);
2534 }
2535 
2536 NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2537                                           TALLOC_CTX *mem_ctx,
2538                                           struct policy_handle *handle /* [in] [ref] */,
2539                                           const char *architecture /* [in] [unique,charset(UTF16)] */,
2540                                           uint32_t level /* [in]  */,
2541                                           DATA_BLOB *buffer /* [in] [unique] */,
2542                                           uint32_t offered /* [in]  */,
2543                                           uint32_t client_major_version /* [in]  */,
2544                                           uint32_t client_minor_version /* [in]  */,
2545                                           union spoolss_DriverInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
2546                                           uint32_t *needed /* [out] [ref] */,
2547                                           uint32_t *server_major_version /* [out] [ref] */,
2548                                           uint32_t *server_minor_version /* [out] [ref] */,
2549                                           WERROR *werror)
2550 {
2551         struct spoolss_GetPrinterDriver2 r;
2552         NTSTATUS status;
2553 
2554         /* In parameters */
2555         r.in.handle = handle;
2556         r.in.architecture = architecture;
2557         r.in.level = level;
2558         r.in.buffer = buffer;
2559         r.in.offered = offered;
2560         r.in.client_major_version = client_major_version;
2561         r.in.client_minor_version = client_minor_version;
2562 
2563         if (DEBUGLEVEL >= 10) {
2564                 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &r);
2565         }
2566 
2567         status = cli->dispatch(cli,
2568                                 mem_ctx,
2569                                 &ndr_table_spoolss,
2570                                 NDR_SPOOLSS_GETPRINTERDRIVER2,
2571                                 &r);
2572 
2573         if (!NT_STATUS_IS_OK(status)) {
2574                 return status;
2575         }
2576 
2577         if (DEBUGLEVEL >= 10) {
2578                 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &r);
2579         }
2580 
2581         if (NT_STATUS_IS_ERR(status)) {
2582                 return status;
2583         }
2584 
2585         /* Return variables */
2586         if (info && r.out.info) {
2587                 *info = *r.out.info;
2588         }
2589         *needed = *r.out.needed;
2590         *server_major_version = *r.out.server_major_version;
2591         *server_minor_version = *r.out.server_minor_version;
2592 
2593         /* Return result */
2594         if (werror) {
2595                 *werror = r.out.result;
2596         }
2597 
2598         return werror_to_ntstatus(r.out.result);
2599 }
2600 
2601 NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2602                                                            TALLOC_CTX *mem_ctx,
2603                                                            WERROR *werror)
2604 {
2605         struct spoolss_FindFirstPrinterChangeNotification r;
2606         NTSTATUS status;
2607 
2608         /* In parameters */
2609 
2610         if (DEBUGLEVEL >= 10) {
2611                 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2612         }
2613 
2614         status = cli->dispatch(cli,
2615                                 mem_ctx,
2616                                 &ndr_table_spoolss,
2617                                 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION,
2618                                 &r);
2619 
2620         if (!NT_STATUS_IS_OK(status)) {
2621                 return status;
2622         }
2623 
2624         if (DEBUGLEVEL >= 10) {
2625                 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2626         }
2627 
2628         if (NT_STATUS_IS_ERR(status)) {
2629                 return status;
2630         }
2631 
2632         /* Return variables */
2633 
2634         /* Return result */
2635         if (werror) {
2636                 *werror = r.out.result;
2637         }
2638 
2639         return werror_to_ntstatus(r.out.result);
2640 }
2641 
2642 NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2643                                                           TALLOC_CTX *mem_ctx,
2644                                                           WERROR *werror)
2645 {
2646         struct spoolss_FindNextPrinterChangeNotification r;
2647         NTSTATUS status;
2648 
2649         /* In parameters */
2650 
2651         if (DEBUGLEVEL >= 10) {
2652                 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2653         }
2654 
2655         status = cli->dispatch(cli,
2656                                 mem_ctx,
2657                                 &ndr_table_spoolss,
2658                                 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION,
2659                                 &r);
2660 
2661         if (!NT_STATUS_IS_OK(status)) {
2662                 return status;
2663         }
2664 
2665         if (DEBUGLEVEL >= 10) {
2666                 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2667         }
2668 
2669         if (NT_STATUS_IS_ERR(status)) {
2670                 return status;
2671         }
2672 
2673         /* Return variables */
2674 
2675         /* Return result */
2676         if (werror) {
2677                 *werror = r.out.result;
2678         }
2679 
2680         return werror_to_ntstatus(r.out.result);
2681 }
2682 
2683 NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2684                                                TALLOC_CTX *mem_ctx,
2685                                                struct policy_handle *handle /* [in] [ref] */,
2686                                                WERROR *werror)
2687 {
2688         struct spoolss_FindClosePrinterNotify r;
2689         NTSTATUS status;
2690 
2691         /* In parameters */
2692         r.in.handle = handle;
2693 
2694         if (DEBUGLEVEL >= 10) {
2695                 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &r);
2696         }
2697 
2698         status = cli->dispatch(cli,
2699                                 mem_ctx,
2700                                 &ndr_table_spoolss,
2701                                 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY,
2702                                 &r);
2703 
2704         if (!NT_STATUS_IS_OK(status)) {
2705                 return status;
2706         }
2707 
2708         if (DEBUGLEVEL >= 10) {
2709                 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &r);
2710         }
2711 
2712         if (NT_STATUS_IS_ERR(status)) {
2713                 return status;
2714         }
2715 
2716         /* Return variables */
2717 
2718         /* Return result */
2719         if (werror) {
2720                 *werror = r.out.result;
2721         }
2722 
2723         return werror_to_ntstatus(r.out.result);
2724 }
2725 
2726 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2727                                                                     TALLOC_CTX *mem_ctx,
2728                                                                     WERROR *werror)
2729 {
2730         struct spoolss_RouterFindFirstPrinterChangeNotificationOld r;
2731         NTSTATUS status;
2732 
2733         /* In parameters */
2734 
2735         if (DEBUGLEVEL >= 10) {
2736                 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2737         }
2738 
2739         status = cli->dispatch(cli,
2740                                 mem_ctx,
2741                                 &ndr_table_spoolss,
2742                                 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD,
2743                                 &r);
2744 
2745         if (!NT_STATUS_IS_OK(status)) {
2746                 return status;
2747         }
2748 
2749         if (DEBUGLEVEL >= 10) {
2750                 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2751         }
2752 
2753         if (NT_STATUS_IS_ERR(status)) {
2754                 return status;
2755         }
2756 
2757         /* Return variables */
2758 
2759         /* Return result */
2760         if (werror) {
2761                 *werror = r.out.result;
2762         }
2763 
2764         return werror_to_ntstatus(r.out.result);
2765 }
2766 
2767 NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2768                                          TALLOC_CTX *mem_ctx,
2769                                          const char *server_name /* [in] [charset(UTF16)] */,
2770                                          uint32_t printer_local /* [in]  */,
2771                                          enum winreg_Type type /* [in]  */,
2772                                          uint32_t bufsize /* [in] [range(0,512)] */,
2773                                          uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2774                                          struct policy_handle *handle /* [out] [ref] */,
2775                                          WERROR *werror)
2776 {
2777         struct spoolss_ReplyOpenPrinter r;
2778         NTSTATUS status;
2779 
2780         /* In parameters */
2781         r.in.server_name = server_name;
2782         r.in.printer_local = printer_local;
2783         r.in.type = type;
2784         r.in.bufsize = bufsize;
2785         r.in.buffer = buffer;
2786 
2787         if (DEBUGLEVEL >= 10) {
2788                 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
2789         }
2790 
2791         status = cli->dispatch(cli,
2792                                 mem_ctx,
2793                                 &ndr_table_spoolss,
2794                                 NDR_SPOOLSS_REPLYOPENPRINTER,
2795                                 &r);
2796 
2797         if (!NT_STATUS_IS_OK(status)) {
2798                 return status;
2799         }
2800 
2801         if (DEBUGLEVEL >= 10) {
2802                 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &r);
2803         }
2804 
2805         if (NT_STATUS_IS_ERR(status)) {
2806                 return status;
2807         }
2808 
2809         /* Return variables */
2810         *handle = *r.out.handle;
2811 
2812         /* Return result */
2813         if (werror) {
2814                 *werror = r.out.result;
2815         }
2816 
2817         return werror_to_ntstatus(r.out.result);
2818 }
2819 
2820 NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2821                                            TALLOC_CTX *mem_ctx,
2822                                            struct policy_handle *handle /* [in] [ref] */,
2823                                            uint32_t flags /* [in]  */,
2824                                            uint32_t bufsize /* [in] [range(0,512)] */,
2825                                            uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2826                                            WERROR *werror)
2827 {
2828         struct spoolss_RouterReplyPrinter r;
2829         NTSTATUS status;
2830 
2831         /* In parameters */
2832         r.in.handle = handle;
2833         r.in.flags = flags;
2834         r.in.bufsize = bufsize;
2835         r.in.buffer = buffer;
2836 
2837         if (DEBUGLEVEL >= 10) {
2838                 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &r);
2839         }
2840 
2841         status = cli->dispatch(cli,
2842                                 mem_ctx,
2843                                 &ndr_table_spoolss,
2844                                 NDR_SPOOLSS_ROUTERREPLYPRINTER,
2845                                 &r);
2846 
2847         if (!NT_STATUS_IS_OK(status)) {
2848                 return status;
2849         }
2850 
2851         if (DEBUGLEVEL >= 10) {
2852                 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &r);
2853         }
2854 
2855         if (NT_STATUS_IS_ERR(status)) {
2856                 return status;
2857         }
2858 
2859         /* Return variables */
2860 
2861         /* Return result */
2862         if (werror) {
2863                 *werror = r.out.result;
2864         }
2865 
2866         return werror_to_ntstatus(r.out.result);
2867 }
2868 
2869 NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2870                                           TALLOC_CTX *mem_ctx,
2871                                           struct policy_handle *handle /* [in,out] [ref] */,
2872                                           WERROR *werror)
2873 {
2874         struct spoolss_ReplyClosePrinter r;
2875         NTSTATUS status;
2876 
2877         /* In parameters */
2878         r.in.handle = handle;
2879 
2880         if (DEBUGLEVEL >= 10) {
2881                 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &r);
2882         }
2883 
2884         status = cli->dispatch(cli,
2885                                 mem_ctx,
2886                                 &ndr_table_spoolss,
2887                                 NDR_SPOOLSS_REPLYCLOSEPRINTER,
2888                                 &r);
2889 
2890         if (!NT_STATUS_IS_OK(status)) {
2891                 return status;
2892         }
2893 
2894         if (DEBUGLEVEL >= 10) {
2895                 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &r);
2896         }
2897 
2898         if (NT_STATUS_IS_ERR(status)) {
2899                 return status;
2900         }
2901 
2902         /* Return variables */
2903         *handle = *r.out.handle;
2904 
2905         /* Return result */
2906         if (werror) {
2907                 *werror = r.out.result;
2908         }
2909 
2910         return werror_to_ntstatus(r.out.result);
2911 }
2912 
2913 NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2914                                   TALLOC_CTX *mem_ctx,
2915                                   WERROR *werror)
2916 {
2917         struct spoolss_AddPortEx r;
2918         NTSTATUS status;
2919 
2920         /* In parameters */
2921 
2922         if (DEBUGLEVEL >= 10) {
2923                 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &r);
2924         }
2925 
2926         status = cli->dispatch(cli,
2927                                 mem_ctx,
2928                                 &ndr_table_spoolss,
2929                                 NDR_SPOOLSS_ADDPORTEX,
2930                                 &r);
2931 
2932         if (!NT_STATUS_IS_OK(status)) {
2933                 return status;
2934         }
2935 
2936         if (DEBUGLEVEL >= 10) {
2937                 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &r);
2938         }
2939 
2940         if (NT_STATUS_IS_ERR(status)) {
2941                 return status;
2942         }
2943 
2944         /* Return variables */
2945 
2946         /* Return result */
2947         if (werror) {
2948                 *werror = r.out.result;
2949         }
2950 
2951         return werror_to_ntstatus(r.out.result);
2952 }
2953 
2954 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2955                                                                  TALLOC_CTX *mem_ctx,
2956                                                                  WERROR *werror)
2957 {
2958         struct spoolss_RouterFindFirstPrinterChangeNotification r;
2959         NTSTATUS status;
2960 
2961         /* In parameters */
2962 
2963         if (DEBUGLEVEL >= 10) {
2964                 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2965         }
2966 
2967         status = cli->dispatch(cli,
2968                                 mem_ctx,
2969                                 &ndr_table_spoolss,
2970                                 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION,
2971                                 &r);
2972 
2973         if (!NT_STATUS_IS_OK(status)) {
2974                 return status;
2975         }
2976 
2977         if (DEBUGLEVEL >= 10) {
2978                 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2979         }
2980 
2981         if (NT_STATUS_IS_ERR(status)) {
2982                 return status;
2983         }
2984 
2985         /* Return variables */
2986 
2987         /* Return result */
2988         if (werror) {
2989                 *werror = r.out.result;
2990         }
2991 
2992         return werror_to_ntstatus(r.out.result);
2993 }
2994 
2995 NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
2996                                     TALLOC_CTX *mem_ctx,
2997                                     WERROR *werror)
2998 {
2999         struct spoolss_SpoolerInit r;
3000         NTSTATUS status;
3001 
3002         /* In parameters */
3003 
3004         if (DEBUGLEVEL >= 10) {
3005                 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &r);
3006         }
3007 
3008         status = cli->dispatch(cli,
3009                                 mem_ctx,
3010                                 &ndr_table_spoolss,
3011                                 NDR_SPOOLSS_SPOOLERINIT,
3012                                 &r);
3013 
3014         if (!NT_STATUS_IS_OK(status)) {
3015                 return status;
3016         }
3017 
3018         if (DEBUGLEVEL >= 10) {
3019                 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &r);
3020         }
3021 
3022         if (NT_STATUS_IS_ERR(status)) {
3023                 return status;
3024         }
3025 
3026         /* Return variables */
3027 
3028         /* Return result */
3029         if (werror) {
3030                 *werror = r.out.result;
3031         }
3032 
3033         return werror_to_ntstatus(r.out.result);
3034 }
3035 
3036 NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3037                                        TALLOC_CTX *mem_ctx,
3038                                        WERROR *werror)
3039 {
3040         struct spoolss_ResetPrinterEx r;
3041         NTSTATUS status;
3042 
3043         /* In parameters */
3044 
3045         if (DEBUGLEVEL >= 10) {
3046                 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &r);
3047         }
3048 
3049         status = cli->dispatch(cli,
3050                                 mem_ctx,
3051                                 &ndr_table_spoolss,
3052                                 NDR_SPOOLSS_RESETPRINTEREX,
3053                                 &r);
3054 
3055         if (!NT_STATUS_IS_OK(status)) {
3056                 return status;
3057         }
3058 
3059         if (DEBUGLEVEL >= 10) {
3060                 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &r);
3061         }
3062 
3063         if (NT_STATUS_IS_ERR(status)) {
3064                 return status;
3065         }
3066 
3067         /* Return variables */
3068 
3069         /* Return result */
3070         if (werror) {
3071                 *werror = r.out.result;
3072         }
3073 
3074         return werror_to_ntstatus(r.out.result);
3075 }
3076 
3077 NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3078                                                              TALLOC_CTX *mem_ctx,
3079                                                              struct policy_handle *handle /* [in] [ref] */,
3080                                                              uint32_t flags /* [in]  */,
3081                                                              uint32_t options /* [in]  */,
3082                                                              const char *local_machine /* [in] [unique,charset(UTF16)] */,
3083                                                              uint32_t printer_local /* [in]  */,
3084                                                              struct spoolss_NotifyOption *notify_options /* [in] [unique] */,
3085                                                              WERROR *werror)
3086 {
3087         struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r;
3088         NTSTATUS status;
3089 
3090         /* In parameters */
3091         r.in.handle = handle;
3092         r.in.flags = flags;
3093         r.in.options = options;
3094         r.in.local_machine = local_machine;
3095         r.in.printer_local = printer_local;
3096         r.in.notify_options = notify_options;
3097 
3098         if (DEBUGLEVEL >= 10) {
3099                 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3100         }
3101 
3102         status = cli->dispatch(cli,
3103                                 mem_ctx,
3104                                 &ndr_table_spoolss,
3105                                 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX,
3106                                 &r);
3107 
3108         if (!NT_STATUS_IS_OK(status)) {
3109                 return status;
3110         }
3111 
3112         if (DEBUGLEVEL >= 10) {
3113                 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3114         }
3115 
3116         if (NT_STATUS_IS_ERR(status)) {
3117                 return status;
3118         }
3119 
3120         /* Return variables */
3121 
3122         /* Return result */
3123         if (werror) {
3124                 *werror = r.out.result;
3125         }
3126 
3127         return werror_to_ntstatus(r.out.result);
3128 }
3129 
3130 NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3131                                              TALLOC_CTX *mem_ctx,
3132                                              struct policy_handle *handle /* [in] [ref] */,
3133                                              uint32_t color /* [in]  */,
3134                                              uint32_t flags /* [in]  */,
3135                                              uint32_t *reply_result /* [out] [ref] */,
3136                                              uint32_t reply_type /* [in]  */,
3137                                              union spoolss_ReplyPrinterInfo info /* [in] [switch_is(reply_type)] */,
3138                                              WERROR *werror)
3139 {
3140         struct spoolss_RouterReplyPrinterEx r;
3141         NTSTATUS status;
3142 
3143         /* In parameters */
3144         r.in.handle = handle;
3145         r.in.color = color;
3146         r.in.flags = flags;
3147         r.in.reply_type = reply_type;
3148         r.in.info = info;
3149 
3150         if (DEBUGLEVEL >= 10) {
3151                 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3152         }
3153 
3154         status = cli->dispatch(cli,
3155                                 mem_ctx,
3156                                 &ndr_table_spoolss,
3157                                 NDR_SPOOLSS_ROUTERREPLYPRINTEREX,
3158                                 &r);
3159 
3160         if (!NT_STATUS_IS_OK(status)) {
3161                 return status;
3162         }
3163 
3164         if (DEBUGLEVEL >= 10) {
3165                 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3166         }
3167 
3168         if (NT_STATUS_IS_ERR(status)) {
3169                 return status;
3170         }
3171 
3172         /* Return variables */
3173         *reply_result = *r.out.reply_result;
3174 
3175         /* Return result */
3176         if (werror) {
3177                 *werror = r.out.result;
3178         }
3179 
3180         return werror_to_ntstatus(r.out.result);
3181 }
3182 
3183 NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3184                                                          TALLOC_CTX *mem_ctx,
3185                                                          struct policy_handle *handle /* [in] [ref] */,
3186                                                          uint32_t change_low /* [in]  */,
3187                                                          struct spoolss_NotifyOption *options /* [in] [unique] */,
3188                                                          struct spoolss_NotifyInfo **info /* [out] [ref] */,
3189                                                          WERROR *werror)
3190 {
3191         struct spoolss_RouterRefreshPrinterChangeNotify r;
3192         NTSTATUS status;
3193 
3194         /* In parameters */
3195         r.in.handle = handle;
3196         r.in.change_low = change_low;
3197         r.in.options = options;
3198 
3199         if (DEBUGLEVEL >= 10) {
3200                 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3201         }
3202 
3203         status = cli->dispatch(cli,
3204                                 mem_ctx,
3205                                 &ndr_table_spoolss,
3206                                 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY,
3207                                 &r);
3208 
3209         if (!NT_STATUS_IS_OK(status)) {
3210                 return status;
3211         }
3212 
3213         if (DEBUGLEVEL >= 10) {
3214                 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3215         }
3216 
3217         if (NT_STATUS_IS_ERR(status)) {
3218                 return status;
3219         }
3220 
3221         /* Return variables */
3222         *info = *r.out.info;
3223 
3224         /* Return result */
3225         if (werror) {
3226                 *werror = r.out.result;
3227         }
3228 
3229         return werror_to_ntstatus(r.out.result);
3230 }
3231 
3232 NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3233                            TALLOC_CTX *mem_ctx,
3234                            WERROR *werror)
3235 {
3236         struct spoolss_44 r;
3237         NTSTATUS status;
3238 
3239         /* In parameters */
3240 
3241         if (DEBUGLEVEL >= 10) {
3242                 NDR_PRINT_IN_DEBUG(spoolss_44, &r);
3243         }
3244 
3245         status = cli->dispatch(cli,
3246                                 mem_ctx,
3247                                 &ndr_table_spoolss,
3248                                 NDR_SPOOLSS_44,
3249                                 &r);
3250 
3251         if (!NT_STATUS_IS_OK(status)) {
3252                 return status;
3253         }
3254 
3255         if (DEBUGLEVEL >= 10) {
3256                 NDR_PRINT_OUT_DEBUG(spoolss_44, &r);
3257         }
3258 
3259         if (NT_STATUS_IS_ERR(status)) {
3260                 return status;
3261         }
3262 
3263         /* Return variables */
3264 
3265         /* Return result */
3266         if (werror) {
3267                 *werror = r.out.result;
3268         }
3269 
3270         return werror_to_ntstatus(r.out.result);
3271 }
3272 
3273 NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3274                                       TALLOC_CTX *mem_ctx,
3275                                       const char *printername /* [in] [unique,charset(UTF16)] */,
3276                                       const char *datatype /* [in] [unique,charset(UTF16)] */,
3277                                       struct spoolss_DevmodeContainer devmode_ctr /* [in]  */,
3278                                       uint32_t access_mask /* [in]  */,
3279                                       uint32_t level /* [in]  */,
3280                                       union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */,
3281                                       struct policy_handle *handle /* [out] [ref] */,
3282                                       WERROR *werror)
3283 {
3284         struct spoolss_OpenPrinterEx r;
3285         NTSTATUS status;
3286 
3287         /* In parameters */
3288         r.in.printername = printername;
3289         r.in.datatype = datatype;
3290         r.in.devmode_ctr = devmode_ctr;
3291         r.in.access_mask = access_mask;
3292         r.in.level = level;
3293         r.in.userlevel = userlevel;
3294 
3295         if (DEBUGLEVEL >= 10) {
3296                 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &r);
3297         }
3298 
3299         status = cli->dispatch(cli,
3300                                 mem_ctx,
3301                                 &ndr_table_spoolss,
3302                                 NDR_SPOOLSS_OPENPRINTEREX,
3303                                 &r);
3304 
3305         if (!NT_STATUS_IS_OK(status)) {
3306                 return status;
3307         }
3308 
3309         if (DEBUGLEVEL >= 10) {
3310                 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &r);
3311         }
3312 
3313         if (NT_STATUS_IS_ERR(status)) {
3314                 return status;
3315         }
3316 
3317         /* Return variables */
3318         *handle = *r.out.handle;
3319 
3320         /* Return result */
3321         if (werror) {
3322                 *werror = r.out.result;
3323         }
3324 
3325         return werror_to_ntstatus(r.out.result);
3326 }
3327 
3328 NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3329                                      TALLOC_CTX *mem_ctx,
3330                                      const char *server /* [in] [unique,charset(UTF16)] */,
3331                                      struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
3332                                      struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
3333                                      struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
3334                                      struct spoolss_UserLevelCtr *userlevel_ctr /* [in] [ref] */,
3335                                      struct policy_handle *handle /* [out] [ref] */,
3336                                      WERROR *werror)
3337 {
3338         struct spoolss_AddPrinterEx r;
3339         NTSTATUS status;
3340 
3341         /* In parameters */
3342         r.in.server = server;
3343         r.in.info_ctr = info_ctr;
3344         r.in.devmode_ctr = devmode_ctr;
3345         r.in.secdesc_ctr = secdesc_ctr;
3346         r.in.userlevel_ctr = userlevel_ctr;
3347 
3348         if (DEBUGLEVEL >= 10) {
3349                 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &r);
3350         }
3351 
3352         status = cli->dispatch(cli,
3353                                 mem_ctx,
3354                                 &ndr_table_spoolss,
3355                                 NDR_SPOOLSS_ADDPRINTEREX,
3356                                 &r);
3357 
3358         if (!NT_STATUS_IS_OK(status)) {
3359                 return status;
3360         }
3361 
3362         if (DEBUGLEVEL >= 10) {
3363                 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &r);
3364         }
3365 
3366         if (NT_STATUS_IS_ERR(status)) {
3367                 return status;
3368         }
3369 
3370         /* Return variables */
3371         *handle = *r.out.handle;
3372 
3373         /* Return result */
3374         if (werror) {
3375                 *werror = r.out.result;
3376         }
3377 
3378         return werror_to_ntstatus(r.out.result);
3379 }
3380 
3381 NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3382                            TALLOC_CTX *mem_ctx,
3383                            WERROR *werror)
3384 {
3385         struct spoolss_47 r;
3386         NTSTATUS status;
3387 
3388         /* In parameters */
3389 
3390         if (DEBUGLEVEL >= 10) {
3391                 NDR_PRINT_IN_DEBUG(spoolss_47, &r);
3392         }
3393 
3394         status = cli->dispatch(cli,
3395                                 mem_ctx,
3396                                 &ndr_table_spoolss,
3397                                 NDR_SPOOLSS_47,
3398                                 &r);
3399 
3400         if (!NT_STATUS_IS_OK(status)) {
3401                 return status;
3402         }
3403 
3404         if (DEBUGLEVEL >= 10) {
3405                 NDR_PRINT_OUT_DEBUG(spoolss_47, &r);
3406         }
3407 
3408         if (NT_STATUS_IS_ERR(status)) {
3409                 return status;
3410         }
3411 
3412         /* Return variables */
3413 
3414         /* Return result */
3415         if (werror) {
3416                 *werror = r.out.result;
3417         }
3418 
3419         return werror_to_ntstatus(r.out.result);
3420 }
3421 
3422 NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3423                                         TALLOC_CTX *mem_ctx,
3424                                         struct policy_handle *handle /* [in] [ref] */,
3425                                         uint32_t enum_index /* [in]  */,
3426                                         const char *value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */,
3427                                         uint32_t value_offered /* [in]  */,
3428                                         uint32_t *value_needed /* [out] [ref] */,
3429                                         enum winreg_Type *type /* [out] [ref] */,
3430                                         uint8_t *data /* [out] [ref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(data_offered)] */,
3431                                         uint32_t data_offered /* [in]  */,
3432                                         uint32_t *data_needed /* [out] [ref] */,
3433                                         WERROR *werror)
3434 {
3435         struct spoolss_EnumPrinterData r;
3436         NTSTATUS status;
3437 
3438         /* In parameters */
3439         r.in.handle = handle;
3440         r.in.enum_index = enum_index;
3441         r.in.value_offered = value_offered;
3442         r.in.data_offered = data_offered;
3443 
3444         if (DEBUGLEVEL >= 10) {
3445                 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &r);
3446         }
3447 
3448         status = cli->dispatch(cli,
3449                                 mem_ctx,
3450                                 &ndr_table_spoolss,
3451                                 NDR_SPOOLSS_ENUMPRINTERDATA,
3452                                 &r);
3453 
3454         if (!NT_STATUS_IS_OK(status)) {
3455                 return status;
3456         }
3457 
3458         if (DEBUGLEVEL >= 10) {
3459                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &r);
3460         }
3461 
3462         if (NT_STATUS_IS_ERR(status)) {
3463                 return status;
3464         }
3465 
3466         /* Return variables */
3467         memcpy(CONST_DISCARD(char *, value_name), r.out.value_name, r.in.value_offered / 2 * sizeof(*value_name));
3468         *value_needed = *r.out.value_needed;
3469         *type = *r.out.type;
3470         memcpy(data, r.out.data, r.in.data_offered * sizeof(*data));
3471         *data_needed = *r.out.data_needed;
3472 
3473         /* Return result */
3474         if (werror) {
3475                 *werror = r.out.result;
3476         }
3477 
3478         return werror_to_ntstatus(r.out.result);
3479 }
3480 
3481 NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3482                                           TALLOC_CTX *mem_ctx,
3483                                           struct policy_handle *handle /* [in] [ref] */,
3484                                           const char *value_name /* [in] [charset(UTF16)] */,
3485                                           WERROR *werror)
3486 {
3487         struct spoolss_DeletePrinterData r;
3488         NTSTATUS status;
3489 
3490         /* In parameters */
3491         r.in.handle = handle;
3492         r.in.value_name = value_name;
3493 
3494         if (DEBUGLEVEL >= 10) {
3495                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &r);
3496         }
3497 
3498         status = cli->dispatch(cli,
3499                                 mem_ctx,
3500                                 &ndr_table_spoolss,
3501                                 NDR_SPOOLSS_DELETEPRINTERDATA,
3502                                 &r);
3503 
3504         if (!NT_STATUS_IS_OK(status)) {
3505                 return status;
3506         }
3507 
3508         if (DEBUGLEVEL >= 10) {
3509                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &r);
3510         }
3511 
3512         if (NT_STATUS_IS_ERR(status)) {
3513                 return status;
3514         }
3515 
3516         /* Return variables */
3517 
3518         /* Return result */
3519         if (werror) {
3520                 *werror = r.out.result;
3521         }
3522 
3523         return werror_to_ntstatus(r.out.result);
3524 }
3525 
3526 NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3527                            TALLOC_CTX *mem_ctx,
3528                            WERROR *werror)
3529 {
3530         struct spoolss_4a r;
3531         NTSTATUS status;
3532 
3533         /* In parameters */
3534 
3535         if (DEBUGLEVEL >= 10) {
3536                 NDR_PRINT_IN_DEBUG(spoolss_4a, &r);
3537         }
3538 
3539         status = cli->dispatch(cli,
3540                                 mem_ctx,
3541                                 &ndr_table_spoolss,
3542                                 NDR_SPOOLSS_4A,
3543                                 &r);
3544 
3545         if (!NT_STATUS_IS_OK(status)) {
3546                 return status;
3547         }
3548 
3549         if (DEBUGLEVEL >= 10) {
3550                 NDR_PRINT_OUT_DEBUG(spoolss_4a, &r);
3551         }
3552 
3553         if (NT_STATUS_IS_ERR(status)) {
3554                 return status;
3555         }
3556 
3557         /* Return variables */
3558 
3559         /* Return result */
3560         if (werror) {
3561                 *werror = r.out.result;
3562         }
3563 
3564         return werror_to_ntstatus(r.out.result);
3565 }
3566 
3567 NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3568                            TALLOC_CTX *mem_ctx,
3569                            WERROR *werror)
3570 {
3571         struct spoolss_4b r;
3572         NTSTATUS status;
3573 
3574         /* In parameters */
3575 
3576         if (DEBUGLEVEL >= 10) {
3577                 NDR_PRINT_IN_DEBUG(spoolss_4b, &r);
3578         }
3579 
3580         status = cli->dispatch(cli,
3581                                 mem_ctx,
3582                                 &ndr_table_spoolss,
3583                                 NDR_SPOOLSS_4B,
3584                                 &r);
3585 
3586         if (!NT_STATUS_IS_OK(status)) {
3587                 return status;
3588         }
3589 
3590         if (DEBUGLEVEL >= 10) {
3591                 NDR_PRINT_OUT_DEBUG(spoolss_4b, &r);
3592         }
3593 
3594         if (NT_STATUS_IS_ERR(status)) {
3595                 return status;
3596         }
3597 
3598         /* Return variables */
3599 
3600         /* Return result */
3601         if (werror) {
3602                 *werror = r.out.result;
3603         }
3604 
3605         return werror_to_ntstatus(r.out.result);
3606 }
3607 
3608 NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3609                            TALLOC_CTX *mem_ctx,
3610                            WERROR *werror)
3611 {
3612         struct spoolss_4c r;
3613         NTSTATUS status;
3614 
3615         /* In parameters */
3616 
3617         if (DEBUGLEVEL >= 10) {
3618                 NDR_PRINT_IN_DEBUG(spoolss_4c, &r);
3619         }
3620 
3621         status = cli->dispatch(cli,
3622                                 mem_ctx,
3623                                 &ndr_table_spoolss,
3624                                 NDR_SPOOLSS_4C,
3625                                 &r);
3626 
3627         if (!NT_STATUS_IS_OK(status)) {
3628                 return status;
3629         }
3630 
3631         if (DEBUGLEVEL >= 10) {
3632                 NDR_PRINT_OUT_DEBUG(spoolss_4c, &r);
3633         }
3634 
3635         if (NT_STATUS_IS_ERR(status)) {
3636                 return status;
3637         }
3638 
3639         /* Return variables */
3640 
3641         /* Return result */
3642         if (werror) {
3643                 *werror = r.out.result;
3644         }
3645 
3646         return werror_to_ntstatus(r.out.result);
3647 }
3648 
3649 NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3650                                          TALLOC_CTX *mem_ctx,
3651                                          struct policy_handle *handle /* [in] [ref] */,
3652                                          const char *key_name /* [in] [charset(UTF16)] */,
3653                                          const char *value_name /* [in] [charset(UTF16)] */,
3654                                          enum winreg_Type type /* [in]  */,
3655                                          uint8_t *buffer /* [in] [ref,size_is(offered)] */,
3656                                          uint32_t offered /* [in]  */,
3657                                          WERROR *werror)
3658 {
3659         struct spoolss_SetPrinterDataEx r;
3660         NTSTATUS status;
3661 
3662         /* In parameters */
3663         r.in.handle = handle;
3664         r.in.key_name = key_name;
3665         r.in.value_name = value_name;
3666         r.in.type = type;
3667         r.in.buffer = buffer;
3668         r.in.offered = offered;
3669 
3670         if (DEBUGLEVEL >= 10) {
3671                 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &r);
3672         }
3673 
3674         status = cli->dispatch(cli,
3675                                 mem_ctx,
3676                                 &ndr_table_spoolss,
3677                                 NDR_SPOOLSS_SETPRINTERDATAEX,
3678                                 &r);
3679 
3680         if (!NT_STATUS_IS_OK(status)) {
3681                 return status;
3682         }
3683 
3684         if (DEBUGLEVEL >= 10) {
3685                 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &r);
3686         }
3687 
3688         if (NT_STATUS_IS_ERR(status)) {
3689                 return status;
3690         }
3691 
3692         /* Return variables */
3693 
3694         /* Return result */
3695         if (werror) {
3696                 *werror = r.out.result;
3697         }
3698 
3699         return werror_to_ntstatus(r.out.result);
3700 }
3701 
3702 NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3703                                          TALLOC_CTX *mem_ctx,
3704                                          struct policy_handle *handle /* [in] [ref] */,
3705                                          const char *key_name /* [in] [charset(UTF16)] */,
3706                                          const char *value_name /* [in] [charset(UTF16)] */,
3707                                          enum winreg_Type *type /* [out] [ref] */,
3708                                          uint8_t *buffer /* [out] [ref,size_is(offered)] */,
3709                                          uint32_t offered /* [in]  */,
3710                                          uint32_t *needed /* [out] [ref] */,
3711                                          WERROR *werror)
3712 {
3713         struct spoolss_GetPrinterDataEx r;
3714         NTSTATUS status;
3715 
3716         /* In parameters */
3717         r.in.handle = handle;
3718         r.in.key_name = key_name;
3719         r.in.value_name = value_name;
3720         r.in.offered = offered;
3721 
3722         if (DEBUGLEVEL >= 10) {
3723                 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &r);
3724         }
3725 
3726         status = cli->dispatch(cli,
3727                                 mem_ctx,
3728                                 &ndr_table_spoolss,
3729                                 NDR_SPOOLSS_GETPRINTERDATAEX,
3730                                 &r);
3731 
3732         if (!NT_STATUS_IS_OK(status)) {
3733                 return status;
3734         }
3735 
3736         if (DEBUGLEVEL >= 10) {
3737                 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &r);
3738         }
3739 
3740         if (NT_STATUS_IS_ERR(status)) {
3741                 return status;
3742         }
3743 
3744         /* Return variables */
3745         *type = *r.out.type;
3746         memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3747         *needed = *r.out.needed;
3748 
3749         /* Return result */
3750         if (werror) {
3751                 *werror = r.out.result;
3752         }
3753 
3754         return werror_to_ntstatus(r.out.result);
3755 }
3756 
3757 NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3758                                           TALLOC_CTX *mem_ctx,
3759                                           struct policy_handle *handle /* [in] [ref] */,
3760                                           const char *key_name /* [in] [charset(UTF16)] */,
3761                                           uint32_t offered /* [in]  */,
3762                                           uint32_t *count /* [out] [ref] */,
3763                                           struct spoolss_PrinterEnumValues **info /* [out] [ref,size_is(,*count)] */,
3764                                           uint32_t *needed /* [out] [ref] */,
3765                                           WERROR *werror)
3766 {
3767         struct spoolss_EnumPrinterDataEx r;
3768         NTSTATUS status;
3769 
3770         /* In parameters */
3771         r.in.handle = handle;
3772         r.in.key_name = key_name;
3773         r.in.offered = offered;
3774 
3775         if (DEBUGLEVEL >= 10) {
3776                 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &r);
3777         }
3778 
3779         status = cli->dispatch(cli,
3780                                 mem_ctx,
3781                                 &ndr_table_spoolss,
3782                                 NDR_SPOOLSS_ENUMPRINTERDATAEX,
3783                                 &r);
3784 
3785         if (!NT_STATUS_IS_OK(status)) {
3786                 return status;
3787         }
3788 
3789         if (DEBUGLEVEL >= 10) {
3790                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &r);
3791         }
3792 
3793         if (NT_STATUS_IS_ERR(status)) {
3794                 return status;
3795         }
3796 
3797         /* Return variables */
3798         *count = *r.out.count;
3799         *info = *r.out.info;
3800         *needed = *r.out.needed;
3801 
3802         /* Return result */
3803         if (werror) {
3804                 *werror = r.out.result;
3805         }
3806 
3807         return werror_to_ntstatus(r.out.result);
3808 }
3809 
3810 NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3811                                        TALLOC_CTX *mem_ctx,
3812                                        struct policy_handle *handle /* [in] [ref] */,
3813                                        const char *key_name /* [in] [charset(UTF16)] */,
3814                                        const char ** *key_buffer /* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
3815                                        uint32_t offered /* [in]  */,
3816                                        uint32_t *needed /* [out] [ref] */,
3817                                        WERROR *werror)
3818 {
3819         struct spoolss_EnumPrinterKey r;
3820         NTSTATUS status;
3821 
3822         /* In parameters */
3823         r.in.handle = handle;
3824         r.in.key_name = key_name;
3825         r.in.offered = offered;
3826 
3827         if (DEBUGLEVEL >= 10) {
3828                 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &r);
3829         }
3830 
3831         status = cli->dispatch(cli,
3832                                 mem_ctx,
3833                                 &ndr_table_spoolss,
3834                                 NDR_SPOOLSS_ENUMPRINTERKEY,
3835                                 &r);
3836 
3837         if (!NT_STATUS_IS_OK(status)) {
3838                 return status;
3839         }
3840 
3841         if (DEBUGLEVEL >= 10) {
3842                 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &r);
3843         }
3844 
3845         if (NT_STATUS_IS_ERR(status)) {
3846                 return status;
3847         }
3848 
3849         /* Return variables */
3850         *key_buffer = *r.out.key_buffer;
3851         *needed = *r.out.needed;
3852 
3853         /* Return result */
3854         if (werror) {
3855                 *werror = r.out.result;
3856         }
3857 
3858         return werror_to_ntstatus(r.out.result);
3859 }
3860 
3861 NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3862                                             TALLOC_CTX *mem_ctx,
3863                                             struct policy_handle *handle /* [in] [ref] */,
3864                                             const char *key_name /* [in] [charset(UTF16)] */,
3865                                             const char *value_name /* [in] [charset(UTF16)] */,
3866                                             WERROR *werror)
3867 {
3868         struct spoolss_DeletePrinterDataEx r;
3869         NTSTATUS status;
3870 
3871         /* In parameters */
3872         r.in.handle = handle;
3873         r.in.key_name = key_name;
3874         r.in.value_name = value_name;
3875 
3876         if (DEBUGLEVEL >= 10) {
3877                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &r);
3878         }
3879 
3880         status = cli->dispatch(cli,
3881                                 mem_ctx,
3882                                 &ndr_table_spoolss,
3883                                 NDR_SPOOLSS_DELETEPRINTERDATAEX,
3884                                 &r);
3885 
3886         if (!NT_STATUS_IS_OK(status)) {
3887                 return status;
3888         }
3889 
3890         if (DEBUGLEVEL >= 10) {
3891                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &r);
3892         }
3893 
3894         if (NT_STATUS_IS_ERR(status)) {
3895                 return status;
3896         }
3897 
3898         /* Return variables */
3899 
3900         /* Return result */
3901         if (werror) {
3902                 *werror = r.out.result;
3903         }
3904 
3905         return werror_to_ntstatus(r.out.result);
3906 }
3907 
3908 NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3909                                          TALLOC_CTX *mem_ctx,
3910                                          struct policy_handle *handle /* [in] [ref] */,
3911                                          const char *key_name /* [in] [charset(UTF16)] */,
3912                                          WERROR *werror)
3913 {
3914         struct spoolss_DeletePrinterKey r;
3915         NTSTATUS status;
3916 
3917         /* In parameters */
3918         r.in.handle = handle;
3919         r.in.key_name = key_name;
3920 
3921         if (DEBUGLEVEL >= 10) {
3922                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &r);
3923         }
3924 
3925         status = cli->dispatch(cli,
3926                                 mem_ctx,
3927                                 &ndr_table_spoolss,
3928                                 NDR_SPOOLSS_DELETEPRINTERKEY,
3929                                 &r);
3930 
3931         if (!NT_STATUS_IS_OK(status)) {
3932                 return status;
3933         }
3934 
3935         if (DEBUGLEVEL >= 10) {
3936                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &r);
3937         }
3938 
3939         if (NT_STATUS_IS_ERR(status)) {
3940                 return status;
3941         }
3942 
3943         /* Return variables */
3944 
3945         /* Return result */
3946         if (werror) {
3947                 *werror = r.out.result;
3948         }
3949 
3950         return werror_to_ntstatus(r.out.result);
3951 }
3952 
3953 NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3954                            TALLOC_CTX *mem_ctx,
3955                            WERROR *werror)
3956 {
3957         struct spoolss_53 r;
3958         NTSTATUS status;
3959 
3960         /* In parameters */
3961 
3962         if (DEBUGLEVEL >= 10) {
3963                 NDR_PRINT_IN_DEBUG(spoolss_53, &r);
3964         }
3965 
3966         status = cli->dispatch(cli,
3967                                 mem_ctx,
3968                                 &ndr_table_spoolss,
3969                                 NDR_SPOOLSS_53,
3970                                 &r);
3971 
3972         if (!NT_STATUS_IS_OK(status)) {
3973                 return status;
3974         }
3975 
3976         if (DEBUGLEVEL >= 10) {
3977                 NDR_PRINT_OUT_DEBUG(spoolss_53, &r);
3978         }
3979 
3980         if (NT_STATUS_IS_ERR(status)) {
3981                 return status;
3982         }
3983 
3984         /* Return variables */
3985 
3986         /* Return result */
3987         if (werror) {
3988                 *werror = r.out.result;
3989         }
3990 
3991         return werror_to_ntstatus(r.out.result);
3992 }
3993 
3994 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
3995                                               TALLOC_CTX *mem_ctx,
3996                                               const char *server /* [in] [unique,charset(UTF16)] */,
3997                                               const char *architecture /* [in] [charset(UTF16)] */,
3998                                               const char *driver /* [in] [charset(UTF16)] */,
3999                                               uint32_t delete_flags /* [in]  */,
4000                                               uint32_t version /* [in]  */,
4001                                               WERROR *werror)
4002 {
4003         struct spoolss_DeletePrinterDriverEx r;
4004         NTSTATUS status;
4005 
4006         /* In parameters */
4007         r.in.server = server;
4008         r.in.architecture = architecture;
4009         r.in.driver = driver;
4010         r.in.delete_flags = delete_flags;
4011         r.in.version = version;
4012 
4013         if (DEBUGLEVEL >= 10) {
4014                 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4015         }
4016 
4017         status = cli->dispatch(cli,
4018                                 mem_ctx,
4019                                 &ndr_table_spoolss,
4020                                 NDR_SPOOLSS_DELETEPRINTERDRIVEREX,
4021                                 &r);
4022 
4023         if (!NT_STATUS_IS_OK(status)) {
4024                 return status;
4025         }
4026 
4027         if (DEBUGLEVEL >= 10) {
4028                 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4029         }
4030 
4031         if (NT_STATUS_IS_ERR(status)) {
4032                 return status;
4033         }
4034 
4035         /* Return variables */
4036 
4037         /* Return result */
4038         if (werror) {
4039                 *werror = r.out.result;
4040         }
4041 
4042         return werror_to_ntstatus(r.out.result);
4043 }
4044 
4045 NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4046                            TALLOC_CTX *mem_ctx,
4047                            WERROR *werror)
4048 {
4049         struct spoolss_55 r;
4050         NTSTATUS status;
4051 
4052         /* In parameters */
4053 
4054         if (DEBUGLEVEL >= 10) {
4055                 NDR_PRINT_IN_DEBUG(spoolss_55, &r);
4056         }
4057 
4058         status = cli->dispatch(cli,
4059                                 mem_ctx,
4060                                 &ndr_table_spoolss,
4061                                 NDR_SPOOLSS_55,
4062                                 &r);
4063 
4064         if (!NT_STATUS_IS_OK(status)) {
4065                 return status;
4066         }
4067 
4068         if (DEBUGLEVEL >= 10) {
4069                 NDR_PRINT_OUT_DEBUG(spoolss_55, &r);
4070         }
4071 
4072         if (NT_STATUS_IS_ERR(status)) {
4073                 return status;
4074         }
4075 
4076         /* Return variables */
4077 
4078         /* Return result */
4079         if (werror) {
4080                 *werror = r.out.result;
4081         }
4082 
4083         return werror_to_ntstatus(r.out.result);
4084 }
4085 
4086 NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4087                            TALLOC_CTX *mem_ctx,
4088                            WERROR *werror)
4089 {
4090         struct spoolss_56 r;
4091         NTSTATUS status;
4092 
4093         /* In parameters */
4094 
4095         if (DEBUGLEVEL >= 10) {
4096                 NDR_PRINT_IN_DEBUG(spoolss_56, &r);
4097         }
4098 
4099         status = cli->dispatch(cli,
4100                                 mem_ctx,
4101                                 &ndr_table_spoolss,
4102                                 NDR_SPOOLSS_56,
4103                                 &r);
4104 
4105         if (!NT_STATUS_IS_OK(status)) {
4106                 return status;
4107         }
4108 
4109         if (DEBUGLEVEL >= 10) {
4110                 NDR_PRINT_OUT_DEBUG(spoolss_56, &r);
4111         }
4112 
4113         if (NT_STATUS_IS_ERR(status)) {
4114                 return status;
4115         }
4116 
4117         /* Return variables */
4118 
4119         /* Return result */
4120         if (werror) {
4121                 *werror = r.out.result;
4122         }
4123 
4124         return werror_to_ntstatus(r.out.result);
4125 }
4126 
4127 NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4128                            TALLOC_CTX *mem_ctx,
4129                            WERROR *werror)
4130 {
4131         struct spoolss_57 r;
4132         NTSTATUS status;
4133 
4134         /* In parameters */
4135 
4136         if (DEBUGLEVEL >= 10) {
4137                 NDR_PRINT_IN_DEBUG(spoolss_57, &r);
4138         }
4139 
4140         status = cli->dispatch(cli,
4141                                 mem_ctx,
4142                                 &ndr_table_spoolss,
4143                                 NDR_SPOOLSS_57,
4144                                 &r);
4145 
4146         if (!NT_STATUS_IS_OK(status)) {
4147                 return status;
4148         }
4149 
4150         if (DEBUGLEVEL >= 10) {
4151                 NDR_PRINT_OUT_DEBUG(spoolss_57, &r);
4152         }
4153 
4154         if (NT_STATUS_IS_ERR(status)) {
4155                 return status;
4156         }
4157 
4158         /* Return variables */
4159 
4160         /* Return result */
4161         if (werror) {
4162                 *werror = r.out.result;
4163         }
4164 
4165         return werror_to_ntstatus(r.out.result);
4166 }
4167 
4168 NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4169                                 TALLOC_CTX *mem_ctx,
4170                                 struct policy_handle *handle /* [in] [ref] */,
4171                                 const char *function_name /* [in] [charset(UTF16)] */,
4172                                 DATA_BLOB in_data /* [in]  */,
4173                                 uint32_t _in_data_length /* [in] [value(r->in.in_data.length)] */,
4174                                 uint8_t *out_data /* [out] [ref,size_is(out_data_size)] */,
4175                                 uint32_t out_data_size /* [in]  */,
4176                                 uint32_t *needed /* [out] [ref] */,
4177                                 uint32_t *status_code /* [in,out] [ref] */,
4178                                 WERROR *werror)
4179 {
4180         struct spoolss_XcvData r;
4181         NTSTATUS status;
4182 
4183         /* In parameters */
4184         r.in.handle = handle;
4185         r.in.function_name = function_name;
4186         r.in.in_data = in_data;
4187         r.in._in_data_length = _in_data_length;
4188         r.in.out_data_size = out_data_size;
4189         r.in.status_code = status_code;
4190 
4191         if (DEBUGLEVEL >= 10) {
4192                 NDR_PRINT_IN_DEBUG(spoolss_XcvData, &r);
4193         }
4194 
4195         status = cli->dispatch(cli,
4196                                 mem_ctx,
4197                                 &ndr_table_spoolss,
4198                                 NDR_SPOOLSS_XCVDATA,
4199                                 &r);
4200 
4201         if (!NT_STATUS_IS_OK(status)) {
4202                 return status;
4203         }
4204 
4205         if (DEBUGLEVEL >= 10) {
4206                 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &r);
4207         }
4208 
4209         if (NT_STATUS_IS_ERR(status)) {
4210                 return status;
4211         }
4212 
4213         /* Return variables */
4214         memcpy(out_data, r.out.out_data, r.in.out_data_size * sizeof(*out_data));
4215         *needed = *r.out.needed;
4216         *status_code = *r.out.status_code;
4217 
4218         /* Return result */
4219         if (werror) {
4220                 *werror = r.out.result;
4221         }
4222 
4223         return werror_to_ntstatus(r.out.result);
4224 }
4225 
4226 NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4227                                            TALLOC_CTX *mem_ctx,
4228                                            const char *servername /* [in] [unique,charset(UTF16)] */,
4229                                            struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
4230                                            uint32_t flags /* [in]  */,
4231                                            WERROR *werror)
4232 {
4233         struct spoolss_AddPrinterDriverEx r;
4234         NTSTATUS status;
4235 
4236         /* In parameters */
4237         r.in.servername = servername;
4238         r.in.info_ctr = info_ctr;
4239         r.in.flags = flags;
4240 
4241         if (DEBUGLEVEL >= 10) {
4242                 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &r);
4243         }
4244 
4245         status = cli->dispatch(cli,
4246                                 mem_ctx,
4247                                 &ndr_table_spoolss,
4248                                 NDR_SPOOLSS_ADDPRINTERDRIVEREX,
4249                                 &r);
4250 
4251         if (!NT_STATUS_IS_OK(status)) {
4252                 return status;
4253         }
4254 
4255         if (DEBUGLEVEL >= 10) {
4256                 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &r);
4257         }
4258 
4259         if (NT_STATUS_IS_ERR(status)) {
4260                 return status;
4261         }
4262 
4263         /* Return variables */
4264 
4265         /* Return result */
4266         if (werror) {
4267                 *werror = r.out.result;
4268         }
4269 
4270         return werror_to_ntstatus(r.out.result);
4271 }
4272 
4273 NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4274                            TALLOC_CTX *mem_ctx,
4275                            WERROR *werror)
4276 {
4277         struct spoolss_5a r;
4278         NTSTATUS status;
4279 
4280         /* In parameters */
4281 
4282         if (DEBUGLEVEL >= 10) {
4283                 NDR_PRINT_IN_DEBUG(spoolss_5a, &r);
4284         }
4285 
4286         status = cli->dispatch(cli,
4287                                 mem_ctx,
4288                                 &ndr_table_spoolss,
4289                                 NDR_SPOOLSS_5A,
4290                                 &r);
4291 
4292         if (!NT_STATUS_IS_OK(status)) {
4293                 return status;
4294         }
4295 
4296         if (DEBUGLEVEL >= 10) {
4297                 NDR_PRINT_OUT_DEBUG(spoolss_5a, &r);
4298         }
4299 
4300         if (NT_STATUS_IS_ERR(status)) {
4301                 return status;
4302         }
4303 
4304         /* Return variables */
4305 
4306         /* Return result */
4307         if (werror) {
4308                 *werror = r.out.result;
4309         }
4310 
4311         return werror_to_ntstatus(r.out.result);
4312 }
4313 
4314 NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4315                            TALLOC_CTX *mem_ctx,
4316                            WERROR *werror)
4317 {
4318         struct spoolss_5b r;
4319         NTSTATUS status;
4320 
4321         /* In parameters */
4322 
4323         if (DEBUGLEVEL >= 10) {
4324                 NDR_PRINT_IN_DEBUG(spoolss_5b, &r);
4325         }
4326 
4327         status = cli->dispatch(cli,
4328                                 mem_ctx,
4329                                 &ndr_table_spoolss,
4330                                 NDR_SPOOLSS_5B,
4331                                 &r);
4332 
4333         if (!NT_STATUS_IS_OK(status)) {
4334                 return status;
4335         }
4336 
4337         if (DEBUGLEVEL >= 10) {
4338                 NDR_PRINT_OUT_DEBUG(spoolss_5b, &r);
4339         }
4340 
4341         if (NT_STATUS_IS_ERR(status)) {
4342                 return status;
4343         }
4344 
4345         /* Return variables */
4346 
4347         /* Return result */
4348         if (werror) {
4349                 *werror = r.out.result;
4350         }
4351 
4352         return werror_to_ntstatus(r.out.result);
4353 }
4354 
4355 NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4356                            TALLOC_CTX *mem_ctx,
4357                            WERROR *werror)
4358 {
4359         struct spoolss_5c r;
4360         NTSTATUS status;
4361 
4362         /* In parameters */
4363 
4364         if (DEBUGLEVEL >= 10) {
4365                 NDR_PRINT_IN_DEBUG(spoolss_5c, &r);
4366         }
4367 
4368         status = cli->dispatch(cli,
4369                                 mem_ctx,
4370                                 &ndr_table_spoolss,
4371                                 NDR_SPOOLSS_5C,
4372                                 &r);
4373 
4374         if (!NT_STATUS_IS_OK(status)) {
4375                 return status;
4376         }
4377 
4378         if (DEBUGLEVEL >= 10) {
4379                 NDR_PRINT_OUT_DEBUG(spoolss_5c, &r);
4380         }
4381 
4382         if (NT_STATUS_IS_ERR(status)) {
4383                 return status;
4384         }
4385 
4386         /* Return variables */
4387 
4388         /* Return result */
4389         if (werror) {
4390                 *werror = r.out.result;
4391         }
4392 
4393         return werror_to_ntstatus(r.out.result);
4394 }
4395 
4396 NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4397                            TALLOC_CTX *mem_ctx,
4398                            WERROR *werror)
4399 {
4400         struct spoolss_5d r;
4401         NTSTATUS status;
4402 
4403         /* In parameters */
4404 
4405         if (DEBUGLEVEL >= 10) {
4406                 NDR_PRINT_IN_DEBUG(spoolss_5d, &r);
4407         }
4408 
4409         status = cli->dispatch(cli,
4410                                 mem_ctx,
4411                                 &ndr_table_spoolss,
4412                                 NDR_SPOOLSS_5D,
4413                                 &r);
4414 
4415         if (!NT_STATUS_IS_OK(status)) {
4416                 return status;
4417         }
4418 
4419         if (DEBUGLEVEL >= 10) {
4420                 NDR_PRINT_OUT_DEBUG(spoolss_5d, &r);
4421         }
4422 
4423         if (NT_STATUS_IS_ERR(status)) {
4424                 return status;
4425         }
4426 
4427         /* Return variables */
4428 
4429         /* Return result */
4430         if (werror) {
4431                 *werror = r.out.result;
4432         }
4433 
4434         return werror_to_ntstatus(r.out.result);
4435 }
4436 
4437 NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4438                            TALLOC_CTX *mem_ctx,
4439                            WERROR *werror)
4440 {
4441         struct spoolss_5e r;
4442         NTSTATUS status;
4443 
4444         /* In parameters */
4445 
4446         if (DEBUGLEVEL >= 10) {
4447                 NDR_PRINT_IN_DEBUG(spoolss_5e, &r);
4448         }
4449 
4450         status = cli->dispatch(cli,
4451                                 mem_ctx,
4452                                 &ndr_table_spoolss,
4453                                 NDR_SPOOLSS_5E,
4454                                 &r);
4455 
4456         if (!NT_STATUS_IS_OK(status)) {
4457                 return status;
4458         }
4459 
4460         if (DEBUGLEVEL >= 10) {
4461                 NDR_PRINT_OUT_DEBUG(spoolss_5e, &r);
4462         }
4463 
4464         if (NT_STATUS_IS_ERR(status)) {
4465                 return status;
4466         }
4467 
4468         /* Return variables */
4469 
4470         /* Return result */
4471         if (werror) {
4472                 *werror = r.out.result;
4473         }
4474 
4475         return werror_to_ntstatus(r.out.result);
4476 }
4477 
4478 NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
     /* [<][>][^][v][top][bottom][index][help] */
4479                            TALLOC_CTX *mem_ctx,
4480                            WERROR *werror)
4481 {
4482         struct spoolss_5f r;
4483         NTSTATUS status;
4484 
4485         /* In parameters */
4486 
4487         if (DEBUGLEVEL >= 10) {
4488                 NDR_PRINT_IN_DEBUG(spoolss_5f, &r);
4489         }
4490 
4491         status = cli->dispatch(cli,
4492                                 mem_ctx,
4493                                 &ndr_table_spoolss,
4494                                 NDR_SPOOLSS_5F,
4495                                 &r);
4496 
4497         if (!NT_STATUS_IS_OK(status)) {
4498                 return status;
4499         }
4500 
4501         if (DEBUGLEVEL >= 10) {
4502                 NDR_PRINT_OUT_DEBUG(spoolss_5f, &r);
4503         }
4504 
4505         if (NT_STATUS_IS_ERR(status)) {
4506                 return status;
4507         }
4508 
4509         /* Return variables */
4510 
4511         /* Return result */
4512         if (werror) {
4513                 *werror = r.out.result;
4514         }
4515 
4516         return werror_to_ntstatus(r.out.result);
4517 }
4518 

/* [<][>][^][v][top][bottom][index][help] */