2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_spoolss.h"
9 NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli,
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] */,
21 struct spoolss_EnumPrinters r;
29 r.in.offered = offered;
31 if (DEBUGLEVEL >= 10) {
32 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, &r);
35 status = cli->dispatch(cli,
38 NDR_SPOOLSS_ENUMPRINTERS,
41 if (!NT_STATUS_IS_OK(status)) {
45 if (DEBUGLEVEL >= 10) {
46 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, &r);
49 if (NT_STATUS_IS_ERR(status)) {
53 /* Return variables */
54 *count = *r.out.count;
56 *needed = *r.out.needed;
60 *werror = r.out.result;
63 return werror_to_ntstatus(r.out.result);
66 NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli,
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] */,
75 struct spoolss_OpenPrinter r;
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,
91 NDR_SPOOLSS_OPENPRINTER,
94 if (!NT_STATUS_IS_OK(status)) {
98 if (DEBUGLEVEL >= 10) {
99 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, &r);
102 if (NT_STATUS_IS_ERR(status)) {
106 /* Return variables */
107 *handle = *r.out.handle;
111 *werror = r.out.result;
114 return werror_to_ntstatus(r.out.result);
117 NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli,
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] */,
125 struct spoolss_SetJob r;
129 r.in.handle = handle;
130 r.in.job_id = job_id;
132 r.in.command = command;
134 if (DEBUGLEVEL >= 10) {
135 NDR_PRINT_IN_DEBUG(spoolss_SetJob, &r);
138 status = cli->dispatch(cli,
144 if (!NT_STATUS_IS_OK(status)) {
148 if (DEBUGLEVEL >= 10) {
149 NDR_PRINT_OUT_DEBUG(spoolss_SetJob, &r);
152 if (NT_STATUS_IS_ERR(status)) {
156 /* Return variables */
160 *werror = r.out.result;
163 return werror_to_ntstatus(r.out.result);
166 NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli,
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] */,
177 struct spoolss_GetJob r;
181 r.in.handle = handle;
182 r.in.job_id = job_id;
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,
197 if (!NT_STATUS_IS_OK(status)) {
201 if (DEBUGLEVEL >= 10) {
202 NDR_PRINT_OUT_DEBUG(spoolss_GetJob, &r);
205 if (NT_STATUS_IS_ERR(status)) {
209 /* Return variables */
210 if (info && r.out.info) {
213 *needed = *r.out.needed;
217 *werror = r.out.result;
220 return werror_to_ntstatus(r.out.result);
223 NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli,
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] */,
236 struct spoolss_EnumJobs r;
240 r.in.handle = handle;
241 r.in.firstjob = firstjob;
242 r.in.numjobs = numjobs;
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,
254 NDR_SPOOLSS_ENUMJOBS,
257 if (!NT_STATUS_IS_OK(status)) {
261 if (DEBUGLEVEL >= 10) {
262 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, &r);
265 if (NT_STATUS_IS_ERR(status)) {
269 /* Return variables */
270 *count = *r.out.count;
272 *needed = *r.out.needed;
276 *werror = r.out.result;
279 return werror_to_ntstatus(r.out.result);
282 NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli,
284 const char *server /* [in] [unique,charset(UTF16)] */,
285 struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
286 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
287 struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
288 struct policy_handle *handle /* [out] [ref] */,
291 struct spoolss_AddPrinter r;
295 r.in.server = server;
296 r.in.info_ctr = info_ctr;
297 r.in.devmode_ctr = devmode_ctr;
298 r.in.secdesc_ctr = secdesc_ctr;
300 if (DEBUGLEVEL >= 10) {
301 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, &r);
304 status = cli->dispatch(cli,
307 NDR_SPOOLSS_ADDPRINTER,
310 if (!NT_STATUS_IS_OK(status)) {
314 if (DEBUGLEVEL >= 10) {
315 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, &r);
318 if (NT_STATUS_IS_ERR(status)) {
322 /* Return variables */
323 *handle = *r.out.handle;
327 *werror = r.out.result;
330 return werror_to_ntstatus(r.out.result);
333 NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli,
335 struct policy_handle *handle /* [in] [ref] */,
338 struct spoolss_DeletePrinter r;
342 r.in.handle = handle;
344 if (DEBUGLEVEL >= 10) {
345 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, &r);
348 status = cli->dispatch(cli,
351 NDR_SPOOLSS_DELETEPRINTER,
354 if (!NT_STATUS_IS_OK(status)) {
358 if (DEBUGLEVEL >= 10) {
359 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, &r);
362 if (NT_STATUS_IS_ERR(status)) {
366 /* Return variables */
370 *werror = r.out.result;
373 return werror_to_ntstatus(r.out.result);
376 NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli,
378 struct policy_handle *handle /* [in] [ref] */,
379 struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
380 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
381 struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
382 enum spoolss_PrinterControl command /* [in] */,
385 struct spoolss_SetPrinter r;
389 r.in.handle = handle;
390 r.in.info_ctr = info_ctr;
391 r.in.devmode_ctr = devmode_ctr;
392 r.in.secdesc_ctr = secdesc_ctr;
393 r.in.command = command;
395 if (DEBUGLEVEL >= 10) {
396 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, &r);
399 status = cli->dispatch(cli,
402 NDR_SPOOLSS_SETPRINTER,
405 if (!NT_STATUS_IS_OK(status)) {
409 if (DEBUGLEVEL >= 10) {
410 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, &r);
413 if (NT_STATUS_IS_ERR(status)) {
417 /* Return variables */
421 *werror = r.out.result;
424 return werror_to_ntstatus(r.out.result);
427 NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli,
429 struct policy_handle *handle /* [in] [ref] */,
430 uint32_t level /* [in] */,
431 DATA_BLOB *buffer /* [in] [unique] */,
432 uint32_t offered /* [in] */,
433 union spoolss_PrinterInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
434 uint32_t *needed /* [out] [ref] */,
437 struct spoolss_GetPrinter r;
441 r.in.handle = handle;
443 r.in.buffer = buffer;
444 r.in.offered = offered;
446 if (DEBUGLEVEL >= 10) {
447 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, &r);
450 status = cli->dispatch(cli,
453 NDR_SPOOLSS_GETPRINTER,
456 if (!NT_STATUS_IS_OK(status)) {
460 if (DEBUGLEVEL >= 10) {
461 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, &r);
464 if (NT_STATUS_IS_ERR(status)) {
468 /* Return variables */
469 if (info && r.out.info) {
472 *needed = *r.out.needed;
476 *werror = r.out.result;
479 return werror_to_ntstatus(r.out.result);
482 NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli,
484 const char *servername /* [in] [unique,charset(UTF16)] */,
485 struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
488 struct spoolss_AddPrinterDriver r;
492 r.in.servername = servername;
493 r.in.info_ctr = info_ctr;
495 if (DEBUGLEVEL >= 10) {
496 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, &r);
499 status = cli->dispatch(cli,
502 NDR_SPOOLSS_ADDPRINTERDRIVER,
505 if (!NT_STATUS_IS_OK(status)) {
509 if (DEBUGLEVEL >= 10) {
510 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, &r);
513 if (NT_STATUS_IS_ERR(status)) {
517 /* Return variables */
521 *werror = r.out.result;
524 return werror_to_ntstatus(r.out.result);
527 NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
529 const char *server /* [in] [unique,charset(UTF16)] */,
530 const char *environment /* [in] [unique,charset(UTF16)] */,
531 uint32_t level /* [in] */,
532 DATA_BLOB *buffer /* [in] [unique] */,
533 uint32_t offered /* [in] */,
534 uint32_t *count /* [out] [ref] */,
535 union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
536 uint32_t *needed /* [out] [ref] */,
539 struct spoolss_EnumPrinterDrivers r;
543 r.in.server = server;
544 r.in.environment = environment;
546 r.in.buffer = buffer;
547 r.in.offered = offered;
549 if (DEBUGLEVEL >= 10) {
550 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, &r);
553 status = cli->dispatch(cli,
556 NDR_SPOOLSS_ENUMPRINTERDRIVERS,
559 if (!NT_STATUS_IS_OK(status)) {
563 if (DEBUGLEVEL >= 10) {
564 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, &r);
567 if (NT_STATUS_IS_ERR(status)) {
571 /* Return variables */
572 *count = *r.out.count;
574 *needed = *r.out.needed;
578 *werror = r.out.result;
581 return werror_to_ntstatus(r.out.result);
584 NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli,
586 struct policy_handle *handle /* [in] [ref] */,
587 const char *architecture /* [in] [unique,charset(UTF16)] */,
588 uint32_t level /* [in] */,
589 DATA_BLOB *buffer /* [in] [unique] */,
590 uint32_t offered /* [in] */,
591 union spoolss_DriverInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
592 uint32_t *needed /* [out] [ref] */,
595 struct spoolss_GetPrinterDriver r;
599 r.in.handle = handle;
600 r.in.architecture = architecture;
602 r.in.buffer = buffer;
603 r.in.offered = offered;
605 if (DEBUGLEVEL >= 10) {
606 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &r);
609 status = cli->dispatch(cli,
612 NDR_SPOOLSS_GETPRINTERDRIVER,
615 if (!NT_STATUS_IS_OK(status)) {
619 if (DEBUGLEVEL >= 10) {
620 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &r);
623 if (NT_STATUS_IS_ERR(status)) {
627 /* Return variables */
628 if (info && r.out.info) {
631 *needed = *r.out.needed;
635 *werror = r.out.result;
638 return werror_to_ntstatus(r.out.result);
641 NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
643 const char *server /* [in] [unique,charset(UTF16)] */,
644 const char *environment /* [in] [unique,charset(UTF16)] */,
645 uint32_t level /* [in] */,
646 DATA_BLOB *buffer /* [in] [unique] */,
647 uint32_t offered /* [in] */,
648 union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
649 uint32_t *needed /* [out] [ref] */,
652 struct spoolss_GetPrinterDriverDirectory r;
656 r.in.server = server;
657 r.in.environment = environment;
659 r.in.buffer = buffer;
660 r.in.offered = offered;
662 if (DEBUGLEVEL >= 10) {
663 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
666 status = cli->dispatch(cli,
669 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY,
672 if (!NT_STATUS_IS_OK(status)) {
676 if (DEBUGLEVEL >= 10) {
677 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
680 if (NT_STATUS_IS_ERR(status)) {
684 /* Return variables */
685 if (info && r.out.info) {
688 *needed = *r.out.needed;
692 *werror = r.out.result;
695 return werror_to_ntstatus(r.out.result);
698 NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
700 const char *server /* [in] [unique,charset(UTF16)] */,
701 const char *architecture /* [in] [charset(UTF16)] */,
702 const char *driver /* [in] [charset(UTF16)] */,
705 struct spoolss_DeletePrinterDriver r;
709 r.in.server = server;
710 r.in.architecture = architecture;
711 r.in.driver = driver;
713 if (DEBUGLEVEL >= 10) {
714 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &r);
717 status = cli->dispatch(cli,
720 NDR_SPOOLSS_DELETEPRINTERDRIVER,
723 if (!NT_STATUS_IS_OK(status)) {
727 if (DEBUGLEVEL >= 10) {
728 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &r);
731 if (NT_STATUS_IS_ERR(status)) {
735 /* Return variables */
739 *werror = r.out.result;
742 return werror_to_ntstatus(r.out.result);
745 NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
747 const char *server /* [in] [unique,charset(UTF16)] */,
748 const char *architecture /* [in] [charset(UTF16)] */,
749 const char *path_name /* [in] [charset(UTF16)] */,
750 const char *print_processor_name /* [in] [charset(UTF16)] */,
753 struct spoolss_AddPrintProcessor r;
757 r.in.server = server;
758 r.in.architecture = architecture;
759 r.in.path_name = path_name;
760 r.in.print_processor_name = print_processor_name;
762 if (DEBUGLEVEL >= 10) {
763 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &r);
766 status = cli->dispatch(cli,
769 NDR_SPOOLSS_ADDPRINTPROCESSOR,
772 if (!NT_STATUS_IS_OK(status)) {
776 if (DEBUGLEVEL >= 10) {
777 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &r);
780 if (NT_STATUS_IS_ERR(status)) {
784 /* Return variables */
788 *werror = r.out.result;
791 return werror_to_ntstatus(r.out.result);
794 NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
796 const char *servername /* [in] [unique,charset(UTF16)] */,
797 const char *environment /* [in] [unique,charset(UTF16)] */,
798 uint32_t level /* [in] */,
799 DATA_BLOB *buffer /* [in] [unique] */,
800 uint32_t offered /* [in] */,
801 uint32_t *count /* [out] [ref] */,
802 union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
803 uint32_t *needed /* [out] [ref] */,
806 struct spoolss_EnumPrintProcessors r;
810 r.in.servername = servername;
811 r.in.environment = environment;
813 r.in.buffer = buffer;
814 r.in.offered = offered;
816 if (DEBUGLEVEL >= 10) {
817 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &r);
820 status = cli->dispatch(cli,
823 NDR_SPOOLSS_ENUMPRINTPROCESSORS,
826 if (!NT_STATUS_IS_OK(status)) {
830 if (DEBUGLEVEL >= 10) {
831 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &r);
834 if (NT_STATUS_IS_ERR(status)) {
838 /* Return variables */
839 *count = *r.out.count;
841 *needed = *r.out.needed;
845 *werror = r.out.result;
848 return werror_to_ntstatus(r.out.result);
851 NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
853 const char *server /* [in] [unique,charset(UTF16)] */,
854 const char *environment /* [in] [unique,charset(UTF16)] */,
855 uint32_t level /* [in] */,
856 DATA_BLOB *buffer /* [in] [unique] */,
857 uint32_t offered /* [in] */,
858 union spoolss_PrintProcessorDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
859 uint32_t *needed /* [out] [ref] */,
862 struct spoolss_GetPrintProcessorDirectory r;
866 r.in.server = server;
867 r.in.environment = environment;
869 r.in.buffer = buffer;
870 r.in.offered = offered;
872 if (DEBUGLEVEL >= 10) {
873 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
876 status = cli->dispatch(cli,
879 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY,
882 if (!NT_STATUS_IS_OK(status)) {
886 if (DEBUGLEVEL >= 10) {
887 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
890 if (NT_STATUS_IS_ERR(status)) {
894 /* Return variables */
895 if (info && r.out.info) {
898 *needed = *r.out.needed;
902 *werror = r.out.result;
905 return werror_to_ntstatus(r.out.result);
908 NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
910 struct policy_handle *handle /* [in] [ref] */,
911 uint32_t level /* [in] */,
912 union spoolss_DocumentInfo info /* [in] [switch_is(level)] */,
913 uint32_t *job_id /* [out] [ref] */,
916 struct spoolss_StartDocPrinter r;
920 r.in.handle = handle;
924 if (DEBUGLEVEL >= 10) {
925 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &r);
928 status = cli->dispatch(cli,
931 NDR_SPOOLSS_STARTDOCPRINTER,
934 if (!NT_STATUS_IS_OK(status)) {
938 if (DEBUGLEVEL >= 10) {
939 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &r);
942 if (NT_STATUS_IS_ERR(status)) {
946 /* Return variables */
947 *job_id = *r.out.job_id;
951 *werror = r.out.result;
954 return werror_to_ntstatus(r.out.result);
957 NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
959 struct policy_handle *handle /* [in] [ref] */,
962 struct spoolss_StartPagePrinter r;
966 r.in.handle = handle;
968 if (DEBUGLEVEL >= 10) {
969 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &r);
972 status = cli->dispatch(cli,
975 NDR_SPOOLSS_STARTPAGEPRINTER,
978 if (!NT_STATUS_IS_OK(status)) {
982 if (DEBUGLEVEL >= 10) {
983 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &r);
986 if (NT_STATUS_IS_ERR(status)) {
990 /* Return variables */
994 *werror = r.out.result;
997 return werror_to_ntstatus(r.out.result);
1000 NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
1001 TALLOC_CTX *mem_ctx,
1002 struct policy_handle *handle /* [in] [ref] */,
1003 DATA_BLOB data /* [in] */,
1004 uint32_t _data_size /* [in] [value(r->in.data.length)] */,
1005 uint32_t *num_written /* [out] [ref] */,
1008 struct spoolss_WritePrinter r;
1012 r.in.handle = handle;
1014 r.in._data_size = _data_size;
1016 if (DEBUGLEVEL >= 10) {
1017 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &r);
1020 status = cli->dispatch(cli,
1023 NDR_SPOOLSS_WRITEPRINTER,
1026 if (!NT_STATUS_IS_OK(status)) {
1030 if (DEBUGLEVEL >= 10) {
1031 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &r);
1034 if (NT_STATUS_IS_ERR(status)) {
1038 /* Return variables */
1039 *num_written = *r.out.num_written;
1043 *werror = r.out.result;
1046 return werror_to_ntstatus(r.out.result);
1049 NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
1050 TALLOC_CTX *mem_ctx,
1051 struct policy_handle *handle /* [in] [ref] */,
1054 struct spoolss_EndPagePrinter r;
1058 r.in.handle = handle;
1060 if (DEBUGLEVEL >= 10) {
1061 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &r);
1064 status = cli->dispatch(cli,
1067 NDR_SPOOLSS_ENDPAGEPRINTER,
1070 if (!NT_STATUS_IS_OK(status)) {
1074 if (DEBUGLEVEL >= 10) {
1075 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &r);
1078 if (NT_STATUS_IS_ERR(status)) {
1082 /* Return variables */
1086 *werror = r.out.result;
1089 return werror_to_ntstatus(r.out.result);
1092 NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
1093 TALLOC_CTX *mem_ctx,
1094 struct policy_handle *handle /* [in] [ref] */,
1097 struct spoolss_AbortPrinter r;
1101 r.in.handle = handle;
1103 if (DEBUGLEVEL >= 10) {
1104 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &r);
1107 status = cli->dispatch(cli,
1110 NDR_SPOOLSS_ABORTPRINTER,
1113 if (!NT_STATUS_IS_OK(status)) {
1117 if (DEBUGLEVEL >= 10) {
1118 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &r);
1121 if (NT_STATUS_IS_ERR(status)) {
1125 /* Return variables */
1129 *werror = r.out.result;
1132 return werror_to_ntstatus(r.out.result);
1135 NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
1136 TALLOC_CTX *mem_ctx,
1137 struct policy_handle *handle /* [in] [ref] */,
1138 uint8_t *data /* [out] [ref,size_is(data_size)] */,
1139 uint32_t data_size /* [in] */,
1140 uint32_t *_data_size /* [out] [ref] */,
1143 struct spoolss_ReadPrinter r;
1147 r.in.handle = handle;
1148 r.in.data_size = data_size;
1150 if (DEBUGLEVEL >= 10) {
1151 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &r);
1154 status = cli->dispatch(cli,
1157 NDR_SPOOLSS_READPRINTER,
1160 if (!NT_STATUS_IS_OK(status)) {
1164 if (DEBUGLEVEL >= 10) {
1165 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &r);
1168 if (NT_STATUS_IS_ERR(status)) {
1172 /* Return variables */
1173 memcpy(data, r.out.data, r.in.data_size * sizeof(*data));
1174 *_data_size = *r.out._data_size;
1178 *werror = r.out.result;
1181 return werror_to_ntstatus(r.out.result);
1184 NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
1185 TALLOC_CTX *mem_ctx,
1186 struct policy_handle *handle /* [in] [ref] */,
1189 struct spoolss_EndDocPrinter r;
1193 r.in.handle = handle;
1195 if (DEBUGLEVEL >= 10) {
1196 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &r);
1199 status = cli->dispatch(cli,
1202 NDR_SPOOLSS_ENDDOCPRINTER,
1205 if (!NT_STATUS_IS_OK(status)) {
1209 if (DEBUGLEVEL >= 10) {
1210 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &r);
1213 if (NT_STATUS_IS_ERR(status)) {
1217 /* Return variables */
1221 *werror = r.out.result;
1224 return werror_to_ntstatus(r.out.result);
1227 NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
1228 TALLOC_CTX *mem_ctx,
1229 struct policy_handle *handle /* [in] [ref] */,
1230 uint32_t level /* [in] */,
1231 uint8_t *buffer /* [in,out] [unique,size_is(offered)] */,
1232 uint32_t offered /* [in] */,
1233 uint32_t *needed /* [out] [ref] */,
1236 struct spoolss_AddJob r;
1240 r.in.handle = handle;
1242 r.in.buffer = buffer;
1243 r.in.offered = offered;
1245 if (DEBUGLEVEL >= 10) {
1246 NDR_PRINT_IN_DEBUG(spoolss_AddJob, &r);
1249 status = cli->dispatch(cli,
1255 if (!NT_STATUS_IS_OK(status)) {
1259 if (DEBUGLEVEL >= 10) {
1260 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &r);
1263 if (NT_STATUS_IS_ERR(status)) {
1267 /* Return variables */
1268 if (buffer && r.out.buffer) {
1269 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
1271 *needed = *r.out.needed;
1275 *werror = r.out.result;
1278 return werror_to_ntstatus(r.out.result);
1281 NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
1282 TALLOC_CTX *mem_ctx,
1283 struct policy_handle *handle /* [in] [ref] */,
1284 uint32_t jobid /* [in] */,
1287 struct spoolss_ScheduleJob r;
1291 r.in.handle = handle;
1294 if (DEBUGLEVEL >= 10) {
1295 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &r);
1298 status = cli->dispatch(cli,
1301 NDR_SPOOLSS_SCHEDULEJOB,
1304 if (!NT_STATUS_IS_OK(status)) {
1308 if (DEBUGLEVEL >= 10) {
1309 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &r);
1312 if (NT_STATUS_IS_ERR(status)) {
1316 /* Return variables */
1320 *werror = r.out.result;
1323 return werror_to_ntstatus(r.out.result);
1326 NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
1327 TALLOC_CTX *mem_ctx,
1328 struct policy_handle *handle /* [in] [ref] */,
1329 const char *value_name /* [in] [charset(UTF16)] */,
1330 uint32_t offered /* [in] */,
1331 enum winreg_Type *type /* [out] [ref] */,
1332 union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
1333 uint32_t *needed /* [out] [ref] */,
1336 struct spoolss_GetPrinterData r;
1340 r.in.handle = handle;
1341 r.in.value_name = value_name;
1342 r.in.offered = offered;
1344 if (DEBUGLEVEL >= 10) {
1345 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &r);
1348 status = cli->dispatch(cli,
1351 NDR_SPOOLSS_GETPRINTERDATA,
1354 if (!NT_STATUS_IS_OK(status)) {
1358 if (DEBUGLEVEL >= 10) {
1359 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &r);
1362 if (NT_STATUS_IS_ERR(status)) {
1366 /* Return variables */
1367 *type = *r.out.type;
1368 *data = *r.out.data;
1369 *needed = *r.out.needed;
1373 *werror = r.out.result;
1376 return werror_to_ntstatus(r.out.result);
1379 NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
1380 TALLOC_CTX *mem_ctx,
1381 struct policy_handle *handle /* [in] [ref] */,
1382 const char *value_name /* [in] [charset(UTF16)] */,
1383 enum winreg_Type type /* [in] */,
1384 union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */,
1385 uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1388 struct spoolss_SetPrinterData r;
1392 r.in.handle = handle;
1393 r.in.value_name = value_name;
1396 r.in._offered = _offered;
1398 if (DEBUGLEVEL >= 10) {
1399 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &r);
1402 status = cli->dispatch(cli,
1405 NDR_SPOOLSS_SETPRINTERDATA,
1408 if (!NT_STATUS_IS_OK(status)) {
1412 if (DEBUGLEVEL >= 10) {
1413 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &r);
1416 if (NT_STATUS_IS_ERR(status)) {
1420 /* Return variables */
1424 *werror = r.out.result;
1427 return werror_to_ntstatus(r.out.result);
1430 NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
1431 TALLOC_CTX *mem_ctx,
1434 struct spoolss_WaitForPrinterChange r;
1439 if (DEBUGLEVEL >= 10) {
1440 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &r);
1443 status = cli->dispatch(cli,
1446 NDR_SPOOLSS_WAITFORPRINTERCHANGE,
1449 if (!NT_STATUS_IS_OK(status)) {
1453 if (DEBUGLEVEL >= 10) {
1454 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &r);
1457 if (NT_STATUS_IS_ERR(status)) {
1461 /* Return variables */
1465 *werror = r.out.result;
1468 return werror_to_ntstatus(r.out.result);
1471 NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
1472 TALLOC_CTX *mem_ctx,
1473 struct policy_handle *handle /* [in,out] [ref] */,
1476 struct spoolss_ClosePrinter r;
1480 r.in.handle = handle;
1482 if (DEBUGLEVEL >= 10) {
1483 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &r);
1486 status = cli->dispatch(cli,
1489 NDR_SPOOLSS_CLOSEPRINTER,
1492 if (!NT_STATUS_IS_OK(status)) {
1496 if (DEBUGLEVEL >= 10) {
1497 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &r);
1500 if (NT_STATUS_IS_ERR(status)) {
1504 /* Return variables */
1505 *handle = *r.out.handle;
1509 *werror = r.out.result;
1512 return werror_to_ntstatus(r.out.result);
1515 NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
1516 TALLOC_CTX *mem_ctx,
1517 struct policy_handle *handle /* [in] [ref] */,
1518 uint32_t level /* [in] */,
1519 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1522 struct spoolss_AddForm r;
1526 r.in.handle = handle;
1530 if (DEBUGLEVEL >= 10) {
1531 NDR_PRINT_IN_DEBUG(spoolss_AddForm, &r);
1534 status = cli->dispatch(cli,
1537 NDR_SPOOLSS_ADDFORM,
1540 if (!NT_STATUS_IS_OK(status)) {
1544 if (DEBUGLEVEL >= 10) {
1545 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &r);
1548 if (NT_STATUS_IS_ERR(status)) {
1552 /* Return variables */
1556 *werror = r.out.result;
1559 return werror_to_ntstatus(r.out.result);
1562 NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
1563 TALLOC_CTX *mem_ctx,
1564 struct policy_handle *handle /* [in] [ref] */,
1565 const char *form_name /* [in] [charset(UTF16)] */,
1568 struct spoolss_DeleteForm r;
1572 r.in.handle = handle;
1573 r.in.form_name = form_name;
1575 if (DEBUGLEVEL >= 10) {
1576 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &r);
1579 status = cli->dispatch(cli,
1582 NDR_SPOOLSS_DELETEFORM,
1585 if (!NT_STATUS_IS_OK(status)) {
1589 if (DEBUGLEVEL >= 10) {
1590 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &r);
1593 if (NT_STATUS_IS_ERR(status)) {
1597 /* Return variables */
1601 *werror = r.out.result;
1604 return werror_to_ntstatus(r.out.result);
1607 NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
1608 TALLOC_CTX *mem_ctx,
1609 struct policy_handle *handle /* [in] [ref] */,
1610 const char *form_name /* [in] [charset(UTF16)] */,
1611 uint32_t level /* [in] */,
1612 DATA_BLOB *buffer /* [in] [unique] */,
1613 uint32_t offered /* [in] */,
1614 union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1615 uint32_t *needed /* [out] [ref] */,
1618 struct spoolss_GetForm r;
1622 r.in.handle = handle;
1623 r.in.form_name = form_name;
1625 r.in.buffer = buffer;
1626 r.in.offered = offered;
1628 if (DEBUGLEVEL >= 10) {
1629 NDR_PRINT_IN_DEBUG(spoolss_GetForm, &r);
1632 status = cli->dispatch(cli,
1635 NDR_SPOOLSS_GETFORM,
1638 if (!NT_STATUS_IS_OK(status)) {
1642 if (DEBUGLEVEL >= 10) {
1643 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &r);
1646 if (NT_STATUS_IS_ERR(status)) {
1650 /* Return variables */
1651 if (info && r.out.info) {
1652 *info = *r.out.info;
1654 *needed = *r.out.needed;
1658 *werror = r.out.result;
1661 return werror_to_ntstatus(r.out.result);
1664 NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
1665 TALLOC_CTX *mem_ctx,
1666 struct policy_handle *handle /* [in] [ref] */,
1667 const char *form_name /* [in] [charset(UTF16)] */,
1668 uint32_t level /* [in] */,
1669 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1672 struct spoolss_SetForm r;
1676 r.in.handle = handle;
1677 r.in.form_name = form_name;
1681 if (DEBUGLEVEL >= 10) {
1682 NDR_PRINT_IN_DEBUG(spoolss_SetForm, &r);
1685 status = cli->dispatch(cli,
1688 NDR_SPOOLSS_SETFORM,
1691 if (!NT_STATUS_IS_OK(status)) {
1695 if (DEBUGLEVEL >= 10) {
1696 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &r);
1699 if (NT_STATUS_IS_ERR(status)) {
1703 /* Return variables */
1707 *werror = r.out.result;
1710 return werror_to_ntstatus(r.out.result);
1713 NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
1714 TALLOC_CTX *mem_ctx,
1715 struct policy_handle *handle /* [in] [ref] */,
1716 uint32_t level /* [in] */,
1717 DATA_BLOB *buffer /* [in] [unique] */,
1718 uint32_t offered /* [in] */,
1719 uint32_t *count /* [out] [ref] */,
1720 union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1721 uint32_t *needed /* [out] [ref] */,
1724 struct spoolss_EnumForms r;
1728 r.in.handle = handle;
1730 r.in.buffer = buffer;
1731 r.in.offered = offered;
1733 if (DEBUGLEVEL >= 10) {
1734 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &r);
1737 status = cli->dispatch(cli,
1740 NDR_SPOOLSS_ENUMFORMS,
1743 if (!NT_STATUS_IS_OK(status)) {
1747 if (DEBUGLEVEL >= 10) {
1748 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &r);
1751 if (NT_STATUS_IS_ERR(status)) {
1755 /* Return variables */
1756 *count = *r.out.count;
1757 *info = *r.out.info;
1758 *needed = *r.out.needed;
1762 *werror = r.out.result;
1765 return werror_to_ntstatus(r.out.result);
1768 NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
1769 TALLOC_CTX *mem_ctx,
1770 const char *servername /* [in] [unique,charset(UTF16)] */,
1771 uint32_t level /* [in] */,
1772 DATA_BLOB *buffer /* [in] [unique] */,
1773 uint32_t offered /* [in] */,
1774 uint32_t *count /* [out] [ref] */,
1775 union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1776 uint32_t *needed /* [out] [ref] */,
1779 struct spoolss_EnumPorts r;
1783 r.in.servername = servername;
1785 r.in.buffer = buffer;
1786 r.in.offered = offered;
1788 if (DEBUGLEVEL >= 10) {
1789 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &r);
1792 status = cli->dispatch(cli,
1795 NDR_SPOOLSS_ENUMPORTS,
1798 if (!NT_STATUS_IS_OK(status)) {
1802 if (DEBUGLEVEL >= 10) {
1803 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &r);
1806 if (NT_STATUS_IS_ERR(status)) {
1810 /* Return variables */
1811 *count = *r.out.count;
1812 *info = *r.out.info;
1813 *needed = *r.out.needed;
1817 *werror = r.out.result;
1820 return werror_to_ntstatus(r.out.result);
1823 NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
1824 TALLOC_CTX *mem_ctx,
1825 const char *servername /* [in] [unique,charset(UTF16)] */,
1826 uint32_t level /* [in] */,
1827 DATA_BLOB *buffer /* [in] [unique] */,
1828 uint32_t offered /* [in] */,
1829 uint32_t *count /* [out] [ref] */,
1830 union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1831 uint32_t *needed /* [out] [ref] */,
1834 struct spoolss_EnumMonitors r;
1838 r.in.servername = servername;
1840 r.in.buffer = buffer;
1841 r.in.offered = offered;
1843 if (DEBUGLEVEL >= 10) {
1844 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &r);
1847 status = cli->dispatch(cli,
1850 NDR_SPOOLSS_ENUMMONITORS,
1853 if (!NT_STATUS_IS_OK(status)) {
1857 if (DEBUGLEVEL >= 10) {
1858 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &r);
1861 if (NT_STATUS_IS_ERR(status)) {
1865 /* Return variables */
1866 *count = *r.out.count;
1867 *info = *r.out.info;
1868 *needed = *r.out.needed;
1872 *werror = r.out.result;
1875 return werror_to_ntstatus(r.out.result);
1878 NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
1879 TALLOC_CTX *mem_ctx,
1880 const char *server_name /* [in] [unique,charset(UTF16)] */,
1881 uint32_t unknown /* [in] */,
1882 const char *monitor_name /* [in] [charset(UTF16)] */,
1885 struct spoolss_AddPort r;
1889 r.in.server_name = server_name;
1890 r.in.unknown = unknown;
1891 r.in.monitor_name = monitor_name;
1893 if (DEBUGLEVEL >= 10) {
1894 NDR_PRINT_IN_DEBUG(spoolss_AddPort, &r);
1897 status = cli->dispatch(cli,
1900 NDR_SPOOLSS_ADDPORT,
1903 if (!NT_STATUS_IS_OK(status)) {
1907 if (DEBUGLEVEL >= 10) {
1908 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &r);
1911 if (NT_STATUS_IS_ERR(status)) {
1915 /* Return variables */
1919 *werror = r.out.result;
1922 return werror_to_ntstatus(r.out.result);
1925 NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
1926 TALLOC_CTX *mem_ctx,
1929 struct spoolss_ConfigurePort r;
1934 if (DEBUGLEVEL >= 10) {
1935 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &r);
1938 status = cli->dispatch(cli,
1941 NDR_SPOOLSS_CONFIGUREPORT,
1944 if (!NT_STATUS_IS_OK(status)) {
1948 if (DEBUGLEVEL >= 10) {
1949 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &r);
1952 if (NT_STATUS_IS_ERR(status)) {
1956 /* Return variables */
1960 *werror = r.out.result;
1963 return werror_to_ntstatus(r.out.result);
1966 NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
1967 TALLOC_CTX *mem_ctx,
1970 struct spoolss_DeletePort r;
1975 if (DEBUGLEVEL >= 10) {
1976 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &r);
1979 status = cli->dispatch(cli,
1982 NDR_SPOOLSS_DELETEPORT,
1985 if (!NT_STATUS_IS_OK(status)) {
1989 if (DEBUGLEVEL >= 10) {
1990 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &r);
1993 if (NT_STATUS_IS_ERR(status)) {
1997 /* Return variables */
2001 *werror = r.out.result;
2004 return werror_to_ntstatus(r.out.result);
2007 NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
2008 TALLOC_CTX *mem_ctx,
2009 struct policy_handle *handle /* [in] [ref] */,
2010 struct policy_handle *gdi_handle /* [out] [ref] */,
2011 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
2014 struct spoolss_CreatePrinterIC r;
2018 r.in.handle = handle;
2019 r.in.devmode_ctr = devmode_ctr;
2021 if (DEBUGLEVEL >= 10) {
2022 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r);
2025 status = cli->dispatch(cli,
2028 NDR_SPOOLSS_CREATEPRINTERIC,
2031 if (!NT_STATUS_IS_OK(status)) {
2035 if (DEBUGLEVEL >= 10) {
2036 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &r);
2039 if (NT_STATUS_IS_ERR(status)) {
2043 /* Return variables */
2044 *gdi_handle = *r.out.gdi_handle;
2048 *werror = r.out.result;
2051 return werror_to_ntstatus(r.out.result);
2054 NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
2055 TALLOC_CTX *mem_ctx,
2058 struct spoolss_PlayGDIScriptOnPrinterIC r;
2063 if (DEBUGLEVEL >= 10) {
2064 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2067 status = cli->dispatch(cli,
2070 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC,
2073 if (!NT_STATUS_IS_OK(status)) {
2077 if (DEBUGLEVEL >= 10) {
2078 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2081 if (NT_STATUS_IS_ERR(status)) {
2085 /* Return variables */
2089 *werror = r.out.result;
2092 return werror_to_ntstatus(r.out.result);
2095 NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
2096 TALLOC_CTX *mem_ctx,
2097 struct policy_handle *gdi_handle /* [in,out] [ref] */,
2100 struct spoolss_DeletePrinterIC r;
2104 r.in.gdi_handle = gdi_handle;
2106 if (DEBUGLEVEL >= 10) {
2107 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r);
2110 status = cli->dispatch(cli,
2113 NDR_SPOOLSS_DELETEPRINTERIC,
2116 if (!NT_STATUS_IS_OK(status)) {
2120 if (DEBUGLEVEL >= 10) {
2121 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &r);
2124 if (NT_STATUS_IS_ERR(status)) {
2128 /* Return variables */
2129 *gdi_handle = *r.out.gdi_handle;
2133 *werror = r.out.result;
2136 return werror_to_ntstatus(r.out.result);
2139 NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
2140 TALLOC_CTX *mem_ctx,
2143 struct spoolss_AddPrinterConnection r;
2148 if (DEBUGLEVEL >= 10) {
2149 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &r);
2152 status = cli->dispatch(cli,
2155 NDR_SPOOLSS_ADDPRINTERCONNECTION,
2158 if (!NT_STATUS_IS_OK(status)) {
2162 if (DEBUGLEVEL >= 10) {
2163 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &r);
2166 if (NT_STATUS_IS_ERR(status)) {
2170 /* Return variables */
2174 *werror = r.out.result;
2177 return werror_to_ntstatus(r.out.result);
2180 NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
2181 TALLOC_CTX *mem_ctx,
2184 struct spoolss_DeletePrinterConnection r;
2189 if (DEBUGLEVEL >= 10) {
2190 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &r);
2193 status = cli->dispatch(cli,
2196 NDR_SPOOLSS_DELETEPRINTERCONNECTION,
2199 if (!NT_STATUS_IS_OK(status)) {
2203 if (DEBUGLEVEL >= 10) {
2204 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &r);
2207 if (NT_STATUS_IS_ERR(status)) {
2211 /* Return variables */
2215 *werror = r.out.result;
2218 return werror_to_ntstatus(r.out.result);
2221 NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
2222 TALLOC_CTX *mem_ctx,
2225 struct spoolss_PrinterMessageBox r;
2230 if (DEBUGLEVEL >= 10) {
2231 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &r);
2234 status = cli->dispatch(cli,
2237 NDR_SPOOLSS_PRINTERMESSAGEBOX,
2240 if (!NT_STATUS_IS_OK(status)) {
2244 if (DEBUGLEVEL >= 10) {
2245 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &r);
2248 if (NT_STATUS_IS_ERR(status)) {
2252 /* Return variables */
2256 *werror = r.out.result;
2259 return werror_to_ntstatus(r.out.result);
2262 NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
2263 TALLOC_CTX *mem_ctx,
2266 struct spoolss_AddMonitor r;
2271 if (DEBUGLEVEL >= 10) {
2272 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &r);
2275 status = cli->dispatch(cli,
2278 NDR_SPOOLSS_ADDMONITOR,
2281 if (!NT_STATUS_IS_OK(status)) {
2285 if (DEBUGLEVEL >= 10) {
2286 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &r);
2289 if (NT_STATUS_IS_ERR(status)) {
2293 /* Return variables */
2297 *werror = r.out.result;
2300 return werror_to_ntstatus(r.out.result);
2303 NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
2304 TALLOC_CTX *mem_ctx,
2307 struct spoolss_DeleteMonitor r;
2312 if (DEBUGLEVEL >= 10) {
2313 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &r);
2316 status = cli->dispatch(cli,
2319 NDR_SPOOLSS_DELETEMONITOR,
2322 if (!NT_STATUS_IS_OK(status)) {
2326 if (DEBUGLEVEL >= 10) {
2327 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &r);
2330 if (NT_STATUS_IS_ERR(status)) {
2334 /* Return variables */
2338 *werror = r.out.result;
2341 return werror_to_ntstatus(r.out.result);
2344 NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
2345 TALLOC_CTX *mem_ctx,
2348 struct spoolss_DeletePrintProcessor r;
2353 if (DEBUGLEVEL >= 10) {
2354 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &r);
2357 status = cli->dispatch(cli,
2360 NDR_SPOOLSS_DELETEPRINTPROCESSOR,
2363 if (!NT_STATUS_IS_OK(status)) {
2367 if (DEBUGLEVEL >= 10) {
2368 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &r);
2371 if (NT_STATUS_IS_ERR(status)) {
2375 /* Return variables */
2379 *werror = r.out.result;
2382 return werror_to_ntstatus(r.out.result);
2385 NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
2386 TALLOC_CTX *mem_ctx,
2389 struct spoolss_AddPrintProvidor r;
2394 if (DEBUGLEVEL >= 10) {
2395 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &r);
2398 status = cli->dispatch(cli,
2401 NDR_SPOOLSS_ADDPRINTPROVIDOR,
2404 if (!NT_STATUS_IS_OK(status)) {
2408 if (DEBUGLEVEL >= 10) {
2409 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &r);
2412 if (NT_STATUS_IS_ERR(status)) {
2416 /* Return variables */
2420 *werror = r.out.result;
2423 return werror_to_ntstatus(r.out.result);
2426 NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
2427 TALLOC_CTX *mem_ctx,
2430 struct spoolss_DeletePrintProvidor r;
2435 if (DEBUGLEVEL >= 10) {
2436 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &r);
2439 status = cli->dispatch(cli,
2442 NDR_SPOOLSS_DELETEPRINTPROVIDOR,
2445 if (!NT_STATUS_IS_OK(status)) {
2449 if (DEBUGLEVEL >= 10) {
2450 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &r);
2453 if (NT_STATUS_IS_ERR(status)) {
2457 /* Return variables */
2461 *werror = r.out.result;
2464 return werror_to_ntstatus(r.out.result);
2467 NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
2468 TALLOC_CTX *mem_ctx,
2469 const char *servername /* [in] [unique,charset(UTF16)] */,
2470 const char *print_processor_name /* [in] [unique,charset(UTF16)] */,
2471 uint32_t level /* [in] */,
2472 DATA_BLOB *buffer /* [in] [unique] */,
2473 uint32_t offered /* [in] */,
2474 uint32_t *count /* [out] [ref] */,
2475 union spoolss_PrintProcDataTypesInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
2476 uint32_t *needed /* [out] [ref] */,
2479 struct spoolss_EnumPrintProcDataTypes r;
2483 r.in.servername = servername;
2484 r.in.print_processor_name = print_processor_name;
2486 r.in.buffer = buffer;
2487 r.in.offered = offered;
2489 if (DEBUGLEVEL >= 10) {
2490 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2493 status = cli->dispatch(cli,
2496 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES,
2499 if (!NT_STATUS_IS_OK(status)) {
2503 if (DEBUGLEVEL >= 10) {
2504 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2507 if (NT_STATUS_IS_ERR(status)) {
2511 /* Return variables */
2512 *count = *r.out.count;
2513 *info = *r.out.info;
2514 *needed = *r.out.needed;
2518 *werror = r.out.result;
2521 return werror_to_ntstatus(r.out.result);
2524 NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
2525 TALLOC_CTX *mem_ctx,
2526 struct policy_handle *handle /* [in] [ref] */,
2527 const char *data_type /* [in] [unique,charset(UTF16)] */,
2528 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
2531 struct spoolss_ResetPrinter r;
2535 r.in.handle = handle;
2536 r.in.data_type = data_type;
2537 r.in.devmode_ctr = devmode_ctr;
2539 if (DEBUGLEVEL >= 10) {
2540 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &r);
2543 status = cli->dispatch(cli,
2546 NDR_SPOOLSS_RESETPRINTER,
2549 if (!NT_STATUS_IS_OK(status)) {
2553 if (DEBUGLEVEL >= 10) {
2554 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &r);
2557 if (NT_STATUS_IS_ERR(status)) {
2561 /* Return variables */
2565 *werror = r.out.result;
2568 return werror_to_ntstatus(r.out.result);
2571 NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
2572 TALLOC_CTX *mem_ctx,
2573 struct policy_handle *handle /* [in] [ref] */,
2574 const char *architecture /* [in] [unique,charset(UTF16)] */,
2575 uint32_t level /* [in] */,
2576 DATA_BLOB *buffer /* [in] [unique] */,
2577 uint32_t offered /* [in] */,
2578 uint32_t client_major_version /* [in] */,
2579 uint32_t client_minor_version /* [in] */,
2580 union spoolss_DriverInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
2581 uint32_t *needed /* [out] [ref] */,
2582 uint32_t *server_major_version /* [out] [ref] */,
2583 uint32_t *server_minor_version /* [out] [ref] */,
2586 struct spoolss_GetPrinterDriver2 r;
2590 r.in.handle = handle;
2591 r.in.architecture = architecture;
2593 r.in.buffer = buffer;
2594 r.in.offered = offered;
2595 r.in.client_major_version = client_major_version;
2596 r.in.client_minor_version = client_minor_version;
2598 if (DEBUGLEVEL >= 10) {
2599 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &r);
2602 status = cli->dispatch(cli,
2605 NDR_SPOOLSS_GETPRINTERDRIVER2,
2608 if (!NT_STATUS_IS_OK(status)) {
2612 if (DEBUGLEVEL >= 10) {
2613 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &r);
2616 if (NT_STATUS_IS_ERR(status)) {
2620 /* Return variables */
2621 if (info && r.out.info) {
2622 *info = *r.out.info;
2624 *needed = *r.out.needed;
2625 *server_major_version = *r.out.server_major_version;
2626 *server_minor_version = *r.out.server_minor_version;
2630 *werror = r.out.result;
2633 return werror_to_ntstatus(r.out.result);
2636 NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2637 TALLOC_CTX *mem_ctx,
2640 struct spoolss_FindFirstPrinterChangeNotification r;
2645 if (DEBUGLEVEL >= 10) {
2646 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2649 status = cli->dispatch(cli,
2652 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION,
2655 if (!NT_STATUS_IS_OK(status)) {
2659 if (DEBUGLEVEL >= 10) {
2660 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2663 if (NT_STATUS_IS_ERR(status)) {
2667 /* Return variables */
2671 *werror = r.out.result;
2674 return werror_to_ntstatus(r.out.result);
2677 NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
2678 TALLOC_CTX *mem_ctx,
2681 struct spoolss_FindNextPrinterChangeNotification r;
2686 if (DEBUGLEVEL >= 10) {
2687 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2690 status = cli->dispatch(cli,
2693 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION,
2696 if (!NT_STATUS_IS_OK(status)) {
2700 if (DEBUGLEVEL >= 10) {
2701 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2704 if (NT_STATUS_IS_ERR(status)) {
2708 /* Return variables */
2712 *werror = r.out.result;
2715 return werror_to_ntstatus(r.out.result);
2718 NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
2719 TALLOC_CTX *mem_ctx,
2720 struct policy_handle *handle /* [in] [ref] */,
2723 struct spoolss_FindClosePrinterNotify r;
2727 r.in.handle = handle;
2729 if (DEBUGLEVEL >= 10) {
2730 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &r);
2733 status = cli->dispatch(cli,
2736 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY,
2739 if (!NT_STATUS_IS_OK(status)) {
2743 if (DEBUGLEVEL >= 10) {
2744 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &r);
2747 if (NT_STATUS_IS_ERR(status)) {
2751 /* Return variables */
2755 *werror = r.out.result;
2758 return werror_to_ntstatus(r.out.result);
2761 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
2762 TALLOC_CTX *mem_ctx,
2765 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r;
2770 if (DEBUGLEVEL >= 10) {
2771 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2774 status = cli->dispatch(cli,
2777 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD,
2780 if (!NT_STATUS_IS_OK(status)) {
2784 if (DEBUGLEVEL >= 10) {
2785 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2788 if (NT_STATUS_IS_ERR(status)) {
2792 /* Return variables */
2796 *werror = r.out.result;
2799 return werror_to_ntstatus(r.out.result);
2802 NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
2803 TALLOC_CTX *mem_ctx,
2804 const char *server_name /* [in] [charset(UTF16)] */,
2805 uint32_t printer_local /* [in] */,
2806 enum winreg_Type type /* [in] */,
2807 uint32_t bufsize /* [in] [range(0,512)] */,
2808 uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2809 struct policy_handle *handle /* [out] [ref] */,
2812 struct spoolss_ReplyOpenPrinter r;
2816 r.in.server_name = server_name;
2817 r.in.printer_local = printer_local;
2819 r.in.bufsize = bufsize;
2820 r.in.buffer = buffer;
2822 if (DEBUGLEVEL >= 10) {
2823 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
2826 status = cli->dispatch(cli,
2829 NDR_SPOOLSS_REPLYOPENPRINTER,
2832 if (!NT_STATUS_IS_OK(status)) {
2836 if (DEBUGLEVEL >= 10) {
2837 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &r);
2840 if (NT_STATUS_IS_ERR(status)) {
2844 /* Return variables */
2845 *handle = *r.out.handle;
2849 *werror = r.out.result;
2852 return werror_to_ntstatus(r.out.result);
2855 NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
2856 TALLOC_CTX *mem_ctx,
2857 struct policy_handle *handle /* [in] [ref] */,
2858 uint32_t flags /* [in] */,
2859 uint32_t bufsize /* [in] [range(0,512)] */,
2860 uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2863 struct spoolss_RouterReplyPrinter r;
2867 r.in.handle = handle;
2869 r.in.bufsize = bufsize;
2870 r.in.buffer = buffer;
2872 if (DEBUGLEVEL >= 10) {
2873 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &r);
2876 status = cli->dispatch(cli,
2879 NDR_SPOOLSS_ROUTERREPLYPRINTER,
2882 if (!NT_STATUS_IS_OK(status)) {
2886 if (DEBUGLEVEL >= 10) {
2887 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &r);
2890 if (NT_STATUS_IS_ERR(status)) {
2894 /* Return variables */
2898 *werror = r.out.result;
2901 return werror_to_ntstatus(r.out.result);
2904 NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
2905 TALLOC_CTX *mem_ctx,
2906 struct policy_handle *handle /* [in,out] [ref] */,
2909 struct spoolss_ReplyClosePrinter r;
2913 r.in.handle = handle;
2915 if (DEBUGLEVEL >= 10) {
2916 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &r);
2919 status = cli->dispatch(cli,
2922 NDR_SPOOLSS_REPLYCLOSEPRINTER,
2925 if (!NT_STATUS_IS_OK(status)) {
2929 if (DEBUGLEVEL >= 10) {
2930 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &r);
2933 if (NT_STATUS_IS_ERR(status)) {
2937 /* Return variables */
2938 *handle = *r.out.handle;
2942 *werror = r.out.result;
2945 return werror_to_ntstatus(r.out.result);
2948 NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
2949 TALLOC_CTX *mem_ctx,
2952 struct spoolss_AddPortEx r;
2957 if (DEBUGLEVEL >= 10) {
2958 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &r);
2961 status = cli->dispatch(cli,
2964 NDR_SPOOLSS_ADDPORTEX,
2967 if (!NT_STATUS_IS_OK(status)) {
2971 if (DEBUGLEVEL >= 10) {
2972 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &r);
2975 if (NT_STATUS_IS_ERR(status)) {
2979 /* Return variables */
2983 *werror = r.out.result;
2986 return werror_to_ntstatus(r.out.result);
2989 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2990 TALLOC_CTX *mem_ctx,
2993 struct spoolss_RouterFindFirstPrinterChangeNotification r;
2998 if (DEBUGLEVEL >= 10) {
2999 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
3002 status = cli->dispatch(cli,
3005 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION,
3008 if (!NT_STATUS_IS_OK(status)) {
3012 if (DEBUGLEVEL >= 10) {
3013 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
3016 if (NT_STATUS_IS_ERR(status)) {
3020 /* Return variables */
3024 *werror = r.out.result;
3027 return werror_to_ntstatus(r.out.result);
3030 NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
3031 TALLOC_CTX *mem_ctx,
3034 struct spoolss_SpoolerInit r;
3039 if (DEBUGLEVEL >= 10) {
3040 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &r);
3043 status = cli->dispatch(cli,
3046 NDR_SPOOLSS_SPOOLERINIT,
3049 if (!NT_STATUS_IS_OK(status)) {
3053 if (DEBUGLEVEL >= 10) {
3054 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &r);
3057 if (NT_STATUS_IS_ERR(status)) {
3061 /* Return variables */
3065 *werror = r.out.result;
3068 return werror_to_ntstatus(r.out.result);
3071 NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
3072 TALLOC_CTX *mem_ctx,
3075 struct spoolss_ResetPrinterEx r;
3080 if (DEBUGLEVEL >= 10) {
3081 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &r);
3084 status = cli->dispatch(cli,
3087 NDR_SPOOLSS_RESETPRINTEREX,
3090 if (!NT_STATUS_IS_OK(status)) {
3094 if (DEBUGLEVEL >= 10) {
3095 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &r);
3098 if (NT_STATUS_IS_ERR(status)) {
3102 /* Return variables */
3106 *werror = r.out.result;
3109 return werror_to_ntstatus(r.out.result);
3112 NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
3113 TALLOC_CTX *mem_ctx,
3114 struct policy_handle *handle /* [in] [ref] */,
3115 uint32_t flags /* [in] */,
3116 uint32_t options /* [in] */,
3117 const char *local_machine /* [in] [unique,charset(UTF16)] */,
3118 uint32_t printer_local /* [in] */,
3119 struct spoolss_NotifyOption *notify_options /* [in] [unique] */,
3122 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r;
3126 r.in.handle = handle;
3128 r.in.options = options;
3129 r.in.local_machine = local_machine;
3130 r.in.printer_local = printer_local;
3131 r.in.notify_options = notify_options;
3133 if (DEBUGLEVEL >= 10) {
3134 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3137 status = cli->dispatch(cli,
3140 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX,
3143 if (!NT_STATUS_IS_OK(status)) {
3147 if (DEBUGLEVEL >= 10) {
3148 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3151 if (NT_STATUS_IS_ERR(status)) {
3155 /* Return variables */
3159 *werror = r.out.result;
3162 return werror_to_ntstatus(r.out.result);
3165 NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli,
3166 TALLOC_CTX *mem_ctx,
3167 struct policy_handle *handle /* [in] [ref] */,
3168 uint32_t color /* [in] */,
3169 uint32_t flags /* [in] */,
3170 uint32_t *reply_result /* [out] [ref] */,
3171 uint32_t reply_type /* [in] */,
3172 union spoolss_ReplyPrinterInfo info /* [in] [switch_is(reply_type)] */,
3175 struct spoolss_RouterReplyPrinterEx r;
3179 r.in.handle = handle;
3182 r.in.reply_type = reply_type;
3185 if (DEBUGLEVEL >= 10) {
3186 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3189 status = cli->dispatch(cli,
3192 NDR_SPOOLSS_ROUTERREPLYPRINTEREX,
3195 if (!NT_STATUS_IS_OK(status)) {
3199 if (DEBUGLEVEL >= 10) {
3200 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3203 if (NT_STATUS_IS_ERR(status)) {
3207 /* Return variables */
3208 *reply_result = *r.out.reply_result;
3212 *werror = r.out.result;
3215 return werror_to_ntstatus(r.out.result);
3218 NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli,
3219 TALLOC_CTX *mem_ctx,
3220 struct policy_handle *handle /* [in] [ref] */,
3221 uint32_t change_low /* [in] */,
3222 struct spoolss_NotifyOption *options /* [in] [unique] */,
3223 struct spoolss_NotifyInfo **info /* [out] [ref] */,
3226 struct spoolss_RouterRefreshPrinterChangeNotify r;
3230 r.in.handle = handle;
3231 r.in.change_low = change_low;
3232 r.in.options = options;
3234 if (DEBUGLEVEL >= 10) {
3235 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3238 status = cli->dispatch(cli,
3241 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY,
3244 if (!NT_STATUS_IS_OK(status)) {
3248 if (DEBUGLEVEL >= 10) {
3249 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3252 if (NT_STATUS_IS_ERR(status)) {
3256 /* Return variables */
3257 *info = *r.out.info;
3261 *werror = r.out.result;
3264 return werror_to_ntstatus(r.out.result);
3267 NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
3268 TALLOC_CTX *mem_ctx,
3271 struct spoolss_44 r;
3276 if (DEBUGLEVEL >= 10) {
3277 NDR_PRINT_IN_DEBUG(spoolss_44, &r);
3280 status = cli->dispatch(cli,
3286 if (!NT_STATUS_IS_OK(status)) {
3290 if (DEBUGLEVEL >= 10) {
3291 NDR_PRINT_OUT_DEBUG(spoolss_44, &r);
3294 if (NT_STATUS_IS_ERR(status)) {
3298 /* Return variables */
3302 *werror = r.out.result;
3305 return werror_to_ntstatus(r.out.result);
3308 NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
3309 TALLOC_CTX *mem_ctx,
3310 const char *printername /* [in] [unique,charset(UTF16)] */,
3311 const char *datatype /* [in] [unique,charset(UTF16)] */,
3312 struct spoolss_DevmodeContainer devmode_ctr /* [in] */,
3313 uint32_t access_mask /* [in] */,
3314 uint32_t level /* [in] */,
3315 union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */,
3316 struct policy_handle *handle /* [out] [ref] */,
3319 struct spoolss_OpenPrinterEx r;
3323 r.in.printername = printername;
3324 r.in.datatype = datatype;
3325 r.in.devmode_ctr = devmode_ctr;
3326 r.in.access_mask = access_mask;
3328 r.in.userlevel = userlevel;
3330 if (DEBUGLEVEL >= 10) {
3331 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &r);
3334 status = cli->dispatch(cli,
3337 NDR_SPOOLSS_OPENPRINTEREX,
3340 if (!NT_STATUS_IS_OK(status)) {
3344 if (DEBUGLEVEL >= 10) {
3345 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &r);
3348 if (NT_STATUS_IS_ERR(status)) {
3352 /* Return variables */
3353 *handle = *r.out.handle;
3357 *werror = r.out.result;
3360 return werror_to_ntstatus(r.out.result);
3363 NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
3364 TALLOC_CTX *mem_ctx,
3365 const char *server /* [in] [unique,charset(UTF16)] */,
3366 struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
3367 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
3368 struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
3369 struct spoolss_UserLevelCtr *userlevel_ctr /* [in] [ref] */,
3370 struct policy_handle *handle /* [out] [ref] */,
3373 struct spoolss_AddPrinterEx r;
3377 r.in.server = server;
3378 r.in.info_ctr = info_ctr;
3379 r.in.devmode_ctr = devmode_ctr;
3380 r.in.secdesc_ctr = secdesc_ctr;
3381 r.in.userlevel_ctr = userlevel_ctr;
3383 if (DEBUGLEVEL >= 10) {
3384 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &r);
3387 status = cli->dispatch(cli,
3390 NDR_SPOOLSS_ADDPRINTEREX,
3393 if (!NT_STATUS_IS_OK(status)) {
3397 if (DEBUGLEVEL >= 10) {
3398 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &r);
3401 if (NT_STATUS_IS_ERR(status)) {
3405 /* Return variables */
3406 *handle = *r.out.handle;
3410 *werror = r.out.result;
3413 return werror_to_ntstatus(r.out.result);
3416 NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
3417 TALLOC_CTX *mem_ctx,
3420 struct spoolss_47 r;
3425 if (DEBUGLEVEL >= 10) {
3426 NDR_PRINT_IN_DEBUG(spoolss_47, &r);
3429 status = cli->dispatch(cli,
3435 if (!NT_STATUS_IS_OK(status)) {
3439 if (DEBUGLEVEL >= 10) {
3440 NDR_PRINT_OUT_DEBUG(spoolss_47, &r);
3443 if (NT_STATUS_IS_ERR(status)) {
3447 /* Return variables */
3451 *werror = r.out.result;
3454 return werror_to_ntstatus(r.out.result);
3457 NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
3458 TALLOC_CTX *mem_ctx,
3459 struct policy_handle *handle /* [in] [ref] */,
3460 uint32_t enum_index /* [in] */,
3461 const char *value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */,
3462 uint32_t value_offered /* [in] */,
3463 uint32_t *value_needed /* [out] [ref] */,
3464 enum winreg_Type *type /* [out] [ref] */,
3465 uint8_t *data /* [out] [ref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(data_offered)] */,
3466 uint32_t data_offered /* [in] */,
3467 uint32_t *data_needed /* [out] [ref] */,
3470 struct spoolss_EnumPrinterData r;
3474 r.in.handle = handle;
3475 r.in.enum_index = enum_index;
3476 r.in.value_offered = value_offered;
3477 r.in.data_offered = data_offered;
3479 if (DEBUGLEVEL >= 10) {
3480 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &r);
3483 status = cli->dispatch(cli,
3486 NDR_SPOOLSS_ENUMPRINTERDATA,
3489 if (!NT_STATUS_IS_OK(status)) {
3493 if (DEBUGLEVEL >= 10) {
3494 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &r);
3497 if (NT_STATUS_IS_ERR(status)) {
3501 /* Return variables */
3502 memcpy(CONST_DISCARD(char *, value_name), r.out.value_name, r.in.value_offered / 2 * sizeof(*value_name));
3503 *value_needed = *r.out.value_needed;
3504 *type = *r.out.type;
3505 memcpy(data, r.out.data, r.in.data_offered * sizeof(*data));
3506 *data_needed = *r.out.data_needed;
3510 *werror = r.out.result;
3513 return werror_to_ntstatus(r.out.result);
3516 NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
3517 TALLOC_CTX *mem_ctx,
3518 struct policy_handle *handle /* [in] [ref] */,
3519 const char *value_name /* [in] [charset(UTF16)] */,
3522 struct spoolss_DeletePrinterData r;
3526 r.in.handle = handle;
3527 r.in.value_name = value_name;
3529 if (DEBUGLEVEL >= 10) {
3530 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &r);
3533 status = cli->dispatch(cli,
3536 NDR_SPOOLSS_DELETEPRINTERDATA,
3539 if (!NT_STATUS_IS_OK(status)) {
3543 if (DEBUGLEVEL >= 10) {
3544 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &r);
3547 if (NT_STATUS_IS_ERR(status)) {
3551 /* Return variables */
3555 *werror = r.out.result;
3558 return werror_to_ntstatus(r.out.result);
3561 NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
3562 TALLOC_CTX *mem_ctx,
3565 struct spoolss_4a r;
3570 if (DEBUGLEVEL >= 10) {
3571 NDR_PRINT_IN_DEBUG(spoolss_4a, &r);
3574 status = cli->dispatch(cli,
3580 if (!NT_STATUS_IS_OK(status)) {
3584 if (DEBUGLEVEL >= 10) {
3585 NDR_PRINT_OUT_DEBUG(spoolss_4a, &r);
3588 if (NT_STATUS_IS_ERR(status)) {
3592 /* Return variables */
3596 *werror = r.out.result;
3599 return werror_to_ntstatus(r.out.result);
3602 NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
3603 TALLOC_CTX *mem_ctx,
3606 struct spoolss_4b r;
3611 if (DEBUGLEVEL >= 10) {
3612 NDR_PRINT_IN_DEBUG(spoolss_4b, &r);
3615 status = cli->dispatch(cli,
3621 if (!NT_STATUS_IS_OK(status)) {
3625 if (DEBUGLEVEL >= 10) {
3626 NDR_PRINT_OUT_DEBUG(spoolss_4b, &r);
3629 if (NT_STATUS_IS_ERR(status)) {
3633 /* Return variables */
3637 *werror = r.out.result;
3640 return werror_to_ntstatus(r.out.result);
3643 NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
3644 TALLOC_CTX *mem_ctx,
3647 struct spoolss_4c r;
3652 if (DEBUGLEVEL >= 10) {
3653 NDR_PRINT_IN_DEBUG(spoolss_4c, &r);
3656 status = cli->dispatch(cli,
3662 if (!NT_STATUS_IS_OK(status)) {
3666 if (DEBUGLEVEL >= 10) {
3667 NDR_PRINT_OUT_DEBUG(spoolss_4c, &r);
3670 if (NT_STATUS_IS_ERR(status)) {
3674 /* Return variables */
3678 *werror = r.out.result;
3681 return werror_to_ntstatus(r.out.result);
3684 NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
3685 TALLOC_CTX *mem_ctx,
3686 struct policy_handle *handle /* [in] [ref] */,
3687 const char *key_name /* [in] [charset(UTF16)] */,
3688 const char *value_name /* [in] [charset(UTF16)] */,
3689 enum winreg_Type type /* [in] */,
3690 uint8_t *buffer /* [in] [ref,size_is(offered)] */,
3691 uint32_t offered /* [in] */,
3694 struct spoolss_SetPrinterDataEx r;
3698 r.in.handle = handle;
3699 r.in.key_name = key_name;
3700 r.in.value_name = value_name;
3702 r.in.buffer = buffer;
3703 r.in.offered = offered;
3705 if (DEBUGLEVEL >= 10) {
3706 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &r);
3709 status = cli->dispatch(cli,
3712 NDR_SPOOLSS_SETPRINTERDATAEX,
3715 if (!NT_STATUS_IS_OK(status)) {
3719 if (DEBUGLEVEL >= 10) {
3720 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &r);
3723 if (NT_STATUS_IS_ERR(status)) {
3727 /* Return variables */
3731 *werror = r.out.result;
3734 return werror_to_ntstatus(r.out.result);
3737 NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
3738 TALLOC_CTX *mem_ctx,
3739 struct policy_handle *handle /* [in] [ref] */,
3740 const char *key_name /* [in] [charset(UTF16)] */,
3741 const char *value_name /* [in] [charset(UTF16)] */,
3742 enum winreg_Type *type /* [out] [ref] */,
3743 uint8_t *buffer /* [out] [ref,size_is(offered)] */,
3744 uint32_t offered /* [in] */,
3745 uint32_t *needed /* [out] [ref] */,
3748 struct spoolss_GetPrinterDataEx r;
3752 r.in.handle = handle;
3753 r.in.key_name = key_name;
3754 r.in.value_name = value_name;
3755 r.in.offered = offered;
3757 if (DEBUGLEVEL >= 10) {
3758 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &r);
3761 status = cli->dispatch(cli,
3764 NDR_SPOOLSS_GETPRINTERDATAEX,
3767 if (!NT_STATUS_IS_OK(status)) {
3771 if (DEBUGLEVEL >= 10) {
3772 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &r);
3775 if (NT_STATUS_IS_ERR(status)) {
3779 /* Return variables */
3780 *type = *r.out.type;
3781 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3782 *needed = *r.out.needed;
3786 *werror = r.out.result;
3789 return werror_to_ntstatus(r.out.result);
3792 NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
3793 TALLOC_CTX *mem_ctx,
3794 struct policy_handle *handle /* [in] [ref] */,
3795 const char *key_name /* [in] [charset(UTF16)] */,
3796 uint32_t offered /* [in] */,
3797 uint32_t *count /* [out] [ref] */,
3798 struct spoolss_PrinterEnumValues **info /* [out] [ref,size_is(,*count)] */,
3799 uint32_t *needed /* [out] [ref] */,
3802 struct spoolss_EnumPrinterDataEx r;
3806 r.in.handle = handle;
3807 r.in.key_name = key_name;
3808 r.in.offered = offered;
3810 if (DEBUGLEVEL >= 10) {
3811 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &r);
3814 status = cli->dispatch(cli,
3817 NDR_SPOOLSS_ENUMPRINTERDATAEX,
3820 if (!NT_STATUS_IS_OK(status)) {
3824 if (DEBUGLEVEL >= 10) {
3825 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &r);
3828 if (NT_STATUS_IS_ERR(status)) {
3832 /* Return variables */
3833 *count = *r.out.count;
3834 *info = *r.out.info;
3835 *needed = *r.out.needed;
3839 *werror = r.out.result;
3842 return werror_to_ntstatus(r.out.result);
3845 NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
3846 TALLOC_CTX *mem_ctx,
3847 struct policy_handle *handle /* [in] [ref] */,
3848 const char *key_name /* [in] [charset(UTF16)] */,
3849 const char ** *key_buffer /* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
3850 uint32_t offered /* [in] */,
3851 uint32_t *needed /* [out] [ref] */,
3854 struct spoolss_EnumPrinterKey r;
3858 r.in.handle = handle;
3859 r.in.key_name = key_name;
3860 r.in.offered = offered;
3862 if (DEBUGLEVEL >= 10) {
3863 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &r);
3866 status = cli->dispatch(cli,
3869 NDR_SPOOLSS_ENUMPRINTERKEY,
3872 if (!NT_STATUS_IS_OK(status)) {
3876 if (DEBUGLEVEL >= 10) {
3877 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &r);
3880 if (NT_STATUS_IS_ERR(status)) {
3884 /* Return variables */
3885 *key_buffer = *r.out.key_buffer;
3886 *needed = *r.out.needed;
3890 *werror = r.out.result;
3893 return werror_to_ntstatus(r.out.result);
3896 NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli,
3897 TALLOC_CTX *mem_ctx,
3898 struct policy_handle *handle /* [in] [ref] */,
3899 const char *key_name /* [in] [charset(UTF16)] */,
3900 const char *value_name /* [in] [charset(UTF16)] */,
3903 struct spoolss_DeletePrinterDataEx r;
3907 r.in.handle = handle;
3908 r.in.key_name = key_name;
3909 r.in.value_name = value_name;
3911 if (DEBUGLEVEL >= 10) {
3912 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &r);
3915 status = cli->dispatch(cli,
3918 NDR_SPOOLSS_DELETEPRINTERDATAEX,
3921 if (!NT_STATUS_IS_OK(status)) {
3925 if (DEBUGLEVEL >= 10) {
3926 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &r);
3929 if (NT_STATUS_IS_ERR(status)) {
3933 /* Return variables */
3937 *werror = r.out.result;
3940 return werror_to_ntstatus(r.out.result);
3943 NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
3944 TALLOC_CTX *mem_ctx,
3945 struct policy_handle *handle /* [in] [ref] */,
3946 const char *key_name /* [in] [charset(UTF16)] */,
3949 struct spoolss_DeletePrinterKey r;
3953 r.in.handle = handle;
3954 r.in.key_name = key_name;
3956 if (DEBUGLEVEL >= 10) {
3957 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &r);
3960 status = cli->dispatch(cli,
3963 NDR_SPOOLSS_DELETEPRINTERKEY,
3966 if (!NT_STATUS_IS_OK(status)) {
3970 if (DEBUGLEVEL >= 10) {
3971 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &r);
3974 if (NT_STATUS_IS_ERR(status)) {
3978 /* Return variables */
3982 *werror = r.out.result;
3985 return werror_to_ntstatus(r.out.result);
3988 NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
3989 TALLOC_CTX *mem_ctx,
3992 struct spoolss_53 r;
3997 if (DEBUGLEVEL >= 10) {
3998 NDR_PRINT_IN_DEBUG(spoolss_53, &r);
4001 status = cli->dispatch(cli,
4007 if (!NT_STATUS_IS_OK(status)) {
4011 if (DEBUGLEVEL >= 10) {
4012 NDR_PRINT_OUT_DEBUG(spoolss_53, &r);
4015 if (NT_STATUS_IS_ERR(status)) {
4019 /* Return variables */
4023 *werror = r.out.result;
4026 return werror_to_ntstatus(r.out.result);
4029 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
4030 TALLOC_CTX *mem_ctx,
4031 const char *server /* [in] [unique,charset(UTF16)] */,
4032 const char *architecture /* [in] [charset(UTF16)] */,
4033 const char *driver /* [in] [charset(UTF16)] */,
4034 uint32_t delete_flags /* [in] */,
4035 uint32_t version /* [in] */,
4038 struct spoolss_DeletePrinterDriverEx r;
4042 r.in.server = server;
4043 r.in.architecture = architecture;
4044 r.in.driver = driver;
4045 r.in.delete_flags = delete_flags;
4046 r.in.version = version;
4048 if (DEBUGLEVEL >= 10) {
4049 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4052 status = cli->dispatch(cli,
4055 NDR_SPOOLSS_DELETEPRINTERDRIVEREX,
4058 if (!NT_STATUS_IS_OK(status)) {
4062 if (DEBUGLEVEL >= 10) {
4063 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4066 if (NT_STATUS_IS_ERR(status)) {
4070 /* Return variables */
4074 *werror = r.out.result;
4077 return werror_to_ntstatus(r.out.result);
4080 NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
4081 TALLOC_CTX *mem_ctx,
4084 struct spoolss_55 r;
4089 if (DEBUGLEVEL >= 10) {
4090 NDR_PRINT_IN_DEBUG(spoolss_55, &r);
4093 status = cli->dispatch(cli,
4099 if (!NT_STATUS_IS_OK(status)) {
4103 if (DEBUGLEVEL >= 10) {
4104 NDR_PRINT_OUT_DEBUG(spoolss_55, &r);
4107 if (NT_STATUS_IS_ERR(status)) {
4111 /* Return variables */
4115 *werror = r.out.result;
4118 return werror_to_ntstatus(r.out.result);
4121 NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
4122 TALLOC_CTX *mem_ctx,
4125 struct spoolss_56 r;
4130 if (DEBUGLEVEL >= 10) {
4131 NDR_PRINT_IN_DEBUG(spoolss_56, &r);
4134 status = cli->dispatch(cli,
4140 if (!NT_STATUS_IS_OK(status)) {
4144 if (DEBUGLEVEL >= 10) {
4145 NDR_PRINT_OUT_DEBUG(spoolss_56, &r);
4148 if (NT_STATUS_IS_ERR(status)) {
4152 /* Return variables */
4156 *werror = r.out.result;
4159 return werror_to_ntstatus(r.out.result);
4162 NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
4163 TALLOC_CTX *mem_ctx,
4166 struct spoolss_57 r;
4171 if (DEBUGLEVEL >= 10) {
4172 NDR_PRINT_IN_DEBUG(spoolss_57, &r);
4175 status = cli->dispatch(cli,
4181 if (!NT_STATUS_IS_OK(status)) {
4185 if (DEBUGLEVEL >= 10) {
4186 NDR_PRINT_OUT_DEBUG(spoolss_57, &r);
4189 if (NT_STATUS_IS_ERR(status)) {
4193 /* Return variables */
4197 *werror = r.out.result;
4200 return werror_to_ntstatus(r.out.result);
4203 NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
4204 TALLOC_CTX *mem_ctx,
4205 struct policy_handle *handle /* [in] [ref] */,
4206 const char *function_name /* [in] [charset(UTF16)] */,
4207 DATA_BLOB in_data /* [in] */,
4208 uint32_t _in_data_length /* [in] [value(r->in.in_data.length)] */,
4209 uint8_t *out_data /* [out] [ref,size_is(out_data_size)] */,
4210 uint32_t out_data_size /* [in] */,
4211 uint32_t *needed /* [out] [ref] */,
4212 uint32_t *status_code /* [in,out] [ref] */,
4215 struct spoolss_XcvData r;
4219 r.in.handle = handle;
4220 r.in.function_name = function_name;
4221 r.in.in_data = in_data;
4222 r.in._in_data_length = _in_data_length;
4223 r.in.out_data_size = out_data_size;
4224 r.in.status_code = status_code;
4226 if (DEBUGLEVEL >= 10) {
4227 NDR_PRINT_IN_DEBUG(spoolss_XcvData, &r);
4230 status = cli->dispatch(cli,
4233 NDR_SPOOLSS_XCVDATA,
4236 if (!NT_STATUS_IS_OK(status)) {
4240 if (DEBUGLEVEL >= 10) {
4241 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &r);
4244 if (NT_STATUS_IS_ERR(status)) {
4248 /* Return variables */
4249 memcpy(out_data, r.out.out_data, r.in.out_data_size * sizeof(*out_data));
4250 *needed = *r.out.needed;
4251 *status_code = *r.out.status_code;
4255 *werror = r.out.result;
4258 return werror_to_ntstatus(r.out.result);
4261 NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
4262 TALLOC_CTX *mem_ctx,
4263 const char *servername /* [in] [unique,charset(UTF16)] */,
4264 struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
4265 uint32_t flags /* [in] */,
4268 struct spoolss_AddPrinterDriverEx r;
4272 r.in.servername = servername;
4273 r.in.info_ctr = info_ctr;
4276 if (DEBUGLEVEL >= 10) {
4277 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &r);
4280 status = cli->dispatch(cli,
4283 NDR_SPOOLSS_ADDPRINTERDRIVEREX,
4286 if (!NT_STATUS_IS_OK(status)) {
4290 if (DEBUGLEVEL >= 10) {
4291 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &r);
4294 if (NT_STATUS_IS_ERR(status)) {
4298 /* Return variables */
4302 *werror = r.out.result;
4305 return werror_to_ntstatus(r.out.result);
4308 NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
4309 TALLOC_CTX *mem_ctx,
4312 struct spoolss_5a r;
4317 if (DEBUGLEVEL >= 10) {
4318 NDR_PRINT_IN_DEBUG(spoolss_5a, &r);
4321 status = cli->dispatch(cli,
4327 if (!NT_STATUS_IS_OK(status)) {
4331 if (DEBUGLEVEL >= 10) {
4332 NDR_PRINT_OUT_DEBUG(spoolss_5a, &r);
4335 if (NT_STATUS_IS_ERR(status)) {
4339 /* Return variables */
4343 *werror = r.out.result;
4346 return werror_to_ntstatus(r.out.result);
4349 NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
4350 TALLOC_CTX *mem_ctx,
4353 struct spoolss_5b r;
4358 if (DEBUGLEVEL >= 10) {
4359 NDR_PRINT_IN_DEBUG(spoolss_5b, &r);
4362 status = cli->dispatch(cli,
4368 if (!NT_STATUS_IS_OK(status)) {
4372 if (DEBUGLEVEL >= 10) {
4373 NDR_PRINT_OUT_DEBUG(spoolss_5b, &r);
4376 if (NT_STATUS_IS_ERR(status)) {
4380 /* Return variables */
4384 *werror = r.out.result;
4387 return werror_to_ntstatus(r.out.result);
4390 NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
4391 TALLOC_CTX *mem_ctx,
4394 struct spoolss_5c r;
4399 if (DEBUGLEVEL >= 10) {
4400 NDR_PRINT_IN_DEBUG(spoolss_5c, &r);
4403 status = cli->dispatch(cli,
4409 if (!NT_STATUS_IS_OK(status)) {
4413 if (DEBUGLEVEL >= 10) {
4414 NDR_PRINT_OUT_DEBUG(spoolss_5c, &r);
4417 if (NT_STATUS_IS_ERR(status)) {
4421 /* Return variables */
4425 *werror = r.out.result;
4428 return werror_to_ntstatus(r.out.result);
4431 NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
4432 TALLOC_CTX *mem_ctx,
4435 struct spoolss_5d r;
4440 if (DEBUGLEVEL >= 10) {
4441 NDR_PRINT_IN_DEBUG(spoolss_5d, &r);
4444 status = cli->dispatch(cli,
4450 if (!NT_STATUS_IS_OK(status)) {
4454 if (DEBUGLEVEL >= 10) {
4455 NDR_PRINT_OUT_DEBUG(spoolss_5d, &r);
4458 if (NT_STATUS_IS_ERR(status)) {
4462 /* Return variables */
4466 *werror = r.out.result;
4469 return werror_to_ntstatus(r.out.result);
4472 NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
4473 TALLOC_CTX *mem_ctx,
4476 struct spoolss_5e r;
4481 if (DEBUGLEVEL >= 10) {
4482 NDR_PRINT_IN_DEBUG(spoolss_5e, &r);
4485 status = cli->dispatch(cli,
4491 if (!NT_STATUS_IS_OK(status)) {
4495 if (DEBUGLEVEL >= 10) {
4496 NDR_PRINT_OUT_DEBUG(spoolss_5e, &r);
4499 if (NT_STATUS_IS_ERR(status)) {
4503 /* Return variables */
4507 *werror = r.out.result;
4510 return werror_to_ntstatus(r.out.result);
4513 NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
4514 TALLOC_CTX *mem_ctx,
4517 struct spoolss_5f r;
4522 if (DEBUGLEVEL >= 10) {
4523 NDR_PRINT_IN_DEBUG(spoolss_5f, &r);
4526 status = cli->dispatch(cli,
4532 if (!NT_STATUS_IS_OK(status)) {
4536 if (DEBUGLEVEL >= 10) {
4537 NDR_PRINT_OUT_DEBUG(spoolss_5f, &r);
4540 if (NT_STATUS_IS_ERR(status)) {
4544 /* Return variables */
4548 *werror = r.out.result;
4551 return werror_to_ntstatus(r.out.result);