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);
471 r->out.handle = talloc_zero(r, struct policy_handle);
472 if (r->out.handle == NULL) {
477 r->out.result = _spoolss_AddPrinter(p, r);
479 if (p->rng_fault_state) {
481 /* Return true here, srv_pipe_hnd.c will take care */
485 if (DEBUGLEVEL >= 10) {
486 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, r);
489 push = ndr_push_init_ctx(r, NULL);
495 ndr_err = call->ndr_push(push, NDR_OUT, r);
496 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
501 blob = ndr_push_blob(push);
502 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
512 static bool api_spoolss_DeletePrinter(pipes_struct *p)
514 const struct ndr_interface_call *call;
515 struct ndr_pull *pull;
516 struct ndr_push *push;
517 enum ndr_err_code ndr_err;
519 struct spoolss_DeletePrinter *r;
521 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTER];
523 r = talloc(talloc_tos(), struct spoolss_DeletePrinter);
528 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
533 pull = ndr_pull_init_blob(&blob, r, NULL);
539 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
540 ndr_err = call->ndr_pull(pull, NDR_IN, r);
541 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
546 if (DEBUGLEVEL >= 10) {
547 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, r);
550 r->out.result = _spoolss_DeletePrinter(p, r);
552 if (p->rng_fault_state) {
554 /* Return true here, srv_pipe_hnd.c will take care */
558 if (DEBUGLEVEL >= 10) {
559 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, r);
562 push = ndr_push_init_ctx(r, NULL);
568 ndr_err = call->ndr_push(push, NDR_OUT, r);
569 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
574 blob = ndr_push_blob(push);
575 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
585 static bool api_spoolss_SetPrinter(pipes_struct *p)
587 const struct ndr_interface_call *call;
588 struct ndr_pull *pull;
589 struct ndr_push *push;
590 enum ndr_err_code ndr_err;
592 struct spoolss_SetPrinter *r;
594 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTER];
596 r = talloc(talloc_tos(), struct spoolss_SetPrinter);
601 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
606 pull = ndr_pull_init_blob(&blob, r, NULL);
612 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
613 ndr_err = call->ndr_pull(pull, NDR_IN, r);
614 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
619 if (DEBUGLEVEL >= 10) {
620 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, r);
623 r->out.result = _spoolss_SetPrinter(p, r);
625 if (p->rng_fault_state) {
627 /* Return true here, srv_pipe_hnd.c will take care */
631 if (DEBUGLEVEL >= 10) {
632 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, r);
635 push = ndr_push_init_ctx(r, NULL);
641 ndr_err = call->ndr_push(push, NDR_OUT, r);
642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
647 blob = ndr_push_blob(push);
648 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
658 static bool api_spoolss_GetPrinter(pipes_struct *p)
660 const struct ndr_interface_call *call;
661 struct ndr_pull *pull;
662 struct ndr_push *push;
663 enum ndr_err_code ndr_err;
665 struct spoolss_GetPrinter *r;
667 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTER];
669 r = talloc(talloc_tos(), struct spoolss_GetPrinter);
674 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
679 pull = ndr_pull_init_blob(&blob, r, NULL);
685 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
686 ndr_err = call->ndr_pull(pull, NDR_IN, r);
687 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
692 if (DEBUGLEVEL >= 10) {
693 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, r);
697 r->out.info = talloc_zero(r, union spoolss_PrinterInfo);
698 if (r->out.info == NULL) {
703 r->out.needed = talloc_zero(r, uint32_t);
704 if (r->out.needed == NULL) {
709 r->out.result = _spoolss_GetPrinter(p, r);
711 if (p->rng_fault_state) {
713 /* Return true here, srv_pipe_hnd.c will take care */
717 if (DEBUGLEVEL >= 10) {
718 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, r);
721 push = ndr_push_init_ctx(r, NULL);
727 ndr_err = call->ndr_push(push, NDR_OUT, r);
728 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
733 blob = ndr_push_blob(push);
734 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
744 static bool api_spoolss_AddPrinterDriver(pipes_struct *p)
746 const struct ndr_interface_call *call;
747 struct ndr_pull *pull;
748 struct ndr_push *push;
749 enum ndr_err_code ndr_err;
751 struct spoolss_AddPrinterDriver *r;
753 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVER];
755 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriver);
760 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
765 pull = ndr_pull_init_blob(&blob, r, NULL);
771 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
772 ndr_err = call->ndr_pull(pull, NDR_IN, r);
773 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
778 if (DEBUGLEVEL >= 10) {
779 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, r);
782 r->out.result = _spoolss_AddPrinterDriver(p, r);
784 if (p->rng_fault_state) {
786 /* Return true here, srv_pipe_hnd.c will take care */
790 if (DEBUGLEVEL >= 10) {
791 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, r);
794 push = ndr_push_init_ctx(r, NULL);
800 ndr_err = call->ndr_push(push, NDR_OUT, r);
801 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
806 blob = ndr_push_blob(push);
807 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
817 static bool api_spoolss_EnumPrinterDrivers(pipes_struct *p)
819 const struct ndr_interface_call *call;
820 struct ndr_pull *pull;
821 struct ndr_push *push;
822 enum ndr_err_code ndr_err;
824 struct spoolss_EnumPrinterDrivers *r;
826 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDRIVERS];
828 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDrivers);
833 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
838 pull = ndr_pull_init_blob(&blob, r, NULL);
844 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
845 ndr_err = call->ndr_pull(pull, NDR_IN, r);
846 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
851 if (DEBUGLEVEL >= 10) {
852 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, r);
856 r->out.count = talloc_zero(r, uint32_t);
857 if (r->out.count == NULL) {
862 r->out.info = talloc_zero(r, union spoolss_DriverInfo *);
863 if (r->out.info == NULL) {
868 r->out.needed = talloc_zero(r, uint32_t);
869 if (r->out.needed == NULL) {
874 r->out.result = _spoolss_EnumPrinterDrivers(p, r);
876 if (p->rng_fault_state) {
878 /* Return true here, srv_pipe_hnd.c will take care */
882 if (DEBUGLEVEL >= 10) {
883 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, r);
886 push = ndr_push_init_ctx(r, NULL);
892 ndr_err = call->ndr_push(push, NDR_OUT, r);
893 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
898 blob = ndr_push_blob(push);
899 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
909 static bool api_spoolss_GetPrinterDriver(pipes_struct *p)
911 const struct ndr_interface_call *call;
912 struct ndr_pull *pull;
913 struct ndr_push *push;
914 enum ndr_err_code ndr_err;
916 struct spoolss_GetPrinterDriver *r;
918 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER];
920 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver);
925 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
930 pull = ndr_pull_init_blob(&blob, r, NULL);
936 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
937 ndr_err = call->ndr_pull(pull, NDR_IN, r);
938 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
943 if (DEBUGLEVEL >= 10) {
944 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, r);
947 r->out.result = _spoolss_GetPrinterDriver(p, r);
949 if (p->rng_fault_state) {
951 /* Return true here, srv_pipe_hnd.c will take care */
955 if (DEBUGLEVEL >= 10) {
956 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, r);
959 push = ndr_push_init_ctx(r, NULL);
965 ndr_err = call->ndr_push(push, NDR_OUT, r);
966 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
971 blob = ndr_push_blob(push);
972 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
982 static bool api_spoolss_GetPrinterDriverDirectory(pipes_struct *p)
984 const struct ndr_interface_call *call;
985 struct ndr_pull *pull;
986 struct ndr_push *push;
987 enum ndr_err_code ndr_err;
989 struct spoolss_GetPrinterDriverDirectory *r;
991 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY];
993 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriverDirectory);
998 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1003 pull = ndr_pull_init_blob(&blob, r, NULL);
1009 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1010 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1011 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1016 if (DEBUGLEVEL >= 10) {
1017 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, r);
1020 ZERO_STRUCT(r->out);
1021 r->out.info = talloc_zero(r, union spoolss_DriverDirectoryInfo);
1022 if (r->out.info == NULL) {
1027 r->out.needed = talloc_zero(r, uint32_t);
1028 if (r->out.needed == NULL) {
1033 r->out.result = _spoolss_GetPrinterDriverDirectory(p, r);
1035 if (p->rng_fault_state) {
1037 /* Return true here, srv_pipe_hnd.c will take care */
1041 if (DEBUGLEVEL >= 10) {
1042 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, r);
1045 push = ndr_push_init_ctx(r, NULL);
1051 ndr_err = call->ndr_push(push, NDR_OUT, r);
1052 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1057 blob = ndr_push_blob(push);
1058 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1068 static bool api_spoolss_DeletePrinterDriver(pipes_struct *p)
1070 const struct ndr_interface_call *call;
1071 struct ndr_pull *pull;
1072 struct ndr_push *push;
1073 enum ndr_err_code ndr_err;
1075 struct spoolss_DeletePrinterDriver *r;
1077 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVER];
1079 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriver);
1084 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1089 pull = ndr_pull_init_blob(&blob, r, NULL);
1095 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1096 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1097 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1102 if (DEBUGLEVEL >= 10) {
1103 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, r);
1106 r->out.result = _spoolss_DeletePrinterDriver(p, r);
1108 if (p->rng_fault_state) {
1110 /* Return true here, srv_pipe_hnd.c will take care */
1114 if (DEBUGLEVEL >= 10) {
1115 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, r);
1118 push = ndr_push_init_ctx(r, NULL);
1124 ndr_err = call->ndr_push(push, NDR_OUT, r);
1125 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1130 blob = ndr_push_blob(push);
1131 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1141 static bool api_spoolss_AddPrintProcessor(pipes_struct *p)
1143 const struct ndr_interface_call *call;
1144 struct ndr_pull *pull;
1145 struct ndr_push *push;
1146 enum ndr_err_code ndr_err;
1148 struct spoolss_AddPrintProcessor *r;
1150 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROCESSOR];
1152 r = talloc(talloc_tos(), struct spoolss_AddPrintProcessor);
1157 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1162 pull = ndr_pull_init_blob(&blob, r, NULL);
1168 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1169 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1170 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1175 if (DEBUGLEVEL >= 10) {
1176 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, r);
1179 r->out.result = _spoolss_AddPrintProcessor(p, r);
1181 if (p->rng_fault_state) {
1183 /* Return true here, srv_pipe_hnd.c will take care */
1187 if (DEBUGLEVEL >= 10) {
1188 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, r);
1191 push = ndr_push_init_ctx(r, NULL);
1197 ndr_err = call->ndr_push(push, NDR_OUT, r);
1198 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1203 blob = ndr_push_blob(push);
1204 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1214 static bool api_spoolss_EnumPrintProcessors(pipes_struct *p)
1216 const struct ndr_interface_call *call;
1217 struct ndr_pull *pull;
1218 struct ndr_push *push;
1219 enum ndr_err_code ndr_err;
1221 struct spoolss_EnumPrintProcessors *r;
1223 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCESSORS];
1225 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcessors);
1230 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1235 pull = ndr_pull_init_blob(&blob, r, NULL);
1241 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1242 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1243 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1248 if (DEBUGLEVEL >= 10) {
1249 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, r);
1252 ZERO_STRUCT(r->out);
1253 r->out.count = talloc_zero(r, uint32_t);
1254 if (r->out.count == NULL) {
1259 r->out.info = talloc_zero(r, union spoolss_PrintProcessorInfo *);
1260 if (r->out.info == NULL) {
1265 r->out.needed = talloc_zero(r, uint32_t);
1266 if (r->out.needed == NULL) {
1271 r->out.result = _spoolss_EnumPrintProcessors(p, r);
1273 if (p->rng_fault_state) {
1275 /* Return true here, srv_pipe_hnd.c will take care */
1279 if (DEBUGLEVEL >= 10) {
1280 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, r);
1283 push = ndr_push_init_ctx(r, NULL);
1289 ndr_err = call->ndr_push(push, NDR_OUT, r);
1290 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1295 blob = ndr_push_blob(push);
1296 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1306 static bool api_spoolss_GetPrintProcessorDirectory(pipes_struct *p)
1308 const struct ndr_interface_call *call;
1309 struct ndr_pull *pull;
1310 struct ndr_push *push;
1311 enum ndr_err_code ndr_err;
1313 struct spoolss_GetPrintProcessorDirectory *r;
1315 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY];
1317 r = talloc(talloc_tos(), struct spoolss_GetPrintProcessorDirectory);
1322 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1327 pull = ndr_pull_init_blob(&blob, r, NULL);
1333 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1334 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1335 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1340 if (DEBUGLEVEL >= 10) {
1341 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1344 ZERO_STRUCT(r->out);
1345 r->out.info = talloc_zero(r, union spoolss_PrintProcessorDirectoryInfo);
1346 if (r->out.info == NULL) {
1351 r->out.needed = talloc_zero(r, uint32_t);
1352 if (r->out.needed == NULL) {
1357 r->out.result = _spoolss_GetPrintProcessorDirectory(p, r);
1359 if (p->rng_fault_state) {
1361 /* Return true here, srv_pipe_hnd.c will take care */
1365 if (DEBUGLEVEL >= 10) {
1366 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1369 push = ndr_push_init_ctx(r, NULL);
1375 ndr_err = call->ndr_push(push, NDR_OUT, r);
1376 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1381 blob = ndr_push_blob(push);
1382 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1392 static bool api_spoolss_StartDocPrinter(pipes_struct *p)
1394 const struct ndr_interface_call *call;
1395 struct ndr_pull *pull;
1396 struct ndr_push *push;
1397 enum ndr_err_code ndr_err;
1399 struct spoolss_StartDocPrinter *r;
1401 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTDOCPRINTER];
1403 r = talloc(talloc_tos(), struct spoolss_StartDocPrinter);
1408 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1413 pull = ndr_pull_init_blob(&blob, r, NULL);
1419 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1420 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1421 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1426 if (DEBUGLEVEL >= 10) {
1427 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, r);
1430 ZERO_STRUCT(r->out);
1431 r->out.job_id = talloc_zero(r, uint32_t);
1432 if (r->out.job_id == NULL) {
1437 r->out.result = _spoolss_StartDocPrinter(p, r);
1439 if (p->rng_fault_state) {
1441 /* Return true here, srv_pipe_hnd.c will take care */
1445 if (DEBUGLEVEL >= 10) {
1446 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, r);
1449 push = ndr_push_init_ctx(r, NULL);
1455 ndr_err = call->ndr_push(push, NDR_OUT, r);
1456 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1461 blob = ndr_push_blob(push);
1462 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1472 static bool api_spoolss_StartPagePrinter(pipes_struct *p)
1474 const struct ndr_interface_call *call;
1475 struct ndr_pull *pull;
1476 struct ndr_push *push;
1477 enum ndr_err_code ndr_err;
1479 struct spoolss_StartPagePrinter *r;
1481 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTPAGEPRINTER];
1483 r = talloc(talloc_tos(), struct spoolss_StartPagePrinter);
1488 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1493 pull = ndr_pull_init_blob(&blob, r, NULL);
1499 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1500 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1501 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1506 if (DEBUGLEVEL >= 10) {
1507 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, r);
1510 r->out.result = _spoolss_StartPagePrinter(p, r);
1512 if (p->rng_fault_state) {
1514 /* Return true here, srv_pipe_hnd.c will take care */
1518 if (DEBUGLEVEL >= 10) {
1519 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, r);
1522 push = ndr_push_init_ctx(r, NULL);
1528 ndr_err = call->ndr_push(push, NDR_OUT, r);
1529 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1534 blob = ndr_push_blob(push);
1535 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1545 static bool api_spoolss_WritePrinter(pipes_struct *p)
1547 const struct ndr_interface_call *call;
1548 struct ndr_pull *pull;
1549 struct ndr_push *push;
1550 enum ndr_err_code ndr_err;
1552 struct spoolss_WritePrinter *r;
1554 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WRITEPRINTER];
1556 r = talloc(talloc_tos(), struct spoolss_WritePrinter);
1561 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1566 pull = ndr_pull_init_blob(&blob, r, NULL);
1572 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1573 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1574 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1579 if (DEBUGLEVEL >= 10) {
1580 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, r);
1583 ZERO_STRUCT(r->out);
1584 r->out.num_written = talloc_zero(r, uint32_t);
1585 if (r->out.num_written == NULL) {
1590 r->out.result = _spoolss_WritePrinter(p, r);
1592 if (p->rng_fault_state) {
1594 /* Return true here, srv_pipe_hnd.c will take care */
1598 if (DEBUGLEVEL >= 10) {
1599 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, r);
1602 push = ndr_push_init_ctx(r, NULL);
1608 ndr_err = call->ndr_push(push, NDR_OUT, r);
1609 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1614 blob = ndr_push_blob(push);
1615 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1625 static bool api_spoolss_EndPagePrinter(pipes_struct *p)
1627 const struct ndr_interface_call *call;
1628 struct ndr_pull *pull;
1629 struct ndr_push *push;
1630 enum ndr_err_code ndr_err;
1632 struct spoolss_EndPagePrinter *r;
1634 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDPAGEPRINTER];
1636 r = talloc(talloc_tos(), struct spoolss_EndPagePrinter);
1641 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1646 pull = ndr_pull_init_blob(&blob, r, NULL);
1652 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1653 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1654 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1659 if (DEBUGLEVEL >= 10) {
1660 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, r);
1663 r->out.result = _spoolss_EndPagePrinter(p, r);
1665 if (p->rng_fault_state) {
1667 /* Return true here, srv_pipe_hnd.c will take care */
1671 if (DEBUGLEVEL >= 10) {
1672 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, r);
1675 push = ndr_push_init_ctx(r, NULL);
1681 ndr_err = call->ndr_push(push, NDR_OUT, r);
1682 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1687 blob = ndr_push_blob(push);
1688 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1698 static bool api_spoolss_AbortPrinter(pipes_struct *p)
1700 const struct ndr_interface_call *call;
1701 struct ndr_pull *pull;
1702 struct ndr_push *push;
1703 enum ndr_err_code ndr_err;
1705 struct spoolss_AbortPrinter *r;
1707 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ABORTPRINTER];
1709 r = talloc(talloc_tos(), struct spoolss_AbortPrinter);
1714 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1719 pull = ndr_pull_init_blob(&blob, r, NULL);
1725 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1726 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1727 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1732 if (DEBUGLEVEL >= 10) {
1733 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, r);
1736 r->out.result = _spoolss_AbortPrinter(p, r);
1738 if (p->rng_fault_state) {
1740 /* Return true here, srv_pipe_hnd.c will take care */
1744 if (DEBUGLEVEL >= 10) {
1745 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, r);
1748 push = ndr_push_init_ctx(r, NULL);
1754 ndr_err = call->ndr_push(push, NDR_OUT, r);
1755 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1760 blob = ndr_push_blob(push);
1761 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1771 static bool api_spoolss_ReadPrinter(pipes_struct *p)
1773 const struct ndr_interface_call *call;
1774 struct ndr_pull *pull;
1775 struct ndr_push *push;
1776 enum ndr_err_code ndr_err;
1778 struct spoolss_ReadPrinter *r;
1780 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_READPRINTER];
1782 r = talloc(talloc_tos(), struct spoolss_ReadPrinter);
1787 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1792 pull = ndr_pull_init_blob(&blob, r, NULL);
1798 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1799 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1800 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1805 if (DEBUGLEVEL >= 10) {
1806 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, r);
1809 ZERO_STRUCT(r->out);
1810 r->out.data = talloc_zero_array(r, uint8_t, r->in.data_size);
1811 if (r->out.data == NULL) {
1816 r->out._data_size = talloc_zero(r, uint32_t);
1817 if (r->out._data_size == NULL) {
1822 r->out.result = _spoolss_ReadPrinter(p, r);
1824 if (p->rng_fault_state) {
1826 /* Return true here, srv_pipe_hnd.c will take care */
1830 if (DEBUGLEVEL >= 10) {
1831 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, r);
1834 push = ndr_push_init_ctx(r, NULL);
1840 ndr_err = call->ndr_push(push, NDR_OUT, r);
1841 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1846 blob = ndr_push_blob(push);
1847 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1857 static bool api_spoolss_EndDocPrinter(pipes_struct *p)
1859 const struct ndr_interface_call *call;
1860 struct ndr_pull *pull;
1861 struct ndr_push *push;
1862 enum ndr_err_code ndr_err;
1864 struct spoolss_EndDocPrinter *r;
1866 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDDOCPRINTER];
1868 r = talloc(talloc_tos(), struct spoolss_EndDocPrinter);
1873 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1878 pull = ndr_pull_init_blob(&blob, r, NULL);
1884 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1885 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1891 if (DEBUGLEVEL >= 10) {
1892 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, r);
1895 r->out.result = _spoolss_EndDocPrinter(p, r);
1897 if (p->rng_fault_state) {
1899 /* Return true here, srv_pipe_hnd.c will take care */
1903 if (DEBUGLEVEL >= 10) {
1904 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, r);
1907 push = ndr_push_init_ctx(r, NULL);
1913 ndr_err = call->ndr_push(push, NDR_OUT, r);
1914 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1919 blob = ndr_push_blob(push);
1920 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1930 static bool api_spoolss_AddJob(pipes_struct *p)
1932 const struct ndr_interface_call *call;
1933 struct ndr_pull *pull;
1934 struct ndr_push *push;
1935 enum ndr_err_code ndr_err;
1937 struct spoolss_AddJob *r;
1939 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDJOB];
1941 r = talloc(talloc_tos(), struct spoolss_AddJob);
1946 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1951 pull = ndr_pull_init_blob(&blob, r, NULL);
1957 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1958 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1959 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1964 if (DEBUGLEVEL >= 10) {
1965 NDR_PRINT_IN_DEBUG(spoolss_AddJob, r);
1968 ZERO_STRUCT(r->out);
1969 r->out.buffer = r->in.buffer;
1970 r->out.needed = talloc_zero(r, uint32_t);
1971 if (r->out.needed == NULL) {
1976 r->out.result = _spoolss_AddJob(p, r);
1978 if (p->rng_fault_state) {
1980 /* Return true here, srv_pipe_hnd.c will take care */
1984 if (DEBUGLEVEL >= 10) {
1985 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, r);
1988 push = ndr_push_init_ctx(r, NULL);
1994 ndr_err = call->ndr_push(push, NDR_OUT, r);
1995 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2000 blob = ndr_push_blob(push);
2001 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2011 static bool api_spoolss_ScheduleJob(pipes_struct *p)
2013 const struct ndr_interface_call *call;
2014 struct ndr_pull *pull;
2015 struct ndr_push *push;
2016 enum ndr_err_code ndr_err;
2018 struct spoolss_ScheduleJob *r;
2020 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SCHEDULEJOB];
2022 r = talloc(talloc_tos(), struct spoolss_ScheduleJob);
2027 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2032 pull = ndr_pull_init_blob(&blob, r, NULL);
2038 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2039 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2040 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2045 if (DEBUGLEVEL >= 10) {
2046 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, r);
2049 r->out.result = _spoolss_ScheduleJob(p, r);
2051 if (p->rng_fault_state) {
2053 /* Return true here, srv_pipe_hnd.c will take care */
2057 if (DEBUGLEVEL >= 10) {
2058 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, r);
2061 push = ndr_push_init_ctx(r, NULL);
2067 ndr_err = call->ndr_push(push, NDR_OUT, r);
2068 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2073 blob = ndr_push_blob(push);
2074 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2084 static bool api_spoolss_GetPrinterData(pipes_struct *p)
2086 const struct ndr_interface_call *call;
2087 struct ndr_pull *pull;
2088 struct ndr_push *push;
2089 enum ndr_err_code ndr_err;
2091 struct spoolss_GetPrinterData *r;
2093 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATA];
2095 r = talloc(talloc_tos(), struct spoolss_GetPrinterData);
2100 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2105 pull = ndr_pull_init_blob(&blob, r, NULL);
2111 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2112 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2113 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2118 if (DEBUGLEVEL >= 10) {
2119 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, r);
2122 ZERO_STRUCT(r->out);
2123 r->out.type = talloc_zero(r, enum winreg_Type);
2124 if (r->out.type == NULL) {
2129 r->out.data = talloc_zero(r, union spoolss_PrinterData);
2130 if (r->out.data == NULL) {
2135 r->out.needed = talloc_zero(r, uint32_t);
2136 if (r->out.needed == NULL) {
2141 r->out.result = _spoolss_GetPrinterData(p, r);
2143 if (p->rng_fault_state) {
2145 /* Return true here, srv_pipe_hnd.c will take care */
2149 if (DEBUGLEVEL >= 10) {
2150 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, r);
2153 push = ndr_push_init_ctx(r, NULL);
2159 ndr_err = call->ndr_push(push, NDR_OUT, r);
2160 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2165 blob = ndr_push_blob(push);
2166 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2176 static bool api_spoolss_SetPrinterData(pipes_struct *p)
2178 const struct ndr_interface_call *call;
2179 struct ndr_pull *pull;
2180 struct ndr_push *push;
2181 enum ndr_err_code ndr_err;
2183 struct spoolss_SetPrinterData *r;
2185 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATA];
2187 r = talloc(talloc_tos(), struct spoolss_SetPrinterData);
2192 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2197 pull = ndr_pull_init_blob(&blob, r, NULL);
2203 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2204 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2205 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2210 if (DEBUGLEVEL >= 10) {
2211 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, r);
2214 r->out.result = _spoolss_SetPrinterData(p, r);
2216 if (p->rng_fault_state) {
2218 /* Return true here, srv_pipe_hnd.c will take care */
2222 if (DEBUGLEVEL >= 10) {
2223 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, r);
2226 push = ndr_push_init_ctx(r, NULL);
2232 ndr_err = call->ndr_push(push, NDR_OUT, r);
2233 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2238 blob = ndr_push_blob(push);
2239 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2249 static bool api_spoolss_WaitForPrinterChange(pipes_struct *p)
2251 const struct ndr_interface_call *call;
2252 struct ndr_pull *pull;
2253 struct ndr_push *push;
2254 enum ndr_err_code ndr_err;
2256 struct spoolss_WaitForPrinterChange *r;
2258 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WAITFORPRINTERCHANGE];
2260 r = talloc(talloc_tos(), struct spoolss_WaitForPrinterChange);
2265 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2270 pull = ndr_pull_init_blob(&blob, r, NULL);
2276 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2277 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2278 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2283 if (DEBUGLEVEL >= 10) {
2284 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, r);
2287 r->out.result = _spoolss_WaitForPrinterChange(p, r);
2289 if (p->rng_fault_state) {
2291 /* Return true here, srv_pipe_hnd.c will take care */
2295 if (DEBUGLEVEL >= 10) {
2296 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, r);
2299 push = ndr_push_init_ctx(r, NULL);
2305 ndr_err = call->ndr_push(push, NDR_OUT, r);
2306 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2311 blob = ndr_push_blob(push);
2312 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2322 static bool api_spoolss_ClosePrinter(pipes_struct *p)
2324 const struct ndr_interface_call *call;
2325 struct ndr_pull *pull;
2326 struct ndr_push *push;
2327 enum ndr_err_code ndr_err;
2329 struct spoolss_ClosePrinter *r;
2331 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CLOSEPRINTER];
2333 r = talloc(talloc_tos(), struct spoolss_ClosePrinter);
2338 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2343 pull = ndr_pull_init_blob(&blob, r, NULL);
2349 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2350 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2351 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2356 if (DEBUGLEVEL >= 10) {
2357 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, r);
2360 ZERO_STRUCT(r->out);
2361 r->out.handle = r->in.handle;
2362 r->out.result = _spoolss_ClosePrinter(p, r);
2364 if (p->rng_fault_state) {
2366 /* Return true here, srv_pipe_hnd.c will take care */
2370 if (DEBUGLEVEL >= 10) {
2371 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, r);
2374 push = ndr_push_init_ctx(r, NULL);
2380 ndr_err = call->ndr_push(push, NDR_OUT, r);
2381 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2386 blob = ndr_push_blob(push);
2387 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2397 static bool api_spoolss_AddForm(pipes_struct *p)
2399 const struct ndr_interface_call *call;
2400 struct ndr_pull *pull;
2401 struct ndr_push *push;
2402 enum ndr_err_code ndr_err;
2404 struct spoolss_AddForm *r;
2406 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDFORM];
2408 r = talloc(talloc_tos(), struct spoolss_AddForm);
2413 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2418 pull = ndr_pull_init_blob(&blob, r, NULL);
2424 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2425 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2426 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2431 if (DEBUGLEVEL >= 10) {
2432 NDR_PRINT_IN_DEBUG(spoolss_AddForm, r);
2435 r->out.result = _spoolss_AddForm(p, r);
2437 if (p->rng_fault_state) {
2439 /* Return true here, srv_pipe_hnd.c will take care */
2443 if (DEBUGLEVEL >= 10) {
2444 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, r);
2447 push = ndr_push_init_ctx(r, NULL);
2453 ndr_err = call->ndr_push(push, NDR_OUT, r);
2454 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2459 blob = ndr_push_blob(push);
2460 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2470 static bool api_spoolss_DeleteForm(pipes_struct *p)
2472 const struct ndr_interface_call *call;
2473 struct ndr_pull *pull;
2474 struct ndr_push *push;
2475 enum ndr_err_code ndr_err;
2477 struct spoolss_DeleteForm *r;
2479 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEFORM];
2481 r = talloc(talloc_tos(), struct spoolss_DeleteForm);
2486 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2491 pull = ndr_pull_init_blob(&blob, r, NULL);
2497 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2498 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2499 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2504 if (DEBUGLEVEL >= 10) {
2505 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, r);
2508 r->out.result = _spoolss_DeleteForm(p, r);
2510 if (p->rng_fault_state) {
2512 /* Return true here, srv_pipe_hnd.c will take care */
2516 if (DEBUGLEVEL >= 10) {
2517 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, r);
2520 push = ndr_push_init_ctx(r, NULL);
2526 ndr_err = call->ndr_push(push, NDR_OUT, r);
2527 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2532 blob = ndr_push_blob(push);
2533 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2543 static bool api_spoolss_GetForm(pipes_struct *p)
2545 const struct ndr_interface_call *call;
2546 struct ndr_pull *pull;
2547 struct ndr_push *push;
2548 enum ndr_err_code ndr_err;
2550 struct spoolss_GetForm *r;
2552 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETFORM];
2554 r = talloc(talloc_tos(), struct spoolss_GetForm);
2559 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2564 pull = ndr_pull_init_blob(&blob, r, NULL);
2570 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2571 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2572 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2577 if (DEBUGLEVEL >= 10) {
2578 NDR_PRINT_IN_DEBUG(spoolss_GetForm, r);
2581 ZERO_STRUCT(r->out);
2582 r->out.info = talloc_zero(r, union spoolss_FormInfo);
2583 if (r->out.info == NULL) {
2588 r->out.needed = talloc_zero(r, uint32_t);
2589 if (r->out.needed == NULL) {
2594 r->out.result = _spoolss_GetForm(p, r);
2596 if (p->rng_fault_state) {
2598 /* Return true here, srv_pipe_hnd.c will take care */
2602 if (DEBUGLEVEL >= 10) {
2603 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, r);
2606 push = ndr_push_init_ctx(r, NULL);
2612 ndr_err = call->ndr_push(push, NDR_OUT, r);
2613 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2618 blob = ndr_push_blob(push);
2619 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2629 static bool api_spoolss_SetForm(pipes_struct *p)
2631 const struct ndr_interface_call *call;
2632 struct ndr_pull *pull;
2633 struct ndr_push *push;
2634 enum ndr_err_code ndr_err;
2636 struct spoolss_SetForm *r;
2638 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETFORM];
2640 r = talloc(talloc_tos(), struct spoolss_SetForm);
2645 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2650 pull = ndr_pull_init_blob(&blob, r, NULL);
2656 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2657 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2658 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2663 if (DEBUGLEVEL >= 10) {
2664 NDR_PRINT_IN_DEBUG(spoolss_SetForm, r);
2667 r->out.result = _spoolss_SetForm(p, r);
2669 if (p->rng_fault_state) {
2671 /* Return true here, srv_pipe_hnd.c will take care */
2675 if (DEBUGLEVEL >= 10) {
2676 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, r);
2679 push = ndr_push_init_ctx(r, NULL);
2685 ndr_err = call->ndr_push(push, NDR_OUT, r);
2686 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2691 blob = ndr_push_blob(push);
2692 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2702 static bool api_spoolss_EnumForms(pipes_struct *p)
2704 const struct ndr_interface_call *call;
2705 struct ndr_pull *pull;
2706 struct ndr_push *push;
2707 enum ndr_err_code ndr_err;
2709 struct spoolss_EnumForms *r;
2711 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMFORMS];
2713 r = talloc(talloc_tos(), struct spoolss_EnumForms);
2718 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2723 pull = ndr_pull_init_blob(&blob, r, NULL);
2729 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2730 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2731 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2736 if (DEBUGLEVEL >= 10) {
2737 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, r);
2740 ZERO_STRUCT(r->out);
2741 r->out.count = talloc_zero(r, uint32_t);
2742 if (r->out.count == NULL) {
2747 r->out.info = talloc_zero(r, union spoolss_FormInfo *);
2748 if (r->out.info == NULL) {
2753 r->out.needed = talloc_zero(r, uint32_t);
2754 if (r->out.needed == NULL) {
2759 r->out.result = _spoolss_EnumForms(p, r);
2761 if (p->rng_fault_state) {
2763 /* Return true here, srv_pipe_hnd.c will take care */
2767 if (DEBUGLEVEL >= 10) {
2768 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, r);
2771 push = ndr_push_init_ctx(r, NULL);
2777 ndr_err = call->ndr_push(push, NDR_OUT, r);
2778 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2783 blob = ndr_push_blob(push);
2784 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2794 static bool api_spoolss_EnumPorts(pipes_struct *p)
2796 const struct ndr_interface_call *call;
2797 struct ndr_pull *pull;
2798 struct ndr_push *push;
2799 enum ndr_err_code ndr_err;
2801 struct spoolss_EnumPorts *r;
2803 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPORTS];
2805 r = talloc(talloc_tos(), struct spoolss_EnumPorts);
2810 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2815 pull = ndr_pull_init_blob(&blob, r, NULL);
2821 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2822 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2823 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2828 if (DEBUGLEVEL >= 10) {
2829 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, r);
2832 ZERO_STRUCT(r->out);
2833 r->out.count = talloc_zero(r, uint32_t);
2834 if (r->out.count == NULL) {
2839 r->out.info = talloc_zero(r, union spoolss_PortInfo *);
2840 if (r->out.info == NULL) {
2845 r->out.needed = talloc_zero(r, uint32_t);
2846 if (r->out.needed == NULL) {
2851 r->out.result = _spoolss_EnumPorts(p, r);
2853 if (p->rng_fault_state) {
2855 /* Return true here, srv_pipe_hnd.c will take care */
2859 if (DEBUGLEVEL >= 10) {
2860 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, r);
2863 push = ndr_push_init_ctx(r, NULL);
2869 ndr_err = call->ndr_push(push, NDR_OUT, r);
2870 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2875 blob = ndr_push_blob(push);
2876 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2886 static bool api_spoolss_EnumMonitors(pipes_struct *p)
2888 const struct ndr_interface_call *call;
2889 struct ndr_pull *pull;
2890 struct ndr_push *push;
2891 enum ndr_err_code ndr_err;
2893 struct spoolss_EnumMonitors *r;
2895 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMMONITORS];
2897 r = talloc(talloc_tos(), struct spoolss_EnumMonitors);
2902 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2907 pull = ndr_pull_init_blob(&blob, r, NULL);
2913 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2914 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2915 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2920 if (DEBUGLEVEL >= 10) {
2921 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, r);
2924 ZERO_STRUCT(r->out);
2925 r->out.count = talloc_zero(r, uint32_t);
2926 if (r->out.count == NULL) {
2931 r->out.info = talloc_zero(r, union spoolss_MonitorInfo *);
2932 if (r->out.info == NULL) {
2937 r->out.needed = talloc_zero(r, uint32_t);
2938 if (r->out.needed == NULL) {
2943 r->out.result = _spoolss_EnumMonitors(p, r);
2945 if (p->rng_fault_state) {
2947 /* Return true here, srv_pipe_hnd.c will take care */
2951 if (DEBUGLEVEL >= 10) {
2952 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, r);
2955 push = ndr_push_init_ctx(r, NULL);
2961 ndr_err = call->ndr_push(push, NDR_OUT, r);
2962 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2967 blob = ndr_push_blob(push);
2968 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2978 static bool api_spoolss_AddPort(pipes_struct *p)
2980 const struct ndr_interface_call *call;
2981 struct ndr_pull *pull;
2982 struct ndr_push *push;
2983 enum ndr_err_code ndr_err;
2985 struct spoolss_AddPort *r;
2987 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORT];
2989 r = talloc(talloc_tos(), struct spoolss_AddPort);
2994 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2999 pull = ndr_pull_init_blob(&blob, r, NULL);
3005 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3006 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3007 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3012 if (DEBUGLEVEL >= 10) {
3013 NDR_PRINT_IN_DEBUG(spoolss_AddPort, r);
3016 r->out.result = _spoolss_AddPort(p, r);
3018 if (p->rng_fault_state) {
3020 /* Return true here, srv_pipe_hnd.c will take care */
3024 if (DEBUGLEVEL >= 10) {
3025 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, r);
3028 push = ndr_push_init_ctx(r, NULL);
3034 ndr_err = call->ndr_push(push, NDR_OUT, r);
3035 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3040 blob = ndr_push_blob(push);
3041 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3051 static bool api_spoolss_ConfigurePort(pipes_struct *p)
3053 const struct ndr_interface_call *call;
3054 struct ndr_pull *pull;
3055 struct ndr_push *push;
3056 enum ndr_err_code ndr_err;
3058 struct spoolss_ConfigurePort *r;
3060 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CONFIGUREPORT];
3062 r = talloc(talloc_tos(), struct spoolss_ConfigurePort);
3067 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3072 pull = ndr_pull_init_blob(&blob, r, NULL);
3078 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3079 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3080 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3085 if (DEBUGLEVEL >= 10) {
3086 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, r);
3089 r->out.result = _spoolss_ConfigurePort(p, r);
3091 if (p->rng_fault_state) {
3093 /* Return true here, srv_pipe_hnd.c will take care */
3097 if (DEBUGLEVEL >= 10) {
3098 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, r);
3101 push = ndr_push_init_ctx(r, NULL);
3107 ndr_err = call->ndr_push(push, NDR_OUT, r);
3108 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3113 blob = ndr_push_blob(push);
3114 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3124 static bool api_spoolss_DeletePort(pipes_struct *p)
3126 const struct ndr_interface_call *call;
3127 struct ndr_pull *pull;
3128 struct ndr_push *push;
3129 enum ndr_err_code ndr_err;
3131 struct spoolss_DeletePort *r;
3133 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPORT];
3135 r = talloc(talloc_tos(), struct spoolss_DeletePort);
3140 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3145 pull = ndr_pull_init_blob(&blob, r, NULL);
3151 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3152 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3153 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3158 if (DEBUGLEVEL >= 10) {
3159 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, r);
3162 r->out.result = _spoolss_DeletePort(p, r);
3164 if (p->rng_fault_state) {
3166 /* Return true here, srv_pipe_hnd.c will take care */
3170 if (DEBUGLEVEL >= 10) {
3171 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, r);
3174 push = ndr_push_init_ctx(r, NULL);
3180 ndr_err = call->ndr_push(push, NDR_OUT, r);
3181 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3186 blob = ndr_push_blob(push);
3187 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3197 static bool api_spoolss_CreatePrinterIC(pipes_struct *p)
3199 const struct ndr_interface_call *call;
3200 struct ndr_pull *pull;
3201 struct ndr_push *push;
3202 enum ndr_err_code ndr_err;
3204 struct spoolss_CreatePrinterIC *r;
3206 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CREATEPRINTERIC];
3208 r = talloc(talloc_tos(), struct spoolss_CreatePrinterIC);
3213 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3218 pull = ndr_pull_init_blob(&blob, r, NULL);
3224 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3225 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3226 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3231 if (DEBUGLEVEL >= 10) {
3232 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, r);
3235 r->out.result = _spoolss_CreatePrinterIC(p, r);
3237 if (p->rng_fault_state) {
3239 /* Return true here, srv_pipe_hnd.c will take care */
3243 if (DEBUGLEVEL >= 10) {
3244 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, r);
3247 push = ndr_push_init_ctx(r, NULL);
3253 ndr_err = call->ndr_push(push, NDR_OUT, r);
3254 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3259 blob = ndr_push_blob(push);
3260 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3270 static bool api_spoolss_PlayGDIScriptOnPrinterIC(pipes_struct *p)
3272 const struct ndr_interface_call *call;
3273 struct ndr_pull *pull;
3274 struct ndr_push *push;
3275 enum ndr_err_code ndr_err;
3277 struct spoolss_PlayGDIScriptOnPrinterIC *r;
3279 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC];
3281 r = talloc(talloc_tos(), struct spoolss_PlayGDIScriptOnPrinterIC);
3286 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3291 pull = ndr_pull_init_blob(&blob, r, NULL);
3297 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3298 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3299 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3304 if (DEBUGLEVEL >= 10) {
3305 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3308 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(p, r);
3310 if (p->rng_fault_state) {
3312 /* Return true here, srv_pipe_hnd.c will take care */
3316 if (DEBUGLEVEL >= 10) {
3317 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3320 push = ndr_push_init_ctx(r, NULL);
3326 ndr_err = call->ndr_push(push, NDR_OUT, r);
3327 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3332 blob = ndr_push_blob(push);
3333 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3343 static bool api_spoolss_DeletePrinterIC(pipes_struct *p)
3345 const struct ndr_interface_call *call;
3346 struct ndr_pull *pull;
3347 struct ndr_push *push;
3348 enum ndr_err_code ndr_err;
3350 struct spoolss_DeletePrinterIC *r;
3352 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERIC];
3354 r = talloc(talloc_tos(), struct spoolss_DeletePrinterIC);
3359 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3364 pull = ndr_pull_init_blob(&blob, r, NULL);
3370 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3371 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3372 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3377 if (DEBUGLEVEL >= 10) {
3378 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, r);
3381 r->out.result = _spoolss_DeletePrinterIC(p, r);
3383 if (p->rng_fault_state) {
3385 /* Return true here, srv_pipe_hnd.c will take care */
3389 if (DEBUGLEVEL >= 10) {
3390 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, r);
3393 push = ndr_push_init_ctx(r, NULL);
3399 ndr_err = call->ndr_push(push, NDR_OUT, r);
3400 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3405 blob = ndr_push_blob(push);
3406 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3416 static bool api_spoolss_AddPrinterConnection(pipes_struct *p)
3418 const struct ndr_interface_call *call;
3419 struct ndr_pull *pull;
3420 struct ndr_push *push;
3421 enum ndr_err_code ndr_err;
3423 struct spoolss_AddPrinterConnection *r;
3425 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERCONNECTION];
3427 r = talloc(talloc_tos(), struct spoolss_AddPrinterConnection);
3432 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3437 pull = ndr_pull_init_blob(&blob, r, NULL);
3443 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3444 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3445 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3450 if (DEBUGLEVEL >= 10) {
3451 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, r);
3454 r->out.result = _spoolss_AddPrinterConnection(p, r);
3456 if (p->rng_fault_state) {
3458 /* Return true here, srv_pipe_hnd.c will take care */
3462 if (DEBUGLEVEL >= 10) {
3463 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, r);
3466 push = ndr_push_init_ctx(r, NULL);
3472 ndr_err = call->ndr_push(push, NDR_OUT, r);
3473 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3478 blob = ndr_push_blob(push);
3479 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3489 static bool api_spoolss_DeletePrinterConnection(pipes_struct *p)
3491 const struct ndr_interface_call *call;
3492 struct ndr_pull *pull;
3493 struct ndr_push *push;
3494 enum ndr_err_code ndr_err;
3496 struct spoolss_DeletePrinterConnection *r;
3498 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERCONNECTION];
3500 r = talloc(talloc_tos(), struct spoolss_DeletePrinterConnection);
3505 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3510 pull = ndr_pull_init_blob(&blob, r, NULL);
3516 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3517 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3518 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3523 if (DEBUGLEVEL >= 10) {
3524 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, r);
3527 r->out.result = _spoolss_DeletePrinterConnection(p, r);
3529 if (p->rng_fault_state) {
3531 /* Return true here, srv_pipe_hnd.c will take care */
3535 if (DEBUGLEVEL >= 10) {
3536 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, r);
3539 push = ndr_push_init_ctx(r, NULL);
3545 ndr_err = call->ndr_push(push, NDR_OUT, r);
3546 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3551 blob = ndr_push_blob(push);
3552 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3562 static bool api_spoolss_PrinterMessageBox(pipes_struct *p)
3564 const struct ndr_interface_call *call;
3565 struct ndr_pull *pull;
3566 struct ndr_push *push;
3567 enum ndr_err_code ndr_err;
3569 struct spoolss_PrinterMessageBox *r;
3571 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PRINTERMESSAGEBOX];
3573 r = talloc(talloc_tos(), struct spoolss_PrinterMessageBox);
3578 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3583 pull = ndr_pull_init_blob(&blob, r, NULL);
3589 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3590 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3591 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3596 if (DEBUGLEVEL >= 10) {
3597 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, r);
3600 r->out.result = _spoolss_PrinterMessageBox(p, r);
3602 if (p->rng_fault_state) {
3604 /* Return true here, srv_pipe_hnd.c will take care */
3608 if (DEBUGLEVEL >= 10) {
3609 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, r);
3612 push = ndr_push_init_ctx(r, NULL);
3618 ndr_err = call->ndr_push(push, NDR_OUT, r);
3619 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3624 blob = ndr_push_blob(push);
3625 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3635 static bool api_spoolss_AddMonitor(pipes_struct *p)
3637 const struct ndr_interface_call *call;
3638 struct ndr_pull *pull;
3639 struct ndr_push *push;
3640 enum ndr_err_code ndr_err;
3642 struct spoolss_AddMonitor *r;
3644 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDMONITOR];
3646 r = talloc(talloc_tos(), struct spoolss_AddMonitor);
3651 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3656 pull = ndr_pull_init_blob(&blob, r, NULL);
3662 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3663 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3664 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3669 if (DEBUGLEVEL >= 10) {
3670 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, r);
3673 r->out.result = _spoolss_AddMonitor(p, r);
3675 if (p->rng_fault_state) {
3677 /* Return true here, srv_pipe_hnd.c will take care */
3681 if (DEBUGLEVEL >= 10) {
3682 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, r);
3685 push = ndr_push_init_ctx(r, NULL);
3691 ndr_err = call->ndr_push(push, NDR_OUT, r);
3692 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3697 blob = ndr_push_blob(push);
3698 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3708 static bool api_spoolss_DeleteMonitor(pipes_struct *p)
3710 const struct ndr_interface_call *call;
3711 struct ndr_pull *pull;
3712 struct ndr_push *push;
3713 enum ndr_err_code ndr_err;
3715 struct spoolss_DeleteMonitor *r;
3717 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEMONITOR];
3719 r = talloc(talloc_tos(), struct spoolss_DeleteMonitor);
3724 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3729 pull = ndr_pull_init_blob(&blob, r, NULL);
3735 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3736 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3737 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3742 if (DEBUGLEVEL >= 10) {
3743 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, r);
3746 r->out.result = _spoolss_DeleteMonitor(p, r);
3748 if (p->rng_fault_state) {
3750 /* Return true here, srv_pipe_hnd.c will take care */
3754 if (DEBUGLEVEL >= 10) {
3755 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, r);
3758 push = ndr_push_init_ctx(r, NULL);
3764 ndr_err = call->ndr_push(push, NDR_OUT, r);
3765 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3770 blob = ndr_push_blob(push);
3771 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3781 static bool api_spoolss_DeletePrintProcessor(pipes_struct *p)
3783 const struct ndr_interface_call *call;
3784 struct ndr_pull *pull;
3785 struct ndr_push *push;
3786 enum ndr_err_code ndr_err;
3788 struct spoolss_DeletePrintProcessor *r;
3790 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROCESSOR];
3792 r = talloc(talloc_tos(), struct spoolss_DeletePrintProcessor);
3797 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3802 pull = ndr_pull_init_blob(&blob, r, NULL);
3808 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3809 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3810 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3815 if (DEBUGLEVEL >= 10) {
3816 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, r);
3819 r->out.result = _spoolss_DeletePrintProcessor(p, r);
3821 if (p->rng_fault_state) {
3823 /* Return true here, srv_pipe_hnd.c will take care */
3827 if (DEBUGLEVEL >= 10) {
3828 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, r);
3831 push = ndr_push_init_ctx(r, NULL);
3837 ndr_err = call->ndr_push(push, NDR_OUT, r);
3838 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3843 blob = ndr_push_blob(push);
3844 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3854 static bool api_spoolss_AddPrintProvidor(pipes_struct *p)
3856 const struct ndr_interface_call *call;
3857 struct ndr_pull *pull;
3858 struct ndr_push *push;
3859 enum ndr_err_code ndr_err;
3861 struct spoolss_AddPrintProvidor *r;
3863 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROVIDOR];
3865 r = talloc(talloc_tos(), struct spoolss_AddPrintProvidor);
3870 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3875 pull = ndr_pull_init_blob(&blob, r, NULL);
3881 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3882 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3883 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3888 if (DEBUGLEVEL >= 10) {
3889 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, r);
3892 r->out.result = _spoolss_AddPrintProvidor(p, r);
3894 if (p->rng_fault_state) {
3896 /* Return true here, srv_pipe_hnd.c will take care */
3900 if (DEBUGLEVEL >= 10) {
3901 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, r);
3904 push = ndr_push_init_ctx(r, NULL);
3910 ndr_err = call->ndr_push(push, NDR_OUT, r);
3911 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3916 blob = ndr_push_blob(push);
3917 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3927 static bool api_spoolss_DeletePrintProvidor(pipes_struct *p)
3929 const struct ndr_interface_call *call;
3930 struct ndr_pull *pull;
3931 struct ndr_push *push;
3932 enum ndr_err_code ndr_err;
3934 struct spoolss_DeletePrintProvidor *r;
3936 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROVIDOR];
3938 r = talloc(talloc_tos(), struct spoolss_DeletePrintProvidor);
3943 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3948 pull = ndr_pull_init_blob(&blob, r, NULL);
3954 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3955 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3956 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3961 if (DEBUGLEVEL >= 10) {
3962 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, r);
3965 r->out.result = _spoolss_DeletePrintProvidor(p, r);
3967 if (p->rng_fault_state) {
3969 /* Return true here, srv_pipe_hnd.c will take care */
3973 if (DEBUGLEVEL >= 10) {
3974 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, r);
3977 push = ndr_push_init_ctx(r, NULL);
3983 ndr_err = call->ndr_push(push, NDR_OUT, r);
3984 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3989 blob = ndr_push_blob(push);
3990 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4000 static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct *p)
4002 const struct ndr_interface_call *call;
4003 struct ndr_pull *pull;
4004 struct ndr_push *push;
4005 enum ndr_err_code ndr_err;
4007 struct spoolss_EnumPrintProcDataTypes *r;
4009 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCDATATYPES];
4011 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcDataTypes);
4016 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4021 pull = ndr_pull_init_blob(&blob, r, NULL);
4027 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4028 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4029 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4034 if (DEBUGLEVEL >= 10) {
4035 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, r);
4038 ZERO_STRUCT(r->out);
4039 r->out.count = talloc_zero(r, uint32_t);
4040 if (r->out.count == NULL) {
4045 r->out.info = talloc_zero(r, union spoolss_PrintProcDataTypesInfo *);
4046 if (r->out.info == NULL) {
4051 r->out.needed = talloc_zero(r, uint32_t);
4052 if (r->out.needed == NULL) {
4057 r->out.result = _spoolss_EnumPrintProcDataTypes(p, r);
4059 if (p->rng_fault_state) {
4061 /* Return true here, srv_pipe_hnd.c will take care */
4065 if (DEBUGLEVEL >= 10) {
4066 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, r);
4069 push = ndr_push_init_ctx(r, NULL);
4075 ndr_err = call->ndr_push(push, NDR_OUT, r);
4076 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4081 blob = ndr_push_blob(push);
4082 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4092 static bool api_spoolss_ResetPrinter(pipes_struct *p)
4094 const struct ndr_interface_call *call;
4095 struct ndr_pull *pull;
4096 struct ndr_push *push;
4097 enum ndr_err_code ndr_err;
4099 struct spoolss_ResetPrinter *r;
4101 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTER];
4103 r = talloc(talloc_tos(), struct spoolss_ResetPrinter);
4108 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4113 pull = ndr_pull_init_blob(&blob, r, NULL);
4119 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4120 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4121 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4126 if (DEBUGLEVEL >= 10) {
4127 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, r);
4130 r->out.result = _spoolss_ResetPrinter(p, r);
4132 if (p->rng_fault_state) {
4134 /* Return true here, srv_pipe_hnd.c will take care */
4138 if (DEBUGLEVEL >= 10) {
4139 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, r);
4142 push = ndr_push_init_ctx(r, NULL);
4148 ndr_err = call->ndr_push(push, NDR_OUT, r);
4149 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4154 blob = ndr_push_blob(push);
4155 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4165 static bool api_spoolss_GetPrinterDriver2(pipes_struct *p)
4167 const struct ndr_interface_call *call;
4168 struct ndr_pull *pull;
4169 struct ndr_push *push;
4170 enum ndr_err_code ndr_err;
4172 struct spoolss_GetPrinterDriver2 *r;
4174 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER2];
4176 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver2);
4181 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4186 pull = ndr_pull_init_blob(&blob, r, NULL);
4192 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4193 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4194 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4199 if (DEBUGLEVEL >= 10) {
4200 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, r);
4203 ZERO_STRUCT(r->out);
4204 r->out.info = talloc_zero(r, union spoolss_DriverInfo);
4205 if (r->out.info == NULL) {
4210 r->out.needed = talloc_zero(r, uint32_t);
4211 if (r->out.needed == NULL) {
4216 r->out.server_major_version = talloc_zero(r, uint32_t);
4217 if (r->out.server_major_version == NULL) {
4222 r->out.server_minor_version = talloc_zero(r, uint32_t);
4223 if (r->out.server_minor_version == NULL) {
4228 r->out.result = _spoolss_GetPrinterDriver2(p, r);
4230 if (p->rng_fault_state) {
4232 /* Return true here, srv_pipe_hnd.c will take care */
4236 if (DEBUGLEVEL >= 10) {
4237 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, r);
4240 push = ndr_push_init_ctx(r, NULL);
4246 ndr_err = call->ndr_push(push, NDR_OUT, r);
4247 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4252 blob = ndr_push_blob(push);
4253 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4263 static bool api_spoolss_FindFirstPrinterChangeNotification(pipes_struct *p)
4265 const struct ndr_interface_call *call;
4266 struct ndr_pull *pull;
4267 struct ndr_push *push;
4268 enum ndr_err_code ndr_err;
4270 struct spoolss_FindFirstPrinterChangeNotification *r;
4272 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION];
4274 r = talloc(talloc_tos(), struct spoolss_FindFirstPrinterChangeNotification);
4279 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4284 pull = ndr_pull_init_blob(&blob, r, NULL);
4290 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4291 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4292 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4297 if (DEBUGLEVEL >= 10) {
4298 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4301 r->out.result = _spoolss_FindFirstPrinterChangeNotification(p, r);
4303 if (p->rng_fault_state) {
4305 /* Return true here, srv_pipe_hnd.c will take care */
4309 if (DEBUGLEVEL >= 10) {
4310 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4313 push = ndr_push_init_ctx(r, NULL);
4319 ndr_err = call->ndr_push(push, NDR_OUT, r);
4320 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4325 blob = ndr_push_blob(push);
4326 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4336 static bool api_spoolss_FindNextPrinterChangeNotification(pipes_struct *p)
4338 const struct ndr_interface_call *call;
4339 struct ndr_pull *pull;
4340 struct ndr_push *push;
4341 enum ndr_err_code ndr_err;
4343 struct spoolss_FindNextPrinterChangeNotification *r;
4345 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION];
4347 r = talloc(talloc_tos(), struct spoolss_FindNextPrinterChangeNotification);
4352 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4357 pull = ndr_pull_init_blob(&blob, r, NULL);
4363 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4364 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4370 if (DEBUGLEVEL >= 10) {
4371 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4374 r->out.result = _spoolss_FindNextPrinterChangeNotification(p, r);
4376 if (p->rng_fault_state) {
4378 /* Return true here, srv_pipe_hnd.c will take care */
4382 if (DEBUGLEVEL >= 10) {
4383 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4386 push = ndr_push_init_ctx(r, NULL);
4392 ndr_err = call->ndr_push(push, NDR_OUT, r);
4393 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4398 blob = ndr_push_blob(push);
4399 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4409 static bool api_spoolss_FindClosePrinterNotify(pipes_struct *p)
4411 const struct ndr_interface_call *call;
4412 struct ndr_pull *pull;
4413 struct ndr_push *push;
4414 enum ndr_err_code ndr_err;
4416 struct spoolss_FindClosePrinterNotify *r;
4418 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY];
4420 r = talloc(talloc_tos(), struct spoolss_FindClosePrinterNotify);
4425 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4430 pull = ndr_pull_init_blob(&blob, r, NULL);
4436 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4437 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4438 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4443 if (DEBUGLEVEL >= 10) {
4444 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, r);
4447 r->out.result = _spoolss_FindClosePrinterNotify(p, r);
4449 if (p->rng_fault_state) {
4451 /* Return true here, srv_pipe_hnd.c will take care */
4455 if (DEBUGLEVEL >= 10) {
4456 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, r);
4459 push = ndr_push_init_ctx(r, NULL);
4465 ndr_err = call->ndr_push(push, NDR_OUT, r);
4466 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4471 blob = ndr_push_blob(push);
4472 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4482 static bool api_spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct *p)
4484 const struct ndr_interface_call *call;
4485 struct ndr_pull *pull;
4486 struct ndr_push *push;
4487 enum ndr_err_code ndr_err;
4489 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r;
4491 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD];
4493 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotificationOld);
4498 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4503 pull = ndr_pull_init_blob(&blob, r, NULL);
4509 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4510 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4511 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4516 if (DEBUGLEVEL >= 10) {
4517 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4520 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(p, r);
4522 if (p->rng_fault_state) {
4524 /* Return true here, srv_pipe_hnd.c will take care */
4528 if (DEBUGLEVEL >= 10) {
4529 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4532 push = ndr_push_init_ctx(r, NULL);
4538 ndr_err = call->ndr_push(push, NDR_OUT, r);
4539 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4544 blob = ndr_push_blob(push);
4545 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4555 static bool api_spoolss_ReplyOpenPrinter(pipes_struct *p)
4557 const struct ndr_interface_call *call;
4558 struct ndr_pull *pull;
4559 struct ndr_push *push;
4560 enum ndr_err_code ndr_err;
4562 struct spoolss_ReplyOpenPrinter *r;
4564 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYOPENPRINTER];
4566 r = talloc(talloc_tos(), struct spoolss_ReplyOpenPrinter);
4571 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4576 pull = ndr_pull_init_blob(&blob, r, NULL);
4582 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4583 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4584 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4589 if (DEBUGLEVEL >= 10) {
4590 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, r);
4593 ZERO_STRUCT(r->out);
4594 r->out.handle = talloc_zero(r, struct policy_handle);
4595 if (r->out.handle == NULL) {
4600 r->out.result = _spoolss_ReplyOpenPrinter(p, r);
4602 if (p->rng_fault_state) {
4604 /* Return true here, srv_pipe_hnd.c will take care */
4608 if (DEBUGLEVEL >= 10) {
4609 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, r);
4612 push = ndr_push_init_ctx(r, NULL);
4618 ndr_err = call->ndr_push(push, NDR_OUT, r);
4619 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4624 blob = ndr_push_blob(push);
4625 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4635 static bool api_spoolss_RouterReplyPrinter(pipes_struct *p)
4637 const struct ndr_interface_call *call;
4638 struct ndr_pull *pull;
4639 struct ndr_push *push;
4640 enum ndr_err_code ndr_err;
4642 struct spoolss_RouterReplyPrinter *r;
4644 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTER];
4646 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinter);
4651 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4656 pull = ndr_pull_init_blob(&blob, r, NULL);
4662 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4663 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4664 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4669 if (DEBUGLEVEL >= 10) {
4670 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, r);
4673 r->out.result = _spoolss_RouterReplyPrinter(p, r);
4675 if (p->rng_fault_state) {
4677 /* Return true here, srv_pipe_hnd.c will take care */
4681 if (DEBUGLEVEL >= 10) {
4682 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, r);
4685 push = ndr_push_init_ctx(r, NULL);
4691 ndr_err = call->ndr_push(push, NDR_OUT, r);
4692 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4697 blob = ndr_push_blob(push);
4698 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4708 static bool api_spoolss_ReplyClosePrinter(pipes_struct *p)
4710 const struct ndr_interface_call *call;
4711 struct ndr_pull *pull;
4712 struct ndr_push *push;
4713 enum ndr_err_code ndr_err;
4715 struct spoolss_ReplyClosePrinter *r;
4717 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYCLOSEPRINTER];
4719 r = talloc(talloc_tos(), struct spoolss_ReplyClosePrinter);
4724 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4729 pull = ndr_pull_init_blob(&blob, r, NULL);
4735 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4736 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4737 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4742 if (DEBUGLEVEL >= 10) {
4743 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, r);
4746 ZERO_STRUCT(r->out);
4747 r->out.handle = r->in.handle;
4748 r->out.result = _spoolss_ReplyClosePrinter(p, r);
4750 if (p->rng_fault_state) {
4752 /* Return true here, srv_pipe_hnd.c will take care */
4756 if (DEBUGLEVEL >= 10) {
4757 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, r);
4760 push = ndr_push_init_ctx(r, NULL);
4766 ndr_err = call->ndr_push(push, NDR_OUT, r);
4767 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4772 blob = ndr_push_blob(push);
4773 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4783 static bool api_spoolss_AddPortEx(pipes_struct *p)
4785 const struct ndr_interface_call *call;
4786 struct ndr_pull *pull;
4787 struct ndr_push *push;
4788 enum ndr_err_code ndr_err;
4790 struct spoolss_AddPortEx *r;
4792 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORTEX];
4794 r = talloc(talloc_tos(), struct spoolss_AddPortEx);
4799 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4804 pull = ndr_pull_init_blob(&blob, r, NULL);
4810 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4811 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4812 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4817 if (DEBUGLEVEL >= 10) {
4818 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, r);
4821 r->out.result = _spoolss_AddPortEx(p, r);
4823 if (p->rng_fault_state) {
4825 /* Return true here, srv_pipe_hnd.c will take care */
4829 if (DEBUGLEVEL >= 10) {
4830 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, r);
4833 push = ndr_push_init_ctx(r, NULL);
4839 ndr_err = call->ndr_push(push, NDR_OUT, r);
4840 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4845 blob = ndr_push_blob(push);
4846 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4856 static bool api_spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p)
4858 const struct ndr_interface_call *call;
4859 struct ndr_pull *pull;
4860 struct ndr_push *push;
4861 enum ndr_err_code ndr_err;
4863 struct spoolss_RouterFindFirstPrinterChangeNotification *r;
4865 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION];
4867 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotification);
4872 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4877 pull = ndr_pull_init_blob(&blob, r, NULL);
4883 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4884 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4885 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4890 if (DEBUGLEVEL >= 10) {
4891 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4894 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(p, r);
4896 if (p->rng_fault_state) {
4898 /* Return true here, srv_pipe_hnd.c will take care */
4902 if (DEBUGLEVEL >= 10) {
4903 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4906 push = ndr_push_init_ctx(r, NULL);
4912 ndr_err = call->ndr_push(push, NDR_OUT, r);
4913 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4918 blob = ndr_push_blob(push);
4919 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4929 static bool api_spoolss_SpoolerInit(pipes_struct *p)
4931 const struct ndr_interface_call *call;
4932 struct ndr_pull *pull;
4933 struct ndr_push *push;
4934 enum ndr_err_code ndr_err;
4936 struct spoolss_SpoolerInit *r;
4938 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SPOOLERINIT];
4940 r = talloc(talloc_tos(), struct spoolss_SpoolerInit);
4945 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4950 pull = ndr_pull_init_blob(&blob, r, NULL);
4956 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4957 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4958 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4963 if (DEBUGLEVEL >= 10) {
4964 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, r);
4967 r->out.result = _spoolss_SpoolerInit(p, r);
4969 if (p->rng_fault_state) {
4971 /* Return true here, srv_pipe_hnd.c will take care */
4975 if (DEBUGLEVEL >= 10) {
4976 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, r);
4979 push = ndr_push_init_ctx(r, NULL);
4985 ndr_err = call->ndr_push(push, NDR_OUT, r);
4986 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4991 blob = ndr_push_blob(push);
4992 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5002 static bool api_spoolss_ResetPrinterEx(pipes_struct *p)
5004 const struct ndr_interface_call *call;
5005 struct ndr_pull *pull;
5006 struct ndr_push *push;
5007 enum ndr_err_code ndr_err;
5009 struct spoolss_ResetPrinterEx *r;
5011 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTEREX];
5013 r = talloc(talloc_tos(), struct spoolss_ResetPrinterEx);
5018 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5023 pull = ndr_pull_init_blob(&blob, r, NULL);
5029 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5030 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5031 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5036 if (DEBUGLEVEL >= 10) {
5037 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, r);
5040 r->out.result = _spoolss_ResetPrinterEx(p, r);
5042 if (p->rng_fault_state) {
5044 /* Return true here, srv_pipe_hnd.c will take care */
5048 if (DEBUGLEVEL >= 10) {
5049 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, r);
5052 push = ndr_push_init_ctx(r, NULL);
5058 ndr_err = call->ndr_push(push, NDR_OUT, r);
5059 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5064 blob = ndr_push_blob(push);
5065 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5075 static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p)
5077 const struct ndr_interface_call *call;
5078 struct ndr_pull *pull;
5079 struct ndr_push *push;
5080 enum ndr_err_code ndr_err;
5082 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r;
5084 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX];
5086 r = talloc(talloc_tos(), struct spoolss_RemoteFindFirstPrinterChangeNotifyEx);
5091 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5096 pull = ndr_pull_init_blob(&blob, r, NULL);
5102 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5103 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5104 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5109 if (DEBUGLEVEL >= 10) {
5110 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5113 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p, r);
5115 if (p->rng_fault_state) {
5117 /* Return true here, srv_pipe_hnd.c will take care */
5121 if (DEBUGLEVEL >= 10) {
5122 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5125 push = ndr_push_init_ctx(r, NULL);
5131 ndr_err = call->ndr_push(push, NDR_OUT, r);
5132 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5137 blob = ndr_push_blob(push);
5138 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5148 static bool api_spoolss_RouterReplyPrinterEx(pipes_struct *p)
5150 const struct ndr_interface_call *call;
5151 struct ndr_pull *pull;
5152 struct ndr_push *push;
5153 enum ndr_err_code ndr_err;
5155 struct spoolss_RouterReplyPrinterEx *r;
5157 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTEREX];
5159 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinterEx);
5164 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5169 pull = ndr_pull_init_blob(&blob, r, NULL);
5175 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5176 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5177 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5182 if (DEBUGLEVEL >= 10) {
5183 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, r);
5186 ZERO_STRUCT(r->out);
5187 r->out.reply_result = talloc_zero(r, uint32_t);
5188 if (r->out.reply_result == NULL) {
5193 r->out.result = _spoolss_RouterReplyPrinterEx(p, r);
5195 if (p->rng_fault_state) {
5197 /* Return true here, srv_pipe_hnd.c will take care */
5201 if (DEBUGLEVEL >= 10) {
5202 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, r);
5205 push = ndr_push_init_ctx(r, NULL);
5211 ndr_err = call->ndr_push(push, NDR_OUT, r);
5212 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5217 blob = ndr_push_blob(push);
5218 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5228 static bool api_spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p)
5230 const struct ndr_interface_call *call;
5231 struct ndr_pull *pull;
5232 struct ndr_push *push;
5233 enum ndr_err_code ndr_err;
5235 struct spoolss_RouterRefreshPrinterChangeNotify *r;
5237 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY];
5239 r = talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotify);
5244 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5249 pull = ndr_pull_init_blob(&blob, r, NULL);
5255 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5256 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5257 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5262 if (DEBUGLEVEL >= 10) {
5263 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5266 ZERO_STRUCT(r->out);
5267 r->out.info = talloc_zero(r, struct spoolss_NotifyInfo *);
5268 if (r->out.info == NULL) {
5273 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(p, r);
5275 if (p->rng_fault_state) {
5277 /* Return true here, srv_pipe_hnd.c will take care */
5281 if (DEBUGLEVEL >= 10) {
5282 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5285 push = ndr_push_init_ctx(r, NULL);
5291 ndr_err = call->ndr_push(push, NDR_OUT, r);
5292 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5297 blob = ndr_push_blob(push);
5298 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5308 static bool api_spoolss_44(pipes_struct *p)
5310 const struct ndr_interface_call *call;
5311 struct ndr_pull *pull;
5312 struct ndr_push *push;
5313 enum ndr_err_code ndr_err;
5315 struct spoolss_44 *r;
5317 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_44];
5319 r = talloc(talloc_tos(), struct spoolss_44);
5324 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5329 pull = ndr_pull_init_blob(&blob, r, NULL);
5335 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5336 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5337 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5342 if (DEBUGLEVEL >= 10) {
5343 NDR_PRINT_IN_DEBUG(spoolss_44, r);
5346 r->out.result = _spoolss_44(p, r);
5348 if (p->rng_fault_state) {
5350 /* Return true here, srv_pipe_hnd.c will take care */
5354 if (DEBUGLEVEL >= 10) {
5355 NDR_PRINT_OUT_DEBUG(spoolss_44, r);
5358 push = ndr_push_init_ctx(r, NULL);
5364 ndr_err = call->ndr_push(push, NDR_OUT, r);
5365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5370 blob = ndr_push_blob(push);
5371 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5381 static bool api_spoolss_OpenPrinterEx(pipes_struct *p)
5383 const struct ndr_interface_call *call;
5384 struct ndr_pull *pull;
5385 struct ndr_push *push;
5386 enum ndr_err_code ndr_err;
5388 struct spoolss_OpenPrinterEx *r;
5390 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTEREX];
5392 r = talloc(talloc_tos(), struct spoolss_OpenPrinterEx);
5397 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5402 pull = ndr_pull_init_blob(&blob, r, NULL);
5408 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5409 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5410 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5415 if (DEBUGLEVEL >= 10) {
5416 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, r);
5419 ZERO_STRUCT(r->out);
5420 r->out.handle = talloc_zero(r, struct policy_handle);
5421 if (r->out.handle == NULL) {
5426 r->out.result = _spoolss_OpenPrinterEx(p, r);
5428 if (p->rng_fault_state) {
5430 /* Return true here, srv_pipe_hnd.c will take care */
5434 if (DEBUGLEVEL >= 10) {
5435 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, r);
5438 push = ndr_push_init_ctx(r, NULL);
5444 ndr_err = call->ndr_push(push, NDR_OUT, r);
5445 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5450 blob = ndr_push_blob(push);
5451 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5461 static bool api_spoolss_AddPrinterEx(pipes_struct *p)
5463 const struct ndr_interface_call *call;
5464 struct ndr_pull *pull;
5465 struct ndr_push *push;
5466 enum ndr_err_code ndr_err;
5468 struct spoolss_AddPrinterEx *r;
5470 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTEREX];
5472 r = talloc(talloc_tos(), struct spoolss_AddPrinterEx);
5477 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5482 pull = ndr_pull_init_blob(&blob, r, NULL);
5488 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5489 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5490 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5495 if (DEBUGLEVEL >= 10) {
5496 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, r);
5499 ZERO_STRUCT(r->out);
5500 r->out.handle = talloc_zero(r, struct policy_handle);
5501 if (r->out.handle == NULL) {
5506 r->out.result = _spoolss_AddPrinterEx(p, r);
5508 if (p->rng_fault_state) {
5510 /* Return true here, srv_pipe_hnd.c will take care */
5514 if (DEBUGLEVEL >= 10) {
5515 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, r);
5518 push = ndr_push_init_ctx(r, NULL);
5524 ndr_err = call->ndr_push(push, NDR_OUT, r);
5525 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5530 blob = ndr_push_blob(push);
5531 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5541 static bool api_spoolss_47(pipes_struct *p)
5543 const struct ndr_interface_call *call;
5544 struct ndr_pull *pull;
5545 struct ndr_push *push;
5546 enum ndr_err_code ndr_err;
5548 struct spoolss_47 *r;
5550 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_47];
5552 r = talloc(talloc_tos(), struct spoolss_47);
5557 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5562 pull = ndr_pull_init_blob(&blob, r, NULL);
5568 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5569 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5570 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5575 if (DEBUGLEVEL >= 10) {
5576 NDR_PRINT_IN_DEBUG(spoolss_47, r);
5579 r->out.result = _spoolss_47(p, r);
5581 if (p->rng_fault_state) {
5583 /* Return true here, srv_pipe_hnd.c will take care */
5587 if (DEBUGLEVEL >= 10) {
5588 NDR_PRINT_OUT_DEBUG(spoolss_47, r);
5591 push = ndr_push_init_ctx(r, NULL);
5597 ndr_err = call->ndr_push(push, NDR_OUT, r);
5598 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5603 blob = ndr_push_blob(push);
5604 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5614 static bool api_spoolss_EnumPrinterData(pipes_struct *p)
5616 const struct ndr_interface_call *call;
5617 struct ndr_pull *pull;
5618 struct ndr_push *push;
5619 enum ndr_err_code ndr_err;
5621 struct spoolss_EnumPrinterData *r;
5623 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATA];
5625 r = talloc(talloc_tos(), struct spoolss_EnumPrinterData);
5630 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5635 pull = ndr_pull_init_blob(&blob, r, NULL);
5641 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5642 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5643 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5648 if (DEBUGLEVEL >= 10) {
5649 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, r);
5652 ZERO_STRUCT(r->out);
5653 r->out.value_name = talloc_zero_array(r, const char, r->in.value_offered / 2);
5654 if (r->out.value_name == NULL) {
5659 r->out.value_needed = talloc_zero(r, uint32_t);
5660 if (r->out.value_needed == NULL) {
5665 r->out.type = talloc_zero(r, enum winreg_Type);
5666 if (r->out.type == NULL) {
5671 r->out.data = talloc_zero_array(r, uint8_t, r->in.data_offered);
5672 if (r->out.data == NULL) {
5677 r->out.data_needed = talloc_zero(r, uint32_t);
5678 if (r->out.data_needed == NULL) {
5683 r->out.result = _spoolss_EnumPrinterData(p, r);
5685 if (p->rng_fault_state) {
5687 /* Return true here, srv_pipe_hnd.c will take care */
5691 if (DEBUGLEVEL >= 10) {
5692 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, r);
5695 push = ndr_push_init_ctx(r, NULL);
5701 ndr_err = call->ndr_push(push, NDR_OUT, r);
5702 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5707 blob = ndr_push_blob(push);
5708 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5718 static bool api_spoolss_DeletePrinterData(pipes_struct *p)
5720 const struct ndr_interface_call *call;
5721 struct ndr_pull *pull;
5722 struct ndr_push *push;
5723 enum ndr_err_code ndr_err;
5725 struct spoolss_DeletePrinterData *r;
5727 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATA];
5729 r = talloc(talloc_tos(), struct spoolss_DeletePrinterData);
5734 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5739 pull = ndr_pull_init_blob(&blob, r, NULL);
5745 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5746 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5747 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5752 if (DEBUGLEVEL >= 10) {
5753 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, r);
5756 r->out.result = _spoolss_DeletePrinterData(p, r);
5758 if (p->rng_fault_state) {
5760 /* Return true here, srv_pipe_hnd.c will take care */
5764 if (DEBUGLEVEL >= 10) {
5765 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, r);
5768 push = ndr_push_init_ctx(r, NULL);
5774 ndr_err = call->ndr_push(push, NDR_OUT, r);
5775 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5780 blob = ndr_push_blob(push);
5781 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5791 static bool api_spoolss_4a(pipes_struct *p)
5793 const struct ndr_interface_call *call;
5794 struct ndr_pull *pull;
5795 struct ndr_push *push;
5796 enum ndr_err_code ndr_err;
5798 struct spoolss_4a *r;
5800 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4A];
5802 r = talloc(talloc_tos(), struct spoolss_4a);
5807 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5812 pull = ndr_pull_init_blob(&blob, r, NULL);
5818 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5819 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5820 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5825 if (DEBUGLEVEL >= 10) {
5826 NDR_PRINT_IN_DEBUG(spoolss_4a, r);
5829 r->out.result = _spoolss_4a(p, r);
5831 if (p->rng_fault_state) {
5833 /* Return true here, srv_pipe_hnd.c will take care */
5837 if (DEBUGLEVEL >= 10) {
5838 NDR_PRINT_OUT_DEBUG(spoolss_4a, r);
5841 push = ndr_push_init_ctx(r, NULL);
5847 ndr_err = call->ndr_push(push, NDR_OUT, r);
5848 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5853 blob = ndr_push_blob(push);
5854 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5864 static bool api_spoolss_4b(pipes_struct *p)
5866 const struct ndr_interface_call *call;
5867 struct ndr_pull *pull;
5868 struct ndr_push *push;
5869 enum ndr_err_code ndr_err;
5871 struct spoolss_4b *r;
5873 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4B];
5875 r = talloc(talloc_tos(), struct spoolss_4b);
5880 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5885 pull = ndr_pull_init_blob(&blob, r, NULL);
5891 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5892 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5893 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5898 if (DEBUGLEVEL >= 10) {
5899 NDR_PRINT_IN_DEBUG(spoolss_4b, r);
5902 r->out.result = _spoolss_4b(p, r);
5904 if (p->rng_fault_state) {
5906 /* Return true here, srv_pipe_hnd.c will take care */
5910 if (DEBUGLEVEL >= 10) {
5911 NDR_PRINT_OUT_DEBUG(spoolss_4b, r);
5914 push = ndr_push_init_ctx(r, NULL);
5920 ndr_err = call->ndr_push(push, NDR_OUT, r);
5921 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5926 blob = ndr_push_blob(push);
5927 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5937 static bool api_spoolss_4c(pipes_struct *p)
5939 const struct ndr_interface_call *call;
5940 struct ndr_pull *pull;
5941 struct ndr_push *push;
5942 enum ndr_err_code ndr_err;
5944 struct spoolss_4c *r;
5946 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4C];
5948 r = talloc(talloc_tos(), struct spoolss_4c);
5953 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5958 pull = ndr_pull_init_blob(&blob, r, NULL);
5964 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5965 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5966 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5971 if (DEBUGLEVEL >= 10) {
5972 NDR_PRINT_IN_DEBUG(spoolss_4c, r);
5975 r->out.result = _spoolss_4c(p, r);
5977 if (p->rng_fault_state) {
5979 /* Return true here, srv_pipe_hnd.c will take care */
5983 if (DEBUGLEVEL >= 10) {
5984 NDR_PRINT_OUT_DEBUG(spoolss_4c, r);
5987 push = ndr_push_init_ctx(r, NULL);
5993 ndr_err = call->ndr_push(push, NDR_OUT, r);
5994 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5999 blob = ndr_push_blob(push);
6000 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6010 static bool api_spoolss_SetPrinterDataEx(pipes_struct *p)
6012 const struct ndr_interface_call *call;
6013 struct ndr_pull *pull;
6014 struct ndr_push *push;
6015 enum ndr_err_code ndr_err;
6017 struct spoolss_SetPrinterDataEx *r;
6019 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATAEX];
6021 r = talloc(talloc_tos(), struct spoolss_SetPrinterDataEx);
6026 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6031 pull = ndr_pull_init_blob(&blob, r, NULL);
6037 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6038 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6039 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6044 if (DEBUGLEVEL >= 10) {
6045 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, r);
6048 r->out.result = _spoolss_SetPrinterDataEx(p, r);
6050 if (p->rng_fault_state) {
6052 /* Return true here, srv_pipe_hnd.c will take care */
6056 if (DEBUGLEVEL >= 10) {
6057 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, r);
6060 push = ndr_push_init_ctx(r, NULL);
6066 ndr_err = call->ndr_push(push, NDR_OUT, r);
6067 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6072 blob = ndr_push_blob(push);
6073 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6083 static bool api_spoolss_GetPrinterDataEx(pipes_struct *p)
6085 const struct ndr_interface_call *call;
6086 struct ndr_pull *pull;
6087 struct ndr_push *push;
6088 enum ndr_err_code ndr_err;
6090 struct spoolss_GetPrinterDataEx *r;
6092 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATAEX];
6094 r = talloc(talloc_tos(), struct spoolss_GetPrinterDataEx);
6099 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6104 pull = ndr_pull_init_blob(&blob, r, NULL);
6110 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6111 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6112 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6117 if (DEBUGLEVEL >= 10) {
6118 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, r);
6121 ZERO_STRUCT(r->out);
6122 r->out.type = talloc_zero(r, enum winreg_Type);
6123 if (r->out.type == NULL) {
6128 r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
6129 if (r->out.buffer == NULL) {
6134 r->out.needed = talloc_zero(r, uint32_t);
6135 if (r->out.needed == NULL) {
6140 r->out.result = _spoolss_GetPrinterDataEx(p, r);
6142 if (p->rng_fault_state) {
6144 /* Return true here, srv_pipe_hnd.c will take care */
6148 if (DEBUGLEVEL >= 10) {
6149 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, r);
6152 push = ndr_push_init_ctx(r, NULL);
6158 ndr_err = call->ndr_push(push, NDR_OUT, r);
6159 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6164 blob = ndr_push_blob(push);
6165 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6175 static bool api_spoolss_EnumPrinterDataEx(pipes_struct *p)
6177 const struct ndr_interface_call *call;
6178 struct ndr_pull *pull;
6179 struct ndr_push *push;
6180 enum ndr_err_code ndr_err;
6182 struct spoolss_EnumPrinterDataEx *r;
6184 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATAEX];
6186 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDataEx);
6191 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6196 pull = ndr_pull_init_blob(&blob, r, NULL);
6202 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6203 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6204 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6209 if (DEBUGLEVEL >= 10) {
6210 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, r);
6213 ZERO_STRUCT(r->out);
6214 r->out.count = talloc_zero(r, uint32_t);
6215 if (r->out.count == NULL) {
6220 r->out.info = talloc_zero(r, struct spoolss_PrinterEnumValues *);
6221 if (r->out.info == NULL) {
6226 r->out.needed = talloc_zero(r, uint32_t);
6227 if (r->out.needed == NULL) {
6232 r->out.result = _spoolss_EnumPrinterDataEx(p, r);
6234 if (p->rng_fault_state) {
6236 /* Return true here, srv_pipe_hnd.c will take care */
6240 if (DEBUGLEVEL >= 10) {
6241 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, r);
6244 push = ndr_push_init_ctx(r, NULL);
6250 ndr_err = call->ndr_push(push, NDR_OUT, r);
6251 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6256 blob = ndr_push_blob(push);
6257 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6267 static bool api_spoolss_EnumPrinterKey(pipes_struct *p)
6269 const struct ndr_interface_call *call;
6270 struct ndr_pull *pull;
6271 struct ndr_push *push;
6272 enum ndr_err_code ndr_err;
6274 struct spoolss_EnumPrinterKey *r;
6276 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERKEY];
6278 r = talloc(talloc_tos(), struct spoolss_EnumPrinterKey);
6283 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6288 pull = ndr_pull_init_blob(&blob, r, NULL);
6294 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6295 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6296 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6301 if (DEBUGLEVEL >= 10) {
6302 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, r);
6305 ZERO_STRUCT(r->out);
6306 r->out.key_buffer = talloc_zero(r, const char **);
6307 if (r->out.key_buffer == NULL) {
6312 r->out.needed = talloc_zero(r, uint32_t);
6313 if (r->out.needed == NULL) {
6318 r->out.result = _spoolss_EnumPrinterKey(p, r);
6320 if (p->rng_fault_state) {
6322 /* Return true here, srv_pipe_hnd.c will take care */
6326 if (DEBUGLEVEL >= 10) {
6327 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, r);
6330 push = ndr_push_init_ctx(r, NULL);
6336 ndr_err = call->ndr_push(push, NDR_OUT, r);
6337 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6342 blob = ndr_push_blob(push);
6343 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6353 static bool api_spoolss_DeletePrinterDataEx(pipes_struct *p)
6355 const struct ndr_interface_call *call;
6356 struct ndr_pull *pull;
6357 struct ndr_push *push;
6358 enum ndr_err_code ndr_err;
6360 struct spoolss_DeletePrinterDataEx *r;
6362 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATAEX];
6364 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDataEx);
6369 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6374 pull = ndr_pull_init_blob(&blob, r, NULL);
6380 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6381 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6382 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6387 if (DEBUGLEVEL >= 10) {
6388 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, r);
6391 r->out.result = _spoolss_DeletePrinterDataEx(p, r);
6393 if (p->rng_fault_state) {
6395 /* Return true here, srv_pipe_hnd.c will take care */
6399 if (DEBUGLEVEL >= 10) {
6400 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, r);
6403 push = ndr_push_init_ctx(r, NULL);
6409 ndr_err = call->ndr_push(push, NDR_OUT, r);
6410 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6415 blob = ndr_push_blob(push);
6416 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6426 static bool api_spoolss_DeletePrinterKey(pipes_struct *p)
6428 const struct ndr_interface_call *call;
6429 struct ndr_pull *pull;
6430 struct ndr_push *push;
6431 enum ndr_err_code ndr_err;
6433 struct spoolss_DeletePrinterKey *r;
6435 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERKEY];
6437 r = talloc(talloc_tos(), struct spoolss_DeletePrinterKey);
6442 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6447 pull = ndr_pull_init_blob(&blob, r, NULL);
6453 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6454 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6455 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6460 if (DEBUGLEVEL >= 10) {
6461 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, r);
6464 r->out.result = _spoolss_DeletePrinterKey(p, r);
6466 if (p->rng_fault_state) {
6468 /* Return true here, srv_pipe_hnd.c will take care */
6472 if (DEBUGLEVEL >= 10) {
6473 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, r);
6476 push = ndr_push_init_ctx(r, NULL);
6482 ndr_err = call->ndr_push(push, NDR_OUT, r);
6483 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6488 blob = ndr_push_blob(push);
6489 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6499 static bool api_spoolss_53(pipes_struct *p)
6501 const struct ndr_interface_call *call;
6502 struct ndr_pull *pull;
6503 struct ndr_push *push;
6504 enum ndr_err_code ndr_err;
6506 struct spoolss_53 *r;
6508 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_53];
6510 r = talloc(talloc_tos(), struct spoolss_53);
6515 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6520 pull = ndr_pull_init_blob(&blob, r, NULL);
6526 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6527 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6528 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6533 if (DEBUGLEVEL >= 10) {
6534 NDR_PRINT_IN_DEBUG(spoolss_53, r);
6537 r->out.result = _spoolss_53(p, r);
6539 if (p->rng_fault_state) {
6541 /* Return true here, srv_pipe_hnd.c will take care */
6545 if (DEBUGLEVEL >= 10) {
6546 NDR_PRINT_OUT_DEBUG(spoolss_53, r);
6549 push = ndr_push_init_ctx(r, NULL);
6555 ndr_err = call->ndr_push(push, NDR_OUT, r);
6556 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6561 blob = ndr_push_blob(push);
6562 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6572 static bool api_spoolss_DeletePrinterDriverEx(pipes_struct *p)
6574 const struct ndr_interface_call *call;
6575 struct ndr_pull *pull;
6576 struct ndr_push *push;
6577 enum ndr_err_code ndr_err;
6579 struct spoolss_DeletePrinterDriverEx *r;
6581 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVEREX];
6583 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriverEx);
6588 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6593 pull = ndr_pull_init_blob(&blob, r, NULL);
6599 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6600 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6601 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6606 if (DEBUGLEVEL >= 10) {
6607 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, r);
6610 r->out.result = _spoolss_DeletePrinterDriverEx(p, r);
6612 if (p->rng_fault_state) {
6614 /* Return true here, srv_pipe_hnd.c will take care */
6618 if (DEBUGLEVEL >= 10) {
6619 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, r);
6622 push = ndr_push_init_ctx(r, NULL);
6628 ndr_err = call->ndr_push(push, NDR_OUT, r);
6629 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6634 blob = ndr_push_blob(push);
6635 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6645 static bool api_spoolss_55(pipes_struct *p)
6647 const struct ndr_interface_call *call;
6648 struct ndr_pull *pull;
6649 struct ndr_push *push;
6650 enum ndr_err_code ndr_err;
6652 struct spoolss_55 *r;
6654 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_55];
6656 r = talloc(talloc_tos(), struct spoolss_55);
6661 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6666 pull = ndr_pull_init_blob(&blob, r, NULL);
6672 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6673 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6674 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6679 if (DEBUGLEVEL >= 10) {
6680 NDR_PRINT_IN_DEBUG(spoolss_55, r);
6683 r->out.result = _spoolss_55(p, r);
6685 if (p->rng_fault_state) {
6687 /* Return true here, srv_pipe_hnd.c will take care */
6691 if (DEBUGLEVEL >= 10) {
6692 NDR_PRINT_OUT_DEBUG(spoolss_55, r);
6695 push = ndr_push_init_ctx(r, NULL);
6701 ndr_err = call->ndr_push(push, NDR_OUT, r);
6702 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6707 blob = ndr_push_blob(push);
6708 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6718 static bool api_spoolss_56(pipes_struct *p)
6720 const struct ndr_interface_call *call;
6721 struct ndr_pull *pull;
6722 struct ndr_push *push;
6723 enum ndr_err_code ndr_err;
6725 struct spoolss_56 *r;
6727 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_56];
6729 r = talloc(talloc_tos(), struct spoolss_56);
6734 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6739 pull = ndr_pull_init_blob(&blob, r, NULL);
6745 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6746 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6747 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6752 if (DEBUGLEVEL >= 10) {
6753 NDR_PRINT_IN_DEBUG(spoolss_56, r);
6756 r->out.result = _spoolss_56(p, r);
6758 if (p->rng_fault_state) {
6760 /* Return true here, srv_pipe_hnd.c will take care */
6764 if (DEBUGLEVEL >= 10) {
6765 NDR_PRINT_OUT_DEBUG(spoolss_56, r);
6768 push = ndr_push_init_ctx(r, NULL);
6774 ndr_err = call->ndr_push(push, NDR_OUT, r);
6775 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6780 blob = ndr_push_blob(push);
6781 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6791 static bool api_spoolss_57(pipes_struct *p)
6793 const struct ndr_interface_call *call;
6794 struct ndr_pull *pull;
6795 struct ndr_push *push;
6796 enum ndr_err_code ndr_err;
6798 struct spoolss_57 *r;
6800 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_57];
6802 r = talloc(talloc_tos(), struct spoolss_57);
6807 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6812 pull = ndr_pull_init_blob(&blob, r, NULL);
6818 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6819 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6820 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6825 if (DEBUGLEVEL >= 10) {
6826 NDR_PRINT_IN_DEBUG(spoolss_57, r);
6829 r->out.result = _spoolss_57(p, r);
6831 if (p->rng_fault_state) {
6833 /* Return true here, srv_pipe_hnd.c will take care */
6837 if (DEBUGLEVEL >= 10) {
6838 NDR_PRINT_OUT_DEBUG(spoolss_57, r);
6841 push = ndr_push_init_ctx(r, NULL);
6847 ndr_err = call->ndr_push(push, NDR_OUT, r);
6848 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6853 blob = ndr_push_blob(push);
6854 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6864 static bool api_spoolss_XcvData(pipes_struct *p)
6866 const struct ndr_interface_call *call;
6867 struct ndr_pull *pull;
6868 struct ndr_push *push;
6869 enum ndr_err_code ndr_err;
6871 struct spoolss_XcvData *r;
6873 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_XCVDATA];
6875 r = talloc(talloc_tos(), struct spoolss_XcvData);
6880 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6885 pull = ndr_pull_init_blob(&blob, r, NULL);
6891 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6892 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6893 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6898 if (DEBUGLEVEL >= 10) {
6899 NDR_PRINT_IN_DEBUG(spoolss_XcvData, r);
6902 ZERO_STRUCT(r->out);
6903 r->out.status_code = r->in.status_code;
6904 r->out.out_data = talloc_zero_array(r, uint8_t, r->in.out_data_size);
6905 if (r->out.out_data == NULL) {
6910 r->out.needed = talloc_zero(r, uint32_t);
6911 if (r->out.needed == NULL) {
6916 r->out.result = _spoolss_XcvData(p, r);
6918 if (p->rng_fault_state) {
6920 /* Return true here, srv_pipe_hnd.c will take care */
6924 if (DEBUGLEVEL >= 10) {
6925 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, r);
6928 push = ndr_push_init_ctx(r, NULL);
6934 ndr_err = call->ndr_push(push, NDR_OUT, r);
6935 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6940 blob = ndr_push_blob(push);
6941 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6951 static bool api_spoolss_AddPrinterDriverEx(pipes_struct *p)
6953 const struct ndr_interface_call *call;
6954 struct ndr_pull *pull;
6955 struct ndr_push *push;
6956 enum ndr_err_code ndr_err;
6958 struct spoolss_AddPrinterDriverEx *r;
6960 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVEREX];
6962 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriverEx);
6967 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6972 pull = ndr_pull_init_blob(&blob, r, NULL);
6978 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6979 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6980 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6985 if (DEBUGLEVEL >= 10) {
6986 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, r);
6989 r->out.result = _spoolss_AddPrinterDriverEx(p, r);
6991 if (p->rng_fault_state) {
6993 /* Return true here, srv_pipe_hnd.c will take care */
6997 if (DEBUGLEVEL >= 10) {
6998 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, r);
7001 push = ndr_push_init_ctx(r, NULL);
7007 ndr_err = call->ndr_push(push, NDR_OUT, r);
7008 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7013 blob = ndr_push_blob(push);
7014 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7024 static bool api_spoolss_5a(pipes_struct *p)
7026 const struct ndr_interface_call *call;
7027 struct ndr_pull *pull;
7028 struct ndr_push *push;
7029 enum ndr_err_code ndr_err;
7031 struct spoolss_5a *r;
7033 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5A];
7035 r = talloc(talloc_tos(), struct spoolss_5a);
7040 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7045 pull = ndr_pull_init_blob(&blob, r, NULL);
7051 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7052 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7053 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7058 if (DEBUGLEVEL >= 10) {
7059 NDR_PRINT_IN_DEBUG(spoolss_5a, r);
7062 r->out.result = _spoolss_5a(p, r);
7064 if (p->rng_fault_state) {
7066 /* Return true here, srv_pipe_hnd.c will take care */
7070 if (DEBUGLEVEL >= 10) {
7071 NDR_PRINT_OUT_DEBUG(spoolss_5a, r);
7074 push = ndr_push_init_ctx(r, NULL);
7080 ndr_err = call->ndr_push(push, NDR_OUT, r);
7081 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7086 blob = ndr_push_blob(push);
7087 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7097 static bool api_spoolss_5b(pipes_struct *p)
7099 const struct ndr_interface_call *call;
7100 struct ndr_pull *pull;
7101 struct ndr_push *push;
7102 enum ndr_err_code ndr_err;
7104 struct spoolss_5b *r;
7106 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5B];
7108 r = talloc(talloc_tos(), struct spoolss_5b);
7113 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7118 pull = ndr_pull_init_blob(&blob, r, NULL);
7124 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7125 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7126 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7131 if (DEBUGLEVEL >= 10) {
7132 NDR_PRINT_IN_DEBUG(spoolss_5b, r);
7135 r->out.result = _spoolss_5b(p, r);
7137 if (p->rng_fault_state) {
7139 /* Return true here, srv_pipe_hnd.c will take care */
7143 if (DEBUGLEVEL >= 10) {
7144 NDR_PRINT_OUT_DEBUG(spoolss_5b, r);
7147 push = ndr_push_init_ctx(r, NULL);
7153 ndr_err = call->ndr_push(push, NDR_OUT, r);
7154 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7159 blob = ndr_push_blob(push);
7160 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7170 static bool api_spoolss_5c(pipes_struct *p)
7172 const struct ndr_interface_call *call;
7173 struct ndr_pull *pull;
7174 struct ndr_push *push;
7175 enum ndr_err_code ndr_err;
7177 struct spoolss_5c *r;
7179 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5C];
7181 r = talloc(talloc_tos(), struct spoolss_5c);
7186 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7191 pull = ndr_pull_init_blob(&blob, r, NULL);
7197 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7198 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7199 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7204 if (DEBUGLEVEL >= 10) {
7205 NDR_PRINT_IN_DEBUG(spoolss_5c, r);
7208 r->out.result = _spoolss_5c(p, r);
7210 if (p->rng_fault_state) {
7212 /* Return true here, srv_pipe_hnd.c will take care */
7216 if (DEBUGLEVEL >= 10) {
7217 NDR_PRINT_OUT_DEBUG(spoolss_5c, r);
7220 push = ndr_push_init_ctx(r, NULL);
7226 ndr_err = call->ndr_push(push, NDR_OUT, r);
7227 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7232 blob = ndr_push_blob(push);
7233 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7243 static bool api_spoolss_5d(pipes_struct *p)
7245 const struct ndr_interface_call *call;
7246 struct ndr_pull *pull;
7247 struct ndr_push *push;
7248 enum ndr_err_code ndr_err;
7250 struct spoolss_5d *r;
7252 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5D];
7254 r = talloc(talloc_tos(), struct spoolss_5d);
7259 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7264 pull = ndr_pull_init_blob(&blob, r, NULL);
7270 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7271 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7272 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7277 if (DEBUGLEVEL >= 10) {
7278 NDR_PRINT_IN_DEBUG(spoolss_5d, r);
7281 r->out.result = _spoolss_5d(p, r);
7283 if (p->rng_fault_state) {
7285 /* Return true here, srv_pipe_hnd.c will take care */
7289 if (DEBUGLEVEL >= 10) {
7290 NDR_PRINT_OUT_DEBUG(spoolss_5d, r);
7293 push = ndr_push_init_ctx(r, NULL);
7299 ndr_err = call->ndr_push(push, NDR_OUT, r);
7300 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7305 blob = ndr_push_blob(push);
7306 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7316 static bool api_spoolss_5e(pipes_struct *p)
7318 const struct ndr_interface_call *call;
7319 struct ndr_pull *pull;
7320 struct ndr_push *push;
7321 enum ndr_err_code ndr_err;
7323 struct spoolss_5e *r;
7325 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5E];
7327 r = talloc(talloc_tos(), struct spoolss_5e);
7332 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7337 pull = ndr_pull_init_blob(&blob, r, NULL);
7343 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7344 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7345 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7350 if (DEBUGLEVEL >= 10) {
7351 NDR_PRINT_IN_DEBUG(spoolss_5e, r);
7354 r->out.result = _spoolss_5e(p, r);
7356 if (p->rng_fault_state) {
7358 /* Return true here, srv_pipe_hnd.c will take care */
7362 if (DEBUGLEVEL >= 10) {
7363 NDR_PRINT_OUT_DEBUG(spoolss_5e, r);
7366 push = ndr_push_init_ctx(r, NULL);
7372 ndr_err = call->ndr_push(push, NDR_OUT, r);
7373 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7378 blob = ndr_push_blob(push);
7379 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7389 static bool api_spoolss_5f(pipes_struct *p)
7391 const struct ndr_interface_call *call;
7392 struct ndr_pull *pull;
7393 struct ndr_push *push;
7394 enum ndr_err_code ndr_err;
7396 struct spoolss_5f *r;
7398 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5F];
7400 r = talloc(talloc_tos(), struct spoolss_5f);
7405 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7410 pull = ndr_pull_init_blob(&blob, r, NULL);
7416 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7417 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7418 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7423 if (DEBUGLEVEL >= 10) {
7424 NDR_PRINT_IN_DEBUG(spoolss_5f, r);
7427 r->out.result = _spoolss_5f(p, r);
7429 if (p->rng_fault_state) {
7431 /* Return true here, srv_pipe_hnd.c will take care */
7435 if (DEBUGLEVEL >= 10) {
7436 NDR_PRINT_OUT_DEBUG(spoolss_5f, r);
7439 push = ndr_push_init_ctx(r, NULL);
7445 ndr_err = call->ndr_push(push, NDR_OUT, r);
7446 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7451 blob = ndr_push_blob(push);
7452 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7464 static struct api_struct api_spoolss_cmds[] =
7466 {"SPOOLSS_ENUMPRINTERS", NDR_SPOOLSS_ENUMPRINTERS, api_spoolss_EnumPrinters},
7467 {"SPOOLSS_OPENPRINTER", NDR_SPOOLSS_OPENPRINTER, api_spoolss_OpenPrinter},
7468 {"SPOOLSS_SETJOB", NDR_SPOOLSS_SETJOB, api_spoolss_SetJob},
7469 {"SPOOLSS_GETJOB", NDR_SPOOLSS_GETJOB, api_spoolss_GetJob},
7470 {"SPOOLSS_ENUMJOBS", NDR_SPOOLSS_ENUMJOBS, api_spoolss_EnumJobs},
7471 {"SPOOLSS_ADDPRINTER", NDR_SPOOLSS_ADDPRINTER, api_spoolss_AddPrinter},
7472 {"SPOOLSS_DELETEPRINTER", NDR_SPOOLSS_DELETEPRINTER, api_spoolss_DeletePrinter},
7473 {"SPOOLSS_SETPRINTER", NDR_SPOOLSS_SETPRINTER, api_spoolss_SetPrinter},
7474 {"SPOOLSS_GETPRINTER", NDR_SPOOLSS_GETPRINTER, api_spoolss_GetPrinter},
7475 {"SPOOLSS_ADDPRINTERDRIVER", NDR_SPOOLSS_ADDPRINTERDRIVER, api_spoolss_AddPrinterDriver},
7476 {"SPOOLSS_ENUMPRINTERDRIVERS", NDR_SPOOLSS_ENUMPRINTERDRIVERS, api_spoolss_EnumPrinterDrivers},
7477 {"SPOOLSS_GETPRINTERDRIVER", NDR_SPOOLSS_GETPRINTERDRIVER, api_spoolss_GetPrinterDriver},
7478 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_GetPrinterDriverDirectory},
7479 {"SPOOLSS_DELETEPRINTERDRIVER", NDR_SPOOLSS_DELETEPRINTERDRIVER, api_spoolss_DeletePrinterDriver},
7480 {"SPOOLSS_ADDPRINTPROCESSOR", NDR_SPOOLSS_ADDPRINTPROCESSOR, api_spoolss_AddPrintProcessor},
7481 {"SPOOLSS_ENUMPRINTPROCESSORS", NDR_SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_EnumPrintProcessors},
7482 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY", NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY, api_spoolss_GetPrintProcessorDirectory},
7483 {"SPOOLSS_STARTDOCPRINTER", NDR_SPOOLSS_STARTDOCPRINTER, api_spoolss_StartDocPrinter},
7484 {"SPOOLSS_STARTPAGEPRINTER", NDR_SPOOLSS_STARTPAGEPRINTER, api_spoolss_StartPagePrinter},
7485 {"SPOOLSS_WRITEPRINTER", NDR_SPOOLSS_WRITEPRINTER, api_spoolss_WritePrinter},
7486 {"SPOOLSS_ENDPAGEPRINTER", NDR_SPOOLSS_ENDPAGEPRINTER, api_spoolss_EndPagePrinter},
7487 {"SPOOLSS_ABORTPRINTER", NDR_SPOOLSS_ABORTPRINTER, api_spoolss_AbortPrinter},
7488 {"SPOOLSS_READPRINTER", NDR_SPOOLSS_READPRINTER, api_spoolss_ReadPrinter},
7489 {"SPOOLSS_ENDDOCPRINTER", NDR_SPOOLSS_ENDDOCPRINTER, api_spoolss_EndDocPrinter},
7490 {"SPOOLSS_ADDJOB", NDR_SPOOLSS_ADDJOB, api_spoolss_AddJob},
7491 {"SPOOLSS_SCHEDULEJOB", NDR_SPOOLSS_SCHEDULEJOB, api_spoolss_ScheduleJob},
7492 {"SPOOLSS_GETPRINTERDATA", NDR_SPOOLSS_GETPRINTERDATA, api_spoolss_GetPrinterData},
7493 {"SPOOLSS_SETPRINTERDATA", NDR_SPOOLSS_SETPRINTERDATA, api_spoolss_SetPrinterData},
7494 {"SPOOLSS_WAITFORPRINTERCHANGE", NDR_SPOOLSS_WAITFORPRINTERCHANGE, api_spoolss_WaitForPrinterChange},
7495 {"SPOOLSS_CLOSEPRINTER", NDR_SPOOLSS_CLOSEPRINTER, api_spoolss_ClosePrinter},
7496 {"SPOOLSS_ADDFORM", NDR_SPOOLSS_ADDFORM, api_spoolss_AddForm},
7497 {"SPOOLSS_DELETEFORM", NDR_SPOOLSS_DELETEFORM, api_spoolss_DeleteForm},
7498 {"SPOOLSS_GETFORM", NDR_SPOOLSS_GETFORM, api_spoolss_GetForm},
7499 {"SPOOLSS_SETFORM", NDR_SPOOLSS_SETFORM, api_spoolss_SetForm},
7500 {"SPOOLSS_ENUMFORMS", NDR_SPOOLSS_ENUMFORMS, api_spoolss_EnumForms},
7501 {"SPOOLSS_ENUMPORTS", NDR_SPOOLSS_ENUMPORTS, api_spoolss_EnumPorts},
7502 {"SPOOLSS_ENUMMONITORS", NDR_SPOOLSS_ENUMMONITORS, api_spoolss_EnumMonitors},
7503 {"SPOOLSS_ADDPORT", NDR_SPOOLSS_ADDPORT, api_spoolss_AddPort},
7504 {"SPOOLSS_CONFIGUREPORT", NDR_SPOOLSS_CONFIGUREPORT, api_spoolss_ConfigurePort},
7505 {"SPOOLSS_DELETEPORT", NDR_SPOOLSS_DELETEPORT, api_spoolss_DeletePort},
7506 {"SPOOLSS_CREATEPRINTERIC", NDR_SPOOLSS_CREATEPRINTERIC, api_spoolss_CreatePrinterIC},
7507 {"SPOOLSS_PLAYGDISCRIPTONPRINTERIC", NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC, api_spoolss_PlayGDIScriptOnPrinterIC},
7508 {"SPOOLSS_DELETEPRINTERIC", NDR_SPOOLSS_DELETEPRINTERIC, api_spoolss_DeletePrinterIC},
7509 {"SPOOLSS_ADDPRINTERCONNECTION", NDR_SPOOLSS_ADDPRINTERCONNECTION, api_spoolss_AddPrinterConnection},
7510 {"SPOOLSS_DELETEPRINTERCONNECTION", NDR_SPOOLSS_DELETEPRINTERCONNECTION, api_spoolss_DeletePrinterConnection},
7511 {"SPOOLSS_PRINTERMESSAGEBOX", NDR_SPOOLSS_PRINTERMESSAGEBOX, api_spoolss_PrinterMessageBox},
7512 {"SPOOLSS_ADDMONITOR", NDR_SPOOLSS_ADDMONITOR, api_spoolss_AddMonitor},
7513 {"SPOOLSS_DELETEMONITOR", NDR_SPOOLSS_DELETEMONITOR, api_spoolss_DeleteMonitor},
7514 {"SPOOLSS_DELETEPRINTPROCESSOR", NDR_SPOOLSS_DELETEPRINTPROCESSOR, api_spoolss_DeletePrintProcessor},
7515 {"SPOOLSS_ADDPRINTPROVIDOR", NDR_SPOOLSS_ADDPRINTPROVIDOR, api_spoolss_AddPrintProvidor},
7516 {"SPOOLSS_DELETEPRINTPROVIDOR", NDR_SPOOLSS_DELETEPRINTPROVIDOR, api_spoolss_DeletePrintProvidor},
7517 {"SPOOLSS_ENUMPRINTPROCDATATYPES", NDR_SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_EnumPrintProcDataTypes},
7518 {"SPOOLSS_RESETPRINTER", NDR_SPOOLSS_RESETPRINTER, api_spoolss_ResetPrinter},
7519 {"SPOOLSS_GETPRINTERDRIVER2", NDR_SPOOLSS_GETPRINTERDRIVER2, api_spoolss_GetPrinterDriver2},
7520 {"SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_FindFirstPrinterChangeNotification},
7521 {"SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION, api_spoolss_FindNextPrinterChangeNotification},
7522 {"SPOOLSS_FINDCLOSEPRINTERNOTIFY", NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY, api_spoolss_FindClosePrinterNotify},
7523 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD, api_spoolss_RouterFindFirstPrinterChangeNotificationOld},
7524 {"SPOOLSS_REPLYOPENPRINTER", NDR_SPOOLSS_REPLYOPENPRINTER, api_spoolss_ReplyOpenPrinter},
7525 {"SPOOLSS_ROUTERREPLYPRINTER", NDR_SPOOLSS_ROUTERREPLYPRINTER, api_spoolss_RouterReplyPrinter},
7526 {"SPOOLSS_REPLYCLOSEPRINTER", NDR_SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_ReplyClosePrinter},
7527 {"SPOOLSS_ADDPORTEX", NDR_SPOOLSS_ADDPORTEX, api_spoolss_AddPortEx},
7528 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_RouterFindFirstPrinterChangeNotification},
7529 {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT, api_spoolss_SpoolerInit},
7530 {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX, api_spoolss_ResetPrinterEx},
7531 {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx},
7532 {"SPOOLSS_ROUTERREPLYPRINTEREX", NDR_SPOOLSS_ROUTERREPLYPRINTEREX, api_spoolss_RouterReplyPrinterEx},
7533 {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY, api_spoolss_RouterRefreshPrinterChangeNotify},
7534 {"SPOOLSS_44", NDR_SPOOLSS_44, api_spoolss_44},
7535 {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX, api_spoolss_OpenPrinterEx},
7536 {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX, api_spoolss_AddPrinterEx},
7537 {"SPOOLSS_47", NDR_SPOOLSS_47, api_spoolss_47},
7538 {"SPOOLSS_ENUMPRINTERDATA", NDR_SPOOLSS_ENUMPRINTERDATA, api_spoolss_EnumPrinterData},
7539 {"SPOOLSS_DELETEPRINTERDATA", NDR_SPOOLSS_DELETEPRINTERDATA, api_spoolss_DeletePrinterData},
7540 {"SPOOLSS_4A", NDR_SPOOLSS_4A, api_spoolss_4a},
7541 {"SPOOLSS_4B", NDR_SPOOLSS_4B, api_spoolss_4b},
7542 {"SPOOLSS_4C", NDR_SPOOLSS_4C, api_spoolss_4c},
7543 {"SPOOLSS_SETPRINTERDATAEX", NDR_SPOOLSS_SETPRINTERDATAEX, api_spoolss_SetPrinterDataEx},
7544 {"SPOOLSS_GETPRINTERDATAEX", NDR_SPOOLSS_GETPRINTERDATAEX, api_spoolss_GetPrinterDataEx},
7545 {"SPOOLSS_ENUMPRINTERDATAEX", NDR_SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_EnumPrinterDataEx},
7546 {"SPOOLSS_ENUMPRINTERKEY", NDR_SPOOLSS_ENUMPRINTERKEY, api_spoolss_EnumPrinterKey},
7547 {"SPOOLSS_DELETEPRINTERDATAEX", NDR_SPOOLSS_DELETEPRINTERDATAEX, api_spoolss_DeletePrinterDataEx},
7548 {"SPOOLSS_DELETEPRINTERKEY", NDR_SPOOLSS_DELETEPRINTERKEY, api_spoolss_DeletePrinterKey},
7549 {"SPOOLSS_53", NDR_SPOOLSS_53, api_spoolss_53},
7550 {"SPOOLSS_DELETEPRINTERDRIVEREX", NDR_SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_DeletePrinterDriverEx},
7551 {"SPOOLSS_55", NDR_SPOOLSS_55, api_spoolss_55},
7552 {"SPOOLSS_56", NDR_SPOOLSS_56, api_spoolss_56},
7553 {"SPOOLSS_57", NDR_SPOOLSS_57, api_spoolss_57},
7554 {"SPOOLSS_XCVDATA", NDR_SPOOLSS_XCVDATA, api_spoolss_XcvData},
7555 {"SPOOLSS_ADDPRINTERDRIVEREX", NDR_SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_AddPrinterDriverEx},
7556 {"SPOOLSS_5A", NDR_SPOOLSS_5A, api_spoolss_5a},
7557 {"SPOOLSS_5B", NDR_SPOOLSS_5B, api_spoolss_5b},
7558 {"SPOOLSS_5C", NDR_SPOOLSS_5C, api_spoolss_5c},
7559 {"SPOOLSS_5D", NDR_SPOOLSS_5D, api_spoolss_5d},
7560 {"SPOOLSS_5E", NDR_SPOOLSS_5E, api_spoolss_5e},
7561 {"SPOOLSS_5F", NDR_SPOOLSS_5F, api_spoolss_5f},
7564 void spoolss_get_pipe_fns(struct api_struct **fns, int *n_fns)
7566 *fns = api_spoolss_cmds;
7567 *n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
7570 NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
7572 if (cli->pipes_struct == NULL) {
7573 return NT_STATUS_INVALID_PARAMETER;
7578 case NDR_SPOOLSS_ENUMPRINTERS: {
7579 struct spoolss_EnumPrinters *r = (struct spoolss_EnumPrinters *)_r;
7580 ZERO_STRUCT(r->out);
7581 r->out.count = talloc_zero(mem_ctx, uint32_t);
7582 if (r->out.count == NULL) {
7583 return NT_STATUS_NO_MEMORY;
7586 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo *);
7587 if (r->out.info == NULL) {
7588 return NT_STATUS_NO_MEMORY;
7591 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7592 if (r->out.needed == NULL) {
7593 return NT_STATUS_NO_MEMORY;
7596 r->out.result = _spoolss_EnumPrinters(cli->pipes_struct, r);
7597 return NT_STATUS_OK;
7600 case NDR_SPOOLSS_OPENPRINTER: {
7601 struct spoolss_OpenPrinter *r = (struct spoolss_OpenPrinter *)_r;
7602 ZERO_STRUCT(r->out);
7603 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
7604 if (r->out.handle == NULL) {
7605 return NT_STATUS_NO_MEMORY;
7608 r->out.result = _spoolss_OpenPrinter(cli->pipes_struct, r);
7609 return NT_STATUS_OK;
7612 case NDR_SPOOLSS_SETJOB: {
7613 struct spoolss_SetJob *r = (struct spoolss_SetJob *)_r;
7614 r->out.result = _spoolss_SetJob(cli->pipes_struct, r);
7615 return NT_STATUS_OK;
7618 case NDR_SPOOLSS_GETJOB: {
7619 struct spoolss_GetJob *r = (struct spoolss_GetJob *)_r;
7620 ZERO_STRUCT(r->out);
7621 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo);
7622 if (r->out.info == NULL) {
7623 return NT_STATUS_NO_MEMORY;
7626 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7627 if (r->out.needed == NULL) {
7628 return NT_STATUS_NO_MEMORY;
7631 r->out.result = _spoolss_GetJob(cli->pipes_struct, r);
7632 return NT_STATUS_OK;
7635 case NDR_SPOOLSS_ENUMJOBS: {
7636 struct spoolss_EnumJobs *r = (struct spoolss_EnumJobs *)_r;
7637 ZERO_STRUCT(r->out);
7638 r->out.count = talloc_zero(mem_ctx, uint32_t);
7639 if (r->out.count == NULL) {
7640 return NT_STATUS_NO_MEMORY;
7643 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo *);
7644 if (r->out.info == NULL) {
7645 return NT_STATUS_NO_MEMORY;
7648 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7649 if (r->out.needed == NULL) {
7650 return NT_STATUS_NO_MEMORY;
7653 r->out.result = _spoolss_EnumJobs(cli->pipes_struct, r);
7654 return NT_STATUS_OK;
7657 case NDR_SPOOLSS_ADDPRINTER: {
7658 struct spoolss_AddPrinter *r = (struct spoolss_AddPrinter *)_r;
7659 ZERO_STRUCT(r->out);
7660 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
7661 if (r->out.handle == NULL) {
7662 return NT_STATUS_NO_MEMORY;
7665 r->out.result = _spoolss_AddPrinter(cli->pipes_struct, r);
7666 return NT_STATUS_OK;
7669 case NDR_SPOOLSS_DELETEPRINTER: {
7670 struct spoolss_DeletePrinter *r = (struct spoolss_DeletePrinter *)_r;
7671 r->out.result = _spoolss_DeletePrinter(cli->pipes_struct, r);
7672 return NT_STATUS_OK;
7675 case NDR_SPOOLSS_SETPRINTER: {
7676 struct spoolss_SetPrinter *r = (struct spoolss_SetPrinter *)_r;
7677 r->out.result = _spoolss_SetPrinter(cli->pipes_struct, r);
7678 return NT_STATUS_OK;
7681 case NDR_SPOOLSS_GETPRINTER: {
7682 struct spoolss_GetPrinter *r = (struct spoolss_GetPrinter *)_r;
7683 ZERO_STRUCT(r->out);
7684 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo);
7685 if (r->out.info == NULL) {
7686 return NT_STATUS_NO_MEMORY;
7689 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7690 if (r->out.needed == NULL) {
7691 return NT_STATUS_NO_MEMORY;
7694 r->out.result = _spoolss_GetPrinter(cli->pipes_struct, r);
7695 return NT_STATUS_OK;
7698 case NDR_SPOOLSS_ADDPRINTERDRIVER: {
7699 struct spoolss_AddPrinterDriver *r = (struct spoolss_AddPrinterDriver *)_r;
7700 r->out.result = _spoolss_AddPrinterDriver(cli->pipes_struct, r);
7701 return NT_STATUS_OK;
7704 case NDR_SPOOLSS_ENUMPRINTERDRIVERS: {
7705 struct spoolss_EnumPrinterDrivers *r = (struct spoolss_EnumPrinterDrivers *)_r;
7706 ZERO_STRUCT(r->out);
7707 r->out.count = talloc_zero(mem_ctx, uint32_t);
7708 if (r->out.count == NULL) {
7709 return NT_STATUS_NO_MEMORY;
7712 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo *);
7713 if (r->out.info == NULL) {
7714 return NT_STATUS_NO_MEMORY;
7717 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7718 if (r->out.needed == NULL) {
7719 return NT_STATUS_NO_MEMORY;
7722 r->out.result = _spoolss_EnumPrinterDrivers(cli->pipes_struct, r);
7723 return NT_STATUS_OK;
7726 case NDR_SPOOLSS_GETPRINTERDRIVER: {
7727 struct spoolss_GetPrinterDriver *r = (struct spoolss_GetPrinterDriver *)_r;
7728 r->out.result = _spoolss_GetPrinterDriver(cli->pipes_struct, r);
7729 return NT_STATUS_OK;
7732 case NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY: {
7733 struct spoolss_GetPrinterDriverDirectory *r = (struct spoolss_GetPrinterDriverDirectory *)_r;
7734 ZERO_STRUCT(r->out);
7735 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverDirectoryInfo);
7736 if (r->out.info == NULL) {
7737 return NT_STATUS_NO_MEMORY;
7740 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7741 if (r->out.needed == NULL) {
7742 return NT_STATUS_NO_MEMORY;
7745 r->out.result = _spoolss_GetPrinterDriverDirectory(cli->pipes_struct, r);
7746 return NT_STATUS_OK;
7749 case NDR_SPOOLSS_DELETEPRINTERDRIVER: {
7750 struct spoolss_DeletePrinterDriver *r = (struct spoolss_DeletePrinterDriver *)_r;
7751 r->out.result = _spoolss_DeletePrinterDriver(cli->pipes_struct, r);
7752 return NT_STATUS_OK;
7755 case NDR_SPOOLSS_ADDPRINTPROCESSOR: {
7756 struct spoolss_AddPrintProcessor *r = (struct spoolss_AddPrintProcessor *)_r;
7757 r->out.result = _spoolss_AddPrintProcessor(cli->pipes_struct, r);
7758 return NT_STATUS_OK;
7761 case NDR_SPOOLSS_ENUMPRINTPROCESSORS: {
7762 struct spoolss_EnumPrintProcessors *r = (struct spoolss_EnumPrintProcessors *)_r;
7763 ZERO_STRUCT(r->out);
7764 r->out.count = talloc_zero(mem_ctx, uint32_t);
7765 if (r->out.count == NULL) {
7766 return NT_STATUS_NO_MEMORY;
7769 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorInfo *);
7770 if (r->out.info == NULL) {
7771 return NT_STATUS_NO_MEMORY;
7774 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7775 if (r->out.needed == NULL) {
7776 return NT_STATUS_NO_MEMORY;
7779 r->out.result = _spoolss_EnumPrintProcessors(cli->pipes_struct, r);
7780 return NT_STATUS_OK;
7783 case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY: {
7784 struct spoolss_GetPrintProcessorDirectory *r = (struct spoolss_GetPrintProcessorDirectory *)_r;
7785 ZERO_STRUCT(r->out);
7786 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorDirectoryInfo);
7787 if (r->out.info == NULL) {
7788 return NT_STATUS_NO_MEMORY;
7791 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7792 if (r->out.needed == NULL) {
7793 return NT_STATUS_NO_MEMORY;
7796 r->out.result = _spoolss_GetPrintProcessorDirectory(cli->pipes_struct, r);
7797 return NT_STATUS_OK;
7800 case NDR_SPOOLSS_STARTDOCPRINTER: {
7801 struct spoolss_StartDocPrinter *r = (struct spoolss_StartDocPrinter *)_r;
7802 ZERO_STRUCT(r->out);
7803 r->out.job_id = talloc_zero(mem_ctx, uint32_t);
7804 if (r->out.job_id == NULL) {
7805 return NT_STATUS_NO_MEMORY;
7808 r->out.result = _spoolss_StartDocPrinter(cli->pipes_struct, r);
7809 return NT_STATUS_OK;
7812 case NDR_SPOOLSS_STARTPAGEPRINTER: {
7813 struct spoolss_StartPagePrinter *r = (struct spoolss_StartPagePrinter *)_r;
7814 r->out.result = _spoolss_StartPagePrinter(cli->pipes_struct, r);
7815 return NT_STATUS_OK;
7818 case NDR_SPOOLSS_WRITEPRINTER: {
7819 struct spoolss_WritePrinter *r = (struct spoolss_WritePrinter *)_r;
7820 ZERO_STRUCT(r->out);
7821 r->out.num_written = talloc_zero(mem_ctx, uint32_t);
7822 if (r->out.num_written == NULL) {
7823 return NT_STATUS_NO_MEMORY;
7826 r->out.result = _spoolss_WritePrinter(cli->pipes_struct, r);
7827 return NT_STATUS_OK;
7830 case NDR_SPOOLSS_ENDPAGEPRINTER: {
7831 struct spoolss_EndPagePrinter *r = (struct spoolss_EndPagePrinter *)_r;
7832 r->out.result = _spoolss_EndPagePrinter(cli->pipes_struct, r);
7833 return NT_STATUS_OK;
7836 case NDR_SPOOLSS_ABORTPRINTER: {
7837 struct spoolss_AbortPrinter *r = (struct spoolss_AbortPrinter *)_r;
7838 r->out.result = _spoolss_AbortPrinter(cli->pipes_struct, r);
7839 return NT_STATUS_OK;
7842 case NDR_SPOOLSS_READPRINTER: {
7843 struct spoolss_ReadPrinter *r = (struct spoolss_ReadPrinter *)_r;
7844 ZERO_STRUCT(r->out);
7845 r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_size);
7846 if (r->out.data == NULL) {
7847 return NT_STATUS_NO_MEMORY;
7850 r->out._data_size = talloc_zero(mem_ctx, uint32_t);
7851 if (r->out._data_size == NULL) {
7852 return NT_STATUS_NO_MEMORY;
7855 r->out.result = _spoolss_ReadPrinter(cli->pipes_struct, r);
7856 return NT_STATUS_OK;
7859 case NDR_SPOOLSS_ENDDOCPRINTER: {
7860 struct spoolss_EndDocPrinter *r = (struct spoolss_EndDocPrinter *)_r;
7861 r->out.result = _spoolss_EndDocPrinter(cli->pipes_struct, r);
7862 return NT_STATUS_OK;
7865 case NDR_SPOOLSS_ADDJOB: {
7866 struct spoolss_AddJob *r = (struct spoolss_AddJob *)_r;
7867 ZERO_STRUCT(r->out);
7868 r->out.buffer = r->in.buffer;
7869 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7870 if (r->out.needed == NULL) {
7871 return NT_STATUS_NO_MEMORY;
7874 r->out.result = _spoolss_AddJob(cli->pipes_struct, r);
7875 return NT_STATUS_OK;
7878 case NDR_SPOOLSS_SCHEDULEJOB: {
7879 struct spoolss_ScheduleJob *r = (struct spoolss_ScheduleJob *)_r;
7880 r->out.result = _spoolss_ScheduleJob(cli->pipes_struct, r);
7881 return NT_STATUS_OK;
7884 case NDR_SPOOLSS_GETPRINTERDATA: {
7885 struct spoolss_GetPrinterData *r = (struct spoolss_GetPrinterData *)_r;
7886 ZERO_STRUCT(r->out);
7887 r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
7888 if (r->out.type == NULL) {
7889 return NT_STATUS_NO_MEMORY;
7892 r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData);
7893 if (r->out.data == NULL) {
7894 return NT_STATUS_NO_MEMORY;
7897 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7898 if (r->out.needed == NULL) {
7899 return NT_STATUS_NO_MEMORY;
7902 r->out.result = _spoolss_GetPrinterData(cli->pipes_struct, r);
7903 return NT_STATUS_OK;
7906 case NDR_SPOOLSS_SETPRINTERDATA: {
7907 struct spoolss_SetPrinterData *r = (struct spoolss_SetPrinterData *)_r;
7908 r->out.result = _spoolss_SetPrinterData(cli->pipes_struct, r);
7909 return NT_STATUS_OK;
7912 case NDR_SPOOLSS_WAITFORPRINTERCHANGE: {
7913 struct spoolss_WaitForPrinterChange *r = (struct spoolss_WaitForPrinterChange *)_r;
7914 r->out.result = _spoolss_WaitForPrinterChange(cli->pipes_struct, r);
7915 return NT_STATUS_OK;
7918 case NDR_SPOOLSS_CLOSEPRINTER: {
7919 struct spoolss_ClosePrinter *r = (struct spoolss_ClosePrinter *)_r;
7920 ZERO_STRUCT(r->out);
7921 r->out.handle = r->in.handle;
7922 r->out.result = _spoolss_ClosePrinter(cli->pipes_struct, r);
7923 return NT_STATUS_OK;
7926 case NDR_SPOOLSS_ADDFORM: {
7927 struct spoolss_AddForm *r = (struct spoolss_AddForm *)_r;
7928 r->out.result = _spoolss_AddForm(cli->pipes_struct, r);
7929 return NT_STATUS_OK;
7932 case NDR_SPOOLSS_DELETEFORM: {
7933 struct spoolss_DeleteForm *r = (struct spoolss_DeleteForm *)_r;
7934 r->out.result = _spoolss_DeleteForm(cli->pipes_struct, r);
7935 return NT_STATUS_OK;
7938 case NDR_SPOOLSS_GETFORM: {
7939 struct spoolss_GetForm *r = (struct spoolss_GetForm *)_r;
7940 ZERO_STRUCT(r->out);
7941 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo);
7942 if (r->out.info == NULL) {
7943 return NT_STATUS_NO_MEMORY;
7946 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7947 if (r->out.needed == NULL) {
7948 return NT_STATUS_NO_MEMORY;
7951 r->out.result = _spoolss_GetForm(cli->pipes_struct, r);
7952 return NT_STATUS_OK;
7955 case NDR_SPOOLSS_SETFORM: {
7956 struct spoolss_SetForm *r = (struct spoolss_SetForm *)_r;
7957 r->out.result = _spoolss_SetForm(cli->pipes_struct, r);
7958 return NT_STATUS_OK;
7961 case NDR_SPOOLSS_ENUMFORMS: {
7962 struct spoolss_EnumForms *r = (struct spoolss_EnumForms *)_r;
7963 ZERO_STRUCT(r->out);
7964 r->out.count = talloc_zero(mem_ctx, uint32_t);
7965 if (r->out.count == NULL) {
7966 return NT_STATUS_NO_MEMORY;
7969 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo *);
7970 if (r->out.info == NULL) {
7971 return NT_STATUS_NO_MEMORY;
7974 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7975 if (r->out.needed == NULL) {
7976 return NT_STATUS_NO_MEMORY;
7979 r->out.result = _spoolss_EnumForms(cli->pipes_struct, r);
7980 return NT_STATUS_OK;
7983 case NDR_SPOOLSS_ENUMPORTS: {
7984 struct spoolss_EnumPorts *r = (struct spoolss_EnumPorts *)_r;
7985 ZERO_STRUCT(r->out);
7986 r->out.count = talloc_zero(mem_ctx, uint32_t);
7987 if (r->out.count == NULL) {
7988 return NT_STATUS_NO_MEMORY;
7991 r->out.info = talloc_zero(mem_ctx, union spoolss_PortInfo *);
7992 if (r->out.info == NULL) {
7993 return NT_STATUS_NO_MEMORY;
7996 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7997 if (r->out.needed == NULL) {
7998 return NT_STATUS_NO_MEMORY;
8001 r->out.result = _spoolss_EnumPorts(cli->pipes_struct, r);
8002 return NT_STATUS_OK;
8005 case NDR_SPOOLSS_ENUMMONITORS: {
8006 struct spoolss_EnumMonitors *r = (struct spoolss_EnumMonitors *)_r;
8007 ZERO_STRUCT(r->out);
8008 r->out.count = talloc_zero(mem_ctx, uint32_t);
8009 if (r->out.count == NULL) {
8010 return NT_STATUS_NO_MEMORY;
8013 r->out.info = talloc_zero(mem_ctx, union spoolss_MonitorInfo *);
8014 if (r->out.info == NULL) {
8015 return NT_STATUS_NO_MEMORY;
8018 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8019 if (r->out.needed == NULL) {
8020 return NT_STATUS_NO_MEMORY;
8023 r->out.result = _spoolss_EnumMonitors(cli->pipes_struct, r);
8024 return NT_STATUS_OK;
8027 case NDR_SPOOLSS_ADDPORT: {
8028 struct spoolss_AddPort *r = (struct spoolss_AddPort *)_r;
8029 r->out.result = _spoolss_AddPort(cli->pipes_struct, r);
8030 return NT_STATUS_OK;
8033 case NDR_SPOOLSS_CONFIGUREPORT: {
8034 struct spoolss_ConfigurePort *r = (struct spoolss_ConfigurePort *)_r;
8035 r->out.result = _spoolss_ConfigurePort(cli->pipes_struct, r);
8036 return NT_STATUS_OK;
8039 case NDR_SPOOLSS_DELETEPORT: {
8040 struct spoolss_DeletePort *r = (struct spoolss_DeletePort *)_r;
8041 r->out.result = _spoolss_DeletePort(cli->pipes_struct, r);
8042 return NT_STATUS_OK;
8045 case NDR_SPOOLSS_CREATEPRINTERIC: {
8046 struct spoolss_CreatePrinterIC *r = (struct spoolss_CreatePrinterIC *)_r;
8047 r->out.result = _spoolss_CreatePrinterIC(cli->pipes_struct, r);
8048 return NT_STATUS_OK;
8051 case NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC: {
8052 struct spoolss_PlayGDIScriptOnPrinterIC *r = (struct spoolss_PlayGDIScriptOnPrinterIC *)_r;
8053 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(cli->pipes_struct, r);
8054 return NT_STATUS_OK;
8057 case NDR_SPOOLSS_DELETEPRINTERIC: {
8058 struct spoolss_DeletePrinterIC *r = (struct spoolss_DeletePrinterIC *)_r;
8059 r->out.result = _spoolss_DeletePrinterIC(cli->pipes_struct, r);
8060 return NT_STATUS_OK;
8063 case NDR_SPOOLSS_ADDPRINTERCONNECTION: {
8064 struct spoolss_AddPrinterConnection *r = (struct spoolss_AddPrinterConnection *)_r;
8065 r->out.result = _spoolss_AddPrinterConnection(cli->pipes_struct, r);
8066 return NT_STATUS_OK;
8069 case NDR_SPOOLSS_DELETEPRINTERCONNECTION: {
8070 struct spoolss_DeletePrinterConnection *r = (struct spoolss_DeletePrinterConnection *)_r;
8071 r->out.result = _spoolss_DeletePrinterConnection(cli->pipes_struct, r);
8072 return NT_STATUS_OK;
8075 case NDR_SPOOLSS_PRINTERMESSAGEBOX: {
8076 struct spoolss_PrinterMessageBox *r = (struct spoolss_PrinterMessageBox *)_r;
8077 r->out.result = _spoolss_PrinterMessageBox(cli->pipes_struct, r);
8078 return NT_STATUS_OK;
8081 case NDR_SPOOLSS_ADDMONITOR: {
8082 struct spoolss_AddMonitor *r = (struct spoolss_AddMonitor *)_r;
8083 r->out.result = _spoolss_AddMonitor(cli->pipes_struct, r);
8084 return NT_STATUS_OK;
8087 case NDR_SPOOLSS_DELETEMONITOR: {
8088 struct spoolss_DeleteMonitor *r = (struct spoolss_DeleteMonitor *)_r;
8089 r->out.result = _spoolss_DeleteMonitor(cli->pipes_struct, r);
8090 return NT_STATUS_OK;
8093 case NDR_SPOOLSS_DELETEPRINTPROCESSOR: {
8094 struct spoolss_DeletePrintProcessor *r = (struct spoolss_DeletePrintProcessor *)_r;
8095 r->out.result = _spoolss_DeletePrintProcessor(cli->pipes_struct, r);
8096 return NT_STATUS_OK;
8099 case NDR_SPOOLSS_ADDPRINTPROVIDOR: {
8100 struct spoolss_AddPrintProvidor *r = (struct spoolss_AddPrintProvidor *)_r;
8101 r->out.result = _spoolss_AddPrintProvidor(cli->pipes_struct, r);
8102 return NT_STATUS_OK;
8105 case NDR_SPOOLSS_DELETEPRINTPROVIDOR: {
8106 struct spoolss_DeletePrintProvidor *r = (struct spoolss_DeletePrintProvidor *)_r;
8107 r->out.result = _spoolss_DeletePrintProvidor(cli->pipes_struct, r);
8108 return NT_STATUS_OK;
8111 case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES: {
8112 struct spoolss_EnumPrintProcDataTypes *r = (struct spoolss_EnumPrintProcDataTypes *)_r;
8113 ZERO_STRUCT(r->out);
8114 r->out.count = talloc_zero(mem_ctx, uint32_t);
8115 if (r->out.count == NULL) {
8116 return NT_STATUS_NO_MEMORY;
8119 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcDataTypesInfo *);
8120 if (r->out.info == NULL) {
8121 return NT_STATUS_NO_MEMORY;
8124 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8125 if (r->out.needed == NULL) {
8126 return NT_STATUS_NO_MEMORY;
8129 r->out.result = _spoolss_EnumPrintProcDataTypes(cli->pipes_struct, r);
8130 return NT_STATUS_OK;
8133 case NDR_SPOOLSS_RESETPRINTER: {
8134 struct spoolss_ResetPrinter *r = (struct spoolss_ResetPrinter *)_r;
8135 r->out.result = _spoolss_ResetPrinter(cli->pipes_struct, r);
8136 return NT_STATUS_OK;
8139 case NDR_SPOOLSS_GETPRINTERDRIVER2: {
8140 struct spoolss_GetPrinterDriver2 *r = (struct spoolss_GetPrinterDriver2 *)_r;
8141 ZERO_STRUCT(r->out);
8142 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo);
8143 if (r->out.info == NULL) {
8144 return NT_STATUS_NO_MEMORY;
8147 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8148 if (r->out.needed == NULL) {
8149 return NT_STATUS_NO_MEMORY;
8152 r->out.server_major_version = talloc_zero(mem_ctx, uint32_t);
8153 if (r->out.server_major_version == NULL) {
8154 return NT_STATUS_NO_MEMORY;
8157 r->out.server_minor_version = talloc_zero(mem_ctx, uint32_t);
8158 if (r->out.server_minor_version == NULL) {
8159 return NT_STATUS_NO_MEMORY;
8162 r->out.result = _spoolss_GetPrinterDriver2(cli->pipes_struct, r);
8163 return NT_STATUS_OK;
8166 case NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION: {
8167 struct spoolss_FindFirstPrinterChangeNotification *r = (struct spoolss_FindFirstPrinterChangeNotification *)_r;
8168 r->out.result = _spoolss_FindFirstPrinterChangeNotification(cli->pipes_struct, r);
8169 return NT_STATUS_OK;
8172 case NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION: {
8173 struct spoolss_FindNextPrinterChangeNotification *r = (struct spoolss_FindNextPrinterChangeNotification *)_r;
8174 r->out.result = _spoolss_FindNextPrinterChangeNotification(cli->pipes_struct, r);
8175 return NT_STATUS_OK;
8178 case NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY: {
8179 struct spoolss_FindClosePrinterNotify *r = (struct spoolss_FindClosePrinterNotify *)_r;
8180 r->out.result = _spoolss_FindClosePrinterNotify(cli->pipes_struct, r);
8181 return NT_STATUS_OK;
8184 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD: {
8185 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r = (struct spoolss_RouterFindFirstPrinterChangeNotificationOld *)_r;
8186 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(cli->pipes_struct, r);
8187 return NT_STATUS_OK;
8190 case NDR_SPOOLSS_REPLYOPENPRINTER: {
8191 struct spoolss_ReplyOpenPrinter *r = (struct spoolss_ReplyOpenPrinter *)_r;
8192 ZERO_STRUCT(r->out);
8193 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8194 if (r->out.handle == NULL) {
8195 return NT_STATUS_NO_MEMORY;
8198 r->out.result = _spoolss_ReplyOpenPrinter(cli->pipes_struct, r);
8199 return NT_STATUS_OK;
8202 case NDR_SPOOLSS_ROUTERREPLYPRINTER: {
8203 struct spoolss_RouterReplyPrinter *r = (struct spoolss_RouterReplyPrinter *)_r;
8204 r->out.result = _spoolss_RouterReplyPrinter(cli->pipes_struct, r);
8205 return NT_STATUS_OK;
8208 case NDR_SPOOLSS_REPLYCLOSEPRINTER: {
8209 struct spoolss_ReplyClosePrinter *r = (struct spoolss_ReplyClosePrinter *)_r;
8210 ZERO_STRUCT(r->out);
8211 r->out.handle = r->in.handle;
8212 r->out.result = _spoolss_ReplyClosePrinter(cli->pipes_struct, r);
8213 return NT_STATUS_OK;
8216 case NDR_SPOOLSS_ADDPORTEX: {
8217 struct spoolss_AddPortEx *r = (struct spoolss_AddPortEx *)_r;
8218 r->out.result = _spoolss_AddPortEx(cli->pipes_struct, r);
8219 return NT_STATUS_OK;
8222 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION: {
8223 struct spoolss_RouterFindFirstPrinterChangeNotification *r = (struct spoolss_RouterFindFirstPrinterChangeNotification *)_r;
8224 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(cli->pipes_struct, r);
8225 return NT_STATUS_OK;
8228 case NDR_SPOOLSS_SPOOLERINIT: {
8229 struct spoolss_SpoolerInit *r = (struct spoolss_SpoolerInit *)_r;
8230 r->out.result = _spoolss_SpoolerInit(cli->pipes_struct, r);
8231 return NT_STATUS_OK;
8234 case NDR_SPOOLSS_RESETPRINTEREX: {
8235 struct spoolss_ResetPrinterEx *r = (struct spoolss_ResetPrinterEx *)_r;
8236 r->out.result = _spoolss_ResetPrinterEx(cli->pipes_struct, r);
8237 return NT_STATUS_OK;
8240 case NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX: {
8241 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r = (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *)_r;
8242 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli->pipes_struct, r);
8243 return NT_STATUS_OK;
8246 case NDR_SPOOLSS_ROUTERREPLYPRINTEREX: {
8247 struct spoolss_RouterReplyPrinterEx *r = (struct spoolss_RouterReplyPrinterEx *)_r;
8248 ZERO_STRUCT(r->out);
8249 r->out.reply_result = talloc_zero(mem_ctx, uint32_t);
8250 if (r->out.reply_result == NULL) {
8251 return NT_STATUS_NO_MEMORY;
8254 r->out.result = _spoolss_RouterReplyPrinterEx(cli->pipes_struct, r);
8255 return NT_STATUS_OK;
8258 case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY: {
8259 struct spoolss_RouterRefreshPrinterChangeNotify *r = (struct spoolss_RouterRefreshPrinterChangeNotify *)_r;
8260 ZERO_STRUCT(r->out);
8261 r->out.info = talloc_zero(mem_ctx, struct spoolss_NotifyInfo *);
8262 if (r->out.info == NULL) {
8263 return NT_STATUS_NO_MEMORY;
8266 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(cli->pipes_struct, r);
8267 return NT_STATUS_OK;
8270 case NDR_SPOOLSS_44: {
8271 struct spoolss_44 *r = (struct spoolss_44 *)_r;
8272 r->out.result = _spoolss_44(cli->pipes_struct, r);
8273 return NT_STATUS_OK;
8276 case NDR_SPOOLSS_OPENPRINTEREX: {
8277 struct spoolss_OpenPrinterEx *r = (struct spoolss_OpenPrinterEx *)_r;
8278 ZERO_STRUCT(r->out);
8279 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8280 if (r->out.handle == NULL) {
8281 return NT_STATUS_NO_MEMORY;
8284 r->out.result = _spoolss_OpenPrinterEx(cli->pipes_struct, r);
8285 return NT_STATUS_OK;
8288 case NDR_SPOOLSS_ADDPRINTEREX: {
8289 struct spoolss_AddPrinterEx *r = (struct spoolss_AddPrinterEx *)_r;
8290 ZERO_STRUCT(r->out);
8291 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8292 if (r->out.handle == NULL) {
8293 return NT_STATUS_NO_MEMORY;
8296 r->out.result = _spoolss_AddPrinterEx(cli->pipes_struct, r);
8297 return NT_STATUS_OK;
8300 case NDR_SPOOLSS_47: {
8301 struct spoolss_47 *r = (struct spoolss_47 *)_r;
8302 r->out.result = _spoolss_47(cli->pipes_struct, r);
8303 return NT_STATUS_OK;
8306 case NDR_SPOOLSS_ENUMPRINTERDATA: {
8307 struct spoolss_EnumPrinterData *r = (struct spoolss_EnumPrinterData *)_r;
8308 ZERO_STRUCT(r->out);
8309 r->out.value_name = talloc_zero_array(mem_ctx, const char, r->in.value_offered / 2);
8310 if (r->out.value_name == NULL) {
8311 return NT_STATUS_NO_MEMORY;
8314 r->out.value_needed = talloc_zero(mem_ctx, uint32_t);
8315 if (r->out.value_needed == NULL) {
8316 return NT_STATUS_NO_MEMORY;
8319 r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
8320 if (r->out.type == NULL) {
8321 return NT_STATUS_NO_MEMORY;
8324 r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_offered);
8325 if (r->out.data == NULL) {
8326 return NT_STATUS_NO_MEMORY;
8329 r->out.data_needed = talloc_zero(mem_ctx, uint32_t);
8330 if (r->out.data_needed == NULL) {
8331 return NT_STATUS_NO_MEMORY;
8334 r->out.result = _spoolss_EnumPrinterData(cli->pipes_struct, r);
8335 return NT_STATUS_OK;
8338 case NDR_SPOOLSS_DELETEPRINTERDATA: {
8339 struct spoolss_DeletePrinterData *r = (struct spoolss_DeletePrinterData *)_r;
8340 r->out.result = _spoolss_DeletePrinterData(cli->pipes_struct, r);
8341 return NT_STATUS_OK;
8344 case NDR_SPOOLSS_4A: {
8345 struct spoolss_4a *r = (struct spoolss_4a *)_r;
8346 r->out.result = _spoolss_4a(cli->pipes_struct, r);
8347 return NT_STATUS_OK;
8350 case NDR_SPOOLSS_4B: {
8351 struct spoolss_4b *r = (struct spoolss_4b *)_r;
8352 r->out.result = _spoolss_4b(cli->pipes_struct, r);
8353 return NT_STATUS_OK;
8356 case NDR_SPOOLSS_4C: {
8357 struct spoolss_4c *r = (struct spoolss_4c *)_r;
8358 r->out.result = _spoolss_4c(cli->pipes_struct, r);
8359 return NT_STATUS_OK;
8362 case NDR_SPOOLSS_SETPRINTERDATAEX: {
8363 struct spoolss_SetPrinterDataEx *r = (struct spoolss_SetPrinterDataEx *)_r;
8364 r->out.result = _spoolss_SetPrinterDataEx(cli->pipes_struct, r);
8365 return NT_STATUS_OK;
8368 case NDR_SPOOLSS_GETPRINTERDATAEX: {
8369 struct spoolss_GetPrinterDataEx *r = (struct spoolss_GetPrinterDataEx *)_r;
8370 ZERO_STRUCT(r->out);
8371 r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
8372 if (r->out.type == NULL) {
8373 return NT_STATUS_NO_MEMORY;
8376 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
8377 if (r->out.buffer == NULL) {
8378 return NT_STATUS_NO_MEMORY;
8381 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8382 if (r->out.needed == NULL) {
8383 return NT_STATUS_NO_MEMORY;
8386 r->out.result = _spoolss_GetPrinterDataEx(cli->pipes_struct, r);
8387 return NT_STATUS_OK;
8390 case NDR_SPOOLSS_ENUMPRINTERDATAEX: {
8391 struct spoolss_EnumPrinterDataEx *r = (struct spoolss_EnumPrinterDataEx *)_r;
8392 ZERO_STRUCT(r->out);
8393 r->out.count = talloc_zero(mem_ctx, uint32_t);
8394 if (r->out.count == NULL) {
8395 return NT_STATUS_NO_MEMORY;
8398 r->out.info = talloc_zero(mem_ctx, struct spoolss_PrinterEnumValues *);
8399 if (r->out.info == NULL) {
8400 return NT_STATUS_NO_MEMORY;
8403 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8404 if (r->out.needed == NULL) {
8405 return NT_STATUS_NO_MEMORY;
8408 r->out.result = _spoolss_EnumPrinterDataEx(cli->pipes_struct, r);
8409 return NT_STATUS_OK;
8412 case NDR_SPOOLSS_ENUMPRINTERKEY: {
8413 struct spoolss_EnumPrinterKey *r = (struct spoolss_EnumPrinterKey *)_r;
8414 ZERO_STRUCT(r->out);
8415 r->out.key_buffer = talloc_zero(mem_ctx, const char **);
8416 if (r->out.key_buffer == NULL) {
8417 return NT_STATUS_NO_MEMORY;
8420 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8421 if (r->out.needed == NULL) {
8422 return NT_STATUS_NO_MEMORY;
8425 r->out.result = _spoolss_EnumPrinterKey(cli->pipes_struct, r);
8426 return NT_STATUS_OK;
8429 case NDR_SPOOLSS_DELETEPRINTERDATAEX: {
8430 struct spoolss_DeletePrinterDataEx *r = (struct spoolss_DeletePrinterDataEx *)_r;
8431 r->out.result = _spoolss_DeletePrinterDataEx(cli->pipes_struct, r);
8432 return NT_STATUS_OK;
8435 case NDR_SPOOLSS_DELETEPRINTERKEY: {
8436 struct spoolss_DeletePrinterKey *r = (struct spoolss_DeletePrinterKey *)_r;
8437 r->out.result = _spoolss_DeletePrinterKey(cli->pipes_struct, r);
8438 return NT_STATUS_OK;
8441 case NDR_SPOOLSS_53: {
8442 struct spoolss_53 *r = (struct spoolss_53 *)_r;
8443 r->out.result = _spoolss_53(cli->pipes_struct, r);
8444 return NT_STATUS_OK;
8447 case NDR_SPOOLSS_DELETEPRINTERDRIVEREX: {
8448 struct spoolss_DeletePrinterDriverEx *r = (struct spoolss_DeletePrinterDriverEx *)_r;
8449 r->out.result = _spoolss_DeletePrinterDriverEx(cli->pipes_struct, r);
8450 return NT_STATUS_OK;
8453 case NDR_SPOOLSS_55: {
8454 struct spoolss_55 *r = (struct spoolss_55 *)_r;
8455 r->out.result = _spoolss_55(cli->pipes_struct, r);
8456 return NT_STATUS_OK;
8459 case NDR_SPOOLSS_56: {
8460 struct spoolss_56 *r = (struct spoolss_56 *)_r;
8461 r->out.result = _spoolss_56(cli->pipes_struct, r);
8462 return NT_STATUS_OK;
8465 case NDR_SPOOLSS_57: {
8466 struct spoolss_57 *r = (struct spoolss_57 *)_r;
8467 r->out.result = _spoolss_57(cli->pipes_struct, r);
8468 return NT_STATUS_OK;
8471 case NDR_SPOOLSS_XCVDATA: {
8472 struct spoolss_XcvData *r = (struct spoolss_XcvData *)_r;
8473 ZERO_STRUCT(r->out);
8474 r->out.status_code = r->in.status_code;
8475 r->out.out_data = talloc_zero_array(mem_ctx, uint8_t, r->in.out_data_size);
8476 if (r->out.out_data == NULL) {
8477 return NT_STATUS_NO_MEMORY;
8480 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8481 if (r->out.needed == NULL) {
8482 return NT_STATUS_NO_MEMORY;
8485 r->out.result = _spoolss_XcvData(cli->pipes_struct, r);
8486 return NT_STATUS_OK;
8489 case NDR_SPOOLSS_ADDPRINTERDRIVEREX: {
8490 struct spoolss_AddPrinterDriverEx *r = (struct spoolss_AddPrinterDriverEx *)_r;
8491 r->out.result = _spoolss_AddPrinterDriverEx(cli->pipes_struct, r);
8492 return NT_STATUS_OK;
8495 case NDR_SPOOLSS_5A: {
8496 struct spoolss_5a *r = (struct spoolss_5a *)_r;
8497 r->out.result = _spoolss_5a(cli->pipes_struct, r);
8498 return NT_STATUS_OK;
8501 case NDR_SPOOLSS_5B: {
8502 struct spoolss_5b *r = (struct spoolss_5b *)_r;
8503 r->out.result = _spoolss_5b(cli->pipes_struct, r);
8504 return NT_STATUS_OK;
8507 case NDR_SPOOLSS_5C: {
8508 struct spoolss_5c *r = (struct spoolss_5c *)_r;
8509 r->out.result = _spoolss_5c(cli->pipes_struct, r);
8510 return NT_STATUS_OK;
8513 case NDR_SPOOLSS_5D: {
8514 struct spoolss_5d *r = (struct spoolss_5d *)_r;
8515 r->out.result = _spoolss_5d(cli->pipes_struct, r);
8516 return NT_STATUS_OK;
8519 case NDR_SPOOLSS_5E: {
8520 struct spoolss_5e *r = (struct spoolss_5e *)_r;
8521 r->out.result = _spoolss_5e(cli->pipes_struct, r);
8522 return NT_STATUS_OK;
8525 case NDR_SPOOLSS_5F: {
8526 struct spoolss_5f *r = (struct spoolss_5f *)_r;
8527 r->out.result = _spoolss_5f(cli->pipes_struct, r);
8528 return NT_STATUS_OK;
8532 return NT_STATUS_NOT_IMPLEMENTED;
8536 NTSTATUS rpc_spoolss_init(void)
8538 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", &ndr_table_spoolss, api_spoolss_cmds, sizeof(api_spoolss_cmds) / sizeof(struct api_struct));