s3: re-run make samba3-idl.
[Samba/gebeck_regimport.git] / librpc / gen_ndr / cli_spoolss.c
blob04065c830b1f9d151bdbca1396520e72ba9b26fb
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/cli_spoolss.h"
9 NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli,
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 union spoolss_PrinterInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
17 uint32_t *needed /* [out] [ref] */,
18 uint32_t count /* [out] */,
19 WERROR *werror)
21 struct spoolss_EnumPrinters r;
22 NTSTATUS status;
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;
31 if (DEBUGLEVEL >= 10) {
32 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, &r);
35 status = cli->dispatch(cli,
36 mem_ctx,
37 &ndr_table_spoolss,
38 NDR_SPOOLSS_ENUMPRINTERS,
39 &r);
41 if (!NT_STATUS_IS_OK(status)) {
42 return status;
45 if (DEBUGLEVEL >= 10) {
46 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, &r);
49 if (NT_STATUS_IS_ERR(status)) {
50 return status;
53 /* Return variables */
54 if (info && r.out.info) {
55 memcpy(info, r.out.info, count * sizeof(*info));
57 *needed = *r.out.needed;
58 return NT_STATUS_NOT_SUPPORTED;
60 /* Return result */
61 if (werror) {
62 *werror = r.out.result;
65 return werror_to_ntstatus(r.out.result);
68 NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli,
69 TALLOC_CTX *mem_ctx,
70 const char *printername /* [in] [unique,charset(UTF16)] */,
71 const char *datatype /* [in] [unique,charset(UTF16)] */,
72 struct spoolss_DevmodeContainer devmode_ctr /* [in] */,
73 uint32_t access_mask /* [in] */,
74 struct policy_handle *handle /* [out] [ref] */,
75 WERROR *werror)
77 struct spoolss_OpenPrinter r;
78 NTSTATUS status;
80 /* In parameters */
81 r.in.printername = printername;
82 r.in.datatype = datatype;
83 r.in.devmode_ctr = devmode_ctr;
84 r.in.access_mask = access_mask;
86 if (DEBUGLEVEL >= 10) {
87 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, &r);
90 status = cli->dispatch(cli,
91 mem_ctx,
92 &ndr_table_spoolss,
93 NDR_SPOOLSS_OPENPRINTER,
94 &r);
96 if (!NT_STATUS_IS_OK(status)) {
97 return status;
100 if (DEBUGLEVEL >= 10) {
101 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, &r);
104 if (NT_STATUS_IS_ERR(status)) {
105 return status;
108 /* Return variables */
109 *handle = *r.out.handle;
111 /* Return result */
112 if (werror) {
113 *werror = r.out.result;
116 return werror_to_ntstatus(r.out.result);
119 NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli,
120 TALLOC_CTX *mem_ctx,
121 struct policy_handle *handle /* [in] [ref] */,
122 uint32_t job_id /* [in] */,
123 struct spoolss_JobInfoContainer *ctr /* [in] [unique] */,
124 enum spoolss_JobControl command /* [in] */,
125 WERROR *werror)
127 struct spoolss_SetJob r;
128 NTSTATUS status;
130 /* In parameters */
131 r.in.handle = handle;
132 r.in.job_id = job_id;
133 r.in.ctr = ctr;
134 r.in.command = command;
136 if (DEBUGLEVEL >= 10) {
137 NDR_PRINT_IN_DEBUG(spoolss_SetJob, &r);
140 status = cli->dispatch(cli,
141 mem_ctx,
142 &ndr_table_spoolss,
143 NDR_SPOOLSS_SETJOB,
144 &r);
146 if (!NT_STATUS_IS_OK(status)) {
147 return status;
150 if (DEBUGLEVEL >= 10) {
151 NDR_PRINT_OUT_DEBUG(spoolss_SetJob, &r);
154 if (NT_STATUS_IS_ERR(status)) {
155 return status;
158 /* Return variables */
160 /* Return result */
161 if (werror) {
162 *werror = r.out.result;
165 return werror_to_ntstatus(r.out.result);
168 NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli,
169 TALLOC_CTX *mem_ctx,
170 struct policy_handle *handle /* [in] [ref] */,
171 uint32_t job_id /* [in] */,
172 uint32_t level /* [in] */,
173 DATA_BLOB *buffer /* [in] [unique] */,
174 uint32_t offered /* [in] */,
175 union spoolss_JobInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
176 uint32_t *needed /* [out] [ref] */,
177 WERROR *werror)
179 struct spoolss_GetJob r;
180 NTSTATUS status;
182 /* In parameters */
183 r.in.handle = handle;
184 r.in.job_id = job_id;
185 r.in.level = level;
186 r.in.buffer = buffer;
187 r.in.offered = offered;
189 if (DEBUGLEVEL >= 10) {
190 NDR_PRINT_IN_DEBUG(spoolss_GetJob, &r);
193 status = cli->dispatch(cli,
194 mem_ctx,
195 &ndr_table_spoolss,
196 NDR_SPOOLSS_GETJOB,
197 &r);
199 if (!NT_STATUS_IS_OK(status)) {
200 return status;
203 if (DEBUGLEVEL >= 10) {
204 NDR_PRINT_OUT_DEBUG(spoolss_GetJob, &r);
207 if (NT_STATUS_IS_ERR(status)) {
208 return status;
211 /* Return variables */
212 if (info && r.out.info) {
213 *info = *r.out.info;
215 *needed = *r.out.needed;
217 /* Return result */
218 if (werror) {
219 *werror = r.out.result;
222 return werror_to_ntstatus(r.out.result);
225 NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli,
226 TALLOC_CTX *mem_ctx,
227 struct policy_handle *handle /* [in] [ref] */,
228 uint32_t firstjob /* [in] */,
229 uint32_t numjobs /* [in] */,
230 uint32_t level /* [in] */,
231 DATA_BLOB *buffer /* [in] [unique] */,
232 uint32_t offered /* [in] */,
233 union spoolss_JobInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
234 uint32_t *needed /* [out] [ref] */,
235 uint32_t count /* [out] */,
236 WERROR *werror)
238 struct spoolss_EnumJobs r;
239 NTSTATUS status;
241 /* In parameters */
242 r.in.handle = handle;
243 r.in.firstjob = firstjob;
244 r.in.numjobs = numjobs;
245 r.in.level = level;
246 r.in.buffer = buffer;
247 r.in.offered = offered;
249 if (DEBUGLEVEL >= 10) {
250 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, &r);
253 status = cli->dispatch(cli,
254 mem_ctx,
255 &ndr_table_spoolss,
256 NDR_SPOOLSS_ENUMJOBS,
257 &r);
259 if (!NT_STATUS_IS_OK(status)) {
260 return status;
263 if (DEBUGLEVEL >= 10) {
264 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, &r);
267 if (NT_STATUS_IS_ERR(status)) {
268 return status;
271 /* Return variables */
272 if (info && r.out.info) {
273 memcpy(info, r.out.info, count * sizeof(*info));
275 *needed = *r.out.needed;
276 return NT_STATUS_NOT_SUPPORTED;
278 /* Return result */
279 if (werror) {
280 *werror = r.out.result;
283 return werror_to_ntstatus(r.out.result);
286 NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli,
287 TALLOC_CTX *mem_ctx,
288 WERROR *werror)
290 struct spoolss_AddPrinter r;
291 NTSTATUS status;
293 /* In parameters */
295 if (DEBUGLEVEL >= 10) {
296 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, &r);
299 status = cli->dispatch(cli,
300 mem_ctx,
301 &ndr_table_spoolss,
302 NDR_SPOOLSS_ADDPRINTER,
303 &r);
305 if (!NT_STATUS_IS_OK(status)) {
306 return status;
309 if (DEBUGLEVEL >= 10) {
310 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, &r);
313 if (NT_STATUS_IS_ERR(status)) {
314 return status;
317 /* Return variables */
319 /* Return result */
320 if (werror) {
321 *werror = r.out.result;
324 return werror_to_ntstatus(r.out.result);
327 NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli,
328 TALLOC_CTX *mem_ctx,
329 struct policy_handle *handle /* [in] [ref] */,
330 WERROR *werror)
332 struct spoolss_DeletePrinter r;
333 NTSTATUS status;
335 /* In parameters */
336 r.in.handle = handle;
338 if (DEBUGLEVEL >= 10) {
339 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, &r);
342 status = cli->dispatch(cli,
343 mem_ctx,
344 &ndr_table_spoolss,
345 NDR_SPOOLSS_DELETEPRINTER,
346 &r);
348 if (!NT_STATUS_IS_OK(status)) {
349 return status;
352 if (DEBUGLEVEL >= 10) {
353 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, &r);
356 if (NT_STATUS_IS_ERR(status)) {
357 return status;
360 /* Return variables */
362 /* Return result */
363 if (werror) {
364 *werror = r.out.result;
367 return werror_to_ntstatus(r.out.result);
370 NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli,
371 TALLOC_CTX *mem_ctx,
372 struct policy_handle *handle /* [in] [ref] */,
373 uint32_t level /* [in] */,
374 union spoolss_SetPrinterInfo info /* [in] [switch_is(level)] */,
375 struct spoolss_DevmodeContainer devmode_ctr /* [in] */,
376 struct sec_desc_buf secdesc_ctr /* [in] */,
377 enum spoolss_PrinterControl command /* [in] */,
378 WERROR *werror)
380 struct spoolss_SetPrinter r;
381 NTSTATUS status;
383 /* In parameters */
384 r.in.handle = handle;
385 r.in.level = level;
386 r.in.info = info;
387 r.in.devmode_ctr = devmode_ctr;
388 r.in.secdesc_ctr = secdesc_ctr;
389 r.in.command = command;
391 if (DEBUGLEVEL >= 10) {
392 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, &r);
395 status = cli->dispatch(cli,
396 mem_ctx,
397 &ndr_table_spoolss,
398 NDR_SPOOLSS_SETPRINTER,
399 &r);
401 if (!NT_STATUS_IS_OK(status)) {
402 return status;
405 if (DEBUGLEVEL >= 10) {
406 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, &r);
409 if (NT_STATUS_IS_ERR(status)) {
410 return status;
413 /* Return variables */
415 /* Return result */
416 if (werror) {
417 *werror = r.out.result;
420 return werror_to_ntstatus(r.out.result);
423 NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli,
424 TALLOC_CTX *mem_ctx,
425 struct policy_handle *handle /* [in] [ref] */,
426 uint32_t level /* [in] */,
427 DATA_BLOB *buffer /* [in] [unique] */,
428 uint32_t offered /* [in] */,
429 union spoolss_PrinterInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
430 uint32_t *needed /* [out] [ref] */,
431 WERROR *werror)
433 struct spoolss_GetPrinter r;
434 NTSTATUS status;
436 /* In parameters */
437 r.in.handle = handle;
438 r.in.level = level;
439 r.in.buffer = buffer;
440 r.in.offered = offered;
442 if (DEBUGLEVEL >= 10) {
443 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, &r);
446 status = cli->dispatch(cli,
447 mem_ctx,
448 &ndr_table_spoolss,
449 NDR_SPOOLSS_GETPRINTER,
450 &r);
452 if (!NT_STATUS_IS_OK(status)) {
453 return status;
456 if (DEBUGLEVEL >= 10) {
457 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, &r);
460 if (NT_STATUS_IS_ERR(status)) {
461 return status;
464 /* Return variables */
465 if (info && r.out.info) {
466 *info = *r.out.info;
468 *needed = *r.out.needed;
470 /* Return result */
471 if (werror) {
472 *werror = r.out.result;
475 return werror_to_ntstatus(r.out.result);
478 NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli,
479 TALLOC_CTX *mem_ctx,
480 WERROR *werror)
482 struct spoolss_AddPrinterDriver r;
483 NTSTATUS status;
485 /* In parameters */
487 if (DEBUGLEVEL >= 10) {
488 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, &r);
491 status = cli->dispatch(cli,
492 mem_ctx,
493 &ndr_table_spoolss,
494 NDR_SPOOLSS_ADDPRINTERDRIVER,
495 &r);
497 if (!NT_STATUS_IS_OK(status)) {
498 return status;
501 if (DEBUGLEVEL >= 10) {
502 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, &r);
505 if (NT_STATUS_IS_ERR(status)) {
506 return status;
509 /* Return variables */
511 /* Return result */
512 if (werror) {
513 *werror = r.out.result;
516 return werror_to_ntstatus(r.out.result);
519 NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
520 TALLOC_CTX *mem_ctx,
521 const char *server /* [in] [unique,charset(UTF16)] */,
522 const char *environment /* [in] [unique,charset(UTF16)] */,
523 uint32_t level /* [in] */,
524 DATA_BLOB *buffer /* [in] [unique] */,
525 uint32_t offered /* [in] */,
526 union spoolss_DriverInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
527 uint32_t *needed /* [out] [ref] */,
528 uint32_t count /* [out] */,
529 WERROR *werror)
531 struct spoolss_EnumPrinterDrivers r;
532 NTSTATUS status;
534 /* In parameters */
535 r.in.server = server;
536 r.in.environment = environment;
537 r.in.level = level;
538 r.in.buffer = buffer;
539 r.in.offered = offered;
541 if (DEBUGLEVEL >= 10) {
542 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, &r);
545 status = cli->dispatch(cli,
546 mem_ctx,
547 &ndr_table_spoolss,
548 NDR_SPOOLSS_ENUMPRINTERDRIVERS,
549 &r);
551 if (!NT_STATUS_IS_OK(status)) {
552 return status;
555 if (DEBUGLEVEL >= 10) {
556 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, &r);
559 if (NT_STATUS_IS_ERR(status)) {
560 return status;
563 /* Return variables */
564 if (info && r.out.info) {
565 memcpy(info, r.out.info, count * sizeof(*info));
567 *needed = *r.out.needed;
568 return NT_STATUS_NOT_SUPPORTED;
570 /* Return result */
571 if (werror) {
572 *werror = r.out.result;
575 return werror_to_ntstatus(r.out.result);
578 NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli,
579 TALLOC_CTX *mem_ctx,
580 WERROR *werror)
582 struct spoolss_GetPrinterDriver r;
583 NTSTATUS status;
585 /* In parameters */
587 if (DEBUGLEVEL >= 10) {
588 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &r);
591 status = cli->dispatch(cli,
592 mem_ctx,
593 &ndr_table_spoolss,
594 NDR_SPOOLSS_GETPRINTERDRIVER,
595 &r);
597 if (!NT_STATUS_IS_OK(status)) {
598 return status;
601 if (DEBUGLEVEL >= 10) {
602 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &r);
605 if (NT_STATUS_IS_ERR(status)) {
606 return status;
609 /* Return variables */
611 /* Return result */
612 if (werror) {
613 *werror = r.out.result;
616 return werror_to_ntstatus(r.out.result);
619 NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
620 TALLOC_CTX *mem_ctx,
621 const char *server /* [in] [unique,charset(UTF16)] */,
622 const char *environment /* [in] [unique,charset(UTF16)] */,
623 uint32_t level /* [in] */,
624 DATA_BLOB *buffer /* [in] [unique] */,
625 uint32_t offered /* [in] */,
626 union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
627 uint32_t *needed /* [out] [ref] */,
628 WERROR *werror)
630 struct spoolss_GetPrinterDriverDirectory r;
631 NTSTATUS status;
633 /* In parameters */
634 r.in.server = server;
635 r.in.environment = environment;
636 r.in.level = level;
637 r.in.buffer = buffer;
638 r.in.offered = offered;
640 if (DEBUGLEVEL >= 10) {
641 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
644 status = cli->dispatch(cli,
645 mem_ctx,
646 &ndr_table_spoolss,
647 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY,
648 &r);
650 if (!NT_STATUS_IS_OK(status)) {
651 return status;
654 if (DEBUGLEVEL >= 10) {
655 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
658 if (NT_STATUS_IS_ERR(status)) {
659 return status;
662 /* Return variables */
663 if (info && r.out.info) {
664 *info = *r.out.info;
666 *needed = *r.out.needed;
668 /* Return result */
669 if (werror) {
670 *werror = r.out.result;
673 return werror_to_ntstatus(r.out.result);
676 NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
677 TALLOC_CTX *mem_ctx,
678 struct policy_handle *handle /* [in] [ref] */,
679 const char *server /* [in] [unique,charset(UTF16)] */,
680 const char *architecture /* [in] [charset(UTF16)] */,
681 const char *driver /* [in] [charset(UTF16)] */,
682 WERROR *werror)
684 struct spoolss_DeletePrinterDriver r;
685 NTSTATUS status;
687 /* In parameters */
688 r.in.handle = handle;
689 r.in.server = server;
690 r.in.architecture = architecture;
691 r.in.driver = driver;
693 if (DEBUGLEVEL >= 10) {
694 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &r);
697 status = cli->dispatch(cli,
698 mem_ctx,
699 &ndr_table_spoolss,
700 NDR_SPOOLSS_DELETEPRINTERDRIVER,
701 &r);
703 if (!NT_STATUS_IS_OK(status)) {
704 return status;
707 if (DEBUGLEVEL >= 10) {
708 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &r);
711 if (NT_STATUS_IS_ERR(status)) {
712 return status;
715 /* Return variables */
717 /* Return result */
718 if (werror) {
719 *werror = r.out.result;
722 return werror_to_ntstatus(r.out.result);
725 NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
726 TALLOC_CTX *mem_ctx,
727 WERROR *werror)
729 struct spoolss_AddPrintProcessor r;
730 NTSTATUS status;
732 /* In parameters */
734 if (DEBUGLEVEL >= 10) {
735 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &r);
738 status = cli->dispatch(cli,
739 mem_ctx,
740 &ndr_table_spoolss,
741 NDR_SPOOLSS_ADDPRINTPROCESSOR,
742 &r);
744 if (!NT_STATUS_IS_OK(status)) {
745 return status;
748 if (DEBUGLEVEL >= 10) {
749 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &r);
752 if (NT_STATUS_IS_ERR(status)) {
753 return status;
756 /* Return variables */
758 /* Return result */
759 if (werror) {
760 *werror = r.out.result;
763 return werror_to_ntstatus(r.out.result);
766 NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
767 TALLOC_CTX *mem_ctx,
768 const char *servername /* [in] [unique,charset(UTF16)] */,
769 const char *environment /* [in] [unique,charset(UTF16)] */,
770 uint32_t level /* [in] */,
771 DATA_BLOB *buffer /* [in] [unique] */,
772 uint32_t offered /* [in] */,
773 union spoolss_PrintProcessorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
774 uint32_t *needed /* [out] [ref] */,
775 uint32_t count /* [out] */,
776 WERROR *werror)
778 struct spoolss_EnumPrintProcessors r;
779 NTSTATUS status;
781 /* In parameters */
782 r.in.servername = servername;
783 r.in.environment = environment;
784 r.in.level = level;
785 r.in.buffer = buffer;
786 r.in.offered = offered;
788 if (DEBUGLEVEL >= 10) {
789 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &r);
792 status = cli->dispatch(cli,
793 mem_ctx,
794 &ndr_table_spoolss,
795 NDR_SPOOLSS_ENUMPRINTPROCESSORS,
796 &r);
798 if (!NT_STATUS_IS_OK(status)) {
799 return status;
802 if (DEBUGLEVEL >= 10) {
803 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &r);
806 if (NT_STATUS_IS_ERR(status)) {
807 return status;
810 /* Return variables */
811 if (info && r.out.info) {
812 memcpy(info, r.out.info, count * sizeof(*info));
814 *needed = *r.out.needed;
815 return NT_STATUS_NOT_SUPPORTED;
817 /* Return result */
818 if (werror) {
819 *werror = r.out.result;
822 return werror_to_ntstatus(r.out.result);
825 NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
826 TALLOC_CTX *mem_ctx,
827 WERROR *werror)
829 struct spoolss_GetPrintProcessorDirectory r;
830 NTSTATUS status;
832 /* In parameters */
834 if (DEBUGLEVEL >= 10) {
835 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
838 status = cli->dispatch(cli,
839 mem_ctx,
840 &ndr_table_spoolss,
841 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY,
842 &r);
844 if (!NT_STATUS_IS_OK(status)) {
845 return status;
848 if (DEBUGLEVEL >= 10) {
849 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
852 if (NT_STATUS_IS_ERR(status)) {
853 return status;
856 /* Return variables */
858 /* Return result */
859 if (werror) {
860 *werror = r.out.result;
863 return werror_to_ntstatus(r.out.result);
866 NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
867 TALLOC_CTX *mem_ctx,
868 struct policy_handle *handle /* [in] [ref] */,
869 uint32_t level /* [in] */,
870 union spoolss_DocumentInfo info /* [in] [switch_is(level)] */,
871 uint32_t *job_id /* [out] [ref] */,
872 WERROR *werror)
874 struct spoolss_StartDocPrinter r;
875 NTSTATUS status;
877 /* In parameters */
878 r.in.handle = handle;
879 r.in.level = level;
880 r.in.info = info;
882 if (DEBUGLEVEL >= 10) {
883 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &r);
886 status = cli->dispatch(cli,
887 mem_ctx,
888 &ndr_table_spoolss,
889 NDR_SPOOLSS_STARTDOCPRINTER,
890 &r);
892 if (!NT_STATUS_IS_OK(status)) {
893 return status;
896 if (DEBUGLEVEL >= 10) {
897 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &r);
900 if (NT_STATUS_IS_ERR(status)) {
901 return status;
904 /* Return variables */
905 *job_id = *r.out.job_id;
907 /* Return result */
908 if (werror) {
909 *werror = r.out.result;
912 return werror_to_ntstatus(r.out.result);
915 NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
916 TALLOC_CTX *mem_ctx,
917 struct policy_handle *handle /* [in] [ref] */,
918 WERROR *werror)
920 struct spoolss_StartPagePrinter r;
921 NTSTATUS status;
923 /* In parameters */
924 r.in.handle = handle;
926 if (DEBUGLEVEL >= 10) {
927 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &r);
930 status = cli->dispatch(cli,
931 mem_ctx,
932 &ndr_table_spoolss,
933 NDR_SPOOLSS_STARTPAGEPRINTER,
934 &r);
936 if (!NT_STATUS_IS_OK(status)) {
937 return status;
940 if (DEBUGLEVEL >= 10) {
941 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &r);
944 if (NT_STATUS_IS_ERR(status)) {
945 return status;
948 /* Return variables */
950 /* Return result */
951 if (werror) {
952 *werror = r.out.result;
955 return werror_to_ntstatus(r.out.result);
958 NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
959 TALLOC_CTX *mem_ctx,
960 struct policy_handle *handle /* [in] [ref] */,
961 DATA_BLOB data /* [in] */,
962 uint32_t _data_size /* [in] [value(r->in.data.length)] */,
963 uint32_t *num_written /* [out] [ref] */,
964 WERROR *werror)
966 struct spoolss_WritePrinter r;
967 NTSTATUS status;
969 /* In parameters */
970 r.in.handle = handle;
971 r.in.data = data;
972 r.in._data_size = _data_size;
974 if (DEBUGLEVEL >= 10) {
975 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &r);
978 status = cli->dispatch(cli,
979 mem_ctx,
980 &ndr_table_spoolss,
981 NDR_SPOOLSS_WRITEPRINTER,
982 &r);
984 if (!NT_STATUS_IS_OK(status)) {
985 return status;
988 if (DEBUGLEVEL >= 10) {
989 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &r);
992 if (NT_STATUS_IS_ERR(status)) {
993 return status;
996 /* Return variables */
997 *num_written = *r.out.num_written;
999 /* Return result */
1000 if (werror) {
1001 *werror = r.out.result;
1004 return werror_to_ntstatus(r.out.result);
1007 NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
1008 TALLOC_CTX *mem_ctx,
1009 struct policy_handle *handle /* [in] [ref] */,
1010 WERROR *werror)
1012 struct spoolss_EndPagePrinter r;
1013 NTSTATUS status;
1015 /* In parameters */
1016 r.in.handle = handle;
1018 if (DEBUGLEVEL >= 10) {
1019 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &r);
1022 status = cli->dispatch(cli,
1023 mem_ctx,
1024 &ndr_table_spoolss,
1025 NDR_SPOOLSS_ENDPAGEPRINTER,
1026 &r);
1028 if (!NT_STATUS_IS_OK(status)) {
1029 return status;
1032 if (DEBUGLEVEL >= 10) {
1033 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &r);
1036 if (NT_STATUS_IS_ERR(status)) {
1037 return status;
1040 /* Return variables */
1042 /* Return result */
1043 if (werror) {
1044 *werror = r.out.result;
1047 return werror_to_ntstatus(r.out.result);
1050 NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
1051 TALLOC_CTX *mem_ctx,
1052 struct policy_handle *handle /* [in] [ref] */,
1053 WERROR *werror)
1055 struct spoolss_AbortPrinter r;
1056 NTSTATUS status;
1058 /* In parameters */
1059 r.in.handle = handle;
1061 if (DEBUGLEVEL >= 10) {
1062 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &r);
1065 status = cli->dispatch(cli,
1066 mem_ctx,
1067 &ndr_table_spoolss,
1068 NDR_SPOOLSS_ABORTPRINTER,
1069 &r);
1071 if (!NT_STATUS_IS_OK(status)) {
1072 return status;
1075 if (DEBUGLEVEL >= 10) {
1076 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &r);
1079 if (NT_STATUS_IS_ERR(status)) {
1080 return status;
1083 /* Return variables */
1085 /* Return result */
1086 if (werror) {
1087 *werror = r.out.result;
1090 return werror_to_ntstatus(r.out.result);
1093 NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
1094 TALLOC_CTX *mem_ctx,
1095 struct policy_handle *handle /* [in] [ref] */,
1096 uint8_t *data /* [out] [ref,size_is(data_size)] */,
1097 uint32_t data_size /* [in] */,
1098 uint32_t *_data_size /* [out] [ref] */,
1099 WERROR *werror)
1101 struct spoolss_ReadPrinter r;
1102 NTSTATUS status;
1104 /* In parameters */
1105 r.in.handle = handle;
1106 r.in.data_size = data_size;
1108 if (DEBUGLEVEL >= 10) {
1109 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &r);
1112 status = cli->dispatch(cli,
1113 mem_ctx,
1114 &ndr_table_spoolss,
1115 NDR_SPOOLSS_READPRINTER,
1116 &r);
1118 if (!NT_STATUS_IS_OK(status)) {
1119 return status;
1122 if (DEBUGLEVEL >= 10) {
1123 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &r);
1126 if (NT_STATUS_IS_ERR(status)) {
1127 return status;
1130 /* Return variables */
1131 memcpy(data, r.out.data, r.in.data_size * sizeof(*data));
1132 *_data_size = *r.out._data_size;
1134 /* Return result */
1135 if (werror) {
1136 *werror = r.out.result;
1139 return werror_to_ntstatus(r.out.result);
1142 NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
1143 TALLOC_CTX *mem_ctx,
1144 struct policy_handle *handle /* [in] [ref] */,
1145 WERROR *werror)
1147 struct spoolss_EndDocPrinter r;
1148 NTSTATUS status;
1150 /* In parameters */
1151 r.in.handle = handle;
1153 if (DEBUGLEVEL >= 10) {
1154 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &r);
1157 status = cli->dispatch(cli,
1158 mem_ctx,
1159 &ndr_table_spoolss,
1160 NDR_SPOOLSS_ENDDOCPRINTER,
1161 &r);
1163 if (!NT_STATUS_IS_OK(status)) {
1164 return status;
1167 if (DEBUGLEVEL >= 10) {
1168 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &r);
1171 if (NT_STATUS_IS_ERR(status)) {
1172 return status;
1175 /* Return variables */
1177 /* Return result */
1178 if (werror) {
1179 *werror = r.out.result;
1182 return werror_to_ntstatus(r.out.result);
1185 NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
1186 TALLOC_CTX *mem_ctx,
1187 WERROR *werror)
1189 struct spoolss_AddJob r;
1190 NTSTATUS status;
1192 /* In parameters */
1194 if (DEBUGLEVEL >= 10) {
1195 NDR_PRINT_IN_DEBUG(spoolss_AddJob, &r);
1198 status = cli->dispatch(cli,
1199 mem_ctx,
1200 &ndr_table_spoolss,
1201 NDR_SPOOLSS_ADDJOB,
1202 &r);
1204 if (!NT_STATUS_IS_OK(status)) {
1205 return status;
1208 if (DEBUGLEVEL >= 10) {
1209 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &r);
1212 if (NT_STATUS_IS_ERR(status)) {
1213 return status;
1216 /* Return variables */
1218 /* Return result */
1219 if (werror) {
1220 *werror = r.out.result;
1223 return werror_to_ntstatus(r.out.result);
1226 NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
1227 TALLOC_CTX *mem_ctx,
1228 WERROR *werror)
1230 struct spoolss_ScheduleJob r;
1231 NTSTATUS status;
1233 /* In parameters */
1235 if (DEBUGLEVEL >= 10) {
1236 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &r);
1239 status = cli->dispatch(cli,
1240 mem_ctx,
1241 &ndr_table_spoolss,
1242 NDR_SPOOLSS_SCHEDULEJOB,
1243 &r);
1245 if (!NT_STATUS_IS_OK(status)) {
1246 return status;
1249 if (DEBUGLEVEL >= 10) {
1250 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &r);
1253 if (NT_STATUS_IS_ERR(status)) {
1254 return status;
1257 /* Return variables */
1259 /* Return result */
1260 if (werror) {
1261 *werror = r.out.result;
1264 return werror_to_ntstatus(r.out.result);
1267 NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
1268 TALLOC_CTX *mem_ctx,
1269 struct policy_handle *handle /* [in] [ref] */,
1270 const char *value_name /* [in] [charset(UTF16)] */,
1271 uint32_t offered /* [in] */,
1272 enum spoolss_PrinterDataType type /* [out] */,
1273 union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(type)] */,
1274 uint32_t *needed /* [out] [ref] */,
1275 WERROR *werror)
1277 struct spoolss_GetPrinterData r;
1278 NTSTATUS status;
1280 /* In parameters */
1281 r.in.handle = handle;
1282 r.in.value_name = value_name;
1283 r.in.offered = offered;
1285 if (DEBUGLEVEL >= 10) {
1286 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &r);
1289 status = cli->dispatch(cli,
1290 mem_ctx,
1291 &ndr_table_spoolss,
1292 NDR_SPOOLSS_GETPRINTERDATA,
1293 &r);
1295 if (!NT_STATUS_IS_OK(status)) {
1296 return status;
1299 if (DEBUGLEVEL >= 10) {
1300 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &r);
1303 if (NT_STATUS_IS_ERR(status)) {
1304 return status;
1307 /* Return variables */
1308 return NT_STATUS_NOT_SUPPORTED;
1309 return NT_STATUS_NOT_SUPPORTED;
1310 *needed = *r.out.needed;
1312 /* Return result */
1313 if (werror) {
1314 *werror = r.out.result;
1317 return werror_to_ntstatus(r.out.result);
1320 NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
1321 TALLOC_CTX *mem_ctx,
1322 struct policy_handle *handle /* [in] [ref] */,
1323 const char *value_name /* [in] [charset(UTF16)] */,
1324 enum spoolss_PrinterDataType type /* [in] */,
1325 union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */,
1326 uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1327 WERROR *werror)
1329 struct spoolss_SetPrinterData r;
1330 NTSTATUS status;
1332 /* In parameters */
1333 r.in.handle = handle;
1334 r.in.value_name = value_name;
1335 r.in.type = type;
1336 r.in.data = data;
1337 r.in._offered = _offered;
1339 if (DEBUGLEVEL >= 10) {
1340 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &r);
1343 status = cli->dispatch(cli,
1344 mem_ctx,
1345 &ndr_table_spoolss,
1346 NDR_SPOOLSS_SETPRINTERDATA,
1347 &r);
1349 if (!NT_STATUS_IS_OK(status)) {
1350 return status;
1353 if (DEBUGLEVEL >= 10) {
1354 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &r);
1357 if (NT_STATUS_IS_ERR(status)) {
1358 return status;
1361 /* Return variables */
1363 /* Return result */
1364 if (werror) {
1365 *werror = r.out.result;
1368 return werror_to_ntstatus(r.out.result);
1371 NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
1372 TALLOC_CTX *mem_ctx,
1373 WERROR *werror)
1375 struct spoolss_WaitForPrinterChange r;
1376 NTSTATUS status;
1378 /* In parameters */
1380 if (DEBUGLEVEL >= 10) {
1381 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &r);
1384 status = cli->dispatch(cli,
1385 mem_ctx,
1386 &ndr_table_spoolss,
1387 NDR_SPOOLSS_WAITFORPRINTERCHANGE,
1388 &r);
1390 if (!NT_STATUS_IS_OK(status)) {
1391 return status;
1394 if (DEBUGLEVEL >= 10) {
1395 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &r);
1398 if (NT_STATUS_IS_ERR(status)) {
1399 return status;
1402 /* Return variables */
1404 /* Return result */
1405 if (werror) {
1406 *werror = r.out.result;
1409 return werror_to_ntstatus(r.out.result);
1412 NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
1413 TALLOC_CTX *mem_ctx,
1414 struct policy_handle *handle /* [in,out] [ref] */,
1415 WERROR *werror)
1417 struct spoolss_ClosePrinter r;
1418 NTSTATUS status;
1420 /* In parameters */
1421 r.in.handle = handle;
1423 if (DEBUGLEVEL >= 10) {
1424 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &r);
1427 status = cli->dispatch(cli,
1428 mem_ctx,
1429 &ndr_table_spoolss,
1430 NDR_SPOOLSS_CLOSEPRINTER,
1431 &r);
1433 if (!NT_STATUS_IS_OK(status)) {
1434 return status;
1437 if (DEBUGLEVEL >= 10) {
1438 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &r);
1441 if (NT_STATUS_IS_ERR(status)) {
1442 return status;
1445 /* Return variables */
1446 *handle = *r.out.handle;
1448 /* Return result */
1449 if (werror) {
1450 *werror = r.out.result;
1453 return werror_to_ntstatus(r.out.result);
1456 NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
1457 TALLOC_CTX *mem_ctx,
1458 struct policy_handle *handle /* [in] [ref] */,
1459 uint32_t level /* [in] */,
1460 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1461 WERROR *werror)
1463 struct spoolss_AddForm r;
1464 NTSTATUS status;
1466 /* In parameters */
1467 r.in.handle = handle;
1468 r.in.level = level;
1469 r.in.info = info;
1471 if (DEBUGLEVEL >= 10) {
1472 NDR_PRINT_IN_DEBUG(spoolss_AddForm, &r);
1475 status = cli->dispatch(cli,
1476 mem_ctx,
1477 &ndr_table_spoolss,
1478 NDR_SPOOLSS_ADDFORM,
1479 &r);
1481 if (!NT_STATUS_IS_OK(status)) {
1482 return status;
1485 if (DEBUGLEVEL >= 10) {
1486 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &r);
1489 if (NT_STATUS_IS_ERR(status)) {
1490 return status;
1493 /* Return variables */
1495 /* Return result */
1496 if (werror) {
1497 *werror = r.out.result;
1500 return werror_to_ntstatus(r.out.result);
1503 NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
1504 TALLOC_CTX *mem_ctx,
1505 struct policy_handle *handle /* [in] [ref] */,
1506 const char *form_name /* [in] [charset(UTF16)] */,
1507 WERROR *werror)
1509 struct spoolss_DeleteForm r;
1510 NTSTATUS status;
1512 /* In parameters */
1513 r.in.handle = handle;
1514 r.in.form_name = form_name;
1516 if (DEBUGLEVEL >= 10) {
1517 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &r);
1520 status = cli->dispatch(cli,
1521 mem_ctx,
1522 &ndr_table_spoolss,
1523 NDR_SPOOLSS_DELETEFORM,
1524 &r);
1526 if (!NT_STATUS_IS_OK(status)) {
1527 return status;
1530 if (DEBUGLEVEL >= 10) {
1531 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &r);
1534 if (NT_STATUS_IS_ERR(status)) {
1535 return status;
1538 /* Return variables */
1540 /* Return result */
1541 if (werror) {
1542 *werror = r.out.result;
1545 return werror_to_ntstatus(r.out.result);
1548 NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
1549 TALLOC_CTX *mem_ctx,
1550 struct policy_handle *handle /* [in] [ref] */,
1551 const char *form_name /* [in] [charset(UTF16)] */,
1552 uint32_t level /* [in] */,
1553 DATA_BLOB *buffer /* [in] [unique] */,
1554 uint32_t offered /* [in] */,
1555 union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1556 uint32_t *needed /* [out] [ref] */,
1557 WERROR *werror)
1559 struct spoolss_GetForm r;
1560 NTSTATUS status;
1562 /* In parameters */
1563 r.in.handle = handle;
1564 r.in.form_name = form_name;
1565 r.in.level = level;
1566 r.in.buffer = buffer;
1567 r.in.offered = offered;
1569 if (DEBUGLEVEL >= 10) {
1570 NDR_PRINT_IN_DEBUG(spoolss_GetForm, &r);
1573 status = cli->dispatch(cli,
1574 mem_ctx,
1575 &ndr_table_spoolss,
1576 NDR_SPOOLSS_GETFORM,
1577 &r);
1579 if (!NT_STATUS_IS_OK(status)) {
1580 return status;
1583 if (DEBUGLEVEL >= 10) {
1584 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &r);
1587 if (NT_STATUS_IS_ERR(status)) {
1588 return status;
1591 /* Return variables */
1592 if (info && r.out.info) {
1593 *info = *r.out.info;
1595 *needed = *r.out.needed;
1597 /* Return result */
1598 if (werror) {
1599 *werror = r.out.result;
1602 return werror_to_ntstatus(r.out.result);
1605 NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
1606 TALLOC_CTX *mem_ctx,
1607 struct policy_handle *handle /* [in] [ref] */,
1608 const char *form_name /* [in] [charset(UTF16)] */,
1609 uint32_t level /* [in] */,
1610 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1611 WERROR *werror)
1613 struct spoolss_SetForm r;
1614 NTSTATUS status;
1616 /* In parameters */
1617 r.in.handle = handle;
1618 r.in.form_name = form_name;
1619 r.in.level = level;
1620 r.in.info = info;
1622 if (DEBUGLEVEL >= 10) {
1623 NDR_PRINT_IN_DEBUG(spoolss_SetForm, &r);
1626 status = cli->dispatch(cli,
1627 mem_ctx,
1628 &ndr_table_spoolss,
1629 NDR_SPOOLSS_SETFORM,
1630 &r);
1632 if (!NT_STATUS_IS_OK(status)) {
1633 return status;
1636 if (DEBUGLEVEL >= 10) {
1637 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &r);
1640 if (NT_STATUS_IS_ERR(status)) {
1641 return status;
1644 /* Return variables */
1646 /* Return result */
1647 if (werror) {
1648 *werror = r.out.result;
1651 return werror_to_ntstatus(r.out.result);
1654 NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
1655 TALLOC_CTX *mem_ctx,
1656 struct policy_handle *handle /* [in] [ref] */,
1657 uint32_t level /* [in] */,
1658 DATA_BLOB *buffer /* [in] [unique] */,
1659 uint32_t offered /* [in] */,
1660 union spoolss_FormInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
1661 uint32_t *needed /* [out] [ref] */,
1662 uint32_t count /* [out] */,
1663 WERROR *werror)
1665 struct spoolss_EnumForms r;
1666 NTSTATUS status;
1668 /* In parameters */
1669 r.in.handle = handle;
1670 r.in.level = level;
1671 r.in.buffer = buffer;
1672 r.in.offered = offered;
1674 if (DEBUGLEVEL >= 10) {
1675 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &r);
1678 status = cli->dispatch(cli,
1679 mem_ctx,
1680 &ndr_table_spoolss,
1681 NDR_SPOOLSS_ENUMFORMS,
1682 &r);
1684 if (!NT_STATUS_IS_OK(status)) {
1685 return status;
1688 if (DEBUGLEVEL >= 10) {
1689 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &r);
1692 if (NT_STATUS_IS_ERR(status)) {
1693 return status;
1696 /* Return variables */
1697 if (info && r.out.info) {
1698 memcpy(info, r.out.info, count * sizeof(*info));
1700 *needed = *r.out.needed;
1701 return NT_STATUS_NOT_SUPPORTED;
1703 /* Return result */
1704 if (werror) {
1705 *werror = r.out.result;
1708 return werror_to_ntstatus(r.out.result);
1711 NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
1712 TALLOC_CTX *mem_ctx,
1713 const char *servername /* [in] [unique,charset(UTF16)] */,
1714 uint32_t level /* [in] */,
1715 DATA_BLOB *buffer /* [in] [unique] */,
1716 uint32_t offered /* [in] */,
1717 union spoolss_PortInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
1718 uint32_t *needed /* [out] [ref] */,
1719 uint32_t count /* [out] */,
1720 WERROR *werror)
1722 struct spoolss_EnumPorts r;
1723 NTSTATUS status;
1725 /* In parameters */
1726 r.in.servername = servername;
1727 r.in.level = level;
1728 r.in.buffer = buffer;
1729 r.in.offered = offered;
1731 if (DEBUGLEVEL >= 10) {
1732 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &r);
1735 status = cli->dispatch(cli,
1736 mem_ctx,
1737 &ndr_table_spoolss,
1738 NDR_SPOOLSS_ENUMPORTS,
1739 &r);
1741 if (!NT_STATUS_IS_OK(status)) {
1742 return status;
1745 if (DEBUGLEVEL >= 10) {
1746 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &r);
1749 if (NT_STATUS_IS_ERR(status)) {
1750 return status;
1753 /* Return variables */
1754 if (info && r.out.info) {
1755 memcpy(info, r.out.info, count * sizeof(*info));
1757 *needed = *r.out.needed;
1758 return NT_STATUS_NOT_SUPPORTED;
1760 /* Return result */
1761 if (werror) {
1762 *werror = r.out.result;
1765 return werror_to_ntstatus(r.out.result);
1768 NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
1769 TALLOC_CTX *mem_ctx,
1770 const char *servername /* [in] [unique,charset(UTF16)] */,
1771 uint32_t level /* [in] */,
1772 DATA_BLOB *buffer /* [in] [unique] */,
1773 uint32_t offered /* [in] */,
1774 union spoolss_MonitorInfo *info /* [out] [unique,switch_is(level),size_is(count)] */,
1775 uint32_t *needed /* [out] [ref] */,
1776 uint32_t count /* [out] */,
1777 WERROR *werror)
1779 struct spoolss_EnumMonitors r;
1780 NTSTATUS status;
1782 /* In parameters */
1783 r.in.servername = servername;
1784 r.in.level = level;
1785 r.in.buffer = buffer;
1786 r.in.offered = offered;
1788 if (DEBUGLEVEL >= 10) {
1789 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &r);
1792 status = cli->dispatch(cli,
1793 mem_ctx,
1794 &ndr_table_spoolss,
1795 NDR_SPOOLSS_ENUMMONITORS,
1796 &r);
1798 if (!NT_STATUS_IS_OK(status)) {
1799 return status;
1802 if (DEBUGLEVEL >= 10) {
1803 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &r);
1806 if (NT_STATUS_IS_ERR(status)) {
1807 return status;
1810 /* Return variables */
1811 if (info && r.out.info) {
1812 memcpy(info, r.out.info, count * sizeof(*info));
1814 *needed = *r.out.needed;
1815 return NT_STATUS_NOT_SUPPORTED;
1817 /* Return result */
1818 if (werror) {
1819 *werror = r.out.result;
1822 return werror_to_ntstatus(r.out.result);
1825 NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
1826 TALLOC_CTX *mem_ctx,
1827 const char *server_name /* [in] [unique,charset(UTF16)] */,
1828 uint32_t unknown /* [in] */,
1829 const char *monitor_name /* [in] [charset(UTF16)] */,
1830 WERROR *werror)
1832 struct spoolss_AddPort r;
1833 NTSTATUS status;
1835 /* In parameters */
1836 r.in.server_name = server_name;
1837 r.in.unknown = unknown;
1838 r.in.monitor_name = monitor_name;
1840 if (DEBUGLEVEL >= 10) {
1841 NDR_PRINT_IN_DEBUG(spoolss_AddPort, &r);
1844 status = cli->dispatch(cli,
1845 mem_ctx,
1846 &ndr_table_spoolss,
1847 NDR_SPOOLSS_ADDPORT,
1848 &r);
1850 if (!NT_STATUS_IS_OK(status)) {
1851 return status;
1854 if (DEBUGLEVEL >= 10) {
1855 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &r);
1858 if (NT_STATUS_IS_ERR(status)) {
1859 return status;
1862 /* Return variables */
1864 /* Return result */
1865 if (werror) {
1866 *werror = r.out.result;
1869 return werror_to_ntstatus(r.out.result);
1872 NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
1873 TALLOC_CTX *mem_ctx,
1874 WERROR *werror)
1876 struct spoolss_ConfigurePort r;
1877 NTSTATUS status;
1879 /* In parameters */
1881 if (DEBUGLEVEL >= 10) {
1882 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &r);
1885 status = cli->dispatch(cli,
1886 mem_ctx,
1887 &ndr_table_spoolss,
1888 NDR_SPOOLSS_CONFIGUREPORT,
1889 &r);
1891 if (!NT_STATUS_IS_OK(status)) {
1892 return status;
1895 if (DEBUGLEVEL >= 10) {
1896 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &r);
1899 if (NT_STATUS_IS_ERR(status)) {
1900 return status;
1903 /* Return variables */
1905 /* Return result */
1906 if (werror) {
1907 *werror = r.out.result;
1910 return werror_to_ntstatus(r.out.result);
1913 NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
1914 TALLOC_CTX *mem_ctx,
1915 WERROR *werror)
1917 struct spoolss_DeletePort r;
1918 NTSTATUS status;
1920 /* In parameters */
1922 if (DEBUGLEVEL >= 10) {
1923 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &r);
1926 status = cli->dispatch(cli,
1927 mem_ctx,
1928 &ndr_table_spoolss,
1929 NDR_SPOOLSS_DELETEPORT,
1930 &r);
1932 if (!NT_STATUS_IS_OK(status)) {
1933 return status;
1936 if (DEBUGLEVEL >= 10) {
1937 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &r);
1940 if (NT_STATUS_IS_ERR(status)) {
1941 return status;
1944 /* Return variables */
1946 /* Return result */
1947 if (werror) {
1948 *werror = r.out.result;
1951 return werror_to_ntstatus(r.out.result);
1954 NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
1955 TALLOC_CTX *mem_ctx,
1956 WERROR *werror)
1958 struct spoolss_CreatePrinterIC r;
1959 NTSTATUS status;
1961 /* In parameters */
1963 if (DEBUGLEVEL >= 10) {
1964 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r);
1967 status = cli->dispatch(cli,
1968 mem_ctx,
1969 &ndr_table_spoolss,
1970 NDR_SPOOLSS_CREATEPRINTERIC,
1971 &r);
1973 if (!NT_STATUS_IS_OK(status)) {
1974 return status;
1977 if (DEBUGLEVEL >= 10) {
1978 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &r);
1981 if (NT_STATUS_IS_ERR(status)) {
1982 return status;
1985 /* Return variables */
1987 /* Return result */
1988 if (werror) {
1989 *werror = r.out.result;
1992 return werror_to_ntstatus(r.out.result);
1995 NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
1996 TALLOC_CTX *mem_ctx,
1997 WERROR *werror)
1999 struct spoolss_PlayGDIScriptOnPrinterIC r;
2000 NTSTATUS status;
2002 /* In parameters */
2004 if (DEBUGLEVEL >= 10) {
2005 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2008 status = cli->dispatch(cli,
2009 mem_ctx,
2010 &ndr_table_spoolss,
2011 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC,
2012 &r);
2014 if (!NT_STATUS_IS_OK(status)) {
2015 return status;
2018 if (DEBUGLEVEL >= 10) {
2019 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2022 if (NT_STATUS_IS_ERR(status)) {
2023 return status;
2026 /* Return variables */
2028 /* Return result */
2029 if (werror) {
2030 *werror = r.out.result;
2033 return werror_to_ntstatus(r.out.result);
2036 NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
2037 TALLOC_CTX *mem_ctx,
2038 WERROR *werror)
2040 struct spoolss_DeletePrinterIC r;
2041 NTSTATUS status;
2043 /* In parameters */
2045 if (DEBUGLEVEL >= 10) {
2046 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r);
2049 status = cli->dispatch(cli,
2050 mem_ctx,
2051 &ndr_table_spoolss,
2052 NDR_SPOOLSS_DELETEPRINTERIC,
2053 &r);
2055 if (!NT_STATUS_IS_OK(status)) {
2056 return status;
2059 if (DEBUGLEVEL >= 10) {
2060 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &r);
2063 if (NT_STATUS_IS_ERR(status)) {
2064 return status;
2067 /* Return variables */
2069 /* Return result */
2070 if (werror) {
2071 *werror = r.out.result;
2074 return werror_to_ntstatus(r.out.result);
2077 NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
2078 TALLOC_CTX *mem_ctx,
2079 WERROR *werror)
2081 struct spoolss_AddPrinterConnection r;
2082 NTSTATUS status;
2084 /* In parameters */
2086 if (DEBUGLEVEL >= 10) {
2087 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &r);
2090 status = cli->dispatch(cli,
2091 mem_ctx,
2092 &ndr_table_spoolss,
2093 NDR_SPOOLSS_ADDPRINTERCONNECTION,
2094 &r);
2096 if (!NT_STATUS_IS_OK(status)) {
2097 return status;
2100 if (DEBUGLEVEL >= 10) {
2101 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &r);
2104 if (NT_STATUS_IS_ERR(status)) {
2105 return status;
2108 /* Return variables */
2110 /* Return result */
2111 if (werror) {
2112 *werror = r.out.result;
2115 return werror_to_ntstatus(r.out.result);
2118 NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
2119 TALLOC_CTX *mem_ctx,
2120 WERROR *werror)
2122 struct spoolss_DeletePrinterConnection r;
2123 NTSTATUS status;
2125 /* In parameters */
2127 if (DEBUGLEVEL >= 10) {
2128 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &r);
2131 status = cli->dispatch(cli,
2132 mem_ctx,
2133 &ndr_table_spoolss,
2134 NDR_SPOOLSS_DELETEPRINTERCONNECTION,
2135 &r);
2137 if (!NT_STATUS_IS_OK(status)) {
2138 return status;
2141 if (DEBUGLEVEL >= 10) {
2142 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &r);
2145 if (NT_STATUS_IS_ERR(status)) {
2146 return status;
2149 /* Return variables */
2151 /* Return result */
2152 if (werror) {
2153 *werror = r.out.result;
2156 return werror_to_ntstatus(r.out.result);
2159 NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
2160 TALLOC_CTX *mem_ctx,
2161 WERROR *werror)
2163 struct spoolss_PrinterMessageBox r;
2164 NTSTATUS status;
2166 /* In parameters */
2168 if (DEBUGLEVEL >= 10) {
2169 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &r);
2172 status = cli->dispatch(cli,
2173 mem_ctx,
2174 &ndr_table_spoolss,
2175 NDR_SPOOLSS_PRINTERMESSAGEBOX,
2176 &r);
2178 if (!NT_STATUS_IS_OK(status)) {
2179 return status;
2182 if (DEBUGLEVEL >= 10) {
2183 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &r);
2186 if (NT_STATUS_IS_ERR(status)) {
2187 return status;
2190 /* Return variables */
2192 /* Return result */
2193 if (werror) {
2194 *werror = r.out.result;
2197 return werror_to_ntstatus(r.out.result);
2200 NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
2201 TALLOC_CTX *mem_ctx,
2202 WERROR *werror)
2204 struct spoolss_AddMonitor r;
2205 NTSTATUS status;
2207 /* In parameters */
2209 if (DEBUGLEVEL >= 10) {
2210 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &r);
2213 status = cli->dispatch(cli,
2214 mem_ctx,
2215 &ndr_table_spoolss,
2216 NDR_SPOOLSS_ADDMONITOR,
2217 &r);
2219 if (!NT_STATUS_IS_OK(status)) {
2220 return status;
2223 if (DEBUGLEVEL >= 10) {
2224 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &r);
2227 if (NT_STATUS_IS_ERR(status)) {
2228 return status;
2231 /* Return variables */
2233 /* Return result */
2234 if (werror) {
2235 *werror = r.out.result;
2238 return werror_to_ntstatus(r.out.result);
2241 NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
2242 TALLOC_CTX *mem_ctx,
2243 WERROR *werror)
2245 struct spoolss_DeleteMonitor r;
2246 NTSTATUS status;
2248 /* In parameters */
2250 if (DEBUGLEVEL >= 10) {
2251 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &r);
2254 status = cli->dispatch(cli,
2255 mem_ctx,
2256 &ndr_table_spoolss,
2257 NDR_SPOOLSS_DELETEMONITOR,
2258 &r);
2260 if (!NT_STATUS_IS_OK(status)) {
2261 return status;
2264 if (DEBUGLEVEL >= 10) {
2265 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &r);
2268 if (NT_STATUS_IS_ERR(status)) {
2269 return status;
2272 /* Return variables */
2274 /* Return result */
2275 if (werror) {
2276 *werror = r.out.result;
2279 return werror_to_ntstatus(r.out.result);
2282 NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
2283 TALLOC_CTX *mem_ctx,
2284 WERROR *werror)
2286 struct spoolss_DeletePrintProcessor r;
2287 NTSTATUS status;
2289 /* In parameters */
2291 if (DEBUGLEVEL >= 10) {
2292 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &r);
2295 status = cli->dispatch(cli,
2296 mem_ctx,
2297 &ndr_table_spoolss,
2298 NDR_SPOOLSS_DELETEPRINTPROCESSOR,
2299 &r);
2301 if (!NT_STATUS_IS_OK(status)) {
2302 return status;
2305 if (DEBUGLEVEL >= 10) {
2306 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &r);
2309 if (NT_STATUS_IS_ERR(status)) {
2310 return status;
2313 /* Return variables */
2315 /* Return result */
2316 if (werror) {
2317 *werror = r.out.result;
2320 return werror_to_ntstatus(r.out.result);
2323 NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
2324 TALLOC_CTX *mem_ctx,
2325 WERROR *werror)
2327 struct spoolss_AddPrintProvidor r;
2328 NTSTATUS status;
2330 /* In parameters */
2332 if (DEBUGLEVEL >= 10) {
2333 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &r);
2336 status = cli->dispatch(cli,
2337 mem_ctx,
2338 &ndr_table_spoolss,
2339 NDR_SPOOLSS_ADDPRINTPROVIDOR,
2340 &r);
2342 if (!NT_STATUS_IS_OK(status)) {
2343 return status;
2346 if (DEBUGLEVEL >= 10) {
2347 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &r);
2350 if (NT_STATUS_IS_ERR(status)) {
2351 return status;
2354 /* Return variables */
2356 /* Return result */
2357 if (werror) {
2358 *werror = r.out.result;
2361 return werror_to_ntstatus(r.out.result);
2364 NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
2365 TALLOC_CTX *mem_ctx,
2366 WERROR *werror)
2368 struct spoolss_DeletePrintProvidor r;
2369 NTSTATUS status;
2371 /* In parameters */
2373 if (DEBUGLEVEL >= 10) {
2374 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &r);
2377 status = cli->dispatch(cli,
2378 mem_ctx,
2379 &ndr_table_spoolss,
2380 NDR_SPOOLSS_DELETEPRINTPROVIDOR,
2381 &r);
2383 if (!NT_STATUS_IS_OK(status)) {
2384 return status;
2387 if (DEBUGLEVEL >= 10) {
2388 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &r);
2391 if (NT_STATUS_IS_ERR(status)) {
2392 return status;
2395 /* Return variables */
2397 /* Return result */
2398 if (werror) {
2399 *werror = r.out.result;
2402 return werror_to_ntstatus(r.out.result);
2405 NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
2406 TALLOC_CTX *mem_ctx,
2407 WERROR *werror)
2409 struct spoolss_EnumPrintProcDataTypes r;
2410 NTSTATUS status;
2412 /* In parameters */
2414 if (DEBUGLEVEL >= 10) {
2415 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2418 status = cli->dispatch(cli,
2419 mem_ctx,
2420 &ndr_table_spoolss,
2421 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES,
2422 &r);
2424 if (!NT_STATUS_IS_OK(status)) {
2425 return status;
2428 if (DEBUGLEVEL >= 10) {
2429 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2432 if (NT_STATUS_IS_ERR(status)) {
2433 return status;
2436 /* Return variables */
2438 /* Return result */
2439 if (werror) {
2440 *werror = r.out.result;
2443 return werror_to_ntstatus(r.out.result);
2446 NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
2447 TALLOC_CTX *mem_ctx,
2448 WERROR *werror)
2450 struct spoolss_ResetPrinter r;
2451 NTSTATUS status;
2453 /* In parameters */
2455 if (DEBUGLEVEL >= 10) {
2456 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &r);
2459 status = cli->dispatch(cli,
2460 mem_ctx,
2461 &ndr_table_spoolss,
2462 NDR_SPOOLSS_RESETPRINTER,
2463 &r);
2465 if (!NT_STATUS_IS_OK(status)) {
2466 return status;
2469 if (DEBUGLEVEL >= 10) {
2470 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &r);
2473 if (NT_STATUS_IS_ERR(status)) {
2474 return status;
2477 /* Return variables */
2479 /* Return result */
2480 if (werror) {
2481 *werror = r.out.result;
2484 return werror_to_ntstatus(r.out.result);
2487 NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
2488 TALLOC_CTX *mem_ctx,
2489 struct policy_handle *handle /* [in] [ref] */,
2490 const char *architecture /* [in] [unique,charset(UTF16)] */,
2491 uint32_t level /* [in] */,
2492 DATA_BLOB *buffer /* [in] [unique] */,
2493 uint32_t offered /* [in] */,
2494 uint32_t client_major_version /* [in] */,
2495 uint32_t client_minor_version /* [in] */,
2496 DATA_BLOB *info /* [out] [unique] */,
2497 uint32_t *needed /* [out] [ref] */,
2498 uint32_t *server_major_version /* [out] [ref] */,
2499 uint32_t *server_minor_version /* [out] [ref] */,
2500 WERROR *werror)
2502 struct spoolss_GetPrinterDriver2 r;
2503 NTSTATUS status;
2505 /* In parameters */
2506 r.in.handle = handle;
2507 r.in.architecture = architecture;
2508 r.in.level = level;
2509 r.in.buffer = buffer;
2510 r.in.offered = offered;
2511 r.in.client_major_version = client_major_version;
2512 r.in.client_minor_version = client_minor_version;
2514 if (DEBUGLEVEL >= 10) {
2515 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &r);
2518 status = cli->dispatch(cli,
2519 mem_ctx,
2520 &ndr_table_spoolss,
2521 NDR_SPOOLSS_GETPRINTERDRIVER2,
2522 &r);
2524 if (!NT_STATUS_IS_OK(status)) {
2525 return status;
2528 if (DEBUGLEVEL >= 10) {
2529 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &r);
2532 if (NT_STATUS_IS_ERR(status)) {
2533 return status;
2536 /* Return variables */
2537 if (info && r.out.info) {
2538 *info = *r.out.info;
2540 *needed = *r.out.needed;
2541 *server_major_version = *r.out.server_major_version;
2542 *server_minor_version = *r.out.server_minor_version;
2544 /* Return result */
2545 if (werror) {
2546 *werror = r.out.result;
2549 return werror_to_ntstatus(r.out.result);
2552 NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2553 TALLOC_CTX *mem_ctx,
2554 WERROR *werror)
2556 struct spoolss_FindFirstPrinterChangeNotification r;
2557 NTSTATUS status;
2559 /* In parameters */
2561 if (DEBUGLEVEL >= 10) {
2562 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2565 status = cli->dispatch(cli,
2566 mem_ctx,
2567 &ndr_table_spoolss,
2568 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION,
2569 &r);
2571 if (!NT_STATUS_IS_OK(status)) {
2572 return status;
2575 if (DEBUGLEVEL >= 10) {
2576 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2579 if (NT_STATUS_IS_ERR(status)) {
2580 return status;
2583 /* Return variables */
2585 /* Return result */
2586 if (werror) {
2587 *werror = r.out.result;
2590 return werror_to_ntstatus(r.out.result);
2593 NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
2594 TALLOC_CTX *mem_ctx,
2595 WERROR *werror)
2597 struct spoolss_FindNextPrinterChangeNotification r;
2598 NTSTATUS status;
2600 /* In parameters */
2602 if (DEBUGLEVEL >= 10) {
2603 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2606 status = cli->dispatch(cli,
2607 mem_ctx,
2608 &ndr_table_spoolss,
2609 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION,
2610 &r);
2612 if (!NT_STATUS_IS_OK(status)) {
2613 return status;
2616 if (DEBUGLEVEL >= 10) {
2617 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2620 if (NT_STATUS_IS_ERR(status)) {
2621 return status;
2624 /* Return variables */
2626 /* Return result */
2627 if (werror) {
2628 *werror = r.out.result;
2631 return werror_to_ntstatus(r.out.result);
2634 NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
2635 TALLOC_CTX *mem_ctx,
2636 struct policy_handle *handle /* [in] [ref] */,
2637 WERROR *werror)
2639 struct spoolss_FindClosePrinterNotify r;
2640 NTSTATUS status;
2642 /* In parameters */
2643 r.in.handle = handle;
2645 if (DEBUGLEVEL >= 10) {
2646 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &r);
2649 status = cli->dispatch(cli,
2650 mem_ctx,
2651 &ndr_table_spoolss,
2652 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY,
2653 &r);
2655 if (!NT_STATUS_IS_OK(status)) {
2656 return status;
2659 if (DEBUGLEVEL >= 10) {
2660 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &r);
2663 if (NT_STATUS_IS_ERR(status)) {
2664 return status;
2667 /* Return variables */
2669 /* Return result */
2670 if (werror) {
2671 *werror = r.out.result;
2674 return werror_to_ntstatus(r.out.result);
2677 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
2678 TALLOC_CTX *mem_ctx,
2679 WERROR *werror)
2681 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r;
2682 NTSTATUS status;
2684 /* In parameters */
2686 if (DEBUGLEVEL >= 10) {
2687 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2690 status = cli->dispatch(cli,
2691 mem_ctx,
2692 &ndr_table_spoolss,
2693 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD,
2694 &r);
2696 if (!NT_STATUS_IS_OK(status)) {
2697 return status;
2700 if (DEBUGLEVEL >= 10) {
2701 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2704 if (NT_STATUS_IS_ERR(status)) {
2705 return status;
2708 /* Return variables */
2710 /* Return result */
2711 if (werror) {
2712 *werror = r.out.result;
2715 return werror_to_ntstatus(r.out.result);
2718 NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
2719 TALLOC_CTX *mem_ctx,
2720 const char *server_name /* [in] [charset(UTF16)] */,
2721 uint32_t printer_local /* [in] */,
2722 enum winreg_Type type /* [in] */,
2723 uint32_t unknown1 /* [in] */,
2724 uint32_t unknown2 /* [in] */,
2725 struct policy_handle *handle /* [out] [ref] */,
2726 WERROR *werror)
2728 struct spoolss_ReplyOpenPrinter r;
2729 NTSTATUS status;
2731 /* In parameters */
2732 r.in.server_name = server_name;
2733 r.in.printer_local = printer_local;
2734 r.in.type = type;
2735 r.in.unknown1 = unknown1;
2736 r.in.unknown2 = unknown2;
2738 if (DEBUGLEVEL >= 10) {
2739 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
2742 status = cli->dispatch(cli,
2743 mem_ctx,
2744 &ndr_table_spoolss,
2745 NDR_SPOOLSS_REPLYOPENPRINTER,
2746 &r);
2748 if (!NT_STATUS_IS_OK(status)) {
2749 return status;
2752 if (DEBUGLEVEL >= 10) {
2753 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &r);
2756 if (NT_STATUS_IS_ERR(status)) {
2757 return status;
2760 /* Return variables */
2761 *handle = *r.out.handle;
2763 /* Return result */
2764 if (werror) {
2765 *werror = r.out.result;
2768 return werror_to_ntstatus(r.out.result);
2771 NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
2772 TALLOC_CTX *mem_ctx,
2773 WERROR *werror)
2775 struct spoolss_RouterReplyPrinter r;
2776 NTSTATUS status;
2778 /* In parameters */
2780 if (DEBUGLEVEL >= 10) {
2781 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &r);
2784 status = cli->dispatch(cli,
2785 mem_ctx,
2786 &ndr_table_spoolss,
2787 NDR_SPOOLSS_ROUTERREPLYPRINTER,
2788 &r);
2790 if (!NT_STATUS_IS_OK(status)) {
2791 return status;
2794 if (DEBUGLEVEL >= 10) {
2795 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &r);
2798 if (NT_STATUS_IS_ERR(status)) {
2799 return status;
2802 /* Return variables */
2804 /* Return result */
2805 if (werror) {
2806 *werror = r.out.result;
2809 return werror_to_ntstatus(r.out.result);
2812 NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
2813 TALLOC_CTX *mem_ctx,
2814 struct policy_handle *handle /* [in,out] [ref] */,
2815 WERROR *werror)
2817 struct spoolss_ReplyClosePrinter r;
2818 NTSTATUS status;
2820 /* In parameters */
2821 r.in.handle = handle;
2823 if (DEBUGLEVEL >= 10) {
2824 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &r);
2827 status = cli->dispatch(cli,
2828 mem_ctx,
2829 &ndr_table_spoolss,
2830 NDR_SPOOLSS_REPLYCLOSEPRINTER,
2831 &r);
2833 if (!NT_STATUS_IS_OK(status)) {
2834 return status;
2837 if (DEBUGLEVEL >= 10) {
2838 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &r);
2841 if (NT_STATUS_IS_ERR(status)) {
2842 return status;
2845 /* Return variables */
2846 *handle = *r.out.handle;
2848 /* Return result */
2849 if (werror) {
2850 *werror = r.out.result;
2853 return werror_to_ntstatus(r.out.result);
2856 NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
2857 TALLOC_CTX *mem_ctx,
2858 WERROR *werror)
2860 struct spoolss_AddPortEx r;
2861 NTSTATUS status;
2863 /* In parameters */
2865 if (DEBUGLEVEL >= 10) {
2866 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &r);
2869 status = cli->dispatch(cli,
2870 mem_ctx,
2871 &ndr_table_spoolss,
2872 NDR_SPOOLSS_ADDPORTEX,
2873 &r);
2875 if (!NT_STATUS_IS_OK(status)) {
2876 return status;
2879 if (DEBUGLEVEL >= 10) {
2880 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &r);
2883 if (NT_STATUS_IS_ERR(status)) {
2884 return status;
2887 /* Return variables */
2889 /* Return result */
2890 if (werror) {
2891 *werror = r.out.result;
2894 return werror_to_ntstatus(r.out.result);
2897 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2898 TALLOC_CTX *mem_ctx,
2899 WERROR *werror)
2901 struct spoolss_RouterFindFirstPrinterChangeNotification r;
2902 NTSTATUS status;
2904 /* In parameters */
2906 if (DEBUGLEVEL >= 10) {
2907 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2910 status = cli->dispatch(cli,
2911 mem_ctx,
2912 &ndr_table_spoolss,
2913 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION,
2914 &r);
2916 if (!NT_STATUS_IS_OK(status)) {
2917 return status;
2920 if (DEBUGLEVEL >= 10) {
2921 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2924 if (NT_STATUS_IS_ERR(status)) {
2925 return status;
2928 /* Return variables */
2930 /* Return result */
2931 if (werror) {
2932 *werror = r.out.result;
2935 return werror_to_ntstatus(r.out.result);
2938 NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
2939 TALLOC_CTX *mem_ctx,
2940 WERROR *werror)
2942 struct spoolss_SpoolerInit r;
2943 NTSTATUS status;
2945 /* In parameters */
2947 if (DEBUGLEVEL >= 10) {
2948 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &r);
2951 status = cli->dispatch(cli,
2952 mem_ctx,
2953 &ndr_table_spoolss,
2954 NDR_SPOOLSS_SPOOLERINIT,
2955 &r);
2957 if (!NT_STATUS_IS_OK(status)) {
2958 return status;
2961 if (DEBUGLEVEL >= 10) {
2962 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &r);
2965 if (NT_STATUS_IS_ERR(status)) {
2966 return status;
2969 /* Return variables */
2971 /* Return result */
2972 if (werror) {
2973 *werror = r.out.result;
2976 return werror_to_ntstatus(r.out.result);
2979 NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
2980 TALLOC_CTX *mem_ctx,
2981 WERROR *werror)
2983 struct spoolss_ResetPrinterEx r;
2984 NTSTATUS status;
2986 /* In parameters */
2988 if (DEBUGLEVEL >= 10) {
2989 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &r);
2992 status = cli->dispatch(cli,
2993 mem_ctx,
2994 &ndr_table_spoolss,
2995 NDR_SPOOLSS_RESETPRINTEREX,
2996 &r);
2998 if (!NT_STATUS_IS_OK(status)) {
2999 return status;
3002 if (DEBUGLEVEL >= 10) {
3003 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &r);
3006 if (NT_STATUS_IS_ERR(status)) {
3007 return status;
3010 /* Return variables */
3012 /* Return result */
3013 if (werror) {
3014 *werror = r.out.result;
3017 return werror_to_ntstatus(r.out.result);
3020 NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
3021 TALLOC_CTX *mem_ctx,
3022 struct policy_handle *handle /* [in] [ref] */,
3023 uint32_t flags /* [in] */,
3024 uint32_t options /* [in] */,
3025 const char *str /* [in] [unique,charset(UTF16)] */,
3026 uint32_t printer_local /* [in] */,
3027 struct spoolss_NotifyOptionsContainer *t1 /* [in] [unique] */,
3028 WERROR *werror)
3030 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r;
3031 NTSTATUS status;
3033 /* In parameters */
3034 r.in.handle = handle;
3035 r.in.flags = flags;
3036 r.in.options = options;
3037 r.in.str = str;
3038 r.in.printer_local = printer_local;
3039 r.in.t1 = t1;
3041 if (DEBUGLEVEL >= 10) {
3042 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3045 status = cli->dispatch(cli,
3046 mem_ctx,
3047 &ndr_table_spoolss,
3048 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX,
3049 &r);
3051 if (!NT_STATUS_IS_OK(status)) {
3052 return status;
3055 if (DEBUGLEVEL >= 10) {
3056 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3059 if (NT_STATUS_IS_ERR(status)) {
3060 return status;
3063 /* Return variables */
3065 /* Return result */
3066 if (werror) {
3067 *werror = r.out.result;
3070 return werror_to_ntstatus(r.out.result);
3073 NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_client *cli,
3074 TALLOC_CTX *mem_ctx,
3075 WERROR *werror)
3077 struct spoolss_RouterRefreshPrinterChangeNotification r;
3078 NTSTATUS status;
3080 /* In parameters */
3082 if (DEBUGLEVEL >= 10) {
3083 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, &r);
3086 status = cli->dispatch(cli,
3087 mem_ctx,
3088 &ndr_table_spoolss,
3089 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION,
3090 &r);
3092 if (!NT_STATUS_IS_OK(status)) {
3093 return status;
3096 if (DEBUGLEVEL >= 10) {
3097 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, &r);
3100 if (NT_STATUS_IS_ERR(status)) {
3101 return status;
3104 /* Return variables */
3106 /* Return result */
3107 if (werror) {
3108 *werror = r.out.result;
3111 return werror_to_ntstatus(r.out.result);
3114 NTSTATUS rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
3115 TALLOC_CTX *mem_ctx,
3116 struct policy_handle *handle /* [in] [ref] */,
3117 uint32_t change_low /* [in] */,
3118 struct spoolss_NotifyOptionsContainer *container /* [in] [unique] */,
3119 struct spoolss_NotifyInfo **info /* [out] [ref] */,
3120 WERROR *werror)
3122 struct spoolss_RemoteFindNextPrinterChangeNotifyEx r;
3123 NTSTATUS status;
3125 /* In parameters */
3126 r.in.handle = handle;
3127 r.in.change_low = change_low;
3128 r.in.container = container;
3130 if (DEBUGLEVEL >= 10) {
3131 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, &r);
3134 status = cli->dispatch(cli,
3135 mem_ctx,
3136 &ndr_table_spoolss,
3137 NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX,
3138 &r);
3140 if (!NT_STATUS_IS_OK(status)) {
3141 return status;
3144 if (DEBUGLEVEL >= 10) {
3145 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, &r);
3148 if (NT_STATUS_IS_ERR(status)) {
3149 return status;
3152 /* Return variables */
3153 *info = *r.out.info;
3155 /* Return result */
3156 if (werror) {
3157 *werror = r.out.result;
3160 return werror_to_ntstatus(r.out.result);
3163 NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
3164 TALLOC_CTX *mem_ctx,
3165 WERROR *werror)
3167 struct spoolss_44 r;
3168 NTSTATUS status;
3170 /* In parameters */
3172 if (DEBUGLEVEL >= 10) {
3173 NDR_PRINT_IN_DEBUG(spoolss_44, &r);
3176 status = cli->dispatch(cli,
3177 mem_ctx,
3178 &ndr_table_spoolss,
3179 NDR_SPOOLSS_44,
3180 &r);
3182 if (!NT_STATUS_IS_OK(status)) {
3183 return status;
3186 if (DEBUGLEVEL >= 10) {
3187 NDR_PRINT_OUT_DEBUG(spoolss_44, &r);
3190 if (NT_STATUS_IS_ERR(status)) {
3191 return status;
3194 /* Return variables */
3196 /* Return result */
3197 if (werror) {
3198 *werror = r.out.result;
3201 return werror_to_ntstatus(r.out.result);
3204 NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
3205 TALLOC_CTX *mem_ctx,
3206 const char *printername /* [in] [unique,charset(UTF16)] */,
3207 const char *datatype /* [in] [unique,charset(UTF16)] */,
3208 struct spoolss_DevmodeContainer devmode_ctr /* [in] */,
3209 uint32_t access_mask /* [in] */,
3210 uint32_t level /* [in] */,
3211 union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */,
3212 struct policy_handle *handle /* [out] [ref] */,
3213 WERROR *werror)
3215 struct spoolss_OpenPrinterEx r;
3216 NTSTATUS status;
3218 /* In parameters */
3219 r.in.printername = printername;
3220 r.in.datatype = datatype;
3221 r.in.devmode_ctr = devmode_ctr;
3222 r.in.access_mask = access_mask;
3223 r.in.level = level;
3224 r.in.userlevel = userlevel;
3226 if (DEBUGLEVEL >= 10) {
3227 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &r);
3230 status = cli->dispatch(cli,
3231 mem_ctx,
3232 &ndr_table_spoolss,
3233 NDR_SPOOLSS_OPENPRINTEREX,
3234 &r);
3236 if (!NT_STATUS_IS_OK(status)) {
3237 return status;
3240 if (DEBUGLEVEL >= 10) {
3241 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &r);
3244 if (NT_STATUS_IS_ERR(status)) {
3245 return status;
3248 /* Return variables */
3249 *handle = *r.out.handle;
3251 /* Return result */
3252 if (werror) {
3253 *werror = r.out.result;
3256 return werror_to_ntstatus(r.out.result);
3259 NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
3260 TALLOC_CTX *mem_ctx,
3261 const char *server /* [in] [unique,charset(UTF16)] */,
3262 uint32_t level /* [in] */,
3263 union spoolss_PrinterInfo *info /* [in] [unique,switch_is(level)] */,
3264 struct spoolss_DevmodeContainer devmode_ctr /* [in] */,
3265 struct security_descriptor *secdesc /* [in] [unique] */,
3266 uint32_t ulevel /* [in] */,
3267 union spoolss_UserLevel userlevel /* [in] [switch_is(ulevel)] */,
3268 WERROR *werror)
3270 struct spoolss_AddPrinterEx r;
3271 NTSTATUS status;
3273 /* In parameters */
3274 r.in.server = server;
3275 r.in.level = level;
3276 r.in.info = info;
3277 r.in.devmode_ctr = devmode_ctr;
3278 r.in.secdesc = secdesc;
3279 r.in.ulevel = ulevel;
3280 r.in.userlevel = userlevel;
3282 if (DEBUGLEVEL >= 10) {
3283 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &r);
3286 status = cli->dispatch(cli,
3287 mem_ctx,
3288 &ndr_table_spoolss,
3289 NDR_SPOOLSS_ADDPRINTEREX,
3290 &r);
3292 if (!NT_STATUS_IS_OK(status)) {
3293 return status;
3296 if (DEBUGLEVEL >= 10) {
3297 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &r);
3300 if (NT_STATUS_IS_ERR(status)) {
3301 return status;
3304 /* Return variables */
3306 /* Return result */
3307 if (werror) {
3308 *werror = r.out.result;
3311 return werror_to_ntstatus(r.out.result);
3314 NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
3315 TALLOC_CTX *mem_ctx,
3316 WERROR *werror)
3318 struct spoolss_47 r;
3319 NTSTATUS status;
3321 /* In parameters */
3323 if (DEBUGLEVEL >= 10) {
3324 NDR_PRINT_IN_DEBUG(spoolss_47, &r);
3327 status = cli->dispatch(cli,
3328 mem_ctx,
3329 &ndr_table_spoolss,
3330 NDR_SPOOLSS_47,
3331 &r);
3333 if (!NT_STATUS_IS_OK(status)) {
3334 return status;
3337 if (DEBUGLEVEL >= 10) {
3338 NDR_PRINT_OUT_DEBUG(spoolss_47, &r);
3341 if (NT_STATUS_IS_ERR(status)) {
3342 return status;
3345 /* Return variables */
3347 /* Return result */
3348 if (werror) {
3349 *werror = r.out.result;
3352 return werror_to_ntstatus(r.out.result);
3355 NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
3356 TALLOC_CTX *mem_ctx,
3357 struct policy_handle *handle /* [in] [ref] */,
3358 uint32_t enum_index /* [in] */,
3359 const char *value_name /* [out] [ref,charset(UTF16),size_is(value_offered/2)] */,
3360 uint32_t value_offered /* [in] */,
3361 uint32_t *value_needed /* [out] [ref] */,
3362 uint32_t *printerdata_type /* [out] [ref] */,
3363 DATA_BLOB *buffer /* [out] [ref] */,
3364 uint32_t data_offered /* [in] */,
3365 uint32_t *data_needed /* [out] [ref] */,
3366 WERROR *werror)
3368 struct spoolss_EnumPrinterData r;
3369 NTSTATUS status;
3371 /* In parameters */
3372 r.in.handle = handle;
3373 r.in.enum_index = enum_index;
3374 r.in.value_offered = value_offered;
3375 r.in.data_offered = data_offered;
3377 if (DEBUGLEVEL >= 10) {
3378 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &r);
3381 status = cli->dispatch(cli,
3382 mem_ctx,
3383 &ndr_table_spoolss,
3384 NDR_SPOOLSS_ENUMPRINTERDATA,
3385 &r);
3387 if (!NT_STATUS_IS_OK(status)) {
3388 return status;
3391 if (DEBUGLEVEL >= 10) {
3392 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &r);
3395 if (NT_STATUS_IS_ERR(status)) {
3396 return status;
3399 /* Return variables */
3400 memcpy(value_name, r.out.value_name, r.in.value_offered / 2 * sizeof(*value_name));
3401 *value_needed = *r.out.value_needed;
3402 *printerdata_type = *r.out.printerdata_type;
3403 *buffer = *r.out.buffer;
3404 *data_needed = *r.out.data_needed;
3406 /* Return result */
3407 if (werror) {
3408 *werror = r.out.result;
3411 return werror_to_ntstatus(r.out.result);
3414 NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
3415 TALLOC_CTX *mem_ctx,
3416 struct policy_handle *handle /* [in] [ref] */,
3417 const char *value_name /* [in] [charset(UTF16)] */,
3418 WERROR *werror)
3420 struct spoolss_DeletePrinterData r;
3421 NTSTATUS status;
3423 /* In parameters */
3424 r.in.handle = handle;
3425 r.in.value_name = value_name;
3427 if (DEBUGLEVEL >= 10) {
3428 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &r);
3431 status = cli->dispatch(cli,
3432 mem_ctx,
3433 &ndr_table_spoolss,
3434 NDR_SPOOLSS_DELETEPRINTERDATA,
3435 &r);
3437 if (!NT_STATUS_IS_OK(status)) {
3438 return status;
3441 if (DEBUGLEVEL >= 10) {
3442 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &r);
3445 if (NT_STATUS_IS_ERR(status)) {
3446 return status;
3449 /* Return variables */
3451 /* Return result */
3452 if (werror) {
3453 *werror = r.out.result;
3456 return werror_to_ntstatus(r.out.result);
3459 NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
3460 TALLOC_CTX *mem_ctx,
3461 WERROR *werror)
3463 struct spoolss_4a r;
3464 NTSTATUS status;
3466 /* In parameters */
3468 if (DEBUGLEVEL >= 10) {
3469 NDR_PRINT_IN_DEBUG(spoolss_4a, &r);
3472 status = cli->dispatch(cli,
3473 mem_ctx,
3474 &ndr_table_spoolss,
3475 NDR_SPOOLSS_4A,
3476 &r);
3478 if (!NT_STATUS_IS_OK(status)) {
3479 return status;
3482 if (DEBUGLEVEL >= 10) {
3483 NDR_PRINT_OUT_DEBUG(spoolss_4a, &r);
3486 if (NT_STATUS_IS_ERR(status)) {
3487 return status;
3490 /* Return variables */
3492 /* Return result */
3493 if (werror) {
3494 *werror = r.out.result;
3497 return werror_to_ntstatus(r.out.result);
3500 NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
3501 TALLOC_CTX *mem_ctx,
3502 WERROR *werror)
3504 struct spoolss_4b r;
3505 NTSTATUS status;
3507 /* In parameters */
3509 if (DEBUGLEVEL >= 10) {
3510 NDR_PRINT_IN_DEBUG(spoolss_4b, &r);
3513 status = cli->dispatch(cli,
3514 mem_ctx,
3515 &ndr_table_spoolss,
3516 NDR_SPOOLSS_4B,
3517 &r);
3519 if (!NT_STATUS_IS_OK(status)) {
3520 return status;
3523 if (DEBUGLEVEL >= 10) {
3524 NDR_PRINT_OUT_DEBUG(spoolss_4b, &r);
3527 if (NT_STATUS_IS_ERR(status)) {
3528 return status;
3531 /* Return variables */
3533 /* Return result */
3534 if (werror) {
3535 *werror = r.out.result;
3538 return werror_to_ntstatus(r.out.result);
3541 NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
3542 TALLOC_CTX *mem_ctx,
3543 WERROR *werror)
3545 struct spoolss_4c r;
3546 NTSTATUS status;
3548 /* In parameters */
3550 if (DEBUGLEVEL >= 10) {
3551 NDR_PRINT_IN_DEBUG(spoolss_4c, &r);
3554 status = cli->dispatch(cli,
3555 mem_ctx,
3556 &ndr_table_spoolss,
3557 NDR_SPOOLSS_4C,
3558 &r);
3560 if (!NT_STATUS_IS_OK(status)) {
3561 return status;
3564 if (DEBUGLEVEL >= 10) {
3565 NDR_PRINT_OUT_DEBUG(spoolss_4c, &r);
3568 if (NT_STATUS_IS_ERR(status)) {
3569 return status;
3572 /* Return variables */
3574 /* Return result */
3575 if (werror) {
3576 *werror = r.out.result;
3579 return werror_to_ntstatus(r.out.result);
3582 NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
3583 TALLOC_CTX *mem_ctx,
3584 struct policy_handle *handle /* [in] [ref] */,
3585 const char *key_name /* [in] [charset(UTF16)] */,
3586 const char *value_name /* [in] [charset(UTF16)] */,
3587 uint32_t type /* [in] */,
3588 DATA_BLOB buffer /* [in] */,
3589 uint32_t offered /* [in] */,
3590 WERROR *werror)
3592 struct spoolss_SetPrinterDataEx r;
3593 NTSTATUS status;
3595 /* In parameters */
3596 r.in.handle = handle;
3597 r.in.key_name = key_name;
3598 r.in.value_name = value_name;
3599 r.in.type = type;
3600 r.in.buffer = buffer;
3601 r.in.offered = offered;
3603 if (DEBUGLEVEL >= 10) {
3604 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &r);
3607 status = cli->dispatch(cli,
3608 mem_ctx,
3609 &ndr_table_spoolss,
3610 NDR_SPOOLSS_SETPRINTERDATAEX,
3611 &r);
3613 if (!NT_STATUS_IS_OK(status)) {
3614 return status;
3617 if (DEBUGLEVEL >= 10) {
3618 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &r);
3621 if (NT_STATUS_IS_ERR(status)) {
3622 return status;
3625 /* Return variables */
3627 /* Return result */
3628 if (werror) {
3629 *werror = r.out.result;
3632 return werror_to_ntstatus(r.out.result);
3635 NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
3636 TALLOC_CTX *mem_ctx,
3637 struct policy_handle *handle /* [in] [ref] */,
3638 const char *key_name /* [in] [charset(UTF16)] */,
3639 const char *value_name /* [in] [charset(UTF16)] */,
3640 uint32_t *type /* [out] [ref] */,
3641 uint8_t *buffer /* [out] [ref,size_is(offered)] */,
3642 uint32_t offered /* [in] */,
3643 uint32_t *needed /* [out] [ref] */,
3644 WERROR *werror)
3646 struct spoolss_GetPrinterDataEx r;
3647 NTSTATUS status;
3649 /* In parameters */
3650 r.in.handle = handle;
3651 r.in.key_name = key_name;
3652 r.in.value_name = value_name;
3653 r.in.offered = offered;
3655 if (DEBUGLEVEL >= 10) {
3656 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &r);
3659 status = cli->dispatch(cli,
3660 mem_ctx,
3661 &ndr_table_spoolss,
3662 NDR_SPOOLSS_GETPRINTERDATAEX,
3663 &r);
3665 if (!NT_STATUS_IS_OK(status)) {
3666 return status;
3669 if (DEBUGLEVEL >= 10) {
3670 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &r);
3673 if (NT_STATUS_IS_ERR(status)) {
3674 return status;
3677 /* Return variables */
3678 *type = *r.out.type;
3679 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3680 *needed = *r.out.needed;
3682 /* Return result */
3683 if (werror) {
3684 *werror = r.out.result;
3687 return werror_to_ntstatus(r.out.result);
3690 NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
3691 TALLOC_CTX *mem_ctx,
3692 struct policy_handle *handle /* [in] [ref] */,
3693 const char *key_name /* [in] [charset(UTF16)] */,
3694 uint8_t *buffer /* [out] [ref,size_is(offered)] */,
3695 uint32_t offered /* [in] */,
3696 uint32_t *needed /* [out] [ref] */,
3697 uint32_t *count /* [out] [ref] */,
3698 WERROR *werror)
3700 struct spoolss_EnumPrinterDataEx r;
3701 NTSTATUS status;
3703 /* In parameters */
3704 r.in.handle = handle;
3705 r.in.key_name = key_name;
3706 r.in.offered = offered;
3708 if (DEBUGLEVEL >= 10) {
3709 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &r);
3712 status = cli->dispatch(cli,
3713 mem_ctx,
3714 &ndr_table_spoolss,
3715 NDR_SPOOLSS_ENUMPRINTERDATAEX,
3716 &r);
3718 if (!NT_STATUS_IS_OK(status)) {
3719 return status;
3722 if (DEBUGLEVEL >= 10) {
3723 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &r);
3726 if (NT_STATUS_IS_ERR(status)) {
3727 return status;
3730 /* Return variables */
3731 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3732 *needed = *r.out.needed;
3733 *count = *r.out.count;
3735 /* Return result */
3736 if (werror) {
3737 *werror = r.out.result;
3740 return werror_to_ntstatus(r.out.result);
3743 NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
3744 TALLOC_CTX *mem_ctx,
3745 struct policy_handle *handle /* [in] [ref] */,
3746 const char *key_name /* [in] [charset(UTF16)] */,
3747 uint16_t *key_buffer /* [out] [ref,size_is(key_buffer_size/2)] */,
3748 uint32_t key_buffer_size /* [in] */,
3749 uint32_t *needed /* [out] [ref] */,
3750 WERROR *werror)
3752 struct spoolss_EnumPrinterKey r;
3753 NTSTATUS status;
3755 /* In parameters */
3756 r.in.handle = handle;
3757 r.in.key_name = key_name;
3758 r.in.key_buffer_size = key_buffer_size;
3760 if (DEBUGLEVEL >= 10) {
3761 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &r);
3764 status = cli->dispatch(cli,
3765 mem_ctx,
3766 &ndr_table_spoolss,
3767 NDR_SPOOLSS_ENUMPRINTERKEY,
3768 &r);
3770 if (!NT_STATUS_IS_OK(status)) {
3771 return status;
3774 if (DEBUGLEVEL >= 10) {
3775 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &r);
3778 if (NT_STATUS_IS_ERR(status)) {
3779 return status;
3782 /* Return variables */
3783 memcpy(key_buffer, r.out.key_buffer, r.in.key_buffer_size / 2 * sizeof(*key_buffer));
3784 *needed = *r.out.needed;
3786 /* Return result */
3787 if (werror) {
3788 *werror = r.out.result;
3791 return werror_to_ntstatus(r.out.result);
3794 NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli,
3795 TALLOC_CTX *mem_ctx,
3796 struct policy_handle *handle /* [in] [ref] */,
3797 const char *key_name /* [in] [charset(UTF16)] */,
3798 const char *value_name /* [in] [charset(UTF16)] */,
3799 WERROR *werror)
3801 struct spoolss_DeletePrinterDataEx r;
3802 NTSTATUS status;
3804 /* In parameters */
3805 r.in.handle = handle;
3806 r.in.key_name = key_name;
3807 r.in.value_name = value_name;
3809 if (DEBUGLEVEL >= 10) {
3810 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &r);
3813 status = cli->dispatch(cli,
3814 mem_ctx,
3815 &ndr_table_spoolss,
3816 NDR_SPOOLSS_DELETEPRINTERDATAEX,
3817 &r);
3819 if (!NT_STATUS_IS_OK(status)) {
3820 return status;
3823 if (DEBUGLEVEL >= 10) {
3824 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &r);
3827 if (NT_STATUS_IS_ERR(status)) {
3828 return status;
3831 /* Return variables */
3833 /* Return result */
3834 if (werror) {
3835 *werror = r.out.result;
3838 return werror_to_ntstatus(r.out.result);
3841 NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
3842 TALLOC_CTX *mem_ctx,
3843 WERROR *werror)
3845 struct spoolss_DeletePrinterKey r;
3846 NTSTATUS status;
3848 /* In parameters */
3850 if (DEBUGLEVEL >= 10) {
3851 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &r);
3854 status = cli->dispatch(cli,
3855 mem_ctx,
3856 &ndr_table_spoolss,
3857 NDR_SPOOLSS_DELETEPRINTERKEY,
3858 &r);
3860 if (!NT_STATUS_IS_OK(status)) {
3861 return status;
3864 if (DEBUGLEVEL >= 10) {
3865 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &r);
3868 if (NT_STATUS_IS_ERR(status)) {
3869 return status;
3872 /* Return variables */
3874 /* Return result */
3875 if (werror) {
3876 *werror = r.out.result;
3879 return werror_to_ntstatus(r.out.result);
3882 NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
3883 TALLOC_CTX *mem_ctx,
3884 WERROR *werror)
3886 struct spoolss_53 r;
3887 NTSTATUS status;
3889 /* In parameters */
3891 if (DEBUGLEVEL >= 10) {
3892 NDR_PRINT_IN_DEBUG(spoolss_53, &r);
3895 status = cli->dispatch(cli,
3896 mem_ctx,
3897 &ndr_table_spoolss,
3898 NDR_SPOOLSS_53,
3899 &r);
3901 if (!NT_STATUS_IS_OK(status)) {
3902 return status;
3905 if (DEBUGLEVEL >= 10) {
3906 NDR_PRINT_OUT_DEBUG(spoolss_53, &r);
3909 if (NT_STATUS_IS_ERR(status)) {
3910 return status;
3913 /* Return variables */
3915 /* Return result */
3916 if (werror) {
3917 *werror = r.out.result;
3920 return werror_to_ntstatus(r.out.result);
3923 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
3924 TALLOC_CTX *mem_ctx,
3925 WERROR *werror)
3927 struct spoolss_DeletePrinterDriverEx r;
3928 NTSTATUS status;
3930 /* In parameters */
3932 if (DEBUGLEVEL >= 10) {
3933 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
3936 status = cli->dispatch(cli,
3937 mem_ctx,
3938 &ndr_table_spoolss,
3939 NDR_SPOOLSS_DELETEPRINTERDRIVEREX,
3940 &r);
3942 if (!NT_STATUS_IS_OK(status)) {
3943 return status;
3946 if (DEBUGLEVEL >= 10) {
3947 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &r);
3950 if (NT_STATUS_IS_ERR(status)) {
3951 return status;
3954 /* Return variables */
3956 /* Return result */
3957 if (werror) {
3958 *werror = r.out.result;
3961 return werror_to_ntstatus(r.out.result);
3964 NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
3965 TALLOC_CTX *mem_ctx,
3966 WERROR *werror)
3968 struct spoolss_55 r;
3969 NTSTATUS status;
3971 /* In parameters */
3973 if (DEBUGLEVEL >= 10) {
3974 NDR_PRINT_IN_DEBUG(spoolss_55, &r);
3977 status = cli->dispatch(cli,
3978 mem_ctx,
3979 &ndr_table_spoolss,
3980 NDR_SPOOLSS_55,
3981 &r);
3983 if (!NT_STATUS_IS_OK(status)) {
3984 return status;
3987 if (DEBUGLEVEL >= 10) {
3988 NDR_PRINT_OUT_DEBUG(spoolss_55, &r);
3991 if (NT_STATUS_IS_ERR(status)) {
3992 return status;
3995 /* Return variables */
3997 /* Return result */
3998 if (werror) {
3999 *werror = r.out.result;
4002 return werror_to_ntstatus(r.out.result);
4005 NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
4006 TALLOC_CTX *mem_ctx,
4007 WERROR *werror)
4009 struct spoolss_56 r;
4010 NTSTATUS status;
4012 /* In parameters */
4014 if (DEBUGLEVEL >= 10) {
4015 NDR_PRINT_IN_DEBUG(spoolss_56, &r);
4018 status = cli->dispatch(cli,
4019 mem_ctx,
4020 &ndr_table_spoolss,
4021 NDR_SPOOLSS_56,
4022 &r);
4024 if (!NT_STATUS_IS_OK(status)) {
4025 return status;
4028 if (DEBUGLEVEL >= 10) {
4029 NDR_PRINT_OUT_DEBUG(spoolss_56, &r);
4032 if (NT_STATUS_IS_ERR(status)) {
4033 return status;
4036 /* Return variables */
4038 /* Return result */
4039 if (werror) {
4040 *werror = r.out.result;
4043 return werror_to_ntstatus(r.out.result);
4046 NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
4047 TALLOC_CTX *mem_ctx,
4048 WERROR *werror)
4050 struct spoolss_57 r;
4051 NTSTATUS status;
4053 /* In parameters */
4055 if (DEBUGLEVEL >= 10) {
4056 NDR_PRINT_IN_DEBUG(spoolss_57, &r);
4059 status = cli->dispatch(cli,
4060 mem_ctx,
4061 &ndr_table_spoolss,
4062 NDR_SPOOLSS_57,
4063 &r);
4065 if (!NT_STATUS_IS_OK(status)) {
4066 return status;
4069 if (DEBUGLEVEL >= 10) {
4070 NDR_PRINT_OUT_DEBUG(spoolss_57, &r);
4073 if (NT_STATUS_IS_ERR(status)) {
4074 return status;
4077 /* Return variables */
4079 /* Return result */
4080 if (werror) {
4081 *werror = r.out.result;
4084 return werror_to_ntstatus(r.out.result);
4087 NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
4088 TALLOC_CTX *mem_ctx,
4089 struct policy_handle *handle /* [in] [ref] */,
4090 const char *function_name /* [in] [charset(UTF16)] */,
4091 DATA_BLOB in_data /* [in] */,
4092 uint32_t _in_data_length /* [in] [value(r->in.in_data.length)] */,
4093 uint8_t *out_data /* [out] [ref,size_is(out_data_size)] */,
4094 uint32_t out_data_size /* [in] */,
4095 uint32_t *needed /* [out] [ref] */,
4096 uint32_t *status_code /* [in,out] [ref] */,
4097 WERROR *werror)
4099 struct spoolss_XcvData r;
4100 NTSTATUS status;
4102 /* In parameters */
4103 r.in.handle = handle;
4104 r.in.function_name = function_name;
4105 r.in.in_data = in_data;
4106 r.in._in_data_length = _in_data_length;
4107 r.in.out_data_size = out_data_size;
4108 r.in.status_code = status_code;
4110 if (DEBUGLEVEL >= 10) {
4111 NDR_PRINT_IN_DEBUG(spoolss_XcvData, &r);
4114 status = cli->dispatch(cli,
4115 mem_ctx,
4116 &ndr_table_spoolss,
4117 NDR_SPOOLSS_XCVDATA,
4118 &r);
4120 if (!NT_STATUS_IS_OK(status)) {
4121 return status;
4124 if (DEBUGLEVEL >= 10) {
4125 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &r);
4128 if (NT_STATUS_IS_ERR(status)) {
4129 return status;
4132 /* Return variables */
4133 memcpy(out_data, r.out.out_data, r.in.out_data_size * sizeof(*out_data));
4134 *needed = *r.out.needed;
4135 *status_code = *r.out.status_code;
4137 /* Return result */
4138 if (werror) {
4139 *werror = r.out.result;
4142 return werror_to_ntstatus(r.out.result);
4145 NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
4146 TALLOC_CTX *mem_ctx,
4147 WERROR *werror)
4149 struct spoolss_AddPrinterDriverEx r;
4150 NTSTATUS status;
4152 /* In parameters */
4154 if (DEBUGLEVEL >= 10) {
4155 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &r);
4158 status = cli->dispatch(cli,
4159 mem_ctx,
4160 &ndr_table_spoolss,
4161 NDR_SPOOLSS_ADDPRINTERDRIVEREX,
4162 &r);
4164 if (!NT_STATUS_IS_OK(status)) {
4165 return status;
4168 if (DEBUGLEVEL >= 10) {
4169 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &r);
4172 if (NT_STATUS_IS_ERR(status)) {
4173 return status;
4176 /* Return variables */
4178 /* Return result */
4179 if (werror) {
4180 *werror = r.out.result;
4183 return werror_to_ntstatus(r.out.result);
4186 NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
4187 TALLOC_CTX *mem_ctx,
4188 WERROR *werror)
4190 struct spoolss_5a r;
4191 NTSTATUS status;
4193 /* In parameters */
4195 if (DEBUGLEVEL >= 10) {
4196 NDR_PRINT_IN_DEBUG(spoolss_5a, &r);
4199 status = cli->dispatch(cli,
4200 mem_ctx,
4201 &ndr_table_spoolss,
4202 NDR_SPOOLSS_5A,
4203 &r);
4205 if (!NT_STATUS_IS_OK(status)) {
4206 return status;
4209 if (DEBUGLEVEL >= 10) {
4210 NDR_PRINT_OUT_DEBUG(spoolss_5a, &r);
4213 if (NT_STATUS_IS_ERR(status)) {
4214 return status;
4217 /* Return variables */
4219 /* Return result */
4220 if (werror) {
4221 *werror = r.out.result;
4224 return werror_to_ntstatus(r.out.result);
4227 NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
4228 TALLOC_CTX *mem_ctx,
4229 WERROR *werror)
4231 struct spoolss_5b r;
4232 NTSTATUS status;
4234 /* In parameters */
4236 if (DEBUGLEVEL >= 10) {
4237 NDR_PRINT_IN_DEBUG(spoolss_5b, &r);
4240 status = cli->dispatch(cli,
4241 mem_ctx,
4242 &ndr_table_spoolss,
4243 NDR_SPOOLSS_5B,
4244 &r);
4246 if (!NT_STATUS_IS_OK(status)) {
4247 return status;
4250 if (DEBUGLEVEL >= 10) {
4251 NDR_PRINT_OUT_DEBUG(spoolss_5b, &r);
4254 if (NT_STATUS_IS_ERR(status)) {
4255 return status;
4258 /* Return variables */
4260 /* Return result */
4261 if (werror) {
4262 *werror = r.out.result;
4265 return werror_to_ntstatus(r.out.result);
4268 NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
4269 TALLOC_CTX *mem_ctx,
4270 WERROR *werror)
4272 struct spoolss_5c r;
4273 NTSTATUS status;
4275 /* In parameters */
4277 if (DEBUGLEVEL >= 10) {
4278 NDR_PRINT_IN_DEBUG(spoolss_5c, &r);
4281 status = cli->dispatch(cli,
4282 mem_ctx,
4283 &ndr_table_spoolss,
4284 NDR_SPOOLSS_5C,
4285 &r);
4287 if (!NT_STATUS_IS_OK(status)) {
4288 return status;
4291 if (DEBUGLEVEL >= 10) {
4292 NDR_PRINT_OUT_DEBUG(spoolss_5c, &r);
4295 if (NT_STATUS_IS_ERR(status)) {
4296 return status;
4299 /* Return variables */
4301 /* Return result */
4302 if (werror) {
4303 *werror = r.out.result;
4306 return werror_to_ntstatus(r.out.result);
4309 NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
4310 TALLOC_CTX *mem_ctx,
4311 WERROR *werror)
4313 struct spoolss_5d r;
4314 NTSTATUS status;
4316 /* In parameters */
4318 if (DEBUGLEVEL >= 10) {
4319 NDR_PRINT_IN_DEBUG(spoolss_5d, &r);
4322 status = cli->dispatch(cli,
4323 mem_ctx,
4324 &ndr_table_spoolss,
4325 NDR_SPOOLSS_5D,
4326 &r);
4328 if (!NT_STATUS_IS_OK(status)) {
4329 return status;
4332 if (DEBUGLEVEL >= 10) {
4333 NDR_PRINT_OUT_DEBUG(spoolss_5d, &r);
4336 if (NT_STATUS_IS_ERR(status)) {
4337 return status;
4340 /* Return variables */
4342 /* Return result */
4343 if (werror) {
4344 *werror = r.out.result;
4347 return werror_to_ntstatus(r.out.result);
4350 NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
4351 TALLOC_CTX *mem_ctx,
4352 WERROR *werror)
4354 struct spoolss_5e r;
4355 NTSTATUS status;
4357 /* In parameters */
4359 if (DEBUGLEVEL >= 10) {
4360 NDR_PRINT_IN_DEBUG(spoolss_5e, &r);
4363 status = cli->dispatch(cli,
4364 mem_ctx,
4365 &ndr_table_spoolss,
4366 NDR_SPOOLSS_5E,
4367 &r);
4369 if (!NT_STATUS_IS_OK(status)) {
4370 return status;
4373 if (DEBUGLEVEL >= 10) {
4374 NDR_PRINT_OUT_DEBUG(spoolss_5e, &r);
4377 if (NT_STATUS_IS_ERR(status)) {
4378 return status;
4381 /* Return variables */
4383 /* Return result */
4384 if (werror) {
4385 *werror = r.out.result;
4388 return werror_to_ntstatus(r.out.result);
4391 NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
4392 TALLOC_CTX *mem_ctx,
4393 WERROR *werror)
4395 struct spoolss_5f r;
4396 NTSTATUS status;
4398 /* In parameters */
4400 if (DEBUGLEVEL >= 10) {
4401 NDR_PRINT_IN_DEBUG(spoolss_5f, &r);
4404 status = cli->dispatch(cli,
4405 mem_ctx,
4406 &ndr_table_spoolss,
4407 NDR_SPOOLSS_5F,
4408 &r);
4410 if (!NT_STATUS_IS_OK(status)) {
4411 return status;
4414 if (DEBUGLEVEL >= 10) {
4415 NDR_PRINT_OUT_DEBUG(spoolss_5f, &r);
4418 if (NT_STATUS_IS_ERR(status)) {
4419 return status;
4422 /* Return variables */
4424 /* Return result */
4425 if (werror) {
4426 *werror = r.out.result;
4429 return werror_to_ntstatus(r.out.result);