2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/srv_spoolss.h"
9 static bool api_spoolss_EnumPrinters(pipes_struct *p)
11 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
14 enum ndr_err_code ndr_err;
16 struct spoolss_EnumPrinters *r;
18 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERS];
20 r = talloc(talloc_tos(), struct spoolss_EnumPrinters);
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
30 pull = ndr_pull_init_blob(&blob, r, NULL);
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 ndr_err = call->ndr_pull(pull, NDR_IN, r);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, r);
48 r->out.count = talloc_zero(r, uint32_t);
49 if (r->out.count == NULL) {
54 r->out.info = talloc_zero(r, union spoolss_PrinterInfo *);
55 if (r->out.info == NULL) {
60 r->out.needed = talloc_zero(r, uint32_t);
61 if (r->out.needed == NULL) {
66 r->out.result = _spoolss_EnumPrinters(p, r);
68 if (p->rng_fault_state) {
70 /* Return true here, srv_pipe_hnd.c will take care */
74 if (DEBUGLEVEL >= 10) {
75 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, r);
78 push = ndr_push_init_ctx(r, NULL);
84 ndr_err = call->ndr_push(push, NDR_OUT, r);
85 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
90 blob = ndr_push_blob(push);
91 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
101 static bool api_spoolss_OpenPrinter(pipes_struct *p)
103 const struct ndr_interface_call *call;
104 struct ndr_pull *pull;
105 struct ndr_push *push;
106 enum ndr_err_code ndr_err;
108 struct spoolss_OpenPrinter *r;
110 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTER];
112 r = talloc(talloc_tos(), struct spoolss_OpenPrinter);
117 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
122 pull = ndr_pull_init_blob(&blob, r, NULL);
128 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
129 ndr_err = call->ndr_pull(pull, NDR_IN, r);
130 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
135 if (DEBUGLEVEL >= 10) {
136 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, r);
140 r->out.handle = talloc_zero(r, struct policy_handle);
141 if (r->out.handle == NULL) {
146 r->out.result = _spoolss_OpenPrinter(p, r);
148 if (p->rng_fault_state) {
150 /* Return true here, srv_pipe_hnd.c will take care */
154 if (DEBUGLEVEL >= 10) {
155 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, r);
158 push = ndr_push_init_ctx(r, NULL);
164 ndr_err = call->ndr_push(push, NDR_OUT, r);
165 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
170 blob = ndr_push_blob(push);
171 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
181 static bool api_spoolss_SetJob(pipes_struct *p)
183 const struct ndr_interface_call *call;
184 struct ndr_pull *pull;
185 struct ndr_push *push;
186 enum ndr_err_code ndr_err;
188 struct spoolss_SetJob *r;
190 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETJOB];
192 r = talloc(talloc_tos(), struct spoolss_SetJob);
197 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
202 pull = ndr_pull_init_blob(&blob, r, NULL);
208 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
209 ndr_err = call->ndr_pull(pull, NDR_IN, r);
210 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
215 if (DEBUGLEVEL >= 10) {
216 NDR_PRINT_IN_DEBUG(spoolss_SetJob, r);
219 r->out.result = _spoolss_SetJob(p, r);
221 if (p->rng_fault_state) {
223 /* Return true here, srv_pipe_hnd.c will take care */
227 if (DEBUGLEVEL >= 10) {
228 NDR_PRINT_OUT_DEBUG(spoolss_SetJob, r);
231 push = ndr_push_init_ctx(r, NULL);
237 ndr_err = call->ndr_push(push, NDR_OUT, r);
238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
243 blob = ndr_push_blob(push);
244 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
254 static bool api_spoolss_GetJob(pipes_struct *p)
256 const struct ndr_interface_call *call;
257 struct ndr_pull *pull;
258 struct ndr_push *push;
259 enum ndr_err_code ndr_err;
261 struct spoolss_GetJob *r;
263 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETJOB];
265 r = talloc(talloc_tos(), struct spoolss_GetJob);
270 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
275 pull = ndr_pull_init_blob(&blob, r, NULL);
281 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
282 ndr_err = call->ndr_pull(pull, NDR_IN, r);
283 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
288 if (DEBUGLEVEL >= 10) {
289 NDR_PRINT_IN_DEBUG(spoolss_GetJob, r);
293 r->out.info = talloc_zero(r, union spoolss_JobInfo);
294 if (r->out.info == NULL) {
299 r->out.needed = talloc_zero(r, uint32_t);
300 if (r->out.needed == NULL) {
305 r->out.result = _spoolss_GetJob(p, r);
307 if (p->rng_fault_state) {
309 /* Return true here, srv_pipe_hnd.c will take care */
313 if (DEBUGLEVEL >= 10) {
314 NDR_PRINT_OUT_DEBUG(spoolss_GetJob, r);
317 push = ndr_push_init_ctx(r, NULL);
323 ndr_err = call->ndr_push(push, NDR_OUT, r);
324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
329 blob = ndr_push_blob(push);
330 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
340 static bool api_spoolss_EnumJobs(pipes_struct *p)
342 const struct ndr_interface_call *call;
343 struct ndr_pull *pull;
344 struct ndr_push *push;
345 enum ndr_err_code ndr_err;
347 struct spoolss_EnumJobs *r;
349 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMJOBS];
351 r = talloc(talloc_tos(), struct spoolss_EnumJobs);
356 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
361 pull = ndr_pull_init_blob(&blob, r, NULL);
367 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
368 ndr_err = call->ndr_pull(pull, NDR_IN, r);
369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
374 if (DEBUGLEVEL >= 10) {
375 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, r);
379 r->out.count = talloc_zero(r, uint32_t);
380 if (r->out.count == NULL) {
385 r->out.info = talloc_zero(r, union spoolss_JobInfo *);
386 if (r->out.info == NULL) {
391 r->out.needed = talloc_zero(r, uint32_t);
392 if (r->out.needed == NULL) {
397 r->out.result = _spoolss_EnumJobs(p, r);
399 if (p->rng_fault_state) {
401 /* Return true here, srv_pipe_hnd.c will take care */
405 if (DEBUGLEVEL >= 10) {
406 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, r);
409 push = ndr_push_init_ctx(r, NULL);
415 ndr_err = call->ndr_push(push, NDR_OUT, r);
416 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
421 blob = ndr_push_blob(push);
422 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
432 static bool api_spoolss_AddPrinter(pipes_struct *p)
434 const struct ndr_interface_call *call;
435 struct ndr_pull *pull;
436 struct ndr_push *push;
437 enum ndr_err_code ndr_err;
439 struct spoolss_AddPrinter *r;
441 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTER];
443 r = talloc(talloc_tos(), struct spoolss_AddPrinter);
448 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
453 pull = ndr_pull_init_blob(&blob, r, NULL);
459 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
460 ndr_err = call->ndr_pull(pull, NDR_IN, r);
461 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
466 if (DEBUGLEVEL >= 10) {
467 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, r);
470 r->out.result = _spoolss_AddPrinter(p, r);
472 if (p->rng_fault_state) {
474 /* Return true here, srv_pipe_hnd.c will take care */
478 if (DEBUGLEVEL >= 10) {
479 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, r);
482 push = ndr_push_init_ctx(r, NULL);
488 ndr_err = call->ndr_push(push, NDR_OUT, r);
489 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
494 blob = ndr_push_blob(push);
495 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
505 static bool api_spoolss_DeletePrinter(pipes_struct *p)
507 const struct ndr_interface_call *call;
508 struct ndr_pull *pull;
509 struct ndr_push *push;
510 enum ndr_err_code ndr_err;
512 struct spoolss_DeletePrinter *r;
514 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTER];
516 r = talloc(talloc_tos(), struct spoolss_DeletePrinter);
521 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
526 pull = ndr_pull_init_blob(&blob, r, NULL);
532 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
533 ndr_err = call->ndr_pull(pull, NDR_IN, r);
534 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
539 if (DEBUGLEVEL >= 10) {
540 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, r);
543 r->out.result = _spoolss_DeletePrinter(p, r);
545 if (p->rng_fault_state) {
547 /* Return true here, srv_pipe_hnd.c will take care */
551 if (DEBUGLEVEL >= 10) {
552 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, r);
555 push = ndr_push_init_ctx(r, NULL);
561 ndr_err = call->ndr_push(push, NDR_OUT, r);
562 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
567 blob = ndr_push_blob(push);
568 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
578 static bool api_spoolss_SetPrinter(pipes_struct *p)
580 const struct ndr_interface_call *call;
581 struct ndr_pull *pull;
582 struct ndr_push *push;
583 enum ndr_err_code ndr_err;
585 struct spoolss_SetPrinter *r;
587 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTER];
589 r = talloc(talloc_tos(), struct spoolss_SetPrinter);
594 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
599 pull = ndr_pull_init_blob(&blob, r, NULL);
605 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
606 ndr_err = call->ndr_pull(pull, NDR_IN, r);
607 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
612 if (DEBUGLEVEL >= 10) {
613 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, r);
616 r->out.result = _spoolss_SetPrinter(p, r);
618 if (p->rng_fault_state) {
620 /* Return true here, srv_pipe_hnd.c will take care */
624 if (DEBUGLEVEL >= 10) {
625 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, r);
628 push = ndr_push_init_ctx(r, NULL);
634 ndr_err = call->ndr_push(push, NDR_OUT, r);
635 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
640 blob = ndr_push_blob(push);
641 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
651 static bool api_spoolss_GetPrinter(pipes_struct *p)
653 const struct ndr_interface_call *call;
654 struct ndr_pull *pull;
655 struct ndr_push *push;
656 enum ndr_err_code ndr_err;
658 struct spoolss_GetPrinter *r;
660 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTER];
662 r = talloc(talloc_tos(), struct spoolss_GetPrinter);
667 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
672 pull = ndr_pull_init_blob(&blob, r, NULL);
678 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
679 ndr_err = call->ndr_pull(pull, NDR_IN, r);
680 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
685 if (DEBUGLEVEL >= 10) {
686 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, r);
690 r->out.info = talloc_zero(r, union spoolss_PrinterInfo);
691 if (r->out.info == NULL) {
696 r->out.needed = talloc_zero(r, uint32_t);
697 if (r->out.needed == NULL) {
702 r->out.result = _spoolss_GetPrinter(p, r);
704 if (p->rng_fault_state) {
706 /* Return true here, srv_pipe_hnd.c will take care */
710 if (DEBUGLEVEL >= 10) {
711 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, r);
714 push = ndr_push_init_ctx(r, NULL);
720 ndr_err = call->ndr_push(push, NDR_OUT, r);
721 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
726 blob = ndr_push_blob(push);
727 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
737 static bool api_spoolss_AddPrinterDriver(pipes_struct *p)
739 const struct ndr_interface_call *call;
740 struct ndr_pull *pull;
741 struct ndr_push *push;
742 enum ndr_err_code ndr_err;
744 struct spoolss_AddPrinterDriver *r;
746 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVER];
748 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriver);
753 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
758 pull = ndr_pull_init_blob(&blob, r, NULL);
764 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
765 ndr_err = call->ndr_pull(pull, NDR_IN, r);
766 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
771 if (DEBUGLEVEL >= 10) {
772 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, r);
775 r->out.result = _spoolss_AddPrinterDriver(p, r);
777 if (p->rng_fault_state) {
779 /* Return true here, srv_pipe_hnd.c will take care */
783 if (DEBUGLEVEL >= 10) {
784 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, r);
787 push = ndr_push_init_ctx(r, NULL);
793 ndr_err = call->ndr_push(push, NDR_OUT, r);
794 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
799 blob = ndr_push_blob(push);
800 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
810 static bool api_spoolss_EnumPrinterDrivers(pipes_struct *p)
812 const struct ndr_interface_call *call;
813 struct ndr_pull *pull;
814 struct ndr_push *push;
815 enum ndr_err_code ndr_err;
817 struct spoolss_EnumPrinterDrivers *r;
819 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDRIVERS];
821 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDrivers);
826 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
831 pull = ndr_pull_init_blob(&blob, r, NULL);
837 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
838 ndr_err = call->ndr_pull(pull, NDR_IN, r);
839 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
844 if (DEBUGLEVEL >= 10) {
845 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, r);
849 r->out.count = talloc_zero(r, uint32_t);
850 if (r->out.count == NULL) {
855 r->out.info = talloc_zero(r, union spoolss_DriverInfo *);
856 if (r->out.info == NULL) {
861 r->out.needed = talloc_zero(r, uint32_t);
862 if (r->out.needed == NULL) {
867 r->out.result = _spoolss_EnumPrinterDrivers(p, r);
869 if (p->rng_fault_state) {
871 /* Return true here, srv_pipe_hnd.c will take care */
875 if (DEBUGLEVEL >= 10) {
876 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, r);
879 push = ndr_push_init_ctx(r, NULL);
885 ndr_err = call->ndr_push(push, NDR_OUT, r);
886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
891 blob = ndr_push_blob(push);
892 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
902 static bool api_spoolss_GetPrinterDriver(pipes_struct *p)
904 const struct ndr_interface_call *call;
905 struct ndr_pull *pull;
906 struct ndr_push *push;
907 enum ndr_err_code ndr_err;
909 struct spoolss_GetPrinterDriver *r;
911 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER];
913 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver);
918 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
923 pull = ndr_pull_init_blob(&blob, r, NULL);
929 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
930 ndr_err = call->ndr_pull(pull, NDR_IN, r);
931 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
936 if (DEBUGLEVEL >= 10) {
937 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, r);
940 r->out.result = _spoolss_GetPrinterDriver(p, r);
942 if (p->rng_fault_state) {
944 /* Return true here, srv_pipe_hnd.c will take care */
948 if (DEBUGLEVEL >= 10) {
949 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, r);
952 push = ndr_push_init_ctx(r, NULL);
958 ndr_err = call->ndr_push(push, NDR_OUT, r);
959 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
964 blob = ndr_push_blob(push);
965 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
975 static bool api_spoolss_GetPrinterDriverDirectory(pipes_struct *p)
977 const struct ndr_interface_call *call;
978 struct ndr_pull *pull;
979 struct ndr_push *push;
980 enum ndr_err_code ndr_err;
982 struct spoolss_GetPrinterDriverDirectory *r;
984 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY];
986 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriverDirectory);
991 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
996 pull = ndr_pull_init_blob(&blob, r, NULL);
1002 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1003 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1004 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1009 if (DEBUGLEVEL >= 10) {
1010 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, r);
1013 ZERO_STRUCT(r->out);
1014 r->out.info = talloc_zero(r, union spoolss_DriverDirectoryInfo);
1015 if (r->out.info == NULL) {
1020 r->out.needed = talloc_zero(r, uint32_t);
1021 if (r->out.needed == NULL) {
1026 r->out.result = _spoolss_GetPrinterDriverDirectory(p, r);
1028 if (p->rng_fault_state) {
1030 /* Return true here, srv_pipe_hnd.c will take care */
1034 if (DEBUGLEVEL >= 10) {
1035 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, r);
1038 push = ndr_push_init_ctx(r, NULL);
1044 ndr_err = call->ndr_push(push, NDR_OUT, r);
1045 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1050 blob = ndr_push_blob(push);
1051 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1061 static bool api_spoolss_DeletePrinterDriver(pipes_struct *p)
1063 const struct ndr_interface_call *call;
1064 struct ndr_pull *pull;
1065 struct ndr_push *push;
1066 enum ndr_err_code ndr_err;
1068 struct spoolss_DeletePrinterDriver *r;
1070 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVER];
1072 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriver);
1077 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1082 pull = ndr_pull_init_blob(&blob, r, NULL);
1088 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1089 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1090 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1095 if (DEBUGLEVEL >= 10) {
1096 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, r);
1099 r->out.result = _spoolss_DeletePrinterDriver(p, r);
1101 if (p->rng_fault_state) {
1103 /* Return true here, srv_pipe_hnd.c will take care */
1107 if (DEBUGLEVEL >= 10) {
1108 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, r);
1111 push = ndr_push_init_ctx(r, NULL);
1117 ndr_err = call->ndr_push(push, NDR_OUT, r);
1118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1123 blob = ndr_push_blob(push);
1124 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1134 static bool api_spoolss_AddPrintProcessor(pipes_struct *p)
1136 const struct ndr_interface_call *call;
1137 struct ndr_pull *pull;
1138 struct ndr_push *push;
1139 enum ndr_err_code ndr_err;
1141 struct spoolss_AddPrintProcessor *r;
1143 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROCESSOR];
1145 r = talloc(talloc_tos(), struct spoolss_AddPrintProcessor);
1150 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1155 pull = ndr_pull_init_blob(&blob, r, NULL);
1161 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1162 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1163 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1168 if (DEBUGLEVEL >= 10) {
1169 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, r);
1172 r->out.result = _spoolss_AddPrintProcessor(p, r);
1174 if (p->rng_fault_state) {
1176 /* Return true here, srv_pipe_hnd.c will take care */
1180 if (DEBUGLEVEL >= 10) {
1181 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, r);
1184 push = ndr_push_init_ctx(r, NULL);
1190 ndr_err = call->ndr_push(push, NDR_OUT, r);
1191 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1196 blob = ndr_push_blob(push);
1197 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1207 static bool api_spoolss_EnumPrintProcessors(pipes_struct *p)
1209 const struct ndr_interface_call *call;
1210 struct ndr_pull *pull;
1211 struct ndr_push *push;
1212 enum ndr_err_code ndr_err;
1214 struct spoolss_EnumPrintProcessors *r;
1216 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCESSORS];
1218 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcessors);
1223 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1228 pull = ndr_pull_init_blob(&blob, r, NULL);
1234 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1235 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1236 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1241 if (DEBUGLEVEL >= 10) {
1242 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, r);
1245 ZERO_STRUCT(r->out);
1246 r->out.count = talloc_zero(r, uint32_t);
1247 if (r->out.count == NULL) {
1252 r->out.info = talloc_zero(r, union spoolss_PrintProcessorInfo *);
1253 if (r->out.info == NULL) {
1258 r->out.needed = talloc_zero(r, uint32_t);
1259 if (r->out.needed == NULL) {
1264 r->out.result = _spoolss_EnumPrintProcessors(p, r);
1266 if (p->rng_fault_state) {
1268 /* Return true here, srv_pipe_hnd.c will take care */
1272 if (DEBUGLEVEL >= 10) {
1273 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, r);
1276 push = ndr_push_init_ctx(r, NULL);
1282 ndr_err = call->ndr_push(push, NDR_OUT, r);
1283 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1288 blob = ndr_push_blob(push);
1289 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1299 static bool api_spoolss_GetPrintProcessorDirectory(pipes_struct *p)
1301 const struct ndr_interface_call *call;
1302 struct ndr_pull *pull;
1303 struct ndr_push *push;
1304 enum ndr_err_code ndr_err;
1306 struct spoolss_GetPrintProcessorDirectory *r;
1308 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY];
1310 r = talloc(talloc_tos(), struct spoolss_GetPrintProcessorDirectory);
1315 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1320 pull = ndr_pull_init_blob(&blob, r, NULL);
1326 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1327 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1328 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1333 if (DEBUGLEVEL >= 10) {
1334 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1337 ZERO_STRUCT(r->out);
1338 r->out.info = talloc_zero(r, union spoolss_PrintProcessorDirectoryInfo);
1339 if (r->out.info == NULL) {
1344 r->out.needed = talloc_zero(r, uint32_t);
1345 if (r->out.needed == NULL) {
1350 r->out.result = _spoolss_GetPrintProcessorDirectory(p, r);
1352 if (p->rng_fault_state) {
1354 /* Return true here, srv_pipe_hnd.c will take care */
1358 if (DEBUGLEVEL >= 10) {
1359 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1362 push = ndr_push_init_ctx(r, NULL);
1368 ndr_err = call->ndr_push(push, NDR_OUT, r);
1369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1374 blob = ndr_push_blob(push);
1375 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1385 static bool api_spoolss_StartDocPrinter(pipes_struct *p)
1387 const struct ndr_interface_call *call;
1388 struct ndr_pull *pull;
1389 struct ndr_push *push;
1390 enum ndr_err_code ndr_err;
1392 struct spoolss_StartDocPrinter *r;
1394 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTDOCPRINTER];
1396 r = talloc(talloc_tos(), struct spoolss_StartDocPrinter);
1401 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1406 pull = ndr_pull_init_blob(&blob, r, NULL);
1412 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1413 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1414 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1419 if (DEBUGLEVEL >= 10) {
1420 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, r);
1423 ZERO_STRUCT(r->out);
1424 r->out.job_id = talloc_zero(r, uint32_t);
1425 if (r->out.job_id == NULL) {
1430 r->out.result = _spoolss_StartDocPrinter(p, r);
1432 if (p->rng_fault_state) {
1434 /* Return true here, srv_pipe_hnd.c will take care */
1438 if (DEBUGLEVEL >= 10) {
1439 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, r);
1442 push = ndr_push_init_ctx(r, NULL);
1448 ndr_err = call->ndr_push(push, NDR_OUT, r);
1449 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1454 blob = ndr_push_blob(push);
1455 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1465 static bool api_spoolss_StartPagePrinter(pipes_struct *p)
1467 const struct ndr_interface_call *call;
1468 struct ndr_pull *pull;
1469 struct ndr_push *push;
1470 enum ndr_err_code ndr_err;
1472 struct spoolss_StartPagePrinter *r;
1474 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTPAGEPRINTER];
1476 r = talloc(talloc_tos(), struct spoolss_StartPagePrinter);
1481 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1486 pull = ndr_pull_init_blob(&blob, r, NULL);
1492 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1493 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1494 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1499 if (DEBUGLEVEL >= 10) {
1500 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, r);
1503 r->out.result = _spoolss_StartPagePrinter(p, r);
1505 if (p->rng_fault_state) {
1507 /* Return true here, srv_pipe_hnd.c will take care */
1511 if (DEBUGLEVEL >= 10) {
1512 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, r);
1515 push = ndr_push_init_ctx(r, NULL);
1521 ndr_err = call->ndr_push(push, NDR_OUT, r);
1522 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1527 blob = ndr_push_blob(push);
1528 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1538 static bool api_spoolss_WritePrinter(pipes_struct *p)
1540 const struct ndr_interface_call *call;
1541 struct ndr_pull *pull;
1542 struct ndr_push *push;
1543 enum ndr_err_code ndr_err;
1545 struct spoolss_WritePrinter *r;
1547 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WRITEPRINTER];
1549 r = talloc(talloc_tos(), struct spoolss_WritePrinter);
1554 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1559 pull = ndr_pull_init_blob(&blob, r, NULL);
1565 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1566 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1567 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1572 if (DEBUGLEVEL >= 10) {
1573 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, r);
1576 ZERO_STRUCT(r->out);
1577 r->out.num_written = talloc_zero(r, uint32_t);
1578 if (r->out.num_written == NULL) {
1583 r->out.result = _spoolss_WritePrinter(p, r);
1585 if (p->rng_fault_state) {
1587 /* Return true here, srv_pipe_hnd.c will take care */
1591 if (DEBUGLEVEL >= 10) {
1592 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, r);
1595 push = ndr_push_init_ctx(r, NULL);
1601 ndr_err = call->ndr_push(push, NDR_OUT, r);
1602 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1607 blob = ndr_push_blob(push);
1608 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1618 static bool api_spoolss_EndPagePrinter(pipes_struct *p)
1620 const struct ndr_interface_call *call;
1621 struct ndr_pull *pull;
1622 struct ndr_push *push;
1623 enum ndr_err_code ndr_err;
1625 struct spoolss_EndPagePrinter *r;
1627 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDPAGEPRINTER];
1629 r = talloc(talloc_tos(), struct spoolss_EndPagePrinter);
1634 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1639 pull = ndr_pull_init_blob(&blob, r, NULL);
1645 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1646 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1647 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1652 if (DEBUGLEVEL >= 10) {
1653 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, r);
1656 r->out.result = _spoolss_EndPagePrinter(p, r);
1658 if (p->rng_fault_state) {
1660 /* Return true here, srv_pipe_hnd.c will take care */
1664 if (DEBUGLEVEL >= 10) {
1665 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, r);
1668 push = ndr_push_init_ctx(r, NULL);
1674 ndr_err = call->ndr_push(push, NDR_OUT, r);
1675 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1680 blob = ndr_push_blob(push);
1681 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1691 static bool api_spoolss_AbortPrinter(pipes_struct *p)
1693 const struct ndr_interface_call *call;
1694 struct ndr_pull *pull;
1695 struct ndr_push *push;
1696 enum ndr_err_code ndr_err;
1698 struct spoolss_AbortPrinter *r;
1700 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ABORTPRINTER];
1702 r = talloc(talloc_tos(), struct spoolss_AbortPrinter);
1707 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1712 pull = ndr_pull_init_blob(&blob, r, NULL);
1718 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1719 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1720 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1725 if (DEBUGLEVEL >= 10) {
1726 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, r);
1729 r->out.result = _spoolss_AbortPrinter(p, r);
1731 if (p->rng_fault_state) {
1733 /* Return true here, srv_pipe_hnd.c will take care */
1737 if (DEBUGLEVEL >= 10) {
1738 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, r);
1741 push = ndr_push_init_ctx(r, NULL);
1747 ndr_err = call->ndr_push(push, NDR_OUT, r);
1748 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1753 blob = ndr_push_blob(push);
1754 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1764 static bool api_spoolss_ReadPrinter(pipes_struct *p)
1766 const struct ndr_interface_call *call;
1767 struct ndr_pull *pull;
1768 struct ndr_push *push;
1769 enum ndr_err_code ndr_err;
1771 struct spoolss_ReadPrinter *r;
1773 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_READPRINTER];
1775 r = talloc(talloc_tos(), struct spoolss_ReadPrinter);
1780 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1785 pull = ndr_pull_init_blob(&blob, r, NULL);
1791 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1792 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1793 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1798 if (DEBUGLEVEL >= 10) {
1799 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, r);
1802 ZERO_STRUCT(r->out);
1803 r->out.data = talloc_zero_array(r, uint8_t, r->in.data_size);
1804 if (r->out.data == NULL) {
1809 r->out._data_size = talloc_zero(r, uint32_t);
1810 if (r->out._data_size == NULL) {
1815 r->out.result = _spoolss_ReadPrinter(p, r);
1817 if (p->rng_fault_state) {
1819 /* Return true here, srv_pipe_hnd.c will take care */
1823 if (DEBUGLEVEL >= 10) {
1824 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, r);
1827 push = ndr_push_init_ctx(r, NULL);
1833 ndr_err = call->ndr_push(push, NDR_OUT, r);
1834 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1839 blob = ndr_push_blob(push);
1840 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1850 static bool api_spoolss_EndDocPrinter(pipes_struct *p)
1852 const struct ndr_interface_call *call;
1853 struct ndr_pull *pull;
1854 struct ndr_push *push;
1855 enum ndr_err_code ndr_err;
1857 struct spoolss_EndDocPrinter *r;
1859 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDDOCPRINTER];
1861 r = talloc(talloc_tos(), struct spoolss_EndDocPrinter);
1866 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1871 pull = ndr_pull_init_blob(&blob, r, NULL);
1877 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1878 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1879 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1884 if (DEBUGLEVEL >= 10) {
1885 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, r);
1888 r->out.result = _spoolss_EndDocPrinter(p, r);
1890 if (p->rng_fault_state) {
1892 /* Return true here, srv_pipe_hnd.c will take care */
1896 if (DEBUGLEVEL >= 10) {
1897 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, r);
1900 push = ndr_push_init_ctx(r, NULL);
1906 ndr_err = call->ndr_push(push, NDR_OUT, r);
1907 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1912 blob = ndr_push_blob(push);
1913 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1923 static bool api_spoolss_AddJob(pipes_struct *p)
1925 const struct ndr_interface_call *call;
1926 struct ndr_pull *pull;
1927 struct ndr_push *push;
1928 enum ndr_err_code ndr_err;
1930 struct spoolss_AddJob *r;
1932 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDJOB];
1934 r = talloc(talloc_tos(), struct spoolss_AddJob);
1939 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1944 pull = ndr_pull_init_blob(&blob, r, NULL);
1950 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1951 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1952 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1957 if (DEBUGLEVEL >= 10) {
1958 NDR_PRINT_IN_DEBUG(spoolss_AddJob, r);
1961 ZERO_STRUCT(r->out);
1962 r->out.buffer = r->in.buffer;
1963 r->out.needed = talloc_zero(r, uint32_t);
1964 if (r->out.needed == NULL) {
1969 r->out.result = _spoolss_AddJob(p, r);
1971 if (p->rng_fault_state) {
1973 /* Return true here, srv_pipe_hnd.c will take care */
1977 if (DEBUGLEVEL >= 10) {
1978 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, r);
1981 push = ndr_push_init_ctx(r, NULL);
1987 ndr_err = call->ndr_push(push, NDR_OUT, r);
1988 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1993 blob = ndr_push_blob(push);
1994 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2004 static bool api_spoolss_ScheduleJob(pipes_struct *p)
2006 const struct ndr_interface_call *call;
2007 struct ndr_pull *pull;
2008 struct ndr_push *push;
2009 enum ndr_err_code ndr_err;
2011 struct spoolss_ScheduleJob *r;
2013 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SCHEDULEJOB];
2015 r = talloc(talloc_tos(), struct spoolss_ScheduleJob);
2020 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2025 pull = ndr_pull_init_blob(&blob, r, NULL);
2031 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2032 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2033 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2038 if (DEBUGLEVEL >= 10) {
2039 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, r);
2042 r->out.result = _spoolss_ScheduleJob(p, r);
2044 if (p->rng_fault_state) {
2046 /* Return true here, srv_pipe_hnd.c will take care */
2050 if (DEBUGLEVEL >= 10) {
2051 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, r);
2054 push = ndr_push_init_ctx(r, NULL);
2060 ndr_err = call->ndr_push(push, NDR_OUT, r);
2061 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2066 blob = ndr_push_blob(push);
2067 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2077 static bool api_spoolss_GetPrinterData(pipes_struct *p)
2079 const struct ndr_interface_call *call;
2080 struct ndr_pull *pull;
2081 struct ndr_push *push;
2082 enum ndr_err_code ndr_err;
2084 struct spoolss_GetPrinterData *r;
2086 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATA];
2088 r = talloc(talloc_tos(), struct spoolss_GetPrinterData);
2093 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2098 pull = ndr_pull_init_blob(&blob, r, NULL);
2104 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2105 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2106 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2111 if (DEBUGLEVEL >= 10) {
2112 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, r);
2115 ZERO_STRUCT(r->out);
2116 r->out.type = talloc_zero(r, enum spoolss_PrinterDataType);
2117 if (r->out.type == NULL) {
2122 r->out.needed = talloc_zero(r, uint32_t);
2123 if (r->out.needed == NULL) {
2128 r->out.result = _spoolss_GetPrinterData(p, r);
2130 if (p->rng_fault_state) {
2132 /* Return true here, srv_pipe_hnd.c will take care */
2136 if (DEBUGLEVEL >= 10) {
2137 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, r);
2140 push = ndr_push_init_ctx(r, NULL);
2146 ndr_err = call->ndr_push(push, NDR_OUT, r);
2147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2152 blob = ndr_push_blob(push);
2153 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2163 static bool api_spoolss_SetPrinterData(pipes_struct *p)
2165 const struct ndr_interface_call *call;
2166 struct ndr_pull *pull;
2167 struct ndr_push *push;
2168 enum ndr_err_code ndr_err;
2170 struct spoolss_SetPrinterData *r;
2172 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATA];
2174 r = talloc(talloc_tos(), struct spoolss_SetPrinterData);
2179 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2184 pull = ndr_pull_init_blob(&blob, r, NULL);
2190 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2191 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2192 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2197 if (DEBUGLEVEL >= 10) {
2198 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, r);
2201 r->out.result = _spoolss_SetPrinterData(p, r);
2203 if (p->rng_fault_state) {
2205 /* Return true here, srv_pipe_hnd.c will take care */
2209 if (DEBUGLEVEL >= 10) {
2210 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, r);
2213 push = ndr_push_init_ctx(r, NULL);
2219 ndr_err = call->ndr_push(push, NDR_OUT, r);
2220 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2225 blob = ndr_push_blob(push);
2226 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2236 static bool api_spoolss_WaitForPrinterChange(pipes_struct *p)
2238 const struct ndr_interface_call *call;
2239 struct ndr_pull *pull;
2240 struct ndr_push *push;
2241 enum ndr_err_code ndr_err;
2243 struct spoolss_WaitForPrinterChange *r;
2245 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WAITFORPRINTERCHANGE];
2247 r = talloc(talloc_tos(), struct spoolss_WaitForPrinterChange);
2252 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2257 pull = ndr_pull_init_blob(&blob, r, NULL);
2263 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2264 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2265 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2270 if (DEBUGLEVEL >= 10) {
2271 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, r);
2274 r->out.result = _spoolss_WaitForPrinterChange(p, r);
2276 if (p->rng_fault_state) {
2278 /* Return true here, srv_pipe_hnd.c will take care */
2282 if (DEBUGLEVEL >= 10) {
2283 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, r);
2286 push = ndr_push_init_ctx(r, NULL);
2292 ndr_err = call->ndr_push(push, NDR_OUT, r);
2293 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2298 blob = ndr_push_blob(push);
2299 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2309 static bool api_spoolss_ClosePrinter(pipes_struct *p)
2311 const struct ndr_interface_call *call;
2312 struct ndr_pull *pull;
2313 struct ndr_push *push;
2314 enum ndr_err_code ndr_err;
2316 struct spoolss_ClosePrinter *r;
2318 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CLOSEPRINTER];
2320 r = talloc(talloc_tos(), struct spoolss_ClosePrinter);
2325 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2330 pull = ndr_pull_init_blob(&blob, r, NULL);
2336 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2337 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2338 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2343 if (DEBUGLEVEL >= 10) {
2344 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, r);
2347 ZERO_STRUCT(r->out);
2348 r->out.handle = r->in.handle;
2349 r->out.result = _spoolss_ClosePrinter(p, r);
2351 if (p->rng_fault_state) {
2353 /* Return true here, srv_pipe_hnd.c will take care */
2357 if (DEBUGLEVEL >= 10) {
2358 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, r);
2361 push = ndr_push_init_ctx(r, NULL);
2367 ndr_err = call->ndr_push(push, NDR_OUT, r);
2368 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2373 blob = ndr_push_blob(push);
2374 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2384 static bool api_spoolss_AddForm(pipes_struct *p)
2386 const struct ndr_interface_call *call;
2387 struct ndr_pull *pull;
2388 struct ndr_push *push;
2389 enum ndr_err_code ndr_err;
2391 struct spoolss_AddForm *r;
2393 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDFORM];
2395 r = talloc(talloc_tos(), struct spoolss_AddForm);
2400 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2405 pull = ndr_pull_init_blob(&blob, r, NULL);
2411 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2412 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2413 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2418 if (DEBUGLEVEL >= 10) {
2419 NDR_PRINT_IN_DEBUG(spoolss_AddForm, r);
2422 r->out.result = _spoolss_AddForm(p, r);
2424 if (p->rng_fault_state) {
2426 /* Return true here, srv_pipe_hnd.c will take care */
2430 if (DEBUGLEVEL >= 10) {
2431 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, r);
2434 push = ndr_push_init_ctx(r, NULL);
2440 ndr_err = call->ndr_push(push, NDR_OUT, r);
2441 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2446 blob = ndr_push_blob(push);
2447 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2457 static bool api_spoolss_DeleteForm(pipes_struct *p)
2459 const struct ndr_interface_call *call;
2460 struct ndr_pull *pull;
2461 struct ndr_push *push;
2462 enum ndr_err_code ndr_err;
2464 struct spoolss_DeleteForm *r;
2466 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEFORM];
2468 r = talloc(talloc_tos(), struct spoolss_DeleteForm);
2473 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2478 pull = ndr_pull_init_blob(&blob, r, NULL);
2484 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2485 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2486 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2491 if (DEBUGLEVEL >= 10) {
2492 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, r);
2495 r->out.result = _spoolss_DeleteForm(p, r);
2497 if (p->rng_fault_state) {
2499 /* Return true here, srv_pipe_hnd.c will take care */
2503 if (DEBUGLEVEL >= 10) {
2504 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, r);
2507 push = ndr_push_init_ctx(r, NULL);
2513 ndr_err = call->ndr_push(push, NDR_OUT, r);
2514 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2519 blob = ndr_push_blob(push);
2520 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2530 static bool api_spoolss_GetForm(pipes_struct *p)
2532 const struct ndr_interface_call *call;
2533 struct ndr_pull *pull;
2534 struct ndr_push *push;
2535 enum ndr_err_code ndr_err;
2537 struct spoolss_GetForm *r;
2539 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETFORM];
2541 r = talloc(talloc_tos(), struct spoolss_GetForm);
2546 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2551 pull = ndr_pull_init_blob(&blob, r, NULL);
2557 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2558 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2559 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2564 if (DEBUGLEVEL >= 10) {
2565 NDR_PRINT_IN_DEBUG(spoolss_GetForm, r);
2568 ZERO_STRUCT(r->out);
2569 r->out.info = talloc_zero(r, union spoolss_FormInfo);
2570 if (r->out.info == NULL) {
2575 r->out.needed = talloc_zero(r, uint32_t);
2576 if (r->out.needed == NULL) {
2581 r->out.result = _spoolss_GetForm(p, r);
2583 if (p->rng_fault_state) {
2585 /* Return true here, srv_pipe_hnd.c will take care */
2589 if (DEBUGLEVEL >= 10) {
2590 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, r);
2593 push = ndr_push_init_ctx(r, NULL);
2599 ndr_err = call->ndr_push(push, NDR_OUT, r);
2600 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2605 blob = ndr_push_blob(push);
2606 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2616 static bool api_spoolss_SetForm(pipes_struct *p)
2618 const struct ndr_interface_call *call;
2619 struct ndr_pull *pull;
2620 struct ndr_push *push;
2621 enum ndr_err_code ndr_err;
2623 struct spoolss_SetForm *r;
2625 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETFORM];
2627 r = talloc(talloc_tos(), struct spoolss_SetForm);
2632 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2637 pull = ndr_pull_init_blob(&blob, r, NULL);
2643 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2644 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2645 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2650 if (DEBUGLEVEL >= 10) {
2651 NDR_PRINT_IN_DEBUG(spoolss_SetForm, r);
2654 r->out.result = _spoolss_SetForm(p, r);
2656 if (p->rng_fault_state) {
2658 /* Return true here, srv_pipe_hnd.c will take care */
2662 if (DEBUGLEVEL >= 10) {
2663 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, r);
2666 push = ndr_push_init_ctx(r, NULL);
2672 ndr_err = call->ndr_push(push, NDR_OUT, r);
2673 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2678 blob = ndr_push_blob(push);
2679 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2689 static bool api_spoolss_EnumForms(pipes_struct *p)
2691 const struct ndr_interface_call *call;
2692 struct ndr_pull *pull;
2693 struct ndr_push *push;
2694 enum ndr_err_code ndr_err;
2696 struct spoolss_EnumForms *r;
2698 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMFORMS];
2700 r = talloc(talloc_tos(), struct spoolss_EnumForms);
2705 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2710 pull = ndr_pull_init_blob(&blob, r, NULL);
2716 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2717 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2718 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2723 if (DEBUGLEVEL >= 10) {
2724 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, r);
2727 ZERO_STRUCT(r->out);
2728 r->out.count = talloc_zero(r, uint32_t);
2729 if (r->out.count == NULL) {
2734 r->out.info = talloc_zero(r, union spoolss_FormInfo *);
2735 if (r->out.info == NULL) {
2740 r->out.needed = talloc_zero(r, uint32_t);
2741 if (r->out.needed == NULL) {
2746 r->out.result = _spoolss_EnumForms(p, r);
2748 if (p->rng_fault_state) {
2750 /* Return true here, srv_pipe_hnd.c will take care */
2754 if (DEBUGLEVEL >= 10) {
2755 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, r);
2758 push = ndr_push_init_ctx(r, NULL);
2764 ndr_err = call->ndr_push(push, NDR_OUT, r);
2765 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2770 blob = ndr_push_blob(push);
2771 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2781 static bool api_spoolss_EnumPorts(pipes_struct *p)
2783 const struct ndr_interface_call *call;
2784 struct ndr_pull *pull;
2785 struct ndr_push *push;
2786 enum ndr_err_code ndr_err;
2788 struct spoolss_EnumPorts *r;
2790 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPORTS];
2792 r = talloc(talloc_tos(), struct spoolss_EnumPorts);
2797 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2802 pull = ndr_pull_init_blob(&blob, r, NULL);
2808 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2809 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2810 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2815 if (DEBUGLEVEL >= 10) {
2816 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, r);
2819 ZERO_STRUCT(r->out);
2820 r->out.count = talloc_zero(r, uint32_t);
2821 if (r->out.count == NULL) {
2826 r->out.info = talloc_zero(r, union spoolss_PortInfo *);
2827 if (r->out.info == NULL) {
2832 r->out.needed = talloc_zero(r, uint32_t);
2833 if (r->out.needed == NULL) {
2838 r->out.result = _spoolss_EnumPorts(p, r);
2840 if (p->rng_fault_state) {
2842 /* Return true here, srv_pipe_hnd.c will take care */
2846 if (DEBUGLEVEL >= 10) {
2847 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, r);
2850 push = ndr_push_init_ctx(r, NULL);
2856 ndr_err = call->ndr_push(push, NDR_OUT, r);
2857 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2862 blob = ndr_push_blob(push);
2863 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2873 static bool api_spoolss_EnumMonitors(pipes_struct *p)
2875 const struct ndr_interface_call *call;
2876 struct ndr_pull *pull;
2877 struct ndr_push *push;
2878 enum ndr_err_code ndr_err;
2880 struct spoolss_EnumMonitors *r;
2882 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMMONITORS];
2884 r = talloc(talloc_tos(), struct spoolss_EnumMonitors);
2889 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2894 pull = ndr_pull_init_blob(&blob, r, NULL);
2900 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2901 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2902 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2907 if (DEBUGLEVEL >= 10) {
2908 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, r);
2911 ZERO_STRUCT(r->out);
2912 r->out.count = talloc_zero(r, uint32_t);
2913 if (r->out.count == NULL) {
2918 r->out.info = talloc_zero(r, union spoolss_MonitorInfo *);
2919 if (r->out.info == NULL) {
2924 r->out.needed = talloc_zero(r, uint32_t);
2925 if (r->out.needed == NULL) {
2930 r->out.result = _spoolss_EnumMonitors(p, r);
2932 if (p->rng_fault_state) {
2934 /* Return true here, srv_pipe_hnd.c will take care */
2938 if (DEBUGLEVEL >= 10) {
2939 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, r);
2942 push = ndr_push_init_ctx(r, NULL);
2948 ndr_err = call->ndr_push(push, NDR_OUT, r);
2949 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2954 blob = ndr_push_blob(push);
2955 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2965 static bool api_spoolss_AddPort(pipes_struct *p)
2967 const struct ndr_interface_call *call;
2968 struct ndr_pull *pull;
2969 struct ndr_push *push;
2970 enum ndr_err_code ndr_err;
2972 struct spoolss_AddPort *r;
2974 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORT];
2976 r = talloc(talloc_tos(), struct spoolss_AddPort);
2981 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2986 pull = ndr_pull_init_blob(&blob, r, NULL);
2992 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2993 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2994 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2999 if (DEBUGLEVEL >= 10) {
3000 NDR_PRINT_IN_DEBUG(spoolss_AddPort, r);
3003 r->out.result = _spoolss_AddPort(p, r);
3005 if (p->rng_fault_state) {
3007 /* Return true here, srv_pipe_hnd.c will take care */
3011 if (DEBUGLEVEL >= 10) {
3012 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, r);
3015 push = ndr_push_init_ctx(r, NULL);
3021 ndr_err = call->ndr_push(push, NDR_OUT, r);
3022 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3027 blob = ndr_push_blob(push);
3028 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3038 static bool api_spoolss_ConfigurePort(pipes_struct *p)
3040 const struct ndr_interface_call *call;
3041 struct ndr_pull *pull;
3042 struct ndr_push *push;
3043 enum ndr_err_code ndr_err;
3045 struct spoolss_ConfigurePort *r;
3047 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CONFIGUREPORT];
3049 r = talloc(talloc_tos(), struct spoolss_ConfigurePort);
3054 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3059 pull = ndr_pull_init_blob(&blob, r, NULL);
3065 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3066 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3067 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3072 if (DEBUGLEVEL >= 10) {
3073 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, r);
3076 r->out.result = _spoolss_ConfigurePort(p, r);
3078 if (p->rng_fault_state) {
3080 /* Return true here, srv_pipe_hnd.c will take care */
3084 if (DEBUGLEVEL >= 10) {
3085 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, r);
3088 push = ndr_push_init_ctx(r, NULL);
3094 ndr_err = call->ndr_push(push, NDR_OUT, r);
3095 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3100 blob = ndr_push_blob(push);
3101 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3111 static bool api_spoolss_DeletePort(pipes_struct *p)
3113 const struct ndr_interface_call *call;
3114 struct ndr_pull *pull;
3115 struct ndr_push *push;
3116 enum ndr_err_code ndr_err;
3118 struct spoolss_DeletePort *r;
3120 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPORT];
3122 r = talloc(talloc_tos(), struct spoolss_DeletePort);
3127 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3132 pull = ndr_pull_init_blob(&blob, r, NULL);
3138 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3139 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3140 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3145 if (DEBUGLEVEL >= 10) {
3146 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, r);
3149 r->out.result = _spoolss_DeletePort(p, r);
3151 if (p->rng_fault_state) {
3153 /* Return true here, srv_pipe_hnd.c will take care */
3157 if (DEBUGLEVEL >= 10) {
3158 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, r);
3161 push = ndr_push_init_ctx(r, NULL);
3167 ndr_err = call->ndr_push(push, NDR_OUT, r);
3168 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3173 blob = ndr_push_blob(push);
3174 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3184 static bool api_spoolss_CreatePrinterIC(pipes_struct *p)
3186 const struct ndr_interface_call *call;
3187 struct ndr_pull *pull;
3188 struct ndr_push *push;
3189 enum ndr_err_code ndr_err;
3191 struct spoolss_CreatePrinterIC *r;
3193 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CREATEPRINTERIC];
3195 r = talloc(talloc_tos(), struct spoolss_CreatePrinterIC);
3200 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3205 pull = ndr_pull_init_blob(&blob, r, NULL);
3211 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3212 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3213 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3218 if (DEBUGLEVEL >= 10) {
3219 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, r);
3222 r->out.result = _spoolss_CreatePrinterIC(p, r);
3224 if (p->rng_fault_state) {
3226 /* Return true here, srv_pipe_hnd.c will take care */
3230 if (DEBUGLEVEL >= 10) {
3231 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, r);
3234 push = ndr_push_init_ctx(r, NULL);
3240 ndr_err = call->ndr_push(push, NDR_OUT, r);
3241 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3246 blob = ndr_push_blob(push);
3247 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3257 static bool api_spoolss_PlayGDIScriptOnPrinterIC(pipes_struct *p)
3259 const struct ndr_interface_call *call;
3260 struct ndr_pull *pull;
3261 struct ndr_push *push;
3262 enum ndr_err_code ndr_err;
3264 struct spoolss_PlayGDIScriptOnPrinterIC *r;
3266 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC];
3268 r = talloc(talloc_tos(), struct spoolss_PlayGDIScriptOnPrinterIC);
3273 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3278 pull = ndr_pull_init_blob(&blob, r, NULL);
3284 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3285 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3286 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3291 if (DEBUGLEVEL >= 10) {
3292 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3295 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(p, r);
3297 if (p->rng_fault_state) {
3299 /* Return true here, srv_pipe_hnd.c will take care */
3303 if (DEBUGLEVEL >= 10) {
3304 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3307 push = ndr_push_init_ctx(r, NULL);
3313 ndr_err = call->ndr_push(push, NDR_OUT, r);
3314 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3319 blob = ndr_push_blob(push);
3320 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3330 static bool api_spoolss_DeletePrinterIC(pipes_struct *p)
3332 const struct ndr_interface_call *call;
3333 struct ndr_pull *pull;
3334 struct ndr_push *push;
3335 enum ndr_err_code ndr_err;
3337 struct spoolss_DeletePrinterIC *r;
3339 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERIC];
3341 r = talloc(talloc_tos(), struct spoolss_DeletePrinterIC);
3346 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3351 pull = ndr_pull_init_blob(&blob, r, NULL);
3357 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3358 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3359 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3364 if (DEBUGLEVEL >= 10) {
3365 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, r);
3368 r->out.result = _spoolss_DeletePrinterIC(p, r);
3370 if (p->rng_fault_state) {
3372 /* Return true here, srv_pipe_hnd.c will take care */
3376 if (DEBUGLEVEL >= 10) {
3377 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, r);
3380 push = ndr_push_init_ctx(r, NULL);
3386 ndr_err = call->ndr_push(push, NDR_OUT, r);
3387 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3392 blob = ndr_push_blob(push);
3393 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3403 static bool api_spoolss_AddPrinterConnection(pipes_struct *p)
3405 const struct ndr_interface_call *call;
3406 struct ndr_pull *pull;
3407 struct ndr_push *push;
3408 enum ndr_err_code ndr_err;
3410 struct spoolss_AddPrinterConnection *r;
3412 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERCONNECTION];
3414 r = talloc(talloc_tos(), struct spoolss_AddPrinterConnection);
3419 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3424 pull = ndr_pull_init_blob(&blob, r, NULL);
3430 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3431 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3432 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3437 if (DEBUGLEVEL >= 10) {
3438 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, r);
3441 r->out.result = _spoolss_AddPrinterConnection(p, r);
3443 if (p->rng_fault_state) {
3445 /* Return true here, srv_pipe_hnd.c will take care */
3449 if (DEBUGLEVEL >= 10) {
3450 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, r);
3453 push = ndr_push_init_ctx(r, NULL);
3459 ndr_err = call->ndr_push(push, NDR_OUT, r);
3460 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3465 blob = ndr_push_blob(push);
3466 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3476 static bool api_spoolss_DeletePrinterConnection(pipes_struct *p)
3478 const struct ndr_interface_call *call;
3479 struct ndr_pull *pull;
3480 struct ndr_push *push;
3481 enum ndr_err_code ndr_err;
3483 struct spoolss_DeletePrinterConnection *r;
3485 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERCONNECTION];
3487 r = talloc(talloc_tos(), struct spoolss_DeletePrinterConnection);
3492 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3497 pull = ndr_pull_init_blob(&blob, r, NULL);
3503 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3504 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3505 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3510 if (DEBUGLEVEL >= 10) {
3511 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, r);
3514 r->out.result = _spoolss_DeletePrinterConnection(p, r);
3516 if (p->rng_fault_state) {
3518 /* Return true here, srv_pipe_hnd.c will take care */
3522 if (DEBUGLEVEL >= 10) {
3523 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, r);
3526 push = ndr_push_init_ctx(r, NULL);
3532 ndr_err = call->ndr_push(push, NDR_OUT, r);
3533 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3538 blob = ndr_push_blob(push);
3539 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3549 static bool api_spoolss_PrinterMessageBox(pipes_struct *p)
3551 const struct ndr_interface_call *call;
3552 struct ndr_pull *pull;
3553 struct ndr_push *push;
3554 enum ndr_err_code ndr_err;
3556 struct spoolss_PrinterMessageBox *r;
3558 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PRINTERMESSAGEBOX];
3560 r = talloc(talloc_tos(), struct spoolss_PrinterMessageBox);
3565 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3570 pull = ndr_pull_init_blob(&blob, r, NULL);
3576 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3577 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3578 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3583 if (DEBUGLEVEL >= 10) {
3584 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, r);
3587 r->out.result = _spoolss_PrinterMessageBox(p, r);
3589 if (p->rng_fault_state) {
3591 /* Return true here, srv_pipe_hnd.c will take care */
3595 if (DEBUGLEVEL >= 10) {
3596 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, r);
3599 push = ndr_push_init_ctx(r, NULL);
3605 ndr_err = call->ndr_push(push, NDR_OUT, r);
3606 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3611 blob = ndr_push_blob(push);
3612 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3622 static bool api_spoolss_AddMonitor(pipes_struct *p)
3624 const struct ndr_interface_call *call;
3625 struct ndr_pull *pull;
3626 struct ndr_push *push;
3627 enum ndr_err_code ndr_err;
3629 struct spoolss_AddMonitor *r;
3631 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDMONITOR];
3633 r = talloc(talloc_tos(), struct spoolss_AddMonitor);
3638 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3643 pull = ndr_pull_init_blob(&blob, r, NULL);
3649 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3650 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3651 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3656 if (DEBUGLEVEL >= 10) {
3657 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, r);
3660 r->out.result = _spoolss_AddMonitor(p, r);
3662 if (p->rng_fault_state) {
3664 /* Return true here, srv_pipe_hnd.c will take care */
3668 if (DEBUGLEVEL >= 10) {
3669 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, r);
3672 push = ndr_push_init_ctx(r, NULL);
3678 ndr_err = call->ndr_push(push, NDR_OUT, r);
3679 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3684 blob = ndr_push_blob(push);
3685 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3695 static bool api_spoolss_DeleteMonitor(pipes_struct *p)
3697 const struct ndr_interface_call *call;
3698 struct ndr_pull *pull;
3699 struct ndr_push *push;
3700 enum ndr_err_code ndr_err;
3702 struct spoolss_DeleteMonitor *r;
3704 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEMONITOR];
3706 r = talloc(talloc_tos(), struct spoolss_DeleteMonitor);
3711 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3716 pull = ndr_pull_init_blob(&blob, r, NULL);
3722 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3723 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3724 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3729 if (DEBUGLEVEL >= 10) {
3730 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, r);
3733 r->out.result = _spoolss_DeleteMonitor(p, r);
3735 if (p->rng_fault_state) {
3737 /* Return true here, srv_pipe_hnd.c will take care */
3741 if (DEBUGLEVEL >= 10) {
3742 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, r);
3745 push = ndr_push_init_ctx(r, NULL);
3751 ndr_err = call->ndr_push(push, NDR_OUT, r);
3752 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3757 blob = ndr_push_blob(push);
3758 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3768 static bool api_spoolss_DeletePrintProcessor(pipes_struct *p)
3770 const struct ndr_interface_call *call;
3771 struct ndr_pull *pull;
3772 struct ndr_push *push;
3773 enum ndr_err_code ndr_err;
3775 struct spoolss_DeletePrintProcessor *r;
3777 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROCESSOR];
3779 r = talloc(talloc_tos(), struct spoolss_DeletePrintProcessor);
3784 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3789 pull = ndr_pull_init_blob(&blob, r, NULL);
3795 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3796 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3797 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3802 if (DEBUGLEVEL >= 10) {
3803 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, r);
3806 r->out.result = _spoolss_DeletePrintProcessor(p, r);
3808 if (p->rng_fault_state) {
3810 /* Return true here, srv_pipe_hnd.c will take care */
3814 if (DEBUGLEVEL >= 10) {
3815 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, r);
3818 push = ndr_push_init_ctx(r, NULL);
3824 ndr_err = call->ndr_push(push, NDR_OUT, r);
3825 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3830 blob = ndr_push_blob(push);
3831 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3841 static bool api_spoolss_AddPrintProvidor(pipes_struct *p)
3843 const struct ndr_interface_call *call;
3844 struct ndr_pull *pull;
3845 struct ndr_push *push;
3846 enum ndr_err_code ndr_err;
3848 struct spoolss_AddPrintProvidor *r;
3850 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROVIDOR];
3852 r = talloc(talloc_tos(), struct spoolss_AddPrintProvidor);
3857 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3862 pull = ndr_pull_init_blob(&blob, r, NULL);
3868 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3869 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3870 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3875 if (DEBUGLEVEL >= 10) {
3876 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, r);
3879 r->out.result = _spoolss_AddPrintProvidor(p, r);
3881 if (p->rng_fault_state) {
3883 /* Return true here, srv_pipe_hnd.c will take care */
3887 if (DEBUGLEVEL >= 10) {
3888 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, r);
3891 push = ndr_push_init_ctx(r, NULL);
3897 ndr_err = call->ndr_push(push, NDR_OUT, r);
3898 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3903 blob = ndr_push_blob(push);
3904 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3914 static bool api_spoolss_DeletePrintProvidor(pipes_struct *p)
3916 const struct ndr_interface_call *call;
3917 struct ndr_pull *pull;
3918 struct ndr_push *push;
3919 enum ndr_err_code ndr_err;
3921 struct spoolss_DeletePrintProvidor *r;
3923 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROVIDOR];
3925 r = talloc(talloc_tos(), struct spoolss_DeletePrintProvidor);
3930 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3935 pull = ndr_pull_init_blob(&blob, r, NULL);
3941 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3942 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3943 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3948 if (DEBUGLEVEL >= 10) {
3949 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, r);
3952 r->out.result = _spoolss_DeletePrintProvidor(p, r);
3954 if (p->rng_fault_state) {
3956 /* Return true here, srv_pipe_hnd.c will take care */
3960 if (DEBUGLEVEL >= 10) {
3961 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, r);
3964 push = ndr_push_init_ctx(r, NULL);
3970 ndr_err = call->ndr_push(push, NDR_OUT, r);
3971 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3976 blob = ndr_push_blob(push);
3977 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3987 static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct *p)
3989 const struct ndr_interface_call *call;
3990 struct ndr_pull *pull;
3991 struct ndr_push *push;
3992 enum ndr_err_code ndr_err;
3994 struct spoolss_EnumPrintProcDataTypes *r;
3996 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCDATATYPES];
3998 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcDataTypes);
4003 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4008 pull = ndr_pull_init_blob(&blob, r, NULL);
4014 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4015 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4016 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4021 if (DEBUGLEVEL >= 10) {
4022 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, r);
4025 r->out.result = _spoolss_EnumPrintProcDataTypes(p, r);
4027 if (p->rng_fault_state) {
4029 /* Return true here, srv_pipe_hnd.c will take care */
4033 if (DEBUGLEVEL >= 10) {
4034 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, r);
4037 push = ndr_push_init_ctx(r, NULL);
4043 ndr_err = call->ndr_push(push, NDR_OUT, r);
4044 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4049 blob = ndr_push_blob(push);
4050 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4060 static bool api_spoolss_ResetPrinter(pipes_struct *p)
4062 const struct ndr_interface_call *call;
4063 struct ndr_pull *pull;
4064 struct ndr_push *push;
4065 enum ndr_err_code ndr_err;
4067 struct spoolss_ResetPrinter *r;
4069 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTER];
4071 r = talloc(talloc_tos(), struct spoolss_ResetPrinter);
4076 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4081 pull = ndr_pull_init_blob(&blob, r, NULL);
4087 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4088 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4089 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4094 if (DEBUGLEVEL >= 10) {
4095 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, r);
4098 r->out.result = _spoolss_ResetPrinter(p, r);
4100 if (p->rng_fault_state) {
4102 /* Return true here, srv_pipe_hnd.c will take care */
4106 if (DEBUGLEVEL >= 10) {
4107 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, r);
4110 push = ndr_push_init_ctx(r, NULL);
4116 ndr_err = call->ndr_push(push, NDR_OUT, r);
4117 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4122 blob = ndr_push_blob(push);
4123 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4133 static bool api_spoolss_GetPrinterDriver2(pipes_struct *p)
4135 const struct ndr_interface_call *call;
4136 struct ndr_pull *pull;
4137 struct ndr_push *push;
4138 enum ndr_err_code ndr_err;
4140 struct spoolss_GetPrinterDriver2 *r;
4142 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER2];
4144 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver2);
4149 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4154 pull = ndr_pull_init_blob(&blob, r, NULL);
4160 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4161 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4162 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4167 if (DEBUGLEVEL >= 10) {
4168 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, r);
4171 ZERO_STRUCT(r->out);
4172 r->out.info = talloc_zero(r, union spoolss_DriverInfo);
4173 if (r->out.info == NULL) {
4178 r->out.needed = talloc_zero(r, uint32_t);
4179 if (r->out.needed == NULL) {
4184 r->out.server_major_version = talloc_zero(r, uint32_t);
4185 if (r->out.server_major_version == NULL) {
4190 r->out.server_minor_version = talloc_zero(r, uint32_t);
4191 if (r->out.server_minor_version == NULL) {
4196 r->out.result = _spoolss_GetPrinterDriver2(p, r);
4198 if (p->rng_fault_state) {
4200 /* Return true here, srv_pipe_hnd.c will take care */
4204 if (DEBUGLEVEL >= 10) {
4205 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, r);
4208 push = ndr_push_init_ctx(r, NULL);
4214 ndr_err = call->ndr_push(push, NDR_OUT, r);
4215 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4220 blob = ndr_push_blob(push);
4221 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4231 static bool api_spoolss_FindFirstPrinterChangeNotification(pipes_struct *p)
4233 const struct ndr_interface_call *call;
4234 struct ndr_pull *pull;
4235 struct ndr_push *push;
4236 enum ndr_err_code ndr_err;
4238 struct spoolss_FindFirstPrinterChangeNotification *r;
4240 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION];
4242 r = talloc(talloc_tos(), struct spoolss_FindFirstPrinterChangeNotification);
4247 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4252 pull = ndr_pull_init_blob(&blob, r, NULL);
4258 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4259 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4260 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4265 if (DEBUGLEVEL >= 10) {
4266 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4269 r->out.result = _spoolss_FindFirstPrinterChangeNotification(p, r);
4271 if (p->rng_fault_state) {
4273 /* Return true here, srv_pipe_hnd.c will take care */
4277 if (DEBUGLEVEL >= 10) {
4278 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4281 push = ndr_push_init_ctx(r, NULL);
4287 ndr_err = call->ndr_push(push, NDR_OUT, r);
4288 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4293 blob = ndr_push_blob(push);
4294 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4304 static bool api_spoolss_FindNextPrinterChangeNotification(pipes_struct *p)
4306 const struct ndr_interface_call *call;
4307 struct ndr_pull *pull;
4308 struct ndr_push *push;
4309 enum ndr_err_code ndr_err;
4311 struct spoolss_FindNextPrinterChangeNotification *r;
4313 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION];
4315 r = talloc(talloc_tos(), struct spoolss_FindNextPrinterChangeNotification);
4320 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4325 pull = ndr_pull_init_blob(&blob, r, NULL);
4331 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4332 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4333 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4338 if (DEBUGLEVEL >= 10) {
4339 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4342 r->out.result = _spoolss_FindNextPrinterChangeNotification(p, r);
4344 if (p->rng_fault_state) {
4346 /* Return true here, srv_pipe_hnd.c will take care */
4350 if (DEBUGLEVEL >= 10) {
4351 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4354 push = ndr_push_init_ctx(r, NULL);
4360 ndr_err = call->ndr_push(push, NDR_OUT, r);
4361 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4366 blob = ndr_push_blob(push);
4367 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4377 static bool api_spoolss_FindClosePrinterNotify(pipes_struct *p)
4379 const struct ndr_interface_call *call;
4380 struct ndr_pull *pull;
4381 struct ndr_push *push;
4382 enum ndr_err_code ndr_err;
4384 struct spoolss_FindClosePrinterNotify *r;
4386 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY];
4388 r = talloc(talloc_tos(), struct spoolss_FindClosePrinterNotify);
4393 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4398 pull = ndr_pull_init_blob(&blob, r, NULL);
4404 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4405 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4406 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4411 if (DEBUGLEVEL >= 10) {
4412 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, r);
4415 r->out.result = _spoolss_FindClosePrinterNotify(p, r);
4417 if (p->rng_fault_state) {
4419 /* Return true here, srv_pipe_hnd.c will take care */
4423 if (DEBUGLEVEL >= 10) {
4424 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, r);
4427 push = ndr_push_init_ctx(r, NULL);
4433 ndr_err = call->ndr_push(push, NDR_OUT, r);
4434 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4439 blob = ndr_push_blob(push);
4440 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4450 static bool api_spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct *p)
4452 const struct ndr_interface_call *call;
4453 struct ndr_pull *pull;
4454 struct ndr_push *push;
4455 enum ndr_err_code ndr_err;
4457 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r;
4459 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD];
4461 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotificationOld);
4466 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4471 pull = ndr_pull_init_blob(&blob, r, NULL);
4477 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4478 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4479 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4484 if (DEBUGLEVEL >= 10) {
4485 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4488 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(p, r);
4490 if (p->rng_fault_state) {
4492 /* Return true here, srv_pipe_hnd.c will take care */
4496 if (DEBUGLEVEL >= 10) {
4497 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4500 push = ndr_push_init_ctx(r, NULL);
4506 ndr_err = call->ndr_push(push, NDR_OUT, r);
4507 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4512 blob = ndr_push_blob(push);
4513 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4523 static bool api_spoolss_ReplyOpenPrinter(pipes_struct *p)
4525 const struct ndr_interface_call *call;
4526 struct ndr_pull *pull;
4527 struct ndr_push *push;
4528 enum ndr_err_code ndr_err;
4530 struct spoolss_ReplyOpenPrinter *r;
4532 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYOPENPRINTER];
4534 r = talloc(talloc_tos(), struct spoolss_ReplyOpenPrinter);
4539 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4544 pull = ndr_pull_init_blob(&blob, r, NULL);
4550 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4551 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4552 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4557 if (DEBUGLEVEL >= 10) {
4558 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, r);
4561 ZERO_STRUCT(r->out);
4562 r->out.handle = talloc_zero(r, struct policy_handle);
4563 if (r->out.handle == NULL) {
4568 r->out.result = _spoolss_ReplyOpenPrinter(p, r);
4570 if (p->rng_fault_state) {
4572 /* Return true here, srv_pipe_hnd.c will take care */
4576 if (DEBUGLEVEL >= 10) {
4577 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, r);
4580 push = ndr_push_init_ctx(r, NULL);
4586 ndr_err = call->ndr_push(push, NDR_OUT, r);
4587 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4592 blob = ndr_push_blob(push);
4593 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4603 static bool api_spoolss_RouterReplyPrinter(pipes_struct *p)
4605 const struct ndr_interface_call *call;
4606 struct ndr_pull *pull;
4607 struct ndr_push *push;
4608 enum ndr_err_code ndr_err;
4610 struct spoolss_RouterReplyPrinter *r;
4612 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTER];
4614 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinter);
4619 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4624 pull = ndr_pull_init_blob(&blob, r, NULL);
4630 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4631 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4632 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4637 if (DEBUGLEVEL >= 10) {
4638 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, r);
4641 r->out.result = _spoolss_RouterReplyPrinter(p, r);
4643 if (p->rng_fault_state) {
4645 /* Return true here, srv_pipe_hnd.c will take care */
4649 if (DEBUGLEVEL >= 10) {
4650 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, r);
4653 push = ndr_push_init_ctx(r, NULL);
4659 ndr_err = call->ndr_push(push, NDR_OUT, r);
4660 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4665 blob = ndr_push_blob(push);
4666 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4676 static bool api_spoolss_ReplyClosePrinter(pipes_struct *p)
4678 const struct ndr_interface_call *call;
4679 struct ndr_pull *pull;
4680 struct ndr_push *push;
4681 enum ndr_err_code ndr_err;
4683 struct spoolss_ReplyClosePrinter *r;
4685 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYCLOSEPRINTER];
4687 r = talloc(talloc_tos(), struct spoolss_ReplyClosePrinter);
4692 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4697 pull = ndr_pull_init_blob(&blob, r, NULL);
4703 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4704 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4705 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4710 if (DEBUGLEVEL >= 10) {
4711 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, r);
4714 ZERO_STRUCT(r->out);
4715 r->out.handle = r->in.handle;
4716 r->out.result = _spoolss_ReplyClosePrinter(p, r);
4718 if (p->rng_fault_state) {
4720 /* Return true here, srv_pipe_hnd.c will take care */
4724 if (DEBUGLEVEL >= 10) {
4725 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, r);
4728 push = ndr_push_init_ctx(r, NULL);
4734 ndr_err = call->ndr_push(push, NDR_OUT, r);
4735 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4740 blob = ndr_push_blob(push);
4741 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4751 static bool api_spoolss_AddPortEx(pipes_struct *p)
4753 const struct ndr_interface_call *call;
4754 struct ndr_pull *pull;
4755 struct ndr_push *push;
4756 enum ndr_err_code ndr_err;
4758 struct spoolss_AddPortEx *r;
4760 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORTEX];
4762 r = talloc(talloc_tos(), struct spoolss_AddPortEx);
4767 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4772 pull = ndr_pull_init_blob(&blob, r, NULL);
4778 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4779 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4780 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4785 if (DEBUGLEVEL >= 10) {
4786 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, r);
4789 r->out.result = _spoolss_AddPortEx(p, r);
4791 if (p->rng_fault_state) {
4793 /* Return true here, srv_pipe_hnd.c will take care */
4797 if (DEBUGLEVEL >= 10) {
4798 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, r);
4801 push = ndr_push_init_ctx(r, NULL);
4807 ndr_err = call->ndr_push(push, NDR_OUT, r);
4808 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4813 blob = ndr_push_blob(push);
4814 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4824 static bool api_spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p)
4826 const struct ndr_interface_call *call;
4827 struct ndr_pull *pull;
4828 struct ndr_push *push;
4829 enum ndr_err_code ndr_err;
4831 struct spoolss_RouterFindFirstPrinterChangeNotification *r;
4833 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION];
4835 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotification);
4840 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4845 pull = ndr_pull_init_blob(&blob, r, NULL);
4851 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4852 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4853 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4858 if (DEBUGLEVEL >= 10) {
4859 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4862 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(p, r);
4864 if (p->rng_fault_state) {
4866 /* Return true here, srv_pipe_hnd.c will take care */
4870 if (DEBUGLEVEL >= 10) {
4871 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4874 push = ndr_push_init_ctx(r, NULL);
4880 ndr_err = call->ndr_push(push, NDR_OUT, r);
4881 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4886 blob = ndr_push_blob(push);
4887 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4897 static bool api_spoolss_SpoolerInit(pipes_struct *p)
4899 const struct ndr_interface_call *call;
4900 struct ndr_pull *pull;
4901 struct ndr_push *push;
4902 enum ndr_err_code ndr_err;
4904 struct spoolss_SpoolerInit *r;
4906 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SPOOLERINIT];
4908 r = talloc(talloc_tos(), struct spoolss_SpoolerInit);
4913 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4918 pull = ndr_pull_init_blob(&blob, r, NULL);
4924 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4925 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4926 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4931 if (DEBUGLEVEL >= 10) {
4932 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, r);
4935 r->out.result = _spoolss_SpoolerInit(p, r);
4937 if (p->rng_fault_state) {
4939 /* Return true here, srv_pipe_hnd.c will take care */
4943 if (DEBUGLEVEL >= 10) {
4944 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, r);
4947 push = ndr_push_init_ctx(r, NULL);
4953 ndr_err = call->ndr_push(push, NDR_OUT, r);
4954 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4959 blob = ndr_push_blob(push);
4960 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4970 static bool api_spoolss_ResetPrinterEx(pipes_struct *p)
4972 const struct ndr_interface_call *call;
4973 struct ndr_pull *pull;
4974 struct ndr_push *push;
4975 enum ndr_err_code ndr_err;
4977 struct spoolss_ResetPrinterEx *r;
4979 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTEREX];
4981 r = talloc(talloc_tos(), struct spoolss_ResetPrinterEx);
4986 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4991 pull = ndr_pull_init_blob(&blob, r, NULL);
4997 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4998 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4999 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5004 if (DEBUGLEVEL >= 10) {
5005 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, r);
5008 r->out.result = _spoolss_ResetPrinterEx(p, r);
5010 if (p->rng_fault_state) {
5012 /* Return true here, srv_pipe_hnd.c will take care */
5016 if (DEBUGLEVEL >= 10) {
5017 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, r);
5020 push = ndr_push_init_ctx(r, NULL);
5026 ndr_err = call->ndr_push(push, NDR_OUT, r);
5027 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5032 blob = ndr_push_blob(push);
5033 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5043 static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p)
5045 const struct ndr_interface_call *call;
5046 struct ndr_pull *pull;
5047 struct ndr_push *push;
5048 enum ndr_err_code ndr_err;
5050 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r;
5052 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX];
5054 r = talloc(talloc_tos(), struct spoolss_RemoteFindFirstPrinterChangeNotifyEx);
5059 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5064 pull = ndr_pull_init_blob(&blob, r, NULL);
5070 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5071 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5072 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5077 if (DEBUGLEVEL >= 10) {
5078 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5081 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p, r);
5083 if (p->rng_fault_state) {
5085 /* Return true here, srv_pipe_hnd.c will take care */
5089 if (DEBUGLEVEL >= 10) {
5090 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5093 push = ndr_push_init_ctx(r, NULL);
5099 ndr_err = call->ndr_push(push, NDR_OUT, r);
5100 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5105 blob = ndr_push_blob(push);
5106 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5116 static bool api_spoolss_RouterReplyPrinterEx(pipes_struct *p)
5118 const struct ndr_interface_call *call;
5119 struct ndr_pull *pull;
5120 struct ndr_push *push;
5121 enum ndr_err_code ndr_err;
5123 struct spoolss_RouterReplyPrinterEx *r;
5125 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTEREX];
5127 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinterEx);
5132 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5137 pull = ndr_pull_init_blob(&blob, r, NULL);
5143 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5144 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5145 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5150 if (DEBUGLEVEL >= 10) {
5151 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, r);
5154 ZERO_STRUCT(r->out);
5155 r->out.reply_result = talloc_zero(r, uint32_t);
5156 if (r->out.reply_result == NULL) {
5161 r->out.result = _spoolss_RouterReplyPrinterEx(p, r);
5163 if (p->rng_fault_state) {
5165 /* Return true here, srv_pipe_hnd.c will take care */
5169 if (DEBUGLEVEL >= 10) {
5170 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, r);
5173 push = ndr_push_init_ctx(r, NULL);
5179 ndr_err = call->ndr_push(push, NDR_OUT, r);
5180 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5185 blob = ndr_push_blob(push);
5186 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5196 static bool api_spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p)
5198 const struct ndr_interface_call *call;
5199 struct ndr_pull *pull;
5200 struct ndr_push *push;
5201 enum ndr_err_code ndr_err;
5203 struct spoolss_RouterRefreshPrinterChangeNotify *r;
5205 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY];
5207 r = talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotify);
5212 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5217 pull = ndr_pull_init_blob(&blob, r, NULL);
5223 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5224 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5225 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5230 if (DEBUGLEVEL >= 10) {
5231 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5234 ZERO_STRUCT(r->out);
5235 r->out.info = talloc_zero(r, struct spoolss_NotifyInfo *);
5236 if (r->out.info == NULL) {
5241 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(p, r);
5243 if (p->rng_fault_state) {
5245 /* Return true here, srv_pipe_hnd.c will take care */
5249 if (DEBUGLEVEL >= 10) {
5250 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5253 push = ndr_push_init_ctx(r, NULL);
5259 ndr_err = call->ndr_push(push, NDR_OUT, r);
5260 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5265 blob = ndr_push_blob(push);
5266 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5276 static bool api_spoolss_44(pipes_struct *p)
5278 const struct ndr_interface_call *call;
5279 struct ndr_pull *pull;
5280 struct ndr_push *push;
5281 enum ndr_err_code ndr_err;
5283 struct spoolss_44 *r;
5285 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_44];
5287 r = talloc(talloc_tos(), struct spoolss_44);
5292 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5297 pull = ndr_pull_init_blob(&blob, r, NULL);
5303 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5304 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5305 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5310 if (DEBUGLEVEL >= 10) {
5311 NDR_PRINT_IN_DEBUG(spoolss_44, r);
5314 r->out.result = _spoolss_44(p, r);
5316 if (p->rng_fault_state) {
5318 /* Return true here, srv_pipe_hnd.c will take care */
5322 if (DEBUGLEVEL >= 10) {
5323 NDR_PRINT_OUT_DEBUG(spoolss_44, r);
5326 push = ndr_push_init_ctx(r, NULL);
5332 ndr_err = call->ndr_push(push, NDR_OUT, r);
5333 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5338 blob = ndr_push_blob(push);
5339 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5349 static bool api_spoolss_OpenPrinterEx(pipes_struct *p)
5351 const struct ndr_interface_call *call;
5352 struct ndr_pull *pull;
5353 struct ndr_push *push;
5354 enum ndr_err_code ndr_err;
5356 struct spoolss_OpenPrinterEx *r;
5358 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTEREX];
5360 r = talloc(talloc_tos(), struct spoolss_OpenPrinterEx);
5365 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5370 pull = ndr_pull_init_blob(&blob, r, NULL);
5376 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5377 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5378 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5383 if (DEBUGLEVEL >= 10) {
5384 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, r);
5387 ZERO_STRUCT(r->out);
5388 r->out.handle = talloc_zero(r, struct policy_handle);
5389 if (r->out.handle == NULL) {
5394 r->out.result = _spoolss_OpenPrinterEx(p, r);
5396 if (p->rng_fault_state) {
5398 /* Return true here, srv_pipe_hnd.c will take care */
5402 if (DEBUGLEVEL >= 10) {
5403 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, r);
5406 push = ndr_push_init_ctx(r, NULL);
5412 ndr_err = call->ndr_push(push, NDR_OUT, r);
5413 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5418 blob = ndr_push_blob(push);
5419 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5429 static bool api_spoolss_AddPrinterEx(pipes_struct *p)
5431 const struct ndr_interface_call *call;
5432 struct ndr_pull *pull;
5433 struct ndr_push *push;
5434 enum ndr_err_code ndr_err;
5436 struct spoolss_AddPrinterEx *r;
5438 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTEREX];
5440 r = talloc(talloc_tos(), struct spoolss_AddPrinterEx);
5445 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5450 pull = ndr_pull_init_blob(&blob, r, NULL);
5456 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5457 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5458 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5463 if (DEBUGLEVEL >= 10) {
5464 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, r);
5467 ZERO_STRUCT(r->out);
5468 r->out.handle = talloc_zero(r, struct policy_handle);
5469 if (r->out.handle == NULL) {
5474 r->out.result = _spoolss_AddPrinterEx(p, r);
5476 if (p->rng_fault_state) {
5478 /* Return true here, srv_pipe_hnd.c will take care */
5482 if (DEBUGLEVEL >= 10) {
5483 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, r);
5486 push = ndr_push_init_ctx(r, NULL);
5492 ndr_err = call->ndr_push(push, NDR_OUT, r);
5493 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5498 blob = ndr_push_blob(push);
5499 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5509 static bool api_spoolss_47(pipes_struct *p)
5511 const struct ndr_interface_call *call;
5512 struct ndr_pull *pull;
5513 struct ndr_push *push;
5514 enum ndr_err_code ndr_err;
5516 struct spoolss_47 *r;
5518 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_47];
5520 r = talloc(talloc_tos(), struct spoolss_47);
5525 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5530 pull = ndr_pull_init_blob(&blob, r, NULL);
5536 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5537 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5538 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5543 if (DEBUGLEVEL >= 10) {
5544 NDR_PRINT_IN_DEBUG(spoolss_47, r);
5547 r->out.result = _spoolss_47(p, r);
5549 if (p->rng_fault_state) {
5551 /* Return true here, srv_pipe_hnd.c will take care */
5555 if (DEBUGLEVEL >= 10) {
5556 NDR_PRINT_OUT_DEBUG(spoolss_47, r);
5559 push = ndr_push_init_ctx(r, NULL);
5565 ndr_err = call->ndr_push(push, NDR_OUT, r);
5566 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5571 blob = ndr_push_blob(push);
5572 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5582 static bool api_spoolss_EnumPrinterData(pipes_struct *p)
5584 const struct ndr_interface_call *call;
5585 struct ndr_pull *pull;
5586 struct ndr_push *push;
5587 enum ndr_err_code ndr_err;
5589 struct spoolss_EnumPrinterData *r;
5591 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATA];
5593 r = talloc(talloc_tos(), struct spoolss_EnumPrinterData);
5598 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5603 pull = ndr_pull_init_blob(&blob, r, NULL);
5609 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5610 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5611 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5616 if (DEBUGLEVEL >= 10) {
5617 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, r);
5620 ZERO_STRUCT(r->out);
5621 r->out.value_name = talloc_zero_array(r, const char, r->in.value_offered / 2);
5622 if (r->out.value_name == NULL) {
5627 r->out.value_needed = talloc_zero(r, uint32_t);
5628 if (r->out.value_needed == NULL) {
5633 r->out.printerdata_type = talloc_zero(r, uint32_t);
5634 if (r->out.printerdata_type == NULL) {
5639 r->out.buffer = talloc_zero(r, DATA_BLOB);
5640 if (r->out.buffer == NULL) {
5645 r->out.data_needed = talloc_zero(r, uint32_t);
5646 if (r->out.data_needed == NULL) {
5651 r->out.result = _spoolss_EnumPrinterData(p, r);
5653 if (p->rng_fault_state) {
5655 /* Return true here, srv_pipe_hnd.c will take care */
5659 if (DEBUGLEVEL >= 10) {
5660 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, r);
5663 push = ndr_push_init_ctx(r, NULL);
5669 ndr_err = call->ndr_push(push, NDR_OUT, r);
5670 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5675 blob = ndr_push_blob(push);
5676 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5686 static bool api_spoolss_DeletePrinterData(pipes_struct *p)
5688 const struct ndr_interface_call *call;
5689 struct ndr_pull *pull;
5690 struct ndr_push *push;
5691 enum ndr_err_code ndr_err;
5693 struct spoolss_DeletePrinterData *r;
5695 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATA];
5697 r = talloc(talloc_tos(), struct spoolss_DeletePrinterData);
5702 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5707 pull = ndr_pull_init_blob(&blob, r, NULL);
5713 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5714 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5715 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5720 if (DEBUGLEVEL >= 10) {
5721 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, r);
5724 r->out.result = _spoolss_DeletePrinterData(p, r);
5726 if (p->rng_fault_state) {
5728 /* Return true here, srv_pipe_hnd.c will take care */
5732 if (DEBUGLEVEL >= 10) {
5733 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, r);
5736 push = ndr_push_init_ctx(r, NULL);
5742 ndr_err = call->ndr_push(push, NDR_OUT, r);
5743 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5748 blob = ndr_push_blob(push);
5749 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5759 static bool api_spoolss_4a(pipes_struct *p)
5761 const struct ndr_interface_call *call;
5762 struct ndr_pull *pull;
5763 struct ndr_push *push;
5764 enum ndr_err_code ndr_err;
5766 struct spoolss_4a *r;
5768 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4A];
5770 r = talloc(talloc_tos(), struct spoolss_4a);
5775 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5780 pull = ndr_pull_init_blob(&blob, r, NULL);
5786 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5787 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5788 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5793 if (DEBUGLEVEL >= 10) {
5794 NDR_PRINT_IN_DEBUG(spoolss_4a, r);
5797 r->out.result = _spoolss_4a(p, r);
5799 if (p->rng_fault_state) {
5801 /* Return true here, srv_pipe_hnd.c will take care */
5805 if (DEBUGLEVEL >= 10) {
5806 NDR_PRINT_OUT_DEBUG(spoolss_4a, r);
5809 push = ndr_push_init_ctx(r, NULL);
5815 ndr_err = call->ndr_push(push, NDR_OUT, r);
5816 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5821 blob = ndr_push_blob(push);
5822 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5832 static bool api_spoolss_4b(pipes_struct *p)
5834 const struct ndr_interface_call *call;
5835 struct ndr_pull *pull;
5836 struct ndr_push *push;
5837 enum ndr_err_code ndr_err;
5839 struct spoolss_4b *r;
5841 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4B];
5843 r = talloc(talloc_tos(), struct spoolss_4b);
5848 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5853 pull = ndr_pull_init_blob(&blob, r, NULL);
5859 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5860 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5861 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5866 if (DEBUGLEVEL >= 10) {
5867 NDR_PRINT_IN_DEBUG(spoolss_4b, r);
5870 r->out.result = _spoolss_4b(p, r);
5872 if (p->rng_fault_state) {
5874 /* Return true here, srv_pipe_hnd.c will take care */
5878 if (DEBUGLEVEL >= 10) {
5879 NDR_PRINT_OUT_DEBUG(spoolss_4b, r);
5882 push = ndr_push_init_ctx(r, NULL);
5888 ndr_err = call->ndr_push(push, NDR_OUT, r);
5889 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5894 blob = ndr_push_blob(push);
5895 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5905 static bool api_spoolss_4c(pipes_struct *p)
5907 const struct ndr_interface_call *call;
5908 struct ndr_pull *pull;
5909 struct ndr_push *push;
5910 enum ndr_err_code ndr_err;
5912 struct spoolss_4c *r;
5914 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4C];
5916 r = talloc(talloc_tos(), struct spoolss_4c);
5921 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5926 pull = ndr_pull_init_blob(&blob, r, NULL);
5932 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5933 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5934 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5939 if (DEBUGLEVEL >= 10) {
5940 NDR_PRINT_IN_DEBUG(spoolss_4c, r);
5943 r->out.result = _spoolss_4c(p, r);
5945 if (p->rng_fault_state) {
5947 /* Return true here, srv_pipe_hnd.c will take care */
5951 if (DEBUGLEVEL >= 10) {
5952 NDR_PRINT_OUT_DEBUG(spoolss_4c, r);
5955 push = ndr_push_init_ctx(r, NULL);
5961 ndr_err = call->ndr_push(push, NDR_OUT, r);
5962 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5967 blob = ndr_push_blob(push);
5968 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5978 static bool api_spoolss_SetPrinterDataEx(pipes_struct *p)
5980 const struct ndr_interface_call *call;
5981 struct ndr_pull *pull;
5982 struct ndr_push *push;
5983 enum ndr_err_code ndr_err;
5985 struct spoolss_SetPrinterDataEx *r;
5987 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATAEX];
5989 r = talloc(talloc_tos(), struct spoolss_SetPrinterDataEx);
5994 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5999 pull = ndr_pull_init_blob(&blob, r, NULL);
6005 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6006 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6007 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6012 if (DEBUGLEVEL >= 10) {
6013 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, r);
6016 r->out.result = _spoolss_SetPrinterDataEx(p, r);
6018 if (p->rng_fault_state) {
6020 /* Return true here, srv_pipe_hnd.c will take care */
6024 if (DEBUGLEVEL >= 10) {
6025 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, r);
6028 push = ndr_push_init_ctx(r, NULL);
6034 ndr_err = call->ndr_push(push, NDR_OUT, r);
6035 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6040 blob = ndr_push_blob(push);
6041 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6051 static bool api_spoolss_GetPrinterDataEx(pipes_struct *p)
6053 const struct ndr_interface_call *call;
6054 struct ndr_pull *pull;
6055 struct ndr_push *push;
6056 enum ndr_err_code ndr_err;
6058 struct spoolss_GetPrinterDataEx *r;
6060 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATAEX];
6062 r = talloc(talloc_tos(), struct spoolss_GetPrinterDataEx);
6067 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6072 pull = ndr_pull_init_blob(&blob, r, NULL);
6078 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6079 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6080 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6085 if (DEBUGLEVEL >= 10) {
6086 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, r);
6089 ZERO_STRUCT(r->out);
6090 r->out.type = talloc_zero(r, uint32_t);
6091 if (r->out.type == NULL) {
6096 r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
6097 if (r->out.buffer == NULL) {
6102 r->out.needed = talloc_zero(r, uint32_t);
6103 if (r->out.needed == NULL) {
6108 r->out.result = _spoolss_GetPrinterDataEx(p, r);
6110 if (p->rng_fault_state) {
6112 /* Return true here, srv_pipe_hnd.c will take care */
6116 if (DEBUGLEVEL >= 10) {
6117 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, r);
6120 push = ndr_push_init_ctx(r, NULL);
6126 ndr_err = call->ndr_push(push, NDR_OUT, r);
6127 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6132 blob = ndr_push_blob(push);
6133 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6143 static bool api_spoolss_EnumPrinterDataEx(pipes_struct *p)
6145 const struct ndr_interface_call *call;
6146 struct ndr_pull *pull;
6147 struct ndr_push *push;
6148 enum ndr_err_code ndr_err;
6150 struct spoolss_EnumPrinterDataEx *r;
6152 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATAEX];
6154 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDataEx);
6159 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6164 pull = ndr_pull_init_blob(&blob, r, NULL);
6170 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6171 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6172 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6177 if (DEBUGLEVEL >= 10) {
6178 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, r);
6181 ZERO_STRUCT(r->out);
6182 r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
6183 if (r->out.buffer == NULL) {
6188 r->out.needed = talloc_zero(r, uint32_t);
6189 if (r->out.needed == NULL) {
6194 r->out.count = talloc_zero(r, uint32_t);
6195 if (r->out.count == NULL) {
6200 r->out.result = _spoolss_EnumPrinterDataEx(p, r);
6202 if (p->rng_fault_state) {
6204 /* Return true here, srv_pipe_hnd.c will take care */
6208 if (DEBUGLEVEL >= 10) {
6209 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, r);
6212 push = ndr_push_init_ctx(r, NULL);
6218 ndr_err = call->ndr_push(push, NDR_OUT, r);
6219 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6224 blob = ndr_push_blob(push);
6225 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6235 static bool api_spoolss_EnumPrinterKey(pipes_struct *p)
6237 const struct ndr_interface_call *call;
6238 struct ndr_pull *pull;
6239 struct ndr_push *push;
6240 enum ndr_err_code ndr_err;
6242 struct spoolss_EnumPrinterKey *r;
6244 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERKEY];
6246 r = talloc(talloc_tos(), struct spoolss_EnumPrinterKey);
6251 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6256 pull = ndr_pull_init_blob(&blob, r, NULL);
6262 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6263 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6264 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6269 if (DEBUGLEVEL >= 10) {
6270 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, r);
6273 ZERO_STRUCT(r->out);
6274 r->out.key_buffer = talloc_zero_array(r, uint16_t, r->in.key_buffer_size / 2);
6275 if (r->out.key_buffer == NULL) {
6280 r->out.needed = talloc_zero(r, uint32_t);
6281 if (r->out.needed == NULL) {
6286 r->out.result = _spoolss_EnumPrinterKey(p, r);
6288 if (p->rng_fault_state) {
6290 /* Return true here, srv_pipe_hnd.c will take care */
6294 if (DEBUGLEVEL >= 10) {
6295 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, r);
6298 push = ndr_push_init_ctx(r, NULL);
6304 ndr_err = call->ndr_push(push, NDR_OUT, r);
6305 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6310 blob = ndr_push_blob(push);
6311 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6321 static bool api_spoolss_DeletePrinterDataEx(pipes_struct *p)
6323 const struct ndr_interface_call *call;
6324 struct ndr_pull *pull;
6325 struct ndr_push *push;
6326 enum ndr_err_code ndr_err;
6328 struct spoolss_DeletePrinterDataEx *r;
6330 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATAEX];
6332 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDataEx);
6337 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6342 pull = ndr_pull_init_blob(&blob, r, NULL);
6348 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6349 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6350 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6355 if (DEBUGLEVEL >= 10) {
6356 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, r);
6359 r->out.result = _spoolss_DeletePrinterDataEx(p, r);
6361 if (p->rng_fault_state) {
6363 /* Return true here, srv_pipe_hnd.c will take care */
6367 if (DEBUGLEVEL >= 10) {
6368 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, r);
6371 push = ndr_push_init_ctx(r, NULL);
6377 ndr_err = call->ndr_push(push, NDR_OUT, r);
6378 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6383 blob = ndr_push_blob(push);
6384 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6394 static bool api_spoolss_DeletePrinterKey(pipes_struct *p)
6396 const struct ndr_interface_call *call;
6397 struct ndr_pull *pull;
6398 struct ndr_push *push;
6399 enum ndr_err_code ndr_err;
6401 struct spoolss_DeletePrinterKey *r;
6403 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERKEY];
6405 r = talloc(talloc_tos(), struct spoolss_DeletePrinterKey);
6410 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6415 pull = ndr_pull_init_blob(&blob, r, NULL);
6421 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6422 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6423 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6428 if (DEBUGLEVEL >= 10) {
6429 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, r);
6432 r->out.result = _spoolss_DeletePrinterKey(p, r);
6434 if (p->rng_fault_state) {
6436 /* Return true here, srv_pipe_hnd.c will take care */
6440 if (DEBUGLEVEL >= 10) {
6441 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, r);
6444 push = ndr_push_init_ctx(r, NULL);
6450 ndr_err = call->ndr_push(push, NDR_OUT, r);
6451 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6456 blob = ndr_push_blob(push);
6457 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6467 static bool api_spoolss_53(pipes_struct *p)
6469 const struct ndr_interface_call *call;
6470 struct ndr_pull *pull;
6471 struct ndr_push *push;
6472 enum ndr_err_code ndr_err;
6474 struct spoolss_53 *r;
6476 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_53];
6478 r = talloc(talloc_tos(), struct spoolss_53);
6483 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6488 pull = ndr_pull_init_blob(&blob, r, NULL);
6494 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6495 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6496 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6501 if (DEBUGLEVEL >= 10) {
6502 NDR_PRINT_IN_DEBUG(spoolss_53, r);
6505 r->out.result = _spoolss_53(p, r);
6507 if (p->rng_fault_state) {
6509 /* Return true here, srv_pipe_hnd.c will take care */
6513 if (DEBUGLEVEL >= 10) {
6514 NDR_PRINT_OUT_DEBUG(spoolss_53, r);
6517 push = ndr_push_init_ctx(r, NULL);
6523 ndr_err = call->ndr_push(push, NDR_OUT, r);
6524 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6529 blob = ndr_push_blob(push);
6530 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6540 static bool api_spoolss_DeletePrinterDriverEx(pipes_struct *p)
6542 const struct ndr_interface_call *call;
6543 struct ndr_pull *pull;
6544 struct ndr_push *push;
6545 enum ndr_err_code ndr_err;
6547 struct spoolss_DeletePrinterDriverEx *r;
6549 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVEREX];
6551 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriverEx);
6556 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6561 pull = ndr_pull_init_blob(&blob, r, NULL);
6567 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6568 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6569 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6574 if (DEBUGLEVEL >= 10) {
6575 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, r);
6578 r->out.result = _spoolss_DeletePrinterDriverEx(p, r);
6580 if (p->rng_fault_state) {
6582 /* Return true here, srv_pipe_hnd.c will take care */
6586 if (DEBUGLEVEL >= 10) {
6587 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, r);
6590 push = ndr_push_init_ctx(r, NULL);
6596 ndr_err = call->ndr_push(push, NDR_OUT, r);
6597 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6602 blob = ndr_push_blob(push);
6603 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6613 static bool api_spoolss_55(pipes_struct *p)
6615 const struct ndr_interface_call *call;
6616 struct ndr_pull *pull;
6617 struct ndr_push *push;
6618 enum ndr_err_code ndr_err;
6620 struct spoolss_55 *r;
6622 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_55];
6624 r = talloc(talloc_tos(), struct spoolss_55);
6629 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6634 pull = ndr_pull_init_blob(&blob, r, NULL);
6640 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6641 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6647 if (DEBUGLEVEL >= 10) {
6648 NDR_PRINT_IN_DEBUG(spoolss_55, r);
6651 r->out.result = _spoolss_55(p, r);
6653 if (p->rng_fault_state) {
6655 /* Return true here, srv_pipe_hnd.c will take care */
6659 if (DEBUGLEVEL >= 10) {
6660 NDR_PRINT_OUT_DEBUG(spoolss_55, r);
6663 push = ndr_push_init_ctx(r, NULL);
6669 ndr_err = call->ndr_push(push, NDR_OUT, r);
6670 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6675 blob = ndr_push_blob(push);
6676 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6686 static bool api_spoolss_56(pipes_struct *p)
6688 const struct ndr_interface_call *call;
6689 struct ndr_pull *pull;
6690 struct ndr_push *push;
6691 enum ndr_err_code ndr_err;
6693 struct spoolss_56 *r;
6695 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_56];
6697 r = talloc(talloc_tos(), struct spoolss_56);
6702 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6707 pull = ndr_pull_init_blob(&blob, r, NULL);
6713 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6714 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6715 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6720 if (DEBUGLEVEL >= 10) {
6721 NDR_PRINT_IN_DEBUG(spoolss_56, r);
6724 r->out.result = _spoolss_56(p, r);
6726 if (p->rng_fault_state) {
6728 /* Return true here, srv_pipe_hnd.c will take care */
6732 if (DEBUGLEVEL >= 10) {
6733 NDR_PRINT_OUT_DEBUG(spoolss_56, r);
6736 push = ndr_push_init_ctx(r, NULL);
6742 ndr_err = call->ndr_push(push, NDR_OUT, r);
6743 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6748 blob = ndr_push_blob(push);
6749 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6759 static bool api_spoolss_57(pipes_struct *p)
6761 const struct ndr_interface_call *call;
6762 struct ndr_pull *pull;
6763 struct ndr_push *push;
6764 enum ndr_err_code ndr_err;
6766 struct spoolss_57 *r;
6768 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_57];
6770 r = talloc(talloc_tos(), struct spoolss_57);
6775 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6780 pull = ndr_pull_init_blob(&blob, r, NULL);
6786 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6787 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6788 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6793 if (DEBUGLEVEL >= 10) {
6794 NDR_PRINT_IN_DEBUG(spoolss_57, r);
6797 r->out.result = _spoolss_57(p, r);
6799 if (p->rng_fault_state) {
6801 /* Return true here, srv_pipe_hnd.c will take care */
6805 if (DEBUGLEVEL >= 10) {
6806 NDR_PRINT_OUT_DEBUG(spoolss_57, r);
6809 push = ndr_push_init_ctx(r, NULL);
6815 ndr_err = call->ndr_push(push, NDR_OUT, r);
6816 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6821 blob = ndr_push_blob(push);
6822 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6832 static bool api_spoolss_XcvData(pipes_struct *p)
6834 const struct ndr_interface_call *call;
6835 struct ndr_pull *pull;
6836 struct ndr_push *push;
6837 enum ndr_err_code ndr_err;
6839 struct spoolss_XcvData *r;
6841 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_XCVDATA];
6843 r = talloc(talloc_tos(), struct spoolss_XcvData);
6848 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6853 pull = ndr_pull_init_blob(&blob, r, NULL);
6859 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6860 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6861 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6866 if (DEBUGLEVEL >= 10) {
6867 NDR_PRINT_IN_DEBUG(spoolss_XcvData, r);
6870 ZERO_STRUCT(r->out);
6871 r->out.status_code = r->in.status_code;
6872 r->out.out_data = talloc_zero_array(r, uint8_t, r->in.out_data_size);
6873 if (r->out.out_data == NULL) {
6878 r->out.needed = talloc_zero(r, uint32_t);
6879 if (r->out.needed == NULL) {
6884 r->out.result = _spoolss_XcvData(p, r);
6886 if (p->rng_fault_state) {
6888 /* Return true here, srv_pipe_hnd.c will take care */
6892 if (DEBUGLEVEL >= 10) {
6893 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, r);
6896 push = ndr_push_init_ctx(r, NULL);
6902 ndr_err = call->ndr_push(push, NDR_OUT, r);
6903 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6908 blob = ndr_push_blob(push);
6909 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6919 static bool api_spoolss_AddPrinterDriverEx(pipes_struct *p)
6921 const struct ndr_interface_call *call;
6922 struct ndr_pull *pull;
6923 struct ndr_push *push;
6924 enum ndr_err_code ndr_err;
6926 struct spoolss_AddPrinterDriverEx *r;
6928 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVEREX];
6930 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriverEx);
6935 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6940 pull = ndr_pull_init_blob(&blob, r, NULL);
6946 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6947 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6948 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6953 if (DEBUGLEVEL >= 10) {
6954 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, r);
6957 r->out.result = _spoolss_AddPrinterDriverEx(p, r);
6959 if (p->rng_fault_state) {
6961 /* Return true here, srv_pipe_hnd.c will take care */
6965 if (DEBUGLEVEL >= 10) {
6966 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, r);
6969 push = ndr_push_init_ctx(r, NULL);
6975 ndr_err = call->ndr_push(push, NDR_OUT, r);
6976 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6981 blob = ndr_push_blob(push);
6982 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6992 static bool api_spoolss_5a(pipes_struct *p)
6994 const struct ndr_interface_call *call;
6995 struct ndr_pull *pull;
6996 struct ndr_push *push;
6997 enum ndr_err_code ndr_err;
6999 struct spoolss_5a *r;
7001 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5A];
7003 r = talloc(talloc_tos(), struct spoolss_5a);
7008 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7013 pull = ndr_pull_init_blob(&blob, r, NULL);
7019 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7020 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7021 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7026 if (DEBUGLEVEL >= 10) {
7027 NDR_PRINT_IN_DEBUG(spoolss_5a, r);
7030 r->out.result = _spoolss_5a(p, r);
7032 if (p->rng_fault_state) {
7034 /* Return true here, srv_pipe_hnd.c will take care */
7038 if (DEBUGLEVEL >= 10) {
7039 NDR_PRINT_OUT_DEBUG(spoolss_5a, r);
7042 push = ndr_push_init_ctx(r, NULL);
7048 ndr_err = call->ndr_push(push, NDR_OUT, r);
7049 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7054 blob = ndr_push_blob(push);
7055 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7065 static bool api_spoolss_5b(pipes_struct *p)
7067 const struct ndr_interface_call *call;
7068 struct ndr_pull *pull;
7069 struct ndr_push *push;
7070 enum ndr_err_code ndr_err;
7072 struct spoolss_5b *r;
7074 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5B];
7076 r = talloc(talloc_tos(), struct spoolss_5b);
7081 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7086 pull = ndr_pull_init_blob(&blob, r, NULL);
7092 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7093 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7094 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7099 if (DEBUGLEVEL >= 10) {
7100 NDR_PRINT_IN_DEBUG(spoolss_5b, r);
7103 r->out.result = _spoolss_5b(p, r);
7105 if (p->rng_fault_state) {
7107 /* Return true here, srv_pipe_hnd.c will take care */
7111 if (DEBUGLEVEL >= 10) {
7112 NDR_PRINT_OUT_DEBUG(spoolss_5b, r);
7115 push = ndr_push_init_ctx(r, NULL);
7121 ndr_err = call->ndr_push(push, NDR_OUT, r);
7122 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7127 blob = ndr_push_blob(push);
7128 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7138 static bool api_spoolss_5c(pipes_struct *p)
7140 const struct ndr_interface_call *call;
7141 struct ndr_pull *pull;
7142 struct ndr_push *push;
7143 enum ndr_err_code ndr_err;
7145 struct spoolss_5c *r;
7147 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5C];
7149 r = talloc(talloc_tos(), struct spoolss_5c);
7154 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7159 pull = ndr_pull_init_blob(&blob, r, NULL);
7165 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7166 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7167 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7172 if (DEBUGLEVEL >= 10) {
7173 NDR_PRINT_IN_DEBUG(spoolss_5c, r);
7176 r->out.result = _spoolss_5c(p, r);
7178 if (p->rng_fault_state) {
7180 /* Return true here, srv_pipe_hnd.c will take care */
7184 if (DEBUGLEVEL >= 10) {
7185 NDR_PRINT_OUT_DEBUG(spoolss_5c, r);
7188 push = ndr_push_init_ctx(r, NULL);
7194 ndr_err = call->ndr_push(push, NDR_OUT, r);
7195 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7200 blob = ndr_push_blob(push);
7201 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7211 static bool api_spoolss_5d(pipes_struct *p)
7213 const struct ndr_interface_call *call;
7214 struct ndr_pull *pull;
7215 struct ndr_push *push;
7216 enum ndr_err_code ndr_err;
7218 struct spoolss_5d *r;
7220 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5D];
7222 r = talloc(talloc_tos(), struct spoolss_5d);
7227 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7232 pull = ndr_pull_init_blob(&blob, r, NULL);
7238 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7239 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7240 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7245 if (DEBUGLEVEL >= 10) {
7246 NDR_PRINT_IN_DEBUG(spoolss_5d, r);
7249 r->out.result = _spoolss_5d(p, r);
7251 if (p->rng_fault_state) {
7253 /* Return true here, srv_pipe_hnd.c will take care */
7257 if (DEBUGLEVEL >= 10) {
7258 NDR_PRINT_OUT_DEBUG(spoolss_5d, r);
7261 push = ndr_push_init_ctx(r, NULL);
7267 ndr_err = call->ndr_push(push, NDR_OUT, r);
7268 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7273 blob = ndr_push_blob(push);
7274 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7284 static bool api_spoolss_5e(pipes_struct *p)
7286 const struct ndr_interface_call *call;
7287 struct ndr_pull *pull;
7288 struct ndr_push *push;
7289 enum ndr_err_code ndr_err;
7291 struct spoolss_5e *r;
7293 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5E];
7295 r = talloc(talloc_tos(), struct spoolss_5e);
7300 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7305 pull = ndr_pull_init_blob(&blob, r, NULL);
7311 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7312 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7313 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7318 if (DEBUGLEVEL >= 10) {
7319 NDR_PRINT_IN_DEBUG(spoolss_5e, r);
7322 r->out.result = _spoolss_5e(p, r);
7324 if (p->rng_fault_state) {
7326 /* Return true here, srv_pipe_hnd.c will take care */
7330 if (DEBUGLEVEL >= 10) {
7331 NDR_PRINT_OUT_DEBUG(spoolss_5e, r);
7334 push = ndr_push_init_ctx(r, NULL);
7340 ndr_err = call->ndr_push(push, NDR_OUT, r);
7341 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7346 blob = ndr_push_blob(push);
7347 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7357 static bool api_spoolss_5f(pipes_struct *p)
7359 const struct ndr_interface_call *call;
7360 struct ndr_pull *pull;
7361 struct ndr_push *push;
7362 enum ndr_err_code ndr_err;
7364 struct spoolss_5f *r;
7366 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5F];
7368 r = talloc(talloc_tos(), struct spoolss_5f);
7373 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7378 pull = ndr_pull_init_blob(&blob, r, NULL);
7384 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7385 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7386 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7391 if (DEBUGLEVEL >= 10) {
7392 NDR_PRINT_IN_DEBUG(spoolss_5f, r);
7395 r->out.result = _spoolss_5f(p, r);
7397 if (p->rng_fault_state) {
7399 /* Return true here, srv_pipe_hnd.c will take care */
7403 if (DEBUGLEVEL >= 10) {
7404 NDR_PRINT_OUT_DEBUG(spoolss_5f, r);
7407 push = ndr_push_init_ctx(r, NULL);
7413 ndr_err = call->ndr_push(push, NDR_OUT, r);
7414 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7419 blob = ndr_push_blob(push);
7420 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7432 static struct api_struct api_spoolss_cmds[] =
7434 {"SPOOLSS_ENUMPRINTERS", NDR_SPOOLSS_ENUMPRINTERS, api_spoolss_EnumPrinters},
7435 {"SPOOLSS_OPENPRINTER", NDR_SPOOLSS_OPENPRINTER, api_spoolss_OpenPrinter},
7436 {"SPOOLSS_SETJOB", NDR_SPOOLSS_SETJOB, api_spoolss_SetJob},
7437 {"SPOOLSS_GETJOB", NDR_SPOOLSS_GETJOB, api_spoolss_GetJob},
7438 {"SPOOLSS_ENUMJOBS", NDR_SPOOLSS_ENUMJOBS, api_spoolss_EnumJobs},
7439 {"SPOOLSS_ADDPRINTER", NDR_SPOOLSS_ADDPRINTER, api_spoolss_AddPrinter},
7440 {"SPOOLSS_DELETEPRINTER", NDR_SPOOLSS_DELETEPRINTER, api_spoolss_DeletePrinter},
7441 {"SPOOLSS_SETPRINTER", NDR_SPOOLSS_SETPRINTER, api_spoolss_SetPrinter},
7442 {"SPOOLSS_GETPRINTER", NDR_SPOOLSS_GETPRINTER, api_spoolss_GetPrinter},
7443 {"SPOOLSS_ADDPRINTERDRIVER", NDR_SPOOLSS_ADDPRINTERDRIVER, api_spoolss_AddPrinterDriver},
7444 {"SPOOLSS_ENUMPRINTERDRIVERS", NDR_SPOOLSS_ENUMPRINTERDRIVERS, api_spoolss_EnumPrinterDrivers},
7445 {"SPOOLSS_GETPRINTERDRIVER", NDR_SPOOLSS_GETPRINTERDRIVER, api_spoolss_GetPrinterDriver},
7446 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_GetPrinterDriverDirectory},
7447 {"SPOOLSS_DELETEPRINTERDRIVER", NDR_SPOOLSS_DELETEPRINTERDRIVER, api_spoolss_DeletePrinterDriver},
7448 {"SPOOLSS_ADDPRINTPROCESSOR", NDR_SPOOLSS_ADDPRINTPROCESSOR, api_spoolss_AddPrintProcessor},
7449 {"SPOOLSS_ENUMPRINTPROCESSORS", NDR_SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_EnumPrintProcessors},
7450 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY", NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY, api_spoolss_GetPrintProcessorDirectory},
7451 {"SPOOLSS_STARTDOCPRINTER", NDR_SPOOLSS_STARTDOCPRINTER, api_spoolss_StartDocPrinter},
7452 {"SPOOLSS_STARTPAGEPRINTER", NDR_SPOOLSS_STARTPAGEPRINTER, api_spoolss_StartPagePrinter},
7453 {"SPOOLSS_WRITEPRINTER", NDR_SPOOLSS_WRITEPRINTER, api_spoolss_WritePrinter},
7454 {"SPOOLSS_ENDPAGEPRINTER", NDR_SPOOLSS_ENDPAGEPRINTER, api_spoolss_EndPagePrinter},
7455 {"SPOOLSS_ABORTPRINTER", NDR_SPOOLSS_ABORTPRINTER, api_spoolss_AbortPrinter},
7456 {"SPOOLSS_READPRINTER", NDR_SPOOLSS_READPRINTER, api_spoolss_ReadPrinter},
7457 {"SPOOLSS_ENDDOCPRINTER", NDR_SPOOLSS_ENDDOCPRINTER, api_spoolss_EndDocPrinter},
7458 {"SPOOLSS_ADDJOB", NDR_SPOOLSS_ADDJOB, api_spoolss_AddJob},
7459 {"SPOOLSS_SCHEDULEJOB", NDR_SPOOLSS_SCHEDULEJOB, api_spoolss_ScheduleJob},
7460 {"SPOOLSS_GETPRINTERDATA", NDR_SPOOLSS_GETPRINTERDATA, api_spoolss_GetPrinterData},
7461 {"SPOOLSS_SETPRINTERDATA", NDR_SPOOLSS_SETPRINTERDATA, api_spoolss_SetPrinterData},
7462 {"SPOOLSS_WAITFORPRINTERCHANGE", NDR_SPOOLSS_WAITFORPRINTERCHANGE, api_spoolss_WaitForPrinterChange},
7463 {"SPOOLSS_CLOSEPRINTER", NDR_SPOOLSS_CLOSEPRINTER, api_spoolss_ClosePrinter},
7464 {"SPOOLSS_ADDFORM", NDR_SPOOLSS_ADDFORM, api_spoolss_AddForm},
7465 {"SPOOLSS_DELETEFORM", NDR_SPOOLSS_DELETEFORM, api_spoolss_DeleteForm},
7466 {"SPOOLSS_GETFORM", NDR_SPOOLSS_GETFORM, api_spoolss_GetForm},
7467 {"SPOOLSS_SETFORM", NDR_SPOOLSS_SETFORM, api_spoolss_SetForm},
7468 {"SPOOLSS_ENUMFORMS", NDR_SPOOLSS_ENUMFORMS, api_spoolss_EnumForms},
7469 {"SPOOLSS_ENUMPORTS", NDR_SPOOLSS_ENUMPORTS, api_spoolss_EnumPorts},
7470 {"SPOOLSS_ENUMMONITORS", NDR_SPOOLSS_ENUMMONITORS, api_spoolss_EnumMonitors},
7471 {"SPOOLSS_ADDPORT", NDR_SPOOLSS_ADDPORT, api_spoolss_AddPort},
7472 {"SPOOLSS_CONFIGUREPORT", NDR_SPOOLSS_CONFIGUREPORT, api_spoolss_ConfigurePort},
7473 {"SPOOLSS_DELETEPORT", NDR_SPOOLSS_DELETEPORT, api_spoolss_DeletePort},
7474 {"SPOOLSS_CREATEPRINTERIC", NDR_SPOOLSS_CREATEPRINTERIC, api_spoolss_CreatePrinterIC},
7475 {"SPOOLSS_PLAYGDISCRIPTONPRINTERIC", NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC, api_spoolss_PlayGDIScriptOnPrinterIC},
7476 {"SPOOLSS_DELETEPRINTERIC", NDR_SPOOLSS_DELETEPRINTERIC, api_spoolss_DeletePrinterIC},
7477 {"SPOOLSS_ADDPRINTERCONNECTION", NDR_SPOOLSS_ADDPRINTERCONNECTION, api_spoolss_AddPrinterConnection},
7478 {"SPOOLSS_DELETEPRINTERCONNECTION", NDR_SPOOLSS_DELETEPRINTERCONNECTION, api_spoolss_DeletePrinterConnection},
7479 {"SPOOLSS_PRINTERMESSAGEBOX", NDR_SPOOLSS_PRINTERMESSAGEBOX, api_spoolss_PrinterMessageBox},
7480 {"SPOOLSS_ADDMONITOR", NDR_SPOOLSS_ADDMONITOR, api_spoolss_AddMonitor},
7481 {"SPOOLSS_DELETEMONITOR", NDR_SPOOLSS_DELETEMONITOR, api_spoolss_DeleteMonitor},
7482 {"SPOOLSS_DELETEPRINTPROCESSOR", NDR_SPOOLSS_DELETEPRINTPROCESSOR, api_spoolss_DeletePrintProcessor},
7483 {"SPOOLSS_ADDPRINTPROVIDOR", NDR_SPOOLSS_ADDPRINTPROVIDOR, api_spoolss_AddPrintProvidor},
7484 {"SPOOLSS_DELETEPRINTPROVIDOR", NDR_SPOOLSS_DELETEPRINTPROVIDOR, api_spoolss_DeletePrintProvidor},
7485 {"SPOOLSS_ENUMPRINTPROCDATATYPES", NDR_SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_EnumPrintProcDataTypes},
7486 {"SPOOLSS_RESETPRINTER", NDR_SPOOLSS_RESETPRINTER, api_spoolss_ResetPrinter},
7487 {"SPOOLSS_GETPRINTERDRIVER2", NDR_SPOOLSS_GETPRINTERDRIVER2, api_spoolss_GetPrinterDriver2},
7488 {"SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_FindFirstPrinterChangeNotification},
7489 {"SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION, api_spoolss_FindNextPrinterChangeNotification},
7490 {"SPOOLSS_FINDCLOSEPRINTERNOTIFY", NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY, api_spoolss_FindClosePrinterNotify},
7491 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD, api_spoolss_RouterFindFirstPrinterChangeNotificationOld},
7492 {"SPOOLSS_REPLYOPENPRINTER", NDR_SPOOLSS_REPLYOPENPRINTER, api_spoolss_ReplyOpenPrinter},
7493 {"SPOOLSS_ROUTERREPLYPRINTER", NDR_SPOOLSS_ROUTERREPLYPRINTER, api_spoolss_RouterReplyPrinter},
7494 {"SPOOLSS_REPLYCLOSEPRINTER", NDR_SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_ReplyClosePrinter},
7495 {"SPOOLSS_ADDPORTEX", NDR_SPOOLSS_ADDPORTEX, api_spoolss_AddPortEx},
7496 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_RouterFindFirstPrinterChangeNotification},
7497 {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT, api_spoolss_SpoolerInit},
7498 {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX, api_spoolss_ResetPrinterEx},
7499 {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx},
7500 {"SPOOLSS_ROUTERREPLYPRINTEREX", NDR_SPOOLSS_ROUTERREPLYPRINTEREX, api_spoolss_RouterReplyPrinterEx},
7501 {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY, api_spoolss_RouterRefreshPrinterChangeNotify},
7502 {"SPOOLSS_44", NDR_SPOOLSS_44, api_spoolss_44},
7503 {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX, api_spoolss_OpenPrinterEx},
7504 {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX, api_spoolss_AddPrinterEx},
7505 {"SPOOLSS_47", NDR_SPOOLSS_47, api_spoolss_47},
7506 {"SPOOLSS_ENUMPRINTERDATA", NDR_SPOOLSS_ENUMPRINTERDATA, api_spoolss_EnumPrinterData},
7507 {"SPOOLSS_DELETEPRINTERDATA", NDR_SPOOLSS_DELETEPRINTERDATA, api_spoolss_DeletePrinterData},
7508 {"SPOOLSS_4A", NDR_SPOOLSS_4A, api_spoolss_4a},
7509 {"SPOOLSS_4B", NDR_SPOOLSS_4B, api_spoolss_4b},
7510 {"SPOOLSS_4C", NDR_SPOOLSS_4C, api_spoolss_4c},
7511 {"SPOOLSS_SETPRINTERDATAEX", NDR_SPOOLSS_SETPRINTERDATAEX, api_spoolss_SetPrinterDataEx},
7512 {"SPOOLSS_GETPRINTERDATAEX", NDR_SPOOLSS_GETPRINTERDATAEX, api_spoolss_GetPrinterDataEx},
7513 {"SPOOLSS_ENUMPRINTERDATAEX", NDR_SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_EnumPrinterDataEx},
7514 {"SPOOLSS_ENUMPRINTERKEY", NDR_SPOOLSS_ENUMPRINTERKEY, api_spoolss_EnumPrinterKey},
7515 {"SPOOLSS_DELETEPRINTERDATAEX", NDR_SPOOLSS_DELETEPRINTERDATAEX, api_spoolss_DeletePrinterDataEx},
7516 {"SPOOLSS_DELETEPRINTERKEY", NDR_SPOOLSS_DELETEPRINTERKEY, api_spoolss_DeletePrinterKey},
7517 {"SPOOLSS_53", NDR_SPOOLSS_53, api_spoolss_53},
7518 {"SPOOLSS_DELETEPRINTERDRIVEREX", NDR_SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_DeletePrinterDriverEx},
7519 {"SPOOLSS_55", NDR_SPOOLSS_55, api_spoolss_55},
7520 {"SPOOLSS_56", NDR_SPOOLSS_56, api_spoolss_56},
7521 {"SPOOLSS_57", NDR_SPOOLSS_57, api_spoolss_57},
7522 {"SPOOLSS_XCVDATA", NDR_SPOOLSS_XCVDATA, api_spoolss_XcvData},
7523 {"SPOOLSS_ADDPRINTERDRIVEREX", NDR_SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_AddPrinterDriverEx},
7524 {"SPOOLSS_5A", NDR_SPOOLSS_5A, api_spoolss_5a},
7525 {"SPOOLSS_5B", NDR_SPOOLSS_5B, api_spoolss_5b},
7526 {"SPOOLSS_5C", NDR_SPOOLSS_5C, api_spoolss_5c},
7527 {"SPOOLSS_5D", NDR_SPOOLSS_5D, api_spoolss_5d},
7528 {"SPOOLSS_5E", NDR_SPOOLSS_5E, api_spoolss_5e},
7529 {"SPOOLSS_5F", NDR_SPOOLSS_5F, api_spoolss_5f},
7532 void spoolss_get_pipe_fns(struct api_struct **fns, int *n_fns)
7534 *fns = api_spoolss_cmds;
7535 *n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
7538 NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
7540 if (cli->pipes_struct == NULL) {
7541 return NT_STATUS_INVALID_PARAMETER;
7546 case NDR_SPOOLSS_ENUMPRINTERS: {
7547 struct spoolss_EnumPrinters *r = (struct spoolss_EnumPrinters *)_r;
7548 ZERO_STRUCT(r->out);
7549 r->out.count = talloc_zero(mem_ctx, uint32_t);
7550 if (r->out.count == NULL) {
7551 return NT_STATUS_NO_MEMORY;
7554 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo *);
7555 if (r->out.info == NULL) {
7556 return NT_STATUS_NO_MEMORY;
7559 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7560 if (r->out.needed == NULL) {
7561 return NT_STATUS_NO_MEMORY;
7564 r->out.result = _spoolss_EnumPrinters(cli->pipes_struct, r);
7565 return NT_STATUS_OK;
7568 case NDR_SPOOLSS_OPENPRINTER: {
7569 struct spoolss_OpenPrinter *r = (struct spoolss_OpenPrinter *)_r;
7570 ZERO_STRUCT(r->out);
7571 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
7572 if (r->out.handle == NULL) {
7573 return NT_STATUS_NO_MEMORY;
7576 r->out.result = _spoolss_OpenPrinter(cli->pipes_struct, r);
7577 return NT_STATUS_OK;
7580 case NDR_SPOOLSS_SETJOB: {
7581 struct spoolss_SetJob *r = (struct spoolss_SetJob *)_r;
7582 r->out.result = _spoolss_SetJob(cli->pipes_struct, r);
7583 return NT_STATUS_OK;
7586 case NDR_SPOOLSS_GETJOB: {
7587 struct spoolss_GetJob *r = (struct spoolss_GetJob *)_r;
7588 ZERO_STRUCT(r->out);
7589 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo);
7590 if (r->out.info == NULL) {
7591 return NT_STATUS_NO_MEMORY;
7594 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7595 if (r->out.needed == NULL) {
7596 return NT_STATUS_NO_MEMORY;
7599 r->out.result = _spoolss_GetJob(cli->pipes_struct, r);
7600 return NT_STATUS_OK;
7603 case NDR_SPOOLSS_ENUMJOBS: {
7604 struct spoolss_EnumJobs *r = (struct spoolss_EnumJobs *)_r;
7605 ZERO_STRUCT(r->out);
7606 r->out.count = talloc_zero(mem_ctx, uint32_t);
7607 if (r->out.count == NULL) {
7608 return NT_STATUS_NO_MEMORY;
7611 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo *);
7612 if (r->out.info == NULL) {
7613 return NT_STATUS_NO_MEMORY;
7616 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7617 if (r->out.needed == NULL) {
7618 return NT_STATUS_NO_MEMORY;
7621 r->out.result = _spoolss_EnumJobs(cli->pipes_struct, r);
7622 return NT_STATUS_OK;
7625 case NDR_SPOOLSS_ADDPRINTER: {
7626 struct spoolss_AddPrinter *r = (struct spoolss_AddPrinter *)_r;
7627 r->out.result = _spoolss_AddPrinter(cli->pipes_struct, r);
7628 return NT_STATUS_OK;
7631 case NDR_SPOOLSS_DELETEPRINTER: {
7632 struct spoolss_DeletePrinter *r = (struct spoolss_DeletePrinter *)_r;
7633 r->out.result = _spoolss_DeletePrinter(cli->pipes_struct, r);
7634 return NT_STATUS_OK;
7637 case NDR_SPOOLSS_SETPRINTER: {
7638 struct spoolss_SetPrinter *r = (struct spoolss_SetPrinter *)_r;
7639 r->out.result = _spoolss_SetPrinter(cli->pipes_struct, r);
7640 return NT_STATUS_OK;
7643 case NDR_SPOOLSS_GETPRINTER: {
7644 struct spoolss_GetPrinter *r = (struct spoolss_GetPrinter *)_r;
7645 ZERO_STRUCT(r->out);
7646 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo);
7647 if (r->out.info == NULL) {
7648 return NT_STATUS_NO_MEMORY;
7651 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7652 if (r->out.needed == NULL) {
7653 return NT_STATUS_NO_MEMORY;
7656 r->out.result = _spoolss_GetPrinter(cli->pipes_struct, r);
7657 return NT_STATUS_OK;
7660 case NDR_SPOOLSS_ADDPRINTERDRIVER: {
7661 struct spoolss_AddPrinterDriver *r = (struct spoolss_AddPrinterDriver *)_r;
7662 r->out.result = _spoolss_AddPrinterDriver(cli->pipes_struct, r);
7663 return NT_STATUS_OK;
7666 case NDR_SPOOLSS_ENUMPRINTERDRIVERS: {
7667 struct spoolss_EnumPrinterDrivers *r = (struct spoolss_EnumPrinterDrivers *)_r;
7668 ZERO_STRUCT(r->out);
7669 r->out.count = talloc_zero(mem_ctx, uint32_t);
7670 if (r->out.count == NULL) {
7671 return NT_STATUS_NO_MEMORY;
7674 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo *);
7675 if (r->out.info == NULL) {
7676 return NT_STATUS_NO_MEMORY;
7679 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7680 if (r->out.needed == NULL) {
7681 return NT_STATUS_NO_MEMORY;
7684 r->out.result = _spoolss_EnumPrinterDrivers(cli->pipes_struct, r);
7685 return NT_STATUS_OK;
7688 case NDR_SPOOLSS_GETPRINTERDRIVER: {
7689 struct spoolss_GetPrinterDriver *r = (struct spoolss_GetPrinterDriver *)_r;
7690 r->out.result = _spoolss_GetPrinterDriver(cli->pipes_struct, r);
7691 return NT_STATUS_OK;
7694 case NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY: {
7695 struct spoolss_GetPrinterDriverDirectory *r = (struct spoolss_GetPrinterDriverDirectory *)_r;
7696 ZERO_STRUCT(r->out);
7697 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverDirectoryInfo);
7698 if (r->out.info == NULL) {
7699 return NT_STATUS_NO_MEMORY;
7702 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7703 if (r->out.needed == NULL) {
7704 return NT_STATUS_NO_MEMORY;
7707 r->out.result = _spoolss_GetPrinterDriverDirectory(cli->pipes_struct, r);
7708 return NT_STATUS_OK;
7711 case NDR_SPOOLSS_DELETEPRINTERDRIVER: {
7712 struct spoolss_DeletePrinterDriver *r = (struct spoolss_DeletePrinterDriver *)_r;
7713 r->out.result = _spoolss_DeletePrinterDriver(cli->pipes_struct, r);
7714 return NT_STATUS_OK;
7717 case NDR_SPOOLSS_ADDPRINTPROCESSOR: {
7718 struct spoolss_AddPrintProcessor *r = (struct spoolss_AddPrintProcessor *)_r;
7719 r->out.result = _spoolss_AddPrintProcessor(cli->pipes_struct, r);
7720 return NT_STATUS_OK;
7723 case NDR_SPOOLSS_ENUMPRINTPROCESSORS: {
7724 struct spoolss_EnumPrintProcessors *r = (struct spoolss_EnumPrintProcessors *)_r;
7725 ZERO_STRUCT(r->out);
7726 r->out.count = talloc_zero(mem_ctx, uint32_t);
7727 if (r->out.count == NULL) {
7728 return NT_STATUS_NO_MEMORY;
7731 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorInfo *);
7732 if (r->out.info == NULL) {
7733 return NT_STATUS_NO_MEMORY;
7736 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7737 if (r->out.needed == NULL) {
7738 return NT_STATUS_NO_MEMORY;
7741 r->out.result = _spoolss_EnumPrintProcessors(cli->pipes_struct, r);
7742 return NT_STATUS_OK;
7745 case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY: {
7746 struct spoolss_GetPrintProcessorDirectory *r = (struct spoolss_GetPrintProcessorDirectory *)_r;
7747 ZERO_STRUCT(r->out);
7748 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorDirectoryInfo);
7749 if (r->out.info == NULL) {
7750 return NT_STATUS_NO_MEMORY;
7753 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7754 if (r->out.needed == NULL) {
7755 return NT_STATUS_NO_MEMORY;
7758 r->out.result = _spoolss_GetPrintProcessorDirectory(cli->pipes_struct, r);
7759 return NT_STATUS_OK;
7762 case NDR_SPOOLSS_STARTDOCPRINTER: {
7763 struct spoolss_StartDocPrinter *r = (struct spoolss_StartDocPrinter *)_r;
7764 ZERO_STRUCT(r->out);
7765 r->out.job_id = talloc_zero(mem_ctx, uint32_t);
7766 if (r->out.job_id == NULL) {
7767 return NT_STATUS_NO_MEMORY;
7770 r->out.result = _spoolss_StartDocPrinter(cli->pipes_struct, r);
7771 return NT_STATUS_OK;
7774 case NDR_SPOOLSS_STARTPAGEPRINTER: {
7775 struct spoolss_StartPagePrinter *r = (struct spoolss_StartPagePrinter *)_r;
7776 r->out.result = _spoolss_StartPagePrinter(cli->pipes_struct, r);
7777 return NT_STATUS_OK;
7780 case NDR_SPOOLSS_WRITEPRINTER: {
7781 struct spoolss_WritePrinter *r = (struct spoolss_WritePrinter *)_r;
7782 ZERO_STRUCT(r->out);
7783 r->out.num_written = talloc_zero(mem_ctx, uint32_t);
7784 if (r->out.num_written == NULL) {
7785 return NT_STATUS_NO_MEMORY;
7788 r->out.result = _spoolss_WritePrinter(cli->pipes_struct, r);
7789 return NT_STATUS_OK;
7792 case NDR_SPOOLSS_ENDPAGEPRINTER: {
7793 struct spoolss_EndPagePrinter *r = (struct spoolss_EndPagePrinter *)_r;
7794 r->out.result = _spoolss_EndPagePrinter(cli->pipes_struct, r);
7795 return NT_STATUS_OK;
7798 case NDR_SPOOLSS_ABORTPRINTER: {
7799 struct spoolss_AbortPrinter *r = (struct spoolss_AbortPrinter *)_r;
7800 r->out.result = _spoolss_AbortPrinter(cli->pipes_struct, r);
7801 return NT_STATUS_OK;
7804 case NDR_SPOOLSS_READPRINTER: {
7805 struct spoolss_ReadPrinter *r = (struct spoolss_ReadPrinter *)_r;
7806 ZERO_STRUCT(r->out);
7807 r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_size);
7808 if (r->out.data == NULL) {
7809 return NT_STATUS_NO_MEMORY;
7812 r->out._data_size = talloc_zero(mem_ctx, uint32_t);
7813 if (r->out._data_size == NULL) {
7814 return NT_STATUS_NO_MEMORY;
7817 r->out.result = _spoolss_ReadPrinter(cli->pipes_struct, r);
7818 return NT_STATUS_OK;
7821 case NDR_SPOOLSS_ENDDOCPRINTER: {
7822 struct spoolss_EndDocPrinter *r = (struct spoolss_EndDocPrinter *)_r;
7823 r->out.result = _spoolss_EndDocPrinter(cli->pipes_struct, r);
7824 return NT_STATUS_OK;
7827 case NDR_SPOOLSS_ADDJOB: {
7828 struct spoolss_AddJob *r = (struct spoolss_AddJob *)_r;
7829 ZERO_STRUCT(r->out);
7830 r->out.buffer = r->in.buffer;
7831 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7832 if (r->out.needed == NULL) {
7833 return NT_STATUS_NO_MEMORY;
7836 r->out.result = _spoolss_AddJob(cli->pipes_struct, r);
7837 return NT_STATUS_OK;
7840 case NDR_SPOOLSS_SCHEDULEJOB: {
7841 struct spoolss_ScheduleJob *r = (struct spoolss_ScheduleJob *)_r;
7842 r->out.result = _spoolss_ScheduleJob(cli->pipes_struct, r);
7843 return NT_STATUS_OK;
7846 case NDR_SPOOLSS_GETPRINTERDATA: {
7847 struct spoolss_GetPrinterData *r = (struct spoolss_GetPrinterData *)_r;
7848 ZERO_STRUCT(r->out);
7849 r->out.type = talloc_zero(mem_ctx, enum spoolss_PrinterDataType);
7850 if (r->out.type == NULL) {
7851 return NT_STATUS_NO_MEMORY;
7854 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7855 if (r->out.needed == NULL) {
7856 return NT_STATUS_NO_MEMORY;
7859 r->out.result = _spoolss_GetPrinterData(cli->pipes_struct, r);
7860 return NT_STATUS_OK;
7863 case NDR_SPOOLSS_SETPRINTERDATA: {
7864 struct spoolss_SetPrinterData *r = (struct spoolss_SetPrinterData *)_r;
7865 r->out.result = _spoolss_SetPrinterData(cli->pipes_struct, r);
7866 return NT_STATUS_OK;
7869 case NDR_SPOOLSS_WAITFORPRINTERCHANGE: {
7870 struct spoolss_WaitForPrinterChange *r = (struct spoolss_WaitForPrinterChange *)_r;
7871 r->out.result = _spoolss_WaitForPrinterChange(cli->pipes_struct, r);
7872 return NT_STATUS_OK;
7875 case NDR_SPOOLSS_CLOSEPRINTER: {
7876 struct spoolss_ClosePrinter *r = (struct spoolss_ClosePrinter *)_r;
7877 ZERO_STRUCT(r->out);
7878 r->out.handle = r->in.handle;
7879 r->out.result = _spoolss_ClosePrinter(cli->pipes_struct, r);
7880 return NT_STATUS_OK;
7883 case NDR_SPOOLSS_ADDFORM: {
7884 struct spoolss_AddForm *r = (struct spoolss_AddForm *)_r;
7885 r->out.result = _spoolss_AddForm(cli->pipes_struct, r);
7886 return NT_STATUS_OK;
7889 case NDR_SPOOLSS_DELETEFORM: {
7890 struct spoolss_DeleteForm *r = (struct spoolss_DeleteForm *)_r;
7891 r->out.result = _spoolss_DeleteForm(cli->pipes_struct, r);
7892 return NT_STATUS_OK;
7895 case NDR_SPOOLSS_GETFORM: {
7896 struct spoolss_GetForm *r = (struct spoolss_GetForm *)_r;
7897 ZERO_STRUCT(r->out);
7898 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo);
7899 if (r->out.info == NULL) {
7900 return NT_STATUS_NO_MEMORY;
7903 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7904 if (r->out.needed == NULL) {
7905 return NT_STATUS_NO_MEMORY;
7908 r->out.result = _spoolss_GetForm(cli->pipes_struct, r);
7909 return NT_STATUS_OK;
7912 case NDR_SPOOLSS_SETFORM: {
7913 struct spoolss_SetForm *r = (struct spoolss_SetForm *)_r;
7914 r->out.result = _spoolss_SetForm(cli->pipes_struct, r);
7915 return NT_STATUS_OK;
7918 case NDR_SPOOLSS_ENUMFORMS: {
7919 struct spoolss_EnumForms *r = (struct spoolss_EnumForms *)_r;
7920 ZERO_STRUCT(r->out);
7921 r->out.count = talloc_zero(mem_ctx, uint32_t);
7922 if (r->out.count == NULL) {
7923 return NT_STATUS_NO_MEMORY;
7926 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo *);
7927 if (r->out.info == NULL) {
7928 return NT_STATUS_NO_MEMORY;
7931 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7932 if (r->out.needed == NULL) {
7933 return NT_STATUS_NO_MEMORY;
7936 r->out.result = _spoolss_EnumForms(cli->pipes_struct, r);
7937 return NT_STATUS_OK;
7940 case NDR_SPOOLSS_ENUMPORTS: {
7941 struct spoolss_EnumPorts *r = (struct spoolss_EnumPorts *)_r;
7942 ZERO_STRUCT(r->out);
7943 r->out.count = talloc_zero(mem_ctx, uint32_t);
7944 if (r->out.count == NULL) {
7945 return NT_STATUS_NO_MEMORY;
7948 r->out.info = talloc_zero(mem_ctx, union spoolss_PortInfo *);
7949 if (r->out.info == NULL) {
7950 return NT_STATUS_NO_MEMORY;
7953 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7954 if (r->out.needed == NULL) {
7955 return NT_STATUS_NO_MEMORY;
7958 r->out.result = _spoolss_EnumPorts(cli->pipes_struct, r);
7959 return NT_STATUS_OK;
7962 case NDR_SPOOLSS_ENUMMONITORS: {
7963 struct spoolss_EnumMonitors *r = (struct spoolss_EnumMonitors *)_r;
7964 ZERO_STRUCT(r->out);
7965 r->out.count = talloc_zero(mem_ctx, uint32_t);
7966 if (r->out.count == NULL) {
7967 return NT_STATUS_NO_MEMORY;
7970 r->out.info = talloc_zero(mem_ctx, union spoolss_MonitorInfo *);
7971 if (r->out.info == NULL) {
7972 return NT_STATUS_NO_MEMORY;
7975 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7976 if (r->out.needed == NULL) {
7977 return NT_STATUS_NO_MEMORY;
7980 r->out.result = _spoolss_EnumMonitors(cli->pipes_struct, r);
7981 return NT_STATUS_OK;
7984 case NDR_SPOOLSS_ADDPORT: {
7985 struct spoolss_AddPort *r = (struct spoolss_AddPort *)_r;
7986 r->out.result = _spoolss_AddPort(cli->pipes_struct, r);
7987 return NT_STATUS_OK;
7990 case NDR_SPOOLSS_CONFIGUREPORT: {
7991 struct spoolss_ConfigurePort *r = (struct spoolss_ConfigurePort *)_r;
7992 r->out.result = _spoolss_ConfigurePort(cli->pipes_struct, r);
7993 return NT_STATUS_OK;
7996 case NDR_SPOOLSS_DELETEPORT: {
7997 struct spoolss_DeletePort *r = (struct spoolss_DeletePort *)_r;
7998 r->out.result = _spoolss_DeletePort(cli->pipes_struct, r);
7999 return NT_STATUS_OK;
8002 case NDR_SPOOLSS_CREATEPRINTERIC: {
8003 struct spoolss_CreatePrinterIC *r = (struct spoolss_CreatePrinterIC *)_r;
8004 r->out.result = _spoolss_CreatePrinterIC(cli->pipes_struct, r);
8005 return NT_STATUS_OK;
8008 case NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC: {
8009 struct spoolss_PlayGDIScriptOnPrinterIC *r = (struct spoolss_PlayGDIScriptOnPrinterIC *)_r;
8010 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(cli->pipes_struct, r);
8011 return NT_STATUS_OK;
8014 case NDR_SPOOLSS_DELETEPRINTERIC: {
8015 struct spoolss_DeletePrinterIC *r = (struct spoolss_DeletePrinterIC *)_r;
8016 r->out.result = _spoolss_DeletePrinterIC(cli->pipes_struct, r);
8017 return NT_STATUS_OK;
8020 case NDR_SPOOLSS_ADDPRINTERCONNECTION: {
8021 struct spoolss_AddPrinterConnection *r = (struct spoolss_AddPrinterConnection *)_r;
8022 r->out.result = _spoolss_AddPrinterConnection(cli->pipes_struct, r);
8023 return NT_STATUS_OK;
8026 case NDR_SPOOLSS_DELETEPRINTERCONNECTION: {
8027 struct spoolss_DeletePrinterConnection *r = (struct spoolss_DeletePrinterConnection *)_r;
8028 r->out.result = _spoolss_DeletePrinterConnection(cli->pipes_struct, r);
8029 return NT_STATUS_OK;
8032 case NDR_SPOOLSS_PRINTERMESSAGEBOX: {
8033 struct spoolss_PrinterMessageBox *r = (struct spoolss_PrinterMessageBox *)_r;
8034 r->out.result = _spoolss_PrinterMessageBox(cli->pipes_struct, r);
8035 return NT_STATUS_OK;
8038 case NDR_SPOOLSS_ADDMONITOR: {
8039 struct spoolss_AddMonitor *r = (struct spoolss_AddMonitor *)_r;
8040 r->out.result = _spoolss_AddMonitor(cli->pipes_struct, r);
8041 return NT_STATUS_OK;
8044 case NDR_SPOOLSS_DELETEMONITOR: {
8045 struct spoolss_DeleteMonitor *r = (struct spoolss_DeleteMonitor *)_r;
8046 r->out.result = _spoolss_DeleteMonitor(cli->pipes_struct, r);
8047 return NT_STATUS_OK;
8050 case NDR_SPOOLSS_DELETEPRINTPROCESSOR: {
8051 struct spoolss_DeletePrintProcessor *r = (struct spoolss_DeletePrintProcessor *)_r;
8052 r->out.result = _spoolss_DeletePrintProcessor(cli->pipes_struct, r);
8053 return NT_STATUS_OK;
8056 case NDR_SPOOLSS_ADDPRINTPROVIDOR: {
8057 struct spoolss_AddPrintProvidor *r = (struct spoolss_AddPrintProvidor *)_r;
8058 r->out.result = _spoolss_AddPrintProvidor(cli->pipes_struct, r);
8059 return NT_STATUS_OK;
8062 case NDR_SPOOLSS_DELETEPRINTPROVIDOR: {
8063 struct spoolss_DeletePrintProvidor *r = (struct spoolss_DeletePrintProvidor *)_r;
8064 r->out.result = _spoolss_DeletePrintProvidor(cli->pipes_struct, r);
8065 return NT_STATUS_OK;
8068 case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES: {
8069 struct spoolss_EnumPrintProcDataTypes *r = (struct spoolss_EnumPrintProcDataTypes *)_r;
8070 r->out.result = _spoolss_EnumPrintProcDataTypes(cli->pipes_struct, r);
8071 return NT_STATUS_OK;
8074 case NDR_SPOOLSS_RESETPRINTER: {
8075 struct spoolss_ResetPrinter *r = (struct spoolss_ResetPrinter *)_r;
8076 r->out.result = _spoolss_ResetPrinter(cli->pipes_struct, r);
8077 return NT_STATUS_OK;
8080 case NDR_SPOOLSS_GETPRINTERDRIVER2: {
8081 struct spoolss_GetPrinterDriver2 *r = (struct spoolss_GetPrinterDriver2 *)_r;
8082 ZERO_STRUCT(r->out);
8083 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo);
8084 if (r->out.info == NULL) {
8085 return NT_STATUS_NO_MEMORY;
8088 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8089 if (r->out.needed == NULL) {
8090 return NT_STATUS_NO_MEMORY;
8093 r->out.server_major_version = talloc_zero(mem_ctx, uint32_t);
8094 if (r->out.server_major_version == NULL) {
8095 return NT_STATUS_NO_MEMORY;
8098 r->out.server_minor_version = talloc_zero(mem_ctx, uint32_t);
8099 if (r->out.server_minor_version == NULL) {
8100 return NT_STATUS_NO_MEMORY;
8103 r->out.result = _spoolss_GetPrinterDriver2(cli->pipes_struct, r);
8104 return NT_STATUS_OK;
8107 case NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION: {
8108 struct spoolss_FindFirstPrinterChangeNotification *r = (struct spoolss_FindFirstPrinterChangeNotification *)_r;
8109 r->out.result = _spoolss_FindFirstPrinterChangeNotification(cli->pipes_struct, r);
8110 return NT_STATUS_OK;
8113 case NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION: {
8114 struct spoolss_FindNextPrinterChangeNotification *r = (struct spoolss_FindNextPrinterChangeNotification *)_r;
8115 r->out.result = _spoolss_FindNextPrinterChangeNotification(cli->pipes_struct, r);
8116 return NT_STATUS_OK;
8119 case NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY: {
8120 struct spoolss_FindClosePrinterNotify *r = (struct spoolss_FindClosePrinterNotify *)_r;
8121 r->out.result = _spoolss_FindClosePrinterNotify(cli->pipes_struct, r);
8122 return NT_STATUS_OK;
8125 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD: {
8126 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r = (struct spoolss_RouterFindFirstPrinterChangeNotificationOld *)_r;
8127 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(cli->pipes_struct, r);
8128 return NT_STATUS_OK;
8131 case NDR_SPOOLSS_REPLYOPENPRINTER: {
8132 struct spoolss_ReplyOpenPrinter *r = (struct spoolss_ReplyOpenPrinter *)_r;
8133 ZERO_STRUCT(r->out);
8134 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8135 if (r->out.handle == NULL) {
8136 return NT_STATUS_NO_MEMORY;
8139 r->out.result = _spoolss_ReplyOpenPrinter(cli->pipes_struct, r);
8140 return NT_STATUS_OK;
8143 case NDR_SPOOLSS_ROUTERREPLYPRINTER: {
8144 struct spoolss_RouterReplyPrinter *r = (struct spoolss_RouterReplyPrinter *)_r;
8145 r->out.result = _spoolss_RouterReplyPrinter(cli->pipes_struct, r);
8146 return NT_STATUS_OK;
8149 case NDR_SPOOLSS_REPLYCLOSEPRINTER: {
8150 struct spoolss_ReplyClosePrinter *r = (struct spoolss_ReplyClosePrinter *)_r;
8151 ZERO_STRUCT(r->out);
8152 r->out.handle = r->in.handle;
8153 r->out.result = _spoolss_ReplyClosePrinter(cli->pipes_struct, r);
8154 return NT_STATUS_OK;
8157 case NDR_SPOOLSS_ADDPORTEX: {
8158 struct spoolss_AddPortEx *r = (struct spoolss_AddPortEx *)_r;
8159 r->out.result = _spoolss_AddPortEx(cli->pipes_struct, r);
8160 return NT_STATUS_OK;
8163 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION: {
8164 struct spoolss_RouterFindFirstPrinterChangeNotification *r = (struct spoolss_RouterFindFirstPrinterChangeNotification *)_r;
8165 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(cli->pipes_struct, r);
8166 return NT_STATUS_OK;
8169 case NDR_SPOOLSS_SPOOLERINIT: {
8170 struct spoolss_SpoolerInit *r = (struct spoolss_SpoolerInit *)_r;
8171 r->out.result = _spoolss_SpoolerInit(cli->pipes_struct, r);
8172 return NT_STATUS_OK;
8175 case NDR_SPOOLSS_RESETPRINTEREX: {
8176 struct spoolss_ResetPrinterEx *r = (struct spoolss_ResetPrinterEx *)_r;
8177 r->out.result = _spoolss_ResetPrinterEx(cli->pipes_struct, r);
8178 return NT_STATUS_OK;
8181 case NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX: {
8182 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r = (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *)_r;
8183 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli->pipes_struct, r);
8184 return NT_STATUS_OK;
8187 case NDR_SPOOLSS_ROUTERREPLYPRINTEREX: {
8188 struct spoolss_RouterReplyPrinterEx *r = (struct spoolss_RouterReplyPrinterEx *)_r;
8189 ZERO_STRUCT(r->out);
8190 r->out.reply_result = talloc_zero(mem_ctx, uint32_t);
8191 if (r->out.reply_result == NULL) {
8192 return NT_STATUS_NO_MEMORY;
8195 r->out.result = _spoolss_RouterReplyPrinterEx(cli->pipes_struct, r);
8196 return NT_STATUS_OK;
8199 case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY: {
8200 struct spoolss_RouterRefreshPrinterChangeNotify *r = (struct spoolss_RouterRefreshPrinterChangeNotify *)_r;
8201 ZERO_STRUCT(r->out);
8202 r->out.info = talloc_zero(mem_ctx, struct spoolss_NotifyInfo *);
8203 if (r->out.info == NULL) {
8204 return NT_STATUS_NO_MEMORY;
8207 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(cli->pipes_struct, r);
8208 return NT_STATUS_OK;
8211 case NDR_SPOOLSS_44: {
8212 struct spoolss_44 *r = (struct spoolss_44 *)_r;
8213 r->out.result = _spoolss_44(cli->pipes_struct, r);
8214 return NT_STATUS_OK;
8217 case NDR_SPOOLSS_OPENPRINTEREX: {
8218 struct spoolss_OpenPrinterEx *r = (struct spoolss_OpenPrinterEx *)_r;
8219 ZERO_STRUCT(r->out);
8220 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8221 if (r->out.handle == NULL) {
8222 return NT_STATUS_NO_MEMORY;
8225 r->out.result = _spoolss_OpenPrinterEx(cli->pipes_struct, r);
8226 return NT_STATUS_OK;
8229 case NDR_SPOOLSS_ADDPRINTEREX: {
8230 struct spoolss_AddPrinterEx *r = (struct spoolss_AddPrinterEx *)_r;
8231 ZERO_STRUCT(r->out);
8232 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8233 if (r->out.handle == NULL) {
8234 return NT_STATUS_NO_MEMORY;
8237 r->out.result = _spoolss_AddPrinterEx(cli->pipes_struct, r);
8238 return NT_STATUS_OK;
8241 case NDR_SPOOLSS_47: {
8242 struct spoolss_47 *r = (struct spoolss_47 *)_r;
8243 r->out.result = _spoolss_47(cli->pipes_struct, r);
8244 return NT_STATUS_OK;
8247 case NDR_SPOOLSS_ENUMPRINTERDATA: {
8248 struct spoolss_EnumPrinterData *r = (struct spoolss_EnumPrinterData *)_r;
8249 ZERO_STRUCT(r->out);
8250 r->out.value_name = talloc_zero_array(mem_ctx, const char, r->in.value_offered / 2);
8251 if (r->out.value_name == NULL) {
8252 return NT_STATUS_NO_MEMORY;
8255 r->out.value_needed = talloc_zero(mem_ctx, uint32_t);
8256 if (r->out.value_needed == NULL) {
8257 return NT_STATUS_NO_MEMORY;
8260 r->out.printerdata_type = talloc_zero(mem_ctx, uint32_t);
8261 if (r->out.printerdata_type == NULL) {
8262 return NT_STATUS_NO_MEMORY;
8265 r->out.buffer = talloc_zero(mem_ctx, DATA_BLOB);
8266 if (r->out.buffer == NULL) {
8267 return NT_STATUS_NO_MEMORY;
8270 r->out.data_needed = talloc_zero(mem_ctx, uint32_t);
8271 if (r->out.data_needed == NULL) {
8272 return NT_STATUS_NO_MEMORY;
8275 r->out.result = _spoolss_EnumPrinterData(cli->pipes_struct, r);
8276 return NT_STATUS_OK;
8279 case NDR_SPOOLSS_DELETEPRINTERDATA: {
8280 struct spoolss_DeletePrinterData *r = (struct spoolss_DeletePrinterData *)_r;
8281 r->out.result = _spoolss_DeletePrinterData(cli->pipes_struct, r);
8282 return NT_STATUS_OK;
8285 case NDR_SPOOLSS_4A: {
8286 struct spoolss_4a *r = (struct spoolss_4a *)_r;
8287 r->out.result = _spoolss_4a(cli->pipes_struct, r);
8288 return NT_STATUS_OK;
8291 case NDR_SPOOLSS_4B: {
8292 struct spoolss_4b *r = (struct spoolss_4b *)_r;
8293 r->out.result = _spoolss_4b(cli->pipes_struct, r);
8294 return NT_STATUS_OK;
8297 case NDR_SPOOLSS_4C: {
8298 struct spoolss_4c *r = (struct spoolss_4c *)_r;
8299 r->out.result = _spoolss_4c(cli->pipes_struct, r);
8300 return NT_STATUS_OK;
8303 case NDR_SPOOLSS_SETPRINTERDATAEX: {
8304 struct spoolss_SetPrinterDataEx *r = (struct spoolss_SetPrinterDataEx *)_r;
8305 r->out.result = _spoolss_SetPrinterDataEx(cli->pipes_struct, r);
8306 return NT_STATUS_OK;
8309 case NDR_SPOOLSS_GETPRINTERDATAEX: {
8310 struct spoolss_GetPrinterDataEx *r = (struct spoolss_GetPrinterDataEx *)_r;
8311 ZERO_STRUCT(r->out);
8312 r->out.type = talloc_zero(mem_ctx, uint32_t);
8313 if (r->out.type == NULL) {
8314 return NT_STATUS_NO_MEMORY;
8317 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
8318 if (r->out.buffer == NULL) {
8319 return NT_STATUS_NO_MEMORY;
8322 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8323 if (r->out.needed == NULL) {
8324 return NT_STATUS_NO_MEMORY;
8327 r->out.result = _spoolss_GetPrinterDataEx(cli->pipes_struct, r);
8328 return NT_STATUS_OK;
8331 case NDR_SPOOLSS_ENUMPRINTERDATAEX: {
8332 struct spoolss_EnumPrinterDataEx *r = (struct spoolss_EnumPrinterDataEx *)_r;
8333 ZERO_STRUCT(r->out);
8334 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
8335 if (r->out.buffer == NULL) {
8336 return NT_STATUS_NO_MEMORY;
8339 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8340 if (r->out.needed == NULL) {
8341 return NT_STATUS_NO_MEMORY;
8344 r->out.count = talloc_zero(mem_ctx, uint32_t);
8345 if (r->out.count == NULL) {
8346 return NT_STATUS_NO_MEMORY;
8349 r->out.result = _spoolss_EnumPrinterDataEx(cli->pipes_struct, r);
8350 return NT_STATUS_OK;
8353 case NDR_SPOOLSS_ENUMPRINTERKEY: {
8354 struct spoolss_EnumPrinterKey *r = (struct spoolss_EnumPrinterKey *)_r;
8355 ZERO_STRUCT(r->out);
8356 r->out.key_buffer = talloc_zero_array(mem_ctx, uint16_t, r->in.key_buffer_size / 2);
8357 if (r->out.key_buffer == NULL) {
8358 return NT_STATUS_NO_MEMORY;
8361 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8362 if (r->out.needed == NULL) {
8363 return NT_STATUS_NO_MEMORY;
8366 r->out.result = _spoolss_EnumPrinterKey(cli->pipes_struct, r);
8367 return NT_STATUS_OK;
8370 case NDR_SPOOLSS_DELETEPRINTERDATAEX: {
8371 struct spoolss_DeletePrinterDataEx *r = (struct spoolss_DeletePrinterDataEx *)_r;
8372 r->out.result = _spoolss_DeletePrinterDataEx(cli->pipes_struct, r);
8373 return NT_STATUS_OK;
8376 case NDR_SPOOLSS_DELETEPRINTERKEY: {
8377 struct spoolss_DeletePrinterKey *r = (struct spoolss_DeletePrinterKey *)_r;
8378 r->out.result = _spoolss_DeletePrinterKey(cli->pipes_struct, r);
8379 return NT_STATUS_OK;
8382 case NDR_SPOOLSS_53: {
8383 struct spoolss_53 *r = (struct spoolss_53 *)_r;
8384 r->out.result = _spoolss_53(cli->pipes_struct, r);
8385 return NT_STATUS_OK;
8388 case NDR_SPOOLSS_DELETEPRINTERDRIVEREX: {
8389 struct spoolss_DeletePrinterDriverEx *r = (struct spoolss_DeletePrinterDriverEx *)_r;
8390 r->out.result = _spoolss_DeletePrinterDriverEx(cli->pipes_struct, r);
8391 return NT_STATUS_OK;
8394 case NDR_SPOOLSS_55: {
8395 struct spoolss_55 *r = (struct spoolss_55 *)_r;
8396 r->out.result = _spoolss_55(cli->pipes_struct, r);
8397 return NT_STATUS_OK;
8400 case NDR_SPOOLSS_56: {
8401 struct spoolss_56 *r = (struct spoolss_56 *)_r;
8402 r->out.result = _spoolss_56(cli->pipes_struct, r);
8403 return NT_STATUS_OK;
8406 case NDR_SPOOLSS_57: {
8407 struct spoolss_57 *r = (struct spoolss_57 *)_r;
8408 r->out.result = _spoolss_57(cli->pipes_struct, r);
8409 return NT_STATUS_OK;
8412 case NDR_SPOOLSS_XCVDATA: {
8413 struct spoolss_XcvData *r = (struct spoolss_XcvData *)_r;
8414 ZERO_STRUCT(r->out);
8415 r->out.status_code = r->in.status_code;
8416 r->out.out_data = talloc_zero_array(mem_ctx, uint8_t, r->in.out_data_size);
8417 if (r->out.out_data == NULL) {
8418 return NT_STATUS_NO_MEMORY;
8421 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8422 if (r->out.needed == NULL) {
8423 return NT_STATUS_NO_MEMORY;
8426 r->out.result = _spoolss_XcvData(cli->pipes_struct, r);
8427 return NT_STATUS_OK;
8430 case NDR_SPOOLSS_ADDPRINTERDRIVEREX: {
8431 struct spoolss_AddPrinterDriverEx *r = (struct spoolss_AddPrinterDriverEx *)_r;
8432 r->out.result = _spoolss_AddPrinterDriverEx(cli->pipes_struct, r);
8433 return NT_STATUS_OK;
8436 case NDR_SPOOLSS_5A: {
8437 struct spoolss_5a *r = (struct spoolss_5a *)_r;
8438 r->out.result = _spoolss_5a(cli->pipes_struct, r);
8439 return NT_STATUS_OK;
8442 case NDR_SPOOLSS_5B: {
8443 struct spoolss_5b *r = (struct spoolss_5b *)_r;
8444 r->out.result = _spoolss_5b(cli->pipes_struct, r);
8445 return NT_STATUS_OK;
8448 case NDR_SPOOLSS_5C: {
8449 struct spoolss_5c *r = (struct spoolss_5c *)_r;
8450 r->out.result = _spoolss_5c(cli->pipes_struct, r);
8451 return NT_STATUS_OK;
8454 case NDR_SPOOLSS_5D: {
8455 struct spoolss_5d *r = (struct spoolss_5d *)_r;
8456 r->out.result = _spoolss_5d(cli->pipes_struct, r);
8457 return NT_STATUS_OK;
8460 case NDR_SPOOLSS_5E: {
8461 struct spoolss_5e *r = (struct spoolss_5e *)_r;
8462 r->out.result = _spoolss_5e(cli->pipes_struct, r);
8463 return NT_STATUS_OK;
8466 case NDR_SPOOLSS_5F: {
8467 struct spoolss_5f *r = (struct spoolss_5f *)_r;
8468 r->out.result = _spoolss_5f(cli->pipes_struct, r);
8469 return NT_STATUS_OK;
8473 return NT_STATUS_NOT_IMPLEMENTED;
8477 NTSTATUS rpc_spoolss_init(void)
8479 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", &ndr_table_spoolss, api_spoolss_cmds, sizeof(api_spoolss_cmds) / sizeof(struct api_struct));