spoolss: fix spoolss_PrinterData size calculation.
[Samba/bb.git] / librpc / gen_ndr / srv_spoolss.c
blobcc11d122befdfaef4f5b3c6debcfa1c4d6273072
1 /*
2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
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;
15 DATA_BLOB blob;
16 struct spoolss_EnumPrinters *r;
18 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERS];
20 r = talloc(talloc_tos(), struct spoolss_EnumPrinters);
21 if (r == NULL) {
22 return false;
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26 talloc_free(r);
27 return false;
30 pull = ndr_pull_init_blob(&blob, r, NULL);
31 if (pull == NULL) {
32 talloc_free(r);
33 return false;
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)) {
39 talloc_free(r);
40 return false;
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, r);
47 ZERO_STRUCT(r->out);
48 r->out.count = talloc_zero(r, uint32_t);
49 if (r->out.count == NULL) {
50 talloc_free(r);
51 return false;
54 r->out.info = talloc_zero(r, union spoolss_PrinterInfo *);
55 if (r->out.info == NULL) {
56 talloc_free(r);
57 return false;
60 r->out.needed = talloc_zero(r, uint32_t);
61 if (r->out.needed == NULL) {
62 talloc_free(r);
63 return false;
66 r->out.result = _spoolss_EnumPrinters(p, r);
68 if (p->rng_fault_state) {
69 talloc_free(r);
70 /* Return true here, srv_pipe_hnd.c will take care */
71 return true;
74 if (DEBUGLEVEL >= 10) {
75 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, r);
78 push = ndr_push_init_ctx(r, NULL);
79 if (push == NULL) {
80 talloc_free(r);
81 return false;
84 ndr_err = call->ndr_push(push, NDR_OUT, r);
85 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
86 talloc_free(r);
87 return false;
90 blob = ndr_push_blob(push);
91 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
92 talloc_free(r);
93 return false;
96 talloc_free(r);
98 return true;
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;
107 DATA_BLOB blob;
108 struct spoolss_OpenPrinter *r;
110 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTER];
112 r = talloc(talloc_tos(), struct spoolss_OpenPrinter);
113 if (r == NULL) {
114 return false;
117 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
118 talloc_free(r);
119 return false;
122 pull = ndr_pull_init_blob(&blob, r, NULL);
123 if (pull == NULL) {
124 talloc_free(r);
125 return false;
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)) {
131 talloc_free(r);
132 return false;
135 if (DEBUGLEVEL >= 10) {
136 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, r);
139 ZERO_STRUCT(r->out);
140 r->out.handle = talloc_zero(r, struct policy_handle);
141 if (r->out.handle == NULL) {
142 talloc_free(r);
143 return false;
146 r->out.result = _spoolss_OpenPrinter(p, r);
148 if (p->rng_fault_state) {
149 talloc_free(r);
150 /* Return true here, srv_pipe_hnd.c will take care */
151 return true;
154 if (DEBUGLEVEL >= 10) {
155 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, r);
158 push = ndr_push_init_ctx(r, NULL);
159 if (push == NULL) {
160 talloc_free(r);
161 return false;
164 ndr_err = call->ndr_push(push, NDR_OUT, r);
165 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
166 talloc_free(r);
167 return false;
170 blob = ndr_push_blob(push);
171 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
172 talloc_free(r);
173 return false;
176 talloc_free(r);
178 return true;
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;
187 DATA_BLOB blob;
188 struct spoolss_SetJob *r;
190 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETJOB];
192 r = talloc(talloc_tos(), struct spoolss_SetJob);
193 if (r == NULL) {
194 return false;
197 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
198 talloc_free(r);
199 return false;
202 pull = ndr_pull_init_blob(&blob, r, NULL);
203 if (pull == NULL) {
204 talloc_free(r);
205 return false;
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)) {
211 talloc_free(r);
212 return false;
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) {
222 talloc_free(r);
223 /* Return true here, srv_pipe_hnd.c will take care */
224 return true;
227 if (DEBUGLEVEL >= 10) {
228 NDR_PRINT_OUT_DEBUG(spoolss_SetJob, r);
231 push = ndr_push_init_ctx(r, NULL);
232 if (push == NULL) {
233 talloc_free(r);
234 return false;
237 ndr_err = call->ndr_push(push, NDR_OUT, r);
238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
239 talloc_free(r);
240 return false;
243 blob = ndr_push_blob(push);
244 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
245 talloc_free(r);
246 return false;
249 talloc_free(r);
251 return true;
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;
260 DATA_BLOB blob;
261 struct spoolss_GetJob *r;
263 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETJOB];
265 r = talloc(talloc_tos(), struct spoolss_GetJob);
266 if (r == NULL) {
267 return false;
270 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
271 talloc_free(r);
272 return false;
275 pull = ndr_pull_init_blob(&blob, r, NULL);
276 if (pull == NULL) {
277 talloc_free(r);
278 return false;
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)) {
284 talloc_free(r);
285 return false;
288 if (DEBUGLEVEL >= 10) {
289 NDR_PRINT_IN_DEBUG(spoolss_GetJob, r);
292 ZERO_STRUCT(r->out);
293 r->out.info = talloc_zero(r, union spoolss_JobInfo);
294 if (r->out.info == NULL) {
295 talloc_free(r);
296 return false;
299 r->out.needed = talloc_zero(r, uint32_t);
300 if (r->out.needed == NULL) {
301 talloc_free(r);
302 return false;
305 r->out.result = _spoolss_GetJob(p, r);
307 if (p->rng_fault_state) {
308 talloc_free(r);
309 /* Return true here, srv_pipe_hnd.c will take care */
310 return true;
313 if (DEBUGLEVEL >= 10) {
314 NDR_PRINT_OUT_DEBUG(spoolss_GetJob, r);
317 push = ndr_push_init_ctx(r, NULL);
318 if (push == NULL) {
319 talloc_free(r);
320 return false;
323 ndr_err = call->ndr_push(push, NDR_OUT, r);
324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
325 talloc_free(r);
326 return false;
329 blob = ndr_push_blob(push);
330 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
331 talloc_free(r);
332 return false;
335 talloc_free(r);
337 return true;
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;
346 DATA_BLOB blob;
347 struct spoolss_EnumJobs *r;
349 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMJOBS];
351 r = talloc(talloc_tos(), struct spoolss_EnumJobs);
352 if (r == NULL) {
353 return false;
356 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
357 talloc_free(r);
358 return false;
361 pull = ndr_pull_init_blob(&blob, r, NULL);
362 if (pull == NULL) {
363 talloc_free(r);
364 return false;
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)) {
370 talloc_free(r);
371 return false;
374 if (DEBUGLEVEL >= 10) {
375 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, r);
378 ZERO_STRUCT(r->out);
379 r->out.count = talloc_zero(r, uint32_t);
380 if (r->out.count == NULL) {
381 talloc_free(r);
382 return false;
385 r->out.info = talloc_zero(r, union spoolss_JobInfo *);
386 if (r->out.info == NULL) {
387 talloc_free(r);
388 return false;
391 r->out.needed = talloc_zero(r, uint32_t);
392 if (r->out.needed == NULL) {
393 talloc_free(r);
394 return false;
397 r->out.result = _spoolss_EnumJobs(p, r);
399 if (p->rng_fault_state) {
400 talloc_free(r);
401 /* Return true here, srv_pipe_hnd.c will take care */
402 return true;
405 if (DEBUGLEVEL >= 10) {
406 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, r);
409 push = ndr_push_init_ctx(r, NULL);
410 if (push == NULL) {
411 talloc_free(r);
412 return false;
415 ndr_err = call->ndr_push(push, NDR_OUT, r);
416 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
417 talloc_free(r);
418 return false;
421 blob = ndr_push_blob(push);
422 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
423 talloc_free(r);
424 return false;
427 talloc_free(r);
429 return true;
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;
438 DATA_BLOB blob;
439 struct spoolss_AddPrinter *r;
441 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTER];
443 r = talloc(talloc_tos(), struct spoolss_AddPrinter);
444 if (r == NULL) {
445 return false;
448 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
449 talloc_free(r);
450 return false;
453 pull = ndr_pull_init_blob(&blob, r, NULL);
454 if (pull == NULL) {
455 talloc_free(r);
456 return false;
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)) {
462 talloc_free(r);
463 return false;
466 if (DEBUGLEVEL >= 10) {
467 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, r);
470 ZERO_STRUCT(r->out);
471 r->out.handle = talloc_zero(r, struct policy_handle);
472 if (r->out.handle == NULL) {
473 talloc_free(r);
474 return false;
477 r->out.result = _spoolss_AddPrinter(p, r);
479 if (p->rng_fault_state) {
480 talloc_free(r);
481 /* Return true here, srv_pipe_hnd.c will take care */
482 return true;
485 if (DEBUGLEVEL >= 10) {
486 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, r);
489 push = ndr_push_init_ctx(r, NULL);
490 if (push == NULL) {
491 talloc_free(r);
492 return false;
495 ndr_err = call->ndr_push(push, NDR_OUT, r);
496 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
497 talloc_free(r);
498 return false;
501 blob = ndr_push_blob(push);
502 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
503 talloc_free(r);
504 return false;
507 talloc_free(r);
509 return true;
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;
518 DATA_BLOB blob;
519 struct spoolss_DeletePrinter *r;
521 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTER];
523 r = talloc(talloc_tos(), struct spoolss_DeletePrinter);
524 if (r == NULL) {
525 return false;
528 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
529 talloc_free(r);
530 return false;
533 pull = ndr_pull_init_blob(&blob, r, NULL);
534 if (pull == NULL) {
535 talloc_free(r);
536 return false;
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)) {
542 talloc_free(r);
543 return false;
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) {
553 talloc_free(r);
554 /* Return true here, srv_pipe_hnd.c will take care */
555 return true;
558 if (DEBUGLEVEL >= 10) {
559 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, r);
562 push = ndr_push_init_ctx(r, NULL);
563 if (push == NULL) {
564 talloc_free(r);
565 return false;
568 ndr_err = call->ndr_push(push, NDR_OUT, r);
569 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
570 talloc_free(r);
571 return false;
574 blob = ndr_push_blob(push);
575 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
576 talloc_free(r);
577 return false;
580 talloc_free(r);
582 return true;
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;
591 DATA_BLOB blob;
592 struct spoolss_SetPrinter *r;
594 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTER];
596 r = talloc(talloc_tos(), struct spoolss_SetPrinter);
597 if (r == NULL) {
598 return false;
601 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
602 talloc_free(r);
603 return false;
606 pull = ndr_pull_init_blob(&blob, r, NULL);
607 if (pull == NULL) {
608 talloc_free(r);
609 return false;
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)) {
615 talloc_free(r);
616 return false;
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) {
626 talloc_free(r);
627 /* Return true here, srv_pipe_hnd.c will take care */
628 return true;
631 if (DEBUGLEVEL >= 10) {
632 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, r);
635 push = ndr_push_init_ctx(r, NULL);
636 if (push == NULL) {
637 talloc_free(r);
638 return false;
641 ndr_err = call->ndr_push(push, NDR_OUT, r);
642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
643 talloc_free(r);
644 return false;
647 blob = ndr_push_blob(push);
648 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
649 talloc_free(r);
650 return false;
653 talloc_free(r);
655 return true;
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;
664 DATA_BLOB blob;
665 struct spoolss_GetPrinter *r;
667 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTER];
669 r = talloc(talloc_tos(), struct spoolss_GetPrinter);
670 if (r == NULL) {
671 return false;
674 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
675 talloc_free(r);
676 return false;
679 pull = ndr_pull_init_blob(&blob, r, NULL);
680 if (pull == NULL) {
681 talloc_free(r);
682 return false;
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)) {
688 talloc_free(r);
689 return false;
692 if (DEBUGLEVEL >= 10) {
693 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, r);
696 ZERO_STRUCT(r->out);
697 r->out.info = talloc_zero(r, union spoolss_PrinterInfo);
698 if (r->out.info == NULL) {
699 talloc_free(r);
700 return false;
703 r->out.needed = talloc_zero(r, uint32_t);
704 if (r->out.needed == NULL) {
705 talloc_free(r);
706 return false;
709 r->out.result = _spoolss_GetPrinter(p, r);
711 if (p->rng_fault_state) {
712 talloc_free(r);
713 /* Return true here, srv_pipe_hnd.c will take care */
714 return true;
717 if (DEBUGLEVEL >= 10) {
718 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, r);
721 push = ndr_push_init_ctx(r, NULL);
722 if (push == NULL) {
723 talloc_free(r);
724 return false;
727 ndr_err = call->ndr_push(push, NDR_OUT, r);
728 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
729 talloc_free(r);
730 return false;
733 blob = ndr_push_blob(push);
734 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
735 talloc_free(r);
736 return false;
739 talloc_free(r);
741 return true;
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;
750 DATA_BLOB blob;
751 struct spoolss_AddPrinterDriver *r;
753 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVER];
755 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriver);
756 if (r == NULL) {
757 return false;
760 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
761 talloc_free(r);
762 return false;
765 pull = ndr_pull_init_blob(&blob, r, NULL);
766 if (pull == NULL) {
767 talloc_free(r);
768 return false;
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)) {
774 talloc_free(r);
775 return false;
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) {
785 talloc_free(r);
786 /* Return true here, srv_pipe_hnd.c will take care */
787 return true;
790 if (DEBUGLEVEL >= 10) {
791 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, r);
794 push = ndr_push_init_ctx(r, NULL);
795 if (push == NULL) {
796 talloc_free(r);
797 return false;
800 ndr_err = call->ndr_push(push, NDR_OUT, r);
801 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
802 talloc_free(r);
803 return false;
806 blob = ndr_push_blob(push);
807 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
808 talloc_free(r);
809 return false;
812 talloc_free(r);
814 return true;
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;
823 DATA_BLOB blob;
824 struct spoolss_EnumPrinterDrivers *r;
826 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDRIVERS];
828 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDrivers);
829 if (r == NULL) {
830 return false;
833 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
834 talloc_free(r);
835 return false;
838 pull = ndr_pull_init_blob(&blob, r, NULL);
839 if (pull == NULL) {
840 talloc_free(r);
841 return false;
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)) {
847 talloc_free(r);
848 return false;
851 if (DEBUGLEVEL >= 10) {
852 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, r);
855 ZERO_STRUCT(r->out);
856 r->out.count = talloc_zero(r, uint32_t);
857 if (r->out.count == NULL) {
858 talloc_free(r);
859 return false;
862 r->out.info = talloc_zero(r, union spoolss_DriverInfo *);
863 if (r->out.info == NULL) {
864 talloc_free(r);
865 return false;
868 r->out.needed = talloc_zero(r, uint32_t);
869 if (r->out.needed == NULL) {
870 talloc_free(r);
871 return false;
874 r->out.result = _spoolss_EnumPrinterDrivers(p, r);
876 if (p->rng_fault_state) {
877 talloc_free(r);
878 /* Return true here, srv_pipe_hnd.c will take care */
879 return true;
882 if (DEBUGLEVEL >= 10) {
883 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, r);
886 push = ndr_push_init_ctx(r, NULL);
887 if (push == NULL) {
888 talloc_free(r);
889 return false;
892 ndr_err = call->ndr_push(push, NDR_OUT, r);
893 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
894 talloc_free(r);
895 return false;
898 blob = ndr_push_blob(push);
899 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
900 talloc_free(r);
901 return false;
904 talloc_free(r);
906 return true;
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;
915 DATA_BLOB blob;
916 struct spoolss_GetPrinterDriver *r;
918 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER];
920 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver);
921 if (r == NULL) {
922 return false;
925 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
926 talloc_free(r);
927 return false;
930 pull = ndr_pull_init_blob(&blob, r, NULL);
931 if (pull == NULL) {
932 talloc_free(r);
933 return false;
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)) {
939 talloc_free(r);
940 return false;
943 if (DEBUGLEVEL >= 10) {
944 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, r);
947 ZERO_STRUCT(r->out);
948 r->out.info = talloc_zero(r, union spoolss_DriverInfo);
949 if (r->out.info == NULL) {
950 talloc_free(r);
951 return false;
954 r->out.needed = talloc_zero(r, uint32_t);
955 if (r->out.needed == NULL) {
956 talloc_free(r);
957 return false;
960 r->out.result = _spoolss_GetPrinterDriver(p, r);
962 if (p->rng_fault_state) {
963 talloc_free(r);
964 /* Return true here, srv_pipe_hnd.c will take care */
965 return true;
968 if (DEBUGLEVEL >= 10) {
969 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, r);
972 push = ndr_push_init_ctx(r, NULL);
973 if (push == NULL) {
974 talloc_free(r);
975 return false;
978 ndr_err = call->ndr_push(push, NDR_OUT, r);
979 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
980 talloc_free(r);
981 return false;
984 blob = ndr_push_blob(push);
985 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
986 talloc_free(r);
987 return false;
990 talloc_free(r);
992 return true;
995 static bool api_spoolss_GetPrinterDriverDirectory(pipes_struct *p)
997 const struct ndr_interface_call *call;
998 struct ndr_pull *pull;
999 struct ndr_push *push;
1000 enum ndr_err_code ndr_err;
1001 DATA_BLOB blob;
1002 struct spoolss_GetPrinterDriverDirectory *r;
1004 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY];
1006 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriverDirectory);
1007 if (r == NULL) {
1008 return false;
1011 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1012 talloc_free(r);
1013 return false;
1016 pull = ndr_pull_init_blob(&blob, r, NULL);
1017 if (pull == NULL) {
1018 talloc_free(r);
1019 return false;
1022 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1023 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1024 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1025 talloc_free(r);
1026 return false;
1029 if (DEBUGLEVEL >= 10) {
1030 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, r);
1033 ZERO_STRUCT(r->out);
1034 r->out.info = talloc_zero(r, union spoolss_DriverDirectoryInfo);
1035 if (r->out.info == NULL) {
1036 talloc_free(r);
1037 return false;
1040 r->out.needed = talloc_zero(r, uint32_t);
1041 if (r->out.needed == NULL) {
1042 talloc_free(r);
1043 return false;
1046 r->out.result = _spoolss_GetPrinterDriverDirectory(p, r);
1048 if (p->rng_fault_state) {
1049 talloc_free(r);
1050 /* Return true here, srv_pipe_hnd.c will take care */
1051 return true;
1054 if (DEBUGLEVEL >= 10) {
1055 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, r);
1058 push = ndr_push_init_ctx(r, NULL);
1059 if (push == NULL) {
1060 talloc_free(r);
1061 return false;
1064 ndr_err = call->ndr_push(push, NDR_OUT, r);
1065 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1066 talloc_free(r);
1067 return false;
1070 blob = ndr_push_blob(push);
1071 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1072 talloc_free(r);
1073 return false;
1076 talloc_free(r);
1078 return true;
1081 static bool api_spoolss_DeletePrinterDriver(pipes_struct *p)
1083 const struct ndr_interface_call *call;
1084 struct ndr_pull *pull;
1085 struct ndr_push *push;
1086 enum ndr_err_code ndr_err;
1087 DATA_BLOB blob;
1088 struct spoolss_DeletePrinterDriver *r;
1090 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVER];
1092 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriver);
1093 if (r == NULL) {
1094 return false;
1097 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1098 talloc_free(r);
1099 return false;
1102 pull = ndr_pull_init_blob(&blob, r, NULL);
1103 if (pull == NULL) {
1104 talloc_free(r);
1105 return false;
1108 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1109 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1110 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1111 talloc_free(r);
1112 return false;
1115 if (DEBUGLEVEL >= 10) {
1116 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, r);
1119 r->out.result = _spoolss_DeletePrinterDriver(p, r);
1121 if (p->rng_fault_state) {
1122 talloc_free(r);
1123 /* Return true here, srv_pipe_hnd.c will take care */
1124 return true;
1127 if (DEBUGLEVEL >= 10) {
1128 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, r);
1131 push = ndr_push_init_ctx(r, NULL);
1132 if (push == NULL) {
1133 talloc_free(r);
1134 return false;
1137 ndr_err = call->ndr_push(push, NDR_OUT, r);
1138 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1139 talloc_free(r);
1140 return false;
1143 blob = ndr_push_blob(push);
1144 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1145 talloc_free(r);
1146 return false;
1149 talloc_free(r);
1151 return true;
1154 static bool api_spoolss_AddPrintProcessor(pipes_struct *p)
1156 const struct ndr_interface_call *call;
1157 struct ndr_pull *pull;
1158 struct ndr_push *push;
1159 enum ndr_err_code ndr_err;
1160 DATA_BLOB blob;
1161 struct spoolss_AddPrintProcessor *r;
1163 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROCESSOR];
1165 r = talloc(talloc_tos(), struct spoolss_AddPrintProcessor);
1166 if (r == NULL) {
1167 return false;
1170 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1171 talloc_free(r);
1172 return false;
1175 pull = ndr_pull_init_blob(&blob, r, NULL);
1176 if (pull == NULL) {
1177 talloc_free(r);
1178 return false;
1181 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1182 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1183 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1184 talloc_free(r);
1185 return false;
1188 if (DEBUGLEVEL >= 10) {
1189 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, r);
1192 r->out.result = _spoolss_AddPrintProcessor(p, r);
1194 if (p->rng_fault_state) {
1195 talloc_free(r);
1196 /* Return true here, srv_pipe_hnd.c will take care */
1197 return true;
1200 if (DEBUGLEVEL >= 10) {
1201 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, r);
1204 push = ndr_push_init_ctx(r, NULL);
1205 if (push == NULL) {
1206 talloc_free(r);
1207 return false;
1210 ndr_err = call->ndr_push(push, NDR_OUT, r);
1211 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1212 talloc_free(r);
1213 return false;
1216 blob = ndr_push_blob(push);
1217 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1218 talloc_free(r);
1219 return false;
1222 talloc_free(r);
1224 return true;
1227 static bool api_spoolss_EnumPrintProcessors(pipes_struct *p)
1229 const struct ndr_interface_call *call;
1230 struct ndr_pull *pull;
1231 struct ndr_push *push;
1232 enum ndr_err_code ndr_err;
1233 DATA_BLOB blob;
1234 struct spoolss_EnumPrintProcessors *r;
1236 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCESSORS];
1238 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcessors);
1239 if (r == NULL) {
1240 return false;
1243 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1244 talloc_free(r);
1245 return false;
1248 pull = ndr_pull_init_blob(&blob, r, NULL);
1249 if (pull == NULL) {
1250 talloc_free(r);
1251 return false;
1254 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1255 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1256 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1257 talloc_free(r);
1258 return false;
1261 if (DEBUGLEVEL >= 10) {
1262 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, r);
1265 ZERO_STRUCT(r->out);
1266 r->out.count = talloc_zero(r, uint32_t);
1267 if (r->out.count == NULL) {
1268 talloc_free(r);
1269 return false;
1272 r->out.info = talloc_zero(r, union spoolss_PrintProcessorInfo *);
1273 if (r->out.info == NULL) {
1274 talloc_free(r);
1275 return false;
1278 r->out.needed = talloc_zero(r, uint32_t);
1279 if (r->out.needed == NULL) {
1280 talloc_free(r);
1281 return false;
1284 r->out.result = _spoolss_EnumPrintProcessors(p, r);
1286 if (p->rng_fault_state) {
1287 talloc_free(r);
1288 /* Return true here, srv_pipe_hnd.c will take care */
1289 return true;
1292 if (DEBUGLEVEL >= 10) {
1293 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, r);
1296 push = ndr_push_init_ctx(r, NULL);
1297 if (push == NULL) {
1298 talloc_free(r);
1299 return false;
1302 ndr_err = call->ndr_push(push, NDR_OUT, r);
1303 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1304 talloc_free(r);
1305 return false;
1308 blob = ndr_push_blob(push);
1309 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1310 talloc_free(r);
1311 return false;
1314 talloc_free(r);
1316 return true;
1319 static bool api_spoolss_GetPrintProcessorDirectory(pipes_struct *p)
1321 const struct ndr_interface_call *call;
1322 struct ndr_pull *pull;
1323 struct ndr_push *push;
1324 enum ndr_err_code ndr_err;
1325 DATA_BLOB blob;
1326 struct spoolss_GetPrintProcessorDirectory *r;
1328 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY];
1330 r = talloc(talloc_tos(), struct spoolss_GetPrintProcessorDirectory);
1331 if (r == NULL) {
1332 return false;
1335 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1336 talloc_free(r);
1337 return false;
1340 pull = ndr_pull_init_blob(&blob, r, NULL);
1341 if (pull == NULL) {
1342 talloc_free(r);
1343 return false;
1346 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1347 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1348 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1349 talloc_free(r);
1350 return false;
1353 if (DEBUGLEVEL >= 10) {
1354 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1357 ZERO_STRUCT(r->out);
1358 r->out.info = talloc_zero(r, union spoolss_PrintProcessorDirectoryInfo);
1359 if (r->out.info == NULL) {
1360 talloc_free(r);
1361 return false;
1364 r->out.needed = talloc_zero(r, uint32_t);
1365 if (r->out.needed == NULL) {
1366 talloc_free(r);
1367 return false;
1370 r->out.result = _spoolss_GetPrintProcessorDirectory(p, r);
1372 if (p->rng_fault_state) {
1373 talloc_free(r);
1374 /* Return true here, srv_pipe_hnd.c will take care */
1375 return true;
1378 if (DEBUGLEVEL >= 10) {
1379 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1382 push = ndr_push_init_ctx(r, NULL);
1383 if (push == NULL) {
1384 talloc_free(r);
1385 return false;
1388 ndr_err = call->ndr_push(push, NDR_OUT, r);
1389 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1390 talloc_free(r);
1391 return false;
1394 blob = ndr_push_blob(push);
1395 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1396 talloc_free(r);
1397 return false;
1400 talloc_free(r);
1402 return true;
1405 static bool api_spoolss_StartDocPrinter(pipes_struct *p)
1407 const struct ndr_interface_call *call;
1408 struct ndr_pull *pull;
1409 struct ndr_push *push;
1410 enum ndr_err_code ndr_err;
1411 DATA_BLOB blob;
1412 struct spoolss_StartDocPrinter *r;
1414 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTDOCPRINTER];
1416 r = talloc(talloc_tos(), struct spoolss_StartDocPrinter);
1417 if (r == NULL) {
1418 return false;
1421 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1422 talloc_free(r);
1423 return false;
1426 pull = ndr_pull_init_blob(&blob, r, NULL);
1427 if (pull == NULL) {
1428 talloc_free(r);
1429 return false;
1432 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1433 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1434 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1435 talloc_free(r);
1436 return false;
1439 if (DEBUGLEVEL >= 10) {
1440 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, r);
1443 ZERO_STRUCT(r->out);
1444 r->out.job_id = talloc_zero(r, uint32_t);
1445 if (r->out.job_id == NULL) {
1446 talloc_free(r);
1447 return false;
1450 r->out.result = _spoolss_StartDocPrinter(p, r);
1452 if (p->rng_fault_state) {
1453 talloc_free(r);
1454 /* Return true here, srv_pipe_hnd.c will take care */
1455 return true;
1458 if (DEBUGLEVEL >= 10) {
1459 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, r);
1462 push = ndr_push_init_ctx(r, NULL);
1463 if (push == NULL) {
1464 talloc_free(r);
1465 return false;
1468 ndr_err = call->ndr_push(push, NDR_OUT, r);
1469 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1470 talloc_free(r);
1471 return false;
1474 blob = ndr_push_blob(push);
1475 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1476 talloc_free(r);
1477 return false;
1480 talloc_free(r);
1482 return true;
1485 static bool api_spoolss_StartPagePrinter(pipes_struct *p)
1487 const struct ndr_interface_call *call;
1488 struct ndr_pull *pull;
1489 struct ndr_push *push;
1490 enum ndr_err_code ndr_err;
1491 DATA_BLOB blob;
1492 struct spoolss_StartPagePrinter *r;
1494 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTPAGEPRINTER];
1496 r = talloc(talloc_tos(), struct spoolss_StartPagePrinter);
1497 if (r == NULL) {
1498 return false;
1501 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1502 talloc_free(r);
1503 return false;
1506 pull = ndr_pull_init_blob(&blob, r, NULL);
1507 if (pull == NULL) {
1508 talloc_free(r);
1509 return false;
1512 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1513 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1514 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1515 talloc_free(r);
1516 return false;
1519 if (DEBUGLEVEL >= 10) {
1520 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, r);
1523 r->out.result = _spoolss_StartPagePrinter(p, r);
1525 if (p->rng_fault_state) {
1526 talloc_free(r);
1527 /* Return true here, srv_pipe_hnd.c will take care */
1528 return true;
1531 if (DEBUGLEVEL >= 10) {
1532 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, r);
1535 push = ndr_push_init_ctx(r, NULL);
1536 if (push == NULL) {
1537 talloc_free(r);
1538 return false;
1541 ndr_err = call->ndr_push(push, NDR_OUT, r);
1542 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1543 talloc_free(r);
1544 return false;
1547 blob = ndr_push_blob(push);
1548 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1549 talloc_free(r);
1550 return false;
1553 talloc_free(r);
1555 return true;
1558 static bool api_spoolss_WritePrinter(pipes_struct *p)
1560 const struct ndr_interface_call *call;
1561 struct ndr_pull *pull;
1562 struct ndr_push *push;
1563 enum ndr_err_code ndr_err;
1564 DATA_BLOB blob;
1565 struct spoolss_WritePrinter *r;
1567 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WRITEPRINTER];
1569 r = talloc(talloc_tos(), struct spoolss_WritePrinter);
1570 if (r == NULL) {
1571 return false;
1574 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1575 talloc_free(r);
1576 return false;
1579 pull = ndr_pull_init_blob(&blob, r, NULL);
1580 if (pull == NULL) {
1581 talloc_free(r);
1582 return false;
1585 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1586 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1587 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1588 talloc_free(r);
1589 return false;
1592 if (DEBUGLEVEL >= 10) {
1593 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, r);
1596 ZERO_STRUCT(r->out);
1597 r->out.num_written = talloc_zero(r, uint32_t);
1598 if (r->out.num_written == NULL) {
1599 talloc_free(r);
1600 return false;
1603 r->out.result = _spoolss_WritePrinter(p, r);
1605 if (p->rng_fault_state) {
1606 talloc_free(r);
1607 /* Return true here, srv_pipe_hnd.c will take care */
1608 return true;
1611 if (DEBUGLEVEL >= 10) {
1612 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, r);
1615 push = ndr_push_init_ctx(r, NULL);
1616 if (push == NULL) {
1617 talloc_free(r);
1618 return false;
1621 ndr_err = call->ndr_push(push, NDR_OUT, r);
1622 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1623 talloc_free(r);
1624 return false;
1627 blob = ndr_push_blob(push);
1628 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1629 talloc_free(r);
1630 return false;
1633 talloc_free(r);
1635 return true;
1638 static bool api_spoolss_EndPagePrinter(pipes_struct *p)
1640 const struct ndr_interface_call *call;
1641 struct ndr_pull *pull;
1642 struct ndr_push *push;
1643 enum ndr_err_code ndr_err;
1644 DATA_BLOB blob;
1645 struct spoolss_EndPagePrinter *r;
1647 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDPAGEPRINTER];
1649 r = talloc(talloc_tos(), struct spoolss_EndPagePrinter);
1650 if (r == NULL) {
1651 return false;
1654 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1655 talloc_free(r);
1656 return false;
1659 pull = ndr_pull_init_blob(&blob, r, NULL);
1660 if (pull == NULL) {
1661 talloc_free(r);
1662 return false;
1665 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1666 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1667 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1668 talloc_free(r);
1669 return false;
1672 if (DEBUGLEVEL >= 10) {
1673 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, r);
1676 r->out.result = _spoolss_EndPagePrinter(p, r);
1678 if (p->rng_fault_state) {
1679 talloc_free(r);
1680 /* Return true here, srv_pipe_hnd.c will take care */
1681 return true;
1684 if (DEBUGLEVEL >= 10) {
1685 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, r);
1688 push = ndr_push_init_ctx(r, NULL);
1689 if (push == NULL) {
1690 talloc_free(r);
1691 return false;
1694 ndr_err = call->ndr_push(push, NDR_OUT, r);
1695 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1696 talloc_free(r);
1697 return false;
1700 blob = ndr_push_blob(push);
1701 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1702 talloc_free(r);
1703 return false;
1706 talloc_free(r);
1708 return true;
1711 static bool api_spoolss_AbortPrinter(pipes_struct *p)
1713 const struct ndr_interface_call *call;
1714 struct ndr_pull *pull;
1715 struct ndr_push *push;
1716 enum ndr_err_code ndr_err;
1717 DATA_BLOB blob;
1718 struct spoolss_AbortPrinter *r;
1720 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ABORTPRINTER];
1722 r = talloc(talloc_tos(), struct spoolss_AbortPrinter);
1723 if (r == NULL) {
1724 return false;
1727 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1728 talloc_free(r);
1729 return false;
1732 pull = ndr_pull_init_blob(&blob, r, NULL);
1733 if (pull == NULL) {
1734 talloc_free(r);
1735 return false;
1738 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1739 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1740 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1741 talloc_free(r);
1742 return false;
1745 if (DEBUGLEVEL >= 10) {
1746 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, r);
1749 r->out.result = _spoolss_AbortPrinter(p, r);
1751 if (p->rng_fault_state) {
1752 talloc_free(r);
1753 /* Return true here, srv_pipe_hnd.c will take care */
1754 return true;
1757 if (DEBUGLEVEL >= 10) {
1758 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, r);
1761 push = ndr_push_init_ctx(r, NULL);
1762 if (push == NULL) {
1763 talloc_free(r);
1764 return false;
1767 ndr_err = call->ndr_push(push, NDR_OUT, r);
1768 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1769 talloc_free(r);
1770 return false;
1773 blob = ndr_push_blob(push);
1774 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1775 talloc_free(r);
1776 return false;
1779 talloc_free(r);
1781 return true;
1784 static bool api_spoolss_ReadPrinter(pipes_struct *p)
1786 const struct ndr_interface_call *call;
1787 struct ndr_pull *pull;
1788 struct ndr_push *push;
1789 enum ndr_err_code ndr_err;
1790 DATA_BLOB blob;
1791 struct spoolss_ReadPrinter *r;
1793 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_READPRINTER];
1795 r = talloc(talloc_tos(), struct spoolss_ReadPrinter);
1796 if (r == NULL) {
1797 return false;
1800 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1801 talloc_free(r);
1802 return false;
1805 pull = ndr_pull_init_blob(&blob, r, NULL);
1806 if (pull == NULL) {
1807 talloc_free(r);
1808 return false;
1811 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1812 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1813 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1814 talloc_free(r);
1815 return false;
1818 if (DEBUGLEVEL >= 10) {
1819 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, r);
1822 ZERO_STRUCT(r->out);
1823 r->out.data = talloc_zero_array(r, uint8_t, r->in.data_size);
1824 if (r->out.data == NULL) {
1825 talloc_free(r);
1826 return false;
1829 r->out._data_size = talloc_zero(r, uint32_t);
1830 if (r->out._data_size == NULL) {
1831 talloc_free(r);
1832 return false;
1835 r->out.result = _spoolss_ReadPrinter(p, r);
1837 if (p->rng_fault_state) {
1838 talloc_free(r);
1839 /* Return true here, srv_pipe_hnd.c will take care */
1840 return true;
1843 if (DEBUGLEVEL >= 10) {
1844 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, r);
1847 push = ndr_push_init_ctx(r, NULL);
1848 if (push == NULL) {
1849 talloc_free(r);
1850 return false;
1853 ndr_err = call->ndr_push(push, NDR_OUT, r);
1854 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1855 talloc_free(r);
1856 return false;
1859 blob = ndr_push_blob(push);
1860 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1861 talloc_free(r);
1862 return false;
1865 talloc_free(r);
1867 return true;
1870 static bool api_spoolss_EndDocPrinter(pipes_struct *p)
1872 const struct ndr_interface_call *call;
1873 struct ndr_pull *pull;
1874 struct ndr_push *push;
1875 enum ndr_err_code ndr_err;
1876 DATA_BLOB blob;
1877 struct spoolss_EndDocPrinter *r;
1879 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDDOCPRINTER];
1881 r = talloc(talloc_tos(), struct spoolss_EndDocPrinter);
1882 if (r == NULL) {
1883 return false;
1886 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1887 talloc_free(r);
1888 return false;
1891 pull = ndr_pull_init_blob(&blob, r, NULL);
1892 if (pull == NULL) {
1893 talloc_free(r);
1894 return false;
1897 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1898 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1899 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1900 talloc_free(r);
1901 return false;
1904 if (DEBUGLEVEL >= 10) {
1905 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, r);
1908 r->out.result = _spoolss_EndDocPrinter(p, r);
1910 if (p->rng_fault_state) {
1911 talloc_free(r);
1912 /* Return true here, srv_pipe_hnd.c will take care */
1913 return true;
1916 if (DEBUGLEVEL >= 10) {
1917 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, r);
1920 push = ndr_push_init_ctx(r, NULL);
1921 if (push == NULL) {
1922 talloc_free(r);
1923 return false;
1926 ndr_err = call->ndr_push(push, NDR_OUT, r);
1927 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1928 talloc_free(r);
1929 return false;
1932 blob = ndr_push_blob(push);
1933 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1934 talloc_free(r);
1935 return false;
1938 talloc_free(r);
1940 return true;
1943 static bool api_spoolss_AddJob(pipes_struct *p)
1945 const struct ndr_interface_call *call;
1946 struct ndr_pull *pull;
1947 struct ndr_push *push;
1948 enum ndr_err_code ndr_err;
1949 DATA_BLOB blob;
1950 struct spoolss_AddJob *r;
1952 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDJOB];
1954 r = talloc(talloc_tos(), struct spoolss_AddJob);
1955 if (r == NULL) {
1956 return false;
1959 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1960 talloc_free(r);
1961 return false;
1964 pull = ndr_pull_init_blob(&blob, r, NULL);
1965 if (pull == NULL) {
1966 talloc_free(r);
1967 return false;
1970 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1971 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1972 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1973 talloc_free(r);
1974 return false;
1977 if (DEBUGLEVEL >= 10) {
1978 NDR_PRINT_IN_DEBUG(spoolss_AddJob, r);
1981 ZERO_STRUCT(r->out);
1982 r->out.buffer = r->in.buffer;
1983 r->out.needed = talloc_zero(r, uint32_t);
1984 if (r->out.needed == NULL) {
1985 talloc_free(r);
1986 return false;
1989 r->out.result = _spoolss_AddJob(p, r);
1991 if (p->rng_fault_state) {
1992 talloc_free(r);
1993 /* Return true here, srv_pipe_hnd.c will take care */
1994 return true;
1997 if (DEBUGLEVEL >= 10) {
1998 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, r);
2001 push = ndr_push_init_ctx(r, NULL);
2002 if (push == NULL) {
2003 talloc_free(r);
2004 return false;
2007 ndr_err = call->ndr_push(push, NDR_OUT, r);
2008 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2009 talloc_free(r);
2010 return false;
2013 blob = ndr_push_blob(push);
2014 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2015 talloc_free(r);
2016 return false;
2019 talloc_free(r);
2021 return true;
2024 static bool api_spoolss_ScheduleJob(pipes_struct *p)
2026 const struct ndr_interface_call *call;
2027 struct ndr_pull *pull;
2028 struct ndr_push *push;
2029 enum ndr_err_code ndr_err;
2030 DATA_BLOB blob;
2031 struct spoolss_ScheduleJob *r;
2033 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SCHEDULEJOB];
2035 r = talloc(talloc_tos(), struct spoolss_ScheduleJob);
2036 if (r == NULL) {
2037 return false;
2040 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2041 talloc_free(r);
2042 return false;
2045 pull = ndr_pull_init_blob(&blob, r, NULL);
2046 if (pull == NULL) {
2047 talloc_free(r);
2048 return false;
2051 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2052 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2053 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2054 talloc_free(r);
2055 return false;
2058 if (DEBUGLEVEL >= 10) {
2059 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, r);
2062 r->out.result = _spoolss_ScheduleJob(p, r);
2064 if (p->rng_fault_state) {
2065 talloc_free(r);
2066 /* Return true here, srv_pipe_hnd.c will take care */
2067 return true;
2070 if (DEBUGLEVEL >= 10) {
2071 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, r);
2074 push = ndr_push_init_ctx(r, NULL);
2075 if (push == NULL) {
2076 talloc_free(r);
2077 return false;
2080 ndr_err = call->ndr_push(push, NDR_OUT, r);
2081 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2082 talloc_free(r);
2083 return false;
2086 blob = ndr_push_blob(push);
2087 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2088 talloc_free(r);
2089 return false;
2092 talloc_free(r);
2094 return true;
2097 static bool api_spoolss_GetPrinterData(pipes_struct *p)
2099 const struct ndr_interface_call *call;
2100 struct ndr_pull *pull;
2101 struct ndr_push *push;
2102 enum ndr_err_code ndr_err;
2103 DATA_BLOB blob;
2104 struct spoolss_GetPrinterData *r;
2106 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATA];
2108 r = talloc(talloc_tos(), struct spoolss_GetPrinterData);
2109 if (r == NULL) {
2110 return false;
2113 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2114 talloc_free(r);
2115 return false;
2118 pull = ndr_pull_init_blob(&blob, r, NULL);
2119 if (pull == NULL) {
2120 talloc_free(r);
2121 return false;
2124 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2125 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2126 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2127 talloc_free(r);
2128 return false;
2131 if (DEBUGLEVEL >= 10) {
2132 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, r);
2135 ZERO_STRUCT(r->out);
2136 r->out.type = talloc_zero(r, enum winreg_Type);
2137 if (r->out.type == NULL) {
2138 talloc_free(r);
2139 return false;
2142 r->out.data = talloc_zero(r, union spoolss_PrinterData);
2143 if (r->out.data == NULL) {
2144 talloc_free(r);
2145 return false;
2148 r->out.needed = talloc_zero(r, uint32_t);
2149 if (r->out.needed == NULL) {
2150 talloc_free(r);
2151 return false;
2154 r->out.result = _spoolss_GetPrinterData(p, r);
2156 if (p->rng_fault_state) {
2157 talloc_free(r);
2158 /* Return true here, srv_pipe_hnd.c will take care */
2159 return true;
2162 if (DEBUGLEVEL >= 10) {
2163 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, r);
2166 push = ndr_push_init_ctx(r, NULL);
2167 if (push == NULL) {
2168 talloc_free(r);
2169 return false;
2172 ndr_err = call->ndr_push(push, NDR_OUT, r);
2173 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2174 talloc_free(r);
2175 return false;
2178 blob = ndr_push_blob(push);
2179 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2180 talloc_free(r);
2181 return false;
2184 talloc_free(r);
2186 return true;
2189 static bool api_spoolss_SetPrinterData(pipes_struct *p)
2191 const struct ndr_interface_call *call;
2192 struct ndr_pull *pull;
2193 struct ndr_push *push;
2194 enum ndr_err_code ndr_err;
2195 DATA_BLOB blob;
2196 struct spoolss_SetPrinterData *r;
2198 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATA];
2200 r = talloc(talloc_tos(), struct spoolss_SetPrinterData);
2201 if (r == NULL) {
2202 return false;
2205 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2206 talloc_free(r);
2207 return false;
2210 pull = ndr_pull_init_blob(&blob, r, NULL);
2211 if (pull == NULL) {
2212 talloc_free(r);
2213 return false;
2216 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2217 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2218 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2219 talloc_free(r);
2220 return false;
2223 if (DEBUGLEVEL >= 10) {
2224 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, r);
2227 r->out.result = _spoolss_SetPrinterData(p, r);
2229 if (p->rng_fault_state) {
2230 talloc_free(r);
2231 /* Return true here, srv_pipe_hnd.c will take care */
2232 return true;
2235 if (DEBUGLEVEL >= 10) {
2236 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, r);
2239 push = ndr_push_init_ctx(r, NULL);
2240 if (push == NULL) {
2241 talloc_free(r);
2242 return false;
2245 ndr_err = call->ndr_push(push, NDR_OUT, r);
2246 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2247 talloc_free(r);
2248 return false;
2251 blob = ndr_push_blob(push);
2252 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2253 talloc_free(r);
2254 return false;
2257 talloc_free(r);
2259 return true;
2262 static bool api_spoolss_WaitForPrinterChange(pipes_struct *p)
2264 const struct ndr_interface_call *call;
2265 struct ndr_pull *pull;
2266 struct ndr_push *push;
2267 enum ndr_err_code ndr_err;
2268 DATA_BLOB blob;
2269 struct spoolss_WaitForPrinterChange *r;
2271 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WAITFORPRINTERCHANGE];
2273 r = talloc(talloc_tos(), struct spoolss_WaitForPrinterChange);
2274 if (r == NULL) {
2275 return false;
2278 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2279 talloc_free(r);
2280 return false;
2283 pull = ndr_pull_init_blob(&blob, r, NULL);
2284 if (pull == NULL) {
2285 talloc_free(r);
2286 return false;
2289 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2290 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2291 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2292 talloc_free(r);
2293 return false;
2296 if (DEBUGLEVEL >= 10) {
2297 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, r);
2300 r->out.result = _spoolss_WaitForPrinterChange(p, r);
2302 if (p->rng_fault_state) {
2303 talloc_free(r);
2304 /* Return true here, srv_pipe_hnd.c will take care */
2305 return true;
2308 if (DEBUGLEVEL >= 10) {
2309 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, r);
2312 push = ndr_push_init_ctx(r, NULL);
2313 if (push == NULL) {
2314 talloc_free(r);
2315 return false;
2318 ndr_err = call->ndr_push(push, NDR_OUT, r);
2319 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2320 talloc_free(r);
2321 return false;
2324 blob = ndr_push_blob(push);
2325 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2326 talloc_free(r);
2327 return false;
2330 talloc_free(r);
2332 return true;
2335 static bool api_spoolss_ClosePrinter(pipes_struct *p)
2337 const struct ndr_interface_call *call;
2338 struct ndr_pull *pull;
2339 struct ndr_push *push;
2340 enum ndr_err_code ndr_err;
2341 DATA_BLOB blob;
2342 struct spoolss_ClosePrinter *r;
2344 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CLOSEPRINTER];
2346 r = talloc(talloc_tos(), struct spoolss_ClosePrinter);
2347 if (r == NULL) {
2348 return false;
2351 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2352 talloc_free(r);
2353 return false;
2356 pull = ndr_pull_init_blob(&blob, r, NULL);
2357 if (pull == NULL) {
2358 talloc_free(r);
2359 return false;
2362 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2363 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2364 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2365 talloc_free(r);
2366 return false;
2369 if (DEBUGLEVEL >= 10) {
2370 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, r);
2373 ZERO_STRUCT(r->out);
2374 r->out.handle = r->in.handle;
2375 r->out.result = _spoolss_ClosePrinter(p, r);
2377 if (p->rng_fault_state) {
2378 talloc_free(r);
2379 /* Return true here, srv_pipe_hnd.c will take care */
2380 return true;
2383 if (DEBUGLEVEL >= 10) {
2384 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, r);
2387 push = ndr_push_init_ctx(r, NULL);
2388 if (push == NULL) {
2389 talloc_free(r);
2390 return false;
2393 ndr_err = call->ndr_push(push, NDR_OUT, r);
2394 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2395 talloc_free(r);
2396 return false;
2399 blob = ndr_push_blob(push);
2400 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2401 talloc_free(r);
2402 return false;
2405 talloc_free(r);
2407 return true;
2410 static bool api_spoolss_AddForm(pipes_struct *p)
2412 const struct ndr_interface_call *call;
2413 struct ndr_pull *pull;
2414 struct ndr_push *push;
2415 enum ndr_err_code ndr_err;
2416 DATA_BLOB blob;
2417 struct spoolss_AddForm *r;
2419 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDFORM];
2421 r = talloc(talloc_tos(), struct spoolss_AddForm);
2422 if (r == NULL) {
2423 return false;
2426 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2427 talloc_free(r);
2428 return false;
2431 pull = ndr_pull_init_blob(&blob, r, NULL);
2432 if (pull == NULL) {
2433 talloc_free(r);
2434 return false;
2437 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2438 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2439 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2440 talloc_free(r);
2441 return false;
2444 if (DEBUGLEVEL >= 10) {
2445 NDR_PRINT_IN_DEBUG(spoolss_AddForm, r);
2448 r->out.result = _spoolss_AddForm(p, r);
2450 if (p->rng_fault_state) {
2451 talloc_free(r);
2452 /* Return true here, srv_pipe_hnd.c will take care */
2453 return true;
2456 if (DEBUGLEVEL >= 10) {
2457 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, r);
2460 push = ndr_push_init_ctx(r, NULL);
2461 if (push == NULL) {
2462 talloc_free(r);
2463 return false;
2466 ndr_err = call->ndr_push(push, NDR_OUT, r);
2467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2468 talloc_free(r);
2469 return false;
2472 blob = ndr_push_blob(push);
2473 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2474 talloc_free(r);
2475 return false;
2478 talloc_free(r);
2480 return true;
2483 static bool api_spoolss_DeleteForm(pipes_struct *p)
2485 const struct ndr_interface_call *call;
2486 struct ndr_pull *pull;
2487 struct ndr_push *push;
2488 enum ndr_err_code ndr_err;
2489 DATA_BLOB blob;
2490 struct spoolss_DeleteForm *r;
2492 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEFORM];
2494 r = talloc(talloc_tos(), struct spoolss_DeleteForm);
2495 if (r == NULL) {
2496 return false;
2499 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2500 talloc_free(r);
2501 return false;
2504 pull = ndr_pull_init_blob(&blob, r, NULL);
2505 if (pull == NULL) {
2506 talloc_free(r);
2507 return false;
2510 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2511 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2513 talloc_free(r);
2514 return false;
2517 if (DEBUGLEVEL >= 10) {
2518 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, r);
2521 r->out.result = _spoolss_DeleteForm(p, r);
2523 if (p->rng_fault_state) {
2524 talloc_free(r);
2525 /* Return true here, srv_pipe_hnd.c will take care */
2526 return true;
2529 if (DEBUGLEVEL >= 10) {
2530 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, r);
2533 push = ndr_push_init_ctx(r, NULL);
2534 if (push == NULL) {
2535 talloc_free(r);
2536 return false;
2539 ndr_err = call->ndr_push(push, NDR_OUT, r);
2540 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2541 talloc_free(r);
2542 return false;
2545 blob = ndr_push_blob(push);
2546 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2547 talloc_free(r);
2548 return false;
2551 talloc_free(r);
2553 return true;
2556 static bool api_spoolss_GetForm(pipes_struct *p)
2558 const struct ndr_interface_call *call;
2559 struct ndr_pull *pull;
2560 struct ndr_push *push;
2561 enum ndr_err_code ndr_err;
2562 DATA_BLOB blob;
2563 struct spoolss_GetForm *r;
2565 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETFORM];
2567 r = talloc(talloc_tos(), struct spoolss_GetForm);
2568 if (r == NULL) {
2569 return false;
2572 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2573 talloc_free(r);
2574 return false;
2577 pull = ndr_pull_init_blob(&blob, r, NULL);
2578 if (pull == NULL) {
2579 talloc_free(r);
2580 return false;
2583 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2584 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2585 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2586 talloc_free(r);
2587 return false;
2590 if (DEBUGLEVEL >= 10) {
2591 NDR_PRINT_IN_DEBUG(spoolss_GetForm, r);
2594 ZERO_STRUCT(r->out);
2595 r->out.info = talloc_zero(r, union spoolss_FormInfo);
2596 if (r->out.info == NULL) {
2597 talloc_free(r);
2598 return false;
2601 r->out.needed = talloc_zero(r, uint32_t);
2602 if (r->out.needed == NULL) {
2603 talloc_free(r);
2604 return false;
2607 r->out.result = _spoolss_GetForm(p, r);
2609 if (p->rng_fault_state) {
2610 talloc_free(r);
2611 /* Return true here, srv_pipe_hnd.c will take care */
2612 return true;
2615 if (DEBUGLEVEL >= 10) {
2616 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, r);
2619 push = ndr_push_init_ctx(r, NULL);
2620 if (push == NULL) {
2621 talloc_free(r);
2622 return false;
2625 ndr_err = call->ndr_push(push, NDR_OUT, r);
2626 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2627 talloc_free(r);
2628 return false;
2631 blob = ndr_push_blob(push);
2632 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2633 talloc_free(r);
2634 return false;
2637 talloc_free(r);
2639 return true;
2642 static bool api_spoolss_SetForm(pipes_struct *p)
2644 const struct ndr_interface_call *call;
2645 struct ndr_pull *pull;
2646 struct ndr_push *push;
2647 enum ndr_err_code ndr_err;
2648 DATA_BLOB blob;
2649 struct spoolss_SetForm *r;
2651 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETFORM];
2653 r = talloc(talloc_tos(), struct spoolss_SetForm);
2654 if (r == NULL) {
2655 return false;
2658 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2659 talloc_free(r);
2660 return false;
2663 pull = ndr_pull_init_blob(&blob, r, NULL);
2664 if (pull == NULL) {
2665 talloc_free(r);
2666 return false;
2669 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2670 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2671 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2672 talloc_free(r);
2673 return false;
2676 if (DEBUGLEVEL >= 10) {
2677 NDR_PRINT_IN_DEBUG(spoolss_SetForm, r);
2680 r->out.result = _spoolss_SetForm(p, r);
2682 if (p->rng_fault_state) {
2683 talloc_free(r);
2684 /* Return true here, srv_pipe_hnd.c will take care */
2685 return true;
2688 if (DEBUGLEVEL >= 10) {
2689 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, r);
2692 push = ndr_push_init_ctx(r, NULL);
2693 if (push == NULL) {
2694 talloc_free(r);
2695 return false;
2698 ndr_err = call->ndr_push(push, NDR_OUT, r);
2699 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2700 talloc_free(r);
2701 return false;
2704 blob = ndr_push_blob(push);
2705 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2706 talloc_free(r);
2707 return false;
2710 talloc_free(r);
2712 return true;
2715 static bool api_spoolss_EnumForms(pipes_struct *p)
2717 const struct ndr_interface_call *call;
2718 struct ndr_pull *pull;
2719 struct ndr_push *push;
2720 enum ndr_err_code ndr_err;
2721 DATA_BLOB blob;
2722 struct spoolss_EnumForms *r;
2724 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMFORMS];
2726 r = talloc(talloc_tos(), struct spoolss_EnumForms);
2727 if (r == NULL) {
2728 return false;
2731 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2732 talloc_free(r);
2733 return false;
2736 pull = ndr_pull_init_blob(&blob, r, NULL);
2737 if (pull == NULL) {
2738 talloc_free(r);
2739 return false;
2742 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2743 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2744 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2745 talloc_free(r);
2746 return false;
2749 if (DEBUGLEVEL >= 10) {
2750 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, r);
2753 ZERO_STRUCT(r->out);
2754 r->out.count = talloc_zero(r, uint32_t);
2755 if (r->out.count == NULL) {
2756 talloc_free(r);
2757 return false;
2760 r->out.info = talloc_zero(r, union spoolss_FormInfo *);
2761 if (r->out.info == NULL) {
2762 talloc_free(r);
2763 return false;
2766 r->out.needed = talloc_zero(r, uint32_t);
2767 if (r->out.needed == NULL) {
2768 talloc_free(r);
2769 return false;
2772 r->out.result = _spoolss_EnumForms(p, r);
2774 if (p->rng_fault_state) {
2775 talloc_free(r);
2776 /* Return true here, srv_pipe_hnd.c will take care */
2777 return true;
2780 if (DEBUGLEVEL >= 10) {
2781 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, r);
2784 push = ndr_push_init_ctx(r, NULL);
2785 if (push == NULL) {
2786 talloc_free(r);
2787 return false;
2790 ndr_err = call->ndr_push(push, NDR_OUT, r);
2791 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2792 talloc_free(r);
2793 return false;
2796 blob = ndr_push_blob(push);
2797 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2798 talloc_free(r);
2799 return false;
2802 talloc_free(r);
2804 return true;
2807 static bool api_spoolss_EnumPorts(pipes_struct *p)
2809 const struct ndr_interface_call *call;
2810 struct ndr_pull *pull;
2811 struct ndr_push *push;
2812 enum ndr_err_code ndr_err;
2813 DATA_BLOB blob;
2814 struct spoolss_EnumPorts *r;
2816 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPORTS];
2818 r = talloc(talloc_tos(), struct spoolss_EnumPorts);
2819 if (r == NULL) {
2820 return false;
2823 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2824 talloc_free(r);
2825 return false;
2828 pull = ndr_pull_init_blob(&blob, r, NULL);
2829 if (pull == NULL) {
2830 talloc_free(r);
2831 return false;
2834 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2835 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2836 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2837 talloc_free(r);
2838 return false;
2841 if (DEBUGLEVEL >= 10) {
2842 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, r);
2845 ZERO_STRUCT(r->out);
2846 r->out.count = talloc_zero(r, uint32_t);
2847 if (r->out.count == NULL) {
2848 talloc_free(r);
2849 return false;
2852 r->out.info = talloc_zero(r, union spoolss_PortInfo *);
2853 if (r->out.info == NULL) {
2854 talloc_free(r);
2855 return false;
2858 r->out.needed = talloc_zero(r, uint32_t);
2859 if (r->out.needed == NULL) {
2860 talloc_free(r);
2861 return false;
2864 r->out.result = _spoolss_EnumPorts(p, r);
2866 if (p->rng_fault_state) {
2867 talloc_free(r);
2868 /* Return true here, srv_pipe_hnd.c will take care */
2869 return true;
2872 if (DEBUGLEVEL >= 10) {
2873 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, r);
2876 push = ndr_push_init_ctx(r, NULL);
2877 if (push == NULL) {
2878 talloc_free(r);
2879 return false;
2882 ndr_err = call->ndr_push(push, NDR_OUT, r);
2883 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2884 talloc_free(r);
2885 return false;
2888 blob = ndr_push_blob(push);
2889 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2890 talloc_free(r);
2891 return false;
2894 talloc_free(r);
2896 return true;
2899 static bool api_spoolss_EnumMonitors(pipes_struct *p)
2901 const struct ndr_interface_call *call;
2902 struct ndr_pull *pull;
2903 struct ndr_push *push;
2904 enum ndr_err_code ndr_err;
2905 DATA_BLOB blob;
2906 struct spoolss_EnumMonitors *r;
2908 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMMONITORS];
2910 r = talloc(talloc_tos(), struct spoolss_EnumMonitors);
2911 if (r == NULL) {
2912 return false;
2915 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2916 talloc_free(r);
2917 return false;
2920 pull = ndr_pull_init_blob(&blob, r, NULL);
2921 if (pull == NULL) {
2922 talloc_free(r);
2923 return false;
2926 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2927 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2928 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2929 talloc_free(r);
2930 return false;
2933 if (DEBUGLEVEL >= 10) {
2934 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, r);
2937 ZERO_STRUCT(r->out);
2938 r->out.count = talloc_zero(r, uint32_t);
2939 if (r->out.count == NULL) {
2940 talloc_free(r);
2941 return false;
2944 r->out.info = talloc_zero(r, union spoolss_MonitorInfo *);
2945 if (r->out.info == NULL) {
2946 talloc_free(r);
2947 return false;
2950 r->out.needed = talloc_zero(r, uint32_t);
2951 if (r->out.needed == NULL) {
2952 talloc_free(r);
2953 return false;
2956 r->out.result = _spoolss_EnumMonitors(p, r);
2958 if (p->rng_fault_state) {
2959 talloc_free(r);
2960 /* Return true here, srv_pipe_hnd.c will take care */
2961 return true;
2964 if (DEBUGLEVEL >= 10) {
2965 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, r);
2968 push = ndr_push_init_ctx(r, NULL);
2969 if (push == NULL) {
2970 talloc_free(r);
2971 return false;
2974 ndr_err = call->ndr_push(push, NDR_OUT, r);
2975 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2976 talloc_free(r);
2977 return false;
2980 blob = ndr_push_blob(push);
2981 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2982 talloc_free(r);
2983 return false;
2986 talloc_free(r);
2988 return true;
2991 static bool api_spoolss_AddPort(pipes_struct *p)
2993 const struct ndr_interface_call *call;
2994 struct ndr_pull *pull;
2995 struct ndr_push *push;
2996 enum ndr_err_code ndr_err;
2997 DATA_BLOB blob;
2998 struct spoolss_AddPort *r;
3000 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORT];
3002 r = talloc(talloc_tos(), struct spoolss_AddPort);
3003 if (r == NULL) {
3004 return false;
3007 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3008 talloc_free(r);
3009 return false;
3012 pull = ndr_pull_init_blob(&blob, r, NULL);
3013 if (pull == NULL) {
3014 talloc_free(r);
3015 return false;
3018 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3019 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3020 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3021 talloc_free(r);
3022 return false;
3025 if (DEBUGLEVEL >= 10) {
3026 NDR_PRINT_IN_DEBUG(spoolss_AddPort, r);
3029 r->out.result = _spoolss_AddPort(p, r);
3031 if (p->rng_fault_state) {
3032 talloc_free(r);
3033 /* Return true here, srv_pipe_hnd.c will take care */
3034 return true;
3037 if (DEBUGLEVEL >= 10) {
3038 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, r);
3041 push = ndr_push_init_ctx(r, NULL);
3042 if (push == NULL) {
3043 talloc_free(r);
3044 return false;
3047 ndr_err = call->ndr_push(push, NDR_OUT, r);
3048 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3049 talloc_free(r);
3050 return false;
3053 blob = ndr_push_blob(push);
3054 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3055 talloc_free(r);
3056 return false;
3059 talloc_free(r);
3061 return true;
3064 static bool api_spoolss_ConfigurePort(pipes_struct *p)
3066 const struct ndr_interface_call *call;
3067 struct ndr_pull *pull;
3068 struct ndr_push *push;
3069 enum ndr_err_code ndr_err;
3070 DATA_BLOB blob;
3071 struct spoolss_ConfigurePort *r;
3073 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CONFIGUREPORT];
3075 r = talloc(talloc_tos(), struct spoolss_ConfigurePort);
3076 if (r == NULL) {
3077 return false;
3080 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3081 talloc_free(r);
3082 return false;
3085 pull = ndr_pull_init_blob(&blob, r, NULL);
3086 if (pull == NULL) {
3087 talloc_free(r);
3088 return false;
3091 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3092 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3093 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3094 talloc_free(r);
3095 return false;
3098 if (DEBUGLEVEL >= 10) {
3099 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, r);
3102 r->out.result = _spoolss_ConfigurePort(p, r);
3104 if (p->rng_fault_state) {
3105 talloc_free(r);
3106 /* Return true here, srv_pipe_hnd.c will take care */
3107 return true;
3110 if (DEBUGLEVEL >= 10) {
3111 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, r);
3114 push = ndr_push_init_ctx(r, NULL);
3115 if (push == NULL) {
3116 talloc_free(r);
3117 return false;
3120 ndr_err = call->ndr_push(push, NDR_OUT, r);
3121 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3122 talloc_free(r);
3123 return false;
3126 blob = ndr_push_blob(push);
3127 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3128 talloc_free(r);
3129 return false;
3132 talloc_free(r);
3134 return true;
3137 static bool api_spoolss_DeletePort(pipes_struct *p)
3139 const struct ndr_interface_call *call;
3140 struct ndr_pull *pull;
3141 struct ndr_push *push;
3142 enum ndr_err_code ndr_err;
3143 DATA_BLOB blob;
3144 struct spoolss_DeletePort *r;
3146 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPORT];
3148 r = talloc(talloc_tos(), struct spoolss_DeletePort);
3149 if (r == NULL) {
3150 return false;
3153 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3154 talloc_free(r);
3155 return false;
3158 pull = ndr_pull_init_blob(&blob, r, NULL);
3159 if (pull == NULL) {
3160 talloc_free(r);
3161 return false;
3164 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3165 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3166 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3167 talloc_free(r);
3168 return false;
3171 if (DEBUGLEVEL >= 10) {
3172 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, r);
3175 r->out.result = _spoolss_DeletePort(p, r);
3177 if (p->rng_fault_state) {
3178 talloc_free(r);
3179 /* Return true here, srv_pipe_hnd.c will take care */
3180 return true;
3183 if (DEBUGLEVEL >= 10) {
3184 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, r);
3187 push = ndr_push_init_ctx(r, NULL);
3188 if (push == NULL) {
3189 talloc_free(r);
3190 return false;
3193 ndr_err = call->ndr_push(push, NDR_OUT, r);
3194 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3195 talloc_free(r);
3196 return false;
3199 blob = ndr_push_blob(push);
3200 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3201 talloc_free(r);
3202 return false;
3205 talloc_free(r);
3207 return true;
3210 static bool api_spoolss_CreatePrinterIC(pipes_struct *p)
3212 const struct ndr_interface_call *call;
3213 struct ndr_pull *pull;
3214 struct ndr_push *push;
3215 enum ndr_err_code ndr_err;
3216 DATA_BLOB blob;
3217 struct spoolss_CreatePrinterIC *r;
3219 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CREATEPRINTERIC];
3221 r = talloc(talloc_tos(), struct spoolss_CreatePrinterIC);
3222 if (r == NULL) {
3223 return false;
3226 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3227 talloc_free(r);
3228 return false;
3231 pull = ndr_pull_init_blob(&blob, r, NULL);
3232 if (pull == NULL) {
3233 talloc_free(r);
3234 return false;
3237 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3238 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3239 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3240 talloc_free(r);
3241 return false;
3244 if (DEBUGLEVEL >= 10) {
3245 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, r);
3248 ZERO_STRUCT(r->out);
3249 r->out.gdi_handle = talloc_zero(r, struct policy_handle);
3250 if (r->out.gdi_handle == NULL) {
3251 talloc_free(r);
3252 return false;
3255 r->out.result = _spoolss_CreatePrinterIC(p, r);
3257 if (p->rng_fault_state) {
3258 talloc_free(r);
3259 /* Return true here, srv_pipe_hnd.c will take care */
3260 return true;
3263 if (DEBUGLEVEL >= 10) {
3264 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, r);
3267 push = ndr_push_init_ctx(r, NULL);
3268 if (push == NULL) {
3269 talloc_free(r);
3270 return false;
3273 ndr_err = call->ndr_push(push, NDR_OUT, r);
3274 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3275 talloc_free(r);
3276 return false;
3279 blob = ndr_push_blob(push);
3280 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3281 talloc_free(r);
3282 return false;
3285 talloc_free(r);
3287 return true;
3290 static bool api_spoolss_PlayGDIScriptOnPrinterIC(pipes_struct *p)
3292 const struct ndr_interface_call *call;
3293 struct ndr_pull *pull;
3294 struct ndr_push *push;
3295 enum ndr_err_code ndr_err;
3296 DATA_BLOB blob;
3297 struct spoolss_PlayGDIScriptOnPrinterIC *r;
3299 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC];
3301 r = talloc(talloc_tos(), struct spoolss_PlayGDIScriptOnPrinterIC);
3302 if (r == NULL) {
3303 return false;
3306 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3307 talloc_free(r);
3308 return false;
3311 pull = ndr_pull_init_blob(&blob, r, NULL);
3312 if (pull == NULL) {
3313 talloc_free(r);
3314 return false;
3317 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3318 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3319 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3320 talloc_free(r);
3321 return false;
3324 if (DEBUGLEVEL >= 10) {
3325 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3328 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(p, r);
3330 if (p->rng_fault_state) {
3331 talloc_free(r);
3332 /* Return true here, srv_pipe_hnd.c will take care */
3333 return true;
3336 if (DEBUGLEVEL >= 10) {
3337 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3340 push = ndr_push_init_ctx(r, NULL);
3341 if (push == NULL) {
3342 talloc_free(r);
3343 return false;
3346 ndr_err = call->ndr_push(push, NDR_OUT, r);
3347 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3348 talloc_free(r);
3349 return false;
3352 blob = ndr_push_blob(push);
3353 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3354 talloc_free(r);
3355 return false;
3358 talloc_free(r);
3360 return true;
3363 static bool api_spoolss_DeletePrinterIC(pipes_struct *p)
3365 const struct ndr_interface_call *call;
3366 struct ndr_pull *pull;
3367 struct ndr_push *push;
3368 enum ndr_err_code ndr_err;
3369 DATA_BLOB blob;
3370 struct spoolss_DeletePrinterIC *r;
3372 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERIC];
3374 r = talloc(talloc_tos(), struct spoolss_DeletePrinterIC);
3375 if (r == NULL) {
3376 return false;
3379 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3380 talloc_free(r);
3381 return false;
3384 pull = ndr_pull_init_blob(&blob, r, NULL);
3385 if (pull == NULL) {
3386 talloc_free(r);
3387 return false;
3390 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3391 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3392 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3393 talloc_free(r);
3394 return false;
3397 if (DEBUGLEVEL >= 10) {
3398 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, r);
3401 ZERO_STRUCT(r->out);
3402 r->out.gdi_handle = r->in.gdi_handle;
3403 r->out.result = _spoolss_DeletePrinterIC(p, r);
3405 if (p->rng_fault_state) {
3406 talloc_free(r);
3407 /* Return true here, srv_pipe_hnd.c will take care */
3408 return true;
3411 if (DEBUGLEVEL >= 10) {
3412 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, r);
3415 push = ndr_push_init_ctx(r, NULL);
3416 if (push == NULL) {
3417 talloc_free(r);
3418 return false;
3421 ndr_err = call->ndr_push(push, NDR_OUT, r);
3422 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3423 talloc_free(r);
3424 return false;
3427 blob = ndr_push_blob(push);
3428 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3429 talloc_free(r);
3430 return false;
3433 talloc_free(r);
3435 return true;
3438 static bool api_spoolss_AddPrinterConnection(pipes_struct *p)
3440 const struct ndr_interface_call *call;
3441 struct ndr_pull *pull;
3442 struct ndr_push *push;
3443 enum ndr_err_code ndr_err;
3444 DATA_BLOB blob;
3445 struct spoolss_AddPrinterConnection *r;
3447 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERCONNECTION];
3449 r = talloc(talloc_tos(), struct spoolss_AddPrinterConnection);
3450 if (r == NULL) {
3451 return false;
3454 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3455 talloc_free(r);
3456 return false;
3459 pull = ndr_pull_init_blob(&blob, r, NULL);
3460 if (pull == NULL) {
3461 talloc_free(r);
3462 return false;
3465 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3466 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3468 talloc_free(r);
3469 return false;
3472 if (DEBUGLEVEL >= 10) {
3473 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, r);
3476 r->out.result = _spoolss_AddPrinterConnection(p, r);
3478 if (p->rng_fault_state) {
3479 talloc_free(r);
3480 /* Return true here, srv_pipe_hnd.c will take care */
3481 return true;
3484 if (DEBUGLEVEL >= 10) {
3485 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, r);
3488 push = ndr_push_init_ctx(r, NULL);
3489 if (push == NULL) {
3490 talloc_free(r);
3491 return false;
3494 ndr_err = call->ndr_push(push, NDR_OUT, r);
3495 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3496 talloc_free(r);
3497 return false;
3500 blob = ndr_push_blob(push);
3501 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3502 talloc_free(r);
3503 return false;
3506 talloc_free(r);
3508 return true;
3511 static bool api_spoolss_DeletePrinterConnection(pipes_struct *p)
3513 const struct ndr_interface_call *call;
3514 struct ndr_pull *pull;
3515 struct ndr_push *push;
3516 enum ndr_err_code ndr_err;
3517 DATA_BLOB blob;
3518 struct spoolss_DeletePrinterConnection *r;
3520 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERCONNECTION];
3522 r = talloc(talloc_tos(), struct spoolss_DeletePrinterConnection);
3523 if (r == NULL) {
3524 return false;
3527 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3528 talloc_free(r);
3529 return false;
3532 pull = ndr_pull_init_blob(&blob, r, NULL);
3533 if (pull == NULL) {
3534 talloc_free(r);
3535 return false;
3538 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3539 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3540 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3541 talloc_free(r);
3542 return false;
3545 if (DEBUGLEVEL >= 10) {
3546 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, r);
3549 r->out.result = _spoolss_DeletePrinterConnection(p, r);
3551 if (p->rng_fault_state) {
3552 talloc_free(r);
3553 /* Return true here, srv_pipe_hnd.c will take care */
3554 return true;
3557 if (DEBUGLEVEL >= 10) {
3558 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, r);
3561 push = ndr_push_init_ctx(r, NULL);
3562 if (push == NULL) {
3563 talloc_free(r);
3564 return false;
3567 ndr_err = call->ndr_push(push, NDR_OUT, r);
3568 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3569 talloc_free(r);
3570 return false;
3573 blob = ndr_push_blob(push);
3574 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3575 talloc_free(r);
3576 return false;
3579 talloc_free(r);
3581 return true;
3584 static bool api_spoolss_PrinterMessageBox(pipes_struct *p)
3586 const struct ndr_interface_call *call;
3587 struct ndr_pull *pull;
3588 struct ndr_push *push;
3589 enum ndr_err_code ndr_err;
3590 DATA_BLOB blob;
3591 struct spoolss_PrinterMessageBox *r;
3593 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PRINTERMESSAGEBOX];
3595 r = talloc(talloc_tos(), struct spoolss_PrinterMessageBox);
3596 if (r == NULL) {
3597 return false;
3600 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3601 talloc_free(r);
3602 return false;
3605 pull = ndr_pull_init_blob(&blob, r, NULL);
3606 if (pull == NULL) {
3607 talloc_free(r);
3608 return false;
3611 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3612 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3613 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3614 talloc_free(r);
3615 return false;
3618 if (DEBUGLEVEL >= 10) {
3619 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, r);
3622 r->out.result = _spoolss_PrinterMessageBox(p, r);
3624 if (p->rng_fault_state) {
3625 talloc_free(r);
3626 /* Return true here, srv_pipe_hnd.c will take care */
3627 return true;
3630 if (DEBUGLEVEL >= 10) {
3631 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, r);
3634 push = ndr_push_init_ctx(r, NULL);
3635 if (push == NULL) {
3636 talloc_free(r);
3637 return false;
3640 ndr_err = call->ndr_push(push, NDR_OUT, r);
3641 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3642 talloc_free(r);
3643 return false;
3646 blob = ndr_push_blob(push);
3647 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3648 talloc_free(r);
3649 return false;
3652 talloc_free(r);
3654 return true;
3657 static bool api_spoolss_AddMonitor(pipes_struct *p)
3659 const struct ndr_interface_call *call;
3660 struct ndr_pull *pull;
3661 struct ndr_push *push;
3662 enum ndr_err_code ndr_err;
3663 DATA_BLOB blob;
3664 struct spoolss_AddMonitor *r;
3666 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDMONITOR];
3668 r = talloc(talloc_tos(), struct spoolss_AddMonitor);
3669 if (r == NULL) {
3670 return false;
3673 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3674 talloc_free(r);
3675 return false;
3678 pull = ndr_pull_init_blob(&blob, r, NULL);
3679 if (pull == NULL) {
3680 talloc_free(r);
3681 return false;
3684 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3685 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3686 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3687 talloc_free(r);
3688 return false;
3691 if (DEBUGLEVEL >= 10) {
3692 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, r);
3695 r->out.result = _spoolss_AddMonitor(p, r);
3697 if (p->rng_fault_state) {
3698 talloc_free(r);
3699 /* Return true here, srv_pipe_hnd.c will take care */
3700 return true;
3703 if (DEBUGLEVEL >= 10) {
3704 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, r);
3707 push = ndr_push_init_ctx(r, NULL);
3708 if (push == NULL) {
3709 talloc_free(r);
3710 return false;
3713 ndr_err = call->ndr_push(push, NDR_OUT, r);
3714 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3715 talloc_free(r);
3716 return false;
3719 blob = ndr_push_blob(push);
3720 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3721 talloc_free(r);
3722 return false;
3725 talloc_free(r);
3727 return true;
3730 static bool api_spoolss_DeleteMonitor(pipes_struct *p)
3732 const struct ndr_interface_call *call;
3733 struct ndr_pull *pull;
3734 struct ndr_push *push;
3735 enum ndr_err_code ndr_err;
3736 DATA_BLOB blob;
3737 struct spoolss_DeleteMonitor *r;
3739 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEMONITOR];
3741 r = talloc(talloc_tos(), struct spoolss_DeleteMonitor);
3742 if (r == NULL) {
3743 return false;
3746 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3747 talloc_free(r);
3748 return false;
3751 pull = ndr_pull_init_blob(&blob, r, NULL);
3752 if (pull == NULL) {
3753 talloc_free(r);
3754 return false;
3757 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3758 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3759 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3760 talloc_free(r);
3761 return false;
3764 if (DEBUGLEVEL >= 10) {
3765 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, r);
3768 r->out.result = _spoolss_DeleteMonitor(p, r);
3770 if (p->rng_fault_state) {
3771 talloc_free(r);
3772 /* Return true here, srv_pipe_hnd.c will take care */
3773 return true;
3776 if (DEBUGLEVEL >= 10) {
3777 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, r);
3780 push = ndr_push_init_ctx(r, NULL);
3781 if (push == NULL) {
3782 talloc_free(r);
3783 return false;
3786 ndr_err = call->ndr_push(push, NDR_OUT, r);
3787 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3788 talloc_free(r);
3789 return false;
3792 blob = ndr_push_blob(push);
3793 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3794 talloc_free(r);
3795 return false;
3798 talloc_free(r);
3800 return true;
3803 static bool api_spoolss_DeletePrintProcessor(pipes_struct *p)
3805 const struct ndr_interface_call *call;
3806 struct ndr_pull *pull;
3807 struct ndr_push *push;
3808 enum ndr_err_code ndr_err;
3809 DATA_BLOB blob;
3810 struct spoolss_DeletePrintProcessor *r;
3812 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROCESSOR];
3814 r = talloc(talloc_tos(), struct spoolss_DeletePrintProcessor);
3815 if (r == NULL) {
3816 return false;
3819 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3820 talloc_free(r);
3821 return false;
3824 pull = ndr_pull_init_blob(&blob, r, NULL);
3825 if (pull == NULL) {
3826 talloc_free(r);
3827 return false;
3830 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3831 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3832 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3833 talloc_free(r);
3834 return false;
3837 if (DEBUGLEVEL >= 10) {
3838 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, r);
3841 r->out.result = _spoolss_DeletePrintProcessor(p, r);
3843 if (p->rng_fault_state) {
3844 talloc_free(r);
3845 /* Return true here, srv_pipe_hnd.c will take care */
3846 return true;
3849 if (DEBUGLEVEL >= 10) {
3850 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, r);
3853 push = ndr_push_init_ctx(r, NULL);
3854 if (push == NULL) {
3855 talloc_free(r);
3856 return false;
3859 ndr_err = call->ndr_push(push, NDR_OUT, r);
3860 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3861 talloc_free(r);
3862 return false;
3865 blob = ndr_push_blob(push);
3866 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3867 talloc_free(r);
3868 return false;
3871 talloc_free(r);
3873 return true;
3876 static bool api_spoolss_AddPrintProvidor(pipes_struct *p)
3878 const struct ndr_interface_call *call;
3879 struct ndr_pull *pull;
3880 struct ndr_push *push;
3881 enum ndr_err_code ndr_err;
3882 DATA_BLOB blob;
3883 struct spoolss_AddPrintProvidor *r;
3885 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROVIDOR];
3887 r = talloc(talloc_tos(), struct spoolss_AddPrintProvidor);
3888 if (r == NULL) {
3889 return false;
3892 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3893 talloc_free(r);
3894 return false;
3897 pull = ndr_pull_init_blob(&blob, r, NULL);
3898 if (pull == NULL) {
3899 talloc_free(r);
3900 return false;
3903 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3904 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3905 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3906 talloc_free(r);
3907 return false;
3910 if (DEBUGLEVEL >= 10) {
3911 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, r);
3914 r->out.result = _spoolss_AddPrintProvidor(p, r);
3916 if (p->rng_fault_state) {
3917 talloc_free(r);
3918 /* Return true here, srv_pipe_hnd.c will take care */
3919 return true;
3922 if (DEBUGLEVEL >= 10) {
3923 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, r);
3926 push = ndr_push_init_ctx(r, NULL);
3927 if (push == NULL) {
3928 talloc_free(r);
3929 return false;
3932 ndr_err = call->ndr_push(push, NDR_OUT, r);
3933 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3934 talloc_free(r);
3935 return false;
3938 blob = ndr_push_blob(push);
3939 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3940 talloc_free(r);
3941 return false;
3944 talloc_free(r);
3946 return true;
3949 static bool api_spoolss_DeletePrintProvidor(pipes_struct *p)
3951 const struct ndr_interface_call *call;
3952 struct ndr_pull *pull;
3953 struct ndr_push *push;
3954 enum ndr_err_code ndr_err;
3955 DATA_BLOB blob;
3956 struct spoolss_DeletePrintProvidor *r;
3958 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROVIDOR];
3960 r = talloc(talloc_tos(), struct spoolss_DeletePrintProvidor);
3961 if (r == NULL) {
3962 return false;
3965 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3966 talloc_free(r);
3967 return false;
3970 pull = ndr_pull_init_blob(&blob, r, NULL);
3971 if (pull == NULL) {
3972 talloc_free(r);
3973 return false;
3976 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3977 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3978 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3979 talloc_free(r);
3980 return false;
3983 if (DEBUGLEVEL >= 10) {
3984 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, r);
3987 r->out.result = _spoolss_DeletePrintProvidor(p, r);
3989 if (p->rng_fault_state) {
3990 talloc_free(r);
3991 /* Return true here, srv_pipe_hnd.c will take care */
3992 return true;
3995 if (DEBUGLEVEL >= 10) {
3996 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, r);
3999 push = ndr_push_init_ctx(r, NULL);
4000 if (push == NULL) {
4001 talloc_free(r);
4002 return false;
4005 ndr_err = call->ndr_push(push, NDR_OUT, r);
4006 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4007 talloc_free(r);
4008 return false;
4011 blob = ndr_push_blob(push);
4012 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4013 talloc_free(r);
4014 return false;
4017 talloc_free(r);
4019 return true;
4022 static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct *p)
4024 const struct ndr_interface_call *call;
4025 struct ndr_pull *pull;
4026 struct ndr_push *push;
4027 enum ndr_err_code ndr_err;
4028 DATA_BLOB blob;
4029 struct spoolss_EnumPrintProcDataTypes *r;
4031 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCDATATYPES];
4033 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcDataTypes);
4034 if (r == NULL) {
4035 return false;
4038 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4039 talloc_free(r);
4040 return false;
4043 pull = ndr_pull_init_blob(&blob, r, NULL);
4044 if (pull == NULL) {
4045 talloc_free(r);
4046 return false;
4049 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4050 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4051 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4052 talloc_free(r);
4053 return false;
4056 if (DEBUGLEVEL >= 10) {
4057 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, r);
4060 ZERO_STRUCT(r->out);
4061 r->out.count = talloc_zero(r, uint32_t);
4062 if (r->out.count == NULL) {
4063 talloc_free(r);
4064 return false;
4067 r->out.info = talloc_zero(r, union spoolss_PrintProcDataTypesInfo *);
4068 if (r->out.info == NULL) {
4069 talloc_free(r);
4070 return false;
4073 r->out.needed = talloc_zero(r, uint32_t);
4074 if (r->out.needed == NULL) {
4075 talloc_free(r);
4076 return false;
4079 r->out.result = _spoolss_EnumPrintProcDataTypes(p, r);
4081 if (p->rng_fault_state) {
4082 talloc_free(r);
4083 /* Return true here, srv_pipe_hnd.c will take care */
4084 return true;
4087 if (DEBUGLEVEL >= 10) {
4088 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, r);
4091 push = ndr_push_init_ctx(r, NULL);
4092 if (push == NULL) {
4093 talloc_free(r);
4094 return false;
4097 ndr_err = call->ndr_push(push, NDR_OUT, r);
4098 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4099 talloc_free(r);
4100 return false;
4103 blob = ndr_push_blob(push);
4104 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4105 talloc_free(r);
4106 return false;
4109 talloc_free(r);
4111 return true;
4114 static bool api_spoolss_ResetPrinter(pipes_struct *p)
4116 const struct ndr_interface_call *call;
4117 struct ndr_pull *pull;
4118 struct ndr_push *push;
4119 enum ndr_err_code ndr_err;
4120 DATA_BLOB blob;
4121 struct spoolss_ResetPrinter *r;
4123 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTER];
4125 r = talloc(talloc_tos(), struct spoolss_ResetPrinter);
4126 if (r == NULL) {
4127 return false;
4130 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4131 talloc_free(r);
4132 return false;
4135 pull = ndr_pull_init_blob(&blob, r, NULL);
4136 if (pull == NULL) {
4137 talloc_free(r);
4138 return false;
4141 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4142 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4143 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4144 talloc_free(r);
4145 return false;
4148 if (DEBUGLEVEL >= 10) {
4149 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, r);
4152 r->out.result = _spoolss_ResetPrinter(p, r);
4154 if (p->rng_fault_state) {
4155 talloc_free(r);
4156 /* Return true here, srv_pipe_hnd.c will take care */
4157 return true;
4160 if (DEBUGLEVEL >= 10) {
4161 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, r);
4164 push = ndr_push_init_ctx(r, NULL);
4165 if (push == NULL) {
4166 talloc_free(r);
4167 return false;
4170 ndr_err = call->ndr_push(push, NDR_OUT, r);
4171 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4172 talloc_free(r);
4173 return false;
4176 blob = ndr_push_blob(push);
4177 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4178 talloc_free(r);
4179 return false;
4182 talloc_free(r);
4184 return true;
4187 static bool api_spoolss_GetPrinterDriver2(pipes_struct *p)
4189 const struct ndr_interface_call *call;
4190 struct ndr_pull *pull;
4191 struct ndr_push *push;
4192 enum ndr_err_code ndr_err;
4193 DATA_BLOB blob;
4194 struct spoolss_GetPrinterDriver2 *r;
4196 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER2];
4198 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver2);
4199 if (r == NULL) {
4200 return false;
4203 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4204 talloc_free(r);
4205 return false;
4208 pull = ndr_pull_init_blob(&blob, r, NULL);
4209 if (pull == NULL) {
4210 talloc_free(r);
4211 return false;
4214 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4215 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4216 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4217 talloc_free(r);
4218 return false;
4221 if (DEBUGLEVEL >= 10) {
4222 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, r);
4225 ZERO_STRUCT(r->out);
4226 r->out.info = talloc_zero(r, union spoolss_DriverInfo);
4227 if (r->out.info == NULL) {
4228 talloc_free(r);
4229 return false;
4232 r->out.needed = talloc_zero(r, uint32_t);
4233 if (r->out.needed == NULL) {
4234 talloc_free(r);
4235 return false;
4238 r->out.server_major_version = talloc_zero(r, uint32_t);
4239 if (r->out.server_major_version == NULL) {
4240 talloc_free(r);
4241 return false;
4244 r->out.server_minor_version = talloc_zero(r, uint32_t);
4245 if (r->out.server_minor_version == NULL) {
4246 talloc_free(r);
4247 return false;
4250 r->out.result = _spoolss_GetPrinterDriver2(p, r);
4252 if (p->rng_fault_state) {
4253 talloc_free(r);
4254 /* Return true here, srv_pipe_hnd.c will take care */
4255 return true;
4258 if (DEBUGLEVEL >= 10) {
4259 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, r);
4262 push = ndr_push_init_ctx(r, NULL);
4263 if (push == NULL) {
4264 talloc_free(r);
4265 return false;
4268 ndr_err = call->ndr_push(push, NDR_OUT, r);
4269 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4270 talloc_free(r);
4271 return false;
4274 blob = ndr_push_blob(push);
4275 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4276 talloc_free(r);
4277 return false;
4280 talloc_free(r);
4282 return true;
4285 static bool api_spoolss_FindFirstPrinterChangeNotification(pipes_struct *p)
4287 const struct ndr_interface_call *call;
4288 struct ndr_pull *pull;
4289 struct ndr_push *push;
4290 enum ndr_err_code ndr_err;
4291 DATA_BLOB blob;
4292 struct spoolss_FindFirstPrinterChangeNotification *r;
4294 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION];
4296 r = talloc(talloc_tos(), struct spoolss_FindFirstPrinterChangeNotification);
4297 if (r == NULL) {
4298 return false;
4301 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4302 talloc_free(r);
4303 return false;
4306 pull = ndr_pull_init_blob(&blob, r, NULL);
4307 if (pull == NULL) {
4308 talloc_free(r);
4309 return false;
4312 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4313 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4314 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4315 talloc_free(r);
4316 return false;
4319 if (DEBUGLEVEL >= 10) {
4320 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4323 r->out.result = _spoolss_FindFirstPrinterChangeNotification(p, r);
4325 if (p->rng_fault_state) {
4326 talloc_free(r);
4327 /* Return true here, srv_pipe_hnd.c will take care */
4328 return true;
4331 if (DEBUGLEVEL >= 10) {
4332 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4335 push = ndr_push_init_ctx(r, NULL);
4336 if (push == NULL) {
4337 talloc_free(r);
4338 return false;
4341 ndr_err = call->ndr_push(push, NDR_OUT, r);
4342 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4343 talloc_free(r);
4344 return false;
4347 blob = ndr_push_blob(push);
4348 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4349 talloc_free(r);
4350 return false;
4353 talloc_free(r);
4355 return true;
4358 static bool api_spoolss_FindNextPrinterChangeNotification(pipes_struct *p)
4360 const struct ndr_interface_call *call;
4361 struct ndr_pull *pull;
4362 struct ndr_push *push;
4363 enum ndr_err_code ndr_err;
4364 DATA_BLOB blob;
4365 struct spoolss_FindNextPrinterChangeNotification *r;
4367 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION];
4369 r = talloc(talloc_tos(), struct spoolss_FindNextPrinterChangeNotification);
4370 if (r == NULL) {
4371 return false;
4374 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4375 talloc_free(r);
4376 return false;
4379 pull = ndr_pull_init_blob(&blob, r, NULL);
4380 if (pull == NULL) {
4381 talloc_free(r);
4382 return false;
4385 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4386 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4387 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4388 talloc_free(r);
4389 return false;
4392 if (DEBUGLEVEL >= 10) {
4393 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4396 r->out.result = _spoolss_FindNextPrinterChangeNotification(p, r);
4398 if (p->rng_fault_state) {
4399 talloc_free(r);
4400 /* Return true here, srv_pipe_hnd.c will take care */
4401 return true;
4404 if (DEBUGLEVEL >= 10) {
4405 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4408 push = ndr_push_init_ctx(r, NULL);
4409 if (push == NULL) {
4410 talloc_free(r);
4411 return false;
4414 ndr_err = call->ndr_push(push, NDR_OUT, r);
4415 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4416 talloc_free(r);
4417 return false;
4420 blob = ndr_push_blob(push);
4421 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4422 talloc_free(r);
4423 return false;
4426 talloc_free(r);
4428 return true;
4431 static bool api_spoolss_FindClosePrinterNotify(pipes_struct *p)
4433 const struct ndr_interface_call *call;
4434 struct ndr_pull *pull;
4435 struct ndr_push *push;
4436 enum ndr_err_code ndr_err;
4437 DATA_BLOB blob;
4438 struct spoolss_FindClosePrinterNotify *r;
4440 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY];
4442 r = talloc(talloc_tos(), struct spoolss_FindClosePrinterNotify);
4443 if (r == NULL) {
4444 return false;
4447 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4448 talloc_free(r);
4449 return false;
4452 pull = ndr_pull_init_blob(&blob, r, NULL);
4453 if (pull == NULL) {
4454 talloc_free(r);
4455 return false;
4458 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4459 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4460 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4461 talloc_free(r);
4462 return false;
4465 if (DEBUGLEVEL >= 10) {
4466 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, r);
4469 r->out.result = _spoolss_FindClosePrinterNotify(p, r);
4471 if (p->rng_fault_state) {
4472 talloc_free(r);
4473 /* Return true here, srv_pipe_hnd.c will take care */
4474 return true;
4477 if (DEBUGLEVEL >= 10) {
4478 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, r);
4481 push = ndr_push_init_ctx(r, NULL);
4482 if (push == NULL) {
4483 talloc_free(r);
4484 return false;
4487 ndr_err = call->ndr_push(push, NDR_OUT, r);
4488 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4489 talloc_free(r);
4490 return false;
4493 blob = ndr_push_blob(push);
4494 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4495 talloc_free(r);
4496 return false;
4499 talloc_free(r);
4501 return true;
4504 static bool api_spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct *p)
4506 const struct ndr_interface_call *call;
4507 struct ndr_pull *pull;
4508 struct ndr_push *push;
4509 enum ndr_err_code ndr_err;
4510 DATA_BLOB blob;
4511 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r;
4513 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD];
4515 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotificationOld);
4516 if (r == NULL) {
4517 return false;
4520 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4521 talloc_free(r);
4522 return false;
4525 pull = ndr_pull_init_blob(&blob, r, NULL);
4526 if (pull == NULL) {
4527 talloc_free(r);
4528 return false;
4531 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4532 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4533 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4534 talloc_free(r);
4535 return false;
4538 if (DEBUGLEVEL >= 10) {
4539 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4542 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(p, r);
4544 if (p->rng_fault_state) {
4545 talloc_free(r);
4546 /* Return true here, srv_pipe_hnd.c will take care */
4547 return true;
4550 if (DEBUGLEVEL >= 10) {
4551 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4554 push = ndr_push_init_ctx(r, NULL);
4555 if (push == NULL) {
4556 talloc_free(r);
4557 return false;
4560 ndr_err = call->ndr_push(push, NDR_OUT, r);
4561 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4562 talloc_free(r);
4563 return false;
4566 blob = ndr_push_blob(push);
4567 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4568 talloc_free(r);
4569 return false;
4572 talloc_free(r);
4574 return true;
4577 static bool api_spoolss_ReplyOpenPrinter(pipes_struct *p)
4579 const struct ndr_interface_call *call;
4580 struct ndr_pull *pull;
4581 struct ndr_push *push;
4582 enum ndr_err_code ndr_err;
4583 DATA_BLOB blob;
4584 struct spoolss_ReplyOpenPrinter *r;
4586 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYOPENPRINTER];
4588 r = talloc(talloc_tos(), struct spoolss_ReplyOpenPrinter);
4589 if (r == NULL) {
4590 return false;
4593 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4594 talloc_free(r);
4595 return false;
4598 pull = ndr_pull_init_blob(&blob, r, NULL);
4599 if (pull == NULL) {
4600 talloc_free(r);
4601 return false;
4604 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4605 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4606 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4607 talloc_free(r);
4608 return false;
4611 if (DEBUGLEVEL >= 10) {
4612 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, r);
4615 ZERO_STRUCT(r->out);
4616 r->out.handle = talloc_zero(r, struct policy_handle);
4617 if (r->out.handle == NULL) {
4618 talloc_free(r);
4619 return false;
4622 r->out.result = _spoolss_ReplyOpenPrinter(p, r);
4624 if (p->rng_fault_state) {
4625 talloc_free(r);
4626 /* Return true here, srv_pipe_hnd.c will take care */
4627 return true;
4630 if (DEBUGLEVEL >= 10) {
4631 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, r);
4634 push = ndr_push_init_ctx(r, NULL);
4635 if (push == NULL) {
4636 talloc_free(r);
4637 return false;
4640 ndr_err = call->ndr_push(push, NDR_OUT, r);
4641 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4642 talloc_free(r);
4643 return false;
4646 blob = ndr_push_blob(push);
4647 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4648 talloc_free(r);
4649 return false;
4652 talloc_free(r);
4654 return true;
4657 static bool api_spoolss_RouterReplyPrinter(pipes_struct *p)
4659 const struct ndr_interface_call *call;
4660 struct ndr_pull *pull;
4661 struct ndr_push *push;
4662 enum ndr_err_code ndr_err;
4663 DATA_BLOB blob;
4664 struct spoolss_RouterReplyPrinter *r;
4666 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTER];
4668 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinter);
4669 if (r == NULL) {
4670 return false;
4673 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4674 talloc_free(r);
4675 return false;
4678 pull = ndr_pull_init_blob(&blob, r, NULL);
4679 if (pull == NULL) {
4680 talloc_free(r);
4681 return false;
4684 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4685 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4686 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4687 talloc_free(r);
4688 return false;
4691 if (DEBUGLEVEL >= 10) {
4692 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, r);
4695 r->out.result = _spoolss_RouterReplyPrinter(p, r);
4697 if (p->rng_fault_state) {
4698 talloc_free(r);
4699 /* Return true here, srv_pipe_hnd.c will take care */
4700 return true;
4703 if (DEBUGLEVEL >= 10) {
4704 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, r);
4707 push = ndr_push_init_ctx(r, NULL);
4708 if (push == NULL) {
4709 talloc_free(r);
4710 return false;
4713 ndr_err = call->ndr_push(push, NDR_OUT, r);
4714 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4715 talloc_free(r);
4716 return false;
4719 blob = ndr_push_blob(push);
4720 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4721 talloc_free(r);
4722 return false;
4725 talloc_free(r);
4727 return true;
4730 static bool api_spoolss_ReplyClosePrinter(pipes_struct *p)
4732 const struct ndr_interface_call *call;
4733 struct ndr_pull *pull;
4734 struct ndr_push *push;
4735 enum ndr_err_code ndr_err;
4736 DATA_BLOB blob;
4737 struct spoolss_ReplyClosePrinter *r;
4739 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYCLOSEPRINTER];
4741 r = talloc(talloc_tos(), struct spoolss_ReplyClosePrinter);
4742 if (r == NULL) {
4743 return false;
4746 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4747 talloc_free(r);
4748 return false;
4751 pull = ndr_pull_init_blob(&blob, r, NULL);
4752 if (pull == NULL) {
4753 talloc_free(r);
4754 return false;
4757 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4758 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4759 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4760 talloc_free(r);
4761 return false;
4764 if (DEBUGLEVEL >= 10) {
4765 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, r);
4768 ZERO_STRUCT(r->out);
4769 r->out.handle = r->in.handle;
4770 r->out.result = _spoolss_ReplyClosePrinter(p, r);
4772 if (p->rng_fault_state) {
4773 talloc_free(r);
4774 /* Return true here, srv_pipe_hnd.c will take care */
4775 return true;
4778 if (DEBUGLEVEL >= 10) {
4779 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, r);
4782 push = ndr_push_init_ctx(r, NULL);
4783 if (push == NULL) {
4784 talloc_free(r);
4785 return false;
4788 ndr_err = call->ndr_push(push, NDR_OUT, r);
4789 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4790 talloc_free(r);
4791 return false;
4794 blob = ndr_push_blob(push);
4795 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4796 talloc_free(r);
4797 return false;
4800 talloc_free(r);
4802 return true;
4805 static bool api_spoolss_AddPortEx(pipes_struct *p)
4807 const struct ndr_interface_call *call;
4808 struct ndr_pull *pull;
4809 struct ndr_push *push;
4810 enum ndr_err_code ndr_err;
4811 DATA_BLOB blob;
4812 struct spoolss_AddPortEx *r;
4814 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORTEX];
4816 r = talloc(talloc_tos(), struct spoolss_AddPortEx);
4817 if (r == NULL) {
4818 return false;
4821 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4822 talloc_free(r);
4823 return false;
4826 pull = ndr_pull_init_blob(&blob, r, NULL);
4827 if (pull == NULL) {
4828 talloc_free(r);
4829 return false;
4832 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4833 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4834 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4835 talloc_free(r);
4836 return false;
4839 if (DEBUGLEVEL >= 10) {
4840 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, r);
4843 r->out.result = _spoolss_AddPortEx(p, r);
4845 if (p->rng_fault_state) {
4846 talloc_free(r);
4847 /* Return true here, srv_pipe_hnd.c will take care */
4848 return true;
4851 if (DEBUGLEVEL >= 10) {
4852 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, r);
4855 push = ndr_push_init_ctx(r, NULL);
4856 if (push == NULL) {
4857 talloc_free(r);
4858 return false;
4861 ndr_err = call->ndr_push(push, NDR_OUT, r);
4862 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4863 talloc_free(r);
4864 return false;
4867 blob = ndr_push_blob(push);
4868 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4869 talloc_free(r);
4870 return false;
4873 talloc_free(r);
4875 return true;
4878 static bool api_spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p)
4880 const struct ndr_interface_call *call;
4881 struct ndr_pull *pull;
4882 struct ndr_push *push;
4883 enum ndr_err_code ndr_err;
4884 DATA_BLOB blob;
4885 struct spoolss_RouterFindFirstPrinterChangeNotification *r;
4887 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION];
4889 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotification);
4890 if (r == NULL) {
4891 return false;
4894 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4895 talloc_free(r);
4896 return false;
4899 pull = ndr_pull_init_blob(&blob, r, NULL);
4900 if (pull == NULL) {
4901 talloc_free(r);
4902 return false;
4905 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4906 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4907 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4908 talloc_free(r);
4909 return false;
4912 if (DEBUGLEVEL >= 10) {
4913 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4916 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(p, r);
4918 if (p->rng_fault_state) {
4919 talloc_free(r);
4920 /* Return true here, srv_pipe_hnd.c will take care */
4921 return true;
4924 if (DEBUGLEVEL >= 10) {
4925 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4928 push = ndr_push_init_ctx(r, NULL);
4929 if (push == NULL) {
4930 talloc_free(r);
4931 return false;
4934 ndr_err = call->ndr_push(push, NDR_OUT, r);
4935 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4936 talloc_free(r);
4937 return false;
4940 blob = ndr_push_blob(push);
4941 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4942 talloc_free(r);
4943 return false;
4946 talloc_free(r);
4948 return true;
4951 static bool api_spoolss_SpoolerInit(pipes_struct *p)
4953 const struct ndr_interface_call *call;
4954 struct ndr_pull *pull;
4955 struct ndr_push *push;
4956 enum ndr_err_code ndr_err;
4957 DATA_BLOB blob;
4958 struct spoolss_SpoolerInit *r;
4960 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SPOOLERINIT];
4962 r = talloc(talloc_tos(), struct spoolss_SpoolerInit);
4963 if (r == NULL) {
4964 return false;
4967 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4968 talloc_free(r);
4969 return false;
4972 pull = ndr_pull_init_blob(&blob, r, NULL);
4973 if (pull == NULL) {
4974 talloc_free(r);
4975 return false;
4978 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4979 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4980 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4981 talloc_free(r);
4982 return false;
4985 if (DEBUGLEVEL >= 10) {
4986 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, r);
4989 r->out.result = _spoolss_SpoolerInit(p, r);
4991 if (p->rng_fault_state) {
4992 talloc_free(r);
4993 /* Return true here, srv_pipe_hnd.c will take care */
4994 return true;
4997 if (DEBUGLEVEL >= 10) {
4998 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, r);
5001 push = ndr_push_init_ctx(r, NULL);
5002 if (push == NULL) {
5003 talloc_free(r);
5004 return false;
5007 ndr_err = call->ndr_push(push, NDR_OUT, r);
5008 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5009 talloc_free(r);
5010 return false;
5013 blob = ndr_push_blob(push);
5014 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5015 talloc_free(r);
5016 return false;
5019 talloc_free(r);
5021 return true;
5024 static bool api_spoolss_ResetPrinterEx(pipes_struct *p)
5026 const struct ndr_interface_call *call;
5027 struct ndr_pull *pull;
5028 struct ndr_push *push;
5029 enum ndr_err_code ndr_err;
5030 DATA_BLOB blob;
5031 struct spoolss_ResetPrinterEx *r;
5033 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTEREX];
5035 r = talloc(talloc_tos(), struct spoolss_ResetPrinterEx);
5036 if (r == NULL) {
5037 return false;
5040 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5041 talloc_free(r);
5042 return false;
5045 pull = ndr_pull_init_blob(&blob, r, NULL);
5046 if (pull == NULL) {
5047 talloc_free(r);
5048 return false;
5051 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5052 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5053 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5054 talloc_free(r);
5055 return false;
5058 if (DEBUGLEVEL >= 10) {
5059 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, r);
5062 r->out.result = _spoolss_ResetPrinterEx(p, r);
5064 if (p->rng_fault_state) {
5065 talloc_free(r);
5066 /* Return true here, srv_pipe_hnd.c will take care */
5067 return true;
5070 if (DEBUGLEVEL >= 10) {
5071 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, r);
5074 push = ndr_push_init_ctx(r, NULL);
5075 if (push == NULL) {
5076 talloc_free(r);
5077 return false;
5080 ndr_err = call->ndr_push(push, NDR_OUT, r);
5081 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5082 talloc_free(r);
5083 return false;
5086 blob = ndr_push_blob(push);
5087 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5088 talloc_free(r);
5089 return false;
5092 talloc_free(r);
5094 return true;
5097 static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p)
5099 const struct ndr_interface_call *call;
5100 struct ndr_pull *pull;
5101 struct ndr_push *push;
5102 enum ndr_err_code ndr_err;
5103 DATA_BLOB blob;
5104 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r;
5106 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX];
5108 r = talloc(talloc_tos(), struct spoolss_RemoteFindFirstPrinterChangeNotifyEx);
5109 if (r == NULL) {
5110 return false;
5113 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5114 talloc_free(r);
5115 return false;
5118 pull = ndr_pull_init_blob(&blob, r, NULL);
5119 if (pull == NULL) {
5120 talloc_free(r);
5121 return false;
5124 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5125 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5126 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5127 talloc_free(r);
5128 return false;
5131 if (DEBUGLEVEL >= 10) {
5132 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5135 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p, r);
5137 if (p->rng_fault_state) {
5138 talloc_free(r);
5139 /* Return true here, srv_pipe_hnd.c will take care */
5140 return true;
5143 if (DEBUGLEVEL >= 10) {
5144 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5147 push = ndr_push_init_ctx(r, NULL);
5148 if (push == NULL) {
5149 talloc_free(r);
5150 return false;
5153 ndr_err = call->ndr_push(push, NDR_OUT, r);
5154 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5155 talloc_free(r);
5156 return false;
5159 blob = ndr_push_blob(push);
5160 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5161 talloc_free(r);
5162 return false;
5165 talloc_free(r);
5167 return true;
5170 static bool api_spoolss_RouterReplyPrinterEx(pipes_struct *p)
5172 const struct ndr_interface_call *call;
5173 struct ndr_pull *pull;
5174 struct ndr_push *push;
5175 enum ndr_err_code ndr_err;
5176 DATA_BLOB blob;
5177 struct spoolss_RouterReplyPrinterEx *r;
5179 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTEREX];
5181 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinterEx);
5182 if (r == NULL) {
5183 return false;
5186 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5187 talloc_free(r);
5188 return false;
5191 pull = ndr_pull_init_blob(&blob, r, NULL);
5192 if (pull == NULL) {
5193 talloc_free(r);
5194 return false;
5197 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5198 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5199 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5200 talloc_free(r);
5201 return false;
5204 if (DEBUGLEVEL >= 10) {
5205 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, r);
5208 ZERO_STRUCT(r->out);
5209 r->out.reply_result = talloc_zero(r, uint32_t);
5210 if (r->out.reply_result == NULL) {
5211 talloc_free(r);
5212 return false;
5215 r->out.result = _spoolss_RouterReplyPrinterEx(p, r);
5217 if (p->rng_fault_state) {
5218 talloc_free(r);
5219 /* Return true here, srv_pipe_hnd.c will take care */
5220 return true;
5223 if (DEBUGLEVEL >= 10) {
5224 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, r);
5227 push = ndr_push_init_ctx(r, NULL);
5228 if (push == NULL) {
5229 talloc_free(r);
5230 return false;
5233 ndr_err = call->ndr_push(push, NDR_OUT, r);
5234 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5235 talloc_free(r);
5236 return false;
5239 blob = ndr_push_blob(push);
5240 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5241 talloc_free(r);
5242 return false;
5245 talloc_free(r);
5247 return true;
5250 static bool api_spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p)
5252 const struct ndr_interface_call *call;
5253 struct ndr_pull *pull;
5254 struct ndr_push *push;
5255 enum ndr_err_code ndr_err;
5256 DATA_BLOB blob;
5257 struct spoolss_RouterRefreshPrinterChangeNotify *r;
5259 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY];
5261 r = talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotify);
5262 if (r == NULL) {
5263 return false;
5266 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5267 talloc_free(r);
5268 return false;
5271 pull = ndr_pull_init_blob(&blob, r, NULL);
5272 if (pull == NULL) {
5273 talloc_free(r);
5274 return false;
5277 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5278 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5279 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5280 talloc_free(r);
5281 return false;
5284 if (DEBUGLEVEL >= 10) {
5285 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5288 ZERO_STRUCT(r->out);
5289 r->out.info = talloc_zero(r, struct spoolss_NotifyInfo *);
5290 if (r->out.info == NULL) {
5291 talloc_free(r);
5292 return false;
5295 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(p, r);
5297 if (p->rng_fault_state) {
5298 talloc_free(r);
5299 /* Return true here, srv_pipe_hnd.c will take care */
5300 return true;
5303 if (DEBUGLEVEL >= 10) {
5304 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5307 push = ndr_push_init_ctx(r, NULL);
5308 if (push == NULL) {
5309 talloc_free(r);
5310 return false;
5313 ndr_err = call->ndr_push(push, NDR_OUT, r);
5314 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5315 talloc_free(r);
5316 return false;
5319 blob = ndr_push_blob(push);
5320 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5321 talloc_free(r);
5322 return false;
5325 talloc_free(r);
5327 return true;
5330 static bool api_spoolss_44(pipes_struct *p)
5332 const struct ndr_interface_call *call;
5333 struct ndr_pull *pull;
5334 struct ndr_push *push;
5335 enum ndr_err_code ndr_err;
5336 DATA_BLOB blob;
5337 struct spoolss_44 *r;
5339 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_44];
5341 r = talloc(talloc_tos(), struct spoolss_44);
5342 if (r == NULL) {
5343 return false;
5346 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5347 talloc_free(r);
5348 return false;
5351 pull = ndr_pull_init_blob(&blob, r, NULL);
5352 if (pull == NULL) {
5353 talloc_free(r);
5354 return false;
5357 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5358 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5359 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5360 talloc_free(r);
5361 return false;
5364 if (DEBUGLEVEL >= 10) {
5365 NDR_PRINT_IN_DEBUG(spoolss_44, r);
5368 r->out.result = _spoolss_44(p, r);
5370 if (p->rng_fault_state) {
5371 talloc_free(r);
5372 /* Return true here, srv_pipe_hnd.c will take care */
5373 return true;
5376 if (DEBUGLEVEL >= 10) {
5377 NDR_PRINT_OUT_DEBUG(spoolss_44, r);
5380 push = ndr_push_init_ctx(r, NULL);
5381 if (push == NULL) {
5382 talloc_free(r);
5383 return false;
5386 ndr_err = call->ndr_push(push, NDR_OUT, r);
5387 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5388 talloc_free(r);
5389 return false;
5392 blob = ndr_push_blob(push);
5393 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5394 talloc_free(r);
5395 return false;
5398 talloc_free(r);
5400 return true;
5403 static bool api_spoolss_OpenPrinterEx(pipes_struct *p)
5405 const struct ndr_interface_call *call;
5406 struct ndr_pull *pull;
5407 struct ndr_push *push;
5408 enum ndr_err_code ndr_err;
5409 DATA_BLOB blob;
5410 struct spoolss_OpenPrinterEx *r;
5412 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTEREX];
5414 r = talloc(talloc_tos(), struct spoolss_OpenPrinterEx);
5415 if (r == NULL) {
5416 return false;
5419 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5420 talloc_free(r);
5421 return false;
5424 pull = ndr_pull_init_blob(&blob, r, NULL);
5425 if (pull == NULL) {
5426 talloc_free(r);
5427 return false;
5430 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5431 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5432 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5433 talloc_free(r);
5434 return false;
5437 if (DEBUGLEVEL >= 10) {
5438 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, r);
5441 ZERO_STRUCT(r->out);
5442 r->out.handle = talloc_zero(r, struct policy_handle);
5443 if (r->out.handle == NULL) {
5444 talloc_free(r);
5445 return false;
5448 r->out.result = _spoolss_OpenPrinterEx(p, r);
5450 if (p->rng_fault_state) {
5451 talloc_free(r);
5452 /* Return true here, srv_pipe_hnd.c will take care */
5453 return true;
5456 if (DEBUGLEVEL >= 10) {
5457 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, r);
5460 push = ndr_push_init_ctx(r, NULL);
5461 if (push == NULL) {
5462 talloc_free(r);
5463 return false;
5466 ndr_err = call->ndr_push(push, NDR_OUT, r);
5467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5468 talloc_free(r);
5469 return false;
5472 blob = ndr_push_blob(push);
5473 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5474 talloc_free(r);
5475 return false;
5478 talloc_free(r);
5480 return true;
5483 static bool api_spoolss_AddPrinterEx(pipes_struct *p)
5485 const struct ndr_interface_call *call;
5486 struct ndr_pull *pull;
5487 struct ndr_push *push;
5488 enum ndr_err_code ndr_err;
5489 DATA_BLOB blob;
5490 struct spoolss_AddPrinterEx *r;
5492 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTEREX];
5494 r = talloc(talloc_tos(), struct spoolss_AddPrinterEx);
5495 if (r == NULL) {
5496 return false;
5499 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5500 talloc_free(r);
5501 return false;
5504 pull = ndr_pull_init_blob(&blob, r, NULL);
5505 if (pull == NULL) {
5506 talloc_free(r);
5507 return false;
5510 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5511 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5513 talloc_free(r);
5514 return false;
5517 if (DEBUGLEVEL >= 10) {
5518 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, r);
5521 ZERO_STRUCT(r->out);
5522 r->out.handle = talloc_zero(r, struct policy_handle);
5523 if (r->out.handle == NULL) {
5524 talloc_free(r);
5525 return false;
5528 r->out.result = _spoolss_AddPrinterEx(p, r);
5530 if (p->rng_fault_state) {
5531 talloc_free(r);
5532 /* Return true here, srv_pipe_hnd.c will take care */
5533 return true;
5536 if (DEBUGLEVEL >= 10) {
5537 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, r);
5540 push = ndr_push_init_ctx(r, NULL);
5541 if (push == NULL) {
5542 talloc_free(r);
5543 return false;
5546 ndr_err = call->ndr_push(push, NDR_OUT, r);
5547 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5548 talloc_free(r);
5549 return false;
5552 blob = ndr_push_blob(push);
5553 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5554 talloc_free(r);
5555 return false;
5558 talloc_free(r);
5560 return true;
5563 static bool api_spoolss_47(pipes_struct *p)
5565 const struct ndr_interface_call *call;
5566 struct ndr_pull *pull;
5567 struct ndr_push *push;
5568 enum ndr_err_code ndr_err;
5569 DATA_BLOB blob;
5570 struct spoolss_47 *r;
5572 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_47];
5574 r = talloc(talloc_tos(), struct spoolss_47);
5575 if (r == NULL) {
5576 return false;
5579 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5580 talloc_free(r);
5581 return false;
5584 pull = ndr_pull_init_blob(&blob, r, NULL);
5585 if (pull == NULL) {
5586 talloc_free(r);
5587 return false;
5590 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5591 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5592 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5593 talloc_free(r);
5594 return false;
5597 if (DEBUGLEVEL >= 10) {
5598 NDR_PRINT_IN_DEBUG(spoolss_47, r);
5601 r->out.result = _spoolss_47(p, r);
5603 if (p->rng_fault_state) {
5604 talloc_free(r);
5605 /* Return true here, srv_pipe_hnd.c will take care */
5606 return true;
5609 if (DEBUGLEVEL >= 10) {
5610 NDR_PRINT_OUT_DEBUG(spoolss_47, r);
5613 push = ndr_push_init_ctx(r, NULL);
5614 if (push == NULL) {
5615 talloc_free(r);
5616 return false;
5619 ndr_err = call->ndr_push(push, NDR_OUT, r);
5620 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5621 talloc_free(r);
5622 return false;
5625 blob = ndr_push_blob(push);
5626 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5627 talloc_free(r);
5628 return false;
5631 talloc_free(r);
5633 return true;
5636 static bool api_spoolss_EnumPrinterData(pipes_struct *p)
5638 const struct ndr_interface_call *call;
5639 struct ndr_pull *pull;
5640 struct ndr_push *push;
5641 enum ndr_err_code ndr_err;
5642 DATA_BLOB blob;
5643 struct spoolss_EnumPrinterData *r;
5645 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATA];
5647 r = talloc(talloc_tos(), struct spoolss_EnumPrinterData);
5648 if (r == NULL) {
5649 return false;
5652 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5653 talloc_free(r);
5654 return false;
5657 pull = ndr_pull_init_blob(&blob, r, NULL);
5658 if (pull == NULL) {
5659 talloc_free(r);
5660 return false;
5663 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5664 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5665 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5666 talloc_free(r);
5667 return false;
5670 if (DEBUGLEVEL >= 10) {
5671 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, r);
5674 ZERO_STRUCT(r->out);
5675 r->out.value_name = talloc_zero_array(r, const char, r->in.value_offered / 2);
5676 if (r->out.value_name == NULL) {
5677 talloc_free(r);
5678 return false;
5681 r->out.value_needed = talloc_zero(r, uint32_t);
5682 if (r->out.value_needed == NULL) {
5683 talloc_free(r);
5684 return false;
5687 r->out.type = talloc_zero(r, enum winreg_Type);
5688 if (r->out.type == NULL) {
5689 talloc_free(r);
5690 return false;
5693 r->out.data = talloc_zero_array(r, uint8_t, r->in.data_offered);
5694 if (r->out.data == NULL) {
5695 talloc_free(r);
5696 return false;
5699 r->out.data_needed = talloc_zero(r, uint32_t);
5700 if (r->out.data_needed == NULL) {
5701 talloc_free(r);
5702 return false;
5705 r->out.result = _spoolss_EnumPrinterData(p, r);
5707 if (p->rng_fault_state) {
5708 talloc_free(r);
5709 /* Return true here, srv_pipe_hnd.c will take care */
5710 return true;
5713 if (DEBUGLEVEL >= 10) {
5714 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, r);
5717 push = ndr_push_init_ctx(r, NULL);
5718 if (push == NULL) {
5719 talloc_free(r);
5720 return false;
5723 ndr_err = call->ndr_push(push, NDR_OUT, r);
5724 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5725 talloc_free(r);
5726 return false;
5729 blob = ndr_push_blob(push);
5730 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5731 talloc_free(r);
5732 return false;
5735 talloc_free(r);
5737 return true;
5740 static bool api_spoolss_DeletePrinterData(pipes_struct *p)
5742 const struct ndr_interface_call *call;
5743 struct ndr_pull *pull;
5744 struct ndr_push *push;
5745 enum ndr_err_code ndr_err;
5746 DATA_BLOB blob;
5747 struct spoolss_DeletePrinterData *r;
5749 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATA];
5751 r = talloc(talloc_tos(), struct spoolss_DeletePrinterData);
5752 if (r == NULL) {
5753 return false;
5756 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5757 talloc_free(r);
5758 return false;
5761 pull = ndr_pull_init_blob(&blob, r, NULL);
5762 if (pull == NULL) {
5763 talloc_free(r);
5764 return false;
5767 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5768 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5769 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5770 talloc_free(r);
5771 return false;
5774 if (DEBUGLEVEL >= 10) {
5775 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, r);
5778 r->out.result = _spoolss_DeletePrinterData(p, r);
5780 if (p->rng_fault_state) {
5781 talloc_free(r);
5782 /* Return true here, srv_pipe_hnd.c will take care */
5783 return true;
5786 if (DEBUGLEVEL >= 10) {
5787 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, r);
5790 push = ndr_push_init_ctx(r, NULL);
5791 if (push == NULL) {
5792 talloc_free(r);
5793 return false;
5796 ndr_err = call->ndr_push(push, NDR_OUT, r);
5797 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5798 talloc_free(r);
5799 return false;
5802 blob = ndr_push_blob(push);
5803 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5804 talloc_free(r);
5805 return false;
5808 talloc_free(r);
5810 return true;
5813 static bool api_spoolss_4a(pipes_struct *p)
5815 const struct ndr_interface_call *call;
5816 struct ndr_pull *pull;
5817 struct ndr_push *push;
5818 enum ndr_err_code ndr_err;
5819 DATA_BLOB blob;
5820 struct spoolss_4a *r;
5822 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4A];
5824 r = talloc(talloc_tos(), struct spoolss_4a);
5825 if (r == NULL) {
5826 return false;
5829 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5830 talloc_free(r);
5831 return false;
5834 pull = ndr_pull_init_blob(&blob, r, NULL);
5835 if (pull == NULL) {
5836 talloc_free(r);
5837 return false;
5840 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5841 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5842 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5843 talloc_free(r);
5844 return false;
5847 if (DEBUGLEVEL >= 10) {
5848 NDR_PRINT_IN_DEBUG(spoolss_4a, r);
5851 r->out.result = _spoolss_4a(p, r);
5853 if (p->rng_fault_state) {
5854 talloc_free(r);
5855 /* Return true here, srv_pipe_hnd.c will take care */
5856 return true;
5859 if (DEBUGLEVEL >= 10) {
5860 NDR_PRINT_OUT_DEBUG(spoolss_4a, r);
5863 push = ndr_push_init_ctx(r, NULL);
5864 if (push == NULL) {
5865 talloc_free(r);
5866 return false;
5869 ndr_err = call->ndr_push(push, NDR_OUT, r);
5870 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5871 talloc_free(r);
5872 return false;
5875 blob = ndr_push_blob(push);
5876 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5877 talloc_free(r);
5878 return false;
5881 talloc_free(r);
5883 return true;
5886 static bool api_spoolss_4b(pipes_struct *p)
5888 const struct ndr_interface_call *call;
5889 struct ndr_pull *pull;
5890 struct ndr_push *push;
5891 enum ndr_err_code ndr_err;
5892 DATA_BLOB blob;
5893 struct spoolss_4b *r;
5895 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4B];
5897 r = talloc(talloc_tos(), struct spoolss_4b);
5898 if (r == NULL) {
5899 return false;
5902 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5903 talloc_free(r);
5904 return false;
5907 pull = ndr_pull_init_blob(&blob, r, NULL);
5908 if (pull == NULL) {
5909 talloc_free(r);
5910 return false;
5913 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5914 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5915 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5916 talloc_free(r);
5917 return false;
5920 if (DEBUGLEVEL >= 10) {
5921 NDR_PRINT_IN_DEBUG(spoolss_4b, r);
5924 r->out.result = _spoolss_4b(p, r);
5926 if (p->rng_fault_state) {
5927 talloc_free(r);
5928 /* Return true here, srv_pipe_hnd.c will take care */
5929 return true;
5932 if (DEBUGLEVEL >= 10) {
5933 NDR_PRINT_OUT_DEBUG(spoolss_4b, r);
5936 push = ndr_push_init_ctx(r, NULL);
5937 if (push == NULL) {
5938 talloc_free(r);
5939 return false;
5942 ndr_err = call->ndr_push(push, NDR_OUT, r);
5943 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5944 talloc_free(r);
5945 return false;
5948 blob = ndr_push_blob(push);
5949 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5950 talloc_free(r);
5951 return false;
5954 talloc_free(r);
5956 return true;
5959 static bool api_spoolss_4c(pipes_struct *p)
5961 const struct ndr_interface_call *call;
5962 struct ndr_pull *pull;
5963 struct ndr_push *push;
5964 enum ndr_err_code ndr_err;
5965 DATA_BLOB blob;
5966 struct spoolss_4c *r;
5968 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4C];
5970 r = talloc(talloc_tos(), struct spoolss_4c);
5971 if (r == NULL) {
5972 return false;
5975 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5976 talloc_free(r);
5977 return false;
5980 pull = ndr_pull_init_blob(&blob, r, NULL);
5981 if (pull == NULL) {
5982 talloc_free(r);
5983 return false;
5986 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5987 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5988 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5989 talloc_free(r);
5990 return false;
5993 if (DEBUGLEVEL >= 10) {
5994 NDR_PRINT_IN_DEBUG(spoolss_4c, r);
5997 r->out.result = _spoolss_4c(p, r);
5999 if (p->rng_fault_state) {
6000 talloc_free(r);
6001 /* Return true here, srv_pipe_hnd.c will take care */
6002 return true;
6005 if (DEBUGLEVEL >= 10) {
6006 NDR_PRINT_OUT_DEBUG(spoolss_4c, r);
6009 push = ndr_push_init_ctx(r, NULL);
6010 if (push == NULL) {
6011 talloc_free(r);
6012 return false;
6015 ndr_err = call->ndr_push(push, NDR_OUT, r);
6016 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6017 talloc_free(r);
6018 return false;
6021 blob = ndr_push_blob(push);
6022 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6023 talloc_free(r);
6024 return false;
6027 talloc_free(r);
6029 return true;
6032 static bool api_spoolss_SetPrinterDataEx(pipes_struct *p)
6034 const struct ndr_interface_call *call;
6035 struct ndr_pull *pull;
6036 struct ndr_push *push;
6037 enum ndr_err_code ndr_err;
6038 DATA_BLOB blob;
6039 struct spoolss_SetPrinterDataEx *r;
6041 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATAEX];
6043 r = talloc(talloc_tos(), struct spoolss_SetPrinterDataEx);
6044 if (r == NULL) {
6045 return false;
6048 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6049 talloc_free(r);
6050 return false;
6053 pull = ndr_pull_init_blob(&blob, r, NULL);
6054 if (pull == NULL) {
6055 talloc_free(r);
6056 return false;
6059 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6060 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6061 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6062 talloc_free(r);
6063 return false;
6066 if (DEBUGLEVEL >= 10) {
6067 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, r);
6070 r->out.result = _spoolss_SetPrinterDataEx(p, r);
6072 if (p->rng_fault_state) {
6073 talloc_free(r);
6074 /* Return true here, srv_pipe_hnd.c will take care */
6075 return true;
6078 if (DEBUGLEVEL >= 10) {
6079 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, r);
6082 push = ndr_push_init_ctx(r, NULL);
6083 if (push == NULL) {
6084 talloc_free(r);
6085 return false;
6088 ndr_err = call->ndr_push(push, NDR_OUT, r);
6089 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6090 talloc_free(r);
6091 return false;
6094 blob = ndr_push_blob(push);
6095 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6096 talloc_free(r);
6097 return false;
6100 talloc_free(r);
6102 return true;
6105 static bool api_spoolss_GetPrinterDataEx(pipes_struct *p)
6107 const struct ndr_interface_call *call;
6108 struct ndr_pull *pull;
6109 struct ndr_push *push;
6110 enum ndr_err_code ndr_err;
6111 DATA_BLOB blob;
6112 struct spoolss_GetPrinterDataEx *r;
6114 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATAEX];
6116 r = talloc(talloc_tos(), struct spoolss_GetPrinterDataEx);
6117 if (r == NULL) {
6118 return false;
6121 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6122 talloc_free(r);
6123 return false;
6126 pull = ndr_pull_init_blob(&blob, r, NULL);
6127 if (pull == NULL) {
6128 talloc_free(r);
6129 return false;
6132 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6133 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6134 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6135 talloc_free(r);
6136 return false;
6139 if (DEBUGLEVEL >= 10) {
6140 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, r);
6143 ZERO_STRUCT(r->out);
6144 r->out.type = talloc_zero(r, enum winreg_Type);
6145 if (r->out.type == NULL) {
6146 talloc_free(r);
6147 return false;
6150 r->out.data = talloc_zero(r, union spoolss_PrinterData);
6151 if (r->out.data == NULL) {
6152 talloc_free(r);
6153 return false;
6156 r->out.needed = talloc_zero(r, uint32_t);
6157 if (r->out.needed == NULL) {
6158 talloc_free(r);
6159 return false;
6162 r->out.result = _spoolss_GetPrinterDataEx(p, r);
6164 if (p->rng_fault_state) {
6165 talloc_free(r);
6166 /* Return true here, srv_pipe_hnd.c will take care */
6167 return true;
6170 if (DEBUGLEVEL >= 10) {
6171 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, r);
6174 push = ndr_push_init_ctx(r, NULL);
6175 if (push == NULL) {
6176 talloc_free(r);
6177 return false;
6180 ndr_err = call->ndr_push(push, NDR_OUT, r);
6181 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6182 talloc_free(r);
6183 return false;
6186 blob = ndr_push_blob(push);
6187 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6188 talloc_free(r);
6189 return false;
6192 talloc_free(r);
6194 return true;
6197 static bool api_spoolss_EnumPrinterDataEx(pipes_struct *p)
6199 const struct ndr_interface_call *call;
6200 struct ndr_pull *pull;
6201 struct ndr_push *push;
6202 enum ndr_err_code ndr_err;
6203 DATA_BLOB blob;
6204 struct spoolss_EnumPrinterDataEx *r;
6206 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATAEX];
6208 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDataEx);
6209 if (r == NULL) {
6210 return false;
6213 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6214 talloc_free(r);
6215 return false;
6218 pull = ndr_pull_init_blob(&blob, r, NULL);
6219 if (pull == NULL) {
6220 talloc_free(r);
6221 return false;
6224 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6225 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6226 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6227 talloc_free(r);
6228 return false;
6231 if (DEBUGLEVEL >= 10) {
6232 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, r);
6235 ZERO_STRUCT(r->out);
6236 r->out.count = talloc_zero(r, uint32_t);
6237 if (r->out.count == NULL) {
6238 talloc_free(r);
6239 return false;
6242 r->out.info = talloc_zero(r, struct spoolss_PrinterEnumValues *);
6243 if (r->out.info == NULL) {
6244 talloc_free(r);
6245 return false;
6248 r->out.needed = talloc_zero(r, uint32_t);
6249 if (r->out.needed == NULL) {
6250 talloc_free(r);
6251 return false;
6254 r->out.result = _spoolss_EnumPrinterDataEx(p, r);
6256 if (p->rng_fault_state) {
6257 talloc_free(r);
6258 /* Return true here, srv_pipe_hnd.c will take care */
6259 return true;
6262 if (DEBUGLEVEL >= 10) {
6263 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, r);
6266 push = ndr_push_init_ctx(r, NULL);
6267 if (push == NULL) {
6268 talloc_free(r);
6269 return false;
6272 ndr_err = call->ndr_push(push, NDR_OUT, r);
6273 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6274 talloc_free(r);
6275 return false;
6278 blob = ndr_push_blob(push);
6279 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6280 talloc_free(r);
6281 return false;
6284 talloc_free(r);
6286 return true;
6289 static bool api_spoolss_EnumPrinterKey(pipes_struct *p)
6291 const struct ndr_interface_call *call;
6292 struct ndr_pull *pull;
6293 struct ndr_push *push;
6294 enum ndr_err_code ndr_err;
6295 DATA_BLOB blob;
6296 struct spoolss_EnumPrinterKey *r;
6298 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERKEY];
6300 r = talloc(talloc_tos(), struct spoolss_EnumPrinterKey);
6301 if (r == NULL) {
6302 return false;
6305 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6306 talloc_free(r);
6307 return false;
6310 pull = ndr_pull_init_blob(&blob, r, NULL);
6311 if (pull == NULL) {
6312 talloc_free(r);
6313 return false;
6316 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6317 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6318 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6319 talloc_free(r);
6320 return false;
6323 if (DEBUGLEVEL >= 10) {
6324 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, r);
6327 ZERO_STRUCT(r->out);
6328 r->out._ndr_size = talloc_zero(r, uint32_t);
6329 if (r->out._ndr_size == NULL) {
6330 talloc_free(r);
6331 return false;
6334 r->out.key_buffer = talloc_zero(r, union spoolss_KeyNames);
6335 if (r->out.key_buffer == NULL) {
6336 talloc_free(r);
6337 return false;
6340 r->out.needed = talloc_zero(r, uint32_t);
6341 if (r->out.needed == NULL) {
6342 talloc_free(r);
6343 return false;
6346 r->out.result = _spoolss_EnumPrinterKey(p, r);
6348 if (p->rng_fault_state) {
6349 talloc_free(r);
6350 /* Return true here, srv_pipe_hnd.c will take care */
6351 return true;
6354 if (DEBUGLEVEL >= 10) {
6355 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, r);
6358 push = ndr_push_init_ctx(r, NULL);
6359 if (push == NULL) {
6360 talloc_free(r);
6361 return false;
6364 ndr_err = call->ndr_push(push, NDR_OUT, r);
6365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6366 talloc_free(r);
6367 return false;
6370 blob = ndr_push_blob(push);
6371 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6372 talloc_free(r);
6373 return false;
6376 talloc_free(r);
6378 return true;
6381 static bool api_spoolss_DeletePrinterDataEx(pipes_struct *p)
6383 const struct ndr_interface_call *call;
6384 struct ndr_pull *pull;
6385 struct ndr_push *push;
6386 enum ndr_err_code ndr_err;
6387 DATA_BLOB blob;
6388 struct spoolss_DeletePrinterDataEx *r;
6390 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATAEX];
6392 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDataEx);
6393 if (r == NULL) {
6394 return false;
6397 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6398 talloc_free(r);
6399 return false;
6402 pull = ndr_pull_init_blob(&blob, r, NULL);
6403 if (pull == NULL) {
6404 talloc_free(r);
6405 return false;
6408 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6409 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6410 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6411 talloc_free(r);
6412 return false;
6415 if (DEBUGLEVEL >= 10) {
6416 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, r);
6419 r->out.result = _spoolss_DeletePrinterDataEx(p, r);
6421 if (p->rng_fault_state) {
6422 talloc_free(r);
6423 /* Return true here, srv_pipe_hnd.c will take care */
6424 return true;
6427 if (DEBUGLEVEL >= 10) {
6428 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, r);
6431 push = ndr_push_init_ctx(r, NULL);
6432 if (push == NULL) {
6433 talloc_free(r);
6434 return false;
6437 ndr_err = call->ndr_push(push, NDR_OUT, r);
6438 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6439 talloc_free(r);
6440 return false;
6443 blob = ndr_push_blob(push);
6444 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6445 talloc_free(r);
6446 return false;
6449 talloc_free(r);
6451 return true;
6454 static bool api_spoolss_DeletePrinterKey(pipes_struct *p)
6456 const struct ndr_interface_call *call;
6457 struct ndr_pull *pull;
6458 struct ndr_push *push;
6459 enum ndr_err_code ndr_err;
6460 DATA_BLOB blob;
6461 struct spoolss_DeletePrinterKey *r;
6463 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERKEY];
6465 r = talloc(talloc_tos(), struct spoolss_DeletePrinterKey);
6466 if (r == NULL) {
6467 return false;
6470 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6471 talloc_free(r);
6472 return false;
6475 pull = ndr_pull_init_blob(&blob, r, NULL);
6476 if (pull == NULL) {
6477 talloc_free(r);
6478 return false;
6481 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6482 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6483 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6484 talloc_free(r);
6485 return false;
6488 if (DEBUGLEVEL >= 10) {
6489 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, r);
6492 r->out.result = _spoolss_DeletePrinterKey(p, r);
6494 if (p->rng_fault_state) {
6495 talloc_free(r);
6496 /* Return true here, srv_pipe_hnd.c will take care */
6497 return true;
6500 if (DEBUGLEVEL >= 10) {
6501 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, r);
6504 push = ndr_push_init_ctx(r, NULL);
6505 if (push == NULL) {
6506 talloc_free(r);
6507 return false;
6510 ndr_err = call->ndr_push(push, NDR_OUT, r);
6511 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6512 talloc_free(r);
6513 return false;
6516 blob = ndr_push_blob(push);
6517 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6518 talloc_free(r);
6519 return false;
6522 talloc_free(r);
6524 return true;
6527 static bool api_spoolss_53(pipes_struct *p)
6529 const struct ndr_interface_call *call;
6530 struct ndr_pull *pull;
6531 struct ndr_push *push;
6532 enum ndr_err_code ndr_err;
6533 DATA_BLOB blob;
6534 struct spoolss_53 *r;
6536 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_53];
6538 r = talloc(talloc_tos(), struct spoolss_53);
6539 if (r == NULL) {
6540 return false;
6543 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6544 talloc_free(r);
6545 return false;
6548 pull = ndr_pull_init_blob(&blob, r, NULL);
6549 if (pull == NULL) {
6550 talloc_free(r);
6551 return false;
6554 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6555 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6556 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6557 talloc_free(r);
6558 return false;
6561 if (DEBUGLEVEL >= 10) {
6562 NDR_PRINT_IN_DEBUG(spoolss_53, r);
6565 r->out.result = _spoolss_53(p, r);
6567 if (p->rng_fault_state) {
6568 talloc_free(r);
6569 /* Return true here, srv_pipe_hnd.c will take care */
6570 return true;
6573 if (DEBUGLEVEL >= 10) {
6574 NDR_PRINT_OUT_DEBUG(spoolss_53, r);
6577 push = ndr_push_init_ctx(r, NULL);
6578 if (push == NULL) {
6579 talloc_free(r);
6580 return false;
6583 ndr_err = call->ndr_push(push, NDR_OUT, r);
6584 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6585 talloc_free(r);
6586 return false;
6589 blob = ndr_push_blob(push);
6590 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6591 talloc_free(r);
6592 return false;
6595 talloc_free(r);
6597 return true;
6600 static bool api_spoolss_DeletePrinterDriverEx(pipes_struct *p)
6602 const struct ndr_interface_call *call;
6603 struct ndr_pull *pull;
6604 struct ndr_push *push;
6605 enum ndr_err_code ndr_err;
6606 DATA_BLOB blob;
6607 struct spoolss_DeletePrinterDriverEx *r;
6609 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVEREX];
6611 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriverEx);
6612 if (r == NULL) {
6613 return false;
6616 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6617 talloc_free(r);
6618 return false;
6621 pull = ndr_pull_init_blob(&blob, r, NULL);
6622 if (pull == NULL) {
6623 talloc_free(r);
6624 return false;
6627 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6628 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6629 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6630 talloc_free(r);
6631 return false;
6634 if (DEBUGLEVEL >= 10) {
6635 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, r);
6638 r->out.result = _spoolss_DeletePrinterDriverEx(p, r);
6640 if (p->rng_fault_state) {
6641 talloc_free(r);
6642 /* Return true here, srv_pipe_hnd.c will take care */
6643 return true;
6646 if (DEBUGLEVEL >= 10) {
6647 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, r);
6650 push = ndr_push_init_ctx(r, NULL);
6651 if (push == NULL) {
6652 talloc_free(r);
6653 return false;
6656 ndr_err = call->ndr_push(push, NDR_OUT, r);
6657 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6658 talloc_free(r);
6659 return false;
6662 blob = ndr_push_blob(push);
6663 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6664 talloc_free(r);
6665 return false;
6668 talloc_free(r);
6670 return true;
6673 static bool api_spoolss_55(pipes_struct *p)
6675 const struct ndr_interface_call *call;
6676 struct ndr_pull *pull;
6677 struct ndr_push *push;
6678 enum ndr_err_code ndr_err;
6679 DATA_BLOB blob;
6680 struct spoolss_55 *r;
6682 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_55];
6684 r = talloc(talloc_tos(), struct spoolss_55);
6685 if (r == NULL) {
6686 return false;
6689 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6690 talloc_free(r);
6691 return false;
6694 pull = ndr_pull_init_blob(&blob, r, NULL);
6695 if (pull == NULL) {
6696 talloc_free(r);
6697 return false;
6700 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6701 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6702 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6703 talloc_free(r);
6704 return false;
6707 if (DEBUGLEVEL >= 10) {
6708 NDR_PRINT_IN_DEBUG(spoolss_55, r);
6711 r->out.result = _spoolss_55(p, r);
6713 if (p->rng_fault_state) {
6714 talloc_free(r);
6715 /* Return true here, srv_pipe_hnd.c will take care */
6716 return true;
6719 if (DEBUGLEVEL >= 10) {
6720 NDR_PRINT_OUT_DEBUG(spoolss_55, r);
6723 push = ndr_push_init_ctx(r, NULL);
6724 if (push == NULL) {
6725 talloc_free(r);
6726 return false;
6729 ndr_err = call->ndr_push(push, NDR_OUT, r);
6730 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6731 talloc_free(r);
6732 return false;
6735 blob = ndr_push_blob(push);
6736 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6737 talloc_free(r);
6738 return false;
6741 talloc_free(r);
6743 return true;
6746 static bool api_spoolss_56(pipes_struct *p)
6748 const struct ndr_interface_call *call;
6749 struct ndr_pull *pull;
6750 struct ndr_push *push;
6751 enum ndr_err_code ndr_err;
6752 DATA_BLOB blob;
6753 struct spoolss_56 *r;
6755 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_56];
6757 r = talloc(talloc_tos(), struct spoolss_56);
6758 if (r == NULL) {
6759 return false;
6762 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6763 talloc_free(r);
6764 return false;
6767 pull = ndr_pull_init_blob(&blob, r, NULL);
6768 if (pull == NULL) {
6769 talloc_free(r);
6770 return false;
6773 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6774 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6775 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6776 talloc_free(r);
6777 return false;
6780 if (DEBUGLEVEL >= 10) {
6781 NDR_PRINT_IN_DEBUG(spoolss_56, r);
6784 r->out.result = _spoolss_56(p, r);
6786 if (p->rng_fault_state) {
6787 talloc_free(r);
6788 /* Return true here, srv_pipe_hnd.c will take care */
6789 return true;
6792 if (DEBUGLEVEL >= 10) {
6793 NDR_PRINT_OUT_DEBUG(spoolss_56, r);
6796 push = ndr_push_init_ctx(r, NULL);
6797 if (push == NULL) {
6798 talloc_free(r);
6799 return false;
6802 ndr_err = call->ndr_push(push, NDR_OUT, r);
6803 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6804 talloc_free(r);
6805 return false;
6808 blob = ndr_push_blob(push);
6809 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6810 talloc_free(r);
6811 return false;
6814 talloc_free(r);
6816 return true;
6819 static bool api_spoolss_57(pipes_struct *p)
6821 const struct ndr_interface_call *call;
6822 struct ndr_pull *pull;
6823 struct ndr_push *push;
6824 enum ndr_err_code ndr_err;
6825 DATA_BLOB blob;
6826 struct spoolss_57 *r;
6828 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_57];
6830 r = talloc(talloc_tos(), struct spoolss_57);
6831 if (r == NULL) {
6832 return false;
6835 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6836 talloc_free(r);
6837 return false;
6840 pull = ndr_pull_init_blob(&blob, r, NULL);
6841 if (pull == NULL) {
6842 talloc_free(r);
6843 return false;
6846 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6847 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6848 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6849 talloc_free(r);
6850 return false;
6853 if (DEBUGLEVEL >= 10) {
6854 NDR_PRINT_IN_DEBUG(spoolss_57, r);
6857 r->out.result = _spoolss_57(p, r);
6859 if (p->rng_fault_state) {
6860 talloc_free(r);
6861 /* Return true here, srv_pipe_hnd.c will take care */
6862 return true;
6865 if (DEBUGLEVEL >= 10) {
6866 NDR_PRINT_OUT_DEBUG(spoolss_57, r);
6869 push = ndr_push_init_ctx(r, NULL);
6870 if (push == NULL) {
6871 talloc_free(r);
6872 return false;
6875 ndr_err = call->ndr_push(push, NDR_OUT, r);
6876 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6877 talloc_free(r);
6878 return false;
6881 blob = ndr_push_blob(push);
6882 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6883 talloc_free(r);
6884 return false;
6887 talloc_free(r);
6889 return true;
6892 static bool api_spoolss_XcvData(pipes_struct *p)
6894 const struct ndr_interface_call *call;
6895 struct ndr_pull *pull;
6896 struct ndr_push *push;
6897 enum ndr_err_code ndr_err;
6898 DATA_BLOB blob;
6899 struct spoolss_XcvData *r;
6901 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_XCVDATA];
6903 r = talloc(talloc_tos(), struct spoolss_XcvData);
6904 if (r == NULL) {
6905 return false;
6908 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6909 talloc_free(r);
6910 return false;
6913 pull = ndr_pull_init_blob(&blob, r, NULL);
6914 if (pull == NULL) {
6915 talloc_free(r);
6916 return false;
6919 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6920 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6921 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6922 talloc_free(r);
6923 return false;
6926 if (DEBUGLEVEL >= 10) {
6927 NDR_PRINT_IN_DEBUG(spoolss_XcvData, r);
6930 ZERO_STRUCT(r->out);
6931 r->out.status_code = r->in.status_code;
6932 r->out.out_data = talloc_zero_array(r, uint8_t, r->in.out_data_size);
6933 if (r->out.out_data == NULL) {
6934 talloc_free(r);
6935 return false;
6938 r->out.needed = talloc_zero(r, uint32_t);
6939 if (r->out.needed == NULL) {
6940 talloc_free(r);
6941 return false;
6944 r->out.result = _spoolss_XcvData(p, r);
6946 if (p->rng_fault_state) {
6947 talloc_free(r);
6948 /* Return true here, srv_pipe_hnd.c will take care */
6949 return true;
6952 if (DEBUGLEVEL >= 10) {
6953 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, r);
6956 push = ndr_push_init_ctx(r, NULL);
6957 if (push == NULL) {
6958 talloc_free(r);
6959 return false;
6962 ndr_err = call->ndr_push(push, NDR_OUT, r);
6963 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6964 talloc_free(r);
6965 return false;
6968 blob = ndr_push_blob(push);
6969 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6970 talloc_free(r);
6971 return false;
6974 talloc_free(r);
6976 return true;
6979 static bool api_spoolss_AddPrinterDriverEx(pipes_struct *p)
6981 const struct ndr_interface_call *call;
6982 struct ndr_pull *pull;
6983 struct ndr_push *push;
6984 enum ndr_err_code ndr_err;
6985 DATA_BLOB blob;
6986 struct spoolss_AddPrinterDriverEx *r;
6988 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVEREX];
6990 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriverEx);
6991 if (r == NULL) {
6992 return false;
6995 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6996 talloc_free(r);
6997 return false;
7000 pull = ndr_pull_init_blob(&blob, r, NULL);
7001 if (pull == NULL) {
7002 talloc_free(r);
7003 return false;
7006 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7007 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7008 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7009 talloc_free(r);
7010 return false;
7013 if (DEBUGLEVEL >= 10) {
7014 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, r);
7017 r->out.result = _spoolss_AddPrinterDriverEx(p, r);
7019 if (p->rng_fault_state) {
7020 talloc_free(r);
7021 /* Return true here, srv_pipe_hnd.c will take care */
7022 return true;
7025 if (DEBUGLEVEL >= 10) {
7026 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, r);
7029 push = ndr_push_init_ctx(r, NULL);
7030 if (push == NULL) {
7031 talloc_free(r);
7032 return false;
7035 ndr_err = call->ndr_push(push, NDR_OUT, r);
7036 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7037 talloc_free(r);
7038 return false;
7041 blob = ndr_push_blob(push);
7042 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7043 talloc_free(r);
7044 return false;
7047 talloc_free(r);
7049 return true;
7052 static bool api_spoolss_5a(pipes_struct *p)
7054 const struct ndr_interface_call *call;
7055 struct ndr_pull *pull;
7056 struct ndr_push *push;
7057 enum ndr_err_code ndr_err;
7058 DATA_BLOB blob;
7059 struct spoolss_5a *r;
7061 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5A];
7063 r = talloc(talloc_tos(), struct spoolss_5a);
7064 if (r == NULL) {
7065 return false;
7068 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7069 talloc_free(r);
7070 return false;
7073 pull = ndr_pull_init_blob(&blob, r, NULL);
7074 if (pull == NULL) {
7075 talloc_free(r);
7076 return false;
7079 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7080 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7081 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7082 talloc_free(r);
7083 return false;
7086 if (DEBUGLEVEL >= 10) {
7087 NDR_PRINT_IN_DEBUG(spoolss_5a, r);
7090 r->out.result = _spoolss_5a(p, r);
7092 if (p->rng_fault_state) {
7093 talloc_free(r);
7094 /* Return true here, srv_pipe_hnd.c will take care */
7095 return true;
7098 if (DEBUGLEVEL >= 10) {
7099 NDR_PRINT_OUT_DEBUG(spoolss_5a, r);
7102 push = ndr_push_init_ctx(r, NULL);
7103 if (push == NULL) {
7104 talloc_free(r);
7105 return false;
7108 ndr_err = call->ndr_push(push, NDR_OUT, r);
7109 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7110 talloc_free(r);
7111 return false;
7114 blob = ndr_push_blob(push);
7115 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7116 talloc_free(r);
7117 return false;
7120 talloc_free(r);
7122 return true;
7125 static bool api_spoolss_5b(pipes_struct *p)
7127 const struct ndr_interface_call *call;
7128 struct ndr_pull *pull;
7129 struct ndr_push *push;
7130 enum ndr_err_code ndr_err;
7131 DATA_BLOB blob;
7132 struct spoolss_5b *r;
7134 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5B];
7136 r = talloc(talloc_tos(), struct spoolss_5b);
7137 if (r == NULL) {
7138 return false;
7141 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7142 talloc_free(r);
7143 return false;
7146 pull = ndr_pull_init_blob(&blob, r, NULL);
7147 if (pull == NULL) {
7148 talloc_free(r);
7149 return false;
7152 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7153 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7154 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7155 talloc_free(r);
7156 return false;
7159 if (DEBUGLEVEL >= 10) {
7160 NDR_PRINT_IN_DEBUG(spoolss_5b, r);
7163 r->out.result = _spoolss_5b(p, r);
7165 if (p->rng_fault_state) {
7166 talloc_free(r);
7167 /* Return true here, srv_pipe_hnd.c will take care */
7168 return true;
7171 if (DEBUGLEVEL >= 10) {
7172 NDR_PRINT_OUT_DEBUG(spoolss_5b, r);
7175 push = ndr_push_init_ctx(r, NULL);
7176 if (push == NULL) {
7177 talloc_free(r);
7178 return false;
7181 ndr_err = call->ndr_push(push, NDR_OUT, r);
7182 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7183 talloc_free(r);
7184 return false;
7187 blob = ndr_push_blob(push);
7188 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7189 talloc_free(r);
7190 return false;
7193 talloc_free(r);
7195 return true;
7198 static bool api_spoolss_5c(pipes_struct *p)
7200 const struct ndr_interface_call *call;
7201 struct ndr_pull *pull;
7202 struct ndr_push *push;
7203 enum ndr_err_code ndr_err;
7204 DATA_BLOB blob;
7205 struct spoolss_5c *r;
7207 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5C];
7209 r = talloc(talloc_tos(), struct spoolss_5c);
7210 if (r == NULL) {
7211 return false;
7214 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7215 talloc_free(r);
7216 return false;
7219 pull = ndr_pull_init_blob(&blob, r, NULL);
7220 if (pull == NULL) {
7221 talloc_free(r);
7222 return false;
7225 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7226 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7227 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7228 talloc_free(r);
7229 return false;
7232 if (DEBUGLEVEL >= 10) {
7233 NDR_PRINT_IN_DEBUG(spoolss_5c, r);
7236 r->out.result = _spoolss_5c(p, r);
7238 if (p->rng_fault_state) {
7239 talloc_free(r);
7240 /* Return true here, srv_pipe_hnd.c will take care */
7241 return true;
7244 if (DEBUGLEVEL >= 10) {
7245 NDR_PRINT_OUT_DEBUG(spoolss_5c, r);
7248 push = ndr_push_init_ctx(r, NULL);
7249 if (push == NULL) {
7250 talloc_free(r);
7251 return false;
7254 ndr_err = call->ndr_push(push, NDR_OUT, r);
7255 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7256 talloc_free(r);
7257 return false;
7260 blob = ndr_push_blob(push);
7261 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7262 talloc_free(r);
7263 return false;
7266 talloc_free(r);
7268 return true;
7271 static bool api_spoolss_5d(pipes_struct *p)
7273 const struct ndr_interface_call *call;
7274 struct ndr_pull *pull;
7275 struct ndr_push *push;
7276 enum ndr_err_code ndr_err;
7277 DATA_BLOB blob;
7278 struct spoolss_5d *r;
7280 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5D];
7282 r = talloc(talloc_tos(), struct spoolss_5d);
7283 if (r == NULL) {
7284 return false;
7287 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7288 talloc_free(r);
7289 return false;
7292 pull = ndr_pull_init_blob(&blob, r, NULL);
7293 if (pull == NULL) {
7294 talloc_free(r);
7295 return false;
7298 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7299 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7300 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7301 talloc_free(r);
7302 return false;
7305 if (DEBUGLEVEL >= 10) {
7306 NDR_PRINT_IN_DEBUG(spoolss_5d, r);
7309 r->out.result = _spoolss_5d(p, r);
7311 if (p->rng_fault_state) {
7312 talloc_free(r);
7313 /* Return true here, srv_pipe_hnd.c will take care */
7314 return true;
7317 if (DEBUGLEVEL >= 10) {
7318 NDR_PRINT_OUT_DEBUG(spoolss_5d, r);
7321 push = ndr_push_init_ctx(r, NULL);
7322 if (push == NULL) {
7323 talloc_free(r);
7324 return false;
7327 ndr_err = call->ndr_push(push, NDR_OUT, r);
7328 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7329 talloc_free(r);
7330 return false;
7333 blob = ndr_push_blob(push);
7334 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7335 talloc_free(r);
7336 return false;
7339 talloc_free(r);
7341 return true;
7344 static bool api_spoolss_5e(pipes_struct *p)
7346 const struct ndr_interface_call *call;
7347 struct ndr_pull *pull;
7348 struct ndr_push *push;
7349 enum ndr_err_code ndr_err;
7350 DATA_BLOB blob;
7351 struct spoolss_5e *r;
7353 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5E];
7355 r = talloc(talloc_tos(), struct spoolss_5e);
7356 if (r == NULL) {
7357 return false;
7360 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7361 talloc_free(r);
7362 return false;
7365 pull = ndr_pull_init_blob(&blob, r, NULL);
7366 if (pull == NULL) {
7367 talloc_free(r);
7368 return false;
7371 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7372 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7373 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7374 talloc_free(r);
7375 return false;
7378 if (DEBUGLEVEL >= 10) {
7379 NDR_PRINT_IN_DEBUG(spoolss_5e, r);
7382 r->out.result = _spoolss_5e(p, r);
7384 if (p->rng_fault_state) {
7385 talloc_free(r);
7386 /* Return true here, srv_pipe_hnd.c will take care */
7387 return true;
7390 if (DEBUGLEVEL >= 10) {
7391 NDR_PRINT_OUT_DEBUG(spoolss_5e, r);
7394 push = ndr_push_init_ctx(r, NULL);
7395 if (push == NULL) {
7396 talloc_free(r);
7397 return false;
7400 ndr_err = call->ndr_push(push, NDR_OUT, r);
7401 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7402 talloc_free(r);
7403 return false;
7406 blob = ndr_push_blob(push);
7407 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7408 talloc_free(r);
7409 return false;
7412 talloc_free(r);
7414 return true;
7417 static bool api_spoolss_5f(pipes_struct *p)
7419 const struct ndr_interface_call *call;
7420 struct ndr_pull *pull;
7421 struct ndr_push *push;
7422 enum ndr_err_code ndr_err;
7423 DATA_BLOB blob;
7424 struct spoolss_5f *r;
7426 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5F];
7428 r = talloc(talloc_tos(), struct spoolss_5f);
7429 if (r == NULL) {
7430 return false;
7433 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7434 talloc_free(r);
7435 return false;
7438 pull = ndr_pull_init_blob(&blob, r, NULL);
7439 if (pull == NULL) {
7440 talloc_free(r);
7441 return false;
7444 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7445 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7446 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7447 talloc_free(r);
7448 return false;
7451 if (DEBUGLEVEL >= 10) {
7452 NDR_PRINT_IN_DEBUG(spoolss_5f, r);
7455 r->out.result = _spoolss_5f(p, r);
7457 if (p->rng_fault_state) {
7458 talloc_free(r);
7459 /* Return true here, srv_pipe_hnd.c will take care */
7460 return true;
7463 if (DEBUGLEVEL >= 10) {
7464 NDR_PRINT_OUT_DEBUG(spoolss_5f, r);
7467 push = ndr_push_init_ctx(r, NULL);
7468 if (push == NULL) {
7469 talloc_free(r);
7470 return false;
7473 ndr_err = call->ndr_push(push, NDR_OUT, r);
7474 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7475 talloc_free(r);
7476 return false;
7479 blob = ndr_push_blob(push);
7480 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7481 talloc_free(r);
7482 return false;
7485 talloc_free(r);
7487 return true;
7490 static bool api_spoolss_60(pipes_struct *p)
7492 const struct ndr_interface_call *call;
7493 struct ndr_pull *pull;
7494 struct ndr_push *push;
7495 enum ndr_err_code ndr_err;
7496 DATA_BLOB blob;
7497 struct spoolss_60 *r;
7499 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_60];
7501 r = talloc(talloc_tos(), struct spoolss_60);
7502 if (r == NULL) {
7503 return false;
7506 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7507 talloc_free(r);
7508 return false;
7511 pull = ndr_pull_init_blob(&blob, r, NULL);
7512 if (pull == NULL) {
7513 talloc_free(r);
7514 return false;
7517 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7518 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7519 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7520 talloc_free(r);
7521 return false;
7524 if (DEBUGLEVEL >= 10) {
7525 NDR_PRINT_IN_DEBUG(spoolss_60, r);
7528 r->out.result = _spoolss_60(p, r);
7530 if (p->rng_fault_state) {
7531 talloc_free(r);
7532 /* Return true here, srv_pipe_hnd.c will take care */
7533 return true;
7536 if (DEBUGLEVEL >= 10) {
7537 NDR_PRINT_OUT_DEBUG(spoolss_60, r);
7540 push = ndr_push_init_ctx(r, NULL);
7541 if (push == NULL) {
7542 talloc_free(r);
7543 return false;
7546 ndr_err = call->ndr_push(push, NDR_OUT, r);
7547 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7548 talloc_free(r);
7549 return false;
7552 blob = ndr_push_blob(push);
7553 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7554 talloc_free(r);
7555 return false;
7558 talloc_free(r);
7560 return true;
7563 static bool api_spoolss_61(pipes_struct *p)
7565 const struct ndr_interface_call *call;
7566 struct ndr_pull *pull;
7567 struct ndr_push *push;
7568 enum ndr_err_code ndr_err;
7569 DATA_BLOB blob;
7570 struct spoolss_61 *r;
7572 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_61];
7574 r = talloc(talloc_tos(), struct spoolss_61);
7575 if (r == NULL) {
7576 return false;
7579 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7580 talloc_free(r);
7581 return false;
7584 pull = ndr_pull_init_blob(&blob, r, NULL);
7585 if (pull == NULL) {
7586 talloc_free(r);
7587 return false;
7590 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7591 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7592 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7593 talloc_free(r);
7594 return false;
7597 if (DEBUGLEVEL >= 10) {
7598 NDR_PRINT_IN_DEBUG(spoolss_61, r);
7601 r->out.result = _spoolss_61(p, r);
7603 if (p->rng_fault_state) {
7604 talloc_free(r);
7605 /* Return true here, srv_pipe_hnd.c will take care */
7606 return true;
7609 if (DEBUGLEVEL >= 10) {
7610 NDR_PRINT_OUT_DEBUG(spoolss_61, r);
7613 push = ndr_push_init_ctx(r, NULL);
7614 if (push == NULL) {
7615 talloc_free(r);
7616 return false;
7619 ndr_err = call->ndr_push(push, NDR_OUT, r);
7620 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7621 talloc_free(r);
7622 return false;
7625 blob = ndr_push_blob(push);
7626 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7627 talloc_free(r);
7628 return false;
7631 talloc_free(r);
7633 return true;
7636 static bool api_spoolss_62(pipes_struct *p)
7638 const struct ndr_interface_call *call;
7639 struct ndr_pull *pull;
7640 struct ndr_push *push;
7641 enum ndr_err_code ndr_err;
7642 DATA_BLOB blob;
7643 struct spoolss_62 *r;
7645 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_62];
7647 r = talloc(talloc_tos(), struct spoolss_62);
7648 if (r == NULL) {
7649 return false;
7652 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7653 talloc_free(r);
7654 return false;
7657 pull = ndr_pull_init_blob(&blob, r, NULL);
7658 if (pull == NULL) {
7659 talloc_free(r);
7660 return false;
7663 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7664 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7665 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7666 talloc_free(r);
7667 return false;
7670 if (DEBUGLEVEL >= 10) {
7671 NDR_PRINT_IN_DEBUG(spoolss_62, r);
7674 r->out.result = _spoolss_62(p, r);
7676 if (p->rng_fault_state) {
7677 talloc_free(r);
7678 /* Return true here, srv_pipe_hnd.c will take care */
7679 return true;
7682 if (DEBUGLEVEL >= 10) {
7683 NDR_PRINT_OUT_DEBUG(spoolss_62, r);
7686 push = ndr_push_init_ctx(r, NULL);
7687 if (push == NULL) {
7688 talloc_free(r);
7689 return false;
7692 ndr_err = call->ndr_push(push, NDR_OUT, r);
7693 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7694 talloc_free(r);
7695 return false;
7698 blob = ndr_push_blob(push);
7699 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7700 talloc_free(r);
7701 return false;
7704 talloc_free(r);
7706 return true;
7709 static bool api_spoolss_63(pipes_struct *p)
7711 const struct ndr_interface_call *call;
7712 struct ndr_pull *pull;
7713 struct ndr_push *push;
7714 enum ndr_err_code ndr_err;
7715 DATA_BLOB blob;
7716 struct spoolss_63 *r;
7718 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_63];
7720 r = talloc(talloc_tos(), struct spoolss_63);
7721 if (r == NULL) {
7722 return false;
7725 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7726 talloc_free(r);
7727 return false;
7730 pull = ndr_pull_init_blob(&blob, r, NULL);
7731 if (pull == NULL) {
7732 talloc_free(r);
7733 return false;
7736 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7737 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7738 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7739 talloc_free(r);
7740 return false;
7743 if (DEBUGLEVEL >= 10) {
7744 NDR_PRINT_IN_DEBUG(spoolss_63, r);
7747 r->out.result = _spoolss_63(p, r);
7749 if (p->rng_fault_state) {
7750 talloc_free(r);
7751 /* Return true here, srv_pipe_hnd.c will take care */
7752 return true;
7755 if (DEBUGLEVEL >= 10) {
7756 NDR_PRINT_OUT_DEBUG(spoolss_63, r);
7759 push = ndr_push_init_ctx(r, NULL);
7760 if (push == NULL) {
7761 talloc_free(r);
7762 return false;
7765 ndr_err = call->ndr_push(push, NDR_OUT, r);
7766 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7767 talloc_free(r);
7768 return false;
7771 blob = ndr_push_blob(push);
7772 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7773 talloc_free(r);
7774 return false;
7777 talloc_free(r);
7779 return true;
7782 static bool api_spoolss_64(pipes_struct *p)
7784 const struct ndr_interface_call *call;
7785 struct ndr_pull *pull;
7786 struct ndr_push *push;
7787 enum ndr_err_code ndr_err;
7788 DATA_BLOB blob;
7789 struct spoolss_64 *r;
7791 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_64];
7793 r = talloc(talloc_tos(), struct spoolss_64);
7794 if (r == NULL) {
7795 return false;
7798 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7799 talloc_free(r);
7800 return false;
7803 pull = ndr_pull_init_blob(&blob, r, NULL);
7804 if (pull == NULL) {
7805 talloc_free(r);
7806 return false;
7809 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7810 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7811 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7812 talloc_free(r);
7813 return false;
7816 if (DEBUGLEVEL >= 10) {
7817 NDR_PRINT_IN_DEBUG(spoolss_64, r);
7820 r->out.result = _spoolss_64(p, r);
7822 if (p->rng_fault_state) {
7823 talloc_free(r);
7824 /* Return true here, srv_pipe_hnd.c will take care */
7825 return true;
7828 if (DEBUGLEVEL >= 10) {
7829 NDR_PRINT_OUT_DEBUG(spoolss_64, r);
7832 push = ndr_push_init_ctx(r, NULL);
7833 if (push == NULL) {
7834 talloc_free(r);
7835 return false;
7838 ndr_err = call->ndr_push(push, NDR_OUT, r);
7839 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7840 talloc_free(r);
7841 return false;
7844 blob = ndr_push_blob(push);
7845 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7846 talloc_free(r);
7847 return false;
7850 talloc_free(r);
7852 return true;
7855 static bool api_spoolss_65(pipes_struct *p)
7857 const struct ndr_interface_call *call;
7858 struct ndr_pull *pull;
7859 struct ndr_push *push;
7860 enum ndr_err_code ndr_err;
7861 DATA_BLOB blob;
7862 struct spoolss_65 *r;
7864 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_65];
7866 r = talloc(talloc_tos(), struct spoolss_65);
7867 if (r == NULL) {
7868 return false;
7871 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7872 talloc_free(r);
7873 return false;
7876 pull = ndr_pull_init_blob(&blob, r, NULL);
7877 if (pull == NULL) {
7878 talloc_free(r);
7879 return false;
7882 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7883 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7884 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7885 talloc_free(r);
7886 return false;
7889 if (DEBUGLEVEL >= 10) {
7890 NDR_PRINT_IN_DEBUG(spoolss_65, r);
7893 r->out.result = _spoolss_65(p, r);
7895 if (p->rng_fault_state) {
7896 talloc_free(r);
7897 /* Return true here, srv_pipe_hnd.c will take care */
7898 return true;
7901 if (DEBUGLEVEL >= 10) {
7902 NDR_PRINT_OUT_DEBUG(spoolss_65, r);
7905 push = ndr_push_init_ctx(r, NULL);
7906 if (push == NULL) {
7907 talloc_free(r);
7908 return false;
7911 ndr_err = call->ndr_push(push, NDR_OUT, r);
7912 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7913 talloc_free(r);
7914 return false;
7917 blob = ndr_push_blob(push);
7918 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7919 talloc_free(r);
7920 return false;
7923 talloc_free(r);
7925 return true;
7928 static bool api_spoolss_GetCorePrinterDrivers(pipes_struct *p)
7930 const struct ndr_interface_call *call;
7931 struct ndr_pull *pull;
7932 struct ndr_push *push;
7933 enum ndr_err_code ndr_err;
7934 DATA_BLOB blob;
7935 struct spoolss_GetCorePrinterDrivers *r;
7937 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETCOREPRINTERDRIVERS];
7939 r = talloc(talloc_tos(), struct spoolss_GetCorePrinterDrivers);
7940 if (r == NULL) {
7941 return false;
7944 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7945 talloc_free(r);
7946 return false;
7949 pull = ndr_pull_init_blob(&blob, r, NULL);
7950 if (pull == NULL) {
7951 talloc_free(r);
7952 return false;
7955 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7956 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7957 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7958 talloc_free(r);
7959 return false;
7962 if (DEBUGLEVEL >= 10) {
7963 NDR_PRINT_IN_DEBUG(spoolss_GetCorePrinterDrivers, r);
7966 ZERO_STRUCT(r->out);
7967 r->out.core_printer_drivers = talloc_zero_array(r, struct spoolss_CorePrinterDriver, r->in.core_printer_driver_count);
7968 if (r->out.core_printer_drivers == NULL) {
7969 talloc_free(r);
7970 return false;
7973 r->out.result = _spoolss_GetCorePrinterDrivers(p, r);
7975 if (p->rng_fault_state) {
7976 talloc_free(r);
7977 /* Return true here, srv_pipe_hnd.c will take care */
7978 return true;
7981 if (DEBUGLEVEL >= 10) {
7982 NDR_PRINT_OUT_DEBUG(spoolss_GetCorePrinterDrivers, r);
7985 push = ndr_push_init_ctx(r, NULL);
7986 if (push == NULL) {
7987 talloc_free(r);
7988 return false;
7991 ndr_err = call->ndr_push(push, NDR_OUT, r);
7992 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7993 talloc_free(r);
7994 return false;
7997 blob = ndr_push_blob(push);
7998 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7999 talloc_free(r);
8000 return false;
8003 talloc_free(r);
8005 return true;
8008 static bool api_spoolss_67(pipes_struct *p)
8010 const struct ndr_interface_call *call;
8011 struct ndr_pull *pull;
8012 struct ndr_push *push;
8013 enum ndr_err_code ndr_err;
8014 DATA_BLOB blob;
8015 struct spoolss_67 *r;
8017 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_67];
8019 r = talloc(talloc_tos(), struct spoolss_67);
8020 if (r == NULL) {
8021 return false;
8024 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
8025 talloc_free(r);
8026 return false;
8029 pull = ndr_pull_init_blob(&blob, r, NULL);
8030 if (pull == NULL) {
8031 talloc_free(r);
8032 return false;
8035 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
8036 ndr_err = call->ndr_pull(pull, NDR_IN, r);
8037 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8038 talloc_free(r);
8039 return false;
8042 if (DEBUGLEVEL >= 10) {
8043 NDR_PRINT_IN_DEBUG(spoolss_67, r);
8046 r->out.result = _spoolss_67(p, r);
8048 if (p->rng_fault_state) {
8049 talloc_free(r);
8050 /* Return true here, srv_pipe_hnd.c will take care */
8051 return true;
8054 if (DEBUGLEVEL >= 10) {
8055 NDR_PRINT_OUT_DEBUG(spoolss_67, r);
8058 push = ndr_push_init_ctx(r, NULL);
8059 if (push == NULL) {
8060 talloc_free(r);
8061 return false;
8064 ndr_err = call->ndr_push(push, NDR_OUT, r);
8065 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8066 talloc_free(r);
8067 return false;
8070 blob = ndr_push_blob(push);
8071 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
8072 talloc_free(r);
8073 return false;
8076 talloc_free(r);
8078 return true;
8081 static bool api_spoolss_GetPrinterDriverPackagePath(pipes_struct *p)
8083 const struct ndr_interface_call *call;
8084 struct ndr_pull *pull;
8085 struct ndr_push *push;
8086 enum ndr_err_code ndr_err;
8087 DATA_BLOB blob;
8088 struct spoolss_GetPrinterDriverPackagePath *r;
8090 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVERPACKAGEPATH];
8092 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriverPackagePath);
8093 if (r == NULL) {
8094 return false;
8097 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
8098 talloc_free(r);
8099 return false;
8102 pull = ndr_pull_init_blob(&blob, r, NULL);
8103 if (pull == NULL) {
8104 talloc_free(r);
8105 return false;
8108 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
8109 ndr_err = call->ndr_pull(pull, NDR_IN, r);
8110 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8111 talloc_free(r);
8112 return false;
8115 if (DEBUGLEVEL >= 10) {
8116 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverPackagePath, r);
8119 ZERO_STRUCT(r->out);
8120 r->out.driver_package_cab = r->in.driver_package_cab;
8121 r->out.required = talloc_zero(r, uint32_t);
8122 if (r->out.required == NULL) {
8123 talloc_free(r);
8124 return false;
8127 r->out.result = _spoolss_GetPrinterDriverPackagePath(p, r);
8129 if (p->rng_fault_state) {
8130 talloc_free(r);
8131 /* Return true here, srv_pipe_hnd.c will take care */
8132 return true;
8135 if (DEBUGLEVEL >= 10) {
8136 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverPackagePath, r);
8139 push = ndr_push_init_ctx(r, NULL);
8140 if (push == NULL) {
8141 talloc_free(r);
8142 return false;
8145 ndr_err = call->ndr_push(push, NDR_OUT, r);
8146 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8147 talloc_free(r);
8148 return false;
8151 blob = ndr_push_blob(push);
8152 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
8153 talloc_free(r);
8154 return false;
8157 talloc_free(r);
8159 return true;
8162 static bool api_spoolss_69(pipes_struct *p)
8164 const struct ndr_interface_call *call;
8165 struct ndr_pull *pull;
8166 struct ndr_push *push;
8167 enum ndr_err_code ndr_err;
8168 DATA_BLOB blob;
8169 struct spoolss_69 *r;
8171 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_69];
8173 r = talloc(talloc_tos(), struct spoolss_69);
8174 if (r == NULL) {
8175 return false;
8178 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
8179 talloc_free(r);
8180 return false;
8183 pull = ndr_pull_init_blob(&blob, r, NULL);
8184 if (pull == NULL) {
8185 talloc_free(r);
8186 return false;
8189 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
8190 ndr_err = call->ndr_pull(pull, NDR_IN, r);
8191 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8192 talloc_free(r);
8193 return false;
8196 if (DEBUGLEVEL >= 10) {
8197 NDR_PRINT_IN_DEBUG(spoolss_69, r);
8200 r->out.result = _spoolss_69(p, r);
8202 if (p->rng_fault_state) {
8203 talloc_free(r);
8204 /* Return true here, srv_pipe_hnd.c will take care */
8205 return true;
8208 if (DEBUGLEVEL >= 10) {
8209 NDR_PRINT_OUT_DEBUG(spoolss_69, r);
8212 push = ndr_push_init_ctx(r, NULL);
8213 if (push == NULL) {
8214 talloc_free(r);
8215 return false;
8218 ndr_err = call->ndr_push(push, NDR_OUT, r);
8219 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8220 talloc_free(r);
8221 return false;
8224 blob = ndr_push_blob(push);
8225 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
8226 talloc_free(r);
8227 return false;
8230 talloc_free(r);
8232 return true;
8235 static bool api_spoolss_6a(pipes_struct *p)
8237 const struct ndr_interface_call *call;
8238 struct ndr_pull *pull;
8239 struct ndr_push *push;
8240 enum ndr_err_code ndr_err;
8241 DATA_BLOB blob;
8242 struct spoolss_6a *r;
8244 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_6A];
8246 r = talloc(talloc_tos(), struct spoolss_6a);
8247 if (r == NULL) {
8248 return false;
8251 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
8252 talloc_free(r);
8253 return false;
8256 pull = ndr_pull_init_blob(&blob, r, NULL);
8257 if (pull == NULL) {
8258 talloc_free(r);
8259 return false;
8262 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
8263 ndr_err = call->ndr_pull(pull, NDR_IN, r);
8264 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8265 talloc_free(r);
8266 return false;
8269 if (DEBUGLEVEL >= 10) {
8270 NDR_PRINT_IN_DEBUG(spoolss_6a, r);
8273 r->out.result = _spoolss_6a(p, r);
8275 if (p->rng_fault_state) {
8276 talloc_free(r);
8277 /* Return true here, srv_pipe_hnd.c will take care */
8278 return true;
8281 if (DEBUGLEVEL >= 10) {
8282 NDR_PRINT_OUT_DEBUG(spoolss_6a, r);
8285 push = ndr_push_init_ctx(r, NULL);
8286 if (push == NULL) {
8287 talloc_free(r);
8288 return false;
8291 ndr_err = call->ndr_push(push, NDR_OUT, r);
8292 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8293 talloc_free(r);
8294 return false;
8297 blob = ndr_push_blob(push);
8298 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
8299 talloc_free(r);
8300 return false;
8303 talloc_free(r);
8305 return true;
8308 static bool api_spoolss_6b(pipes_struct *p)
8310 const struct ndr_interface_call *call;
8311 struct ndr_pull *pull;
8312 struct ndr_push *push;
8313 enum ndr_err_code ndr_err;
8314 DATA_BLOB blob;
8315 struct spoolss_6b *r;
8317 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_6B];
8319 r = talloc(talloc_tos(), struct spoolss_6b);
8320 if (r == NULL) {
8321 return false;
8324 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
8325 talloc_free(r);
8326 return false;
8329 pull = ndr_pull_init_blob(&blob, r, NULL);
8330 if (pull == NULL) {
8331 talloc_free(r);
8332 return false;
8335 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
8336 ndr_err = call->ndr_pull(pull, NDR_IN, r);
8337 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8338 talloc_free(r);
8339 return false;
8342 if (DEBUGLEVEL >= 10) {
8343 NDR_PRINT_IN_DEBUG(spoolss_6b, r);
8346 r->out.result = _spoolss_6b(p, r);
8348 if (p->rng_fault_state) {
8349 talloc_free(r);
8350 /* Return true here, srv_pipe_hnd.c will take care */
8351 return true;
8354 if (DEBUGLEVEL >= 10) {
8355 NDR_PRINT_OUT_DEBUG(spoolss_6b, r);
8358 push = ndr_push_init_ctx(r, NULL);
8359 if (push == NULL) {
8360 talloc_free(r);
8361 return false;
8364 ndr_err = call->ndr_push(push, NDR_OUT, r);
8365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8366 talloc_free(r);
8367 return false;
8370 blob = ndr_push_blob(push);
8371 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
8372 talloc_free(r);
8373 return false;
8376 talloc_free(r);
8378 return true;
8381 static bool api_spoolss_6c(pipes_struct *p)
8383 const struct ndr_interface_call *call;
8384 struct ndr_pull *pull;
8385 struct ndr_push *push;
8386 enum ndr_err_code ndr_err;
8387 DATA_BLOB blob;
8388 struct spoolss_6c *r;
8390 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_6C];
8392 r = talloc(talloc_tos(), struct spoolss_6c);
8393 if (r == NULL) {
8394 return false;
8397 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
8398 talloc_free(r);
8399 return false;
8402 pull = ndr_pull_init_blob(&blob, r, NULL);
8403 if (pull == NULL) {
8404 talloc_free(r);
8405 return false;
8408 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
8409 ndr_err = call->ndr_pull(pull, NDR_IN, r);
8410 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8411 talloc_free(r);
8412 return false;
8415 if (DEBUGLEVEL >= 10) {
8416 NDR_PRINT_IN_DEBUG(spoolss_6c, r);
8419 r->out.result = _spoolss_6c(p, r);
8421 if (p->rng_fault_state) {
8422 talloc_free(r);
8423 /* Return true here, srv_pipe_hnd.c will take care */
8424 return true;
8427 if (DEBUGLEVEL >= 10) {
8428 NDR_PRINT_OUT_DEBUG(spoolss_6c, r);
8431 push = ndr_push_init_ctx(r, NULL);
8432 if (push == NULL) {
8433 talloc_free(r);
8434 return false;
8437 ndr_err = call->ndr_push(push, NDR_OUT, r);
8438 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8439 talloc_free(r);
8440 return false;
8443 blob = ndr_push_blob(push);
8444 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
8445 talloc_free(r);
8446 return false;
8449 talloc_free(r);
8451 return true;
8454 static bool api_spoolss_6d(pipes_struct *p)
8456 const struct ndr_interface_call *call;
8457 struct ndr_pull *pull;
8458 struct ndr_push *push;
8459 enum ndr_err_code ndr_err;
8460 DATA_BLOB blob;
8461 struct spoolss_6d *r;
8463 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_6D];
8465 r = talloc(talloc_tos(), struct spoolss_6d);
8466 if (r == NULL) {
8467 return false;
8470 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
8471 talloc_free(r);
8472 return false;
8475 pull = ndr_pull_init_blob(&blob, r, NULL);
8476 if (pull == NULL) {
8477 talloc_free(r);
8478 return false;
8481 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
8482 ndr_err = call->ndr_pull(pull, NDR_IN, r);
8483 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8484 talloc_free(r);
8485 return false;
8488 if (DEBUGLEVEL >= 10) {
8489 NDR_PRINT_IN_DEBUG(spoolss_6d, r);
8492 r->out.result = _spoolss_6d(p, r);
8494 if (p->rng_fault_state) {
8495 talloc_free(r);
8496 /* Return true here, srv_pipe_hnd.c will take care */
8497 return true;
8500 if (DEBUGLEVEL >= 10) {
8501 NDR_PRINT_OUT_DEBUG(spoolss_6d, r);
8504 push = ndr_push_init_ctx(r, NULL);
8505 if (push == NULL) {
8506 talloc_free(r);
8507 return false;
8510 ndr_err = call->ndr_push(push, NDR_OUT, r);
8511 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
8512 talloc_free(r);
8513 return false;
8516 blob = ndr_push_blob(push);
8517 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
8518 talloc_free(r);
8519 return false;
8522 talloc_free(r);
8524 return true;
8528 /* Tables */
8529 static struct api_struct api_spoolss_cmds[] =
8531 {"SPOOLSS_ENUMPRINTERS", NDR_SPOOLSS_ENUMPRINTERS, api_spoolss_EnumPrinters},
8532 {"SPOOLSS_OPENPRINTER", NDR_SPOOLSS_OPENPRINTER, api_spoolss_OpenPrinter},
8533 {"SPOOLSS_SETJOB", NDR_SPOOLSS_SETJOB, api_spoolss_SetJob},
8534 {"SPOOLSS_GETJOB", NDR_SPOOLSS_GETJOB, api_spoolss_GetJob},
8535 {"SPOOLSS_ENUMJOBS", NDR_SPOOLSS_ENUMJOBS, api_spoolss_EnumJobs},
8536 {"SPOOLSS_ADDPRINTER", NDR_SPOOLSS_ADDPRINTER, api_spoolss_AddPrinter},
8537 {"SPOOLSS_DELETEPRINTER", NDR_SPOOLSS_DELETEPRINTER, api_spoolss_DeletePrinter},
8538 {"SPOOLSS_SETPRINTER", NDR_SPOOLSS_SETPRINTER, api_spoolss_SetPrinter},
8539 {"SPOOLSS_GETPRINTER", NDR_SPOOLSS_GETPRINTER, api_spoolss_GetPrinter},
8540 {"SPOOLSS_ADDPRINTERDRIVER", NDR_SPOOLSS_ADDPRINTERDRIVER, api_spoolss_AddPrinterDriver},
8541 {"SPOOLSS_ENUMPRINTERDRIVERS", NDR_SPOOLSS_ENUMPRINTERDRIVERS, api_spoolss_EnumPrinterDrivers},
8542 {"SPOOLSS_GETPRINTERDRIVER", NDR_SPOOLSS_GETPRINTERDRIVER, api_spoolss_GetPrinterDriver},
8543 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_GetPrinterDriverDirectory},
8544 {"SPOOLSS_DELETEPRINTERDRIVER", NDR_SPOOLSS_DELETEPRINTERDRIVER, api_spoolss_DeletePrinterDriver},
8545 {"SPOOLSS_ADDPRINTPROCESSOR", NDR_SPOOLSS_ADDPRINTPROCESSOR, api_spoolss_AddPrintProcessor},
8546 {"SPOOLSS_ENUMPRINTPROCESSORS", NDR_SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_EnumPrintProcessors},
8547 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY", NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY, api_spoolss_GetPrintProcessorDirectory},
8548 {"SPOOLSS_STARTDOCPRINTER", NDR_SPOOLSS_STARTDOCPRINTER, api_spoolss_StartDocPrinter},
8549 {"SPOOLSS_STARTPAGEPRINTER", NDR_SPOOLSS_STARTPAGEPRINTER, api_spoolss_StartPagePrinter},
8550 {"SPOOLSS_WRITEPRINTER", NDR_SPOOLSS_WRITEPRINTER, api_spoolss_WritePrinter},
8551 {"SPOOLSS_ENDPAGEPRINTER", NDR_SPOOLSS_ENDPAGEPRINTER, api_spoolss_EndPagePrinter},
8552 {"SPOOLSS_ABORTPRINTER", NDR_SPOOLSS_ABORTPRINTER, api_spoolss_AbortPrinter},
8553 {"SPOOLSS_READPRINTER", NDR_SPOOLSS_READPRINTER, api_spoolss_ReadPrinter},
8554 {"SPOOLSS_ENDDOCPRINTER", NDR_SPOOLSS_ENDDOCPRINTER, api_spoolss_EndDocPrinter},
8555 {"SPOOLSS_ADDJOB", NDR_SPOOLSS_ADDJOB, api_spoolss_AddJob},
8556 {"SPOOLSS_SCHEDULEJOB", NDR_SPOOLSS_SCHEDULEJOB, api_spoolss_ScheduleJob},
8557 {"SPOOLSS_GETPRINTERDATA", NDR_SPOOLSS_GETPRINTERDATA, api_spoolss_GetPrinterData},
8558 {"SPOOLSS_SETPRINTERDATA", NDR_SPOOLSS_SETPRINTERDATA, api_spoolss_SetPrinterData},
8559 {"SPOOLSS_WAITFORPRINTERCHANGE", NDR_SPOOLSS_WAITFORPRINTERCHANGE, api_spoolss_WaitForPrinterChange},
8560 {"SPOOLSS_CLOSEPRINTER", NDR_SPOOLSS_CLOSEPRINTER, api_spoolss_ClosePrinter},
8561 {"SPOOLSS_ADDFORM", NDR_SPOOLSS_ADDFORM, api_spoolss_AddForm},
8562 {"SPOOLSS_DELETEFORM", NDR_SPOOLSS_DELETEFORM, api_spoolss_DeleteForm},
8563 {"SPOOLSS_GETFORM", NDR_SPOOLSS_GETFORM, api_spoolss_GetForm},
8564 {"SPOOLSS_SETFORM", NDR_SPOOLSS_SETFORM, api_spoolss_SetForm},
8565 {"SPOOLSS_ENUMFORMS", NDR_SPOOLSS_ENUMFORMS, api_spoolss_EnumForms},
8566 {"SPOOLSS_ENUMPORTS", NDR_SPOOLSS_ENUMPORTS, api_spoolss_EnumPorts},
8567 {"SPOOLSS_ENUMMONITORS", NDR_SPOOLSS_ENUMMONITORS, api_spoolss_EnumMonitors},
8568 {"SPOOLSS_ADDPORT", NDR_SPOOLSS_ADDPORT, api_spoolss_AddPort},
8569 {"SPOOLSS_CONFIGUREPORT", NDR_SPOOLSS_CONFIGUREPORT, api_spoolss_ConfigurePort},
8570 {"SPOOLSS_DELETEPORT", NDR_SPOOLSS_DELETEPORT, api_spoolss_DeletePort},
8571 {"SPOOLSS_CREATEPRINTERIC", NDR_SPOOLSS_CREATEPRINTERIC, api_spoolss_CreatePrinterIC},
8572 {"SPOOLSS_PLAYGDISCRIPTONPRINTERIC", NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC, api_spoolss_PlayGDIScriptOnPrinterIC},
8573 {"SPOOLSS_DELETEPRINTERIC", NDR_SPOOLSS_DELETEPRINTERIC, api_spoolss_DeletePrinterIC},
8574 {"SPOOLSS_ADDPRINTERCONNECTION", NDR_SPOOLSS_ADDPRINTERCONNECTION, api_spoolss_AddPrinterConnection},
8575 {"SPOOLSS_DELETEPRINTERCONNECTION", NDR_SPOOLSS_DELETEPRINTERCONNECTION, api_spoolss_DeletePrinterConnection},
8576 {"SPOOLSS_PRINTERMESSAGEBOX", NDR_SPOOLSS_PRINTERMESSAGEBOX, api_spoolss_PrinterMessageBox},
8577 {"SPOOLSS_ADDMONITOR", NDR_SPOOLSS_ADDMONITOR, api_spoolss_AddMonitor},
8578 {"SPOOLSS_DELETEMONITOR", NDR_SPOOLSS_DELETEMONITOR, api_spoolss_DeleteMonitor},
8579 {"SPOOLSS_DELETEPRINTPROCESSOR", NDR_SPOOLSS_DELETEPRINTPROCESSOR, api_spoolss_DeletePrintProcessor},
8580 {"SPOOLSS_ADDPRINTPROVIDOR", NDR_SPOOLSS_ADDPRINTPROVIDOR, api_spoolss_AddPrintProvidor},
8581 {"SPOOLSS_DELETEPRINTPROVIDOR", NDR_SPOOLSS_DELETEPRINTPROVIDOR, api_spoolss_DeletePrintProvidor},
8582 {"SPOOLSS_ENUMPRINTPROCDATATYPES", NDR_SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_EnumPrintProcDataTypes},
8583 {"SPOOLSS_RESETPRINTER", NDR_SPOOLSS_RESETPRINTER, api_spoolss_ResetPrinter},
8584 {"SPOOLSS_GETPRINTERDRIVER2", NDR_SPOOLSS_GETPRINTERDRIVER2, api_spoolss_GetPrinterDriver2},
8585 {"SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_FindFirstPrinterChangeNotification},
8586 {"SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION, api_spoolss_FindNextPrinterChangeNotification},
8587 {"SPOOLSS_FINDCLOSEPRINTERNOTIFY", NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY, api_spoolss_FindClosePrinterNotify},
8588 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD, api_spoolss_RouterFindFirstPrinterChangeNotificationOld},
8589 {"SPOOLSS_REPLYOPENPRINTER", NDR_SPOOLSS_REPLYOPENPRINTER, api_spoolss_ReplyOpenPrinter},
8590 {"SPOOLSS_ROUTERREPLYPRINTER", NDR_SPOOLSS_ROUTERREPLYPRINTER, api_spoolss_RouterReplyPrinter},
8591 {"SPOOLSS_REPLYCLOSEPRINTER", NDR_SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_ReplyClosePrinter},
8592 {"SPOOLSS_ADDPORTEX", NDR_SPOOLSS_ADDPORTEX, api_spoolss_AddPortEx},
8593 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_RouterFindFirstPrinterChangeNotification},
8594 {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT, api_spoolss_SpoolerInit},
8595 {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX, api_spoolss_ResetPrinterEx},
8596 {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx},
8597 {"SPOOLSS_ROUTERREPLYPRINTEREX", NDR_SPOOLSS_ROUTERREPLYPRINTEREX, api_spoolss_RouterReplyPrinterEx},
8598 {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY, api_spoolss_RouterRefreshPrinterChangeNotify},
8599 {"SPOOLSS_44", NDR_SPOOLSS_44, api_spoolss_44},
8600 {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX, api_spoolss_OpenPrinterEx},
8601 {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX, api_spoolss_AddPrinterEx},
8602 {"SPOOLSS_47", NDR_SPOOLSS_47, api_spoolss_47},
8603 {"SPOOLSS_ENUMPRINTERDATA", NDR_SPOOLSS_ENUMPRINTERDATA, api_spoolss_EnumPrinterData},
8604 {"SPOOLSS_DELETEPRINTERDATA", NDR_SPOOLSS_DELETEPRINTERDATA, api_spoolss_DeletePrinterData},
8605 {"SPOOLSS_4A", NDR_SPOOLSS_4A, api_spoolss_4a},
8606 {"SPOOLSS_4B", NDR_SPOOLSS_4B, api_spoolss_4b},
8607 {"SPOOLSS_4C", NDR_SPOOLSS_4C, api_spoolss_4c},
8608 {"SPOOLSS_SETPRINTERDATAEX", NDR_SPOOLSS_SETPRINTERDATAEX, api_spoolss_SetPrinterDataEx},
8609 {"SPOOLSS_GETPRINTERDATAEX", NDR_SPOOLSS_GETPRINTERDATAEX, api_spoolss_GetPrinterDataEx},
8610 {"SPOOLSS_ENUMPRINTERDATAEX", NDR_SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_EnumPrinterDataEx},
8611 {"SPOOLSS_ENUMPRINTERKEY", NDR_SPOOLSS_ENUMPRINTERKEY, api_spoolss_EnumPrinterKey},
8612 {"SPOOLSS_DELETEPRINTERDATAEX", NDR_SPOOLSS_DELETEPRINTERDATAEX, api_spoolss_DeletePrinterDataEx},
8613 {"SPOOLSS_DELETEPRINTERKEY", NDR_SPOOLSS_DELETEPRINTERKEY, api_spoolss_DeletePrinterKey},
8614 {"SPOOLSS_53", NDR_SPOOLSS_53, api_spoolss_53},
8615 {"SPOOLSS_DELETEPRINTERDRIVEREX", NDR_SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_DeletePrinterDriverEx},
8616 {"SPOOLSS_55", NDR_SPOOLSS_55, api_spoolss_55},
8617 {"SPOOLSS_56", NDR_SPOOLSS_56, api_spoolss_56},
8618 {"SPOOLSS_57", NDR_SPOOLSS_57, api_spoolss_57},
8619 {"SPOOLSS_XCVDATA", NDR_SPOOLSS_XCVDATA, api_spoolss_XcvData},
8620 {"SPOOLSS_ADDPRINTERDRIVEREX", NDR_SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_AddPrinterDriverEx},
8621 {"SPOOLSS_5A", NDR_SPOOLSS_5A, api_spoolss_5a},
8622 {"SPOOLSS_5B", NDR_SPOOLSS_5B, api_spoolss_5b},
8623 {"SPOOLSS_5C", NDR_SPOOLSS_5C, api_spoolss_5c},
8624 {"SPOOLSS_5D", NDR_SPOOLSS_5D, api_spoolss_5d},
8625 {"SPOOLSS_5E", NDR_SPOOLSS_5E, api_spoolss_5e},
8626 {"SPOOLSS_5F", NDR_SPOOLSS_5F, api_spoolss_5f},
8627 {"SPOOLSS_60", NDR_SPOOLSS_60, api_spoolss_60},
8628 {"SPOOLSS_61", NDR_SPOOLSS_61, api_spoolss_61},
8629 {"SPOOLSS_62", NDR_SPOOLSS_62, api_spoolss_62},
8630 {"SPOOLSS_63", NDR_SPOOLSS_63, api_spoolss_63},
8631 {"SPOOLSS_64", NDR_SPOOLSS_64, api_spoolss_64},
8632 {"SPOOLSS_65", NDR_SPOOLSS_65, api_spoolss_65},
8633 {"SPOOLSS_GETCOREPRINTERDRIVERS", NDR_SPOOLSS_GETCOREPRINTERDRIVERS, api_spoolss_GetCorePrinterDrivers},
8634 {"SPOOLSS_67", NDR_SPOOLSS_67, api_spoolss_67},
8635 {"SPOOLSS_GETPRINTERDRIVERPACKAGEPATH", NDR_SPOOLSS_GETPRINTERDRIVERPACKAGEPATH, api_spoolss_GetPrinterDriverPackagePath},
8636 {"SPOOLSS_69", NDR_SPOOLSS_69, api_spoolss_69},
8637 {"SPOOLSS_6A", NDR_SPOOLSS_6A, api_spoolss_6a},
8638 {"SPOOLSS_6B", NDR_SPOOLSS_6B, api_spoolss_6b},
8639 {"SPOOLSS_6C", NDR_SPOOLSS_6C, api_spoolss_6c},
8640 {"SPOOLSS_6D", NDR_SPOOLSS_6D, api_spoolss_6d},
8643 void spoolss_get_pipe_fns(struct api_struct **fns, int *n_fns)
8645 *fns = api_spoolss_cmds;
8646 *n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
8649 NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
8651 if (cli->pipes_struct == NULL) {
8652 return NT_STATUS_INVALID_PARAMETER;
8655 switch (opnum)
8657 case NDR_SPOOLSS_ENUMPRINTERS: {
8658 struct spoolss_EnumPrinters *r = (struct spoolss_EnumPrinters *)_r;
8659 ZERO_STRUCT(r->out);
8660 r->out.count = talloc_zero(mem_ctx, uint32_t);
8661 if (r->out.count == NULL) {
8662 return NT_STATUS_NO_MEMORY;
8665 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo *);
8666 if (r->out.info == NULL) {
8667 return NT_STATUS_NO_MEMORY;
8670 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8671 if (r->out.needed == NULL) {
8672 return NT_STATUS_NO_MEMORY;
8675 r->out.result = _spoolss_EnumPrinters(cli->pipes_struct, r);
8676 return NT_STATUS_OK;
8679 case NDR_SPOOLSS_OPENPRINTER: {
8680 struct spoolss_OpenPrinter *r = (struct spoolss_OpenPrinter *)_r;
8681 ZERO_STRUCT(r->out);
8682 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8683 if (r->out.handle == NULL) {
8684 return NT_STATUS_NO_MEMORY;
8687 r->out.result = _spoolss_OpenPrinter(cli->pipes_struct, r);
8688 return NT_STATUS_OK;
8691 case NDR_SPOOLSS_SETJOB: {
8692 struct spoolss_SetJob *r = (struct spoolss_SetJob *)_r;
8693 r->out.result = _spoolss_SetJob(cli->pipes_struct, r);
8694 return NT_STATUS_OK;
8697 case NDR_SPOOLSS_GETJOB: {
8698 struct spoolss_GetJob *r = (struct spoolss_GetJob *)_r;
8699 ZERO_STRUCT(r->out);
8700 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo);
8701 if (r->out.info == NULL) {
8702 return NT_STATUS_NO_MEMORY;
8705 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8706 if (r->out.needed == NULL) {
8707 return NT_STATUS_NO_MEMORY;
8710 r->out.result = _spoolss_GetJob(cli->pipes_struct, r);
8711 return NT_STATUS_OK;
8714 case NDR_SPOOLSS_ENUMJOBS: {
8715 struct spoolss_EnumJobs *r = (struct spoolss_EnumJobs *)_r;
8716 ZERO_STRUCT(r->out);
8717 r->out.count = talloc_zero(mem_ctx, uint32_t);
8718 if (r->out.count == NULL) {
8719 return NT_STATUS_NO_MEMORY;
8722 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo *);
8723 if (r->out.info == NULL) {
8724 return NT_STATUS_NO_MEMORY;
8727 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8728 if (r->out.needed == NULL) {
8729 return NT_STATUS_NO_MEMORY;
8732 r->out.result = _spoolss_EnumJobs(cli->pipes_struct, r);
8733 return NT_STATUS_OK;
8736 case NDR_SPOOLSS_ADDPRINTER: {
8737 struct spoolss_AddPrinter *r = (struct spoolss_AddPrinter *)_r;
8738 ZERO_STRUCT(r->out);
8739 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8740 if (r->out.handle == NULL) {
8741 return NT_STATUS_NO_MEMORY;
8744 r->out.result = _spoolss_AddPrinter(cli->pipes_struct, r);
8745 return NT_STATUS_OK;
8748 case NDR_SPOOLSS_DELETEPRINTER: {
8749 struct spoolss_DeletePrinter *r = (struct spoolss_DeletePrinter *)_r;
8750 r->out.result = _spoolss_DeletePrinter(cli->pipes_struct, r);
8751 return NT_STATUS_OK;
8754 case NDR_SPOOLSS_SETPRINTER: {
8755 struct spoolss_SetPrinter *r = (struct spoolss_SetPrinter *)_r;
8756 r->out.result = _spoolss_SetPrinter(cli->pipes_struct, r);
8757 return NT_STATUS_OK;
8760 case NDR_SPOOLSS_GETPRINTER: {
8761 struct spoolss_GetPrinter *r = (struct spoolss_GetPrinter *)_r;
8762 ZERO_STRUCT(r->out);
8763 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo);
8764 if (r->out.info == NULL) {
8765 return NT_STATUS_NO_MEMORY;
8768 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8769 if (r->out.needed == NULL) {
8770 return NT_STATUS_NO_MEMORY;
8773 r->out.result = _spoolss_GetPrinter(cli->pipes_struct, r);
8774 return NT_STATUS_OK;
8777 case NDR_SPOOLSS_ADDPRINTERDRIVER: {
8778 struct spoolss_AddPrinterDriver *r = (struct spoolss_AddPrinterDriver *)_r;
8779 r->out.result = _spoolss_AddPrinterDriver(cli->pipes_struct, r);
8780 return NT_STATUS_OK;
8783 case NDR_SPOOLSS_ENUMPRINTERDRIVERS: {
8784 struct spoolss_EnumPrinterDrivers *r = (struct spoolss_EnumPrinterDrivers *)_r;
8785 ZERO_STRUCT(r->out);
8786 r->out.count = talloc_zero(mem_ctx, uint32_t);
8787 if (r->out.count == NULL) {
8788 return NT_STATUS_NO_MEMORY;
8791 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo *);
8792 if (r->out.info == NULL) {
8793 return NT_STATUS_NO_MEMORY;
8796 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8797 if (r->out.needed == NULL) {
8798 return NT_STATUS_NO_MEMORY;
8801 r->out.result = _spoolss_EnumPrinterDrivers(cli->pipes_struct, r);
8802 return NT_STATUS_OK;
8805 case NDR_SPOOLSS_GETPRINTERDRIVER: {
8806 struct spoolss_GetPrinterDriver *r = (struct spoolss_GetPrinterDriver *)_r;
8807 ZERO_STRUCT(r->out);
8808 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo);
8809 if (r->out.info == NULL) {
8810 return NT_STATUS_NO_MEMORY;
8813 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8814 if (r->out.needed == NULL) {
8815 return NT_STATUS_NO_MEMORY;
8818 r->out.result = _spoolss_GetPrinterDriver(cli->pipes_struct, r);
8819 return NT_STATUS_OK;
8822 case NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY: {
8823 struct spoolss_GetPrinterDriverDirectory *r = (struct spoolss_GetPrinterDriverDirectory *)_r;
8824 ZERO_STRUCT(r->out);
8825 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverDirectoryInfo);
8826 if (r->out.info == NULL) {
8827 return NT_STATUS_NO_MEMORY;
8830 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8831 if (r->out.needed == NULL) {
8832 return NT_STATUS_NO_MEMORY;
8835 r->out.result = _spoolss_GetPrinterDriverDirectory(cli->pipes_struct, r);
8836 return NT_STATUS_OK;
8839 case NDR_SPOOLSS_DELETEPRINTERDRIVER: {
8840 struct spoolss_DeletePrinterDriver *r = (struct spoolss_DeletePrinterDriver *)_r;
8841 r->out.result = _spoolss_DeletePrinterDriver(cli->pipes_struct, r);
8842 return NT_STATUS_OK;
8845 case NDR_SPOOLSS_ADDPRINTPROCESSOR: {
8846 struct spoolss_AddPrintProcessor *r = (struct spoolss_AddPrintProcessor *)_r;
8847 r->out.result = _spoolss_AddPrintProcessor(cli->pipes_struct, r);
8848 return NT_STATUS_OK;
8851 case NDR_SPOOLSS_ENUMPRINTPROCESSORS: {
8852 struct spoolss_EnumPrintProcessors *r = (struct spoolss_EnumPrintProcessors *)_r;
8853 ZERO_STRUCT(r->out);
8854 r->out.count = talloc_zero(mem_ctx, uint32_t);
8855 if (r->out.count == NULL) {
8856 return NT_STATUS_NO_MEMORY;
8859 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorInfo *);
8860 if (r->out.info == NULL) {
8861 return NT_STATUS_NO_MEMORY;
8864 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8865 if (r->out.needed == NULL) {
8866 return NT_STATUS_NO_MEMORY;
8869 r->out.result = _spoolss_EnumPrintProcessors(cli->pipes_struct, r);
8870 return NT_STATUS_OK;
8873 case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY: {
8874 struct spoolss_GetPrintProcessorDirectory *r = (struct spoolss_GetPrintProcessorDirectory *)_r;
8875 ZERO_STRUCT(r->out);
8876 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcessorDirectoryInfo);
8877 if (r->out.info == NULL) {
8878 return NT_STATUS_NO_MEMORY;
8881 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8882 if (r->out.needed == NULL) {
8883 return NT_STATUS_NO_MEMORY;
8886 r->out.result = _spoolss_GetPrintProcessorDirectory(cli->pipes_struct, r);
8887 return NT_STATUS_OK;
8890 case NDR_SPOOLSS_STARTDOCPRINTER: {
8891 struct spoolss_StartDocPrinter *r = (struct spoolss_StartDocPrinter *)_r;
8892 ZERO_STRUCT(r->out);
8893 r->out.job_id = talloc_zero(mem_ctx, uint32_t);
8894 if (r->out.job_id == NULL) {
8895 return NT_STATUS_NO_MEMORY;
8898 r->out.result = _spoolss_StartDocPrinter(cli->pipes_struct, r);
8899 return NT_STATUS_OK;
8902 case NDR_SPOOLSS_STARTPAGEPRINTER: {
8903 struct spoolss_StartPagePrinter *r = (struct spoolss_StartPagePrinter *)_r;
8904 r->out.result = _spoolss_StartPagePrinter(cli->pipes_struct, r);
8905 return NT_STATUS_OK;
8908 case NDR_SPOOLSS_WRITEPRINTER: {
8909 struct spoolss_WritePrinter *r = (struct spoolss_WritePrinter *)_r;
8910 ZERO_STRUCT(r->out);
8911 r->out.num_written = talloc_zero(mem_ctx, uint32_t);
8912 if (r->out.num_written == NULL) {
8913 return NT_STATUS_NO_MEMORY;
8916 r->out.result = _spoolss_WritePrinter(cli->pipes_struct, r);
8917 return NT_STATUS_OK;
8920 case NDR_SPOOLSS_ENDPAGEPRINTER: {
8921 struct spoolss_EndPagePrinter *r = (struct spoolss_EndPagePrinter *)_r;
8922 r->out.result = _spoolss_EndPagePrinter(cli->pipes_struct, r);
8923 return NT_STATUS_OK;
8926 case NDR_SPOOLSS_ABORTPRINTER: {
8927 struct spoolss_AbortPrinter *r = (struct spoolss_AbortPrinter *)_r;
8928 r->out.result = _spoolss_AbortPrinter(cli->pipes_struct, r);
8929 return NT_STATUS_OK;
8932 case NDR_SPOOLSS_READPRINTER: {
8933 struct spoolss_ReadPrinter *r = (struct spoolss_ReadPrinter *)_r;
8934 ZERO_STRUCT(r->out);
8935 r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_size);
8936 if (r->out.data == NULL) {
8937 return NT_STATUS_NO_MEMORY;
8940 r->out._data_size = talloc_zero(mem_ctx, uint32_t);
8941 if (r->out._data_size == NULL) {
8942 return NT_STATUS_NO_MEMORY;
8945 r->out.result = _spoolss_ReadPrinter(cli->pipes_struct, r);
8946 return NT_STATUS_OK;
8949 case NDR_SPOOLSS_ENDDOCPRINTER: {
8950 struct spoolss_EndDocPrinter *r = (struct spoolss_EndDocPrinter *)_r;
8951 r->out.result = _spoolss_EndDocPrinter(cli->pipes_struct, r);
8952 return NT_STATUS_OK;
8955 case NDR_SPOOLSS_ADDJOB: {
8956 struct spoolss_AddJob *r = (struct spoolss_AddJob *)_r;
8957 ZERO_STRUCT(r->out);
8958 r->out.buffer = r->in.buffer;
8959 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8960 if (r->out.needed == NULL) {
8961 return NT_STATUS_NO_MEMORY;
8964 r->out.result = _spoolss_AddJob(cli->pipes_struct, r);
8965 return NT_STATUS_OK;
8968 case NDR_SPOOLSS_SCHEDULEJOB: {
8969 struct spoolss_ScheduleJob *r = (struct spoolss_ScheduleJob *)_r;
8970 r->out.result = _spoolss_ScheduleJob(cli->pipes_struct, r);
8971 return NT_STATUS_OK;
8974 case NDR_SPOOLSS_GETPRINTERDATA: {
8975 struct spoolss_GetPrinterData *r = (struct spoolss_GetPrinterData *)_r;
8976 ZERO_STRUCT(r->out);
8977 r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
8978 if (r->out.type == NULL) {
8979 return NT_STATUS_NO_MEMORY;
8982 r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData);
8983 if (r->out.data == NULL) {
8984 return NT_STATUS_NO_MEMORY;
8987 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8988 if (r->out.needed == NULL) {
8989 return NT_STATUS_NO_MEMORY;
8992 r->out.result = _spoolss_GetPrinterData(cli->pipes_struct, r);
8993 return NT_STATUS_OK;
8996 case NDR_SPOOLSS_SETPRINTERDATA: {
8997 struct spoolss_SetPrinterData *r = (struct spoolss_SetPrinterData *)_r;
8998 r->out.result = _spoolss_SetPrinterData(cli->pipes_struct, r);
8999 return NT_STATUS_OK;
9002 case NDR_SPOOLSS_WAITFORPRINTERCHANGE: {
9003 struct spoolss_WaitForPrinterChange *r = (struct spoolss_WaitForPrinterChange *)_r;
9004 r->out.result = _spoolss_WaitForPrinterChange(cli->pipes_struct, r);
9005 return NT_STATUS_OK;
9008 case NDR_SPOOLSS_CLOSEPRINTER: {
9009 struct spoolss_ClosePrinter *r = (struct spoolss_ClosePrinter *)_r;
9010 ZERO_STRUCT(r->out);
9011 r->out.handle = r->in.handle;
9012 r->out.result = _spoolss_ClosePrinter(cli->pipes_struct, r);
9013 return NT_STATUS_OK;
9016 case NDR_SPOOLSS_ADDFORM: {
9017 struct spoolss_AddForm *r = (struct spoolss_AddForm *)_r;
9018 r->out.result = _spoolss_AddForm(cli->pipes_struct, r);
9019 return NT_STATUS_OK;
9022 case NDR_SPOOLSS_DELETEFORM: {
9023 struct spoolss_DeleteForm *r = (struct spoolss_DeleteForm *)_r;
9024 r->out.result = _spoolss_DeleteForm(cli->pipes_struct, r);
9025 return NT_STATUS_OK;
9028 case NDR_SPOOLSS_GETFORM: {
9029 struct spoolss_GetForm *r = (struct spoolss_GetForm *)_r;
9030 ZERO_STRUCT(r->out);
9031 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo);
9032 if (r->out.info == NULL) {
9033 return NT_STATUS_NO_MEMORY;
9036 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9037 if (r->out.needed == NULL) {
9038 return NT_STATUS_NO_MEMORY;
9041 r->out.result = _spoolss_GetForm(cli->pipes_struct, r);
9042 return NT_STATUS_OK;
9045 case NDR_SPOOLSS_SETFORM: {
9046 struct spoolss_SetForm *r = (struct spoolss_SetForm *)_r;
9047 r->out.result = _spoolss_SetForm(cli->pipes_struct, r);
9048 return NT_STATUS_OK;
9051 case NDR_SPOOLSS_ENUMFORMS: {
9052 struct spoolss_EnumForms *r = (struct spoolss_EnumForms *)_r;
9053 ZERO_STRUCT(r->out);
9054 r->out.count = talloc_zero(mem_ctx, uint32_t);
9055 if (r->out.count == NULL) {
9056 return NT_STATUS_NO_MEMORY;
9059 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo *);
9060 if (r->out.info == NULL) {
9061 return NT_STATUS_NO_MEMORY;
9064 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9065 if (r->out.needed == NULL) {
9066 return NT_STATUS_NO_MEMORY;
9069 r->out.result = _spoolss_EnumForms(cli->pipes_struct, r);
9070 return NT_STATUS_OK;
9073 case NDR_SPOOLSS_ENUMPORTS: {
9074 struct spoolss_EnumPorts *r = (struct spoolss_EnumPorts *)_r;
9075 ZERO_STRUCT(r->out);
9076 r->out.count = talloc_zero(mem_ctx, uint32_t);
9077 if (r->out.count == NULL) {
9078 return NT_STATUS_NO_MEMORY;
9081 r->out.info = talloc_zero(mem_ctx, union spoolss_PortInfo *);
9082 if (r->out.info == NULL) {
9083 return NT_STATUS_NO_MEMORY;
9086 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9087 if (r->out.needed == NULL) {
9088 return NT_STATUS_NO_MEMORY;
9091 r->out.result = _spoolss_EnumPorts(cli->pipes_struct, r);
9092 return NT_STATUS_OK;
9095 case NDR_SPOOLSS_ENUMMONITORS: {
9096 struct spoolss_EnumMonitors *r = (struct spoolss_EnumMonitors *)_r;
9097 ZERO_STRUCT(r->out);
9098 r->out.count = talloc_zero(mem_ctx, uint32_t);
9099 if (r->out.count == NULL) {
9100 return NT_STATUS_NO_MEMORY;
9103 r->out.info = talloc_zero(mem_ctx, union spoolss_MonitorInfo *);
9104 if (r->out.info == NULL) {
9105 return NT_STATUS_NO_MEMORY;
9108 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9109 if (r->out.needed == NULL) {
9110 return NT_STATUS_NO_MEMORY;
9113 r->out.result = _spoolss_EnumMonitors(cli->pipes_struct, r);
9114 return NT_STATUS_OK;
9117 case NDR_SPOOLSS_ADDPORT: {
9118 struct spoolss_AddPort *r = (struct spoolss_AddPort *)_r;
9119 r->out.result = _spoolss_AddPort(cli->pipes_struct, r);
9120 return NT_STATUS_OK;
9123 case NDR_SPOOLSS_CONFIGUREPORT: {
9124 struct spoolss_ConfigurePort *r = (struct spoolss_ConfigurePort *)_r;
9125 r->out.result = _spoolss_ConfigurePort(cli->pipes_struct, r);
9126 return NT_STATUS_OK;
9129 case NDR_SPOOLSS_DELETEPORT: {
9130 struct spoolss_DeletePort *r = (struct spoolss_DeletePort *)_r;
9131 r->out.result = _spoolss_DeletePort(cli->pipes_struct, r);
9132 return NT_STATUS_OK;
9135 case NDR_SPOOLSS_CREATEPRINTERIC: {
9136 struct spoolss_CreatePrinterIC *r = (struct spoolss_CreatePrinterIC *)_r;
9137 ZERO_STRUCT(r->out);
9138 r->out.gdi_handle = talloc_zero(mem_ctx, struct policy_handle);
9139 if (r->out.gdi_handle == NULL) {
9140 return NT_STATUS_NO_MEMORY;
9143 r->out.result = _spoolss_CreatePrinterIC(cli->pipes_struct, r);
9144 return NT_STATUS_OK;
9147 case NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC: {
9148 struct spoolss_PlayGDIScriptOnPrinterIC *r = (struct spoolss_PlayGDIScriptOnPrinterIC *)_r;
9149 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(cli->pipes_struct, r);
9150 return NT_STATUS_OK;
9153 case NDR_SPOOLSS_DELETEPRINTERIC: {
9154 struct spoolss_DeletePrinterIC *r = (struct spoolss_DeletePrinterIC *)_r;
9155 ZERO_STRUCT(r->out);
9156 r->out.gdi_handle = r->in.gdi_handle;
9157 r->out.result = _spoolss_DeletePrinterIC(cli->pipes_struct, r);
9158 return NT_STATUS_OK;
9161 case NDR_SPOOLSS_ADDPRINTERCONNECTION: {
9162 struct spoolss_AddPrinterConnection *r = (struct spoolss_AddPrinterConnection *)_r;
9163 r->out.result = _spoolss_AddPrinterConnection(cli->pipes_struct, r);
9164 return NT_STATUS_OK;
9167 case NDR_SPOOLSS_DELETEPRINTERCONNECTION: {
9168 struct spoolss_DeletePrinterConnection *r = (struct spoolss_DeletePrinterConnection *)_r;
9169 r->out.result = _spoolss_DeletePrinterConnection(cli->pipes_struct, r);
9170 return NT_STATUS_OK;
9173 case NDR_SPOOLSS_PRINTERMESSAGEBOX: {
9174 struct spoolss_PrinterMessageBox *r = (struct spoolss_PrinterMessageBox *)_r;
9175 r->out.result = _spoolss_PrinterMessageBox(cli->pipes_struct, r);
9176 return NT_STATUS_OK;
9179 case NDR_SPOOLSS_ADDMONITOR: {
9180 struct spoolss_AddMonitor *r = (struct spoolss_AddMonitor *)_r;
9181 r->out.result = _spoolss_AddMonitor(cli->pipes_struct, r);
9182 return NT_STATUS_OK;
9185 case NDR_SPOOLSS_DELETEMONITOR: {
9186 struct spoolss_DeleteMonitor *r = (struct spoolss_DeleteMonitor *)_r;
9187 r->out.result = _spoolss_DeleteMonitor(cli->pipes_struct, r);
9188 return NT_STATUS_OK;
9191 case NDR_SPOOLSS_DELETEPRINTPROCESSOR: {
9192 struct spoolss_DeletePrintProcessor *r = (struct spoolss_DeletePrintProcessor *)_r;
9193 r->out.result = _spoolss_DeletePrintProcessor(cli->pipes_struct, r);
9194 return NT_STATUS_OK;
9197 case NDR_SPOOLSS_ADDPRINTPROVIDOR: {
9198 struct spoolss_AddPrintProvidor *r = (struct spoolss_AddPrintProvidor *)_r;
9199 r->out.result = _spoolss_AddPrintProvidor(cli->pipes_struct, r);
9200 return NT_STATUS_OK;
9203 case NDR_SPOOLSS_DELETEPRINTPROVIDOR: {
9204 struct spoolss_DeletePrintProvidor *r = (struct spoolss_DeletePrintProvidor *)_r;
9205 r->out.result = _spoolss_DeletePrintProvidor(cli->pipes_struct, r);
9206 return NT_STATUS_OK;
9209 case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES: {
9210 struct spoolss_EnumPrintProcDataTypes *r = (struct spoolss_EnumPrintProcDataTypes *)_r;
9211 ZERO_STRUCT(r->out);
9212 r->out.count = talloc_zero(mem_ctx, uint32_t);
9213 if (r->out.count == NULL) {
9214 return NT_STATUS_NO_MEMORY;
9217 r->out.info = talloc_zero(mem_ctx, union spoolss_PrintProcDataTypesInfo *);
9218 if (r->out.info == NULL) {
9219 return NT_STATUS_NO_MEMORY;
9222 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9223 if (r->out.needed == NULL) {
9224 return NT_STATUS_NO_MEMORY;
9227 r->out.result = _spoolss_EnumPrintProcDataTypes(cli->pipes_struct, r);
9228 return NT_STATUS_OK;
9231 case NDR_SPOOLSS_RESETPRINTER: {
9232 struct spoolss_ResetPrinter *r = (struct spoolss_ResetPrinter *)_r;
9233 r->out.result = _spoolss_ResetPrinter(cli->pipes_struct, r);
9234 return NT_STATUS_OK;
9237 case NDR_SPOOLSS_GETPRINTERDRIVER2: {
9238 struct spoolss_GetPrinterDriver2 *r = (struct spoolss_GetPrinterDriver2 *)_r;
9239 ZERO_STRUCT(r->out);
9240 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverInfo);
9241 if (r->out.info == NULL) {
9242 return NT_STATUS_NO_MEMORY;
9245 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9246 if (r->out.needed == NULL) {
9247 return NT_STATUS_NO_MEMORY;
9250 r->out.server_major_version = talloc_zero(mem_ctx, uint32_t);
9251 if (r->out.server_major_version == NULL) {
9252 return NT_STATUS_NO_MEMORY;
9255 r->out.server_minor_version = talloc_zero(mem_ctx, uint32_t);
9256 if (r->out.server_minor_version == NULL) {
9257 return NT_STATUS_NO_MEMORY;
9260 r->out.result = _spoolss_GetPrinterDriver2(cli->pipes_struct, r);
9261 return NT_STATUS_OK;
9264 case NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION: {
9265 struct spoolss_FindFirstPrinterChangeNotification *r = (struct spoolss_FindFirstPrinterChangeNotification *)_r;
9266 r->out.result = _spoolss_FindFirstPrinterChangeNotification(cli->pipes_struct, r);
9267 return NT_STATUS_OK;
9270 case NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION: {
9271 struct spoolss_FindNextPrinterChangeNotification *r = (struct spoolss_FindNextPrinterChangeNotification *)_r;
9272 r->out.result = _spoolss_FindNextPrinterChangeNotification(cli->pipes_struct, r);
9273 return NT_STATUS_OK;
9276 case NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY: {
9277 struct spoolss_FindClosePrinterNotify *r = (struct spoolss_FindClosePrinterNotify *)_r;
9278 r->out.result = _spoolss_FindClosePrinterNotify(cli->pipes_struct, r);
9279 return NT_STATUS_OK;
9282 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD: {
9283 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r = (struct spoolss_RouterFindFirstPrinterChangeNotificationOld *)_r;
9284 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(cli->pipes_struct, r);
9285 return NT_STATUS_OK;
9288 case NDR_SPOOLSS_REPLYOPENPRINTER: {
9289 struct spoolss_ReplyOpenPrinter *r = (struct spoolss_ReplyOpenPrinter *)_r;
9290 ZERO_STRUCT(r->out);
9291 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
9292 if (r->out.handle == NULL) {
9293 return NT_STATUS_NO_MEMORY;
9296 r->out.result = _spoolss_ReplyOpenPrinter(cli->pipes_struct, r);
9297 return NT_STATUS_OK;
9300 case NDR_SPOOLSS_ROUTERREPLYPRINTER: {
9301 struct spoolss_RouterReplyPrinter *r = (struct spoolss_RouterReplyPrinter *)_r;
9302 r->out.result = _spoolss_RouterReplyPrinter(cli->pipes_struct, r);
9303 return NT_STATUS_OK;
9306 case NDR_SPOOLSS_REPLYCLOSEPRINTER: {
9307 struct spoolss_ReplyClosePrinter *r = (struct spoolss_ReplyClosePrinter *)_r;
9308 ZERO_STRUCT(r->out);
9309 r->out.handle = r->in.handle;
9310 r->out.result = _spoolss_ReplyClosePrinter(cli->pipes_struct, r);
9311 return NT_STATUS_OK;
9314 case NDR_SPOOLSS_ADDPORTEX: {
9315 struct spoolss_AddPortEx *r = (struct spoolss_AddPortEx *)_r;
9316 r->out.result = _spoolss_AddPortEx(cli->pipes_struct, r);
9317 return NT_STATUS_OK;
9320 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION: {
9321 struct spoolss_RouterFindFirstPrinterChangeNotification *r = (struct spoolss_RouterFindFirstPrinterChangeNotification *)_r;
9322 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(cli->pipes_struct, r);
9323 return NT_STATUS_OK;
9326 case NDR_SPOOLSS_SPOOLERINIT: {
9327 struct spoolss_SpoolerInit *r = (struct spoolss_SpoolerInit *)_r;
9328 r->out.result = _spoolss_SpoolerInit(cli->pipes_struct, r);
9329 return NT_STATUS_OK;
9332 case NDR_SPOOLSS_RESETPRINTEREX: {
9333 struct spoolss_ResetPrinterEx *r = (struct spoolss_ResetPrinterEx *)_r;
9334 r->out.result = _spoolss_ResetPrinterEx(cli->pipes_struct, r);
9335 return NT_STATUS_OK;
9338 case NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX: {
9339 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r = (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *)_r;
9340 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli->pipes_struct, r);
9341 return NT_STATUS_OK;
9344 case NDR_SPOOLSS_ROUTERREPLYPRINTEREX: {
9345 struct spoolss_RouterReplyPrinterEx *r = (struct spoolss_RouterReplyPrinterEx *)_r;
9346 ZERO_STRUCT(r->out);
9347 r->out.reply_result = talloc_zero(mem_ctx, uint32_t);
9348 if (r->out.reply_result == NULL) {
9349 return NT_STATUS_NO_MEMORY;
9352 r->out.result = _spoolss_RouterReplyPrinterEx(cli->pipes_struct, r);
9353 return NT_STATUS_OK;
9356 case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY: {
9357 struct spoolss_RouterRefreshPrinterChangeNotify *r = (struct spoolss_RouterRefreshPrinterChangeNotify *)_r;
9358 ZERO_STRUCT(r->out);
9359 r->out.info = talloc_zero(mem_ctx, struct spoolss_NotifyInfo *);
9360 if (r->out.info == NULL) {
9361 return NT_STATUS_NO_MEMORY;
9364 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(cli->pipes_struct, r);
9365 return NT_STATUS_OK;
9368 case NDR_SPOOLSS_44: {
9369 struct spoolss_44 *r = (struct spoolss_44 *)_r;
9370 r->out.result = _spoolss_44(cli->pipes_struct, r);
9371 return NT_STATUS_OK;
9374 case NDR_SPOOLSS_OPENPRINTEREX: {
9375 struct spoolss_OpenPrinterEx *r = (struct spoolss_OpenPrinterEx *)_r;
9376 ZERO_STRUCT(r->out);
9377 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
9378 if (r->out.handle == NULL) {
9379 return NT_STATUS_NO_MEMORY;
9382 r->out.result = _spoolss_OpenPrinterEx(cli->pipes_struct, r);
9383 return NT_STATUS_OK;
9386 case NDR_SPOOLSS_ADDPRINTEREX: {
9387 struct spoolss_AddPrinterEx *r = (struct spoolss_AddPrinterEx *)_r;
9388 ZERO_STRUCT(r->out);
9389 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
9390 if (r->out.handle == NULL) {
9391 return NT_STATUS_NO_MEMORY;
9394 r->out.result = _spoolss_AddPrinterEx(cli->pipes_struct, r);
9395 return NT_STATUS_OK;
9398 case NDR_SPOOLSS_47: {
9399 struct spoolss_47 *r = (struct spoolss_47 *)_r;
9400 r->out.result = _spoolss_47(cli->pipes_struct, r);
9401 return NT_STATUS_OK;
9404 case NDR_SPOOLSS_ENUMPRINTERDATA: {
9405 struct spoolss_EnumPrinterData *r = (struct spoolss_EnumPrinterData *)_r;
9406 ZERO_STRUCT(r->out);
9407 r->out.value_name = talloc_zero_array(mem_ctx, const char, r->in.value_offered / 2);
9408 if (r->out.value_name == NULL) {
9409 return NT_STATUS_NO_MEMORY;
9412 r->out.value_needed = talloc_zero(mem_ctx, uint32_t);
9413 if (r->out.value_needed == NULL) {
9414 return NT_STATUS_NO_MEMORY;
9417 r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
9418 if (r->out.type == NULL) {
9419 return NT_STATUS_NO_MEMORY;
9422 r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_offered);
9423 if (r->out.data == NULL) {
9424 return NT_STATUS_NO_MEMORY;
9427 r->out.data_needed = talloc_zero(mem_ctx, uint32_t);
9428 if (r->out.data_needed == NULL) {
9429 return NT_STATUS_NO_MEMORY;
9432 r->out.result = _spoolss_EnumPrinterData(cli->pipes_struct, r);
9433 return NT_STATUS_OK;
9436 case NDR_SPOOLSS_DELETEPRINTERDATA: {
9437 struct spoolss_DeletePrinterData *r = (struct spoolss_DeletePrinterData *)_r;
9438 r->out.result = _spoolss_DeletePrinterData(cli->pipes_struct, r);
9439 return NT_STATUS_OK;
9442 case NDR_SPOOLSS_4A: {
9443 struct spoolss_4a *r = (struct spoolss_4a *)_r;
9444 r->out.result = _spoolss_4a(cli->pipes_struct, r);
9445 return NT_STATUS_OK;
9448 case NDR_SPOOLSS_4B: {
9449 struct spoolss_4b *r = (struct spoolss_4b *)_r;
9450 r->out.result = _spoolss_4b(cli->pipes_struct, r);
9451 return NT_STATUS_OK;
9454 case NDR_SPOOLSS_4C: {
9455 struct spoolss_4c *r = (struct spoolss_4c *)_r;
9456 r->out.result = _spoolss_4c(cli->pipes_struct, r);
9457 return NT_STATUS_OK;
9460 case NDR_SPOOLSS_SETPRINTERDATAEX: {
9461 struct spoolss_SetPrinterDataEx *r = (struct spoolss_SetPrinterDataEx *)_r;
9462 r->out.result = _spoolss_SetPrinterDataEx(cli->pipes_struct, r);
9463 return NT_STATUS_OK;
9466 case NDR_SPOOLSS_GETPRINTERDATAEX: {
9467 struct spoolss_GetPrinterDataEx *r = (struct spoolss_GetPrinterDataEx *)_r;
9468 ZERO_STRUCT(r->out);
9469 r->out.type = talloc_zero(mem_ctx, enum winreg_Type);
9470 if (r->out.type == NULL) {
9471 return NT_STATUS_NO_MEMORY;
9474 r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData);
9475 if (r->out.data == NULL) {
9476 return NT_STATUS_NO_MEMORY;
9479 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9480 if (r->out.needed == NULL) {
9481 return NT_STATUS_NO_MEMORY;
9484 r->out.result = _spoolss_GetPrinterDataEx(cli->pipes_struct, r);
9485 return NT_STATUS_OK;
9488 case NDR_SPOOLSS_ENUMPRINTERDATAEX: {
9489 struct spoolss_EnumPrinterDataEx *r = (struct spoolss_EnumPrinterDataEx *)_r;
9490 ZERO_STRUCT(r->out);
9491 r->out.count = talloc_zero(mem_ctx, uint32_t);
9492 if (r->out.count == NULL) {
9493 return NT_STATUS_NO_MEMORY;
9496 r->out.info = talloc_zero(mem_ctx, struct spoolss_PrinterEnumValues *);
9497 if (r->out.info == NULL) {
9498 return NT_STATUS_NO_MEMORY;
9501 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9502 if (r->out.needed == NULL) {
9503 return NT_STATUS_NO_MEMORY;
9506 r->out.result = _spoolss_EnumPrinterDataEx(cli->pipes_struct, r);
9507 return NT_STATUS_OK;
9510 case NDR_SPOOLSS_ENUMPRINTERKEY: {
9511 struct spoolss_EnumPrinterKey *r = (struct spoolss_EnumPrinterKey *)_r;
9512 ZERO_STRUCT(r->out);
9513 r->out._ndr_size = talloc_zero(mem_ctx, uint32_t);
9514 if (r->out._ndr_size == NULL) {
9515 return NT_STATUS_NO_MEMORY;
9518 r->out.key_buffer = talloc_zero(mem_ctx, union spoolss_KeyNames);
9519 if (r->out.key_buffer == NULL) {
9520 return NT_STATUS_NO_MEMORY;
9523 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9524 if (r->out.needed == NULL) {
9525 return NT_STATUS_NO_MEMORY;
9528 r->out.result = _spoolss_EnumPrinterKey(cli->pipes_struct, r);
9529 return NT_STATUS_OK;
9532 case NDR_SPOOLSS_DELETEPRINTERDATAEX: {
9533 struct spoolss_DeletePrinterDataEx *r = (struct spoolss_DeletePrinterDataEx *)_r;
9534 r->out.result = _spoolss_DeletePrinterDataEx(cli->pipes_struct, r);
9535 return NT_STATUS_OK;
9538 case NDR_SPOOLSS_DELETEPRINTERKEY: {
9539 struct spoolss_DeletePrinterKey *r = (struct spoolss_DeletePrinterKey *)_r;
9540 r->out.result = _spoolss_DeletePrinterKey(cli->pipes_struct, r);
9541 return NT_STATUS_OK;
9544 case NDR_SPOOLSS_53: {
9545 struct spoolss_53 *r = (struct spoolss_53 *)_r;
9546 r->out.result = _spoolss_53(cli->pipes_struct, r);
9547 return NT_STATUS_OK;
9550 case NDR_SPOOLSS_DELETEPRINTERDRIVEREX: {
9551 struct spoolss_DeletePrinterDriverEx *r = (struct spoolss_DeletePrinterDriverEx *)_r;
9552 r->out.result = _spoolss_DeletePrinterDriverEx(cli->pipes_struct, r);
9553 return NT_STATUS_OK;
9556 case NDR_SPOOLSS_55: {
9557 struct spoolss_55 *r = (struct spoolss_55 *)_r;
9558 r->out.result = _spoolss_55(cli->pipes_struct, r);
9559 return NT_STATUS_OK;
9562 case NDR_SPOOLSS_56: {
9563 struct spoolss_56 *r = (struct spoolss_56 *)_r;
9564 r->out.result = _spoolss_56(cli->pipes_struct, r);
9565 return NT_STATUS_OK;
9568 case NDR_SPOOLSS_57: {
9569 struct spoolss_57 *r = (struct spoolss_57 *)_r;
9570 r->out.result = _spoolss_57(cli->pipes_struct, r);
9571 return NT_STATUS_OK;
9574 case NDR_SPOOLSS_XCVDATA: {
9575 struct spoolss_XcvData *r = (struct spoolss_XcvData *)_r;
9576 ZERO_STRUCT(r->out);
9577 r->out.status_code = r->in.status_code;
9578 r->out.out_data = talloc_zero_array(mem_ctx, uint8_t, r->in.out_data_size);
9579 if (r->out.out_data == NULL) {
9580 return NT_STATUS_NO_MEMORY;
9583 r->out.needed = talloc_zero(mem_ctx, uint32_t);
9584 if (r->out.needed == NULL) {
9585 return NT_STATUS_NO_MEMORY;
9588 r->out.result = _spoolss_XcvData(cli->pipes_struct, r);
9589 return NT_STATUS_OK;
9592 case NDR_SPOOLSS_ADDPRINTERDRIVEREX: {
9593 struct spoolss_AddPrinterDriverEx *r = (struct spoolss_AddPrinterDriverEx *)_r;
9594 r->out.result = _spoolss_AddPrinterDriverEx(cli->pipes_struct, r);
9595 return NT_STATUS_OK;
9598 case NDR_SPOOLSS_5A: {
9599 struct spoolss_5a *r = (struct spoolss_5a *)_r;
9600 r->out.result = _spoolss_5a(cli->pipes_struct, r);
9601 return NT_STATUS_OK;
9604 case NDR_SPOOLSS_5B: {
9605 struct spoolss_5b *r = (struct spoolss_5b *)_r;
9606 r->out.result = _spoolss_5b(cli->pipes_struct, r);
9607 return NT_STATUS_OK;
9610 case NDR_SPOOLSS_5C: {
9611 struct spoolss_5c *r = (struct spoolss_5c *)_r;
9612 r->out.result = _spoolss_5c(cli->pipes_struct, r);
9613 return NT_STATUS_OK;
9616 case NDR_SPOOLSS_5D: {
9617 struct spoolss_5d *r = (struct spoolss_5d *)_r;
9618 r->out.result = _spoolss_5d(cli->pipes_struct, r);
9619 return NT_STATUS_OK;
9622 case NDR_SPOOLSS_5E: {
9623 struct spoolss_5e *r = (struct spoolss_5e *)_r;
9624 r->out.result = _spoolss_5e(cli->pipes_struct, r);
9625 return NT_STATUS_OK;
9628 case NDR_SPOOLSS_5F: {
9629 struct spoolss_5f *r = (struct spoolss_5f *)_r;
9630 r->out.result = _spoolss_5f(cli->pipes_struct, r);
9631 return NT_STATUS_OK;
9634 case NDR_SPOOLSS_60: {
9635 struct spoolss_60 *r = (struct spoolss_60 *)_r;
9636 r->out.result = _spoolss_60(cli->pipes_struct, r);
9637 return NT_STATUS_OK;
9640 case NDR_SPOOLSS_61: {
9641 struct spoolss_61 *r = (struct spoolss_61 *)_r;
9642 r->out.result = _spoolss_61(cli->pipes_struct, r);
9643 return NT_STATUS_OK;
9646 case NDR_SPOOLSS_62: {
9647 struct spoolss_62 *r = (struct spoolss_62 *)_r;
9648 r->out.result = _spoolss_62(cli->pipes_struct, r);
9649 return NT_STATUS_OK;
9652 case NDR_SPOOLSS_63: {
9653 struct spoolss_63 *r = (struct spoolss_63 *)_r;
9654 r->out.result = _spoolss_63(cli->pipes_struct, r);
9655 return NT_STATUS_OK;
9658 case NDR_SPOOLSS_64: {
9659 struct spoolss_64 *r = (struct spoolss_64 *)_r;
9660 r->out.result = _spoolss_64(cli->pipes_struct, r);
9661 return NT_STATUS_OK;
9664 case NDR_SPOOLSS_65: {
9665 struct spoolss_65 *r = (struct spoolss_65 *)_r;
9666 r->out.result = _spoolss_65(cli->pipes_struct, r);
9667 return NT_STATUS_OK;
9670 case NDR_SPOOLSS_GETCOREPRINTERDRIVERS: {
9671 struct spoolss_GetCorePrinterDrivers *r = (struct spoolss_GetCorePrinterDrivers *)_r;
9672 ZERO_STRUCT(r->out);
9673 r->out.core_printer_drivers = talloc_zero_array(mem_ctx, struct spoolss_CorePrinterDriver, r->in.core_printer_driver_count);
9674 if (r->out.core_printer_drivers == NULL) {
9675 return NT_STATUS_NO_MEMORY;
9678 r->out.result = _spoolss_GetCorePrinterDrivers(cli->pipes_struct, r);
9679 return NT_STATUS_OK;
9682 case NDR_SPOOLSS_67: {
9683 struct spoolss_67 *r = (struct spoolss_67 *)_r;
9684 r->out.result = _spoolss_67(cli->pipes_struct, r);
9685 return NT_STATUS_OK;
9688 case NDR_SPOOLSS_GETPRINTERDRIVERPACKAGEPATH: {
9689 struct spoolss_GetPrinterDriverPackagePath *r = (struct spoolss_GetPrinterDriverPackagePath *)_r;
9690 ZERO_STRUCT(r->out);
9691 r->out.driver_package_cab = r->in.driver_package_cab;
9692 r->out.required = talloc_zero(mem_ctx, uint32_t);
9693 if (r->out.required == NULL) {
9694 return NT_STATUS_NO_MEMORY;
9697 r->out.result = _spoolss_GetPrinterDriverPackagePath(cli->pipes_struct, r);
9698 return NT_STATUS_OK;
9701 case NDR_SPOOLSS_69: {
9702 struct spoolss_69 *r = (struct spoolss_69 *)_r;
9703 r->out.result = _spoolss_69(cli->pipes_struct, r);
9704 return NT_STATUS_OK;
9707 case NDR_SPOOLSS_6A: {
9708 struct spoolss_6a *r = (struct spoolss_6a *)_r;
9709 r->out.result = _spoolss_6a(cli->pipes_struct, r);
9710 return NT_STATUS_OK;
9713 case NDR_SPOOLSS_6B: {
9714 struct spoolss_6b *r = (struct spoolss_6b *)_r;
9715 r->out.result = _spoolss_6b(cli->pipes_struct, r);
9716 return NT_STATUS_OK;
9719 case NDR_SPOOLSS_6C: {
9720 struct spoolss_6c *r = (struct spoolss_6c *)_r;
9721 r->out.result = _spoolss_6c(cli->pipes_struct, r);
9722 return NT_STATUS_OK;
9725 case NDR_SPOOLSS_6D: {
9726 struct spoolss_6d *r = (struct spoolss_6d *)_r;
9727 r->out.result = _spoolss_6d(cli->pipes_struct, r);
9728 return NT_STATUS_OK;
9731 default:
9732 return NT_STATUS_NOT_IMPLEMENTED;
9736 NTSTATUS rpc_spoolss_init(void)
9738 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", &ndr_table_spoolss, api_spoolss_cmds, sizeof(api_spoolss_cmds) / sizeof(struct api_struct));