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,
588 struct spoolss_GetPrinterDriver r;
593 if (DEBUGLEVEL >= 10) {
594 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &r);
597 status = cli->dispatch(cli,
600 NDR_SPOOLSS_GETPRINTERDRIVER,
603 if (!NT_STATUS_IS_OK(status)) {
607 if (DEBUGLEVEL >= 10) {
608 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &r);
611 if (NT_STATUS_IS_ERR(status)) {
615 /* Return variables */
619 *werror = r.out.result;
622 return werror_to_ntstatus(r.out.result);
625 NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
627 const char *server /* [in] [unique,charset(UTF16)] */,
628 const char *environment /* [in] [unique,charset(UTF16)] */,
629 uint32_t level /* [in] */,
630 DATA_BLOB *buffer /* [in] [unique] */,
631 uint32_t offered /* [in] */,
632 union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
633 uint32_t *needed /* [out] [ref] */,
636 struct spoolss_GetPrinterDriverDirectory r;
640 r.in.server = server;
641 r.in.environment = environment;
643 r.in.buffer = buffer;
644 r.in.offered = offered;
646 if (DEBUGLEVEL >= 10) {
647 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
650 status = cli->dispatch(cli,
653 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY,
656 if (!NT_STATUS_IS_OK(status)) {
660 if (DEBUGLEVEL >= 10) {
661 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
664 if (NT_STATUS_IS_ERR(status)) {
668 /* Return variables */
669 if (info && r.out.info) {
672 *needed = *r.out.needed;
676 *werror = r.out.result;
679 return werror_to_ntstatus(r.out.result);
682 NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
684 const char *server /* [in] [unique,charset(UTF16)] */,
685 const char *architecture /* [in] [charset(UTF16)] */,
686 const char *driver /* [in] [charset(UTF16)] */,
689 struct spoolss_DeletePrinterDriver r;
693 r.in.server = server;
694 r.in.architecture = architecture;
695 r.in.driver = driver;
697 if (DEBUGLEVEL >= 10) {
698 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &r);
701 status = cli->dispatch(cli,
704 NDR_SPOOLSS_DELETEPRINTERDRIVER,
707 if (!NT_STATUS_IS_OK(status)) {
711 if (DEBUGLEVEL >= 10) {
712 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &r);
715 if (NT_STATUS_IS_ERR(status)) {
719 /* Return variables */
723 *werror = r.out.result;
726 return werror_to_ntstatus(r.out.result);
729 NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
731 const char *server /* [in] [unique,charset(UTF16)] */,
732 const char *architecture /* [in] [charset(UTF16)] */,
733 const char *path_name /* [in] [charset(UTF16)] */,
734 const char *print_processor_name /* [in] [charset(UTF16)] */,
737 struct spoolss_AddPrintProcessor r;
741 r.in.server = server;
742 r.in.architecture = architecture;
743 r.in.path_name = path_name;
744 r.in.print_processor_name = print_processor_name;
746 if (DEBUGLEVEL >= 10) {
747 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &r);
750 status = cli->dispatch(cli,
753 NDR_SPOOLSS_ADDPRINTPROCESSOR,
756 if (!NT_STATUS_IS_OK(status)) {
760 if (DEBUGLEVEL >= 10) {
761 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &r);
764 if (NT_STATUS_IS_ERR(status)) {
768 /* Return variables */
772 *werror = r.out.result;
775 return werror_to_ntstatus(r.out.result);
778 NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
780 const char *servername /* [in] [unique,charset(UTF16)] */,
781 const char *environment /* [in] [unique,charset(UTF16)] */,
782 uint32_t level /* [in] */,
783 DATA_BLOB *buffer /* [in] [unique] */,
784 uint32_t offered /* [in] */,
785 uint32_t *count /* [out] [ref] */,
786 union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
787 uint32_t *needed /* [out] [ref] */,
790 struct spoolss_EnumPrintProcessors r;
794 r.in.servername = servername;
795 r.in.environment = environment;
797 r.in.buffer = buffer;
798 r.in.offered = offered;
800 if (DEBUGLEVEL >= 10) {
801 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &r);
804 status = cli->dispatch(cli,
807 NDR_SPOOLSS_ENUMPRINTPROCESSORS,
810 if (!NT_STATUS_IS_OK(status)) {
814 if (DEBUGLEVEL >= 10) {
815 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &r);
818 if (NT_STATUS_IS_ERR(status)) {
822 /* Return variables */
823 *count = *r.out.count;
825 *needed = *r.out.needed;
829 *werror = r.out.result;
832 return werror_to_ntstatus(r.out.result);
835 NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
837 const char *server /* [in] [unique,charset(UTF16)] */,
838 const char *environment /* [in] [unique,charset(UTF16)] */,
839 uint32_t level /* [in] */,
840 DATA_BLOB *buffer /* [in] [unique] */,
841 uint32_t offered /* [in] */,
842 union spoolss_PrintProcessorDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
843 uint32_t *needed /* [out] [ref] */,
846 struct spoolss_GetPrintProcessorDirectory r;
850 r.in.server = server;
851 r.in.environment = environment;
853 r.in.buffer = buffer;
854 r.in.offered = offered;
856 if (DEBUGLEVEL >= 10) {
857 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
860 status = cli->dispatch(cli,
863 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY,
866 if (!NT_STATUS_IS_OK(status)) {
870 if (DEBUGLEVEL >= 10) {
871 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
874 if (NT_STATUS_IS_ERR(status)) {
878 /* Return variables */
879 if (info && r.out.info) {
882 *needed = *r.out.needed;
886 *werror = r.out.result;
889 return werror_to_ntstatus(r.out.result);
892 NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
894 struct policy_handle *handle /* [in] [ref] */,
895 uint32_t level /* [in] */,
896 union spoolss_DocumentInfo info /* [in] [switch_is(level)] */,
897 uint32_t *job_id /* [out] [ref] */,
900 struct spoolss_StartDocPrinter r;
904 r.in.handle = handle;
908 if (DEBUGLEVEL >= 10) {
909 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &r);
912 status = cli->dispatch(cli,
915 NDR_SPOOLSS_STARTDOCPRINTER,
918 if (!NT_STATUS_IS_OK(status)) {
922 if (DEBUGLEVEL >= 10) {
923 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &r);
926 if (NT_STATUS_IS_ERR(status)) {
930 /* Return variables */
931 *job_id = *r.out.job_id;
935 *werror = r.out.result;
938 return werror_to_ntstatus(r.out.result);
941 NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
943 struct policy_handle *handle /* [in] [ref] */,
946 struct spoolss_StartPagePrinter r;
950 r.in.handle = handle;
952 if (DEBUGLEVEL >= 10) {
953 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &r);
956 status = cli->dispatch(cli,
959 NDR_SPOOLSS_STARTPAGEPRINTER,
962 if (!NT_STATUS_IS_OK(status)) {
966 if (DEBUGLEVEL >= 10) {
967 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &r);
970 if (NT_STATUS_IS_ERR(status)) {
974 /* Return variables */
978 *werror = r.out.result;
981 return werror_to_ntstatus(r.out.result);
984 NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
986 struct policy_handle *handle /* [in] [ref] */,
987 DATA_BLOB data /* [in] */,
988 uint32_t _data_size /* [in] [value(r->in.data.length)] */,
989 uint32_t *num_written /* [out] [ref] */,
992 struct spoolss_WritePrinter r;
996 r.in.handle = handle;
998 r.in._data_size = _data_size;
1000 if (DEBUGLEVEL >= 10) {
1001 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &r);
1004 status = cli->dispatch(cli,
1007 NDR_SPOOLSS_WRITEPRINTER,
1010 if (!NT_STATUS_IS_OK(status)) {
1014 if (DEBUGLEVEL >= 10) {
1015 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &r);
1018 if (NT_STATUS_IS_ERR(status)) {
1022 /* Return variables */
1023 *num_written = *r.out.num_written;
1027 *werror = r.out.result;
1030 return werror_to_ntstatus(r.out.result);
1033 NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
1034 TALLOC_CTX *mem_ctx,
1035 struct policy_handle *handle /* [in] [ref] */,
1038 struct spoolss_EndPagePrinter r;
1042 r.in.handle = handle;
1044 if (DEBUGLEVEL >= 10) {
1045 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &r);
1048 status = cli->dispatch(cli,
1051 NDR_SPOOLSS_ENDPAGEPRINTER,
1054 if (!NT_STATUS_IS_OK(status)) {
1058 if (DEBUGLEVEL >= 10) {
1059 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &r);
1062 if (NT_STATUS_IS_ERR(status)) {
1066 /* Return variables */
1070 *werror = r.out.result;
1073 return werror_to_ntstatus(r.out.result);
1076 NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
1077 TALLOC_CTX *mem_ctx,
1078 struct policy_handle *handle /* [in] [ref] */,
1081 struct spoolss_AbortPrinter r;
1085 r.in.handle = handle;
1087 if (DEBUGLEVEL >= 10) {
1088 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &r);
1091 status = cli->dispatch(cli,
1094 NDR_SPOOLSS_ABORTPRINTER,
1097 if (!NT_STATUS_IS_OK(status)) {
1101 if (DEBUGLEVEL >= 10) {
1102 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &r);
1105 if (NT_STATUS_IS_ERR(status)) {
1109 /* Return variables */
1113 *werror = r.out.result;
1116 return werror_to_ntstatus(r.out.result);
1119 NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
1120 TALLOC_CTX *mem_ctx,
1121 struct policy_handle *handle /* [in] [ref] */,
1122 uint8_t *data /* [out] [ref,size_is(data_size)] */,
1123 uint32_t data_size /* [in] */,
1124 uint32_t *_data_size /* [out] [ref] */,
1127 struct spoolss_ReadPrinter r;
1131 r.in.handle = handle;
1132 r.in.data_size = data_size;
1134 if (DEBUGLEVEL >= 10) {
1135 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &r);
1138 status = cli->dispatch(cli,
1141 NDR_SPOOLSS_READPRINTER,
1144 if (!NT_STATUS_IS_OK(status)) {
1148 if (DEBUGLEVEL >= 10) {
1149 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &r);
1152 if (NT_STATUS_IS_ERR(status)) {
1156 /* Return variables */
1157 memcpy(data, r.out.data, r.in.data_size * sizeof(*data));
1158 *_data_size = *r.out._data_size;
1162 *werror = r.out.result;
1165 return werror_to_ntstatus(r.out.result);
1168 NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
1169 TALLOC_CTX *mem_ctx,
1170 struct policy_handle *handle /* [in] [ref] */,
1173 struct spoolss_EndDocPrinter r;
1177 r.in.handle = handle;
1179 if (DEBUGLEVEL >= 10) {
1180 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &r);
1183 status = cli->dispatch(cli,
1186 NDR_SPOOLSS_ENDDOCPRINTER,
1189 if (!NT_STATUS_IS_OK(status)) {
1193 if (DEBUGLEVEL >= 10) {
1194 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &r);
1197 if (NT_STATUS_IS_ERR(status)) {
1201 /* Return variables */
1205 *werror = r.out.result;
1208 return werror_to_ntstatus(r.out.result);
1211 NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
1212 TALLOC_CTX *mem_ctx,
1213 struct policy_handle *handle /* [in] [ref] */,
1214 uint32_t level /* [in] */,
1215 uint8_t *buffer /* [in,out] [unique,size_is(offered)] */,
1216 uint32_t offered /* [in] */,
1217 uint32_t *needed /* [out] [ref] */,
1220 struct spoolss_AddJob r;
1224 r.in.handle = handle;
1226 r.in.buffer = buffer;
1227 r.in.offered = offered;
1229 if (DEBUGLEVEL >= 10) {
1230 NDR_PRINT_IN_DEBUG(spoolss_AddJob, &r);
1233 status = cli->dispatch(cli,
1239 if (!NT_STATUS_IS_OK(status)) {
1243 if (DEBUGLEVEL >= 10) {
1244 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &r);
1247 if (NT_STATUS_IS_ERR(status)) {
1251 /* Return variables */
1252 if (buffer && r.out.buffer) {
1253 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
1255 *needed = *r.out.needed;
1259 *werror = r.out.result;
1262 return werror_to_ntstatus(r.out.result);
1265 NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
1266 TALLOC_CTX *mem_ctx,
1267 struct policy_handle *handle /* [in] [ref] */,
1268 uint32_t jobid /* [in] */,
1271 struct spoolss_ScheduleJob r;
1275 r.in.handle = handle;
1278 if (DEBUGLEVEL >= 10) {
1279 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &r);
1282 status = cli->dispatch(cli,
1285 NDR_SPOOLSS_SCHEDULEJOB,
1288 if (!NT_STATUS_IS_OK(status)) {
1292 if (DEBUGLEVEL >= 10) {
1293 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &r);
1296 if (NT_STATUS_IS_ERR(status)) {
1300 /* Return variables */
1304 *werror = r.out.result;
1307 return werror_to_ntstatus(r.out.result);
1310 NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
1311 TALLOC_CTX *mem_ctx,
1312 struct policy_handle *handle /* [in] [ref] */,
1313 const char *value_name /* [in] [charset(UTF16)] */,
1314 uint32_t offered /* [in] */,
1315 enum winreg_Type *type /* [out] [ref] */,
1316 union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
1317 uint32_t *needed /* [out] [ref] */,
1320 struct spoolss_GetPrinterData r;
1324 r.in.handle = handle;
1325 r.in.value_name = value_name;
1326 r.in.offered = offered;
1328 if (DEBUGLEVEL >= 10) {
1329 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &r);
1332 status = cli->dispatch(cli,
1335 NDR_SPOOLSS_GETPRINTERDATA,
1338 if (!NT_STATUS_IS_OK(status)) {
1342 if (DEBUGLEVEL >= 10) {
1343 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &r);
1346 if (NT_STATUS_IS_ERR(status)) {
1350 /* Return variables */
1351 *type = *r.out.type;
1352 *data = *r.out.data;
1353 *needed = *r.out.needed;
1357 *werror = r.out.result;
1360 return werror_to_ntstatus(r.out.result);
1363 NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
1364 TALLOC_CTX *mem_ctx,
1365 struct policy_handle *handle /* [in] [ref] */,
1366 const char *value_name /* [in] [charset(UTF16)] */,
1367 enum winreg_Type type /* [in] */,
1368 union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */,
1369 uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1372 struct spoolss_SetPrinterData r;
1376 r.in.handle = handle;
1377 r.in.value_name = value_name;
1380 r.in._offered = _offered;
1382 if (DEBUGLEVEL >= 10) {
1383 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &r);
1386 status = cli->dispatch(cli,
1389 NDR_SPOOLSS_SETPRINTERDATA,
1392 if (!NT_STATUS_IS_OK(status)) {
1396 if (DEBUGLEVEL >= 10) {
1397 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &r);
1400 if (NT_STATUS_IS_ERR(status)) {
1404 /* Return variables */
1408 *werror = r.out.result;
1411 return werror_to_ntstatus(r.out.result);
1414 NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
1415 TALLOC_CTX *mem_ctx,
1418 struct spoolss_WaitForPrinterChange r;
1423 if (DEBUGLEVEL >= 10) {
1424 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &r);
1427 status = cli->dispatch(cli,
1430 NDR_SPOOLSS_WAITFORPRINTERCHANGE,
1433 if (!NT_STATUS_IS_OK(status)) {
1437 if (DEBUGLEVEL >= 10) {
1438 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &r);
1441 if (NT_STATUS_IS_ERR(status)) {
1445 /* Return variables */
1449 *werror = r.out.result;
1452 return werror_to_ntstatus(r.out.result);
1455 NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
1456 TALLOC_CTX *mem_ctx,
1457 struct policy_handle *handle /* [in,out] [ref] */,
1460 struct spoolss_ClosePrinter r;
1464 r.in.handle = handle;
1466 if (DEBUGLEVEL >= 10) {
1467 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &r);
1470 status = cli->dispatch(cli,
1473 NDR_SPOOLSS_CLOSEPRINTER,
1476 if (!NT_STATUS_IS_OK(status)) {
1480 if (DEBUGLEVEL >= 10) {
1481 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &r);
1484 if (NT_STATUS_IS_ERR(status)) {
1488 /* Return variables */
1489 *handle = *r.out.handle;
1493 *werror = r.out.result;
1496 return werror_to_ntstatus(r.out.result);
1499 NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
1500 TALLOC_CTX *mem_ctx,
1501 struct policy_handle *handle /* [in] [ref] */,
1502 uint32_t level /* [in] */,
1503 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1506 struct spoolss_AddForm r;
1510 r.in.handle = handle;
1514 if (DEBUGLEVEL >= 10) {
1515 NDR_PRINT_IN_DEBUG(spoolss_AddForm, &r);
1518 status = cli->dispatch(cli,
1521 NDR_SPOOLSS_ADDFORM,
1524 if (!NT_STATUS_IS_OK(status)) {
1528 if (DEBUGLEVEL >= 10) {
1529 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &r);
1532 if (NT_STATUS_IS_ERR(status)) {
1536 /* Return variables */
1540 *werror = r.out.result;
1543 return werror_to_ntstatus(r.out.result);
1546 NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
1547 TALLOC_CTX *mem_ctx,
1548 struct policy_handle *handle /* [in] [ref] */,
1549 const char *form_name /* [in] [charset(UTF16)] */,
1552 struct spoolss_DeleteForm r;
1556 r.in.handle = handle;
1557 r.in.form_name = form_name;
1559 if (DEBUGLEVEL >= 10) {
1560 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &r);
1563 status = cli->dispatch(cli,
1566 NDR_SPOOLSS_DELETEFORM,
1569 if (!NT_STATUS_IS_OK(status)) {
1573 if (DEBUGLEVEL >= 10) {
1574 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &r);
1577 if (NT_STATUS_IS_ERR(status)) {
1581 /* Return variables */
1585 *werror = r.out.result;
1588 return werror_to_ntstatus(r.out.result);
1591 NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
1592 TALLOC_CTX *mem_ctx,
1593 struct policy_handle *handle /* [in] [ref] */,
1594 const char *form_name /* [in] [charset(UTF16)] */,
1595 uint32_t level /* [in] */,
1596 DATA_BLOB *buffer /* [in] [unique] */,
1597 uint32_t offered /* [in] */,
1598 union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1599 uint32_t *needed /* [out] [ref] */,
1602 struct spoolss_GetForm r;
1606 r.in.handle = handle;
1607 r.in.form_name = form_name;
1609 r.in.buffer = buffer;
1610 r.in.offered = offered;
1612 if (DEBUGLEVEL >= 10) {
1613 NDR_PRINT_IN_DEBUG(spoolss_GetForm, &r);
1616 status = cli->dispatch(cli,
1619 NDR_SPOOLSS_GETFORM,
1622 if (!NT_STATUS_IS_OK(status)) {
1626 if (DEBUGLEVEL >= 10) {
1627 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &r);
1630 if (NT_STATUS_IS_ERR(status)) {
1634 /* Return variables */
1635 if (info && r.out.info) {
1636 *info = *r.out.info;
1638 *needed = *r.out.needed;
1642 *werror = r.out.result;
1645 return werror_to_ntstatus(r.out.result);
1648 NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
1649 TALLOC_CTX *mem_ctx,
1650 struct policy_handle *handle /* [in] [ref] */,
1651 const char *form_name /* [in] [charset(UTF16)] */,
1652 uint32_t level /* [in] */,
1653 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1656 struct spoolss_SetForm r;
1660 r.in.handle = handle;
1661 r.in.form_name = form_name;
1665 if (DEBUGLEVEL >= 10) {
1666 NDR_PRINT_IN_DEBUG(spoolss_SetForm, &r);
1669 status = cli->dispatch(cli,
1672 NDR_SPOOLSS_SETFORM,
1675 if (!NT_STATUS_IS_OK(status)) {
1679 if (DEBUGLEVEL >= 10) {
1680 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &r);
1683 if (NT_STATUS_IS_ERR(status)) {
1687 /* Return variables */
1691 *werror = r.out.result;
1694 return werror_to_ntstatus(r.out.result);
1697 NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
1698 TALLOC_CTX *mem_ctx,
1699 struct policy_handle *handle /* [in] [ref] */,
1700 uint32_t level /* [in] */,
1701 DATA_BLOB *buffer /* [in] [unique] */,
1702 uint32_t offered /* [in] */,
1703 uint32_t *count /* [out] [ref] */,
1704 union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1705 uint32_t *needed /* [out] [ref] */,
1708 struct spoolss_EnumForms r;
1712 r.in.handle = handle;
1714 r.in.buffer = buffer;
1715 r.in.offered = offered;
1717 if (DEBUGLEVEL >= 10) {
1718 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &r);
1721 status = cli->dispatch(cli,
1724 NDR_SPOOLSS_ENUMFORMS,
1727 if (!NT_STATUS_IS_OK(status)) {
1731 if (DEBUGLEVEL >= 10) {
1732 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &r);
1735 if (NT_STATUS_IS_ERR(status)) {
1739 /* Return variables */
1740 *count = *r.out.count;
1741 *info = *r.out.info;
1742 *needed = *r.out.needed;
1746 *werror = r.out.result;
1749 return werror_to_ntstatus(r.out.result);
1752 NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
1753 TALLOC_CTX *mem_ctx,
1754 const char *servername /* [in] [unique,charset(UTF16)] */,
1755 uint32_t level /* [in] */,
1756 DATA_BLOB *buffer /* [in] [unique] */,
1757 uint32_t offered /* [in] */,
1758 uint32_t *count /* [out] [ref] */,
1759 union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1760 uint32_t *needed /* [out] [ref] */,
1763 struct spoolss_EnumPorts r;
1767 r.in.servername = servername;
1769 r.in.buffer = buffer;
1770 r.in.offered = offered;
1772 if (DEBUGLEVEL >= 10) {
1773 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &r);
1776 status = cli->dispatch(cli,
1779 NDR_SPOOLSS_ENUMPORTS,
1782 if (!NT_STATUS_IS_OK(status)) {
1786 if (DEBUGLEVEL >= 10) {
1787 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &r);
1790 if (NT_STATUS_IS_ERR(status)) {
1794 /* Return variables */
1795 *count = *r.out.count;
1796 *info = *r.out.info;
1797 *needed = *r.out.needed;
1801 *werror = r.out.result;
1804 return werror_to_ntstatus(r.out.result);
1807 NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
1808 TALLOC_CTX *mem_ctx,
1809 const char *servername /* [in] [unique,charset(UTF16)] */,
1810 uint32_t level /* [in] */,
1811 DATA_BLOB *buffer /* [in] [unique] */,
1812 uint32_t offered /* [in] */,
1813 uint32_t *count /* [out] [ref] */,
1814 union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1815 uint32_t *needed /* [out] [ref] */,
1818 struct spoolss_EnumMonitors r;
1822 r.in.servername = servername;
1824 r.in.buffer = buffer;
1825 r.in.offered = offered;
1827 if (DEBUGLEVEL >= 10) {
1828 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &r);
1831 status = cli->dispatch(cli,
1834 NDR_SPOOLSS_ENUMMONITORS,
1837 if (!NT_STATUS_IS_OK(status)) {
1841 if (DEBUGLEVEL >= 10) {
1842 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &r);
1845 if (NT_STATUS_IS_ERR(status)) {
1849 /* Return variables */
1850 *count = *r.out.count;
1851 *info = *r.out.info;
1852 *needed = *r.out.needed;
1856 *werror = r.out.result;
1859 return werror_to_ntstatus(r.out.result);
1862 NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
1863 TALLOC_CTX *mem_ctx,
1864 const char *server_name /* [in] [unique,charset(UTF16)] */,
1865 uint32_t unknown /* [in] */,
1866 const char *monitor_name /* [in] [charset(UTF16)] */,
1869 struct spoolss_AddPort r;
1873 r.in.server_name = server_name;
1874 r.in.unknown = unknown;
1875 r.in.monitor_name = monitor_name;
1877 if (DEBUGLEVEL >= 10) {
1878 NDR_PRINT_IN_DEBUG(spoolss_AddPort, &r);
1881 status = cli->dispatch(cli,
1884 NDR_SPOOLSS_ADDPORT,
1887 if (!NT_STATUS_IS_OK(status)) {
1891 if (DEBUGLEVEL >= 10) {
1892 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &r);
1895 if (NT_STATUS_IS_ERR(status)) {
1899 /* Return variables */
1903 *werror = r.out.result;
1906 return werror_to_ntstatus(r.out.result);
1909 NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
1910 TALLOC_CTX *mem_ctx,
1913 struct spoolss_ConfigurePort r;
1918 if (DEBUGLEVEL >= 10) {
1919 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &r);
1922 status = cli->dispatch(cli,
1925 NDR_SPOOLSS_CONFIGUREPORT,
1928 if (!NT_STATUS_IS_OK(status)) {
1932 if (DEBUGLEVEL >= 10) {
1933 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &r);
1936 if (NT_STATUS_IS_ERR(status)) {
1940 /* Return variables */
1944 *werror = r.out.result;
1947 return werror_to_ntstatus(r.out.result);
1950 NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
1951 TALLOC_CTX *mem_ctx,
1954 struct spoolss_DeletePort r;
1959 if (DEBUGLEVEL >= 10) {
1960 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &r);
1963 status = cli->dispatch(cli,
1966 NDR_SPOOLSS_DELETEPORT,
1969 if (!NT_STATUS_IS_OK(status)) {
1973 if (DEBUGLEVEL >= 10) {
1974 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &r);
1977 if (NT_STATUS_IS_ERR(status)) {
1981 /* Return variables */
1985 *werror = r.out.result;
1988 return werror_to_ntstatus(r.out.result);
1991 NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
1992 TALLOC_CTX *mem_ctx,
1995 struct spoolss_CreatePrinterIC r;
2000 if (DEBUGLEVEL >= 10) {
2001 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r);
2004 status = cli->dispatch(cli,
2007 NDR_SPOOLSS_CREATEPRINTERIC,
2010 if (!NT_STATUS_IS_OK(status)) {
2014 if (DEBUGLEVEL >= 10) {
2015 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &r);
2018 if (NT_STATUS_IS_ERR(status)) {
2022 /* Return variables */
2026 *werror = r.out.result;
2029 return werror_to_ntstatus(r.out.result);
2032 NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
2033 TALLOC_CTX *mem_ctx,
2036 struct spoolss_PlayGDIScriptOnPrinterIC r;
2041 if (DEBUGLEVEL >= 10) {
2042 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2045 status = cli->dispatch(cli,
2048 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC,
2051 if (!NT_STATUS_IS_OK(status)) {
2055 if (DEBUGLEVEL >= 10) {
2056 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2059 if (NT_STATUS_IS_ERR(status)) {
2063 /* Return variables */
2067 *werror = r.out.result;
2070 return werror_to_ntstatus(r.out.result);
2073 NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
2074 TALLOC_CTX *mem_ctx,
2077 struct spoolss_DeletePrinterIC r;
2082 if (DEBUGLEVEL >= 10) {
2083 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r);
2086 status = cli->dispatch(cli,
2089 NDR_SPOOLSS_DELETEPRINTERIC,
2092 if (!NT_STATUS_IS_OK(status)) {
2096 if (DEBUGLEVEL >= 10) {
2097 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &r);
2100 if (NT_STATUS_IS_ERR(status)) {
2104 /* Return variables */
2108 *werror = r.out.result;
2111 return werror_to_ntstatus(r.out.result);
2114 NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
2115 TALLOC_CTX *mem_ctx,
2118 struct spoolss_AddPrinterConnection r;
2123 if (DEBUGLEVEL >= 10) {
2124 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &r);
2127 status = cli->dispatch(cli,
2130 NDR_SPOOLSS_ADDPRINTERCONNECTION,
2133 if (!NT_STATUS_IS_OK(status)) {
2137 if (DEBUGLEVEL >= 10) {
2138 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &r);
2141 if (NT_STATUS_IS_ERR(status)) {
2145 /* Return variables */
2149 *werror = r.out.result;
2152 return werror_to_ntstatus(r.out.result);
2155 NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
2156 TALLOC_CTX *mem_ctx,
2159 struct spoolss_DeletePrinterConnection r;
2164 if (DEBUGLEVEL >= 10) {
2165 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &r);
2168 status = cli->dispatch(cli,
2171 NDR_SPOOLSS_DELETEPRINTERCONNECTION,
2174 if (!NT_STATUS_IS_OK(status)) {
2178 if (DEBUGLEVEL >= 10) {
2179 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &r);
2182 if (NT_STATUS_IS_ERR(status)) {
2186 /* Return variables */
2190 *werror = r.out.result;
2193 return werror_to_ntstatus(r.out.result);
2196 NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
2197 TALLOC_CTX *mem_ctx,
2200 struct spoolss_PrinterMessageBox r;
2205 if (DEBUGLEVEL >= 10) {
2206 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &r);
2209 status = cli->dispatch(cli,
2212 NDR_SPOOLSS_PRINTERMESSAGEBOX,
2215 if (!NT_STATUS_IS_OK(status)) {
2219 if (DEBUGLEVEL >= 10) {
2220 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &r);
2223 if (NT_STATUS_IS_ERR(status)) {
2227 /* Return variables */
2231 *werror = r.out.result;
2234 return werror_to_ntstatus(r.out.result);
2237 NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
2238 TALLOC_CTX *mem_ctx,
2241 struct spoolss_AddMonitor r;
2246 if (DEBUGLEVEL >= 10) {
2247 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &r);
2250 status = cli->dispatch(cli,
2253 NDR_SPOOLSS_ADDMONITOR,
2256 if (!NT_STATUS_IS_OK(status)) {
2260 if (DEBUGLEVEL >= 10) {
2261 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &r);
2264 if (NT_STATUS_IS_ERR(status)) {
2268 /* Return variables */
2272 *werror = r.out.result;
2275 return werror_to_ntstatus(r.out.result);
2278 NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
2279 TALLOC_CTX *mem_ctx,
2282 struct spoolss_DeleteMonitor r;
2287 if (DEBUGLEVEL >= 10) {
2288 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &r);
2291 status = cli->dispatch(cli,
2294 NDR_SPOOLSS_DELETEMONITOR,
2297 if (!NT_STATUS_IS_OK(status)) {
2301 if (DEBUGLEVEL >= 10) {
2302 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &r);
2305 if (NT_STATUS_IS_ERR(status)) {
2309 /* Return variables */
2313 *werror = r.out.result;
2316 return werror_to_ntstatus(r.out.result);
2319 NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
2320 TALLOC_CTX *mem_ctx,
2323 struct spoolss_DeletePrintProcessor r;
2328 if (DEBUGLEVEL >= 10) {
2329 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &r);
2332 status = cli->dispatch(cli,
2335 NDR_SPOOLSS_DELETEPRINTPROCESSOR,
2338 if (!NT_STATUS_IS_OK(status)) {
2342 if (DEBUGLEVEL >= 10) {
2343 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &r);
2346 if (NT_STATUS_IS_ERR(status)) {
2350 /* Return variables */
2354 *werror = r.out.result;
2357 return werror_to_ntstatus(r.out.result);
2360 NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
2361 TALLOC_CTX *mem_ctx,
2364 struct spoolss_AddPrintProvidor r;
2369 if (DEBUGLEVEL >= 10) {
2370 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &r);
2373 status = cli->dispatch(cli,
2376 NDR_SPOOLSS_ADDPRINTPROVIDOR,
2379 if (!NT_STATUS_IS_OK(status)) {
2383 if (DEBUGLEVEL >= 10) {
2384 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &r);
2387 if (NT_STATUS_IS_ERR(status)) {
2391 /* Return variables */
2395 *werror = r.out.result;
2398 return werror_to_ntstatus(r.out.result);
2401 NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
2402 TALLOC_CTX *mem_ctx,
2405 struct spoolss_DeletePrintProvidor r;
2410 if (DEBUGLEVEL >= 10) {
2411 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &r);
2414 status = cli->dispatch(cli,
2417 NDR_SPOOLSS_DELETEPRINTPROVIDOR,
2420 if (!NT_STATUS_IS_OK(status)) {
2424 if (DEBUGLEVEL >= 10) {
2425 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &r);
2428 if (NT_STATUS_IS_ERR(status)) {
2432 /* Return variables */
2436 *werror = r.out.result;
2439 return werror_to_ntstatus(r.out.result);
2442 NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
2443 TALLOC_CTX *mem_ctx,
2444 const char *servername /* [in] [unique,charset(UTF16)] */,
2445 const char *print_processor_name /* [in] [unique,charset(UTF16)] */,
2446 uint32_t level /* [in] */,
2447 DATA_BLOB *buffer /* [in] [unique] */,
2448 uint32_t offered /* [in] */,
2449 uint32_t *count /* [out] [ref] */,
2450 union spoolss_PrintProcDataTypesInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
2451 uint32_t *needed /* [out] [ref] */,
2454 struct spoolss_EnumPrintProcDataTypes r;
2458 r.in.servername = servername;
2459 r.in.print_processor_name = print_processor_name;
2461 r.in.buffer = buffer;
2462 r.in.offered = offered;
2464 if (DEBUGLEVEL >= 10) {
2465 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2468 status = cli->dispatch(cli,
2471 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES,
2474 if (!NT_STATUS_IS_OK(status)) {
2478 if (DEBUGLEVEL >= 10) {
2479 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2482 if (NT_STATUS_IS_ERR(status)) {
2486 /* Return variables */
2487 *count = *r.out.count;
2488 *info = *r.out.info;
2489 *needed = *r.out.needed;
2493 *werror = r.out.result;
2496 return werror_to_ntstatus(r.out.result);
2499 NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
2500 TALLOC_CTX *mem_ctx,
2501 struct policy_handle *handle /* [in] [ref] */,
2502 const char *data_type /* [in] [unique,charset(UTF16)] */,
2503 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
2506 struct spoolss_ResetPrinter r;
2510 r.in.handle = handle;
2511 r.in.data_type = data_type;
2512 r.in.devmode_ctr = devmode_ctr;
2514 if (DEBUGLEVEL >= 10) {
2515 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &r);
2518 status = cli->dispatch(cli,
2521 NDR_SPOOLSS_RESETPRINTER,
2524 if (!NT_STATUS_IS_OK(status)) {
2528 if (DEBUGLEVEL >= 10) {
2529 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &r);
2532 if (NT_STATUS_IS_ERR(status)) {
2536 /* Return variables */
2540 *werror = r.out.result;
2543 return werror_to_ntstatus(r.out.result);
2546 NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
2547 TALLOC_CTX *mem_ctx,
2548 struct policy_handle *handle /* [in] [ref] */,
2549 const char *architecture /* [in] [unique,charset(UTF16)] */,
2550 uint32_t level /* [in] */,
2551 DATA_BLOB *buffer /* [in] [unique] */,
2552 uint32_t offered /* [in] */,
2553 uint32_t client_major_version /* [in] */,
2554 uint32_t client_minor_version /* [in] */,
2555 union spoolss_DriverInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
2556 uint32_t *needed /* [out] [ref] */,
2557 uint32_t *server_major_version /* [out] [ref] */,
2558 uint32_t *server_minor_version /* [out] [ref] */,
2561 struct spoolss_GetPrinterDriver2 r;
2565 r.in.handle = handle;
2566 r.in.architecture = architecture;
2568 r.in.buffer = buffer;
2569 r.in.offered = offered;
2570 r.in.client_major_version = client_major_version;
2571 r.in.client_minor_version = client_minor_version;
2573 if (DEBUGLEVEL >= 10) {
2574 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &r);
2577 status = cli->dispatch(cli,
2580 NDR_SPOOLSS_GETPRINTERDRIVER2,
2583 if (!NT_STATUS_IS_OK(status)) {
2587 if (DEBUGLEVEL >= 10) {
2588 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &r);
2591 if (NT_STATUS_IS_ERR(status)) {
2595 /* Return variables */
2596 if (info && r.out.info) {
2597 *info = *r.out.info;
2599 *needed = *r.out.needed;
2600 *server_major_version = *r.out.server_major_version;
2601 *server_minor_version = *r.out.server_minor_version;
2605 *werror = r.out.result;
2608 return werror_to_ntstatus(r.out.result);
2611 NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2612 TALLOC_CTX *mem_ctx,
2615 struct spoolss_FindFirstPrinterChangeNotification r;
2620 if (DEBUGLEVEL >= 10) {
2621 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2624 status = cli->dispatch(cli,
2627 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION,
2630 if (!NT_STATUS_IS_OK(status)) {
2634 if (DEBUGLEVEL >= 10) {
2635 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2638 if (NT_STATUS_IS_ERR(status)) {
2642 /* Return variables */
2646 *werror = r.out.result;
2649 return werror_to_ntstatus(r.out.result);
2652 NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
2653 TALLOC_CTX *mem_ctx,
2656 struct spoolss_FindNextPrinterChangeNotification r;
2661 if (DEBUGLEVEL >= 10) {
2662 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2665 status = cli->dispatch(cli,
2668 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION,
2671 if (!NT_STATUS_IS_OK(status)) {
2675 if (DEBUGLEVEL >= 10) {
2676 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2679 if (NT_STATUS_IS_ERR(status)) {
2683 /* Return variables */
2687 *werror = r.out.result;
2690 return werror_to_ntstatus(r.out.result);
2693 NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
2694 TALLOC_CTX *mem_ctx,
2695 struct policy_handle *handle /* [in] [ref] */,
2698 struct spoolss_FindClosePrinterNotify r;
2702 r.in.handle = handle;
2704 if (DEBUGLEVEL >= 10) {
2705 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &r);
2708 status = cli->dispatch(cli,
2711 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY,
2714 if (!NT_STATUS_IS_OK(status)) {
2718 if (DEBUGLEVEL >= 10) {
2719 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &r);
2722 if (NT_STATUS_IS_ERR(status)) {
2726 /* Return variables */
2730 *werror = r.out.result;
2733 return werror_to_ntstatus(r.out.result);
2736 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
2737 TALLOC_CTX *mem_ctx,
2740 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r;
2745 if (DEBUGLEVEL >= 10) {
2746 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2749 status = cli->dispatch(cli,
2752 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD,
2755 if (!NT_STATUS_IS_OK(status)) {
2759 if (DEBUGLEVEL >= 10) {
2760 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2763 if (NT_STATUS_IS_ERR(status)) {
2767 /* Return variables */
2771 *werror = r.out.result;
2774 return werror_to_ntstatus(r.out.result);
2777 NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
2778 TALLOC_CTX *mem_ctx,
2779 const char *server_name /* [in] [charset(UTF16)] */,
2780 uint32_t printer_local /* [in] */,
2781 enum winreg_Type type /* [in] */,
2782 uint32_t bufsize /* [in] [range(0,512)] */,
2783 uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2784 struct policy_handle *handle /* [out] [ref] */,
2787 struct spoolss_ReplyOpenPrinter r;
2791 r.in.server_name = server_name;
2792 r.in.printer_local = printer_local;
2794 r.in.bufsize = bufsize;
2795 r.in.buffer = buffer;
2797 if (DEBUGLEVEL >= 10) {
2798 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
2801 status = cli->dispatch(cli,
2804 NDR_SPOOLSS_REPLYOPENPRINTER,
2807 if (!NT_STATUS_IS_OK(status)) {
2811 if (DEBUGLEVEL >= 10) {
2812 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &r);
2815 if (NT_STATUS_IS_ERR(status)) {
2819 /* Return variables */
2820 *handle = *r.out.handle;
2824 *werror = r.out.result;
2827 return werror_to_ntstatus(r.out.result);
2830 NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
2831 TALLOC_CTX *mem_ctx,
2832 struct policy_handle *handle /* [in] [ref] */,
2833 uint32_t flags /* [in] */,
2834 uint32_t bufsize /* [in] [range(0,512)] */,
2835 uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2838 struct spoolss_RouterReplyPrinter r;
2842 r.in.handle = handle;
2844 r.in.bufsize = bufsize;
2845 r.in.buffer = buffer;
2847 if (DEBUGLEVEL >= 10) {
2848 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &r);
2851 status = cli->dispatch(cli,
2854 NDR_SPOOLSS_ROUTERREPLYPRINTER,
2857 if (!NT_STATUS_IS_OK(status)) {
2861 if (DEBUGLEVEL >= 10) {
2862 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &r);
2865 if (NT_STATUS_IS_ERR(status)) {
2869 /* Return variables */
2873 *werror = r.out.result;
2876 return werror_to_ntstatus(r.out.result);
2879 NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
2880 TALLOC_CTX *mem_ctx,
2881 struct policy_handle *handle /* [in,out] [ref] */,
2884 struct spoolss_ReplyClosePrinter r;
2888 r.in.handle = handle;
2890 if (DEBUGLEVEL >= 10) {
2891 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &r);
2894 status = cli->dispatch(cli,
2897 NDR_SPOOLSS_REPLYCLOSEPRINTER,
2900 if (!NT_STATUS_IS_OK(status)) {
2904 if (DEBUGLEVEL >= 10) {
2905 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &r);
2908 if (NT_STATUS_IS_ERR(status)) {
2912 /* Return variables */
2913 *handle = *r.out.handle;
2917 *werror = r.out.result;
2920 return werror_to_ntstatus(r.out.result);
2923 NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
2924 TALLOC_CTX *mem_ctx,
2927 struct spoolss_AddPortEx r;
2932 if (DEBUGLEVEL >= 10) {
2933 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &r);
2936 status = cli->dispatch(cli,
2939 NDR_SPOOLSS_ADDPORTEX,
2942 if (!NT_STATUS_IS_OK(status)) {
2946 if (DEBUGLEVEL >= 10) {
2947 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &r);
2950 if (NT_STATUS_IS_ERR(status)) {
2954 /* Return variables */
2958 *werror = r.out.result;
2961 return werror_to_ntstatus(r.out.result);
2964 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2965 TALLOC_CTX *mem_ctx,
2968 struct spoolss_RouterFindFirstPrinterChangeNotification r;
2973 if (DEBUGLEVEL >= 10) {
2974 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2977 status = cli->dispatch(cli,
2980 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION,
2983 if (!NT_STATUS_IS_OK(status)) {
2987 if (DEBUGLEVEL >= 10) {
2988 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2991 if (NT_STATUS_IS_ERR(status)) {
2995 /* Return variables */
2999 *werror = r.out.result;
3002 return werror_to_ntstatus(r.out.result);
3005 NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
3006 TALLOC_CTX *mem_ctx,
3009 struct spoolss_SpoolerInit r;
3014 if (DEBUGLEVEL >= 10) {
3015 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &r);
3018 status = cli->dispatch(cli,
3021 NDR_SPOOLSS_SPOOLERINIT,
3024 if (!NT_STATUS_IS_OK(status)) {
3028 if (DEBUGLEVEL >= 10) {
3029 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &r);
3032 if (NT_STATUS_IS_ERR(status)) {
3036 /* Return variables */
3040 *werror = r.out.result;
3043 return werror_to_ntstatus(r.out.result);
3046 NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
3047 TALLOC_CTX *mem_ctx,
3050 struct spoolss_ResetPrinterEx r;
3055 if (DEBUGLEVEL >= 10) {
3056 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &r);
3059 status = cli->dispatch(cli,
3062 NDR_SPOOLSS_RESETPRINTEREX,
3065 if (!NT_STATUS_IS_OK(status)) {
3069 if (DEBUGLEVEL >= 10) {
3070 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &r);
3073 if (NT_STATUS_IS_ERR(status)) {
3077 /* Return variables */
3081 *werror = r.out.result;
3084 return werror_to_ntstatus(r.out.result);
3087 NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
3088 TALLOC_CTX *mem_ctx,
3089 struct policy_handle *handle /* [in] [ref] */,
3090 uint32_t flags /* [in] */,
3091 uint32_t options /* [in] */,
3092 const char *local_machine /* [in] [unique,charset(UTF16)] */,
3093 uint32_t printer_local /* [in] */,
3094 struct spoolss_NotifyOption *notify_options /* [in] [unique] */,
3097 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r;
3101 r.in.handle = handle;
3103 r.in.options = options;
3104 r.in.local_machine = local_machine;
3105 r.in.printer_local = printer_local;
3106 r.in.notify_options = notify_options;
3108 if (DEBUGLEVEL >= 10) {
3109 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3112 status = cli->dispatch(cli,
3115 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX,
3118 if (!NT_STATUS_IS_OK(status)) {
3122 if (DEBUGLEVEL >= 10) {
3123 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3126 if (NT_STATUS_IS_ERR(status)) {
3130 /* Return variables */
3134 *werror = r.out.result;
3137 return werror_to_ntstatus(r.out.result);
3140 NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli,
3141 TALLOC_CTX *mem_ctx,
3142 struct policy_handle *handle /* [in] [ref] */,
3143 uint32_t color /* [in] */,
3144 uint32_t flags /* [in] */,
3145 uint32_t *reply_result /* [out] [ref] */,
3146 uint32_t reply_type /* [in] */,
3147 union spoolss_ReplyPrinterInfo info /* [in] [switch_is(reply_type)] */,
3150 struct spoolss_RouterReplyPrinterEx r;
3154 r.in.handle = handle;
3157 r.in.reply_type = reply_type;
3160 if (DEBUGLEVEL >= 10) {
3161 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3164 status = cli->dispatch(cli,
3167 NDR_SPOOLSS_ROUTERREPLYPRINTEREX,
3170 if (!NT_STATUS_IS_OK(status)) {
3174 if (DEBUGLEVEL >= 10) {
3175 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3178 if (NT_STATUS_IS_ERR(status)) {
3182 /* Return variables */
3183 *reply_result = *r.out.reply_result;
3187 *werror = r.out.result;
3190 return werror_to_ntstatus(r.out.result);
3193 NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli,
3194 TALLOC_CTX *mem_ctx,
3195 struct policy_handle *handle /* [in] [ref] */,
3196 uint32_t change_low /* [in] */,
3197 struct spoolss_NotifyOption *options /* [in] [unique] */,
3198 struct spoolss_NotifyInfo **info /* [out] [ref] */,
3201 struct spoolss_RouterRefreshPrinterChangeNotify r;
3205 r.in.handle = handle;
3206 r.in.change_low = change_low;
3207 r.in.options = options;
3209 if (DEBUGLEVEL >= 10) {
3210 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3213 status = cli->dispatch(cli,
3216 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY,
3219 if (!NT_STATUS_IS_OK(status)) {
3223 if (DEBUGLEVEL >= 10) {
3224 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3227 if (NT_STATUS_IS_ERR(status)) {
3231 /* Return variables */
3232 *info = *r.out.info;
3236 *werror = r.out.result;
3239 return werror_to_ntstatus(r.out.result);
3242 NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
3243 TALLOC_CTX *mem_ctx,
3246 struct spoolss_44 r;
3251 if (DEBUGLEVEL >= 10) {
3252 NDR_PRINT_IN_DEBUG(spoolss_44, &r);
3255 status = cli->dispatch(cli,
3261 if (!NT_STATUS_IS_OK(status)) {
3265 if (DEBUGLEVEL >= 10) {
3266 NDR_PRINT_OUT_DEBUG(spoolss_44, &r);
3269 if (NT_STATUS_IS_ERR(status)) {
3273 /* Return variables */
3277 *werror = r.out.result;
3280 return werror_to_ntstatus(r.out.result);
3283 NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
3284 TALLOC_CTX *mem_ctx,
3285 const char *printername /* [in] [unique,charset(UTF16)] */,
3286 const char *datatype /* [in] [unique,charset(UTF16)] */,
3287 struct spoolss_DevmodeContainer devmode_ctr /* [in] */,
3288 uint32_t access_mask /* [in] */,
3289 uint32_t level /* [in] */,
3290 union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */,
3291 struct policy_handle *handle /* [out] [ref] */,
3294 struct spoolss_OpenPrinterEx r;
3298 r.in.printername = printername;
3299 r.in.datatype = datatype;
3300 r.in.devmode_ctr = devmode_ctr;
3301 r.in.access_mask = access_mask;
3303 r.in.userlevel = userlevel;
3305 if (DEBUGLEVEL >= 10) {
3306 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &r);
3309 status = cli->dispatch(cli,
3312 NDR_SPOOLSS_OPENPRINTEREX,
3315 if (!NT_STATUS_IS_OK(status)) {
3319 if (DEBUGLEVEL >= 10) {
3320 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &r);
3323 if (NT_STATUS_IS_ERR(status)) {
3327 /* Return variables */
3328 *handle = *r.out.handle;
3332 *werror = r.out.result;
3335 return werror_to_ntstatus(r.out.result);
3338 NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
3339 TALLOC_CTX *mem_ctx,
3340 const char *server /* [in] [unique,charset(UTF16)] */,
3341 struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
3342 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
3343 struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
3344 struct spoolss_UserLevelCtr *userlevel_ctr /* [in] [ref] */,
3345 struct policy_handle *handle /* [out] [ref] */,
3348 struct spoolss_AddPrinterEx r;
3352 r.in.server = server;
3353 r.in.info_ctr = info_ctr;
3354 r.in.devmode_ctr = devmode_ctr;
3355 r.in.secdesc_ctr = secdesc_ctr;
3356 r.in.userlevel_ctr = userlevel_ctr;
3358 if (DEBUGLEVEL >= 10) {
3359 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &r);
3362 status = cli->dispatch(cli,
3365 NDR_SPOOLSS_ADDPRINTEREX,
3368 if (!NT_STATUS_IS_OK(status)) {
3372 if (DEBUGLEVEL >= 10) {
3373 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &r);
3376 if (NT_STATUS_IS_ERR(status)) {
3380 /* Return variables */
3381 *handle = *r.out.handle;
3385 *werror = r.out.result;
3388 return werror_to_ntstatus(r.out.result);
3391 NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
3392 TALLOC_CTX *mem_ctx,
3395 struct spoolss_47 r;
3400 if (DEBUGLEVEL >= 10) {
3401 NDR_PRINT_IN_DEBUG(spoolss_47, &r);
3404 status = cli->dispatch(cli,
3410 if (!NT_STATUS_IS_OK(status)) {
3414 if (DEBUGLEVEL >= 10) {
3415 NDR_PRINT_OUT_DEBUG(spoolss_47, &r);
3418 if (NT_STATUS_IS_ERR(status)) {
3422 /* Return variables */
3426 *werror = r.out.result;
3429 return werror_to_ntstatus(r.out.result);
3432 NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
3433 TALLOC_CTX *mem_ctx,
3434 struct policy_handle *handle /* [in] [ref] */,
3435 uint32_t enum_index /* [in] */,
3436 const char *value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */,
3437 uint32_t value_offered /* [in] */,
3438 uint32_t *value_needed /* [out] [ref] */,
3439 enum winreg_Type *type /* [out] [ref] */,
3440 uint8_t *data /* [out] [ref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(data_offered)] */,
3441 uint32_t data_offered /* [in] */,
3442 uint32_t *data_needed /* [out] [ref] */,
3445 struct spoolss_EnumPrinterData r;
3449 r.in.handle = handle;
3450 r.in.enum_index = enum_index;
3451 r.in.value_offered = value_offered;
3452 r.in.data_offered = data_offered;
3454 if (DEBUGLEVEL >= 10) {
3455 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &r);
3458 status = cli->dispatch(cli,
3461 NDR_SPOOLSS_ENUMPRINTERDATA,
3464 if (!NT_STATUS_IS_OK(status)) {
3468 if (DEBUGLEVEL >= 10) {
3469 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &r);
3472 if (NT_STATUS_IS_ERR(status)) {
3476 /* Return variables */
3477 memcpy(CONST_DISCARD(char *, value_name), r.out.value_name, r.in.value_offered / 2 * sizeof(*value_name));
3478 *value_needed = *r.out.value_needed;
3479 *type = *r.out.type;
3480 memcpy(data, r.out.data, r.in.data_offered * sizeof(*data));
3481 *data_needed = *r.out.data_needed;
3485 *werror = r.out.result;
3488 return werror_to_ntstatus(r.out.result);
3491 NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
3492 TALLOC_CTX *mem_ctx,
3493 struct policy_handle *handle /* [in] [ref] */,
3494 const char *value_name /* [in] [charset(UTF16)] */,
3497 struct spoolss_DeletePrinterData r;
3501 r.in.handle = handle;
3502 r.in.value_name = value_name;
3504 if (DEBUGLEVEL >= 10) {
3505 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &r);
3508 status = cli->dispatch(cli,
3511 NDR_SPOOLSS_DELETEPRINTERDATA,
3514 if (!NT_STATUS_IS_OK(status)) {
3518 if (DEBUGLEVEL >= 10) {
3519 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &r);
3522 if (NT_STATUS_IS_ERR(status)) {
3526 /* Return variables */
3530 *werror = r.out.result;
3533 return werror_to_ntstatus(r.out.result);
3536 NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
3537 TALLOC_CTX *mem_ctx,
3540 struct spoolss_4a r;
3545 if (DEBUGLEVEL >= 10) {
3546 NDR_PRINT_IN_DEBUG(spoolss_4a, &r);
3549 status = cli->dispatch(cli,
3555 if (!NT_STATUS_IS_OK(status)) {
3559 if (DEBUGLEVEL >= 10) {
3560 NDR_PRINT_OUT_DEBUG(spoolss_4a, &r);
3563 if (NT_STATUS_IS_ERR(status)) {
3567 /* Return variables */
3571 *werror = r.out.result;
3574 return werror_to_ntstatus(r.out.result);
3577 NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
3578 TALLOC_CTX *mem_ctx,
3581 struct spoolss_4b r;
3586 if (DEBUGLEVEL >= 10) {
3587 NDR_PRINT_IN_DEBUG(spoolss_4b, &r);
3590 status = cli->dispatch(cli,
3596 if (!NT_STATUS_IS_OK(status)) {
3600 if (DEBUGLEVEL >= 10) {
3601 NDR_PRINT_OUT_DEBUG(spoolss_4b, &r);
3604 if (NT_STATUS_IS_ERR(status)) {
3608 /* Return variables */
3612 *werror = r.out.result;
3615 return werror_to_ntstatus(r.out.result);
3618 NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
3619 TALLOC_CTX *mem_ctx,
3622 struct spoolss_4c r;
3627 if (DEBUGLEVEL >= 10) {
3628 NDR_PRINT_IN_DEBUG(spoolss_4c, &r);
3631 status = cli->dispatch(cli,
3637 if (!NT_STATUS_IS_OK(status)) {
3641 if (DEBUGLEVEL >= 10) {
3642 NDR_PRINT_OUT_DEBUG(spoolss_4c, &r);
3645 if (NT_STATUS_IS_ERR(status)) {
3649 /* Return variables */
3653 *werror = r.out.result;
3656 return werror_to_ntstatus(r.out.result);
3659 NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
3660 TALLOC_CTX *mem_ctx,
3661 struct policy_handle *handle /* [in] [ref] */,
3662 const char *key_name /* [in] [charset(UTF16)] */,
3663 const char *value_name /* [in] [charset(UTF16)] */,
3664 enum winreg_Type type /* [in] */,
3665 uint8_t *buffer /* [in] [ref,size_is(offered)] */,
3666 uint32_t offered /* [in] */,
3669 struct spoolss_SetPrinterDataEx r;
3673 r.in.handle = handle;
3674 r.in.key_name = key_name;
3675 r.in.value_name = value_name;
3677 r.in.buffer = buffer;
3678 r.in.offered = offered;
3680 if (DEBUGLEVEL >= 10) {
3681 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &r);
3684 status = cli->dispatch(cli,
3687 NDR_SPOOLSS_SETPRINTERDATAEX,
3690 if (!NT_STATUS_IS_OK(status)) {
3694 if (DEBUGLEVEL >= 10) {
3695 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &r);
3698 if (NT_STATUS_IS_ERR(status)) {
3702 /* Return variables */
3706 *werror = r.out.result;
3709 return werror_to_ntstatus(r.out.result);
3712 NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
3713 TALLOC_CTX *mem_ctx,
3714 struct policy_handle *handle /* [in] [ref] */,
3715 const char *key_name /* [in] [charset(UTF16)] */,
3716 const char *value_name /* [in] [charset(UTF16)] */,
3717 enum winreg_Type *type /* [out] [ref] */,
3718 uint8_t *buffer /* [out] [ref,size_is(offered)] */,
3719 uint32_t offered /* [in] */,
3720 uint32_t *needed /* [out] [ref] */,
3723 struct spoolss_GetPrinterDataEx r;
3727 r.in.handle = handle;
3728 r.in.key_name = key_name;
3729 r.in.value_name = value_name;
3730 r.in.offered = offered;
3732 if (DEBUGLEVEL >= 10) {
3733 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &r);
3736 status = cli->dispatch(cli,
3739 NDR_SPOOLSS_GETPRINTERDATAEX,
3742 if (!NT_STATUS_IS_OK(status)) {
3746 if (DEBUGLEVEL >= 10) {
3747 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &r);
3750 if (NT_STATUS_IS_ERR(status)) {
3754 /* Return variables */
3755 *type = *r.out.type;
3756 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3757 *needed = *r.out.needed;
3761 *werror = r.out.result;
3764 return werror_to_ntstatus(r.out.result);
3767 NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
3768 TALLOC_CTX *mem_ctx,
3769 struct policy_handle *handle /* [in] [ref] */,
3770 const char *key_name /* [in] [charset(UTF16)] */,
3771 uint32_t offered /* [in] */,
3772 uint32_t *count /* [out] [ref] */,
3773 struct spoolss_PrinterEnumValues **info /* [out] [ref,size_is(,*count)] */,
3774 uint32_t *needed /* [out] [ref] */,
3777 struct spoolss_EnumPrinterDataEx r;
3781 r.in.handle = handle;
3782 r.in.key_name = key_name;
3783 r.in.offered = offered;
3785 if (DEBUGLEVEL >= 10) {
3786 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &r);
3789 status = cli->dispatch(cli,
3792 NDR_SPOOLSS_ENUMPRINTERDATAEX,
3795 if (!NT_STATUS_IS_OK(status)) {
3799 if (DEBUGLEVEL >= 10) {
3800 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &r);
3803 if (NT_STATUS_IS_ERR(status)) {
3807 /* Return variables */
3808 *count = *r.out.count;
3809 *info = *r.out.info;
3810 *needed = *r.out.needed;
3814 *werror = r.out.result;
3817 return werror_to_ntstatus(r.out.result);
3820 NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
3821 TALLOC_CTX *mem_ctx,
3822 struct policy_handle *handle /* [in] [ref] */,
3823 const char *key_name /* [in] [charset(UTF16)] */,
3824 const char ** *key_buffer /* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
3825 uint32_t offered /* [in] */,
3826 uint32_t *needed /* [out] [ref] */,
3829 struct spoolss_EnumPrinterKey r;
3833 r.in.handle = handle;
3834 r.in.key_name = key_name;
3835 r.in.offered = offered;
3837 if (DEBUGLEVEL >= 10) {
3838 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &r);
3841 status = cli->dispatch(cli,
3844 NDR_SPOOLSS_ENUMPRINTERKEY,
3847 if (!NT_STATUS_IS_OK(status)) {
3851 if (DEBUGLEVEL >= 10) {
3852 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &r);
3855 if (NT_STATUS_IS_ERR(status)) {
3859 /* Return variables */
3860 *key_buffer = *r.out.key_buffer;
3861 *needed = *r.out.needed;
3865 *werror = r.out.result;
3868 return werror_to_ntstatus(r.out.result);
3871 NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli,
3872 TALLOC_CTX *mem_ctx,
3873 struct policy_handle *handle /* [in] [ref] */,
3874 const char *key_name /* [in] [charset(UTF16)] */,
3875 const char *value_name /* [in] [charset(UTF16)] */,
3878 struct spoolss_DeletePrinterDataEx r;
3882 r.in.handle = handle;
3883 r.in.key_name = key_name;
3884 r.in.value_name = value_name;
3886 if (DEBUGLEVEL >= 10) {
3887 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &r);
3890 status = cli->dispatch(cli,
3893 NDR_SPOOLSS_DELETEPRINTERDATAEX,
3896 if (!NT_STATUS_IS_OK(status)) {
3900 if (DEBUGLEVEL >= 10) {
3901 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &r);
3904 if (NT_STATUS_IS_ERR(status)) {
3908 /* Return variables */
3912 *werror = r.out.result;
3915 return werror_to_ntstatus(r.out.result);
3918 NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
3919 TALLOC_CTX *mem_ctx,
3920 struct policy_handle *handle /* [in] [ref] */,
3921 const char *key_name /* [in] [charset(UTF16)] */,
3924 struct spoolss_DeletePrinterKey r;
3928 r.in.handle = handle;
3929 r.in.key_name = key_name;
3931 if (DEBUGLEVEL >= 10) {
3932 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &r);
3935 status = cli->dispatch(cli,
3938 NDR_SPOOLSS_DELETEPRINTERKEY,
3941 if (!NT_STATUS_IS_OK(status)) {
3945 if (DEBUGLEVEL >= 10) {
3946 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &r);
3949 if (NT_STATUS_IS_ERR(status)) {
3953 /* Return variables */
3957 *werror = r.out.result;
3960 return werror_to_ntstatus(r.out.result);
3963 NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
3964 TALLOC_CTX *mem_ctx,
3967 struct spoolss_53 r;
3972 if (DEBUGLEVEL >= 10) {
3973 NDR_PRINT_IN_DEBUG(spoolss_53, &r);
3976 status = cli->dispatch(cli,
3982 if (!NT_STATUS_IS_OK(status)) {
3986 if (DEBUGLEVEL >= 10) {
3987 NDR_PRINT_OUT_DEBUG(spoolss_53, &r);
3990 if (NT_STATUS_IS_ERR(status)) {
3994 /* Return variables */
3998 *werror = r.out.result;
4001 return werror_to_ntstatus(r.out.result);
4004 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
4005 TALLOC_CTX *mem_ctx,
4006 const char *server /* [in] [unique,charset(UTF16)] */,
4007 const char *architecture /* [in] [charset(UTF16)] */,
4008 const char *driver /* [in] [charset(UTF16)] */,
4009 uint32_t delete_flags /* [in] */,
4010 uint32_t version /* [in] */,
4013 struct spoolss_DeletePrinterDriverEx r;
4017 r.in.server = server;
4018 r.in.architecture = architecture;
4019 r.in.driver = driver;
4020 r.in.delete_flags = delete_flags;
4021 r.in.version = version;
4023 if (DEBUGLEVEL >= 10) {
4024 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4027 status = cli->dispatch(cli,
4030 NDR_SPOOLSS_DELETEPRINTERDRIVEREX,
4033 if (!NT_STATUS_IS_OK(status)) {
4037 if (DEBUGLEVEL >= 10) {
4038 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4041 if (NT_STATUS_IS_ERR(status)) {
4045 /* Return variables */
4049 *werror = r.out.result;
4052 return werror_to_ntstatus(r.out.result);
4055 NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
4056 TALLOC_CTX *mem_ctx,
4059 struct spoolss_55 r;
4064 if (DEBUGLEVEL >= 10) {
4065 NDR_PRINT_IN_DEBUG(spoolss_55, &r);
4068 status = cli->dispatch(cli,
4074 if (!NT_STATUS_IS_OK(status)) {
4078 if (DEBUGLEVEL >= 10) {
4079 NDR_PRINT_OUT_DEBUG(spoolss_55, &r);
4082 if (NT_STATUS_IS_ERR(status)) {
4086 /* Return variables */
4090 *werror = r.out.result;
4093 return werror_to_ntstatus(r.out.result);
4096 NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
4097 TALLOC_CTX *mem_ctx,
4100 struct spoolss_56 r;
4105 if (DEBUGLEVEL >= 10) {
4106 NDR_PRINT_IN_DEBUG(spoolss_56, &r);
4109 status = cli->dispatch(cli,
4115 if (!NT_STATUS_IS_OK(status)) {
4119 if (DEBUGLEVEL >= 10) {
4120 NDR_PRINT_OUT_DEBUG(spoolss_56, &r);
4123 if (NT_STATUS_IS_ERR(status)) {
4127 /* Return variables */
4131 *werror = r.out.result;
4134 return werror_to_ntstatus(r.out.result);
4137 NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
4138 TALLOC_CTX *mem_ctx,
4141 struct spoolss_57 r;
4146 if (DEBUGLEVEL >= 10) {
4147 NDR_PRINT_IN_DEBUG(spoolss_57, &r);
4150 status = cli->dispatch(cli,
4156 if (!NT_STATUS_IS_OK(status)) {
4160 if (DEBUGLEVEL >= 10) {
4161 NDR_PRINT_OUT_DEBUG(spoolss_57, &r);
4164 if (NT_STATUS_IS_ERR(status)) {
4168 /* Return variables */
4172 *werror = r.out.result;
4175 return werror_to_ntstatus(r.out.result);
4178 NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
4179 TALLOC_CTX *mem_ctx,
4180 struct policy_handle *handle /* [in] [ref] */,
4181 const char *function_name /* [in] [charset(UTF16)] */,
4182 DATA_BLOB in_data /* [in] */,
4183 uint32_t _in_data_length /* [in] [value(r->in.in_data.length)] */,
4184 uint8_t *out_data /* [out] [ref,size_is(out_data_size)] */,
4185 uint32_t out_data_size /* [in] */,
4186 uint32_t *needed /* [out] [ref] */,
4187 uint32_t *status_code /* [in,out] [ref] */,
4190 struct spoolss_XcvData r;
4194 r.in.handle = handle;
4195 r.in.function_name = function_name;
4196 r.in.in_data = in_data;
4197 r.in._in_data_length = _in_data_length;
4198 r.in.out_data_size = out_data_size;
4199 r.in.status_code = status_code;
4201 if (DEBUGLEVEL >= 10) {
4202 NDR_PRINT_IN_DEBUG(spoolss_XcvData, &r);
4205 status = cli->dispatch(cli,
4208 NDR_SPOOLSS_XCVDATA,
4211 if (!NT_STATUS_IS_OK(status)) {
4215 if (DEBUGLEVEL >= 10) {
4216 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &r);
4219 if (NT_STATUS_IS_ERR(status)) {
4223 /* Return variables */
4224 memcpy(out_data, r.out.out_data, r.in.out_data_size * sizeof(*out_data));
4225 *needed = *r.out.needed;
4226 *status_code = *r.out.status_code;
4230 *werror = r.out.result;
4233 return werror_to_ntstatus(r.out.result);
4236 NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
4237 TALLOC_CTX *mem_ctx,
4238 const char *servername /* [in] [unique,charset(UTF16)] */,
4239 struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
4240 uint32_t flags /* [in] */,
4243 struct spoolss_AddPrinterDriverEx r;
4247 r.in.servername = servername;
4248 r.in.info_ctr = info_ctr;
4251 if (DEBUGLEVEL >= 10) {
4252 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &r);
4255 status = cli->dispatch(cli,
4258 NDR_SPOOLSS_ADDPRINTERDRIVEREX,
4261 if (!NT_STATUS_IS_OK(status)) {
4265 if (DEBUGLEVEL >= 10) {
4266 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &r);
4269 if (NT_STATUS_IS_ERR(status)) {
4273 /* Return variables */
4277 *werror = r.out.result;
4280 return werror_to_ntstatus(r.out.result);
4283 NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
4284 TALLOC_CTX *mem_ctx,
4287 struct spoolss_5a r;
4292 if (DEBUGLEVEL >= 10) {
4293 NDR_PRINT_IN_DEBUG(spoolss_5a, &r);
4296 status = cli->dispatch(cli,
4302 if (!NT_STATUS_IS_OK(status)) {
4306 if (DEBUGLEVEL >= 10) {
4307 NDR_PRINT_OUT_DEBUG(spoolss_5a, &r);
4310 if (NT_STATUS_IS_ERR(status)) {
4314 /* Return variables */
4318 *werror = r.out.result;
4321 return werror_to_ntstatus(r.out.result);
4324 NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
4325 TALLOC_CTX *mem_ctx,
4328 struct spoolss_5b r;
4333 if (DEBUGLEVEL >= 10) {
4334 NDR_PRINT_IN_DEBUG(spoolss_5b, &r);
4337 status = cli->dispatch(cli,
4343 if (!NT_STATUS_IS_OK(status)) {
4347 if (DEBUGLEVEL >= 10) {
4348 NDR_PRINT_OUT_DEBUG(spoolss_5b, &r);
4351 if (NT_STATUS_IS_ERR(status)) {
4355 /* Return variables */
4359 *werror = r.out.result;
4362 return werror_to_ntstatus(r.out.result);
4365 NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
4366 TALLOC_CTX *mem_ctx,
4369 struct spoolss_5c r;
4374 if (DEBUGLEVEL >= 10) {
4375 NDR_PRINT_IN_DEBUG(spoolss_5c, &r);
4378 status = cli->dispatch(cli,
4384 if (!NT_STATUS_IS_OK(status)) {
4388 if (DEBUGLEVEL >= 10) {
4389 NDR_PRINT_OUT_DEBUG(spoolss_5c, &r);
4392 if (NT_STATUS_IS_ERR(status)) {
4396 /* Return variables */
4400 *werror = r.out.result;
4403 return werror_to_ntstatus(r.out.result);
4406 NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
4407 TALLOC_CTX *mem_ctx,
4410 struct spoolss_5d r;
4415 if (DEBUGLEVEL >= 10) {
4416 NDR_PRINT_IN_DEBUG(spoolss_5d, &r);
4419 status = cli->dispatch(cli,
4425 if (!NT_STATUS_IS_OK(status)) {
4429 if (DEBUGLEVEL >= 10) {
4430 NDR_PRINT_OUT_DEBUG(spoolss_5d, &r);
4433 if (NT_STATUS_IS_ERR(status)) {
4437 /* Return variables */
4441 *werror = r.out.result;
4444 return werror_to_ntstatus(r.out.result);
4447 NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
4448 TALLOC_CTX *mem_ctx,
4451 struct spoolss_5e r;
4456 if (DEBUGLEVEL >= 10) {
4457 NDR_PRINT_IN_DEBUG(spoolss_5e, &r);
4460 status = cli->dispatch(cli,
4466 if (!NT_STATUS_IS_OK(status)) {
4470 if (DEBUGLEVEL >= 10) {
4471 NDR_PRINT_OUT_DEBUG(spoolss_5e, &r);
4474 if (NT_STATUS_IS_ERR(status)) {
4478 /* Return variables */
4482 *werror = r.out.result;
4485 return werror_to_ntstatus(r.out.result);
4488 NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
4489 TALLOC_CTX *mem_ctx,
4492 struct spoolss_5f r;
4497 if (DEBUGLEVEL >= 10) {
4498 NDR_PRINT_IN_DEBUG(spoolss_5f, &r);
4501 status = cli->dispatch(cli,
4507 if (!NT_STATUS_IS_OK(status)) {
4511 if (DEBUGLEVEL >= 10) {
4512 NDR_PRINT_OUT_DEBUG(spoolss_5f, &r);
4515 if (NT_STATUS_IS_ERR(status)) {
4519 /* Return variables */
4523 *werror = r.out.result;
4526 return werror_to_ntstatus(r.out.result);