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,
286 struct spoolss_AddPrinter r;
291 if (DEBUGLEVEL >= 10) {
292 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, &r);
295 status = cli->dispatch(cli,
298 NDR_SPOOLSS_ADDPRINTER,
301 if (!NT_STATUS_IS_OK(status)) {
305 if (DEBUGLEVEL >= 10) {
306 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, &r);
309 if (NT_STATUS_IS_ERR(status)) {
313 /* Return variables */
317 *werror = r.out.result;
320 return werror_to_ntstatus(r.out.result);
323 NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli,
325 struct policy_handle *handle /* [in] [ref] */,
328 struct spoolss_DeletePrinter r;
332 r.in.handle = handle;
334 if (DEBUGLEVEL >= 10) {
335 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, &r);
338 status = cli->dispatch(cli,
341 NDR_SPOOLSS_DELETEPRINTER,
344 if (!NT_STATUS_IS_OK(status)) {
348 if (DEBUGLEVEL >= 10) {
349 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, &r);
352 if (NT_STATUS_IS_ERR(status)) {
356 /* Return variables */
360 *werror = r.out.result;
363 return werror_to_ntstatus(r.out.result);
366 NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli,
368 struct policy_handle *handle /* [in] [ref] */,
369 struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
370 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
371 struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
372 enum spoolss_PrinterControl command /* [in] */,
375 struct spoolss_SetPrinter r;
379 r.in.handle = handle;
380 r.in.info_ctr = info_ctr;
381 r.in.devmode_ctr = devmode_ctr;
382 r.in.secdesc_ctr = secdesc_ctr;
383 r.in.command = command;
385 if (DEBUGLEVEL >= 10) {
386 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, &r);
389 status = cli->dispatch(cli,
392 NDR_SPOOLSS_SETPRINTER,
395 if (!NT_STATUS_IS_OK(status)) {
399 if (DEBUGLEVEL >= 10) {
400 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, &r);
403 if (NT_STATUS_IS_ERR(status)) {
407 /* Return variables */
411 *werror = r.out.result;
414 return werror_to_ntstatus(r.out.result);
417 NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli,
419 struct policy_handle *handle /* [in] [ref] */,
420 uint32_t level /* [in] */,
421 DATA_BLOB *buffer /* [in] [unique] */,
422 uint32_t offered /* [in] */,
423 union spoolss_PrinterInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
424 uint32_t *needed /* [out] [ref] */,
427 struct spoolss_GetPrinter r;
431 r.in.handle = handle;
433 r.in.buffer = buffer;
434 r.in.offered = offered;
436 if (DEBUGLEVEL >= 10) {
437 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, &r);
440 status = cli->dispatch(cli,
443 NDR_SPOOLSS_GETPRINTER,
446 if (!NT_STATUS_IS_OK(status)) {
450 if (DEBUGLEVEL >= 10) {
451 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, &r);
454 if (NT_STATUS_IS_ERR(status)) {
458 /* Return variables */
459 if (info && r.out.info) {
462 *needed = *r.out.needed;
466 *werror = r.out.result;
469 return werror_to_ntstatus(r.out.result);
472 NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli,
474 const char *servername /* [in] [unique,charset(UTF16)] */,
475 struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
478 struct spoolss_AddPrinterDriver r;
482 r.in.servername = servername;
483 r.in.info_ctr = info_ctr;
485 if (DEBUGLEVEL >= 10) {
486 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, &r);
489 status = cli->dispatch(cli,
492 NDR_SPOOLSS_ADDPRINTERDRIVER,
495 if (!NT_STATUS_IS_OK(status)) {
499 if (DEBUGLEVEL >= 10) {
500 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, &r);
503 if (NT_STATUS_IS_ERR(status)) {
507 /* Return variables */
511 *werror = r.out.result;
514 return werror_to_ntstatus(r.out.result);
517 NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli,
519 const char *server /* [in] [unique,charset(UTF16)] */,
520 const char *environment /* [in] [unique,charset(UTF16)] */,
521 uint32_t level /* [in] */,
522 DATA_BLOB *buffer /* [in] [unique] */,
523 uint32_t offered /* [in] */,
524 uint32_t *count /* [out] [ref] */,
525 union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
526 uint32_t *needed /* [out] [ref] */,
529 struct spoolss_EnumPrinterDrivers r;
533 r.in.server = server;
534 r.in.environment = environment;
536 r.in.buffer = buffer;
537 r.in.offered = offered;
539 if (DEBUGLEVEL >= 10) {
540 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, &r);
543 status = cli->dispatch(cli,
546 NDR_SPOOLSS_ENUMPRINTERDRIVERS,
549 if (!NT_STATUS_IS_OK(status)) {
553 if (DEBUGLEVEL >= 10) {
554 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, &r);
557 if (NT_STATUS_IS_ERR(status)) {
561 /* Return variables */
562 *count = *r.out.count;
564 *needed = *r.out.needed;
568 *werror = r.out.result;
571 return werror_to_ntstatus(r.out.result);
574 NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli,
578 struct spoolss_GetPrinterDriver r;
583 if (DEBUGLEVEL >= 10) {
584 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &r);
587 status = cli->dispatch(cli,
590 NDR_SPOOLSS_GETPRINTERDRIVER,
593 if (!NT_STATUS_IS_OK(status)) {
597 if (DEBUGLEVEL >= 10) {
598 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &r);
601 if (NT_STATUS_IS_ERR(status)) {
605 /* Return variables */
609 *werror = r.out.result;
612 return werror_to_ntstatus(r.out.result);
615 NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli,
617 const char *server /* [in] [unique,charset(UTF16)] */,
618 const char *environment /* [in] [unique,charset(UTF16)] */,
619 uint32_t level /* [in] */,
620 DATA_BLOB *buffer /* [in] [unique] */,
621 uint32_t offered /* [in] */,
622 union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
623 uint32_t *needed /* [out] [ref] */,
626 struct spoolss_GetPrinterDriverDirectory r;
630 r.in.server = server;
631 r.in.environment = environment;
633 r.in.buffer = buffer;
634 r.in.offered = offered;
636 if (DEBUGLEVEL >= 10) {
637 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
640 status = cli->dispatch(cli,
643 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY,
646 if (!NT_STATUS_IS_OK(status)) {
650 if (DEBUGLEVEL >= 10) {
651 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &r);
654 if (NT_STATUS_IS_ERR(status)) {
658 /* Return variables */
659 if (info && r.out.info) {
662 *needed = *r.out.needed;
666 *werror = r.out.result;
669 return werror_to_ntstatus(r.out.result);
672 NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli,
674 const char *server /* [in] [unique,charset(UTF16)] */,
675 const char *architecture /* [in] [charset(UTF16)] */,
676 const char *driver /* [in] [charset(UTF16)] */,
679 struct spoolss_DeletePrinterDriver r;
683 r.in.server = server;
684 r.in.architecture = architecture;
685 r.in.driver = driver;
687 if (DEBUGLEVEL >= 10) {
688 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &r);
691 status = cli->dispatch(cli,
694 NDR_SPOOLSS_DELETEPRINTERDRIVER,
697 if (!NT_STATUS_IS_OK(status)) {
701 if (DEBUGLEVEL >= 10) {
702 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &r);
705 if (NT_STATUS_IS_ERR(status)) {
709 /* Return variables */
713 *werror = r.out.result;
716 return werror_to_ntstatus(r.out.result);
719 NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli,
721 const char *server /* [in] [unique,charset(UTF16)] */,
722 const char *architecture /* [in] [charset(UTF16)] */,
723 const char *path_name /* [in] [charset(UTF16)] */,
724 const char *print_processor_name /* [in] [charset(UTF16)] */,
727 struct spoolss_AddPrintProcessor r;
731 r.in.server = server;
732 r.in.architecture = architecture;
733 r.in.path_name = path_name;
734 r.in.print_processor_name = print_processor_name;
736 if (DEBUGLEVEL >= 10) {
737 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &r);
740 status = cli->dispatch(cli,
743 NDR_SPOOLSS_ADDPRINTPROCESSOR,
746 if (!NT_STATUS_IS_OK(status)) {
750 if (DEBUGLEVEL >= 10) {
751 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &r);
754 if (NT_STATUS_IS_ERR(status)) {
758 /* Return variables */
762 *werror = r.out.result;
765 return werror_to_ntstatus(r.out.result);
768 NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli,
770 const char *servername /* [in] [unique,charset(UTF16)] */,
771 const char *environment /* [in] [unique,charset(UTF16)] */,
772 uint32_t level /* [in] */,
773 DATA_BLOB *buffer /* [in] [unique] */,
774 uint32_t offered /* [in] */,
775 uint32_t *count /* [out] [ref] */,
776 union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
777 uint32_t *needed /* [out] [ref] */,
780 struct spoolss_EnumPrintProcessors r;
784 r.in.servername = servername;
785 r.in.environment = environment;
787 r.in.buffer = buffer;
788 r.in.offered = offered;
790 if (DEBUGLEVEL >= 10) {
791 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &r);
794 status = cli->dispatch(cli,
797 NDR_SPOOLSS_ENUMPRINTPROCESSORS,
800 if (!NT_STATUS_IS_OK(status)) {
804 if (DEBUGLEVEL >= 10) {
805 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &r);
808 if (NT_STATUS_IS_ERR(status)) {
812 /* Return variables */
813 *count = *r.out.count;
815 *needed = *r.out.needed;
819 *werror = r.out.result;
822 return werror_to_ntstatus(r.out.result);
825 NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli,
827 const char *server /* [in] [unique,charset(UTF16)] */,
828 const char *environment /* [in] [unique,charset(UTF16)] */,
829 uint32_t level /* [in] */,
830 DATA_BLOB *buffer /* [in] [unique] */,
831 uint32_t offered /* [in] */,
832 union spoolss_PrintProcessorDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
833 uint32_t *needed /* [out] [ref] */,
836 struct spoolss_GetPrintProcessorDirectory r;
840 r.in.server = server;
841 r.in.environment = environment;
843 r.in.buffer = buffer;
844 r.in.offered = offered;
846 if (DEBUGLEVEL >= 10) {
847 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
850 status = cli->dispatch(cli,
853 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY,
856 if (!NT_STATUS_IS_OK(status)) {
860 if (DEBUGLEVEL >= 10) {
861 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &r);
864 if (NT_STATUS_IS_ERR(status)) {
868 /* Return variables */
869 if (info && r.out.info) {
872 *needed = *r.out.needed;
876 *werror = r.out.result;
879 return werror_to_ntstatus(r.out.result);
882 NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli,
884 struct policy_handle *handle /* [in] [ref] */,
885 uint32_t level /* [in] */,
886 union spoolss_DocumentInfo info /* [in] [switch_is(level)] */,
887 uint32_t *job_id /* [out] [ref] */,
890 struct spoolss_StartDocPrinter r;
894 r.in.handle = handle;
898 if (DEBUGLEVEL >= 10) {
899 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &r);
902 status = cli->dispatch(cli,
905 NDR_SPOOLSS_STARTDOCPRINTER,
908 if (!NT_STATUS_IS_OK(status)) {
912 if (DEBUGLEVEL >= 10) {
913 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &r);
916 if (NT_STATUS_IS_ERR(status)) {
920 /* Return variables */
921 *job_id = *r.out.job_id;
925 *werror = r.out.result;
928 return werror_to_ntstatus(r.out.result);
931 NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli,
933 struct policy_handle *handle /* [in] [ref] */,
936 struct spoolss_StartPagePrinter r;
940 r.in.handle = handle;
942 if (DEBUGLEVEL >= 10) {
943 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &r);
946 status = cli->dispatch(cli,
949 NDR_SPOOLSS_STARTPAGEPRINTER,
952 if (!NT_STATUS_IS_OK(status)) {
956 if (DEBUGLEVEL >= 10) {
957 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &r);
960 if (NT_STATUS_IS_ERR(status)) {
964 /* Return variables */
968 *werror = r.out.result;
971 return werror_to_ntstatus(r.out.result);
974 NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli,
976 struct policy_handle *handle /* [in] [ref] */,
977 DATA_BLOB data /* [in] */,
978 uint32_t _data_size /* [in] [value(r->in.data.length)] */,
979 uint32_t *num_written /* [out] [ref] */,
982 struct spoolss_WritePrinter r;
986 r.in.handle = handle;
988 r.in._data_size = _data_size;
990 if (DEBUGLEVEL >= 10) {
991 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &r);
994 status = cli->dispatch(cli,
997 NDR_SPOOLSS_WRITEPRINTER,
1000 if (!NT_STATUS_IS_OK(status)) {
1004 if (DEBUGLEVEL >= 10) {
1005 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &r);
1008 if (NT_STATUS_IS_ERR(status)) {
1012 /* Return variables */
1013 *num_written = *r.out.num_written;
1017 *werror = r.out.result;
1020 return werror_to_ntstatus(r.out.result);
1023 NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli,
1024 TALLOC_CTX *mem_ctx,
1025 struct policy_handle *handle /* [in] [ref] */,
1028 struct spoolss_EndPagePrinter r;
1032 r.in.handle = handle;
1034 if (DEBUGLEVEL >= 10) {
1035 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &r);
1038 status = cli->dispatch(cli,
1041 NDR_SPOOLSS_ENDPAGEPRINTER,
1044 if (!NT_STATUS_IS_OK(status)) {
1048 if (DEBUGLEVEL >= 10) {
1049 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &r);
1052 if (NT_STATUS_IS_ERR(status)) {
1056 /* Return variables */
1060 *werror = r.out.result;
1063 return werror_to_ntstatus(r.out.result);
1066 NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli,
1067 TALLOC_CTX *mem_ctx,
1068 struct policy_handle *handle /* [in] [ref] */,
1071 struct spoolss_AbortPrinter r;
1075 r.in.handle = handle;
1077 if (DEBUGLEVEL >= 10) {
1078 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &r);
1081 status = cli->dispatch(cli,
1084 NDR_SPOOLSS_ABORTPRINTER,
1087 if (!NT_STATUS_IS_OK(status)) {
1091 if (DEBUGLEVEL >= 10) {
1092 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &r);
1095 if (NT_STATUS_IS_ERR(status)) {
1099 /* Return variables */
1103 *werror = r.out.result;
1106 return werror_to_ntstatus(r.out.result);
1109 NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli,
1110 TALLOC_CTX *mem_ctx,
1111 struct policy_handle *handle /* [in] [ref] */,
1112 uint8_t *data /* [out] [ref,size_is(data_size)] */,
1113 uint32_t data_size /* [in] */,
1114 uint32_t *_data_size /* [out] [ref] */,
1117 struct spoolss_ReadPrinter r;
1121 r.in.handle = handle;
1122 r.in.data_size = data_size;
1124 if (DEBUGLEVEL >= 10) {
1125 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &r);
1128 status = cli->dispatch(cli,
1131 NDR_SPOOLSS_READPRINTER,
1134 if (!NT_STATUS_IS_OK(status)) {
1138 if (DEBUGLEVEL >= 10) {
1139 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &r);
1142 if (NT_STATUS_IS_ERR(status)) {
1146 /* Return variables */
1147 memcpy(data, r.out.data, r.in.data_size * sizeof(*data));
1148 *_data_size = *r.out._data_size;
1152 *werror = r.out.result;
1155 return werror_to_ntstatus(r.out.result);
1158 NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli,
1159 TALLOC_CTX *mem_ctx,
1160 struct policy_handle *handle /* [in] [ref] */,
1163 struct spoolss_EndDocPrinter r;
1167 r.in.handle = handle;
1169 if (DEBUGLEVEL >= 10) {
1170 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &r);
1173 status = cli->dispatch(cli,
1176 NDR_SPOOLSS_ENDDOCPRINTER,
1179 if (!NT_STATUS_IS_OK(status)) {
1183 if (DEBUGLEVEL >= 10) {
1184 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &r);
1187 if (NT_STATUS_IS_ERR(status)) {
1191 /* Return variables */
1195 *werror = r.out.result;
1198 return werror_to_ntstatus(r.out.result);
1201 NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli,
1202 TALLOC_CTX *mem_ctx,
1203 struct policy_handle *handle /* [in] [ref] */,
1204 uint32_t level /* [in] */,
1205 uint8_t *buffer /* [in,out] [unique,size_is(offered)] */,
1206 uint32_t offered /* [in] */,
1207 uint32_t *needed /* [out] [ref] */,
1210 struct spoolss_AddJob r;
1214 r.in.handle = handle;
1216 r.in.buffer = buffer;
1217 r.in.offered = offered;
1219 if (DEBUGLEVEL >= 10) {
1220 NDR_PRINT_IN_DEBUG(spoolss_AddJob, &r);
1223 status = cli->dispatch(cli,
1229 if (!NT_STATUS_IS_OK(status)) {
1233 if (DEBUGLEVEL >= 10) {
1234 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &r);
1237 if (NT_STATUS_IS_ERR(status)) {
1241 /* Return variables */
1242 if (buffer && r.out.buffer) {
1243 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
1245 *needed = *r.out.needed;
1249 *werror = r.out.result;
1252 return werror_to_ntstatus(r.out.result);
1255 NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli,
1256 TALLOC_CTX *mem_ctx,
1257 struct policy_handle *handle /* [in] [ref] */,
1258 uint32_t jobid /* [in] */,
1261 struct spoolss_ScheduleJob r;
1265 r.in.handle = handle;
1268 if (DEBUGLEVEL >= 10) {
1269 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &r);
1272 status = cli->dispatch(cli,
1275 NDR_SPOOLSS_SCHEDULEJOB,
1278 if (!NT_STATUS_IS_OK(status)) {
1282 if (DEBUGLEVEL >= 10) {
1283 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &r);
1286 if (NT_STATUS_IS_ERR(status)) {
1290 /* Return variables */
1294 *werror = r.out.result;
1297 return werror_to_ntstatus(r.out.result);
1300 NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
1301 TALLOC_CTX *mem_ctx,
1302 struct policy_handle *handle /* [in] [ref] */,
1303 const char *value_name /* [in] [charset(UTF16)] */,
1304 uint32_t offered /* [in] */,
1305 enum spoolss_PrinterDataType *type /* [out] [ref] */,
1306 union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(*type)] */,
1307 uint32_t *needed /* [out] [ref] */,
1310 struct spoolss_GetPrinterData r;
1314 r.in.handle = handle;
1315 r.in.value_name = value_name;
1316 r.in.offered = offered;
1318 if (DEBUGLEVEL >= 10) {
1319 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &r);
1322 status = cli->dispatch(cli,
1325 NDR_SPOOLSS_GETPRINTERDATA,
1328 if (!NT_STATUS_IS_OK(status)) {
1332 if (DEBUGLEVEL >= 10) {
1333 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &r);
1336 if (NT_STATUS_IS_ERR(status)) {
1340 /* Return variables */
1341 *type = *r.out.type;
1342 return NT_STATUS_NOT_SUPPORTED;
1343 *needed = *r.out.needed;
1347 *werror = r.out.result;
1350 return werror_to_ntstatus(r.out.result);
1353 NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
1354 TALLOC_CTX *mem_ctx,
1355 struct policy_handle *handle /* [in] [ref] */,
1356 const char *value_name /* [in] [charset(UTF16)] */,
1357 enum spoolss_PrinterDataType type /* [in] */,
1358 union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */,
1359 uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1362 struct spoolss_SetPrinterData r;
1366 r.in.handle = handle;
1367 r.in.value_name = value_name;
1370 r.in._offered = _offered;
1372 if (DEBUGLEVEL >= 10) {
1373 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &r);
1376 status = cli->dispatch(cli,
1379 NDR_SPOOLSS_SETPRINTERDATA,
1382 if (!NT_STATUS_IS_OK(status)) {
1386 if (DEBUGLEVEL >= 10) {
1387 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &r);
1390 if (NT_STATUS_IS_ERR(status)) {
1394 /* Return variables */
1398 *werror = r.out.result;
1401 return werror_to_ntstatus(r.out.result);
1404 NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli,
1405 TALLOC_CTX *mem_ctx,
1408 struct spoolss_WaitForPrinterChange r;
1413 if (DEBUGLEVEL >= 10) {
1414 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &r);
1417 status = cli->dispatch(cli,
1420 NDR_SPOOLSS_WAITFORPRINTERCHANGE,
1423 if (!NT_STATUS_IS_OK(status)) {
1427 if (DEBUGLEVEL >= 10) {
1428 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &r);
1431 if (NT_STATUS_IS_ERR(status)) {
1435 /* Return variables */
1439 *werror = r.out.result;
1442 return werror_to_ntstatus(r.out.result);
1445 NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli,
1446 TALLOC_CTX *mem_ctx,
1447 struct policy_handle *handle /* [in,out] [ref] */,
1450 struct spoolss_ClosePrinter r;
1454 r.in.handle = handle;
1456 if (DEBUGLEVEL >= 10) {
1457 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &r);
1460 status = cli->dispatch(cli,
1463 NDR_SPOOLSS_CLOSEPRINTER,
1466 if (!NT_STATUS_IS_OK(status)) {
1470 if (DEBUGLEVEL >= 10) {
1471 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &r);
1474 if (NT_STATUS_IS_ERR(status)) {
1478 /* Return variables */
1479 *handle = *r.out.handle;
1483 *werror = r.out.result;
1486 return werror_to_ntstatus(r.out.result);
1489 NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli,
1490 TALLOC_CTX *mem_ctx,
1491 struct policy_handle *handle /* [in] [ref] */,
1492 uint32_t level /* [in] */,
1493 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1496 struct spoolss_AddForm r;
1500 r.in.handle = handle;
1504 if (DEBUGLEVEL >= 10) {
1505 NDR_PRINT_IN_DEBUG(spoolss_AddForm, &r);
1508 status = cli->dispatch(cli,
1511 NDR_SPOOLSS_ADDFORM,
1514 if (!NT_STATUS_IS_OK(status)) {
1518 if (DEBUGLEVEL >= 10) {
1519 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &r);
1522 if (NT_STATUS_IS_ERR(status)) {
1526 /* Return variables */
1530 *werror = r.out.result;
1533 return werror_to_ntstatus(r.out.result);
1536 NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli,
1537 TALLOC_CTX *mem_ctx,
1538 struct policy_handle *handle /* [in] [ref] */,
1539 const char *form_name /* [in] [charset(UTF16)] */,
1542 struct spoolss_DeleteForm r;
1546 r.in.handle = handle;
1547 r.in.form_name = form_name;
1549 if (DEBUGLEVEL >= 10) {
1550 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &r);
1553 status = cli->dispatch(cli,
1556 NDR_SPOOLSS_DELETEFORM,
1559 if (!NT_STATUS_IS_OK(status)) {
1563 if (DEBUGLEVEL >= 10) {
1564 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &r);
1567 if (NT_STATUS_IS_ERR(status)) {
1571 /* Return variables */
1575 *werror = r.out.result;
1578 return werror_to_ntstatus(r.out.result);
1581 NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli,
1582 TALLOC_CTX *mem_ctx,
1583 struct policy_handle *handle /* [in] [ref] */,
1584 const char *form_name /* [in] [charset(UTF16)] */,
1585 uint32_t level /* [in] */,
1586 DATA_BLOB *buffer /* [in] [unique] */,
1587 uint32_t offered /* [in] */,
1588 union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1589 uint32_t *needed /* [out] [ref] */,
1592 struct spoolss_GetForm r;
1596 r.in.handle = handle;
1597 r.in.form_name = form_name;
1599 r.in.buffer = buffer;
1600 r.in.offered = offered;
1602 if (DEBUGLEVEL >= 10) {
1603 NDR_PRINT_IN_DEBUG(spoolss_GetForm, &r);
1606 status = cli->dispatch(cli,
1609 NDR_SPOOLSS_GETFORM,
1612 if (!NT_STATUS_IS_OK(status)) {
1616 if (DEBUGLEVEL >= 10) {
1617 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &r);
1620 if (NT_STATUS_IS_ERR(status)) {
1624 /* Return variables */
1625 if (info && r.out.info) {
1626 *info = *r.out.info;
1628 *needed = *r.out.needed;
1632 *werror = r.out.result;
1635 return werror_to_ntstatus(r.out.result);
1638 NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli,
1639 TALLOC_CTX *mem_ctx,
1640 struct policy_handle *handle /* [in] [ref] */,
1641 const char *form_name /* [in] [charset(UTF16)] */,
1642 uint32_t level /* [in] */,
1643 union spoolss_AddFormInfo info /* [in] [switch_is(level)] */,
1646 struct spoolss_SetForm r;
1650 r.in.handle = handle;
1651 r.in.form_name = form_name;
1655 if (DEBUGLEVEL >= 10) {
1656 NDR_PRINT_IN_DEBUG(spoolss_SetForm, &r);
1659 status = cli->dispatch(cli,
1662 NDR_SPOOLSS_SETFORM,
1665 if (!NT_STATUS_IS_OK(status)) {
1669 if (DEBUGLEVEL >= 10) {
1670 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &r);
1673 if (NT_STATUS_IS_ERR(status)) {
1677 /* Return variables */
1681 *werror = r.out.result;
1684 return werror_to_ntstatus(r.out.result);
1687 NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli,
1688 TALLOC_CTX *mem_ctx,
1689 struct policy_handle *handle /* [in] [ref] */,
1690 uint32_t level /* [in] */,
1691 DATA_BLOB *buffer /* [in] [unique] */,
1692 uint32_t offered /* [in] */,
1693 uint32_t *count /* [out] [ref] */,
1694 union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1695 uint32_t *needed /* [out] [ref] */,
1698 struct spoolss_EnumForms r;
1702 r.in.handle = handle;
1704 r.in.buffer = buffer;
1705 r.in.offered = offered;
1707 if (DEBUGLEVEL >= 10) {
1708 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &r);
1711 status = cli->dispatch(cli,
1714 NDR_SPOOLSS_ENUMFORMS,
1717 if (!NT_STATUS_IS_OK(status)) {
1721 if (DEBUGLEVEL >= 10) {
1722 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &r);
1725 if (NT_STATUS_IS_ERR(status)) {
1729 /* Return variables */
1730 *count = *r.out.count;
1731 *info = *r.out.info;
1732 *needed = *r.out.needed;
1736 *werror = r.out.result;
1739 return werror_to_ntstatus(r.out.result);
1742 NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli,
1743 TALLOC_CTX *mem_ctx,
1744 const char *servername /* [in] [unique,charset(UTF16)] */,
1745 uint32_t level /* [in] */,
1746 DATA_BLOB *buffer /* [in] [unique] */,
1747 uint32_t offered /* [in] */,
1748 uint32_t *count /* [out] [ref] */,
1749 union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1750 uint32_t *needed /* [out] [ref] */,
1753 struct spoolss_EnumPorts r;
1757 r.in.servername = servername;
1759 r.in.buffer = buffer;
1760 r.in.offered = offered;
1762 if (DEBUGLEVEL >= 10) {
1763 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &r);
1766 status = cli->dispatch(cli,
1769 NDR_SPOOLSS_ENUMPORTS,
1772 if (!NT_STATUS_IS_OK(status)) {
1776 if (DEBUGLEVEL >= 10) {
1777 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &r);
1780 if (NT_STATUS_IS_ERR(status)) {
1784 /* Return variables */
1785 *count = *r.out.count;
1786 *info = *r.out.info;
1787 *needed = *r.out.needed;
1791 *werror = r.out.result;
1794 return werror_to_ntstatus(r.out.result);
1797 NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli,
1798 TALLOC_CTX *mem_ctx,
1799 const char *servername /* [in] [unique,charset(UTF16)] */,
1800 uint32_t level /* [in] */,
1801 DATA_BLOB *buffer /* [in] [unique] */,
1802 uint32_t offered /* [in] */,
1803 uint32_t *count /* [out] [ref] */,
1804 union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */,
1805 uint32_t *needed /* [out] [ref] */,
1808 struct spoolss_EnumMonitors r;
1812 r.in.servername = servername;
1814 r.in.buffer = buffer;
1815 r.in.offered = offered;
1817 if (DEBUGLEVEL >= 10) {
1818 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &r);
1821 status = cli->dispatch(cli,
1824 NDR_SPOOLSS_ENUMMONITORS,
1827 if (!NT_STATUS_IS_OK(status)) {
1831 if (DEBUGLEVEL >= 10) {
1832 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &r);
1835 if (NT_STATUS_IS_ERR(status)) {
1839 /* Return variables */
1840 *count = *r.out.count;
1841 *info = *r.out.info;
1842 *needed = *r.out.needed;
1846 *werror = r.out.result;
1849 return werror_to_ntstatus(r.out.result);
1852 NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli,
1853 TALLOC_CTX *mem_ctx,
1854 const char *server_name /* [in] [unique,charset(UTF16)] */,
1855 uint32_t unknown /* [in] */,
1856 const char *monitor_name /* [in] [charset(UTF16)] */,
1859 struct spoolss_AddPort r;
1863 r.in.server_name = server_name;
1864 r.in.unknown = unknown;
1865 r.in.monitor_name = monitor_name;
1867 if (DEBUGLEVEL >= 10) {
1868 NDR_PRINT_IN_DEBUG(spoolss_AddPort, &r);
1871 status = cli->dispatch(cli,
1874 NDR_SPOOLSS_ADDPORT,
1877 if (!NT_STATUS_IS_OK(status)) {
1881 if (DEBUGLEVEL >= 10) {
1882 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &r);
1885 if (NT_STATUS_IS_ERR(status)) {
1889 /* Return variables */
1893 *werror = r.out.result;
1896 return werror_to_ntstatus(r.out.result);
1899 NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli,
1900 TALLOC_CTX *mem_ctx,
1903 struct spoolss_ConfigurePort r;
1908 if (DEBUGLEVEL >= 10) {
1909 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &r);
1912 status = cli->dispatch(cli,
1915 NDR_SPOOLSS_CONFIGUREPORT,
1918 if (!NT_STATUS_IS_OK(status)) {
1922 if (DEBUGLEVEL >= 10) {
1923 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &r);
1926 if (NT_STATUS_IS_ERR(status)) {
1930 /* Return variables */
1934 *werror = r.out.result;
1937 return werror_to_ntstatus(r.out.result);
1940 NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli,
1941 TALLOC_CTX *mem_ctx,
1944 struct spoolss_DeletePort r;
1949 if (DEBUGLEVEL >= 10) {
1950 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &r);
1953 status = cli->dispatch(cli,
1956 NDR_SPOOLSS_DELETEPORT,
1959 if (!NT_STATUS_IS_OK(status)) {
1963 if (DEBUGLEVEL >= 10) {
1964 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &r);
1967 if (NT_STATUS_IS_ERR(status)) {
1971 /* Return variables */
1975 *werror = r.out.result;
1978 return werror_to_ntstatus(r.out.result);
1981 NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli,
1982 TALLOC_CTX *mem_ctx,
1985 struct spoolss_CreatePrinterIC r;
1990 if (DEBUGLEVEL >= 10) {
1991 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &r);
1994 status = cli->dispatch(cli,
1997 NDR_SPOOLSS_CREATEPRINTERIC,
2000 if (!NT_STATUS_IS_OK(status)) {
2004 if (DEBUGLEVEL >= 10) {
2005 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &r);
2008 if (NT_STATUS_IS_ERR(status)) {
2012 /* Return variables */
2016 *werror = r.out.result;
2019 return werror_to_ntstatus(r.out.result);
2022 NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli,
2023 TALLOC_CTX *mem_ctx,
2026 struct spoolss_PlayGDIScriptOnPrinterIC r;
2031 if (DEBUGLEVEL >= 10) {
2032 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2035 status = cli->dispatch(cli,
2038 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC,
2041 if (!NT_STATUS_IS_OK(status)) {
2045 if (DEBUGLEVEL >= 10) {
2046 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &r);
2049 if (NT_STATUS_IS_ERR(status)) {
2053 /* Return variables */
2057 *werror = r.out.result;
2060 return werror_to_ntstatus(r.out.result);
2063 NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli,
2064 TALLOC_CTX *mem_ctx,
2067 struct spoolss_DeletePrinterIC r;
2072 if (DEBUGLEVEL >= 10) {
2073 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &r);
2076 status = cli->dispatch(cli,
2079 NDR_SPOOLSS_DELETEPRINTERIC,
2082 if (!NT_STATUS_IS_OK(status)) {
2086 if (DEBUGLEVEL >= 10) {
2087 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &r);
2090 if (NT_STATUS_IS_ERR(status)) {
2094 /* Return variables */
2098 *werror = r.out.result;
2101 return werror_to_ntstatus(r.out.result);
2104 NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli,
2105 TALLOC_CTX *mem_ctx,
2108 struct spoolss_AddPrinterConnection r;
2113 if (DEBUGLEVEL >= 10) {
2114 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &r);
2117 status = cli->dispatch(cli,
2120 NDR_SPOOLSS_ADDPRINTERCONNECTION,
2123 if (!NT_STATUS_IS_OK(status)) {
2127 if (DEBUGLEVEL >= 10) {
2128 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &r);
2131 if (NT_STATUS_IS_ERR(status)) {
2135 /* Return variables */
2139 *werror = r.out.result;
2142 return werror_to_ntstatus(r.out.result);
2145 NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli,
2146 TALLOC_CTX *mem_ctx,
2149 struct spoolss_DeletePrinterConnection r;
2154 if (DEBUGLEVEL >= 10) {
2155 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &r);
2158 status = cli->dispatch(cli,
2161 NDR_SPOOLSS_DELETEPRINTERCONNECTION,
2164 if (!NT_STATUS_IS_OK(status)) {
2168 if (DEBUGLEVEL >= 10) {
2169 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &r);
2172 if (NT_STATUS_IS_ERR(status)) {
2176 /* Return variables */
2180 *werror = r.out.result;
2183 return werror_to_ntstatus(r.out.result);
2186 NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli,
2187 TALLOC_CTX *mem_ctx,
2190 struct spoolss_PrinterMessageBox r;
2195 if (DEBUGLEVEL >= 10) {
2196 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &r);
2199 status = cli->dispatch(cli,
2202 NDR_SPOOLSS_PRINTERMESSAGEBOX,
2205 if (!NT_STATUS_IS_OK(status)) {
2209 if (DEBUGLEVEL >= 10) {
2210 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &r);
2213 if (NT_STATUS_IS_ERR(status)) {
2217 /* Return variables */
2221 *werror = r.out.result;
2224 return werror_to_ntstatus(r.out.result);
2227 NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli,
2228 TALLOC_CTX *mem_ctx,
2231 struct spoolss_AddMonitor r;
2236 if (DEBUGLEVEL >= 10) {
2237 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &r);
2240 status = cli->dispatch(cli,
2243 NDR_SPOOLSS_ADDMONITOR,
2246 if (!NT_STATUS_IS_OK(status)) {
2250 if (DEBUGLEVEL >= 10) {
2251 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &r);
2254 if (NT_STATUS_IS_ERR(status)) {
2258 /* Return variables */
2262 *werror = r.out.result;
2265 return werror_to_ntstatus(r.out.result);
2268 NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli,
2269 TALLOC_CTX *mem_ctx,
2272 struct spoolss_DeleteMonitor r;
2277 if (DEBUGLEVEL >= 10) {
2278 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &r);
2281 status = cli->dispatch(cli,
2284 NDR_SPOOLSS_DELETEMONITOR,
2287 if (!NT_STATUS_IS_OK(status)) {
2291 if (DEBUGLEVEL >= 10) {
2292 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &r);
2295 if (NT_STATUS_IS_ERR(status)) {
2299 /* Return variables */
2303 *werror = r.out.result;
2306 return werror_to_ntstatus(r.out.result);
2309 NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli,
2310 TALLOC_CTX *mem_ctx,
2313 struct spoolss_DeletePrintProcessor r;
2318 if (DEBUGLEVEL >= 10) {
2319 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &r);
2322 status = cli->dispatch(cli,
2325 NDR_SPOOLSS_DELETEPRINTPROCESSOR,
2328 if (!NT_STATUS_IS_OK(status)) {
2332 if (DEBUGLEVEL >= 10) {
2333 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &r);
2336 if (NT_STATUS_IS_ERR(status)) {
2340 /* Return variables */
2344 *werror = r.out.result;
2347 return werror_to_ntstatus(r.out.result);
2350 NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli,
2351 TALLOC_CTX *mem_ctx,
2354 struct spoolss_AddPrintProvidor r;
2359 if (DEBUGLEVEL >= 10) {
2360 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &r);
2363 status = cli->dispatch(cli,
2366 NDR_SPOOLSS_ADDPRINTPROVIDOR,
2369 if (!NT_STATUS_IS_OK(status)) {
2373 if (DEBUGLEVEL >= 10) {
2374 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &r);
2377 if (NT_STATUS_IS_ERR(status)) {
2381 /* Return variables */
2385 *werror = r.out.result;
2388 return werror_to_ntstatus(r.out.result);
2391 NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli,
2392 TALLOC_CTX *mem_ctx,
2395 struct spoolss_DeletePrintProvidor r;
2400 if (DEBUGLEVEL >= 10) {
2401 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &r);
2404 status = cli->dispatch(cli,
2407 NDR_SPOOLSS_DELETEPRINTPROVIDOR,
2410 if (!NT_STATUS_IS_OK(status)) {
2414 if (DEBUGLEVEL >= 10) {
2415 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &r);
2418 if (NT_STATUS_IS_ERR(status)) {
2422 /* Return variables */
2426 *werror = r.out.result;
2429 return werror_to_ntstatus(r.out.result);
2432 NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli,
2433 TALLOC_CTX *mem_ctx,
2436 struct spoolss_EnumPrintProcDataTypes r;
2441 if (DEBUGLEVEL >= 10) {
2442 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2445 status = cli->dispatch(cli,
2448 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES,
2451 if (!NT_STATUS_IS_OK(status)) {
2455 if (DEBUGLEVEL >= 10) {
2456 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &r);
2459 if (NT_STATUS_IS_ERR(status)) {
2463 /* Return variables */
2467 *werror = r.out.result;
2470 return werror_to_ntstatus(r.out.result);
2473 NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli,
2474 TALLOC_CTX *mem_ctx,
2475 struct policy_handle *handle /* [in] [ref] */,
2476 const char *data_type /* [in] [unique,charset(UTF16)] */,
2477 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
2480 struct spoolss_ResetPrinter r;
2484 r.in.handle = handle;
2485 r.in.data_type = data_type;
2486 r.in.devmode_ctr = devmode_ctr;
2488 if (DEBUGLEVEL >= 10) {
2489 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &r);
2492 status = cli->dispatch(cli,
2495 NDR_SPOOLSS_RESETPRINTER,
2498 if (!NT_STATUS_IS_OK(status)) {
2502 if (DEBUGLEVEL >= 10) {
2503 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &r);
2506 if (NT_STATUS_IS_ERR(status)) {
2510 /* Return variables */
2514 *werror = r.out.result;
2517 return werror_to_ntstatus(r.out.result);
2520 NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli,
2521 TALLOC_CTX *mem_ctx,
2522 struct policy_handle *handle /* [in] [ref] */,
2523 const char *architecture /* [in] [unique,charset(UTF16)] */,
2524 uint32_t level /* [in] */,
2525 DATA_BLOB *buffer /* [in] [unique] */,
2526 uint32_t offered /* [in] */,
2527 uint32_t client_major_version /* [in] */,
2528 uint32_t client_minor_version /* [in] */,
2529 union spoolss_DriverInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
2530 uint32_t *needed /* [out] [ref] */,
2531 uint32_t *server_major_version /* [out] [ref] */,
2532 uint32_t *server_minor_version /* [out] [ref] */,
2535 struct spoolss_GetPrinterDriver2 r;
2539 r.in.handle = handle;
2540 r.in.architecture = architecture;
2542 r.in.buffer = buffer;
2543 r.in.offered = offered;
2544 r.in.client_major_version = client_major_version;
2545 r.in.client_minor_version = client_minor_version;
2547 if (DEBUGLEVEL >= 10) {
2548 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &r);
2551 status = cli->dispatch(cli,
2554 NDR_SPOOLSS_GETPRINTERDRIVER2,
2557 if (!NT_STATUS_IS_OK(status)) {
2561 if (DEBUGLEVEL >= 10) {
2562 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &r);
2565 if (NT_STATUS_IS_ERR(status)) {
2569 /* Return variables */
2570 if (info && r.out.info) {
2571 *info = *r.out.info;
2573 *needed = *r.out.needed;
2574 *server_major_version = *r.out.server_major_version;
2575 *server_minor_version = *r.out.server_minor_version;
2579 *werror = r.out.result;
2582 return werror_to_ntstatus(r.out.result);
2585 NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2586 TALLOC_CTX *mem_ctx,
2589 struct spoolss_FindFirstPrinterChangeNotification r;
2594 if (DEBUGLEVEL >= 10) {
2595 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2598 status = cli->dispatch(cli,
2601 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION,
2604 if (!NT_STATUS_IS_OK(status)) {
2608 if (DEBUGLEVEL >= 10) {
2609 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &r);
2612 if (NT_STATUS_IS_ERR(status)) {
2616 /* Return variables */
2620 *werror = r.out.result;
2623 return werror_to_ntstatus(r.out.result);
2626 NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli,
2627 TALLOC_CTX *mem_ctx,
2630 struct spoolss_FindNextPrinterChangeNotification r;
2635 if (DEBUGLEVEL >= 10) {
2636 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2639 status = cli->dispatch(cli,
2642 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION,
2645 if (!NT_STATUS_IS_OK(status)) {
2649 if (DEBUGLEVEL >= 10) {
2650 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &r);
2653 if (NT_STATUS_IS_ERR(status)) {
2657 /* Return variables */
2661 *werror = r.out.result;
2664 return werror_to_ntstatus(r.out.result);
2667 NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli,
2668 TALLOC_CTX *mem_ctx,
2669 struct policy_handle *handle /* [in] [ref] */,
2672 struct spoolss_FindClosePrinterNotify r;
2676 r.in.handle = handle;
2678 if (DEBUGLEVEL >= 10) {
2679 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &r);
2682 status = cli->dispatch(cli,
2685 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY,
2688 if (!NT_STATUS_IS_OK(status)) {
2692 if (DEBUGLEVEL >= 10) {
2693 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &r);
2696 if (NT_STATUS_IS_ERR(status)) {
2700 /* Return variables */
2704 *werror = r.out.result;
2707 return werror_to_ntstatus(r.out.result);
2710 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli,
2711 TALLOC_CTX *mem_ctx,
2714 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r;
2719 if (DEBUGLEVEL >= 10) {
2720 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2723 status = cli->dispatch(cli,
2726 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD,
2729 if (!NT_STATUS_IS_OK(status)) {
2733 if (DEBUGLEVEL >= 10) {
2734 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &r);
2737 if (NT_STATUS_IS_ERR(status)) {
2741 /* Return variables */
2745 *werror = r.out.result;
2748 return werror_to_ntstatus(r.out.result);
2751 NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli,
2752 TALLOC_CTX *mem_ctx,
2753 const char *server_name /* [in] [charset(UTF16)] */,
2754 uint32_t printer_local /* [in] */,
2755 enum winreg_Type type /* [in] */,
2756 uint32_t bufsize /* [in] [range(0,512)] */,
2757 uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2758 struct policy_handle *handle /* [out] [ref] */,
2761 struct spoolss_ReplyOpenPrinter r;
2765 r.in.server_name = server_name;
2766 r.in.printer_local = printer_local;
2768 r.in.bufsize = bufsize;
2769 r.in.buffer = buffer;
2771 if (DEBUGLEVEL >= 10) {
2772 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &r);
2775 status = cli->dispatch(cli,
2778 NDR_SPOOLSS_REPLYOPENPRINTER,
2781 if (!NT_STATUS_IS_OK(status)) {
2785 if (DEBUGLEVEL >= 10) {
2786 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &r);
2789 if (NT_STATUS_IS_ERR(status)) {
2793 /* Return variables */
2794 *handle = *r.out.handle;
2798 *werror = r.out.result;
2801 return werror_to_ntstatus(r.out.result);
2804 NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli,
2805 TALLOC_CTX *mem_ctx,
2806 struct policy_handle *handle /* [in] [ref] */,
2807 uint32_t flags /* [in] */,
2808 uint32_t bufsize /* [in] [range(0,512)] */,
2809 uint8_t *buffer /* [in] [unique,size_is(bufsize)] */,
2812 struct spoolss_RouterReplyPrinter r;
2816 r.in.handle = handle;
2818 r.in.bufsize = bufsize;
2819 r.in.buffer = buffer;
2821 if (DEBUGLEVEL >= 10) {
2822 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &r);
2825 status = cli->dispatch(cli,
2828 NDR_SPOOLSS_ROUTERREPLYPRINTER,
2831 if (!NT_STATUS_IS_OK(status)) {
2835 if (DEBUGLEVEL >= 10) {
2836 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &r);
2839 if (NT_STATUS_IS_ERR(status)) {
2843 /* Return variables */
2847 *werror = r.out.result;
2850 return werror_to_ntstatus(r.out.result);
2853 NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli,
2854 TALLOC_CTX *mem_ctx,
2855 struct policy_handle *handle /* [in,out] [ref] */,
2858 struct spoolss_ReplyClosePrinter r;
2862 r.in.handle = handle;
2864 if (DEBUGLEVEL >= 10) {
2865 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &r);
2868 status = cli->dispatch(cli,
2871 NDR_SPOOLSS_REPLYCLOSEPRINTER,
2874 if (!NT_STATUS_IS_OK(status)) {
2878 if (DEBUGLEVEL >= 10) {
2879 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &r);
2882 if (NT_STATUS_IS_ERR(status)) {
2886 /* Return variables */
2887 *handle = *r.out.handle;
2891 *werror = r.out.result;
2894 return werror_to_ntstatus(r.out.result);
2897 NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli,
2898 TALLOC_CTX *mem_ctx,
2901 struct spoolss_AddPortEx r;
2906 if (DEBUGLEVEL >= 10) {
2907 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &r);
2910 status = cli->dispatch(cli,
2913 NDR_SPOOLSS_ADDPORTEX,
2916 if (!NT_STATUS_IS_OK(status)) {
2920 if (DEBUGLEVEL >= 10) {
2921 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &r);
2924 if (NT_STATUS_IS_ERR(status)) {
2928 /* Return variables */
2932 *werror = r.out.result;
2935 return werror_to_ntstatus(r.out.result);
2938 NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli,
2939 TALLOC_CTX *mem_ctx,
2942 struct spoolss_RouterFindFirstPrinterChangeNotification r;
2947 if (DEBUGLEVEL >= 10) {
2948 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2951 status = cli->dispatch(cli,
2954 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION,
2957 if (!NT_STATUS_IS_OK(status)) {
2961 if (DEBUGLEVEL >= 10) {
2962 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &r);
2965 if (NT_STATUS_IS_ERR(status)) {
2969 /* Return variables */
2973 *werror = r.out.result;
2976 return werror_to_ntstatus(r.out.result);
2979 NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli,
2980 TALLOC_CTX *mem_ctx,
2983 struct spoolss_SpoolerInit r;
2988 if (DEBUGLEVEL >= 10) {
2989 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &r);
2992 status = cli->dispatch(cli,
2995 NDR_SPOOLSS_SPOOLERINIT,
2998 if (!NT_STATUS_IS_OK(status)) {
3002 if (DEBUGLEVEL >= 10) {
3003 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &r);
3006 if (NT_STATUS_IS_ERR(status)) {
3010 /* Return variables */
3014 *werror = r.out.result;
3017 return werror_to_ntstatus(r.out.result);
3020 NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli,
3021 TALLOC_CTX *mem_ctx,
3024 struct spoolss_ResetPrinterEx r;
3029 if (DEBUGLEVEL >= 10) {
3030 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &r);
3033 status = cli->dispatch(cli,
3036 NDR_SPOOLSS_RESETPRINTEREX,
3039 if (!NT_STATUS_IS_OK(status)) {
3043 if (DEBUGLEVEL >= 10) {
3044 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &r);
3047 if (NT_STATUS_IS_ERR(status)) {
3051 /* Return variables */
3055 *werror = r.out.result;
3058 return werror_to_ntstatus(r.out.result);
3061 NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli,
3062 TALLOC_CTX *mem_ctx,
3063 struct policy_handle *handle /* [in] [ref] */,
3064 uint32_t flags /* [in] */,
3065 uint32_t options /* [in] */,
3066 const char *local_machine /* [in] [unique,charset(UTF16)] */,
3067 uint32_t printer_local /* [in] */,
3068 struct spoolss_NotifyOption *notify_options /* [in] [unique] */,
3071 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r;
3075 r.in.handle = handle;
3077 r.in.options = options;
3078 r.in.local_machine = local_machine;
3079 r.in.printer_local = printer_local;
3080 r.in.notify_options = notify_options;
3082 if (DEBUGLEVEL >= 10) {
3083 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3086 status = cli->dispatch(cli,
3089 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX,
3092 if (!NT_STATUS_IS_OK(status)) {
3096 if (DEBUGLEVEL >= 10) {
3097 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &r);
3100 if (NT_STATUS_IS_ERR(status)) {
3104 /* Return variables */
3108 *werror = r.out.result;
3111 return werror_to_ntstatus(r.out.result);
3114 NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli,
3115 TALLOC_CTX *mem_ctx,
3116 struct policy_handle *handle /* [in] [ref] */,
3117 uint32_t color /* [in] */,
3118 uint32_t flags /* [in] */,
3119 uint32_t *reply_result /* [out] [ref] */,
3120 uint32_t reply_type /* [in] */,
3121 union spoolss_ReplyPrinterInfo info /* [in] [switch_is(reply_type)] */,
3124 struct spoolss_RouterReplyPrinterEx r;
3128 r.in.handle = handle;
3131 r.in.reply_type = reply_type;
3134 if (DEBUGLEVEL >= 10) {
3135 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3138 status = cli->dispatch(cli,
3141 NDR_SPOOLSS_ROUTERREPLYPRINTEREX,
3144 if (!NT_STATUS_IS_OK(status)) {
3148 if (DEBUGLEVEL >= 10) {
3149 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, &r);
3152 if (NT_STATUS_IS_ERR(status)) {
3156 /* Return variables */
3157 *reply_result = *r.out.reply_result;
3161 *werror = r.out.result;
3164 return werror_to_ntstatus(r.out.result);
3167 NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli,
3168 TALLOC_CTX *mem_ctx,
3169 struct policy_handle *handle /* [in] [ref] */,
3170 uint32_t change_low /* [in] */,
3171 struct spoolss_NotifyOption *options /* [in] [unique] */,
3172 struct spoolss_NotifyInfo **info /* [out] [ref] */,
3175 struct spoolss_RouterRefreshPrinterChangeNotify r;
3179 r.in.handle = handle;
3180 r.in.change_low = change_low;
3181 r.in.options = options;
3183 if (DEBUGLEVEL >= 10) {
3184 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3187 status = cli->dispatch(cli,
3190 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY,
3193 if (!NT_STATUS_IS_OK(status)) {
3197 if (DEBUGLEVEL >= 10) {
3198 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &r);
3201 if (NT_STATUS_IS_ERR(status)) {
3205 /* Return variables */
3206 *info = *r.out.info;
3210 *werror = r.out.result;
3213 return werror_to_ntstatus(r.out.result);
3216 NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli,
3217 TALLOC_CTX *mem_ctx,
3220 struct spoolss_44 r;
3225 if (DEBUGLEVEL >= 10) {
3226 NDR_PRINT_IN_DEBUG(spoolss_44, &r);
3229 status = cli->dispatch(cli,
3235 if (!NT_STATUS_IS_OK(status)) {
3239 if (DEBUGLEVEL >= 10) {
3240 NDR_PRINT_OUT_DEBUG(spoolss_44, &r);
3243 if (NT_STATUS_IS_ERR(status)) {
3247 /* Return variables */
3251 *werror = r.out.result;
3254 return werror_to_ntstatus(r.out.result);
3257 NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli,
3258 TALLOC_CTX *mem_ctx,
3259 const char *printername /* [in] [unique,charset(UTF16)] */,
3260 const char *datatype /* [in] [unique,charset(UTF16)] */,
3261 struct spoolss_DevmodeContainer devmode_ctr /* [in] */,
3262 uint32_t access_mask /* [in] */,
3263 uint32_t level /* [in] */,
3264 union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */,
3265 struct policy_handle *handle /* [out] [ref] */,
3268 struct spoolss_OpenPrinterEx r;
3272 r.in.printername = printername;
3273 r.in.datatype = datatype;
3274 r.in.devmode_ctr = devmode_ctr;
3275 r.in.access_mask = access_mask;
3277 r.in.userlevel = userlevel;
3279 if (DEBUGLEVEL >= 10) {
3280 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &r);
3283 status = cli->dispatch(cli,
3286 NDR_SPOOLSS_OPENPRINTEREX,
3289 if (!NT_STATUS_IS_OK(status)) {
3293 if (DEBUGLEVEL >= 10) {
3294 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &r);
3297 if (NT_STATUS_IS_ERR(status)) {
3301 /* Return variables */
3302 *handle = *r.out.handle;
3306 *werror = r.out.result;
3309 return werror_to_ntstatus(r.out.result);
3312 NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli,
3313 TALLOC_CTX *mem_ctx,
3314 const char *server /* [in] [unique,charset(UTF16)] */,
3315 struct spoolss_SetPrinterInfoCtr *info_ctr /* [in] [ref] */,
3316 struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */,
3317 struct sec_desc_buf *secdesc_ctr /* [in] [ref] */,
3318 struct spoolss_UserLevelCtr *userlevel_ctr /* [in] [ref] */,
3319 struct policy_handle *handle /* [out] [ref] */,
3322 struct spoolss_AddPrinterEx r;
3326 r.in.server = server;
3327 r.in.info_ctr = info_ctr;
3328 r.in.devmode_ctr = devmode_ctr;
3329 r.in.secdesc_ctr = secdesc_ctr;
3330 r.in.userlevel_ctr = userlevel_ctr;
3332 if (DEBUGLEVEL >= 10) {
3333 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &r);
3336 status = cli->dispatch(cli,
3339 NDR_SPOOLSS_ADDPRINTEREX,
3342 if (!NT_STATUS_IS_OK(status)) {
3346 if (DEBUGLEVEL >= 10) {
3347 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &r);
3350 if (NT_STATUS_IS_ERR(status)) {
3354 /* Return variables */
3355 *handle = *r.out.handle;
3359 *werror = r.out.result;
3362 return werror_to_ntstatus(r.out.result);
3365 NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli,
3366 TALLOC_CTX *mem_ctx,
3369 struct spoolss_47 r;
3374 if (DEBUGLEVEL >= 10) {
3375 NDR_PRINT_IN_DEBUG(spoolss_47, &r);
3378 status = cli->dispatch(cli,
3384 if (!NT_STATUS_IS_OK(status)) {
3388 if (DEBUGLEVEL >= 10) {
3389 NDR_PRINT_OUT_DEBUG(spoolss_47, &r);
3392 if (NT_STATUS_IS_ERR(status)) {
3396 /* Return variables */
3400 *werror = r.out.result;
3403 return werror_to_ntstatus(r.out.result);
3406 NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli,
3407 TALLOC_CTX *mem_ctx,
3408 struct policy_handle *handle /* [in] [ref] */,
3409 uint32_t enum_index /* [in] */,
3410 const char *value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */,
3411 uint32_t value_offered /* [in] */,
3412 uint32_t *value_needed /* [out] [ref] */,
3413 uint32_t *printerdata_type /* [out] [ref] */,
3414 DATA_BLOB *buffer /* [out] [ref] */,
3415 uint32_t data_offered /* [in] */,
3416 uint32_t *data_needed /* [out] [ref] */,
3419 struct spoolss_EnumPrinterData r;
3423 r.in.handle = handle;
3424 r.in.enum_index = enum_index;
3425 r.in.value_offered = value_offered;
3426 r.in.data_offered = data_offered;
3428 if (DEBUGLEVEL >= 10) {
3429 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &r);
3432 status = cli->dispatch(cli,
3435 NDR_SPOOLSS_ENUMPRINTERDATA,
3438 if (!NT_STATUS_IS_OK(status)) {
3442 if (DEBUGLEVEL >= 10) {
3443 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &r);
3446 if (NT_STATUS_IS_ERR(status)) {
3450 /* Return variables */
3451 memcpy(CONST_DISCARD(char *, value_name), r.out.value_name, r.in.value_offered / 2 * sizeof(*value_name));
3452 *value_needed = *r.out.value_needed;
3453 *printerdata_type = *r.out.printerdata_type;
3454 *buffer = *r.out.buffer;
3455 *data_needed = *r.out.data_needed;
3459 *werror = r.out.result;
3462 return werror_to_ntstatus(r.out.result);
3465 NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli,
3466 TALLOC_CTX *mem_ctx,
3467 struct policy_handle *handle /* [in] [ref] */,
3468 const char *value_name /* [in] [charset(UTF16)] */,
3471 struct spoolss_DeletePrinterData r;
3475 r.in.handle = handle;
3476 r.in.value_name = value_name;
3478 if (DEBUGLEVEL >= 10) {
3479 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &r);
3482 status = cli->dispatch(cli,
3485 NDR_SPOOLSS_DELETEPRINTERDATA,
3488 if (!NT_STATUS_IS_OK(status)) {
3492 if (DEBUGLEVEL >= 10) {
3493 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &r);
3496 if (NT_STATUS_IS_ERR(status)) {
3500 /* Return variables */
3504 *werror = r.out.result;
3507 return werror_to_ntstatus(r.out.result);
3510 NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli,
3511 TALLOC_CTX *mem_ctx,
3514 struct spoolss_4a r;
3519 if (DEBUGLEVEL >= 10) {
3520 NDR_PRINT_IN_DEBUG(spoolss_4a, &r);
3523 status = cli->dispatch(cli,
3529 if (!NT_STATUS_IS_OK(status)) {
3533 if (DEBUGLEVEL >= 10) {
3534 NDR_PRINT_OUT_DEBUG(spoolss_4a, &r);
3537 if (NT_STATUS_IS_ERR(status)) {
3541 /* Return variables */
3545 *werror = r.out.result;
3548 return werror_to_ntstatus(r.out.result);
3551 NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli,
3552 TALLOC_CTX *mem_ctx,
3555 struct spoolss_4b r;
3560 if (DEBUGLEVEL >= 10) {
3561 NDR_PRINT_IN_DEBUG(spoolss_4b, &r);
3564 status = cli->dispatch(cli,
3570 if (!NT_STATUS_IS_OK(status)) {
3574 if (DEBUGLEVEL >= 10) {
3575 NDR_PRINT_OUT_DEBUG(spoolss_4b, &r);
3578 if (NT_STATUS_IS_ERR(status)) {
3582 /* Return variables */
3586 *werror = r.out.result;
3589 return werror_to_ntstatus(r.out.result);
3592 NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli,
3593 TALLOC_CTX *mem_ctx,
3596 struct spoolss_4c r;
3601 if (DEBUGLEVEL >= 10) {
3602 NDR_PRINT_IN_DEBUG(spoolss_4c, &r);
3605 status = cli->dispatch(cli,
3611 if (!NT_STATUS_IS_OK(status)) {
3615 if (DEBUGLEVEL >= 10) {
3616 NDR_PRINT_OUT_DEBUG(spoolss_4c, &r);
3619 if (NT_STATUS_IS_ERR(status)) {
3623 /* Return variables */
3627 *werror = r.out.result;
3630 return werror_to_ntstatus(r.out.result);
3633 NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli,
3634 TALLOC_CTX *mem_ctx,
3635 struct policy_handle *handle /* [in] [ref] */,
3636 const char *key_name /* [in] [charset(UTF16)] */,
3637 const char *value_name /* [in] [charset(UTF16)] */,
3638 uint32_t type /* [in] */,
3639 uint8_t *buffer /* [in] [ref,size_is(offered)] */,
3640 uint32_t offered /* [in] */,
3643 struct spoolss_SetPrinterDataEx r;
3647 r.in.handle = handle;
3648 r.in.key_name = key_name;
3649 r.in.value_name = value_name;
3651 r.in.buffer = buffer;
3652 r.in.offered = offered;
3654 if (DEBUGLEVEL >= 10) {
3655 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &r);
3658 status = cli->dispatch(cli,
3661 NDR_SPOOLSS_SETPRINTERDATAEX,
3664 if (!NT_STATUS_IS_OK(status)) {
3668 if (DEBUGLEVEL >= 10) {
3669 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &r);
3672 if (NT_STATUS_IS_ERR(status)) {
3676 /* Return variables */
3680 *werror = r.out.result;
3683 return werror_to_ntstatus(r.out.result);
3686 NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli,
3687 TALLOC_CTX *mem_ctx,
3688 struct policy_handle *handle /* [in] [ref] */,
3689 const char *key_name /* [in] [charset(UTF16)] */,
3690 const char *value_name /* [in] [charset(UTF16)] */,
3691 uint32_t *type /* [out] [ref] */,
3692 uint8_t *buffer /* [out] [ref,size_is(offered)] */,
3693 uint32_t offered /* [in] */,
3694 uint32_t *needed /* [out] [ref] */,
3697 struct spoolss_GetPrinterDataEx r;
3701 r.in.handle = handle;
3702 r.in.key_name = key_name;
3703 r.in.value_name = value_name;
3704 r.in.offered = offered;
3706 if (DEBUGLEVEL >= 10) {
3707 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &r);
3710 status = cli->dispatch(cli,
3713 NDR_SPOOLSS_GETPRINTERDATAEX,
3716 if (!NT_STATUS_IS_OK(status)) {
3720 if (DEBUGLEVEL >= 10) {
3721 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &r);
3724 if (NT_STATUS_IS_ERR(status)) {
3728 /* Return variables */
3729 *type = *r.out.type;
3730 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3731 *needed = *r.out.needed;
3735 *werror = r.out.result;
3738 return werror_to_ntstatus(r.out.result);
3741 NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli,
3742 TALLOC_CTX *mem_ctx,
3743 struct policy_handle *handle /* [in] [ref] */,
3744 const char *key_name /* [in] [charset(UTF16)] */,
3745 uint8_t *buffer /* [out] [ref,size_is(offered)] */,
3746 uint32_t offered /* [in] */,
3747 uint32_t *needed /* [out] [ref] */,
3748 uint32_t *count /* [out] [ref] */,
3751 struct spoolss_EnumPrinterDataEx r;
3755 r.in.handle = handle;
3756 r.in.key_name = key_name;
3757 r.in.offered = offered;
3759 if (DEBUGLEVEL >= 10) {
3760 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &r);
3763 status = cli->dispatch(cli,
3766 NDR_SPOOLSS_ENUMPRINTERDATAEX,
3769 if (!NT_STATUS_IS_OK(status)) {
3773 if (DEBUGLEVEL >= 10) {
3774 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &r);
3777 if (NT_STATUS_IS_ERR(status)) {
3781 /* Return variables */
3782 memcpy(buffer, r.out.buffer, r.in.offered * sizeof(*buffer));
3783 *needed = *r.out.needed;
3784 *count = *r.out.count;
3788 *werror = r.out.result;
3791 return werror_to_ntstatus(r.out.result);
3794 NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli,
3795 TALLOC_CTX *mem_ctx,
3796 struct policy_handle *handle /* [in] [ref] */,
3797 const char *key_name /* [in] [charset(UTF16)] */,
3798 uint16_t *key_buffer /* [out] [ref,size_is(key_buffer_size/2)] */,
3799 uint32_t key_buffer_size /* [in] */,
3800 uint32_t *needed /* [out] [ref] */,
3803 struct spoolss_EnumPrinterKey r;
3807 r.in.handle = handle;
3808 r.in.key_name = key_name;
3809 r.in.key_buffer_size = key_buffer_size;
3811 if (DEBUGLEVEL >= 10) {
3812 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &r);
3815 status = cli->dispatch(cli,
3818 NDR_SPOOLSS_ENUMPRINTERKEY,
3821 if (!NT_STATUS_IS_OK(status)) {
3825 if (DEBUGLEVEL >= 10) {
3826 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &r);
3829 if (NT_STATUS_IS_ERR(status)) {
3833 /* Return variables */
3834 memcpy(key_buffer, r.out.key_buffer, r.in.key_buffer_size / 2 * sizeof(*key_buffer));
3835 *needed = *r.out.needed;
3839 *werror = r.out.result;
3842 return werror_to_ntstatus(r.out.result);
3845 NTSTATUS rpccli_spoolss_DeletePrinterDataEx(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 *value_name /* [in] [charset(UTF16)] */,
3852 struct spoolss_DeletePrinterDataEx r;
3856 r.in.handle = handle;
3857 r.in.key_name = key_name;
3858 r.in.value_name = value_name;
3860 if (DEBUGLEVEL >= 10) {
3861 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &r);
3864 status = cli->dispatch(cli,
3867 NDR_SPOOLSS_DELETEPRINTERDATAEX,
3870 if (!NT_STATUS_IS_OK(status)) {
3874 if (DEBUGLEVEL >= 10) {
3875 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &r);
3878 if (NT_STATUS_IS_ERR(status)) {
3882 /* Return variables */
3886 *werror = r.out.result;
3889 return werror_to_ntstatus(r.out.result);
3892 NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli,
3893 TALLOC_CTX *mem_ctx,
3894 struct policy_handle *handle /* [in] [ref] */,
3895 const char *key_name /* [in] [charset(UTF16)] */,
3898 struct spoolss_DeletePrinterKey r;
3902 r.in.handle = handle;
3903 r.in.key_name = key_name;
3905 if (DEBUGLEVEL >= 10) {
3906 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &r);
3909 status = cli->dispatch(cli,
3912 NDR_SPOOLSS_DELETEPRINTERKEY,
3915 if (!NT_STATUS_IS_OK(status)) {
3919 if (DEBUGLEVEL >= 10) {
3920 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &r);
3923 if (NT_STATUS_IS_ERR(status)) {
3927 /* Return variables */
3931 *werror = r.out.result;
3934 return werror_to_ntstatus(r.out.result);
3937 NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
3938 TALLOC_CTX *mem_ctx,
3941 struct spoolss_53 r;
3946 if (DEBUGLEVEL >= 10) {
3947 NDR_PRINT_IN_DEBUG(spoolss_53, &r);
3950 status = cli->dispatch(cli,
3956 if (!NT_STATUS_IS_OK(status)) {
3960 if (DEBUGLEVEL >= 10) {
3961 NDR_PRINT_OUT_DEBUG(spoolss_53, &r);
3964 if (NT_STATUS_IS_ERR(status)) {
3968 /* Return variables */
3972 *werror = r.out.result;
3975 return werror_to_ntstatus(r.out.result);
3978 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
3979 TALLOC_CTX *mem_ctx,
3980 const char *server /* [in] [unique,charset(UTF16)] */,
3981 const char *architecture /* [in] [charset(UTF16)] */,
3982 const char *driver /* [in] [charset(UTF16)] */,
3983 uint32_t delete_flags /* [in] */,
3984 uint32_t version /* [in] */,
3987 struct spoolss_DeletePrinterDriverEx r;
3991 r.in.server = server;
3992 r.in.architecture = architecture;
3993 r.in.driver = driver;
3994 r.in.delete_flags = delete_flags;
3995 r.in.version = version;
3997 if (DEBUGLEVEL >= 10) {
3998 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
4001 status = cli->dispatch(cli,
4004 NDR_SPOOLSS_DELETEPRINTERDRIVEREX,
4007 if (!NT_STATUS_IS_OK(status)) {
4011 if (DEBUGLEVEL >= 10) {
4012 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &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_55(struct rpc_pipe_client *cli,
4030 TALLOC_CTX *mem_ctx,
4033 struct spoolss_55 r;
4038 if (DEBUGLEVEL >= 10) {
4039 NDR_PRINT_IN_DEBUG(spoolss_55, &r);
4042 status = cli->dispatch(cli,
4048 if (!NT_STATUS_IS_OK(status)) {
4052 if (DEBUGLEVEL >= 10) {
4053 NDR_PRINT_OUT_DEBUG(spoolss_55, &r);
4056 if (NT_STATUS_IS_ERR(status)) {
4060 /* Return variables */
4064 *werror = r.out.result;
4067 return werror_to_ntstatus(r.out.result);
4070 NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli,
4071 TALLOC_CTX *mem_ctx,
4074 struct spoolss_56 r;
4079 if (DEBUGLEVEL >= 10) {
4080 NDR_PRINT_IN_DEBUG(spoolss_56, &r);
4083 status = cli->dispatch(cli,
4089 if (!NT_STATUS_IS_OK(status)) {
4093 if (DEBUGLEVEL >= 10) {
4094 NDR_PRINT_OUT_DEBUG(spoolss_56, &r);
4097 if (NT_STATUS_IS_ERR(status)) {
4101 /* Return variables */
4105 *werror = r.out.result;
4108 return werror_to_ntstatus(r.out.result);
4111 NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli,
4112 TALLOC_CTX *mem_ctx,
4115 struct spoolss_57 r;
4120 if (DEBUGLEVEL >= 10) {
4121 NDR_PRINT_IN_DEBUG(spoolss_57, &r);
4124 status = cli->dispatch(cli,
4130 if (!NT_STATUS_IS_OK(status)) {
4134 if (DEBUGLEVEL >= 10) {
4135 NDR_PRINT_OUT_DEBUG(spoolss_57, &r);
4138 if (NT_STATUS_IS_ERR(status)) {
4142 /* Return variables */
4146 *werror = r.out.result;
4149 return werror_to_ntstatus(r.out.result);
4152 NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli,
4153 TALLOC_CTX *mem_ctx,
4154 struct policy_handle *handle /* [in] [ref] */,
4155 const char *function_name /* [in] [charset(UTF16)] */,
4156 DATA_BLOB in_data /* [in] */,
4157 uint32_t _in_data_length /* [in] [value(r->in.in_data.length)] */,
4158 uint8_t *out_data /* [out] [ref,size_is(out_data_size)] */,
4159 uint32_t out_data_size /* [in] */,
4160 uint32_t *needed /* [out] [ref] */,
4161 uint32_t *status_code /* [in,out] [ref] */,
4164 struct spoolss_XcvData r;
4168 r.in.handle = handle;
4169 r.in.function_name = function_name;
4170 r.in.in_data = in_data;
4171 r.in._in_data_length = _in_data_length;
4172 r.in.out_data_size = out_data_size;
4173 r.in.status_code = status_code;
4175 if (DEBUGLEVEL >= 10) {
4176 NDR_PRINT_IN_DEBUG(spoolss_XcvData, &r);
4179 status = cli->dispatch(cli,
4182 NDR_SPOOLSS_XCVDATA,
4185 if (!NT_STATUS_IS_OK(status)) {
4189 if (DEBUGLEVEL >= 10) {
4190 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &r);
4193 if (NT_STATUS_IS_ERR(status)) {
4197 /* Return variables */
4198 memcpy(out_data, r.out.out_data, r.in.out_data_size * sizeof(*out_data));
4199 *needed = *r.out.needed;
4200 *status_code = *r.out.status_code;
4204 *werror = r.out.result;
4207 return werror_to_ntstatus(r.out.result);
4210 NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli,
4211 TALLOC_CTX *mem_ctx,
4212 const char *servername /* [in] [unique,charset(UTF16)] */,
4213 struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */,
4214 uint32_t flags /* [in] */,
4217 struct spoolss_AddPrinterDriverEx r;
4221 r.in.servername = servername;
4222 r.in.info_ctr = info_ctr;
4225 if (DEBUGLEVEL >= 10) {
4226 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &r);
4229 status = cli->dispatch(cli,
4232 NDR_SPOOLSS_ADDPRINTERDRIVEREX,
4235 if (!NT_STATUS_IS_OK(status)) {
4239 if (DEBUGLEVEL >= 10) {
4240 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &r);
4243 if (NT_STATUS_IS_ERR(status)) {
4247 /* Return variables */
4251 *werror = r.out.result;
4254 return werror_to_ntstatus(r.out.result);
4257 NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli,
4258 TALLOC_CTX *mem_ctx,
4261 struct spoolss_5a r;
4266 if (DEBUGLEVEL >= 10) {
4267 NDR_PRINT_IN_DEBUG(spoolss_5a, &r);
4270 status = cli->dispatch(cli,
4276 if (!NT_STATUS_IS_OK(status)) {
4280 if (DEBUGLEVEL >= 10) {
4281 NDR_PRINT_OUT_DEBUG(spoolss_5a, &r);
4284 if (NT_STATUS_IS_ERR(status)) {
4288 /* Return variables */
4292 *werror = r.out.result;
4295 return werror_to_ntstatus(r.out.result);
4298 NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli,
4299 TALLOC_CTX *mem_ctx,
4302 struct spoolss_5b r;
4307 if (DEBUGLEVEL >= 10) {
4308 NDR_PRINT_IN_DEBUG(spoolss_5b, &r);
4311 status = cli->dispatch(cli,
4317 if (!NT_STATUS_IS_OK(status)) {
4321 if (DEBUGLEVEL >= 10) {
4322 NDR_PRINT_OUT_DEBUG(spoolss_5b, &r);
4325 if (NT_STATUS_IS_ERR(status)) {
4329 /* Return variables */
4333 *werror = r.out.result;
4336 return werror_to_ntstatus(r.out.result);
4339 NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli,
4340 TALLOC_CTX *mem_ctx,
4343 struct spoolss_5c r;
4348 if (DEBUGLEVEL >= 10) {
4349 NDR_PRINT_IN_DEBUG(spoolss_5c, &r);
4352 status = cli->dispatch(cli,
4358 if (!NT_STATUS_IS_OK(status)) {
4362 if (DEBUGLEVEL >= 10) {
4363 NDR_PRINT_OUT_DEBUG(spoolss_5c, &r);
4366 if (NT_STATUS_IS_ERR(status)) {
4370 /* Return variables */
4374 *werror = r.out.result;
4377 return werror_to_ntstatus(r.out.result);
4380 NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli,
4381 TALLOC_CTX *mem_ctx,
4384 struct spoolss_5d r;
4389 if (DEBUGLEVEL >= 10) {
4390 NDR_PRINT_IN_DEBUG(spoolss_5d, &r);
4393 status = cli->dispatch(cli,
4399 if (!NT_STATUS_IS_OK(status)) {
4403 if (DEBUGLEVEL >= 10) {
4404 NDR_PRINT_OUT_DEBUG(spoolss_5d, &r);
4407 if (NT_STATUS_IS_ERR(status)) {
4411 /* Return variables */
4415 *werror = r.out.result;
4418 return werror_to_ntstatus(r.out.result);
4421 NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli,
4422 TALLOC_CTX *mem_ctx,
4425 struct spoolss_5e r;
4430 if (DEBUGLEVEL >= 10) {
4431 NDR_PRINT_IN_DEBUG(spoolss_5e, &r);
4434 status = cli->dispatch(cli,
4440 if (!NT_STATUS_IS_OK(status)) {
4444 if (DEBUGLEVEL >= 10) {
4445 NDR_PRINT_OUT_DEBUG(spoolss_5e, &r);
4448 if (NT_STATUS_IS_ERR(status)) {
4452 /* Return variables */
4456 *werror = r.out.result;
4459 return werror_to_ntstatus(r.out.result);
4462 NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli,
4463 TALLOC_CTX *mem_ctx,
4466 struct spoolss_5f r;
4471 if (DEBUGLEVEL >= 10) {
4472 NDR_PRINT_IN_DEBUG(spoolss_5f, &r);
4475 status = cli->dispatch(cli,
4481 if (!NT_STATUS_IS_OK(status)) {
4485 if (DEBUGLEVEL >= 10) {
4486 NDR_PRINT_OUT_DEBUG(spoolss_5f, &r);
4489 if (NT_STATUS_IS_ERR(status)) {
4493 /* Return variables */
4497 *werror = r.out.result;
4500 return werror_to_ntstatus(r.out.result);