s4-smbtorture: move test_ReplyOpenPrinter from RPC-SPOOLSS to RPC-SPOOLSS-NOTIFY.
[Samba/eduardoll.git] / librpc / gen_ndr / cli_spoolss.c
blob1e94a2a63c45cf70ab5fdf8ab58f286a3279a42c
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 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)
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 *count = *r.out.count;
55 *info = *r.out.info;
56 *needed = *r.out.needed;
58 /* Return result */
59 if (werror) {
60 *werror = r.out.result;
63 return werror_to_ntstatus(r.out.result);
66 NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli,
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)
75 struct spoolss_OpenPrinter r;
76 NTSTATUS status;
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;
84 if (DEBUGLEVEL >= 10) {
85 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, &r);
88 status = cli->dispatch(cli,
89 mem_ctx,
90 &ndr_table_spoolss,
91 NDR_SPOOLSS_OPENPRINTER,
92 &r);
94 if (!NT_STATUS_IS_OK(status)) {
95 return status;
98 if (DEBUGLEVEL >= 10) {
99 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, &r);
102 if (NT_STATUS_IS_ERR(status)) {
103 return status;
106 /* Return variables */
107 *handle = *r.out.handle;
109 /* Return result */
110 if (werror) {
111 *werror = r.out.result;
114 return werror_to_ntstatus(r.out.result);
117 NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli,
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)
125 struct spoolss_SetJob r;
126 NTSTATUS status;
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;
134 if (DEBUGLEVEL >= 10) {
135 NDR_PRINT_IN_DEBUG(spoolss_SetJob, &r);
138 status = cli->dispatch(cli,
139 mem_ctx,
140 &ndr_table_spoolss,
141 NDR_SPOOLSS_SETJOB,
142 &r);
144 if (!NT_STATUS_IS_OK(status)) {
145 return status;
148 if (DEBUGLEVEL >= 10) {
149 NDR_PRINT_OUT_DEBUG(spoolss_SetJob, &r);
152 if (NT_STATUS_IS_ERR(status)) {
153 return status;
156 /* Return variables */
158 /* Return result */
159 if (werror) {
160 *werror = r.out.result;
163 return werror_to_ntstatus(r.out.result);
166 NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli,
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)
177 struct spoolss_GetJob r;
178 NTSTATUS status;
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;
187 if (DEBUGLEVEL >= 10) {
188 NDR_PRINT_IN_DEBUG(spoolss_GetJob, &r);
191 status = cli->dispatch(cli,
192 mem_ctx,
193 &ndr_table_spoolss,
194 NDR_SPOOLSS_GETJOB,
195 &r);
197 if (!NT_STATUS_IS_OK(status)) {
198 return status;
201 if (DEBUGLEVEL >= 10) {
202 NDR_PRINT_OUT_DEBUG(spoolss_GetJob, &r);
205 if (NT_STATUS_IS_ERR(status)) {
206 return status;
209 /* Return variables */
210 if (info && r.out.info) {
211 *info = *r.out.info;
213 *needed = *r.out.needed;
215 /* Return result */
216 if (werror) {
217 *werror = r.out.result;
220 return werror_to_ntstatus(r.out.result);
223 NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli,
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)
236 struct spoolss_EnumJobs r;
237 NTSTATUS status;
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;
247 if (DEBUGLEVEL >= 10) {
248 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, &r);
251 status = cli->dispatch(cli,
252 mem_ctx,
253 &ndr_table_spoolss,
254 NDR_SPOOLSS_ENUMJOBS,
255 &r);
257 if (!NT_STATUS_IS_OK(status)) {
258 return status;
261 if (DEBUGLEVEL >= 10) {
262 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, &r);
265 if (NT_STATUS_IS_ERR(status)) {
266 return status;
269 /* Return variables */
270 *count = *r.out.count;
271 *info = *r.out.info;
272 *needed = *r.out.needed;
274 /* Return result */
275 if (werror) {
276 *werror = r.out.result;
279 return werror_to_ntstatus(r.out.result);
282 NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli,
283 TALLOC_CTX *mem_ctx,
284 WERROR *werror)
286 struct spoolss_AddPrinter r;
287 NTSTATUS status;
289 /* In parameters */
291 if (DEBUGLEVEL >= 10) {
292 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, &r);
295 status = cli->dispatch(cli,
296 mem_ctx,
297 &ndr_table_spoolss,
298 NDR_SPOOLSS_ADDPRINTER,
299 &r);
301 if (!NT_STATUS_IS_OK(status)) {
302 return status;
305 if (DEBUGLEVEL >= 10) {
306 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, &r);
309 if (NT_STATUS_IS_ERR(status)) {
310 return status;
313 /* Return variables */
315 /* Return result */
316 if (werror) {
317 *werror = r.out.result;
320 return werror_to_ntstatus(r.out.result);
323 NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli,
324 TALLOC_CTX *mem_ctx,
325 struct policy_handle *handle /* [in] [ref] */,
326 WERROR *werror)
328 struct spoolss_DeletePrinter r;
329 NTSTATUS status;
331 /* In parameters */
332 r.in.handle = handle;
334 if (DEBUGLEVEL >= 10) {
335 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, &r);
338 status = cli->dispatch(cli,
339 mem_ctx,
340 &ndr_table_spoolss,
341 NDR_SPOOLSS_DELETEPRINTER,
342 &r);
344 if (!NT_STATUS_IS_OK(status)) {
345 return status;
348 if (DEBUGLEVEL >= 10) {
349 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, &r);
352 if (NT_STATUS_IS_ERR(status)) {
353 return status;
356 /* Return variables */
358 /* Return result */
359 if (werror) {
360 *werror = r.out.result;
363 return werror_to_ntstatus(r.out.result);
366 NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli,
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)
375 struct spoolss_SetPrinter r;
376 NTSTATUS status;
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;
385 if (DEBUGLEVEL >= 10) {
386 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, &r);
389 status = cli->dispatch(cli,
390 mem_ctx,
391 &ndr_table_spoolss,
392 NDR_SPOOLSS_SETPRINTER,
393 &r);
395 if (!NT_STATUS_IS_OK(status)) {
396 return status;
399 if (DEBUGLEVEL >= 10) {
400 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, &r);
403 if (NT_STATUS_IS_ERR(status)) {
404 return status;
407 /* Return variables */
409 /* Return result */
410 if (werror) {
411 *werror = r.out.result;
414 return werror_to_ntstatus(r.out.result);
417 NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli,
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)
427 struct spoolss_GetPrinter r;
428 NTSTATUS status;
430 /* In parameters */
431 r.in.handle = handle;
432 r.in.level = level;
433 r.in.buffer = buffer;
434 r.in.offered = offered;
436 if (DEBUGLEVEL >= 10) {
437 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, &r);
440 status = cli->dispatch(cli,
441 mem_ctx,
442 &ndr_table_spoolss,
443 NDR_SPOOLSS_GETPRINTER,
444 &r);
446 if (!NT_STATUS_IS_OK(status)) {
447 return status;
450 if (DEBUGLEVEL >= 10) {
451 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, &r);
454 if (NT_STATUS_IS_ERR(status)) {
455 return status;
458 /* Return variables */
459 if (info && r.out.info) {
460 *info = *r.out.info;
462 *needed = *r.out.needed;
464 /* Return result */
465 if (werror) {
466 *werror = r.out.result;
469 return werror_to_ntstatus(r.out.result);
472 NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli,
473 TALLOC_CTX *mem_ctx,
474 const char *servername /* [in] [unique,charset(UTF16)] */,
475 struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
476 WERROR *werror)
478 struct spoolss_AddPrinterDriver r;
479 NTSTATUS status;
481 /* In parameters */
482 r.in.servername = servername;
483 r.in.info_ctr = info_ctr;
485 if (DEBUGLEVEL >= 10) {
486 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, &r);
489 status = cli->dispatch(cli,
490 mem_ctx,
491 &ndr_table_spoolss,
492 NDR_SPOOLSS_ADDPRINTERDRIVER,
493 &r);
495 if (!NT_STATUS_IS_OK(status)) {
496 return status;
499 if (DEBUGLEVEL >= 10) {
500 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, &r);
503 if (NT_STATUS_IS_ERR(status)) {
504 return status;
507 /* Return variables */
509 /* Return result */
510 if (werror) {
511 *werror = r.out.result;
514 return werror_to_ntstatus(r.out.result);
517 NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
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)
529 struct spoolss_EnumPrinterDrivers r;
530 NTSTATUS status;
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;
539 if (DEBUGLEVEL >= 10) {
540 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, &r);
543 status = cli->dispatch(cli,
544 mem_ctx,
545 &ndr_table_spoolss,
546 NDR_SPOOLSS_ENUMPRINTERDRIVERS,
547 &r);
549 if (!NT_STATUS_IS_OK(status)) {
550 return status;
553 if (DEBUGLEVEL >= 10) {
554 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, &r);
557 if (NT_STATUS_IS_ERR(status)) {
558 return status;
561 /* Return variables */
562 *count = *r.out.count;
563 *info = *r.out.info;
564 *needed = *r.out.needed;
566 /* Return result */
567 if (werror) {
568 *werror = r.out.result;
571 return werror_to_ntstatus(r.out.result);
574 NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli,
575 TALLOC_CTX *mem_ctx,
576 WERROR *werror)
578 struct spoolss_GetPrinterDriver r;
579 NTSTATUS status;
581 /* In parameters */
583 if (DEBUGLEVEL >= 10) {
584 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &r);
587 status = cli->dispatch(cli,
588 mem_ctx,
589 &ndr_table_spoolss,
590 NDR_SPOOLSS_GETPRINTERDRIVER,
591 &r);
593 if (!NT_STATUS_IS_OK(status)) {
594 return status;
597 if (DEBUGLEVEL >= 10) {
598 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &r);
601 if (NT_STATUS_IS_ERR(status)) {
602 return status;
605 /* Return variables */
607 /* Return result */
608 if (werror) {
609 *werror = r.out.result;
612 return werror_to_ntstatus(r.out.result);
615 NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
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)
626 struct spoolss_GetPrinterDriverDirectory r;
627 NTSTATUS status;
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;
636 if (DEBUGLEVEL >= 10) {
637 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
640 status = cli->dispatch(cli,
641 mem_ctx,
642 &ndr_table_spoolss,
643 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY,
644 &r);
646 if (!NT_STATUS_IS_OK(status)) {
647 return status;
650 if (DEBUGLEVEL >= 10) {
651 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
654 if (NT_STATUS_IS_ERR(status)) {
655 return status;
658 /* Return variables */
659 if (info && r.out.info) {
660 *info = *r.out.info;
662 *needed = *r.out.needed;
664 /* Return result */
665 if (werror) {
666 *werror = r.out.result;
669 return werror_to_ntstatus(r.out.result);
672 NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
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)
679 struct spoolss_DeletePrinterDriver r;
680 NTSTATUS status;
682 /* In parameters */
683 r.in.server = server;
684 r.in.architecture = architecture;
685 r.in.driver = driver;
687 if (DEBUGLEVEL >= 10) {
688 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &r);
691 status = cli->dispatch(cli,
692 mem_ctx,
693 &ndr_table_spoolss,
694 NDR_SPOOLSS_DELETEPRINTERDRIVER,
695 &r);
697 if (!NT_STATUS_IS_OK(status)) {
698 return status;
701 if (DEBUGLEVEL >= 10) {
702 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &r);
705 if (NT_STATUS_IS_ERR(status)) {
706 return status;
709 /* Return variables */
711 /* Return result */
712 if (werror) {
713 *werror = r.out.result;
716 return werror_to_ntstatus(r.out.result);
719 NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
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)
727 struct spoolss_AddPrintProcessor r;
728 NTSTATUS status;
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;
736 if (DEBUGLEVEL >= 10) {
737 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &r);
740 status = cli->dispatch(cli,
741 mem_ctx,
742 &ndr_table_spoolss,
743 NDR_SPOOLSS_ADDPRINTPROCESSOR,
744 &r);
746 if (!NT_STATUS_IS_OK(status)) {
747 return status;
750 if (DEBUGLEVEL >= 10) {
751 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &r);
754 if (NT_STATUS_IS_ERR(status)) {
755 return status;
758 /* Return variables */
760 /* Return result */
761 if (werror) {
762 *werror = r.out.result;
765 return werror_to_ntstatus(r.out.result);
768 NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
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)
780 struct spoolss_EnumPrintProcessors r;
781 NTSTATUS status;
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;
790 if (DEBUGLEVEL >= 10) {
791 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &r);
794 status = cli->dispatch(cli,
795 mem_ctx,
796 &ndr_table_spoolss,
797 NDR_SPOOLSS_ENUMPRINTPROCESSORS,
798 &r);
800 if (!NT_STATUS_IS_OK(status)) {
801 return status;
804 if (DEBUGLEVEL >= 10) {
805 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &r);
808 if (NT_STATUS_IS_ERR(status)) {
809 return status;
812 /* Return variables */
813 *count = *r.out.count;
814 *info = *r.out.info;
815 *needed = *r.out.needed;
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 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)
836 struct spoolss_GetPrintProcessorDirectory r;
837 NTSTATUS status;
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;
846 if (DEBUGLEVEL >= 10) {
847 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
850 status = cli->dispatch(cli,
851 mem_ctx,
852 &ndr_table_spoolss,
853 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY,
854 &r);
856 if (!NT_STATUS_IS_OK(status)) {
857 return status;
860 if (DEBUGLEVEL >= 10) {
861 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
864 if (NT_STATUS_IS_ERR(status)) {
865 return status;
868 /* Return variables */
869 if (info && r.out.info) {
870 *info = *r.out.info;
872 *needed = *r.out.needed;
874 /* Return result */
875 if (werror) {
876 *werror = r.out.result;
879 return werror_to_ntstatus(r.out.result);
882 NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
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)
890 struct spoolss_StartDocPrinter r;
891 NTSTATUS status;
893 /* In parameters */
894 r.in.handle = handle;
895 r.in.level = level;
896 r.in.info = info;
898 if (DEBUGLEVEL >= 10) {
899 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &r);
902 status = cli->dispatch(cli,
903 mem_ctx,
904 &ndr_table_spoolss,
905 NDR_SPOOLSS_STARTDOCPRINTER,
906 &r);
908 if (!NT_STATUS_IS_OK(status)) {
909 return status;
912 if (DEBUGLEVEL >= 10) {
913 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &r);
916 if (NT_STATUS_IS_ERR(status)) {
917 return status;
920 /* Return variables */
921 *job_id = *r.out.job_id;
923 /* Return result */
924 if (werror) {
925 *werror = r.out.result;
928 return werror_to_ntstatus(r.out.result);
931 NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
932 TALLOC_CTX *mem_ctx,
933 struct policy_handle *handle /* [in] [ref] */,
934 WERROR *werror)
936 struct spoolss_StartPagePrinter r;
937 NTSTATUS status;
939 /* In parameters */
940 r.in.handle = handle;
942 if (DEBUGLEVEL >= 10) {
943 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &r);
946 status = cli->dispatch(cli,
947 mem_ctx,
948 &ndr_table_spoolss,
949 NDR_SPOOLSS_STARTPAGEPRINTER,
950 &r);
952 if (!NT_STATUS_IS_OK(status)) {
953 return status;
956 if (DEBUGLEVEL >= 10) {
957 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &r);
960 if (NT_STATUS_IS_ERR(status)) {
961 return status;
964 /* Return variables */
966 /* Return result */
967 if (werror) {
968 *werror = r.out.result;
971 return werror_to_ntstatus(r.out.result);
974 NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
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)
982 struct spoolss_WritePrinter r;
983 NTSTATUS status;
985 /* In parameters */
986 r.in.handle = handle;
987 r.in.data = data;
988 r.in._data_size = _data_size;
990 if (DEBUGLEVEL >= 10) {
991 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &r);
994 status = cli->dispatch(cli,
995 mem_ctx,
996 &ndr_table_spoolss,
997 NDR_SPOOLSS_WRITEPRINTER,
998 &r);
1000 if (!NT_STATUS_IS_OK(status)) {
1001 return status;
1004 if (DEBUGLEVEL >= 10) {
1005 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &r);
1008 if (NT_STATUS_IS_ERR(status)) {
1009 return status;
1012 /* Return variables */
1013 *num_written = *r.out.num_written;
1015 /* Return result */
1016 if (werror) {
1017 *werror = r.out.result;
1020 return werror_to_ntstatus(r.out.result);
1023 NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
1024 TALLOC_CTX *mem_ctx,
1025 struct policy_handle *handle /* [in] [ref] */,
1026 WERROR *werror)
1028 struct spoolss_EndPagePrinter r;
1029 NTSTATUS status;
1031 /* In parameters */
1032 r.in.handle = handle;
1034 if (DEBUGLEVEL >= 10) {
1035 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &r);
1038 status = cli->dispatch(cli,
1039 mem_ctx,
1040 &ndr_table_spoolss,
1041 NDR_SPOOLSS_ENDPAGEPRINTER,
1042 &r);
1044 if (!NT_STATUS_IS_OK(status)) {
1045 return status;
1048 if (DEBUGLEVEL >= 10) {
1049 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &r);
1052 if (NT_STATUS_IS_ERR(status)) {
1053 return status;
1056 /* Return variables */
1058 /* Return result */
1059 if (werror) {
1060 *werror = r.out.result;
1063 return werror_to_ntstatus(r.out.result);
1066 NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
1067 TALLOC_CTX *mem_ctx,
1068 struct policy_handle *handle /* [in] [ref] */,
1069 WERROR *werror)
1071 struct spoolss_AbortPrinter r;
1072 NTSTATUS status;
1074 /* In parameters */
1075 r.in.handle = handle;
1077 if (DEBUGLEVEL >= 10) {
1078 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &r);
1081 status = cli->dispatch(cli,
1082 mem_ctx,
1083 &ndr_table_spoolss,
1084 NDR_SPOOLSS_ABORTPRINTER,
1085 &r);
1087 if (!NT_STATUS_IS_OK(status)) {
1088 return status;
1091 if (DEBUGLEVEL >= 10) {
1092 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &r);
1095 if (NT_STATUS_IS_ERR(status)) {
1096 return status;
1099 /* Return variables */
1101 /* Return result */
1102 if (werror) {
1103 *werror = r.out.result;
1106 return werror_to_ntstatus(r.out.result);
1109 NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
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)
1117 struct spoolss_ReadPrinter r;
1118 NTSTATUS status;
1120 /* In parameters */
1121 r.in.handle = handle;
1122 r.in.data_size = data_size;
1124 if (DEBUGLEVEL >= 10) {
1125 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &r);
1128 status = cli->dispatch(cli,
1129 mem_ctx,
1130 &ndr_table_spoolss,
1131 NDR_SPOOLSS_READPRINTER,
1132 &r);
1134 if (!NT_STATUS_IS_OK(status)) {
1135 return status;
1138 if (DEBUGLEVEL >= 10) {
1139 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &r);
1142 if (NT_STATUS_IS_ERR(status)) {
1143 return status;
1146 /* Return variables */
1147 memcpy(data, r.out.data, r.in.data_size * sizeof(*data));
1148 *_data_size = *r.out._data_size;
1150 /* Return result */
1151 if (werror) {
1152 *werror = r.out.result;
1155 return werror_to_ntstatus(r.out.result);
1158 NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
1159 TALLOC_CTX *mem_ctx,
1160 struct policy_handle *handle /* [in] [ref] */,
1161 WERROR *werror)
1163 struct spoolss_EndDocPrinter r;
1164 NTSTATUS status;
1166 /* In parameters */
1167 r.in.handle = handle;
1169 if (DEBUGLEVEL >= 10) {
1170 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &r);
1173 status = cli->dispatch(cli,
1174 mem_ctx,
1175 &ndr_table_spoolss,
1176 NDR_SPOOLSS_ENDDOCPRINTER,
1177 &r);
1179 if (!NT_STATUS_IS_OK(status)) {
1180 return status;
1183 if (DEBUGLEVEL >= 10) {
1184 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &r);
1187 if (NT_STATUS_IS_ERR(status)) {
1188 return status;
1191 /* Return variables */
1193 /* Return result */
1194 if (werror) {
1195 *werror = r.out.result;
1198 return werror_to_ntstatus(r.out.result);
1201 NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
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)
1210 struct spoolss_AddJob r;
1211 NTSTATUS status;
1213 /* In parameters */
1214 r.in.handle = handle;
1215 r.in.level = level;
1216 r.in.buffer = buffer;
1217 r.in.offered = offered;
1219 if (DEBUGLEVEL >= 10) {
1220 NDR_PRINT_IN_DEBUG(spoolss_AddJob, &r);
1223 status = cli->dispatch(cli,
1224 mem_ctx,
1225 &ndr_table_spoolss,
1226 NDR_SPOOLSS_ADDJOB,
1227 &r);
1229 if (!NT_STATUS_IS_OK(status)) {
1230 return status;
1233 if (DEBUGLEVEL >= 10) {
1234 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &r);
1237 if (NT_STATUS_IS_ERR(status)) {
1238 return status;
1241 /* Return variables */
1242 if (buffer && r.out.buffer) {
1243 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
1245 *needed = *r.out.needed;
1247 /* Return result */
1248 if (werror) {
1249 *werror = r.out.result;
1252 return werror_to_ntstatus(r.out.result);
1255 NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
1256 TALLOC_CTX *mem_ctx,
1257 struct policy_handle *handle /* [in] [ref] */,
1258 uint32_t jobid /* [in] */,
1259 WERROR *werror)
1261 struct spoolss_ScheduleJob r;
1262 NTSTATUS status;
1264 /* In parameters */
1265 r.in.handle = handle;
1266 r.in.jobid = jobid;
1268 if (DEBUGLEVEL >= 10) {
1269 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &r);
1272 status = cli->dispatch(cli,
1273 mem_ctx,
1274 &ndr_table_spoolss,
1275 NDR_SPOOLSS_SCHEDULEJOB,
1276 &r);
1278 if (!NT_STATUS_IS_OK(status)) {
1279 return status;
1282 if (DEBUGLEVEL >= 10) {
1283 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &r);
1286 if (NT_STATUS_IS_ERR(status)) {
1287 return status;
1290 /* Return variables */
1292 /* Return result */
1293 if (werror) {
1294 *werror = r.out.result;
1297 return werror_to_ntstatus(r.out.result);
1300 NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
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)
1310 struct spoolss_GetPrinterData r;
1311 NTSTATUS status;
1313 /* In parameters */
1314 r.in.handle = handle;
1315 r.in.value_name = value_name;
1316 r.in.offered = offered;
1318 if (DEBUGLEVEL >= 10) {
1319 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &r);
1322 status = cli->dispatch(cli,
1323 mem_ctx,
1324 &ndr_table_spoolss,
1325 NDR_SPOOLSS_GETPRINTERDATA,
1326 &r);
1328 if (!NT_STATUS_IS_OK(status)) {
1329 return status;
1332 if (DEBUGLEVEL >= 10) {
1333 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &r);
1336 if (NT_STATUS_IS_ERR(status)) {
1337 return status;
1340 /* Return variables */
1341 *type = *r.out.type;
1342 *data = *r.out.data;
1343 *needed = *r.out.needed;
1345 /* Return result */
1346 if (werror) {
1347 *werror = r.out.result;
1350 return werror_to_ntstatus(r.out.result);
1353 NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
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)
1362 struct spoolss_SetPrinterData r;
1363 NTSTATUS status;
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;
1372 if (DEBUGLEVEL >= 10) {
1373 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &r);
1376 status = cli->dispatch(cli,
1377 mem_ctx,
1378 &ndr_table_spoolss,
1379 NDR_SPOOLSS_SETPRINTERDATA,
1380 &r);
1382 if (!NT_STATUS_IS_OK(status)) {
1383 return status;
1386 if (DEBUGLEVEL >= 10) {
1387 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &r);
1390 if (NT_STATUS_IS_ERR(status)) {
1391 return status;
1394 /* Return variables */
1396 /* Return result */
1397 if (werror) {
1398 *werror = r.out.result;
1401 return werror_to_ntstatus(r.out.result);
1404 NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
1405 TALLOC_CTX *mem_ctx,
1406 WERROR *werror)
1408 struct spoolss_WaitForPrinterChange r;
1409 NTSTATUS status;
1411 /* In parameters */
1413 if (DEBUGLEVEL >= 10) {
1414 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &r);
1417 status = cli->dispatch(cli,
1418 mem_ctx,
1419 &ndr_table_spoolss,
1420 NDR_SPOOLSS_WAITFORPRINTERCHANGE,
1421 &r);
1423 if (!NT_STATUS_IS_OK(status)) {
1424 return status;
1427 if (DEBUGLEVEL >= 10) {
1428 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &r);
1431 if (NT_STATUS_IS_ERR(status)) {
1432 return status;
1435 /* Return variables */
1437 /* Return result */
1438 if (werror) {
1439 *werror = r.out.result;
1442 return werror_to_ntstatus(r.out.result);
1445 NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
1446 TALLOC_CTX *mem_ctx,
1447 struct policy_handle *handle /* [in,out] [ref] */,
1448 WERROR *werror)
1450 struct spoolss_ClosePrinter r;
1451 NTSTATUS status;
1453 /* In parameters */
1454 r.in.handle = handle;
1456 if (DEBUGLEVEL >= 10) {
1457 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &r);
1460 status = cli->dispatch(cli,
1461 mem_ctx,
1462 &ndr_table_spoolss,
1463 NDR_SPOOLSS_CLOSEPRINTER,
1464 &r);
1466 if (!NT_STATUS_IS_OK(status)) {
1467 return status;
1470 if (DEBUGLEVEL >= 10) {
1471 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &r);
1474 if (NT_STATUS_IS_ERR(status)) {
1475 return status;
1478 /* Return variables */
1479 *handle = *r.out.handle;
1481 /* Return result */
1482 if (werror) {
1483 *werror = r.out.result;
1486 return werror_to_ntstatus(r.out.result);
1489 NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
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)
1496 struct spoolss_AddForm r;
1497 NTSTATUS status;
1499 /* In parameters */
1500 r.in.handle = handle;
1501 r.in.level = level;
1502 r.in.info = info;
1504 if (DEBUGLEVEL >= 10) {
1505 NDR_PRINT_IN_DEBUG(spoolss_AddForm, &r);
1508 status = cli->dispatch(cli,
1509 mem_ctx,
1510 &ndr_table_spoolss,
1511 NDR_SPOOLSS_ADDFORM,
1512 &r);
1514 if (!NT_STATUS_IS_OK(status)) {
1515 return status;
1518 if (DEBUGLEVEL >= 10) {
1519 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &r);
1522 if (NT_STATUS_IS_ERR(status)) {
1523 return status;
1526 /* Return variables */
1528 /* Return result */
1529 if (werror) {
1530 *werror = r.out.result;
1533 return werror_to_ntstatus(r.out.result);
1536 NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
1537 TALLOC_CTX *mem_ctx,
1538 struct policy_handle *handle /* [in] [ref] */,
1539 const char *form_name /* [in] [charset(UTF16)] */,
1540 WERROR *werror)
1542 struct spoolss_DeleteForm r;
1543 NTSTATUS status;
1545 /* In parameters */
1546 r.in.handle = handle;
1547 r.in.form_name = form_name;
1549 if (DEBUGLEVEL >= 10) {
1550 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &r);
1553 status = cli->dispatch(cli,
1554 mem_ctx,
1555 &ndr_table_spoolss,
1556 NDR_SPOOLSS_DELETEFORM,
1557 &r);
1559 if (!NT_STATUS_IS_OK(status)) {
1560 return status;
1563 if (DEBUGLEVEL >= 10) {
1564 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &r);
1567 if (NT_STATUS_IS_ERR(status)) {
1568 return status;
1571 /* Return variables */
1573 /* Return result */
1574 if (werror) {
1575 *werror = r.out.result;
1578 return werror_to_ntstatus(r.out.result);
1581 NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
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)
1592 struct spoolss_GetForm r;
1593 NTSTATUS status;
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;
1602 if (DEBUGLEVEL >= 10) {
1603 NDR_PRINT_IN_DEBUG(spoolss_GetForm, &r);
1606 status = cli->dispatch(cli,
1607 mem_ctx,
1608 &ndr_table_spoolss,
1609 NDR_SPOOLSS_GETFORM,
1610 &r);
1612 if (!NT_STATUS_IS_OK(status)) {
1613 return status;
1616 if (DEBUGLEVEL >= 10) {
1617 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &r);
1620 if (NT_STATUS_IS_ERR(status)) {
1621 return status;
1624 /* Return variables */
1625 if (info && r.out.info) {
1626 *info = *r.out.info;
1628 *needed = *r.out.needed;
1630 /* Return result */
1631 if (werror) {
1632 *werror = r.out.result;
1635 return werror_to_ntstatus(r.out.result);
1638 NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
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)
1646 struct spoolss_SetForm r;
1647 NTSTATUS status;
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;
1655 if (DEBUGLEVEL >= 10) {
1656 NDR_PRINT_IN_DEBUG(spoolss_SetForm, &r);
1659 status = cli->dispatch(cli,
1660 mem_ctx,
1661 &ndr_table_spoolss,
1662 NDR_SPOOLSS_SETFORM,
1663 &r);
1665 if (!NT_STATUS_IS_OK(status)) {
1666 return status;
1669 if (DEBUGLEVEL >= 10) {
1670 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &r);
1673 if (NT_STATUS_IS_ERR(status)) {
1674 return status;
1677 /* Return variables */
1679 /* Return result */
1680 if (werror) {
1681 *werror = r.out.result;
1684 return werror_to_ntstatus(r.out.result);
1687 NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
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)
1698 struct spoolss_EnumForms r;
1699 NTSTATUS status;
1701 /* In parameters */
1702 r.in.handle = handle;
1703 r.in.level = level;
1704 r.in.buffer = buffer;
1705 r.in.offered = offered;
1707 if (DEBUGLEVEL >= 10) {
1708 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &r);
1711 status = cli->dispatch(cli,
1712 mem_ctx,
1713 &ndr_table_spoolss,
1714 NDR_SPOOLSS_ENUMFORMS,
1715 &r);
1717 if (!NT_STATUS_IS_OK(status)) {
1718 return status;
1721 if (DEBUGLEVEL >= 10) {
1722 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &r);
1725 if (NT_STATUS_IS_ERR(status)) {
1726 return status;
1729 /* Return variables */
1730 *count = *r.out.count;
1731 *info = *r.out.info;
1732 *needed = *r.out.needed;
1734 /* Return result */
1735 if (werror) {
1736 *werror = r.out.result;
1739 return werror_to_ntstatus(r.out.result);
1742 NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
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)
1753 struct spoolss_EnumPorts r;
1754 NTSTATUS status;
1756 /* In parameters */
1757 r.in.servername = servername;
1758 r.in.level = level;
1759 r.in.buffer = buffer;
1760 r.in.offered = offered;
1762 if (DEBUGLEVEL >= 10) {
1763 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &r);
1766 status = cli->dispatch(cli,
1767 mem_ctx,
1768 &ndr_table_spoolss,
1769 NDR_SPOOLSS_ENUMPORTS,
1770 &r);
1772 if (!NT_STATUS_IS_OK(status)) {
1773 return status;
1776 if (DEBUGLEVEL >= 10) {
1777 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &r);
1780 if (NT_STATUS_IS_ERR(status)) {
1781 return status;
1784 /* Return variables */
1785 *count = *r.out.count;
1786 *info = *r.out.info;
1787 *needed = *r.out.needed;
1789 /* Return result */
1790 if (werror) {
1791 *werror = r.out.result;
1794 return werror_to_ntstatus(r.out.result);
1797 NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
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)
1808 struct spoolss_EnumMonitors r;
1809 NTSTATUS status;
1811 /* In parameters */
1812 r.in.servername = servername;
1813 r.in.level = level;
1814 r.in.buffer = buffer;
1815 r.in.offered = offered;
1817 if (DEBUGLEVEL >= 10) {
1818 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &r);
1821 status = cli->dispatch(cli,
1822 mem_ctx,
1823 &ndr_table_spoolss,
1824 NDR_SPOOLSS_ENUMMONITORS,
1825 &r);
1827 if (!NT_STATUS_IS_OK(status)) {
1828 return status;
1831 if (DEBUGLEVEL >= 10) {
1832 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &r);
1835 if (NT_STATUS_IS_ERR(status)) {
1836 return status;
1839 /* Return variables */
1840 *count = *r.out.count;
1841 *info = *r.out.info;
1842 *needed = *r.out.needed;
1844 /* Return result */
1845 if (werror) {
1846 *werror = r.out.result;
1849 return werror_to_ntstatus(r.out.result);
1852 NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
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)
1859 struct spoolss_AddPort r;
1860 NTSTATUS status;
1862 /* In parameters */
1863 r.in.server_name = server_name;
1864 r.in.unknown = unknown;
1865 r.in.monitor_name = monitor_name;
1867 if (DEBUGLEVEL >= 10) {
1868 NDR_PRINT_IN_DEBUG(spoolss_AddPort, &r);
1871 status = cli->dispatch(cli,
1872 mem_ctx,
1873 &ndr_table_spoolss,
1874 NDR_SPOOLSS_ADDPORT,
1875 &r);
1877 if (!NT_STATUS_IS_OK(status)) {
1878 return status;
1881 if (DEBUGLEVEL >= 10) {
1882 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &r);
1885 if (NT_STATUS_IS_ERR(status)) {
1886 return status;
1889 /* Return variables */
1891 /* Return result */
1892 if (werror) {
1893 *werror = r.out.result;
1896 return werror_to_ntstatus(r.out.result);
1899 NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
1900 TALLOC_CTX *mem_ctx,
1901 WERROR *werror)
1903 struct spoolss_ConfigurePort r;
1904 NTSTATUS status;
1906 /* In parameters */
1908 if (DEBUGLEVEL >= 10) {
1909 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &r);
1912 status = cli->dispatch(cli,
1913 mem_ctx,
1914 &ndr_table_spoolss,
1915 NDR_SPOOLSS_CONFIGUREPORT,
1916 &r);
1918 if (!NT_STATUS_IS_OK(status)) {
1919 return status;
1922 if (DEBUGLEVEL >= 10) {
1923 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &r);
1926 if (NT_STATUS_IS_ERR(status)) {
1927 return status;
1930 /* Return variables */
1932 /* Return result */
1933 if (werror) {
1934 *werror = r.out.result;
1937 return werror_to_ntstatus(r.out.result);
1940 NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
1941 TALLOC_CTX *mem_ctx,
1942 WERROR *werror)
1944 struct spoolss_DeletePort r;
1945 NTSTATUS status;
1947 /* In parameters */
1949 if (DEBUGLEVEL >= 10) {
1950 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &r);
1953 status = cli->dispatch(cli,
1954 mem_ctx,
1955 &ndr_table_spoolss,
1956 NDR_SPOOLSS_DELETEPORT,
1957 &r);
1959 if (!NT_STATUS_IS_OK(status)) {
1960 return status;
1963 if (DEBUGLEVEL >= 10) {
1964 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &r);
1967 if (NT_STATUS_IS_ERR(status)) {
1968 return status;
1971 /* Return variables */
1973 /* Return result */
1974 if (werror) {
1975 *werror = r.out.result;
1978 return werror_to_ntstatus(r.out.result);
1981 NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
1982 TALLOC_CTX *mem_ctx,
1983 WERROR *werror)
1985 struct spoolss_CreatePrinterIC r;
1986 NTSTATUS status;
1988 /* In parameters */
1990 if (DEBUGLEVEL >= 10) {
1991 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r);
1994 status = cli->dispatch(cli,
1995 mem_ctx,
1996 &ndr_table_spoolss,
1997 NDR_SPOOLSS_CREATEPRINTERIC,
1998 &r);
2000 if (!NT_STATUS_IS_OK(status)) {
2001 return status;
2004 if (DEBUGLEVEL >= 10) {
2005 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &r);
2008 if (NT_STATUS_IS_ERR(status)) {
2009 return status;
2012 /* Return variables */
2014 /* Return result */
2015 if (werror) {
2016 *werror = r.out.result;
2019 return werror_to_ntstatus(r.out.result);
2022 NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
2023 TALLOC_CTX *mem_ctx,
2024 WERROR *werror)
2026 struct spoolss_PlayGDIScriptOnPrinterIC r;
2027 NTSTATUS status;
2029 /* In parameters */
2031 if (DEBUGLEVEL >= 10) {
2032 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2035 status = cli->dispatch(cli,
2036 mem_ctx,
2037 &ndr_table_spoolss,
2038 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC,
2039 &r);
2041 if (!NT_STATUS_IS_OK(status)) {
2042 return status;
2045 if (DEBUGLEVEL >= 10) {
2046 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2049 if (NT_STATUS_IS_ERR(status)) {
2050 return status;
2053 /* Return variables */
2055 /* Return result */
2056 if (werror) {
2057 *werror = r.out.result;
2060 return werror_to_ntstatus(r.out.result);
2063 NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
2064 TALLOC_CTX *mem_ctx,
2065 WERROR *werror)
2067 struct spoolss_DeletePrinterIC r;
2068 NTSTATUS status;
2070 /* In parameters */
2072 if (DEBUGLEVEL >= 10) {
2073 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r);
2076 status = cli->dispatch(cli,
2077 mem_ctx,
2078 &ndr_table_spoolss,
2079 NDR_SPOOLSS_DELETEPRINTERIC,
2080 &r);
2082 if (!NT_STATUS_IS_OK(status)) {
2083 return status;
2086 if (DEBUGLEVEL >= 10) {
2087 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &r);
2090 if (NT_STATUS_IS_ERR(status)) {
2091 return status;
2094 /* Return variables */
2096 /* Return result */
2097 if (werror) {
2098 *werror = r.out.result;
2101 return werror_to_ntstatus(r.out.result);
2104 NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
2105 TALLOC_CTX *mem_ctx,
2106 WERROR *werror)
2108 struct spoolss_AddPrinterConnection r;
2109 NTSTATUS status;
2111 /* In parameters */
2113 if (DEBUGLEVEL >= 10) {
2114 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &r);
2117 status = cli->dispatch(cli,
2118 mem_ctx,
2119 &ndr_table_spoolss,
2120 NDR_SPOOLSS_ADDPRINTERCONNECTION,
2121 &r);
2123 if (!NT_STATUS_IS_OK(status)) {
2124 return status;
2127 if (DEBUGLEVEL >= 10) {
2128 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &r);
2131 if (NT_STATUS_IS_ERR(status)) {
2132 return status;
2135 /* Return variables */
2137 /* Return result */
2138 if (werror) {
2139 *werror = r.out.result;
2142 return werror_to_ntstatus(r.out.result);
2145 NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
2146 TALLOC_CTX *mem_ctx,
2147 WERROR *werror)
2149 struct spoolss_DeletePrinterConnection r;
2150 NTSTATUS status;
2152 /* In parameters */
2154 if (DEBUGLEVEL >= 10) {
2155 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &r);
2158 status = cli->dispatch(cli,
2159 mem_ctx,
2160 &ndr_table_spoolss,
2161 NDR_SPOOLSS_DELETEPRINTERCONNECTION,
2162 &r);
2164 if (!NT_STATUS_IS_OK(status)) {
2165 return status;
2168 if (DEBUGLEVEL >= 10) {
2169 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &r);
2172 if (NT_STATUS_IS_ERR(status)) {
2173 return status;
2176 /* Return variables */
2178 /* Return result */
2179 if (werror) {
2180 *werror = r.out.result;
2183 return werror_to_ntstatus(r.out.result);
2186 NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
2187 TALLOC_CTX *mem_ctx,
2188 WERROR *werror)
2190 struct spoolss_PrinterMessageBox r;
2191 NTSTATUS status;
2193 /* In parameters */
2195 if (DEBUGLEVEL >= 10) {
2196 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &r);
2199 status = cli->dispatch(cli,
2200 mem_ctx,
2201 &ndr_table_spoolss,
2202 NDR_SPOOLSS_PRINTERMESSAGEBOX,
2203 &r);
2205 if (!NT_STATUS_IS_OK(status)) {
2206 return status;
2209 if (DEBUGLEVEL >= 10) {
2210 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &r);
2213 if (NT_STATUS_IS_ERR(status)) {
2214 return status;
2217 /* Return variables */
2219 /* Return result */
2220 if (werror) {
2221 *werror = r.out.result;
2224 return werror_to_ntstatus(r.out.result);
2227 NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
2228 TALLOC_CTX *mem_ctx,
2229 WERROR *werror)
2231 struct spoolss_AddMonitor r;
2232 NTSTATUS status;
2234 /* In parameters */
2236 if (DEBUGLEVEL >= 10) {
2237 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &r);
2240 status = cli->dispatch(cli,
2241 mem_ctx,
2242 &ndr_table_spoolss,
2243 NDR_SPOOLSS_ADDMONITOR,
2244 &r);
2246 if (!NT_STATUS_IS_OK(status)) {
2247 return status;
2250 if (DEBUGLEVEL >= 10) {
2251 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &r);
2254 if (NT_STATUS_IS_ERR(status)) {
2255 return status;
2258 /* Return variables */
2260 /* Return result */
2261 if (werror) {
2262 *werror = r.out.result;
2265 return werror_to_ntstatus(r.out.result);
2268 NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
2269 TALLOC_CTX *mem_ctx,
2270 WERROR *werror)
2272 struct spoolss_DeleteMonitor r;
2273 NTSTATUS status;
2275 /* In parameters */
2277 if (DEBUGLEVEL >= 10) {
2278 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &r);
2281 status = cli->dispatch(cli,
2282 mem_ctx,
2283 &ndr_table_spoolss,
2284 NDR_SPOOLSS_DELETEMONITOR,
2285 &r);
2287 if (!NT_STATUS_IS_OK(status)) {
2288 return status;
2291 if (DEBUGLEVEL >= 10) {
2292 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &r);
2295 if (NT_STATUS_IS_ERR(status)) {
2296 return status;
2299 /* Return variables */
2301 /* Return result */
2302 if (werror) {
2303 *werror = r.out.result;
2306 return werror_to_ntstatus(r.out.result);
2309 NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
2310 TALLOC_CTX *mem_ctx,
2311 WERROR *werror)
2313 struct spoolss_DeletePrintProcessor r;
2314 NTSTATUS status;
2316 /* In parameters */
2318 if (DEBUGLEVEL >= 10) {
2319 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &r);
2322 status = cli->dispatch(cli,
2323 mem_ctx,
2324 &ndr_table_spoolss,
2325 NDR_SPOOLSS_DELETEPRINTPROCESSOR,
2326 &r);
2328 if (!NT_STATUS_IS_OK(status)) {
2329 return status;
2332 if (DEBUGLEVEL >= 10) {
2333 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &r);
2336 if (NT_STATUS_IS_ERR(status)) {
2337 return status;
2340 /* Return variables */
2342 /* Return result */
2343 if (werror) {
2344 *werror = r.out.result;
2347 return werror_to_ntstatus(r.out.result);
2350 NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
2351 TALLOC_CTX *mem_ctx,
2352 WERROR *werror)
2354 struct spoolss_AddPrintProvidor r;
2355 NTSTATUS status;
2357 /* In parameters */
2359 if (DEBUGLEVEL >= 10) {
2360 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &r);
2363 status = cli->dispatch(cli,
2364 mem_ctx,
2365 &ndr_table_spoolss,
2366 NDR_SPOOLSS_ADDPRINTPROVIDOR,
2367 &r);
2369 if (!NT_STATUS_IS_OK(status)) {
2370 return status;
2373 if (DEBUGLEVEL >= 10) {
2374 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &r);
2377 if (NT_STATUS_IS_ERR(status)) {
2378 return status;
2381 /* Return variables */
2383 /* Return result */
2384 if (werror) {
2385 *werror = r.out.result;
2388 return werror_to_ntstatus(r.out.result);
2391 NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
2392 TALLOC_CTX *mem_ctx,
2393 WERROR *werror)
2395 struct spoolss_DeletePrintProvidor r;
2396 NTSTATUS status;
2398 /* In parameters */
2400 if (DEBUGLEVEL >= 10) {
2401 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &r);
2404 status = cli->dispatch(cli,
2405 mem_ctx,
2406 &ndr_table_spoolss,
2407 NDR_SPOOLSS_DELETEPRINTPROVIDOR,
2408 &r);
2410 if (!NT_STATUS_IS_OK(status)) {
2411 return status;
2414 if (DEBUGLEVEL >= 10) {
2415 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &r);
2418 if (NT_STATUS_IS_ERR(status)) {
2419 return status;
2422 /* Return variables */
2424 /* Return result */
2425 if (werror) {
2426 *werror = r.out.result;
2429 return werror_to_ntstatus(r.out.result);
2432 NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
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)
2444 struct spoolss_EnumPrintProcDataTypes r;
2445 NTSTATUS status;
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;
2454 if (DEBUGLEVEL >= 10) {
2455 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2458 status = cli->dispatch(cli,
2459 mem_ctx,
2460 &ndr_table_spoolss,
2461 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES,
2462 &r);
2464 if (!NT_STATUS_IS_OK(status)) {
2465 return status;
2468 if (DEBUGLEVEL >= 10) {
2469 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2472 if (NT_STATUS_IS_ERR(status)) {
2473 return status;
2476 /* Return variables */
2477 *count = *r.out.count;
2478 *info = *r.out.info;
2479 *needed = *r.out.needed;
2481 /* Return result */
2482 if (werror) {
2483 *werror = r.out.result;
2486 return werror_to_ntstatus(r.out.result);
2489 NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
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)
2496 struct spoolss_ResetPrinter r;
2497 NTSTATUS status;
2499 /* In parameters */
2500 r.in.handle = handle;
2501 r.in.data_type = data_type;
2502 r.in.devmode_ctr = devmode_ctr;
2504 if (DEBUGLEVEL >= 10) {
2505 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &r);
2508 status = cli->dispatch(cli,
2509 mem_ctx,
2510 &ndr_table_spoolss,
2511 NDR_SPOOLSS_RESETPRINTER,
2512 &r);
2514 if (!NT_STATUS_IS_OK(status)) {
2515 return status;
2518 if (DEBUGLEVEL >= 10) {
2519 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &r);
2522 if (NT_STATUS_IS_ERR(status)) {
2523 return status;
2526 /* Return variables */
2528 /* Return result */
2529 if (werror) {
2530 *werror = r.out.result;
2533 return werror_to_ntstatus(r.out.result);
2536 NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
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)
2551 struct spoolss_GetPrinterDriver2 r;
2552 NTSTATUS status;
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;
2563 if (DEBUGLEVEL >= 10) {
2564 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &r);
2567 status = cli->dispatch(cli,
2568 mem_ctx,
2569 &ndr_table_spoolss,
2570 NDR_SPOOLSS_GETPRINTERDRIVER2,
2571 &r);
2573 if (!NT_STATUS_IS_OK(status)) {
2574 return status;
2577 if (DEBUGLEVEL >= 10) {
2578 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &r);
2581 if (NT_STATUS_IS_ERR(status)) {
2582 return status;
2585 /* Return variables */
2586 if (info && r.out.info) {
2587 *info = *r.out.info;
2589 *needed = *r.out.needed;
2590 *server_major_version = *r.out.server_major_version;
2591 *server_minor_version = *r.out.server_minor_version;
2593 /* Return result */
2594 if (werror) {
2595 *werror = r.out.result;
2598 return werror_to_ntstatus(r.out.result);
2601 NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2602 TALLOC_CTX *mem_ctx,
2603 WERROR *werror)
2605 struct spoolss_FindFirstPrinterChangeNotification r;
2606 NTSTATUS status;
2608 /* In parameters */
2610 if (DEBUGLEVEL >= 10) {
2611 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2614 status = cli->dispatch(cli,
2615 mem_ctx,
2616 &ndr_table_spoolss,
2617 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION,
2618 &r);
2620 if (!NT_STATUS_IS_OK(status)) {
2621 return status;
2624 if (DEBUGLEVEL >= 10) {
2625 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2628 if (NT_STATUS_IS_ERR(status)) {
2629 return status;
2632 /* Return variables */
2634 /* Return result */
2635 if (werror) {
2636 *werror = r.out.result;
2639 return werror_to_ntstatus(r.out.result);
2642 NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
2643 TALLOC_CTX *mem_ctx,
2644 WERROR *werror)
2646 struct spoolss_FindNextPrinterChangeNotification r;
2647 NTSTATUS status;
2649 /* In parameters */
2651 if (DEBUGLEVEL >= 10) {
2652 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2655 status = cli->dispatch(cli,
2656 mem_ctx,
2657 &ndr_table_spoolss,
2658 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION,
2659 &r);
2661 if (!NT_STATUS_IS_OK(status)) {
2662 return status;
2665 if (DEBUGLEVEL >= 10) {
2666 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2669 if (NT_STATUS_IS_ERR(status)) {
2670 return status;
2673 /* Return variables */
2675 /* Return result */
2676 if (werror) {
2677 *werror = r.out.result;
2680 return werror_to_ntstatus(r.out.result);
2683 NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
2684 TALLOC_CTX *mem_ctx,
2685 struct policy_handle *handle /* [in] [ref] */,
2686 WERROR *werror)
2688 struct spoolss_FindClosePrinterNotify r;
2689 NTSTATUS status;
2691 /* In parameters */
2692 r.in.handle = handle;
2694 if (DEBUGLEVEL >= 10) {
2695 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &r);
2698 status = cli->dispatch(cli,
2699 mem_ctx,
2700 &ndr_table_spoolss,
2701 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY,
2702 &r);
2704 if (!NT_STATUS_IS_OK(status)) {
2705 return status;
2708 if (DEBUGLEVEL >= 10) {
2709 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &r);
2712 if (NT_STATUS_IS_ERR(status)) {
2713 return status;
2716 /* Return variables */
2718 /* Return result */
2719 if (werror) {
2720 *werror = r.out.result;
2723 return werror_to_ntstatus(r.out.result);
2726 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
2727 TALLOC_CTX *mem_ctx,
2728 WERROR *werror)
2730 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r;
2731 NTSTATUS status;
2733 /* In parameters */
2735 if (DEBUGLEVEL >= 10) {
2736 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2739 status = cli->dispatch(cli,
2740 mem_ctx,
2741 &ndr_table_spoolss,
2742 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD,
2743 &r);
2745 if (!NT_STATUS_IS_OK(status)) {
2746 return status;
2749 if (DEBUGLEVEL >= 10) {
2750 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2753 if (NT_STATUS_IS_ERR(status)) {
2754 return status;
2757 /* Return variables */
2759 /* Return result */
2760 if (werror) {
2761 *werror = r.out.result;
2764 return werror_to_ntstatus(r.out.result);
2767 NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
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)
2777 struct spoolss_ReplyOpenPrinter r;
2778 NTSTATUS status;
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;
2787 if (DEBUGLEVEL >= 10) {
2788 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
2791 status = cli->dispatch(cli,
2792 mem_ctx,
2793 &ndr_table_spoolss,
2794 NDR_SPOOLSS_REPLYOPENPRINTER,
2795 &r);
2797 if (!NT_STATUS_IS_OK(status)) {
2798 return status;
2801 if (DEBUGLEVEL >= 10) {
2802 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &r);
2805 if (NT_STATUS_IS_ERR(status)) {
2806 return status;
2809 /* Return variables */
2810 *handle = *r.out.handle;
2812 /* Return result */
2813 if (werror) {
2814 *werror = r.out.result;
2817 return werror_to_ntstatus(r.out.result);
2820 NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
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)
2828 struct spoolss_RouterReplyPrinter r;
2829 NTSTATUS status;
2831 /* In parameters */
2832 r.in.handle = handle;
2833 r.in.flags = flags;
2834 r.in.bufsize = bufsize;
2835 r.in.buffer = buffer;
2837 if (DEBUGLEVEL >= 10) {
2838 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &r);
2841 status = cli->dispatch(cli,
2842 mem_ctx,
2843 &ndr_table_spoolss,
2844 NDR_SPOOLSS_ROUTERREPLYPRINTER,
2845 &r);
2847 if (!NT_STATUS_IS_OK(status)) {
2848 return status;
2851 if (DEBUGLEVEL >= 10) {
2852 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &r);
2855 if (NT_STATUS_IS_ERR(status)) {
2856 return status;
2859 /* Return variables */
2861 /* Return result */
2862 if (werror) {
2863 *werror = r.out.result;
2866 return werror_to_ntstatus(r.out.result);
2869 NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
2870 TALLOC_CTX *mem_ctx,
2871 struct policy_handle *handle /* [in,out] [ref] */,
2872 WERROR *werror)
2874 struct spoolss_ReplyClosePrinter r;
2875 NTSTATUS status;
2877 /* In parameters */
2878 r.in.handle = handle;
2880 if (DEBUGLEVEL >= 10) {
2881 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &r);
2884 status = cli->dispatch(cli,
2885 mem_ctx,
2886 &ndr_table_spoolss,
2887 NDR_SPOOLSS_REPLYCLOSEPRINTER,
2888 &r);
2890 if (!NT_STATUS_IS_OK(status)) {
2891 return status;
2894 if (DEBUGLEVEL >= 10) {
2895 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &r);
2898 if (NT_STATUS_IS_ERR(status)) {
2899 return status;
2902 /* Return variables */
2903 *handle = *r.out.handle;
2905 /* Return result */
2906 if (werror) {
2907 *werror = r.out.result;
2910 return werror_to_ntstatus(r.out.result);
2913 NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
2914 TALLOC_CTX *mem_ctx,
2915 WERROR *werror)
2917 struct spoolss_AddPortEx r;
2918 NTSTATUS status;
2920 /* In parameters */
2922 if (DEBUGLEVEL >= 10) {
2923 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &r);
2926 status = cli->dispatch(cli,
2927 mem_ctx,
2928 &ndr_table_spoolss,
2929 NDR_SPOOLSS_ADDPORTEX,
2930 &r);
2932 if (!NT_STATUS_IS_OK(status)) {
2933 return status;
2936 if (DEBUGLEVEL >= 10) {
2937 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &r);
2940 if (NT_STATUS_IS_ERR(status)) {
2941 return status;
2944 /* Return variables */
2946 /* Return result */
2947 if (werror) {
2948 *werror = r.out.result;
2951 return werror_to_ntstatus(r.out.result);
2954 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2955 TALLOC_CTX *mem_ctx,
2956 WERROR *werror)
2958 struct spoolss_RouterFindFirstPrinterChangeNotification r;
2959 NTSTATUS status;
2961 /* In parameters */
2963 if (DEBUGLEVEL >= 10) {
2964 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2967 status = cli->dispatch(cli,
2968 mem_ctx,
2969 &ndr_table_spoolss,
2970 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION,
2971 &r);
2973 if (!NT_STATUS_IS_OK(status)) {
2974 return status;
2977 if (DEBUGLEVEL >= 10) {
2978 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2981 if (NT_STATUS_IS_ERR(status)) {
2982 return status;
2985 /* Return variables */
2987 /* Return result */
2988 if (werror) {
2989 *werror = r.out.result;
2992 return werror_to_ntstatus(r.out.result);
2995 NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
2996 TALLOC_CTX *mem_ctx,
2997 WERROR *werror)
2999 struct spoolss_SpoolerInit r;
3000 NTSTATUS status;
3002 /* In parameters */
3004 if (DEBUGLEVEL >= 10) {
3005 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &r);
3008 status = cli->dispatch(cli,
3009 mem_ctx,
3010 &ndr_table_spoolss,
3011 NDR_SPOOLSS_SPOOLERINIT,
3012 &r);
3014 if (!NT_STATUS_IS_OK(status)) {
3015 return status;
3018 if (DEBUGLEVEL >= 10) {
3019 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &r);
3022 if (NT_STATUS_IS_ERR(status)) {
3023 return status;
3026 /* Return variables */
3028 /* Return result */
3029 if (werror) {
3030 *werror = r.out.result;
3033 return werror_to_ntstatus(r.out.result);
3036 NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
3037 TALLOC_CTX *mem_ctx,
3038 WERROR *werror)
3040 struct spoolss_ResetPrinterEx r;
3041 NTSTATUS status;
3043 /* In parameters */
3045 if (DEBUGLEVEL >= 10) {
3046 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &r);
3049 status = cli->dispatch(cli,
3050 mem_ctx,
3051 &ndr_table_spoolss,
3052 NDR_SPOOLSS_RESETPRINTEREX,
3053 &r);
3055 if (!NT_STATUS_IS_OK(status)) {
3056 return status;
3059 if (DEBUGLEVEL >= 10) {
3060 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &r);
3063 if (NT_STATUS_IS_ERR(status)) {
3064 return status;
3067 /* Return variables */
3069 /* Return result */
3070 if (werror) {
3071 *werror = r.out.result;
3074 return werror_to_ntstatus(r.out.result);
3077 NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
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)
3087 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r;
3088 NTSTATUS status;
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;
3098 if (DEBUGLEVEL >= 10) {
3099 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3102 status = cli->dispatch(cli,
3103 mem_ctx,
3104 &ndr_table_spoolss,
3105 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX,
3106 &r);
3108 if (!NT_STATUS_IS_OK(status)) {
3109 return status;
3112 if (DEBUGLEVEL >= 10) {
3113 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3116 if (NT_STATUS_IS_ERR(status)) {
3117 return status;
3120 /* Return variables */
3122 /* Return result */
3123 if (werror) {
3124 *werror = r.out.result;
3127 return werror_to_ntstatus(r.out.result);
3130 NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli,
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)
3140 struct spoolss_RouterReplyPrinterEx r;
3141 NTSTATUS status;
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;
3150 if (DEBUGLEVEL >= 10) {
3151 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3154 status = cli->dispatch(cli,
3155 mem_ctx,
3156 &ndr_table_spoolss,
3157 NDR_SPOOLSS_ROUTERREPLYPRINTEREX,
3158 &r);
3160 if (!NT_STATUS_IS_OK(status)) {
3161 return status;
3164 if (DEBUGLEVEL >= 10) {
3165 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3168 if (NT_STATUS_IS_ERR(status)) {
3169 return status;
3172 /* Return variables */
3173 *reply_result = *r.out.reply_result;
3175 /* Return result */
3176 if (werror) {
3177 *werror = r.out.result;
3180 return werror_to_ntstatus(r.out.result);
3183 NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli,
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)
3191 struct spoolss_RouterRefreshPrinterChangeNotify r;
3192 NTSTATUS status;
3194 /* In parameters */
3195 r.in.handle = handle;
3196 r.in.change_low = change_low;
3197 r.in.options = options;
3199 if (DEBUGLEVEL >= 10) {
3200 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3203 status = cli->dispatch(cli,
3204 mem_ctx,
3205 &ndr_table_spoolss,
3206 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY,
3207 &r);
3209 if (!NT_STATUS_IS_OK(status)) {
3210 return status;
3213 if (DEBUGLEVEL >= 10) {
3214 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3217 if (NT_STATUS_IS_ERR(status)) {
3218 return status;
3221 /* Return variables */
3222 *info = *r.out.info;
3224 /* Return result */
3225 if (werror) {
3226 *werror = r.out.result;
3229 return werror_to_ntstatus(r.out.result);
3232 NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
3233 TALLOC_CTX *mem_ctx,
3234 WERROR *werror)
3236 struct spoolss_44 r;
3237 NTSTATUS status;
3239 /* In parameters */
3241 if (DEBUGLEVEL >= 10) {
3242 NDR_PRINT_IN_DEBUG(spoolss_44, &r);
3245 status = cli->dispatch(cli,
3246 mem_ctx,
3247 &ndr_table_spoolss,
3248 NDR_SPOOLSS_44,
3249 &r);
3251 if (!NT_STATUS_IS_OK(status)) {
3252 return status;
3255 if (DEBUGLEVEL >= 10) {
3256 NDR_PRINT_OUT_DEBUG(spoolss_44, &r);
3259 if (NT_STATUS_IS_ERR(status)) {
3260 return status;
3263 /* Return variables */
3265 /* Return result */
3266 if (werror) {
3267 *werror = r.out.result;
3270 return werror_to_ntstatus(r.out.result);
3273 NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
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)
3284 struct spoolss_OpenPrinterEx r;
3285 NTSTATUS status;
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;
3295 if (DEBUGLEVEL >= 10) {
3296 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &r);
3299 status = cli->dispatch(cli,
3300 mem_ctx,
3301 &ndr_table_spoolss,
3302 NDR_SPOOLSS_OPENPRINTEREX,
3303 &r);
3305 if (!NT_STATUS_IS_OK(status)) {
3306 return status;
3309 if (DEBUGLEVEL >= 10) {
3310 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &r);
3313 if (NT_STATUS_IS_ERR(status)) {
3314 return status;
3317 /* Return variables */
3318 *handle = *r.out.handle;
3320 /* Return result */
3321 if (werror) {
3322 *werror = r.out.result;
3325 return werror_to_ntstatus(r.out.result);
3328 NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
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)
3338 struct spoolss_AddPrinterEx r;
3339 NTSTATUS status;
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;
3348 if (DEBUGLEVEL >= 10) {
3349 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &r);
3352 status = cli->dispatch(cli,
3353 mem_ctx,
3354 &ndr_table_spoolss,
3355 NDR_SPOOLSS_ADDPRINTEREX,
3356 &r);
3358 if (!NT_STATUS_IS_OK(status)) {
3359 return status;
3362 if (DEBUGLEVEL >= 10) {
3363 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &r);
3366 if (NT_STATUS_IS_ERR(status)) {
3367 return status;
3370 /* Return variables */
3371 *handle = *r.out.handle;
3373 /* Return result */
3374 if (werror) {
3375 *werror = r.out.result;
3378 return werror_to_ntstatus(r.out.result);
3381 NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
3382 TALLOC_CTX *mem_ctx,
3383 WERROR *werror)
3385 struct spoolss_47 r;
3386 NTSTATUS status;
3388 /* In parameters */
3390 if (DEBUGLEVEL >= 10) {
3391 NDR_PRINT_IN_DEBUG(spoolss_47, &r);
3394 status = cli->dispatch(cli,
3395 mem_ctx,
3396 &ndr_table_spoolss,
3397 NDR_SPOOLSS_47,
3398 &r);
3400 if (!NT_STATUS_IS_OK(status)) {
3401 return status;
3404 if (DEBUGLEVEL >= 10) {
3405 NDR_PRINT_OUT_DEBUG(spoolss_47, &r);
3408 if (NT_STATUS_IS_ERR(status)) {
3409 return status;
3412 /* Return variables */
3414 /* Return result */
3415 if (werror) {
3416 *werror = r.out.result;
3419 return werror_to_ntstatus(r.out.result);
3422 NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
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)
3435 struct spoolss_EnumPrinterData r;
3436 NTSTATUS status;
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;
3444 if (DEBUGLEVEL >= 10) {
3445 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &r);
3448 status = cli->dispatch(cli,
3449 mem_ctx,
3450 &ndr_table_spoolss,
3451 NDR_SPOOLSS_ENUMPRINTERDATA,
3452 &r);
3454 if (!NT_STATUS_IS_OK(status)) {
3455 return status;
3458 if (DEBUGLEVEL >= 10) {
3459 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &r);
3462 if (NT_STATUS_IS_ERR(status)) {
3463 return status;
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;
3473 /* Return result */
3474 if (werror) {
3475 *werror = r.out.result;
3478 return werror_to_ntstatus(r.out.result);
3481 NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
3482 TALLOC_CTX *mem_ctx,
3483 struct policy_handle *handle /* [in] [ref] */,
3484 const char *value_name /* [in] [charset(UTF16)] */,
3485 WERROR *werror)
3487 struct spoolss_DeletePrinterData r;
3488 NTSTATUS status;
3490 /* In parameters */
3491 r.in.handle = handle;
3492 r.in.value_name = value_name;
3494 if (DEBUGLEVEL >= 10) {
3495 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &r);
3498 status = cli->dispatch(cli,
3499 mem_ctx,
3500 &ndr_table_spoolss,
3501 NDR_SPOOLSS_DELETEPRINTERDATA,
3502 &r);
3504 if (!NT_STATUS_IS_OK(status)) {
3505 return status;
3508 if (DEBUGLEVEL >= 10) {
3509 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &r);
3512 if (NT_STATUS_IS_ERR(status)) {
3513 return status;
3516 /* Return variables */
3518 /* Return result */
3519 if (werror) {
3520 *werror = r.out.result;
3523 return werror_to_ntstatus(r.out.result);
3526 NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
3527 TALLOC_CTX *mem_ctx,
3528 WERROR *werror)
3530 struct spoolss_4a r;
3531 NTSTATUS status;
3533 /* In parameters */
3535 if (DEBUGLEVEL >= 10) {
3536 NDR_PRINT_IN_DEBUG(spoolss_4a, &r);
3539 status = cli->dispatch(cli,
3540 mem_ctx,
3541 &ndr_table_spoolss,
3542 NDR_SPOOLSS_4A,
3543 &r);
3545 if (!NT_STATUS_IS_OK(status)) {
3546 return status;
3549 if (DEBUGLEVEL >= 10) {
3550 NDR_PRINT_OUT_DEBUG(spoolss_4a, &r);
3553 if (NT_STATUS_IS_ERR(status)) {
3554 return status;
3557 /* Return variables */
3559 /* Return result */
3560 if (werror) {
3561 *werror = r.out.result;
3564 return werror_to_ntstatus(r.out.result);
3567 NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
3568 TALLOC_CTX *mem_ctx,
3569 WERROR *werror)
3571 struct spoolss_4b r;
3572 NTSTATUS status;
3574 /* In parameters */
3576 if (DEBUGLEVEL >= 10) {
3577 NDR_PRINT_IN_DEBUG(spoolss_4b, &r);
3580 status = cli->dispatch(cli,
3581 mem_ctx,
3582 &ndr_table_spoolss,
3583 NDR_SPOOLSS_4B,
3584 &r);
3586 if (!NT_STATUS_IS_OK(status)) {
3587 return status;
3590 if (DEBUGLEVEL >= 10) {
3591 NDR_PRINT_OUT_DEBUG(spoolss_4b, &r);
3594 if (NT_STATUS_IS_ERR(status)) {
3595 return status;
3598 /* Return variables */
3600 /* Return result */
3601 if (werror) {
3602 *werror = r.out.result;
3605 return werror_to_ntstatus(r.out.result);
3608 NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
3609 TALLOC_CTX *mem_ctx,
3610 WERROR *werror)
3612 struct spoolss_4c r;
3613 NTSTATUS status;
3615 /* In parameters */
3617 if (DEBUGLEVEL >= 10) {
3618 NDR_PRINT_IN_DEBUG(spoolss_4c, &r);
3621 status = cli->dispatch(cli,
3622 mem_ctx,
3623 &ndr_table_spoolss,
3624 NDR_SPOOLSS_4C,
3625 &r);
3627 if (!NT_STATUS_IS_OK(status)) {
3628 return status;
3631 if (DEBUGLEVEL >= 10) {
3632 NDR_PRINT_OUT_DEBUG(spoolss_4c, &r);
3635 if (NT_STATUS_IS_ERR(status)) {
3636 return status;
3639 /* Return variables */
3641 /* Return result */
3642 if (werror) {
3643 *werror = r.out.result;
3646 return werror_to_ntstatus(r.out.result);
3649 NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
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)
3659 struct spoolss_SetPrinterDataEx r;
3660 NTSTATUS status;
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;
3670 if (DEBUGLEVEL >= 10) {
3671 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &r);
3674 status = cli->dispatch(cli,
3675 mem_ctx,
3676 &ndr_table_spoolss,
3677 NDR_SPOOLSS_SETPRINTERDATAEX,
3678 &r);
3680 if (!NT_STATUS_IS_OK(status)) {
3681 return status;
3684 if (DEBUGLEVEL >= 10) {
3685 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &r);
3688 if (NT_STATUS_IS_ERR(status)) {
3689 return status;
3692 /* Return variables */
3694 /* Return result */
3695 if (werror) {
3696 *werror = r.out.result;
3699 return werror_to_ntstatus(r.out.result);
3702 NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
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)
3713 struct spoolss_GetPrinterDataEx r;
3714 NTSTATUS status;
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;
3722 if (DEBUGLEVEL >= 10) {
3723 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &r);
3726 status = cli->dispatch(cli,
3727 mem_ctx,
3728 &ndr_table_spoolss,
3729 NDR_SPOOLSS_GETPRINTERDATAEX,
3730 &r);
3732 if (!NT_STATUS_IS_OK(status)) {
3733 return status;
3736 if (DEBUGLEVEL >= 10) {
3737 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &r);
3740 if (NT_STATUS_IS_ERR(status)) {
3741 return status;
3744 /* Return variables */
3745 *type = *r.out.type;
3746 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3747 *needed = *r.out.needed;
3749 /* Return result */
3750 if (werror) {
3751 *werror = r.out.result;
3754 return werror_to_ntstatus(r.out.result);
3757 NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
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)
3767 struct spoolss_EnumPrinterDataEx r;
3768 NTSTATUS status;
3770 /* In parameters */
3771 r.in.handle = handle;
3772 r.in.key_name = key_name;
3773 r.in.offered = offered;
3775 if (DEBUGLEVEL >= 10) {
3776 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &r);
3779 status = cli->dispatch(cli,
3780 mem_ctx,
3781 &ndr_table_spoolss,
3782 NDR_SPOOLSS_ENUMPRINTERDATAEX,
3783 &r);
3785 if (!NT_STATUS_IS_OK(status)) {
3786 return status;
3789 if (DEBUGLEVEL >= 10) {
3790 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &r);
3793 if (NT_STATUS_IS_ERR(status)) {
3794 return status;
3797 /* Return variables */
3798 *count = *r.out.count;
3799 *info = *r.out.info;
3800 *needed = *r.out.needed;
3802 /* Return result */
3803 if (werror) {
3804 *werror = r.out.result;
3807 return werror_to_ntstatus(r.out.result);
3810 NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
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)
3819 struct spoolss_EnumPrinterKey r;
3820 NTSTATUS status;
3822 /* In parameters */
3823 r.in.handle = handle;
3824 r.in.key_name = key_name;
3825 r.in.offered = offered;
3827 if (DEBUGLEVEL >= 10) {
3828 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &r);
3831 status = cli->dispatch(cli,
3832 mem_ctx,
3833 &ndr_table_spoolss,
3834 NDR_SPOOLSS_ENUMPRINTERKEY,
3835 &r);
3837 if (!NT_STATUS_IS_OK(status)) {
3838 return status;
3841 if (DEBUGLEVEL >= 10) {
3842 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &r);
3845 if (NT_STATUS_IS_ERR(status)) {
3846 return status;
3849 /* Return variables */
3850 *key_buffer = *r.out.key_buffer;
3851 *needed = *r.out.needed;
3853 /* Return result */
3854 if (werror) {
3855 *werror = r.out.result;
3858 return werror_to_ntstatus(r.out.result);
3861 NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli,
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)
3868 struct spoolss_DeletePrinterDataEx r;
3869 NTSTATUS status;
3871 /* In parameters */
3872 r.in.handle = handle;
3873 r.in.key_name = key_name;
3874 r.in.value_name = value_name;
3876 if (DEBUGLEVEL >= 10) {
3877 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &r);
3880 status = cli->dispatch(cli,
3881 mem_ctx,
3882 &ndr_table_spoolss,
3883 NDR_SPOOLSS_DELETEPRINTERDATAEX,
3884 &r);
3886 if (!NT_STATUS_IS_OK(status)) {
3887 return status;
3890 if (DEBUGLEVEL >= 10) {
3891 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &r);
3894 if (NT_STATUS_IS_ERR(status)) {
3895 return status;
3898 /* Return variables */
3900 /* Return result */
3901 if (werror) {
3902 *werror = r.out.result;
3905 return werror_to_ntstatus(r.out.result);
3908 NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
3909 TALLOC_CTX *mem_ctx,
3910 struct policy_handle *handle /* [in] [ref] */,
3911 const char *key_name /* [in] [charset(UTF16)] */,
3912 WERROR *werror)
3914 struct spoolss_DeletePrinterKey r;
3915 NTSTATUS status;
3917 /* In parameters */
3918 r.in.handle = handle;
3919 r.in.key_name = key_name;
3921 if (DEBUGLEVEL >= 10) {
3922 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &r);
3925 status = cli->dispatch(cli,
3926 mem_ctx,
3927 &ndr_table_spoolss,
3928 NDR_SPOOLSS_DELETEPRINTERKEY,
3929 &r);
3931 if (!NT_STATUS_IS_OK(status)) {
3932 return status;
3935 if (DEBUGLEVEL >= 10) {
3936 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &r);
3939 if (NT_STATUS_IS_ERR(status)) {
3940 return status;
3943 /* Return variables */
3945 /* Return result */
3946 if (werror) {
3947 *werror = r.out.result;
3950 return werror_to_ntstatus(r.out.result);
3953 NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
3954 TALLOC_CTX *mem_ctx,
3955 WERROR *werror)
3957 struct spoolss_53 r;
3958 NTSTATUS status;
3960 /* In parameters */
3962 if (DEBUGLEVEL >= 10) {
3963 NDR_PRINT_IN_DEBUG(spoolss_53, &r);
3966 status = cli->dispatch(cli,
3967 mem_ctx,
3968 &ndr_table_spoolss,
3969 NDR_SPOOLSS_53,
3970 &r);
3972 if (!NT_STATUS_IS_OK(status)) {
3973 return status;
3976 if (DEBUGLEVEL >= 10) {
3977 NDR_PRINT_OUT_DEBUG(spoolss_53, &r);
3980 if (NT_STATUS_IS_ERR(status)) {
3981 return status;
3984 /* Return variables */
3986 /* Return result */
3987 if (werror) {
3988 *werror = r.out.result;
3991 return werror_to_ntstatus(r.out.result);
3994 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
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)
4003 struct spoolss_DeletePrinterDriverEx r;
4004 NTSTATUS status;
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;
4013 if (DEBUGLEVEL >= 10) {
4014 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4017 status = cli->dispatch(cli,
4018 mem_ctx,
4019 &ndr_table_spoolss,
4020 NDR_SPOOLSS_DELETEPRINTERDRIVEREX,
4021 &r);
4023 if (!NT_STATUS_IS_OK(status)) {
4024 return status;
4027 if (DEBUGLEVEL >= 10) {
4028 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4031 if (NT_STATUS_IS_ERR(status)) {
4032 return status;
4035 /* Return variables */
4037 /* Return result */
4038 if (werror) {
4039 *werror = r.out.result;
4042 return werror_to_ntstatus(r.out.result);
4045 NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
4046 TALLOC_CTX *mem_ctx,
4047 WERROR *werror)
4049 struct spoolss_55 r;
4050 NTSTATUS status;
4052 /* In parameters */
4054 if (DEBUGLEVEL >= 10) {
4055 NDR_PRINT_IN_DEBUG(spoolss_55, &r);
4058 status = cli->dispatch(cli,
4059 mem_ctx,
4060 &ndr_table_spoolss,
4061 NDR_SPOOLSS_55,
4062 &r);
4064 if (!NT_STATUS_IS_OK(status)) {
4065 return status;
4068 if (DEBUGLEVEL >= 10) {
4069 NDR_PRINT_OUT_DEBUG(spoolss_55, &r);
4072 if (NT_STATUS_IS_ERR(status)) {
4073 return status;
4076 /* Return variables */
4078 /* Return result */
4079 if (werror) {
4080 *werror = r.out.result;
4083 return werror_to_ntstatus(r.out.result);
4086 NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
4087 TALLOC_CTX *mem_ctx,
4088 WERROR *werror)
4090 struct spoolss_56 r;
4091 NTSTATUS status;
4093 /* In parameters */
4095 if (DEBUGLEVEL >= 10) {
4096 NDR_PRINT_IN_DEBUG(spoolss_56, &r);
4099 status = cli->dispatch(cli,
4100 mem_ctx,
4101 &ndr_table_spoolss,
4102 NDR_SPOOLSS_56,
4103 &r);
4105 if (!NT_STATUS_IS_OK(status)) {
4106 return status;
4109 if (DEBUGLEVEL >= 10) {
4110 NDR_PRINT_OUT_DEBUG(spoolss_56, &r);
4113 if (NT_STATUS_IS_ERR(status)) {
4114 return status;
4117 /* Return variables */
4119 /* Return result */
4120 if (werror) {
4121 *werror = r.out.result;
4124 return werror_to_ntstatus(r.out.result);
4127 NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
4128 TALLOC_CTX *mem_ctx,
4129 WERROR *werror)
4131 struct spoolss_57 r;
4132 NTSTATUS status;
4134 /* In parameters */
4136 if (DEBUGLEVEL >= 10) {
4137 NDR_PRINT_IN_DEBUG(spoolss_57, &r);
4140 status = cli->dispatch(cli,
4141 mem_ctx,
4142 &ndr_table_spoolss,
4143 NDR_SPOOLSS_57,
4144 &r);
4146 if (!NT_STATUS_IS_OK(status)) {
4147 return status;
4150 if (DEBUGLEVEL >= 10) {
4151 NDR_PRINT_OUT_DEBUG(spoolss_57, &r);
4154 if (NT_STATUS_IS_ERR(status)) {
4155 return status;
4158 /* Return variables */
4160 /* Return result */
4161 if (werror) {
4162 *werror = r.out.result;
4165 return werror_to_ntstatus(r.out.result);
4168 NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
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)
4180 struct spoolss_XcvData r;
4181 NTSTATUS status;
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;
4191 if (DEBUGLEVEL >= 10) {
4192 NDR_PRINT_IN_DEBUG(spoolss_XcvData, &r);
4195 status = cli->dispatch(cli,
4196 mem_ctx,
4197 &ndr_table_spoolss,
4198 NDR_SPOOLSS_XCVDATA,
4199 &r);
4201 if (!NT_STATUS_IS_OK(status)) {
4202 return status;
4205 if (DEBUGLEVEL >= 10) {
4206 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &r);
4209 if (NT_STATUS_IS_ERR(status)) {
4210 return status;
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;
4218 /* Return result */
4219 if (werror) {
4220 *werror = r.out.result;
4223 return werror_to_ntstatus(r.out.result);
4226 NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
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)
4233 struct spoolss_AddPrinterDriverEx r;
4234 NTSTATUS status;
4236 /* In parameters */
4237 r.in.servername = servername;
4238 r.in.info_ctr = info_ctr;
4239 r.in.flags = flags;
4241 if (DEBUGLEVEL >= 10) {
4242 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &r);
4245 status = cli->dispatch(cli,
4246 mem_ctx,
4247 &ndr_table_spoolss,
4248 NDR_SPOOLSS_ADDPRINTERDRIVEREX,
4249 &r);
4251 if (!NT_STATUS_IS_OK(status)) {
4252 return status;
4255 if (DEBUGLEVEL >= 10) {
4256 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &r);
4259 if (NT_STATUS_IS_ERR(status)) {
4260 return status;
4263 /* Return variables */
4265 /* Return result */
4266 if (werror) {
4267 *werror = r.out.result;
4270 return werror_to_ntstatus(r.out.result);
4273 NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
4274 TALLOC_CTX *mem_ctx,
4275 WERROR *werror)
4277 struct spoolss_5a r;
4278 NTSTATUS status;
4280 /* In parameters */
4282 if (DEBUGLEVEL >= 10) {
4283 NDR_PRINT_IN_DEBUG(spoolss_5a, &r);
4286 status = cli->dispatch(cli,
4287 mem_ctx,
4288 &ndr_table_spoolss,
4289 NDR_SPOOLSS_5A,
4290 &r);
4292 if (!NT_STATUS_IS_OK(status)) {
4293 return status;
4296 if (DEBUGLEVEL >= 10) {
4297 NDR_PRINT_OUT_DEBUG(spoolss_5a, &r);
4300 if (NT_STATUS_IS_ERR(status)) {
4301 return status;
4304 /* Return variables */
4306 /* Return result */
4307 if (werror) {
4308 *werror = r.out.result;
4311 return werror_to_ntstatus(r.out.result);
4314 NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
4315 TALLOC_CTX *mem_ctx,
4316 WERROR *werror)
4318 struct spoolss_5b r;
4319 NTSTATUS status;
4321 /* In parameters */
4323 if (DEBUGLEVEL >= 10) {
4324 NDR_PRINT_IN_DEBUG(spoolss_5b, &r);
4327 status = cli->dispatch(cli,
4328 mem_ctx,
4329 &ndr_table_spoolss,
4330 NDR_SPOOLSS_5B,
4331 &r);
4333 if (!NT_STATUS_IS_OK(status)) {
4334 return status;
4337 if (DEBUGLEVEL >= 10) {
4338 NDR_PRINT_OUT_DEBUG(spoolss_5b, &r);
4341 if (NT_STATUS_IS_ERR(status)) {
4342 return status;
4345 /* Return variables */
4347 /* Return result */
4348 if (werror) {
4349 *werror = r.out.result;
4352 return werror_to_ntstatus(r.out.result);
4355 NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
4356 TALLOC_CTX *mem_ctx,
4357 WERROR *werror)
4359 struct spoolss_5c r;
4360 NTSTATUS status;
4362 /* In parameters */
4364 if (DEBUGLEVEL >= 10) {
4365 NDR_PRINT_IN_DEBUG(spoolss_5c, &r);
4368 status = cli->dispatch(cli,
4369 mem_ctx,
4370 &ndr_table_spoolss,
4371 NDR_SPOOLSS_5C,
4372 &r);
4374 if (!NT_STATUS_IS_OK(status)) {
4375 return status;
4378 if (DEBUGLEVEL >= 10) {
4379 NDR_PRINT_OUT_DEBUG(spoolss_5c, &r);
4382 if (NT_STATUS_IS_ERR(status)) {
4383 return status;
4386 /* Return variables */
4388 /* Return result */
4389 if (werror) {
4390 *werror = r.out.result;
4393 return werror_to_ntstatus(r.out.result);
4396 NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
4397 TALLOC_CTX *mem_ctx,
4398 WERROR *werror)
4400 struct spoolss_5d r;
4401 NTSTATUS status;
4403 /* In parameters */
4405 if (DEBUGLEVEL >= 10) {
4406 NDR_PRINT_IN_DEBUG(spoolss_5d, &r);
4409 status = cli->dispatch(cli,
4410 mem_ctx,
4411 &ndr_table_spoolss,
4412 NDR_SPOOLSS_5D,
4413 &r);
4415 if (!NT_STATUS_IS_OK(status)) {
4416 return status;
4419 if (DEBUGLEVEL >= 10) {
4420 NDR_PRINT_OUT_DEBUG(spoolss_5d, &r);
4423 if (NT_STATUS_IS_ERR(status)) {
4424 return status;
4427 /* Return variables */
4429 /* Return result */
4430 if (werror) {
4431 *werror = r.out.result;
4434 return werror_to_ntstatus(r.out.result);
4437 NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
4438 TALLOC_CTX *mem_ctx,
4439 WERROR *werror)
4441 struct spoolss_5e r;
4442 NTSTATUS status;
4444 /* In parameters */
4446 if (DEBUGLEVEL >= 10) {
4447 NDR_PRINT_IN_DEBUG(spoolss_5e, &r);
4450 status = cli->dispatch(cli,
4451 mem_ctx,
4452 &ndr_table_spoolss,
4453 NDR_SPOOLSS_5E,
4454 &r);
4456 if (!NT_STATUS_IS_OK(status)) {
4457 return status;
4460 if (DEBUGLEVEL >= 10) {
4461 NDR_PRINT_OUT_DEBUG(spoolss_5e, &r);
4464 if (NT_STATUS_IS_ERR(status)) {
4465 return status;
4468 /* Return variables */
4470 /* Return result */
4471 if (werror) {
4472 *werror = r.out.result;
4475 return werror_to_ntstatus(r.out.result);
4478 NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
4479 TALLOC_CTX *mem_ctx,
4480 WERROR *werror)
4482 struct spoolss_5f r;
4483 NTSTATUS status;
4485 /* In parameters */
4487 if (DEBUGLEVEL >= 10) {
4488 NDR_PRINT_IN_DEBUG(spoolss_5f, &r);
4491 status = cli->dispatch(cli,
4492 mem_ctx,
4493 &ndr_table_spoolss,
4494 NDR_SPOOLSS_5F,
4495 &r);
4497 if (!NT_STATUS_IS_OK(status)) {
4498 return status;
4501 if (DEBUGLEVEL >= 10) {
4502 NDR_PRINT_OUT_DEBUG(spoolss_5f, &r);
4505 if (NT_STATUS_IS_ERR(status)) {
4506 return status;
4509 /* Return variables */
4511 /* Return result */
4512 if (werror) {
4513 *werror = r.out.result;
4516 return werror_to_ntstatus(r.out.result);