2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/srv_spoolss.h"
9 static bool api_spoolss_EnumPrinters(pipes_struct *p)
11 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
14 enum ndr_err_code ndr_err;
16 struct spoolss_EnumPrinters *r;
18 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERS];
20 r = talloc(talloc_tos(), struct spoolss_EnumPrinters);
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
30 pull = ndr_pull_init_blob(&blob, r, NULL);
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 ndr_err = call->ndr_pull(pull, NDR_IN, r);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, r);
48 r->out.info = talloc_zero_array(r, union spoolss_PrinterInfo, r->out.count);
49 if (r->out.info == NULL) {
54 r->out.needed = talloc_zero(r, uint32_t);
55 if (r->out.needed == NULL) {
60 r->out.result = _spoolss_EnumPrinters(p, r);
62 if (p->rng_fault_state) {
64 /* Return true here, srv_pipe_hnd.c will take care */
68 if (DEBUGLEVEL >= 10) {
69 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, r);
72 push = ndr_push_init_ctx(r, NULL);
78 ndr_err = call->ndr_push(push, NDR_OUT, r);
79 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
84 blob = ndr_push_blob(push);
85 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
95 static bool api_spoolss_OpenPrinter(pipes_struct *p)
97 const struct ndr_interface_call *call;
98 struct ndr_pull *pull;
99 struct ndr_push *push;
100 enum ndr_err_code ndr_err;
102 struct spoolss_OpenPrinter *r;
104 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTER];
106 r = talloc(talloc_tos(), struct spoolss_OpenPrinter);
111 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
116 pull = ndr_pull_init_blob(&blob, r, NULL);
122 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
123 ndr_err = call->ndr_pull(pull, NDR_IN, r);
124 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
129 if (DEBUGLEVEL >= 10) {
130 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, r);
134 r->out.handle = talloc_zero(r, struct policy_handle);
135 if (r->out.handle == NULL) {
140 r->out.result = _spoolss_OpenPrinter(p, r);
142 if (p->rng_fault_state) {
144 /* Return true here, srv_pipe_hnd.c will take care */
148 if (DEBUGLEVEL >= 10) {
149 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, r);
152 push = ndr_push_init_ctx(r, NULL);
158 ndr_err = call->ndr_push(push, NDR_OUT, r);
159 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
164 blob = ndr_push_blob(push);
165 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
175 static bool api_spoolss_SetJob(pipes_struct *p)
177 const struct ndr_interface_call *call;
178 struct ndr_pull *pull;
179 struct ndr_push *push;
180 enum ndr_err_code ndr_err;
182 struct spoolss_SetJob *r;
184 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETJOB];
186 r = talloc(talloc_tos(), struct spoolss_SetJob);
191 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
196 pull = ndr_pull_init_blob(&blob, r, NULL);
202 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
203 ndr_err = call->ndr_pull(pull, NDR_IN, r);
204 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
209 if (DEBUGLEVEL >= 10) {
210 NDR_PRINT_IN_DEBUG(spoolss_SetJob, r);
213 r->out.result = _spoolss_SetJob(p, r);
215 if (p->rng_fault_state) {
217 /* Return true here, srv_pipe_hnd.c will take care */
221 if (DEBUGLEVEL >= 10) {
222 NDR_PRINT_OUT_DEBUG(spoolss_SetJob, r);
225 push = ndr_push_init_ctx(r, NULL);
231 ndr_err = call->ndr_push(push, NDR_OUT, r);
232 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
237 blob = ndr_push_blob(push);
238 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
248 static bool api_spoolss_GetJob(pipes_struct *p)
250 const struct ndr_interface_call *call;
251 struct ndr_pull *pull;
252 struct ndr_push *push;
253 enum ndr_err_code ndr_err;
255 struct spoolss_GetJob *r;
257 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETJOB];
259 r = talloc(talloc_tos(), struct spoolss_GetJob);
264 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
269 pull = ndr_pull_init_blob(&blob, r, NULL);
275 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
276 ndr_err = call->ndr_pull(pull, NDR_IN, r);
277 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
282 if (DEBUGLEVEL >= 10) {
283 NDR_PRINT_IN_DEBUG(spoolss_GetJob, r);
287 r->out.info = talloc_zero(r, union spoolss_JobInfo);
288 if (r->out.info == NULL) {
293 r->out.needed = talloc_zero(r, uint32_t);
294 if (r->out.needed == NULL) {
299 r->out.result = _spoolss_GetJob(p, r);
301 if (p->rng_fault_state) {
303 /* Return true here, srv_pipe_hnd.c will take care */
307 if (DEBUGLEVEL >= 10) {
308 NDR_PRINT_OUT_DEBUG(spoolss_GetJob, r);
311 push = ndr_push_init_ctx(r, NULL);
317 ndr_err = call->ndr_push(push, NDR_OUT, r);
318 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
323 blob = ndr_push_blob(push);
324 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
334 static bool api_spoolss_EnumJobs(pipes_struct *p)
336 const struct ndr_interface_call *call;
337 struct ndr_pull *pull;
338 struct ndr_push *push;
339 enum ndr_err_code ndr_err;
341 struct spoolss_EnumJobs *r;
343 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMJOBS];
345 r = talloc(talloc_tos(), struct spoolss_EnumJobs);
350 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
355 pull = ndr_pull_init_blob(&blob, r, NULL);
361 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
362 ndr_err = call->ndr_pull(pull, NDR_IN, r);
363 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
368 if (DEBUGLEVEL >= 10) {
369 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, r);
373 r->out.info = talloc_zero_array(r, union spoolss_JobInfo, r->out.count);
374 if (r->out.info == NULL) {
379 r->out.needed = talloc_zero(r, uint32_t);
380 if (r->out.needed == NULL) {
385 r->out.result = _spoolss_EnumJobs(p, r);
387 if (p->rng_fault_state) {
389 /* Return true here, srv_pipe_hnd.c will take care */
393 if (DEBUGLEVEL >= 10) {
394 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, r);
397 push = ndr_push_init_ctx(r, NULL);
403 ndr_err = call->ndr_push(push, NDR_OUT, r);
404 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
409 blob = ndr_push_blob(push);
410 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
420 static bool api_spoolss_AddPrinter(pipes_struct *p)
422 const struct ndr_interface_call *call;
423 struct ndr_pull *pull;
424 struct ndr_push *push;
425 enum ndr_err_code ndr_err;
427 struct spoolss_AddPrinter *r;
429 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTER];
431 r = talloc(talloc_tos(), struct spoolss_AddPrinter);
436 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
441 pull = ndr_pull_init_blob(&blob, r, NULL);
447 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
448 ndr_err = call->ndr_pull(pull, NDR_IN, r);
449 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
454 if (DEBUGLEVEL >= 10) {
455 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, r);
458 r->out.result = _spoolss_AddPrinter(p, r);
460 if (p->rng_fault_state) {
462 /* Return true here, srv_pipe_hnd.c will take care */
466 if (DEBUGLEVEL >= 10) {
467 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, r);
470 push = ndr_push_init_ctx(r, NULL);
476 ndr_err = call->ndr_push(push, NDR_OUT, r);
477 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
482 blob = ndr_push_blob(push);
483 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
493 static bool api_spoolss_DeletePrinter(pipes_struct *p)
495 const struct ndr_interface_call *call;
496 struct ndr_pull *pull;
497 struct ndr_push *push;
498 enum ndr_err_code ndr_err;
500 struct spoolss_DeletePrinter *r;
502 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTER];
504 r = talloc(talloc_tos(), struct spoolss_DeletePrinter);
509 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
514 pull = ndr_pull_init_blob(&blob, r, NULL);
520 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
521 ndr_err = call->ndr_pull(pull, NDR_IN, r);
522 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
527 if (DEBUGLEVEL >= 10) {
528 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, r);
531 r->out.result = _spoolss_DeletePrinter(p, r);
533 if (p->rng_fault_state) {
535 /* Return true here, srv_pipe_hnd.c will take care */
539 if (DEBUGLEVEL >= 10) {
540 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, r);
543 push = ndr_push_init_ctx(r, NULL);
549 ndr_err = call->ndr_push(push, NDR_OUT, r);
550 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
555 blob = ndr_push_blob(push);
556 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
566 static bool api_spoolss_SetPrinter(pipes_struct *p)
568 const struct ndr_interface_call *call;
569 struct ndr_pull *pull;
570 struct ndr_push *push;
571 enum ndr_err_code ndr_err;
573 struct spoolss_SetPrinter *r;
575 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTER];
577 r = talloc(talloc_tos(), struct spoolss_SetPrinter);
582 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
587 pull = ndr_pull_init_blob(&blob, r, NULL);
593 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
594 ndr_err = call->ndr_pull(pull, NDR_IN, r);
595 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
600 if (DEBUGLEVEL >= 10) {
601 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, r);
604 r->out.result = _spoolss_SetPrinter(p, r);
606 if (p->rng_fault_state) {
608 /* Return true here, srv_pipe_hnd.c will take care */
612 if (DEBUGLEVEL >= 10) {
613 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, r);
616 push = ndr_push_init_ctx(r, NULL);
622 ndr_err = call->ndr_push(push, NDR_OUT, r);
623 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
628 blob = ndr_push_blob(push);
629 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
639 static bool api_spoolss_GetPrinter(pipes_struct *p)
641 const struct ndr_interface_call *call;
642 struct ndr_pull *pull;
643 struct ndr_push *push;
644 enum ndr_err_code ndr_err;
646 struct spoolss_GetPrinter *r;
648 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTER];
650 r = talloc(talloc_tos(), struct spoolss_GetPrinter);
655 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
660 pull = ndr_pull_init_blob(&blob, r, NULL);
666 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
667 ndr_err = call->ndr_pull(pull, NDR_IN, r);
668 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
673 if (DEBUGLEVEL >= 10) {
674 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, r);
678 r->out.info = talloc_zero(r, union spoolss_PrinterInfo);
679 if (r->out.info == NULL) {
684 r->out.needed = talloc_zero(r, uint32_t);
685 if (r->out.needed == NULL) {
690 r->out.result = _spoolss_GetPrinter(p, r);
692 if (p->rng_fault_state) {
694 /* Return true here, srv_pipe_hnd.c will take care */
698 if (DEBUGLEVEL >= 10) {
699 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, r);
702 push = ndr_push_init_ctx(r, NULL);
708 ndr_err = call->ndr_push(push, NDR_OUT, r);
709 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
714 blob = ndr_push_blob(push);
715 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
725 static bool api_spoolss_AddPrinterDriver(pipes_struct *p)
727 const struct ndr_interface_call *call;
728 struct ndr_pull *pull;
729 struct ndr_push *push;
730 enum ndr_err_code ndr_err;
732 struct spoolss_AddPrinterDriver *r;
734 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVER];
736 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriver);
741 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
746 pull = ndr_pull_init_blob(&blob, r, NULL);
752 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
753 ndr_err = call->ndr_pull(pull, NDR_IN, r);
754 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
759 if (DEBUGLEVEL >= 10) {
760 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, r);
763 r->out.result = _spoolss_AddPrinterDriver(p, r);
765 if (p->rng_fault_state) {
767 /* Return true here, srv_pipe_hnd.c will take care */
771 if (DEBUGLEVEL >= 10) {
772 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, r);
775 push = ndr_push_init_ctx(r, NULL);
781 ndr_err = call->ndr_push(push, NDR_OUT, r);
782 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
787 blob = ndr_push_blob(push);
788 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
798 static bool api_spoolss_EnumPrinterDrivers(pipes_struct *p)
800 const struct ndr_interface_call *call;
801 struct ndr_pull *pull;
802 struct ndr_push *push;
803 enum ndr_err_code ndr_err;
805 struct spoolss_EnumPrinterDrivers *r;
807 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDRIVERS];
809 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDrivers);
814 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
819 pull = ndr_pull_init_blob(&blob, r, NULL);
825 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
826 ndr_err = call->ndr_pull(pull, NDR_IN, r);
827 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
832 if (DEBUGLEVEL >= 10) {
833 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, r);
837 r->out.info = talloc_zero_array(r, union spoolss_DriverInfo, r->out.count);
838 if (r->out.info == NULL) {
843 r->out.needed = talloc_zero(r, uint32_t);
844 if (r->out.needed == NULL) {
849 r->out.result = _spoolss_EnumPrinterDrivers(p, r);
851 if (p->rng_fault_state) {
853 /* Return true here, srv_pipe_hnd.c will take care */
857 if (DEBUGLEVEL >= 10) {
858 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, r);
861 push = ndr_push_init_ctx(r, NULL);
867 ndr_err = call->ndr_push(push, NDR_OUT, r);
868 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
873 blob = ndr_push_blob(push);
874 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
884 static bool api_spoolss_GetPrinterDriver(pipes_struct *p)
886 const struct ndr_interface_call *call;
887 struct ndr_pull *pull;
888 struct ndr_push *push;
889 enum ndr_err_code ndr_err;
891 struct spoolss_GetPrinterDriver *r;
893 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER];
895 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver);
900 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
905 pull = ndr_pull_init_blob(&blob, r, NULL);
911 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
912 ndr_err = call->ndr_pull(pull, NDR_IN, r);
913 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
918 if (DEBUGLEVEL >= 10) {
919 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, r);
922 r->out.result = _spoolss_GetPrinterDriver(p, r);
924 if (p->rng_fault_state) {
926 /* Return true here, srv_pipe_hnd.c will take care */
930 if (DEBUGLEVEL >= 10) {
931 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, r);
934 push = ndr_push_init_ctx(r, NULL);
940 ndr_err = call->ndr_push(push, NDR_OUT, r);
941 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
946 blob = ndr_push_blob(push);
947 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
957 static bool api_spoolss_GetPrinterDriverDirectory(pipes_struct *p)
959 const struct ndr_interface_call *call;
960 struct ndr_pull *pull;
961 struct ndr_push *push;
962 enum ndr_err_code ndr_err;
964 struct spoolss_GetPrinterDriverDirectory *r;
966 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY];
968 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriverDirectory);
973 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
978 pull = ndr_pull_init_blob(&blob, r, NULL);
984 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
985 ndr_err = call->ndr_pull(pull, NDR_IN, r);
986 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
991 if (DEBUGLEVEL >= 10) {
992 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, r);
996 r->out.info = talloc_zero(r, union spoolss_DriverDirectoryInfo);
997 if (r->out.info == NULL) {
1002 r->out.needed = talloc_zero(r, uint32_t);
1003 if (r->out.needed == NULL) {
1008 r->out.result = _spoolss_GetPrinterDriverDirectory(p, r);
1010 if (p->rng_fault_state) {
1012 /* Return true here, srv_pipe_hnd.c will take care */
1016 if (DEBUGLEVEL >= 10) {
1017 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, r);
1020 push = ndr_push_init_ctx(r, NULL);
1026 ndr_err = call->ndr_push(push, NDR_OUT, r);
1027 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1032 blob = ndr_push_blob(push);
1033 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1043 static bool api_spoolss_DeletePrinterDriver(pipes_struct *p)
1045 const struct ndr_interface_call *call;
1046 struct ndr_pull *pull;
1047 struct ndr_push *push;
1048 enum ndr_err_code ndr_err;
1050 struct spoolss_DeletePrinterDriver *r;
1052 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVER];
1054 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriver);
1059 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1064 pull = ndr_pull_init_blob(&blob, r, NULL);
1070 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1071 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1072 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1077 if (DEBUGLEVEL >= 10) {
1078 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, r);
1081 r->out.result = _spoolss_DeletePrinterDriver(p, r);
1083 if (p->rng_fault_state) {
1085 /* Return true here, srv_pipe_hnd.c will take care */
1089 if (DEBUGLEVEL >= 10) {
1090 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, r);
1093 push = ndr_push_init_ctx(r, NULL);
1099 ndr_err = call->ndr_push(push, NDR_OUT, r);
1100 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1105 blob = ndr_push_blob(push);
1106 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1116 static bool api_spoolss_AddPrintProcessor(pipes_struct *p)
1118 const struct ndr_interface_call *call;
1119 struct ndr_pull *pull;
1120 struct ndr_push *push;
1121 enum ndr_err_code ndr_err;
1123 struct spoolss_AddPrintProcessor *r;
1125 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROCESSOR];
1127 r = talloc(talloc_tos(), struct spoolss_AddPrintProcessor);
1132 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1137 pull = ndr_pull_init_blob(&blob, r, NULL);
1143 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1144 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1145 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1150 if (DEBUGLEVEL >= 10) {
1151 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, r);
1154 r->out.result = _spoolss_AddPrintProcessor(p, r);
1156 if (p->rng_fault_state) {
1158 /* Return true here, srv_pipe_hnd.c will take care */
1162 if (DEBUGLEVEL >= 10) {
1163 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, r);
1166 push = ndr_push_init_ctx(r, NULL);
1172 ndr_err = call->ndr_push(push, NDR_OUT, r);
1173 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1178 blob = ndr_push_blob(push);
1179 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1189 static bool api_spoolss_EnumPrintProcessors(pipes_struct *p)
1191 const struct ndr_interface_call *call;
1192 struct ndr_pull *pull;
1193 struct ndr_push *push;
1194 enum ndr_err_code ndr_err;
1196 struct spoolss_EnumPrintProcessors *r;
1198 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCESSORS];
1200 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcessors);
1205 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1210 pull = ndr_pull_init_blob(&blob, r, NULL);
1216 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1217 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1218 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1223 if (DEBUGLEVEL >= 10) {
1224 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, r);
1227 ZERO_STRUCT(r->out);
1228 r->out.info = talloc_zero_array(r, union spoolss_PrintProcessorInfo, r->out.count);
1229 if (r->out.info == NULL) {
1234 r->out.needed = talloc_zero(r, uint32_t);
1235 if (r->out.needed == NULL) {
1240 r->out.result = _spoolss_EnumPrintProcessors(p, r);
1242 if (p->rng_fault_state) {
1244 /* Return true here, srv_pipe_hnd.c will take care */
1248 if (DEBUGLEVEL >= 10) {
1249 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, r);
1252 push = ndr_push_init_ctx(r, NULL);
1258 ndr_err = call->ndr_push(push, NDR_OUT, r);
1259 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1264 blob = ndr_push_blob(push);
1265 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1275 static bool api_spoolss_GetPrintProcessorDirectory(pipes_struct *p)
1277 const struct ndr_interface_call *call;
1278 struct ndr_pull *pull;
1279 struct ndr_push *push;
1280 enum ndr_err_code ndr_err;
1282 struct spoolss_GetPrintProcessorDirectory *r;
1284 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY];
1286 r = talloc(talloc_tos(), struct spoolss_GetPrintProcessorDirectory);
1291 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1296 pull = ndr_pull_init_blob(&blob, r, NULL);
1302 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1303 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1304 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1309 if (DEBUGLEVEL >= 10) {
1310 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1313 r->out.result = _spoolss_GetPrintProcessorDirectory(p, r);
1315 if (p->rng_fault_state) {
1317 /* Return true here, srv_pipe_hnd.c will take care */
1321 if (DEBUGLEVEL >= 10) {
1322 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, r);
1325 push = ndr_push_init_ctx(r, NULL);
1331 ndr_err = call->ndr_push(push, NDR_OUT, r);
1332 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1337 blob = ndr_push_blob(push);
1338 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1348 static bool api_spoolss_StartDocPrinter(pipes_struct *p)
1350 const struct ndr_interface_call *call;
1351 struct ndr_pull *pull;
1352 struct ndr_push *push;
1353 enum ndr_err_code ndr_err;
1355 struct spoolss_StartDocPrinter *r;
1357 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTDOCPRINTER];
1359 r = talloc(talloc_tos(), struct spoolss_StartDocPrinter);
1364 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1369 pull = ndr_pull_init_blob(&blob, r, NULL);
1375 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1376 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1377 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1382 if (DEBUGLEVEL >= 10) {
1383 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, r);
1386 ZERO_STRUCT(r->out);
1387 r->out.job_id = talloc_zero(r, uint32_t);
1388 if (r->out.job_id == NULL) {
1393 r->out.result = _spoolss_StartDocPrinter(p, r);
1395 if (p->rng_fault_state) {
1397 /* Return true here, srv_pipe_hnd.c will take care */
1401 if (DEBUGLEVEL >= 10) {
1402 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, r);
1405 push = ndr_push_init_ctx(r, NULL);
1411 ndr_err = call->ndr_push(push, NDR_OUT, r);
1412 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1417 blob = ndr_push_blob(push);
1418 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1428 static bool api_spoolss_StartPagePrinter(pipes_struct *p)
1430 const struct ndr_interface_call *call;
1431 struct ndr_pull *pull;
1432 struct ndr_push *push;
1433 enum ndr_err_code ndr_err;
1435 struct spoolss_StartPagePrinter *r;
1437 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_STARTPAGEPRINTER];
1439 r = talloc(talloc_tos(), struct spoolss_StartPagePrinter);
1444 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1449 pull = ndr_pull_init_blob(&blob, r, NULL);
1455 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1456 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1457 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1462 if (DEBUGLEVEL >= 10) {
1463 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, r);
1466 r->out.result = _spoolss_StartPagePrinter(p, r);
1468 if (p->rng_fault_state) {
1470 /* Return true here, srv_pipe_hnd.c will take care */
1474 if (DEBUGLEVEL >= 10) {
1475 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, r);
1478 push = ndr_push_init_ctx(r, NULL);
1484 ndr_err = call->ndr_push(push, NDR_OUT, r);
1485 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1490 blob = ndr_push_blob(push);
1491 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1501 static bool api_spoolss_WritePrinter(pipes_struct *p)
1503 const struct ndr_interface_call *call;
1504 struct ndr_pull *pull;
1505 struct ndr_push *push;
1506 enum ndr_err_code ndr_err;
1508 struct spoolss_WritePrinter *r;
1510 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WRITEPRINTER];
1512 r = talloc(talloc_tos(), struct spoolss_WritePrinter);
1517 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1522 pull = ndr_pull_init_blob(&blob, r, NULL);
1528 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1529 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1530 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1535 if (DEBUGLEVEL >= 10) {
1536 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, r);
1539 ZERO_STRUCT(r->out);
1540 r->out.num_written = talloc_zero(r, uint32_t);
1541 if (r->out.num_written == NULL) {
1546 r->out.result = _spoolss_WritePrinter(p, r);
1548 if (p->rng_fault_state) {
1550 /* Return true here, srv_pipe_hnd.c will take care */
1554 if (DEBUGLEVEL >= 10) {
1555 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, r);
1558 push = ndr_push_init_ctx(r, NULL);
1564 ndr_err = call->ndr_push(push, NDR_OUT, r);
1565 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1570 blob = ndr_push_blob(push);
1571 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1581 static bool api_spoolss_EndPagePrinter(pipes_struct *p)
1583 const struct ndr_interface_call *call;
1584 struct ndr_pull *pull;
1585 struct ndr_push *push;
1586 enum ndr_err_code ndr_err;
1588 struct spoolss_EndPagePrinter *r;
1590 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDPAGEPRINTER];
1592 r = talloc(talloc_tos(), struct spoolss_EndPagePrinter);
1597 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1602 pull = ndr_pull_init_blob(&blob, r, NULL);
1608 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1609 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1610 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1615 if (DEBUGLEVEL >= 10) {
1616 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, r);
1619 r->out.result = _spoolss_EndPagePrinter(p, r);
1621 if (p->rng_fault_state) {
1623 /* Return true here, srv_pipe_hnd.c will take care */
1627 if (DEBUGLEVEL >= 10) {
1628 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, r);
1631 push = ndr_push_init_ctx(r, NULL);
1637 ndr_err = call->ndr_push(push, NDR_OUT, r);
1638 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1643 blob = ndr_push_blob(push);
1644 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1654 static bool api_spoolss_AbortPrinter(pipes_struct *p)
1656 const struct ndr_interface_call *call;
1657 struct ndr_pull *pull;
1658 struct ndr_push *push;
1659 enum ndr_err_code ndr_err;
1661 struct spoolss_AbortPrinter *r;
1663 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ABORTPRINTER];
1665 r = talloc(talloc_tos(), struct spoolss_AbortPrinter);
1670 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1675 pull = ndr_pull_init_blob(&blob, r, NULL);
1681 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1682 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1683 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1688 if (DEBUGLEVEL >= 10) {
1689 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, r);
1692 r->out.result = _spoolss_AbortPrinter(p, r);
1694 if (p->rng_fault_state) {
1696 /* Return true here, srv_pipe_hnd.c will take care */
1700 if (DEBUGLEVEL >= 10) {
1701 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, r);
1704 push = ndr_push_init_ctx(r, NULL);
1710 ndr_err = call->ndr_push(push, NDR_OUT, r);
1711 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1716 blob = ndr_push_blob(push);
1717 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1727 static bool api_spoolss_ReadPrinter(pipes_struct *p)
1729 const struct ndr_interface_call *call;
1730 struct ndr_pull *pull;
1731 struct ndr_push *push;
1732 enum ndr_err_code ndr_err;
1734 struct spoolss_ReadPrinter *r;
1736 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_READPRINTER];
1738 r = talloc(talloc_tos(), struct spoolss_ReadPrinter);
1743 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1748 pull = ndr_pull_init_blob(&blob, r, NULL);
1754 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1755 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1756 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1761 if (DEBUGLEVEL >= 10) {
1762 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, r);
1765 ZERO_STRUCT(r->out);
1766 r->out.data = talloc_zero_array(r, uint8_t, r->in.data_size);
1767 if (r->out.data == NULL) {
1772 r->out._data_size = talloc_zero(r, uint32_t);
1773 if (r->out._data_size == NULL) {
1778 r->out.result = _spoolss_ReadPrinter(p, r);
1780 if (p->rng_fault_state) {
1782 /* Return true here, srv_pipe_hnd.c will take care */
1786 if (DEBUGLEVEL >= 10) {
1787 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, r);
1790 push = ndr_push_init_ctx(r, NULL);
1796 ndr_err = call->ndr_push(push, NDR_OUT, r);
1797 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1802 blob = ndr_push_blob(push);
1803 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1813 static bool api_spoolss_EndDocPrinter(pipes_struct *p)
1815 const struct ndr_interface_call *call;
1816 struct ndr_pull *pull;
1817 struct ndr_push *push;
1818 enum ndr_err_code ndr_err;
1820 struct spoolss_EndDocPrinter *r;
1822 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENDDOCPRINTER];
1824 r = talloc(talloc_tos(), struct spoolss_EndDocPrinter);
1829 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1834 pull = ndr_pull_init_blob(&blob, r, NULL);
1840 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1841 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1842 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1847 if (DEBUGLEVEL >= 10) {
1848 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, r);
1851 r->out.result = _spoolss_EndDocPrinter(p, r);
1853 if (p->rng_fault_state) {
1855 /* Return true here, srv_pipe_hnd.c will take care */
1859 if (DEBUGLEVEL >= 10) {
1860 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, r);
1863 push = ndr_push_init_ctx(r, NULL);
1869 ndr_err = call->ndr_push(push, NDR_OUT, r);
1870 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1875 blob = ndr_push_blob(push);
1876 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1886 static bool api_spoolss_AddJob(pipes_struct *p)
1888 const struct ndr_interface_call *call;
1889 struct ndr_pull *pull;
1890 struct ndr_push *push;
1891 enum ndr_err_code ndr_err;
1893 struct spoolss_AddJob *r;
1895 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDJOB];
1897 r = talloc(talloc_tos(), struct spoolss_AddJob);
1902 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1907 pull = ndr_pull_init_blob(&blob, r, NULL);
1913 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1914 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1915 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1920 if (DEBUGLEVEL >= 10) {
1921 NDR_PRINT_IN_DEBUG(spoolss_AddJob, r);
1924 r->out.result = _spoolss_AddJob(p, r);
1926 if (p->rng_fault_state) {
1928 /* Return true here, srv_pipe_hnd.c will take care */
1932 if (DEBUGLEVEL >= 10) {
1933 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, r);
1936 push = ndr_push_init_ctx(r, NULL);
1942 ndr_err = call->ndr_push(push, NDR_OUT, r);
1943 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1948 blob = ndr_push_blob(push);
1949 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1959 static bool api_spoolss_ScheduleJob(pipes_struct *p)
1961 const struct ndr_interface_call *call;
1962 struct ndr_pull *pull;
1963 struct ndr_push *push;
1964 enum ndr_err_code ndr_err;
1966 struct spoolss_ScheduleJob *r;
1968 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SCHEDULEJOB];
1970 r = talloc(talloc_tos(), struct spoolss_ScheduleJob);
1975 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1980 pull = ndr_pull_init_blob(&blob, r, NULL);
1986 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1987 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1988 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1993 if (DEBUGLEVEL >= 10) {
1994 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, r);
1997 r->out.result = _spoolss_ScheduleJob(p, r);
1999 if (p->rng_fault_state) {
2001 /* Return true here, srv_pipe_hnd.c will take care */
2005 if (DEBUGLEVEL >= 10) {
2006 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, r);
2009 push = ndr_push_init_ctx(r, NULL);
2015 ndr_err = call->ndr_push(push, NDR_OUT, r);
2016 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2021 blob = ndr_push_blob(push);
2022 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2032 static bool api_spoolss_GetPrinterData(pipes_struct *p)
2034 const struct ndr_interface_call *call;
2035 struct ndr_pull *pull;
2036 struct ndr_push *push;
2037 enum ndr_err_code ndr_err;
2039 struct spoolss_GetPrinterData *r;
2041 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATA];
2043 r = talloc(talloc_tos(), struct spoolss_GetPrinterData);
2048 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2053 pull = ndr_pull_init_blob(&blob, r, NULL);
2059 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2060 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2061 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2066 if (DEBUGLEVEL >= 10) {
2067 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, r);
2070 ZERO_STRUCT(r->out);
2071 r->out.type = talloc_zero(r, enum spoolss_PrinterDataType);
2072 if (r->out.type == NULL) {
2077 r->out.needed = talloc_zero(r, uint32_t);
2078 if (r->out.needed == NULL) {
2083 r->out.result = _spoolss_GetPrinterData(p, r);
2085 if (p->rng_fault_state) {
2087 /* Return true here, srv_pipe_hnd.c will take care */
2091 if (DEBUGLEVEL >= 10) {
2092 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, r);
2095 push = ndr_push_init_ctx(r, NULL);
2101 ndr_err = call->ndr_push(push, NDR_OUT, r);
2102 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2107 blob = ndr_push_blob(push);
2108 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2118 static bool api_spoolss_SetPrinterData(pipes_struct *p)
2120 const struct ndr_interface_call *call;
2121 struct ndr_pull *pull;
2122 struct ndr_push *push;
2123 enum ndr_err_code ndr_err;
2125 struct spoolss_SetPrinterData *r;
2127 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATA];
2129 r = talloc(talloc_tos(), struct spoolss_SetPrinterData);
2134 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2139 pull = ndr_pull_init_blob(&blob, r, NULL);
2145 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2146 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2152 if (DEBUGLEVEL >= 10) {
2153 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, r);
2156 r->out.result = _spoolss_SetPrinterData(p, r);
2158 if (p->rng_fault_state) {
2160 /* Return true here, srv_pipe_hnd.c will take care */
2164 if (DEBUGLEVEL >= 10) {
2165 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, r);
2168 push = ndr_push_init_ctx(r, NULL);
2174 ndr_err = call->ndr_push(push, NDR_OUT, r);
2175 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2180 blob = ndr_push_blob(push);
2181 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2191 static bool api_spoolss_WaitForPrinterChange(pipes_struct *p)
2193 const struct ndr_interface_call *call;
2194 struct ndr_pull *pull;
2195 struct ndr_push *push;
2196 enum ndr_err_code ndr_err;
2198 struct spoolss_WaitForPrinterChange *r;
2200 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WAITFORPRINTERCHANGE];
2202 r = talloc(talloc_tos(), struct spoolss_WaitForPrinterChange);
2207 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2212 pull = ndr_pull_init_blob(&blob, r, NULL);
2218 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2219 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2220 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2225 if (DEBUGLEVEL >= 10) {
2226 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, r);
2229 r->out.result = _spoolss_WaitForPrinterChange(p, r);
2231 if (p->rng_fault_state) {
2233 /* Return true here, srv_pipe_hnd.c will take care */
2237 if (DEBUGLEVEL >= 10) {
2238 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, r);
2241 push = ndr_push_init_ctx(r, NULL);
2247 ndr_err = call->ndr_push(push, NDR_OUT, r);
2248 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2253 blob = ndr_push_blob(push);
2254 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2264 static bool api_spoolss_ClosePrinter(pipes_struct *p)
2266 const struct ndr_interface_call *call;
2267 struct ndr_pull *pull;
2268 struct ndr_push *push;
2269 enum ndr_err_code ndr_err;
2271 struct spoolss_ClosePrinter *r;
2273 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CLOSEPRINTER];
2275 r = talloc(talloc_tos(), struct spoolss_ClosePrinter);
2280 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2285 pull = ndr_pull_init_blob(&blob, r, NULL);
2291 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2292 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2293 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2298 if (DEBUGLEVEL >= 10) {
2299 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, r);
2302 ZERO_STRUCT(r->out);
2303 r->out.handle = r->in.handle;
2304 r->out.result = _spoolss_ClosePrinter(p, r);
2306 if (p->rng_fault_state) {
2308 /* Return true here, srv_pipe_hnd.c will take care */
2312 if (DEBUGLEVEL >= 10) {
2313 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, r);
2316 push = ndr_push_init_ctx(r, NULL);
2322 ndr_err = call->ndr_push(push, NDR_OUT, r);
2323 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2328 blob = ndr_push_blob(push);
2329 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2339 static bool api_spoolss_AddForm(pipes_struct *p)
2341 const struct ndr_interface_call *call;
2342 struct ndr_pull *pull;
2343 struct ndr_push *push;
2344 enum ndr_err_code ndr_err;
2346 struct spoolss_AddForm *r;
2348 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDFORM];
2350 r = talloc(talloc_tos(), struct spoolss_AddForm);
2355 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2360 pull = ndr_pull_init_blob(&blob, r, NULL);
2366 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2367 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2368 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2373 if (DEBUGLEVEL >= 10) {
2374 NDR_PRINT_IN_DEBUG(spoolss_AddForm, r);
2377 r->out.result = _spoolss_AddForm(p, r);
2379 if (p->rng_fault_state) {
2381 /* Return true here, srv_pipe_hnd.c will take care */
2385 if (DEBUGLEVEL >= 10) {
2386 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, r);
2389 push = ndr_push_init_ctx(r, NULL);
2395 ndr_err = call->ndr_push(push, NDR_OUT, r);
2396 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2401 blob = ndr_push_blob(push);
2402 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2412 static bool api_spoolss_DeleteForm(pipes_struct *p)
2414 const struct ndr_interface_call *call;
2415 struct ndr_pull *pull;
2416 struct ndr_push *push;
2417 enum ndr_err_code ndr_err;
2419 struct spoolss_DeleteForm *r;
2421 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEFORM];
2423 r = talloc(talloc_tos(), struct spoolss_DeleteForm);
2428 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2433 pull = ndr_pull_init_blob(&blob, r, NULL);
2439 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2440 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2441 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2446 if (DEBUGLEVEL >= 10) {
2447 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, r);
2450 r->out.result = _spoolss_DeleteForm(p, r);
2452 if (p->rng_fault_state) {
2454 /* Return true here, srv_pipe_hnd.c will take care */
2458 if (DEBUGLEVEL >= 10) {
2459 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, r);
2462 push = ndr_push_init_ctx(r, NULL);
2468 ndr_err = call->ndr_push(push, NDR_OUT, r);
2469 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2474 blob = ndr_push_blob(push);
2475 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2485 static bool api_spoolss_GetForm(pipes_struct *p)
2487 const struct ndr_interface_call *call;
2488 struct ndr_pull *pull;
2489 struct ndr_push *push;
2490 enum ndr_err_code ndr_err;
2492 struct spoolss_GetForm *r;
2494 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETFORM];
2496 r = talloc(talloc_tos(), struct spoolss_GetForm);
2501 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2506 pull = ndr_pull_init_blob(&blob, r, NULL);
2512 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2513 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2514 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2519 if (DEBUGLEVEL >= 10) {
2520 NDR_PRINT_IN_DEBUG(spoolss_GetForm, r);
2523 ZERO_STRUCT(r->out);
2524 r->out.info = talloc_zero(r, union spoolss_FormInfo);
2525 if (r->out.info == NULL) {
2530 r->out.needed = talloc_zero(r, uint32_t);
2531 if (r->out.needed == NULL) {
2536 r->out.result = _spoolss_GetForm(p, r);
2538 if (p->rng_fault_state) {
2540 /* Return true here, srv_pipe_hnd.c will take care */
2544 if (DEBUGLEVEL >= 10) {
2545 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, r);
2548 push = ndr_push_init_ctx(r, NULL);
2554 ndr_err = call->ndr_push(push, NDR_OUT, r);
2555 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2560 blob = ndr_push_blob(push);
2561 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2571 static bool api_spoolss_SetForm(pipes_struct *p)
2573 const struct ndr_interface_call *call;
2574 struct ndr_pull *pull;
2575 struct ndr_push *push;
2576 enum ndr_err_code ndr_err;
2578 struct spoolss_SetForm *r;
2580 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETFORM];
2582 r = talloc(talloc_tos(), struct spoolss_SetForm);
2587 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2592 pull = ndr_pull_init_blob(&blob, r, NULL);
2598 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2599 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2600 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2605 if (DEBUGLEVEL >= 10) {
2606 NDR_PRINT_IN_DEBUG(spoolss_SetForm, r);
2609 r->out.result = _spoolss_SetForm(p, r);
2611 if (p->rng_fault_state) {
2613 /* Return true here, srv_pipe_hnd.c will take care */
2617 if (DEBUGLEVEL >= 10) {
2618 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, r);
2621 push = ndr_push_init_ctx(r, NULL);
2627 ndr_err = call->ndr_push(push, NDR_OUT, r);
2628 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2633 blob = ndr_push_blob(push);
2634 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2644 static bool api_spoolss_EnumForms(pipes_struct *p)
2646 const struct ndr_interface_call *call;
2647 struct ndr_pull *pull;
2648 struct ndr_push *push;
2649 enum ndr_err_code ndr_err;
2651 struct spoolss_EnumForms *r;
2653 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMFORMS];
2655 r = talloc(talloc_tos(), struct spoolss_EnumForms);
2660 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2665 pull = ndr_pull_init_blob(&blob, r, NULL);
2671 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2672 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2673 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2678 if (DEBUGLEVEL >= 10) {
2679 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, r);
2682 ZERO_STRUCT(r->out);
2683 r->out.info = talloc_zero_array(r, union spoolss_FormInfo, r->out.count);
2684 if (r->out.info == NULL) {
2689 r->out.needed = talloc_zero(r, uint32_t);
2690 if (r->out.needed == NULL) {
2695 r->out.result = _spoolss_EnumForms(p, r);
2697 if (p->rng_fault_state) {
2699 /* Return true here, srv_pipe_hnd.c will take care */
2703 if (DEBUGLEVEL >= 10) {
2704 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, r);
2707 push = ndr_push_init_ctx(r, NULL);
2713 ndr_err = call->ndr_push(push, NDR_OUT, r);
2714 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2719 blob = ndr_push_blob(push);
2720 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2730 static bool api_spoolss_EnumPorts(pipes_struct *p)
2732 const struct ndr_interface_call *call;
2733 struct ndr_pull *pull;
2734 struct ndr_push *push;
2735 enum ndr_err_code ndr_err;
2737 struct spoolss_EnumPorts *r;
2739 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPORTS];
2741 r = talloc(talloc_tos(), struct spoolss_EnumPorts);
2746 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2751 pull = ndr_pull_init_blob(&blob, r, NULL);
2757 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2758 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2759 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2764 if (DEBUGLEVEL >= 10) {
2765 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, r);
2768 ZERO_STRUCT(r->out);
2769 r->out.info = talloc_zero_array(r, union spoolss_PortInfo, r->out.count);
2770 if (r->out.info == NULL) {
2775 r->out.needed = talloc_zero(r, uint32_t);
2776 if (r->out.needed == NULL) {
2781 r->out.result = _spoolss_EnumPorts(p, r);
2783 if (p->rng_fault_state) {
2785 /* Return true here, srv_pipe_hnd.c will take care */
2789 if (DEBUGLEVEL >= 10) {
2790 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, r);
2793 push = ndr_push_init_ctx(r, NULL);
2799 ndr_err = call->ndr_push(push, NDR_OUT, r);
2800 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2805 blob = ndr_push_blob(push);
2806 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2816 static bool api_spoolss_EnumMonitors(pipes_struct *p)
2818 const struct ndr_interface_call *call;
2819 struct ndr_pull *pull;
2820 struct ndr_push *push;
2821 enum ndr_err_code ndr_err;
2823 struct spoolss_EnumMonitors *r;
2825 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMMONITORS];
2827 r = talloc(talloc_tos(), struct spoolss_EnumMonitors);
2832 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2837 pull = ndr_pull_init_blob(&blob, r, NULL);
2843 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2844 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2845 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2850 if (DEBUGLEVEL >= 10) {
2851 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, r);
2854 ZERO_STRUCT(r->out);
2855 r->out.info = talloc_zero_array(r, union spoolss_MonitorInfo, r->out.count);
2856 if (r->out.info == NULL) {
2861 r->out.needed = talloc_zero(r, uint32_t);
2862 if (r->out.needed == NULL) {
2867 r->out.result = _spoolss_EnumMonitors(p, r);
2869 if (p->rng_fault_state) {
2871 /* Return true here, srv_pipe_hnd.c will take care */
2875 if (DEBUGLEVEL >= 10) {
2876 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, r);
2879 push = ndr_push_init_ctx(r, NULL);
2885 ndr_err = call->ndr_push(push, NDR_OUT, r);
2886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2891 blob = ndr_push_blob(push);
2892 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2902 static bool api_spoolss_AddPort(pipes_struct *p)
2904 const struct ndr_interface_call *call;
2905 struct ndr_pull *pull;
2906 struct ndr_push *push;
2907 enum ndr_err_code ndr_err;
2909 struct spoolss_AddPort *r;
2911 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORT];
2913 r = talloc(talloc_tos(), struct spoolss_AddPort);
2918 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2923 pull = ndr_pull_init_blob(&blob, r, NULL);
2929 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2930 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2931 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2936 if (DEBUGLEVEL >= 10) {
2937 NDR_PRINT_IN_DEBUG(spoolss_AddPort, r);
2940 r->out.result = _spoolss_AddPort(p, r);
2942 if (p->rng_fault_state) {
2944 /* Return true here, srv_pipe_hnd.c will take care */
2948 if (DEBUGLEVEL >= 10) {
2949 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, r);
2952 push = ndr_push_init_ctx(r, NULL);
2958 ndr_err = call->ndr_push(push, NDR_OUT, r);
2959 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2964 blob = ndr_push_blob(push);
2965 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2975 static bool api_spoolss_ConfigurePort(pipes_struct *p)
2977 const struct ndr_interface_call *call;
2978 struct ndr_pull *pull;
2979 struct ndr_push *push;
2980 enum ndr_err_code ndr_err;
2982 struct spoolss_ConfigurePort *r;
2984 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CONFIGUREPORT];
2986 r = talloc(talloc_tos(), struct spoolss_ConfigurePort);
2991 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2996 pull = ndr_pull_init_blob(&blob, r, NULL);
3002 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3003 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3004 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3009 if (DEBUGLEVEL >= 10) {
3010 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, r);
3013 r->out.result = _spoolss_ConfigurePort(p, r);
3015 if (p->rng_fault_state) {
3017 /* Return true here, srv_pipe_hnd.c will take care */
3021 if (DEBUGLEVEL >= 10) {
3022 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, r);
3025 push = ndr_push_init_ctx(r, NULL);
3031 ndr_err = call->ndr_push(push, NDR_OUT, r);
3032 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3037 blob = ndr_push_blob(push);
3038 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3048 static bool api_spoolss_DeletePort(pipes_struct *p)
3050 const struct ndr_interface_call *call;
3051 struct ndr_pull *pull;
3052 struct ndr_push *push;
3053 enum ndr_err_code ndr_err;
3055 struct spoolss_DeletePort *r;
3057 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPORT];
3059 r = talloc(talloc_tos(), struct spoolss_DeletePort);
3064 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3069 pull = ndr_pull_init_blob(&blob, r, NULL);
3075 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3076 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3077 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3082 if (DEBUGLEVEL >= 10) {
3083 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, r);
3086 r->out.result = _spoolss_DeletePort(p, r);
3088 if (p->rng_fault_state) {
3090 /* Return true here, srv_pipe_hnd.c will take care */
3094 if (DEBUGLEVEL >= 10) {
3095 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, r);
3098 push = ndr_push_init_ctx(r, NULL);
3104 ndr_err = call->ndr_push(push, NDR_OUT, r);
3105 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3110 blob = ndr_push_blob(push);
3111 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3121 static bool api_spoolss_CreatePrinterIC(pipes_struct *p)
3123 const struct ndr_interface_call *call;
3124 struct ndr_pull *pull;
3125 struct ndr_push *push;
3126 enum ndr_err_code ndr_err;
3128 struct spoolss_CreatePrinterIC *r;
3130 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CREATEPRINTERIC];
3132 r = talloc(talloc_tos(), struct spoolss_CreatePrinterIC);
3137 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3142 pull = ndr_pull_init_blob(&blob, r, NULL);
3148 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3149 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3150 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3155 if (DEBUGLEVEL >= 10) {
3156 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, r);
3159 r->out.result = _spoolss_CreatePrinterIC(p, r);
3161 if (p->rng_fault_state) {
3163 /* Return true here, srv_pipe_hnd.c will take care */
3167 if (DEBUGLEVEL >= 10) {
3168 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, r);
3171 push = ndr_push_init_ctx(r, NULL);
3177 ndr_err = call->ndr_push(push, NDR_OUT, r);
3178 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3183 blob = ndr_push_blob(push);
3184 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3194 static bool api_spoolss_PlayGDIScriptOnPrinterIC(pipes_struct *p)
3196 const struct ndr_interface_call *call;
3197 struct ndr_pull *pull;
3198 struct ndr_push *push;
3199 enum ndr_err_code ndr_err;
3201 struct spoolss_PlayGDIScriptOnPrinterIC *r;
3203 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC];
3205 r = talloc(talloc_tos(), struct spoolss_PlayGDIScriptOnPrinterIC);
3210 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3215 pull = ndr_pull_init_blob(&blob, r, NULL);
3221 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3222 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3223 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3228 if (DEBUGLEVEL >= 10) {
3229 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3232 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(p, r);
3234 if (p->rng_fault_state) {
3236 /* Return true here, srv_pipe_hnd.c will take care */
3240 if (DEBUGLEVEL >= 10) {
3241 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3244 push = ndr_push_init_ctx(r, NULL);
3250 ndr_err = call->ndr_push(push, NDR_OUT, r);
3251 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3256 blob = ndr_push_blob(push);
3257 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3267 static bool api_spoolss_DeletePrinterIC(pipes_struct *p)
3269 const struct ndr_interface_call *call;
3270 struct ndr_pull *pull;
3271 struct ndr_push *push;
3272 enum ndr_err_code ndr_err;
3274 struct spoolss_DeletePrinterIC *r;
3276 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERIC];
3278 r = talloc(talloc_tos(), struct spoolss_DeletePrinterIC);
3283 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3288 pull = ndr_pull_init_blob(&blob, r, NULL);
3294 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3295 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3296 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3301 if (DEBUGLEVEL >= 10) {
3302 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, r);
3305 r->out.result = _spoolss_DeletePrinterIC(p, r);
3307 if (p->rng_fault_state) {
3309 /* Return true here, srv_pipe_hnd.c will take care */
3313 if (DEBUGLEVEL >= 10) {
3314 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, r);
3317 push = ndr_push_init_ctx(r, NULL);
3323 ndr_err = call->ndr_push(push, NDR_OUT, r);
3324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3329 blob = ndr_push_blob(push);
3330 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3340 static bool api_spoolss_AddPrinterConnection(pipes_struct *p)
3342 const struct ndr_interface_call *call;
3343 struct ndr_pull *pull;
3344 struct ndr_push *push;
3345 enum ndr_err_code ndr_err;
3347 struct spoolss_AddPrinterConnection *r;
3349 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERCONNECTION];
3351 r = talloc(talloc_tos(), struct spoolss_AddPrinterConnection);
3356 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3361 pull = ndr_pull_init_blob(&blob, r, NULL);
3367 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3368 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3374 if (DEBUGLEVEL >= 10) {
3375 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, r);
3378 r->out.result = _spoolss_AddPrinterConnection(p, r);
3380 if (p->rng_fault_state) {
3382 /* Return true here, srv_pipe_hnd.c will take care */
3386 if (DEBUGLEVEL >= 10) {
3387 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, r);
3390 push = ndr_push_init_ctx(r, NULL);
3396 ndr_err = call->ndr_push(push, NDR_OUT, r);
3397 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3402 blob = ndr_push_blob(push);
3403 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3413 static bool api_spoolss_DeletePrinterConnection(pipes_struct *p)
3415 const struct ndr_interface_call *call;
3416 struct ndr_pull *pull;
3417 struct ndr_push *push;
3418 enum ndr_err_code ndr_err;
3420 struct spoolss_DeletePrinterConnection *r;
3422 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERCONNECTION];
3424 r = talloc(talloc_tos(), struct spoolss_DeletePrinterConnection);
3429 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3434 pull = ndr_pull_init_blob(&blob, r, NULL);
3440 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3441 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3442 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3447 if (DEBUGLEVEL >= 10) {
3448 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, r);
3451 r->out.result = _spoolss_DeletePrinterConnection(p, r);
3453 if (p->rng_fault_state) {
3455 /* Return true here, srv_pipe_hnd.c will take care */
3459 if (DEBUGLEVEL >= 10) {
3460 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, r);
3463 push = ndr_push_init_ctx(r, NULL);
3469 ndr_err = call->ndr_push(push, NDR_OUT, r);
3470 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3475 blob = ndr_push_blob(push);
3476 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3486 static bool api_spoolss_PrinterMessageBox(pipes_struct *p)
3488 const struct ndr_interface_call *call;
3489 struct ndr_pull *pull;
3490 struct ndr_push *push;
3491 enum ndr_err_code ndr_err;
3493 struct spoolss_PrinterMessageBox *r;
3495 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PRINTERMESSAGEBOX];
3497 r = talloc(talloc_tos(), struct spoolss_PrinterMessageBox);
3502 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3507 pull = ndr_pull_init_blob(&blob, r, NULL);
3513 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3514 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3515 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3520 if (DEBUGLEVEL >= 10) {
3521 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, r);
3524 r->out.result = _spoolss_PrinterMessageBox(p, r);
3526 if (p->rng_fault_state) {
3528 /* Return true here, srv_pipe_hnd.c will take care */
3532 if (DEBUGLEVEL >= 10) {
3533 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, r);
3536 push = ndr_push_init_ctx(r, NULL);
3542 ndr_err = call->ndr_push(push, NDR_OUT, r);
3543 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3548 blob = ndr_push_blob(push);
3549 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3559 static bool api_spoolss_AddMonitor(pipes_struct *p)
3561 const struct ndr_interface_call *call;
3562 struct ndr_pull *pull;
3563 struct ndr_push *push;
3564 enum ndr_err_code ndr_err;
3566 struct spoolss_AddMonitor *r;
3568 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDMONITOR];
3570 r = talloc(talloc_tos(), struct spoolss_AddMonitor);
3575 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3580 pull = ndr_pull_init_blob(&blob, r, NULL);
3586 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3587 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3588 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3593 if (DEBUGLEVEL >= 10) {
3594 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, r);
3597 r->out.result = _spoolss_AddMonitor(p, r);
3599 if (p->rng_fault_state) {
3601 /* Return true here, srv_pipe_hnd.c will take care */
3605 if (DEBUGLEVEL >= 10) {
3606 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, r);
3609 push = ndr_push_init_ctx(r, NULL);
3615 ndr_err = call->ndr_push(push, NDR_OUT, r);
3616 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3621 blob = ndr_push_blob(push);
3622 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3632 static bool api_spoolss_DeleteMonitor(pipes_struct *p)
3634 const struct ndr_interface_call *call;
3635 struct ndr_pull *pull;
3636 struct ndr_push *push;
3637 enum ndr_err_code ndr_err;
3639 struct spoolss_DeleteMonitor *r;
3641 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEMONITOR];
3643 r = talloc(talloc_tos(), struct spoolss_DeleteMonitor);
3648 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3653 pull = ndr_pull_init_blob(&blob, r, NULL);
3659 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3660 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3661 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3666 if (DEBUGLEVEL >= 10) {
3667 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, r);
3670 r->out.result = _spoolss_DeleteMonitor(p, r);
3672 if (p->rng_fault_state) {
3674 /* Return true here, srv_pipe_hnd.c will take care */
3678 if (DEBUGLEVEL >= 10) {
3679 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, r);
3682 push = ndr_push_init_ctx(r, NULL);
3688 ndr_err = call->ndr_push(push, NDR_OUT, r);
3689 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3694 blob = ndr_push_blob(push);
3695 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3705 static bool api_spoolss_DeletePrintProcessor(pipes_struct *p)
3707 const struct ndr_interface_call *call;
3708 struct ndr_pull *pull;
3709 struct ndr_push *push;
3710 enum ndr_err_code ndr_err;
3712 struct spoolss_DeletePrintProcessor *r;
3714 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROCESSOR];
3716 r = talloc(talloc_tos(), struct spoolss_DeletePrintProcessor);
3721 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3726 pull = ndr_pull_init_blob(&blob, r, NULL);
3732 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3733 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3734 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3739 if (DEBUGLEVEL >= 10) {
3740 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, r);
3743 r->out.result = _spoolss_DeletePrintProcessor(p, r);
3745 if (p->rng_fault_state) {
3747 /* Return true here, srv_pipe_hnd.c will take care */
3751 if (DEBUGLEVEL >= 10) {
3752 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, r);
3755 push = ndr_push_init_ctx(r, NULL);
3761 ndr_err = call->ndr_push(push, NDR_OUT, r);
3762 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3767 blob = ndr_push_blob(push);
3768 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3778 static bool api_spoolss_AddPrintProvidor(pipes_struct *p)
3780 const struct ndr_interface_call *call;
3781 struct ndr_pull *pull;
3782 struct ndr_push *push;
3783 enum ndr_err_code ndr_err;
3785 struct spoolss_AddPrintProvidor *r;
3787 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROVIDOR];
3789 r = talloc(talloc_tos(), struct spoolss_AddPrintProvidor);
3794 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3799 pull = ndr_pull_init_blob(&blob, r, NULL);
3805 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3806 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3807 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3812 if (DEBUGLEVEL >= 10) {
3813 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, r);
3816 r->out.result = _spoolss_AddPrintProvidor(p, r);
3818 if (p->rng_fault_state) {
3820 /* Return true here, srv_pipe_hnd.c will take care */
3824 if (DEBUGLEVEL >= 10) {
3825 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, r);
3828 push = ndr_push_init_ctx(r, NULL);
3834 ndr_err = call->ndr_push(push, NDR_OUT, r);
3835 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3840 blob = ndr_push_blob(push);
3841 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3851 static bool api_spoolss_DeletePrintProvidor(pipes_struct *p)
3853 const struct ndr_interface_call *call;
3854 struct ndr_pull *pull;
3855 struct ndr_push *push;
3856 enum ndr_err_code ndr_err;
3858 struct spoolss_DeletePrintProvidor *r;
3860 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROVIDOR];
3862 r = talloc(talloc_tos(), struct spoolss_DeletePrintProvidor);
3867 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3872 pull = ndr_pull_init_blob(&blob, r, NULL);
3878 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3879 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3880 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3885 if (DEBUGLEVEL >= 10) {
3886 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, r);
3889 r->out.result = _spoolss_DeletePrintProvidor(p, r);
3891 if (p->rng_fault_state) {
3893 /* Return true here, srv_pipe_hnd.c will take care */
3897 if (DEBUGLEVEL >= 10) {
3898 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, r);
3901 push = ndr_push_init_ctx(r, NULL);
3907 ndr_err = call->ndr_push(push, NDR_OUT, r);
3908 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3913 blob = ndr_push_blob(push);
3914 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3924 static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct *p)
3926 const struct ndr_interface_call *call;
3927 struct ndr_pull *pull;
3928 struct ndr_push *push;
3929 enum ndr_err_code ndr_err;
3931 struct spoolss_EnumPrintProcDataTypes *r;
3933 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCDATATYPES];
3935 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcDataTypes);
3940 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3945 pull = ndr_pull_init_blob(&blob, r, NULL);
3951 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3952 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3953 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3958 if (DEBUGLEVEL >= 10) {
3959 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, r);
3962 r->out.result = _spoolss_EnumPrintProcDataTypes(p, r);
3964 if (p->rng_fault_state) {
3966 /* Return true here, srv_pipe_hnd.c will take care */
3970 if (DEBUGLEVEL >= 10) {
3971 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, r);
3974 push = ndr_push_init_ctx(r, NULL);
3980 ndr_err = call->ndr_push(push, NDR_OUT, r);
3981 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3986 blob = ndr_push_blob(push);
3987 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3997 static bool api_spoolss_ResetPrinter(pipes_struct *p)
3999 const struct ndr_interface_call *call;
4000 struct ndr_pull *pull;
4001 struct ndr_push *push;
4002 enum ndr_err_code ndr_err;
4004 struct spoolss_ResetPrinter *r;
4006 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTER];
4008 r = talloc(talloc_tos(), struct spoolss_ResetPrinter);
4013 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4018 pull = ndr_pull_init_blob(&blob, r, NULL);
4024 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4025 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4026 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4031 if (DEBUGLEVEL >= 10) {
4032 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, r);
4035 r->out.result = _spoolss_ResetPrinter(p, r);
4037 if (p->rng_fault_state) {
4039 /* Return true here, srv_pipe_hnd.c will take care */
4043 if (DEBUGLEVEL >= 10) {
4044 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, r);
4047 push = ndr_push_init_ctx(r, NULL);
4053 ndr_err = call->ndr_push(push, NDR_OUT, r);
4054 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4059 blob = ndr_push_blob(push);
4060 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4070 static bool api_spoolss_GetPrinterDriver2(pipes_struct *p)
4072 const struct ndr_interface_call *call;
4073 struct ndr_pull *pull;
4074 struct ndr_push *push;
4075 enum ndr_err_code ndr_err;
4077 struct spoolss_GetPrinterDriver2 *r;
4079 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER2];
4081 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver2);
4086 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4091 pull = ndr_pull_init_blob(&blob, r, NULL);
4097 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4098 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4099 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4104 if (DEBUGLEVEL >= 10) {
4105 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, r);
4108 ZERO_STRUCT(r->out);
4109 r->out.info = talloc_zero(r, DATA_BLOB);
4110 if (r->out.info == NULL) {
4115 r->out.needed = talloc_zero(r, uint32_t);
4116 if (r->out.needed == NULL) {
4121 r->out.server_major_version = talloc_zero(r, uint32_t);
4122 if (r->out.server_major_version == NULL) {
4127 r->out.server_minor_version = talloc_zero(r, uint32_t);
4128 if (r->out.server_minor_version == NULL) {
4133 r->out.result = _spoolss_GetPrinterDriver2(p, r);
4135 if (p->rng_fault_state) {
4137 /* Return true here, srv_pipe_hnd.c will take care */
4141 if (DEBUGLEVEL >= 10) {
4142 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, r);
4145 push = ndr_push_init_ctx(r, NULL);
4151 ndr_err = call->ndr_push(push, NDR_OUT, r);
4152 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4157 blob = ndr_push_blob(push);
4158 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4168 static bool api_spoolss_FindFirstPrinterChangeNotification(pipes_struct *p)
4170 const struct ndr_interface_call *call;
4171 struct ndr_pull *pull;
4172 struct ndr_push *push;
4173 enum ndr_err_code ndr_err;
4175 struct spoolss_FindFirstPrinterChangeNotification *r;
4177 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION];
4179 r = talloc(talloc_tos(), struct spoolss_FindFirstPrinterChangeNotification);
4184 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4189 pull = ndr_pull_init_blob(&blob, r, NULL);
4195 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4196 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4197 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4202 if (DEBUGLEVEL >= 10) {
4203 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4206 r->out.result = _spoolss_FindFirstPrinterChangeNotification(p, r);
4208 if (p->rng_fault_state) {
4210 /* Return true here, srv_pipe_hnd.c will take care */
4214 if (DEBUGLEVEL >= 10) {
4215 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4218 push = ndr_push_init_ctx(r, NULL);
4224 ndr_err = call->ndr_push(push, NDR_OUT, r);
4225 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4230 blob = ndr_push_blob(push);
4231 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4241 static bool api_spoolss_FindNextPrinterChangeNotification(pipes_struct *p)
4243 const struct ndr_interface_call *call;
4244 struct ndr_pull *pull;
4245 struct ndr_push *push;
4246 enum ndr_err_code ndr_err;
4248 struct spoolss_FindNextPrinterChangeNotification *r;
4250 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION];
4252 r = talloc(talloc_tos(), struct spoolss_FindNextPrinterChangeNotification);
4257 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4262 pull = ndr_pull_init_blob(&blob, r, NULL);
4268 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4269 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4270 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4275 if (DEBUGLEVEL >= 10) {
4276 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4279 r->out.result = _spoolss_FindNextPrinterChangeNotification(p, r);
4281 if (p->rng_fault_state) {
4283 /* Return true here, srv_pipe_hnd.c will take care */
4287 if (DEBUGLEVEL >= 10) {
4288 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4291 push = ndr_push_init_ctx(r, NULL);
4297 ndr_err = call->ndr_push(push, NDR_OUT, r);
4298 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4303 blob = ndr_push_blob(push);
4304 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4314 static bool api_spoolss_FindClosePrinterNotify(pipes_struct *p)
4316 const struct ndr_interface_call *call;
4317 struct ndr_pull *pull;
4318 struct ndr_push *push;
4319 enum ndr_err_code ndr_err;
4321 struct spoolss_FindClosePrinterNotify *r;
4323 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY];
4325 r = talloc(talloc_tos(), struct spoolss_FindClosePrinterNotify);
4330 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4335 pull = ndr_pull_init_blob(&blob, r, NULL);
4341 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4342 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4343 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4348 if (DEBUGLEVEL >= 10) {
4349 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, r);
4352 r->out.result = _spoolss_FindClosePrinterNotify(p, r);
4354 if (p->rng_fault_state) {
4356 /* Return true here, srv_pipe_hnd.c will take care */
4360 if (DEBUGLEVEL >= 10) {
4361 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, r);
4364 push = ndr_push_init_ctx(r, NULL);
4370 ndr_err = call->ndr_push(push, NDR_OUT, r);
4371 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4376 blob = ndr_push_blob(push);
4377 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4387 static bool api_spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct *p)
4389 const struct ndr_interface_call *call;
4390 struct ndr_pull *pull;
4391 struct ndr_push *push;
4392 enum ndr_err_code ndr_err;
4394 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r;
4396 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD];
4398 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotificationOld);
4403 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4408 pull = ndr_pull_init_blob(&blob, r, NULL);
4414 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4415 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4416 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4421 if (DEBUGLEVEL >= 10) {
4422 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4425 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(p, r);
4427 if (p->rng_fault_state) {
4429 /* Return true here, srv_pipe_hnd.c will take care */
4433 if (DEBUGLEVEL >= 10) {
4434 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4437 push = ndr_push_init_ctx(r, NULL);
4443 ndr_err = call->ndr_push(push, NDR_OUT, r);
4444 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4449 blob = ndr_push_blob(push);
4450 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4460 static bool api_spoolss_ReplyOpenPrinter(pipes_struct *p)
4462 const struct ndr_interface_call *call;
4463 struct ndr_pull *pull;
4464 struct ndr_push *push;
4465 enum ndr_err_code ndr_err;
4467 struct spoolss_ReplyOpenPrinter *r;
4469 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYOPENPRINTER];
4471 r = talloc(talloc_tos(), struct spoolss_ReplyOpenPrinter);
4476 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4481 pull = ndr_pull_init_blob(&blob, r, NULL);
4487 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4488 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4489 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4494 if (DEBUGLEVEL >= 10) {
4495 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, r);
4498 ZERO_STRUCT(r->out);
4499 r->out.handle = talloc_zero(r, struct policy_handle);
4500 if (r->out.handle == NULL) {
4505 r->out.result = _spoolss_ReplyOpenPrinter(p, r);
4507 if (p->rng_fault_state) {
4509 /* Return true here, srv_pipe_hnd.c will take care */
4513 if (DEBUGLEVEL >= 10) {
4514 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, r);
4517 push = ndr_push_init_ctx(r, NULL);
4523 ndr_err = call->ndr_push(push, NDR_OUT, r);
4524 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4529 blob = ndr_push_blob(push);
4530 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4540 static bool api_spoolss_RouterReplyPrinter(pipes_struct *p)
4542 const struct ndr_interface_call *call;
4543 struct ndr_pull *pull;
4544 struct ndr_push *push;
4545 enum ndr_err_code ndr_err;
4547 struct spoolss_RouterReplyPrinter *r;
4549 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTER];
4551 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinter);
4556 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4561 pull = ndr_pull_init_blob(&blob, r, NULL);
4567 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4568 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4569 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4574 if (DEBUGLEVEL >= 10) {
4575 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, r);
4578 r->out.result = _spoolss_RouterReplyPrinter(p, r);
4580 if (p->rng_fault_state) {
4582 /* Return true here, srv_pipe_hnd.c will take care */
4586 if (DEBUGLEVEL >= 10) {
4587 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, r);
4590 push = ndr_push_init_ctx(r, NULL);
4596 ndr_err = call->ndr_push(push, NDR_OUT, r);
4597 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4602 blob = ndr_push_blob(push);
4603 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4613 static bool api_spoolss_ReplyClosePrinter(pipes_struct *p)
4615 const struct ndr_interface_call *call;
4616 struct ndr_pull *pull;
4617 struct ndr_push *push;
4618 enum ndr_err_code ndr_err;
4620 struct spoolss_ReplyClosePrinter *r;
4622 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYCLOSEPRINTER];
4624 r = talloc(talloc_tos(), struct spoolss_ReplyClosePrinter);
4629 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4634 pull = ndr_pull_init_blob(&blob, r, NULL);
4640 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4641 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4647 if (DEBUGLEVEL >= 10) {
4648 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, r);
4651 ZERO_STRUCT(r->out);
4652 r->out.handle = r->in.handle;
4653 r->out.result = _spoolss_ReplyClosePrinter(p, r);
4655 if (p->rng_fault_state) {
4657 /* Return true here, srv_pipe_hnd.c will take care */
4661 if (DEBUGLEVEL >= 10) {
4662 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, r);
4665 push = ndr_push_init_ctx(r, NULL);
4671 ndr_err = call->ndr_push(push, NDR_OUT, r);
4672 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4677 blob = ndr_push_blob(push);
4678 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4688 static bool api_spoolss_AddPortEx(pipes_struct *p)
4690 const struct ndr_interface_call *call;
4691 struct ndr_pull *pull;
4692 struct ndr_push *push;
4693 enum ndr_err_code ndr_err;
4695 struct spoolss_AddPortEx *r;
4697 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORTEX];
4699 r = talloc(talloc_tos(), struct spoolss_AddPortEx);
4704 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4709 pull = ndr_pull_init_blob(&blob, r, NULL);
4715 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4716 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4717 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4722 if (DEBUGLEVEL >= 10) {
4723 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, r);
4726 r->out.result = _spoolss_AddPortEx(p, r);
4728 if (p->rng_fault_state) {
4730 /* Return true here, srv_pipe_hnd.c will take care */
4734 if (DEBUGLEVEL >= 10) {
4735 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, r);
4738 push = ndr_push_init_ctx(r, NULL);
4744 ndr_err = call->ndr_push(push, NDR_OUT, r);
4745 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4750 blob = ndr_push_blob(push);
4751 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4761 static bool api_spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p)
4763 const struct ndr_interface_call *call;
4764 struct ndr_pull *pull;
4765 struct ndr_push *push;
4766 enum ndr_err_code ndr_err;
4768 struct spoolss_RouterFindFirstPrinterChangeNotification *r;
4770 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION];
4772 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotification);
4777 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4782 pull = ndr_pull_init_blob(&blob, r, NULL);
4788 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4789 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4790 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4795 if (DEBUGLEVEL >= 10) {
4796 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4799 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(p, r);
4801 if (p->rng_fault_state) {
4803 /* Return true here, srv_pipe_hnd.c will take care */
4807 if (DEBUGLEVEL >= 10) {
4808 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4811 push = ndr_push_init_ctx(r, NULL);
4817 ndr_err = call->ndr_push(push, NDR_OUT, r);
4818 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4823 blob = ndr_push_blob(push);
4824 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4834 static bool api_spoolss_SpoolerInit(pipes_struct *p)
4836 const struct ndr_interface_call *call;
4837 struct ndr_pull *pull;
4838 struct ndr_push *push;
4839 enum ndr_err_code ndr_err;
4841 struct spoolss_SpoolerInit *r;
4843 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SPOOLERINIT];
4845 r = talloc(talloc_tos(), struct spoolss_SpoolerInit);
4850 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4855 pull = ndr_pull_init_blob(&blob, r, NULL);
4861 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4862 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4863 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4868 if (DEBUGLEVEL >= 10) {
4869 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, r);
4872 r->out.result = _spoolss_SpoolerInit(p, r);
4874 if (p->rng_fault_state) {
4876 /* Return true here, srv_pipe_hnd.c will take care */
4880 if (DEBUGLEVEL >= 10) {
4881 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, r);
4884 push = ndr_push_init_ctx(r, NULL);
4890 ndr_err = call->ndr_push(push, NDR_OUT, r);
4891 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4896 blob = ndr_push_blob(push);
4897 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4907 static bool api_spoolss_ResetPrinterEx(pipes_struct *p)
4909 const struct ndr_interface_call *call;
4910 struct ndr_pull *pull;
4911 struct ndr_push *push;
4912 enum ndr_err_code ndr_err;
4914 struct spoolss_ResetPrinterEx *r;
4916 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTEREX];
4918 r = talloc(talloc_tos(), struct spoolss_ResetPrinterEx);
4923 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4928 pull = ndr_pull_init_blob(&blob, r, NULL);
4934 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4935 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4936 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4941 if (DEBUGLEVEL >= 10) {
4942 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, r);
4945 r->out.result = _spoolss_ResetPrinterEx(p, r);
4947 if (p->rng_fault_state) {
4949 /* Return true here, srv_pipe_hnd.c will take care */
4953 if (DEBUGLEVEL >= 10) {
4954 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, r);
4957 push = ndr_push_init_ctx(r, NULL);
4963 ndr_err = call->ndr_push(push, NDR_OUT, r);
4964 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4969 blob = ndr_push_blob(push);
4970 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4980 static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p)
4982 const struct ndr_interface_call *call;
4983 struct ndr_pull *pull;
4984 struct ndr_push *push;
4985 enum ndr_err_code ndr_err;
4987 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r;
4989 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX];
4991 r = talloc(talloc_tos(), struct spoolss_RemoteFindFirstPrinterChangeNotifyEx);
4996 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5001 pull = ndr_pull_init_blob(&blob, r, NULL);
5007 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5008 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5009 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5014 if (DEBUGLEVEL >= 10) {
5015 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5018 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p, r);
5020 if (p->rng_fault_state) {
5022 /* Return true here, srv_pipe_hnd.c will take care */
5026 if (DEBUGLEVEL >= 10) {
5027 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5030 push = ndr_push_init_ctx(r, NULL);
5036 ndr_err = call->ndr_push(push, NDR_OUT, r);
5037 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5042 blob = ndr_push_blob(push);
5043 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5053 static bool api_spoolss_RouterRefreshPrinterChangeNotification(pipes_struct *p)
5055 const struct ndr_interface_call *call;
5056 struct ndr_pull *pull;
5057 struct ndr_push *push;
5058 enum ndr_err_code ndr_err;
5060 struct spoolss_RouterRefreshPrinterChangeNotification *r;
5062 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION];
5064 r = talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotification);
5069 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5074 pull = ndr_pull_init_blob(&blob, r, NULL);
5080 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5081 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5082 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5087 if (DEBUGLEVEL >= 10) {
5088 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, r);
5091 r->out.result = _spoolss_RouterRefreshPrinterChangeNotification(p, r);
5093 if (p->rng_fault_state) {
5095 /* Return true here, srv_pipe_hnd.c will take care */
5099 if (DEBUGLEVEL >= 10) {
5100 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotification, r);
5103 push = ndr_push_init_ctx(r, NULL);
5109 ndr_err = call->ndr_push(push, NDR_OUT, r);
5110 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5115 blob = ndr_push_blob(push);
5116 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5126 static bool api_spoolss_RemoteFindNextPrinterChangeNotifyEx(pipes_struct *p)
5128 const struct ndr_interface_call *call;
5129 struct ndr_pull *pull;
5130 struct ndr_push *push;
5131 enum ndr_err_code ndr_err;
5133 struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r;
5135 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX];
5137 r = talloc(talloc_tos(), struct spoolss_RemoteFindNextPrinterChangeNotifyEx);
5142 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5147 pull = ndr_pull_init_blob(&blob, r, NULL);
5153 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5154 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5155 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5160 if (DEBUGLEVEL >= 10) {
5161 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, r);
5164 ZERO_STRUCT(r->out);
5165 r->out.info = talloc_zero(r, struct spoolss_NotifyInfo *);
5166 if (r->out.info == NULL) {
5171 r->out.result = _spoolss_RemoteFindNextPrinterChangeNotifyEx(p, r);
5173 if (p->rng_fault_state) {
5175 /* Return true here, srv_pipe_hnd.c will take care */
5179 if (DEBUGLEVEL >= 10) {
5180 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx, r);
5183 push = ndr_push_init_ctx(r, NULL);
5189 ndr_err = call->ndr_push(push, NDR_OUT, r);
5190 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5195 blob = ndr_push_blob(push);
5196 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5206 static bool api_spoolss_44(pipes_struct *p)
5208 const struct ndr_interface_call *call;
5209 struct ndr_pull *pull;
5210 struct ndr_push *push;
5211 enum ndr_err_code ndr_err;
5213 struct spoolss_44 *r;
5215 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_44];
5217 r = talloc(talloc_tos(), struct spoolss_44);
5222 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5227 pull = ndr_pull_init_blob(&blob, r, NULL);
5233 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5234 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5235 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5240 if (DEBUGLEVEL >= 10) {
5241 NDR_PRINT_IN_DEBUG(spoolss_44, r);
5244 r->out.result = _spoolss_44(p, r);
5246 if (p->rng_fault_state) {
5248 /* Return true here, srv_pipe_hnd.c will take care */
5252 if (DEBUGLEVEL >= 10) {
5253 NDR_PRINT_OUT_DEBUG(spoolss_44, r);
5256 push = ndr_push_init_ctx(r, NULL);
5262 ndr_err = call->ndr_push(push, NDR_OUT, r);
5263 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5268 blob = ndr_push_blob(push);
5269 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5279 static bool api_spoolss_OpenPrinterEx(pipes_struct *p)
5281 const struct ndr_interface_call *call;
5282 struct ndr_pull *pull;
5283 struct ndr_push *push;
5284 enum ndr_err_code ndr_err;
5286 struct spoolss_OpenPrinterEx *r;
5288 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTEREX];
5290 r = talloc(talloc_tos(), struct spoolss_OpenPrinterEx);
5295 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5300 pull = ndr_pull_init_blob(&blob, r, NULL);
5306 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5307 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5308 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5313 if (DEBUGLEVEL >= 10) {
5314 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, r);
5317 ZERO_STRUCT(r->out);
5318 r->out.handle = talloc_zero(r, struct policy_handle);
5319 if (r->out.handle == NULL) {
5324 r->out.result = _spoolss_OpenPrinterEx(p, r);
5326 if (p->rng_fault_state) {
5328 /* Return true here, srv_pipe_hnd.c will take care */
5332 if (DEBUGLEVEL >= 10) {
5333 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, r);
5336 push = ndr_push_init_ctx(r, NULL);
5342 ndr_err = call->ndr_push(push, NDR_OUT, r);
5343 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5348 blob = ndr_push_blob(push);
5349 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5359 static bool api_spoolss_AddPrinterEx(pipes_struct *p)
5361 const struct ndr_interface_call *call;
5362 struct ndr_pull *pull;
5363 struct ndr_push *push;
5364 enum ndr_err_code ndr_err;
5366 struct spoolss_AddPrinterEx *r;
5368 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTEREX];
5370 r = talloc(talloc_tos(), struct spoolss_AddPrinterEx);
5375 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5380 pull = ndr_pull_init_blob(&blob, r, NULL);
5386 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5387 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5388 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5393 if (DEBUGLEVEL >= 10) {
5394 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, r);
5397 r->out.result = _spoolss_AddPrinterEx(p, r);
5399 if (p->rng_fault_state) {
5401 /* Return true here, srv_pipe_hnd.c will take care */
5405 if (DEBUGLEVEL >= 10) {
5406 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, r);
5409 push = ndr_push_init_ctx(r, NULL);
5415 ndr_err = call->ndr_push(push, NDR_OUT, r);
5416 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5421 blob = ndr_push_blob(push);
5422 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5432 static bool api_spoolss_47(pipes_struct *p)
5434 const struct ndr_interface_call *call;
5435 struct ndr_pull *pull;
5436 struct ndr_push *push;
5437 enum ndr_err_code ndr_err;
5439 struct spoolss_47 *r;
5441 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_47];
5443 r = talloc(talloc_tos(), struct spoolss_47);
5448 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5453 pull = ndr_pull_init_blob(&blob, r, NULL);
5459 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5460 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5461 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5466 if (DEBUGLEVEL >= 10) {
5467 NDR_PRINT_IN_DEBUG(spoolss_47, r);
5470 r->out.result = _spoolss_47(p, r);
5472 if (p->rng_fault_state) {
5474 /* Return true here, srv_pipe_hnd.c will take care */
5478 if (DEBUGLEVEL >= 10) {
5479 NDR_PRINT_OUT_DEBUG(spoolss_47, r);
5482 push = ndr_push_init_ctx(r, NULL);
5488 ndr_err = call->ndr_push(push, NDR_OUT, r);
5489 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5494 blob = ndr_push_blob(push);
5495 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5505 static bool api_spoolss_EnumPrinterData(pipes_struct *p)
5507 const struct ndr_interface_call *call;
5508 struct ndr_pull *pull;
5509 struct ndr_push *push;
5510 enum ndr_err_code ndr_err;
5512 struct spoolss_EnumPrinterData *r;
5514 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATA];
5516 r = talloc(talloc_tos(), struct spoolss_EnumPrinterData);
5521 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5526 pull = ndr_pull_init_blob(&blob, r, NULL);
5532 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5533 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5534 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5539 if (DEBUGLEVEL >= 10) {
5540 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, r);
5543 ZERO_STRUCT(r->out);
5544 r->out.value_name = talloc_zero_array(r, const char, r->in.value_offered / 2);
5545 if (r->out.value_name == NULL) {
5550 r->out.value_needed = talloc_zero(r, uint32_t);
5551 if (r->out.value_needed == NULL) {
5556 r->out.printerdata_type = talloc_zero(r, uint32_t);
5557 if (r->out.printerdata_type == NULL) {
5562 r->out.buffer = talloc_zero(r, DATA_BLOB);
5563 if (r->out.buffer == NULL) {
5568 r->out.data_needed = talloc_zero(r, uint32_t);
5569 if (r->out.data_needed == NULL) {
5574 r->out.result = _spoolss_EnumPrinterData(p, r);
5576 if (p->rng_fault_state) {
5578 /* Return true here, srv_pipe_hnd.c will take care */
5582 if (DEBUGLEVEL >= 10) {
5583 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, r);
5586 push = ndr_push_init_ctx(r, NULL);
5592 ndr_err = call->ndr_push(push, NDR_OUT, r);
5593 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5598 blob = ndr_push_blob(push);
5599 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5609 static bool api_spoolss_DeletePrinterData(pipes_struct *p)
5611 const struct ndr_interface_call *call;
5612 struct ndr_pull *pull;
5613 struct ndr_push *push;
5614 enum ndr_err_code ndr_err;
5616 struct spoolss_DeletePrinterData *r;
5618 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATA];
5620 r = talloc(talloc_tos(), struct spoolss_DeletePrinterData);
5625 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5630 pull = ndr_pull_init_blob(&blob, r, NULL);
5636 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5637 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5638 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5643 if (DEBUGLEVEL >= 10) {
5644 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, r);
5647 r->out.result = _spoolss_DeletePrinterData(p, r);
5649 if (p->rng_fault_state) {
5651 /* Return true here, srv_pipe_hnd.c will take care */
5655 if (DEBUGLEVEL >= 10) {
5656 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, r);
5659 push = ndr_push_init_ctx(r, NULL);
5665 ndr_err = call->ndr_push(push, NDR_OUT, r);
5666 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5671 blob = ndr_push_blob(push);
5672 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5682 static bool api_spoolss_4a(pipes_struct *p)
5684 const struct ndr_interface_call *call;
5685 struct ndr_pull *pull;
5686 struct ndr_push *push;
5687 enum ndr_err_code ndr_err;
5689 struct spoolss_4a *r;
5691 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4A];
5693 r = talloc(talloc_tos(), struct spoolss_4a);
5698 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5703 pull = ndr_pull_init_blob(&blob, r, NULL);
5709 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5710 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5711 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5716 if (DEBUGLEVEL >= 10) {
5717 NDR_PRINT_IN_DEBUG(spoolss_4a, r);
5720 r->out.result = _spoolss_4a(p, r);
5722 if (p->rng_fault_state) {
5724 /* Return true here, srv_pipe_hnd.c will take care */
5728 if (DEBUGLEVEL >= 10) {
5729 NDR_PRINT_OUT_DEBUG(spoolss_4a, r);
5732 push = ndr_push_init_ctx(r, NULL);
5738 ndr_err = call->ndr_push(push, NDR_OUT, r);
5739 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5744 blob = ndr_push_blob(push);
5745 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5755 static bool api_spoolss_4b(pipes_struct *p)
5757 const struct ndr_interface_call *call;
5758 struct ndr_pull *pull;
5759 struct ndr_push *push;
5760 enum ndr_err_code ndr_err;
5762 struct spoolss_4b *r;
5764 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4B];
5766 r = talloc(talloc_tos(), struct spoolss_4b);
5771 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5776 pull = ndr_pull_init_blob(&blob, r, NULL);
5782 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5783 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5784 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5789 if (DEBUGLEVEL >= 10) {
5790 NDR_PRINT_IN_DEBUG(spoolss_4b, r);
5793 r->out.result = _spoolss_4b(p, r);
5795 if (p->rng_fault_state) {
5797 /* Return true here, srv_pipe_hnd.c will take care */
5801 if (DEBUGLEVEL >= 10) {
5802 NDR_PRINT_OUT_DEBUG(spoolss_4b, r);
5805 push = ndr_push_init_ctx(r, NULL);
5811 ndr_err = call->ndr_push(push, NDR_OUT, r);
5812 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5817 blob = ndr_push_blob(push);
5818 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5828 static bool api_spoolss_4c(pipes_struct *p)
5830 const struct ndr_interface_call *call;
5831 struct ndr_pull *pull;
5832 struct ndr_push *push;
5833 enum ndr_err_code ndr_err;
5835 struct spoolss_4c *r;
5837 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4C];
5839 r = talloc(talloc_tos(), struct spoolss_4c);
5844 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5849 pull = ndr_pull_init_blob(&blob, r, NULL);
5855 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5856 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5857 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5862 if (DEBUGLEVEL >= 10) {
5863 NDR_PRINT_IN_DEBUG(spoolss_4c, r);
5866 r->out.result = _spoolss_4c(p, r);
5868 if (p->rng_fault_state) {
5870 /* Return true here, srv_pipe_hnd.c will take care */
5874 if (DEBUGLEVEL >= 10) {
5875 NDR_PRINT_OUT_DEBUG(spoolss_4c, r);
5878 push = ndr_push_init_ctx(r, NULL);
5884 ndr_err = call->ndr_push(push, NDR_OUT, r);
5885 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5890 blob = ndr_push_blob(push);
5891 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5901 static bool api_spoolss_SetPrinterDataEx(pipes_struct *p)
5903 const struct ndr_interface_call *call;
5904 struct ndr_pull *pull;
5905 struct ndr_push *push;
5906 enum ndr_err_code ndr_err;
5908 struct spoolss_SetPrinterDataEx *r;
5910 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATAEX];
5912 r = talloc(talloc_tos(), struct spoolss_SetPrinterDataEx);
5917 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5922 pull = ndr_pull_init_blob(&blob, r, NULL);
5928 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5929 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5930 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5935 if (DEBUGLEVEL >= 10) {
5936 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, r);
5939 r->out.result = _spoolss_SetPrinterDataEx(p, r);
5941 if (p->rng_fault_state) {
5943 /* Return true here, srv_pipe_hnd.c will take care */
5947 if (DEBUGLEVEL >= 10) {
5948 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, r);
5951 push = ndr_push_init_ctx(r, NULL);
5957 ndr_err = call->ndr_push(push, NDR_OUT, r);
5958 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5963 blob = ndr_push_blob(push);
5964 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5974 static bool api_spoolss_GetPrinterDataEx(pipes_struct *p)
5976 const struct ndr_interface_call *call;
5977 struct ndr_pull *pull;
5978 struct ndr_push *push;
5979 enum ndr_err_code ndr_err;
5981 struct spoolss_GetPrinterDataEx *r;
5983 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATAEX];
5985 r = talloc(talloc_tos(), struct spoolss_GetPrinterDataEx);
5990 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5995 pull = ndr_pull_init_blob(&blob, r, NULL);
6001 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6002 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6003 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6008 if (DEBUGLEVEL >= 10) {
6009 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, r);
6012 ZERO_STRUCT(r->out);
6013 r->out.type = talloc_zero(r, uint32_t);
6014 if (r->out.type == NULL) {
6019 r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
6020 if (r->out.buffer == NULL) {
6025 r->out.needed = talloc_zero(r, uint32_t);
6026 if (r->out.needed == NULL) {
6031 r->out.result = _spoolss_GetPrinterDataEx(p, r);
6033 if (p->rng_fault_state) {
6035 /* Return true here, srv_pipe_hnd.c will take care */
6039 if (DEBUGLEVEL >= 10) {
6040 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, r);
6043 push = ndr_push_init_ctx(r, NULL);
6049 ndr_err = call->ndr_push(push, NDR_OUT, r);
6050 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6055 blob = ndr_push_blob(push);
6056 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6066 static bool api_spoolss_EnumPrinterDataEx(pipes_struct *p)
6068 const struct ndr_interface_call *call;
6069 struct ndr_pull *pull;
6070 struct ndr_push *push;
6071 enum ndr_err_code ndr_err;
6073 struct spoolss_EnumPrinterDataEx *r;
6075 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATAEX];
6077 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDataEx);
6082 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6087 pull = ndr_pull_init_blob(&blob, r, NULL);
6093 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6094 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6095 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6100 if (DEBUGLEVEL >= 10) {
6101 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, r);
6104 ZERO_STRUCT(r->out);
6105 r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
6106 if (r->out.buffer == NULL) {
6111 r->out.needed = talloc_zero(r, uint32_t);
6112 if (r->out.needed == NULL) {
6117 r->out.count = talloc_zero(r, uint32_t);
6118 if (r->out.count == NULL) {
6123 r->out.result = _spoolss_EnumPrinterDataEx(p, r);
6125 if (p->rng_fault_state) {
6127 /* Return true here, srv_pipe_hnd.c will take care */
6131 if (DEBUGLEVEL >= 10) {
6132 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, r);
6135 push = ndr_push_init_ctx(r, NULL);
6141 ndr_err = call->ndr_push(push, NDR_OUT, r);
6142 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6147 blob = ndr_push_blob(push);
6148 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6158 static bool api_spoolss_EnumPrinterKey(pipes_struct *p)
6160 const struct ndr_interface_call *call;
6161 struct ndr_pull *pull;
6162 struct ndr_push *push;
6163 enum ndr_err_code ndr_err;
6165 struct spoolss_EnumPrinterKey *r;
6167 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERKEY];
6169 r = talloc(talloc_tos(), struct spoolss_EnumPrinterKey);
6174 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6179 pull = ndr_pull_init_blob(&blob, r, NULL);
6185 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6186 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6187 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6192 if (DEBUGLEVEL >= 10) {
6193 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, r);
6196 ZERO_STRUCT(r->out);
6197 r->out.key_buffer = talloc_zero_array(r, uint16_t, r->in.key_buffer_size / 2);
6198 if (r->out.key_buffer == NULL) {
6203 r->out.needed = talloc_zero(r, uint32_t);
6204 if (r->out.needed == NULL) {
6209 r->out.result = _spoolss_EnumPrinterKey(p, r);
6211 if (p->rng_fault_state) {
6213 /* Return true here, srv_pipe_hnd.c will take care */
6217 if (DEBUGLEVEL >= 10) {
6218 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, r);
6221 push = ndr_push_init_ctx(r, NULL);
6227 ndr_err = call->ndr_push(push, NDR_OUT, r);
6228 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6233 blob = ndr_push_blob(push);
6234 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6244 static bool api_spoolss_DeletePrinterDataEx(pipes_struct *p)
6246 const struct ndr_interface_call *call;
6247 struct ndr_pull *pull;
6248 struct ndr_push *push;
6249 enum ndr_err_code ndr_err;
6251 struct spoolss_DeletePrinterDataEx *r;
6253 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATAEX];
6255 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDataEx);
6260 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6265 pull = ndr_pull_init_blob(&blob, r, NULL);
6271 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6272 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6273 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6278 if (DEBUGLEVEL >= 10) {
6279 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, r);
6282 r->out.result = _spoolss_DeletePrinterDataEx(p, r);
6284 if (p->rng_fault_state) {
6286 /* Return true here, srv_pipe_hnd.c will take care */
6290 if (DEBUGLEVEL >= 10) {
6291 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, r);
6294 push = ndr_push_init_ctx(r, NULL);
6300 ndr_err = call->ndr_push(push, NDR_OUT, r);
6301 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6306 blob = ndr_push_blob(push);
6307 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6317 static bool api_spoolss_DeletePrinterKey(pipes_struct *p)
6319 const struct ndr_interface_call *call;
6320 struct ndr_pull *pull;
6321 struct ndr_push *push;
6322 enum ndr_err_code ndr_err;
6324 struct spoolss_DeletePrinterKey *r;
6326 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERKEY];
6328 r = talloc(talloc_tos(), struct spoolss_DeletePrinterKey);
6333 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6338 pull = ndr_pull_init_blob(&blob, r, NULL);
6344 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6345 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6346 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6351 if (DEBUGLEVEL >= 10) {
6352 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, r);
6355 r->out.result = _spoolss_DeletePrinterKey(p, r);
6357 if (p->rng_fault_state) {
6359 /* Return true here, srv_pipe_hnd.c will take care */
6363 if (DEBUGLEVEL >= 10) {
6364 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, r);
6367 push = ndr_push_init_ctx(r, NULL);
6373 ndr_err = call->ndr_push(push, NDR_OUT, r);
6374 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6379 blob = ndr_push_blob(push);
6380 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6390 static bool api_spoolss_53(pipes_struct *p)
6392 const struct ndr_interface_call *call;
6393 struct ndr_pull *pull;
6394 struct ndr_push *push;
6395 enum ndr_err_code ndr_err;
6397 struct spoolss_53 *r;
6399 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_53];
6401 r = talloc(talloc_tos(), struct spoolss_53);
6406 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6411 pull = ndr_pull_init_blob(&blob, r, NULL);
6417 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6418 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6419 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6424 if (DEBUGLEVEL >= 10) {
6425 NDR_PRINT_IN_DEBUG(spoolss_53, r);
6428 r->out.result = _spoolss_53(p, r);
6430 if (p->rng_fault_state) {
6432 /* Return true here, srv_pipe_hnd.c will take care */
6436 if (DEBUGLEVEL >= 10) {
6437 NDR_PRINT_OUT_DEBUG(spoolss_53, r);
6440 push = ndr_push_init_ctx(r, NULL);
6446 ndr_err = call->ndr_push(push, NDR_OUT, r);
6447 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6452 blob = ndr_push_blob(push);
6453 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6463 static bool api_spoolss_DeletePrinterDriverEx(pipes_struct *p)
6465 const struct ndr_interface_call *call;
6466 struct ndr_pull *pull;
6467 struct ndr_push *push;
6468 enum ndr_err_code ndr_err;
6470 struct spoolss_DeletePrinterDriverEx *r;
6472 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVEREX];
6474 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriverEx);
6479 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6484 pull = ndr_pull_init_blob(&blob, r, NULL);
6490 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6491 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6492 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6497 if (DEBUGLEVEL >= 10) {
6498 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, r);
6501 r->out.result = _spoolss_DeletePrinterDriverEx(p, r);
6503 if (p->rng_fault_state) {
6505 /* Return true here, srv_pipe_hnd.c will take care */
6509 if (DEBUGLEVEL >= 10) {
6510 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, r);
6513 push = ndr_push_init_ctx(r, NULL);
6519 ndr_err = call->ndr_push(push, NDR_OUT, r);
6520 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6525 blob = ndr_push_blob(push);
6526 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6536 static bool api_spoolss_55(pipes_struct *p)
6538 const struct ndr_interface_call *call;
6539 struct ndr_pull *pull;
6540 struct ndr_push *push;
6541 enum ndr_err_code ndr_err;
6543 struct spoolss_55 *r;
6545 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_55];
6547 r = talloc(talloc_tos(), struct spoolss_55);
6552 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6557 pull = ndr_pull_init_blob(&blob, r, NULL);
6563 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6564 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6565 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6570 if (DEBUGLEVEL >= 10) {
6571 NDR_PRINT_IN_DEBUG(spoolss_55, r);
6574 r->out.result = _spoolss_55(p, r);
6576 if (p->rng_fault_state) {
6578 /* Return true here, srv_pipe_hnd.c will take care */
6582 if (DEBUGLEVEL >= 10) {
6583 NDR_PRINT_OUT_DEBUG(spoolss_55, r);
6586 push = ndr_push_init_ctx(r, NULL);
6592 ndr_err = call->ndr_push(push, NDR_OUT, r);
6593 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6598 blob = ndr_push_blob(push);
6599 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6609 static bool api_spoolss_56(pipes_struct *p)
6611 const struct ndr_interface_call *call;
6612 struct ndr_pull *pull;
6613 struct ndr_push *push;
6614 enum ndr_err_code ndr_err;
6616 struct spoolss_56 *r;
6618 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_56];
6620 r = talloc(talloc_tos(), struct spoolss_56);
6625 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6630 pull = ndr_pull_init_blob(&blob, r, NULL);
6636 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6637 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6638 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6643 if (DEBUGLEVEL >= 10) {
6644 NDR_PRINT_IN_DEBUG(spoolss_56, r);
6647 r->out.result = _spoolss_56(p, r);
6649 if (p->rng_fault_state) {
6651 /* Return true here, srv_pipe_hnd.c will take care */
6655 if (DEBUGLEVEL >= 10) {
6656 NDR_PRINT_OUT_DEBUG(spoolss_56, r);
6659 push = ndr_push_init_ctx(r, NULL);
6665 ndr_err = call->ndr_push(push, NDR_OUT, r);
6666 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6671 blob = ndr_push_blob(push);
6672 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6682 static bool api_spoolss_57(pipes_struct *p)
6684 const struct ndr_interface_call *call;
6685 struct ndr_pull *pull;
6686 struct ndr_push *push;
6687 enum ndr_err_code ndr_err;
6689 struct spoolss_57 *r;
6691 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_57];
6693 r = talloc(talloc_tos(), struct spoolss_57);
6698 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6703 pull = ndr_pull_init_blob(&blob, r, NULL);
6709 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6710 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6711 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6716 if (DEBUGLEVEL >= 10) {
6717 NDR_PRINT_IN_DEBUG(spoolss_57, r);
6720 r->out.result = _spoolss_57(p, r);
6722 if (p->rng_fault_state) {
6724 /* Return true here, srv_pipe_hnd.c will take care */
6728 if (DEBUGLEVEL >= 10) {
6729 NDR_PRINT_OUT_DEBUG(spoolss_57, r);
6732 push = ndr_push_init_ctx(r, NULL);
6738 ndr_err = call->ndr_push(push, NDR_OUT, r);
6739 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6744 blob = ndr_push_blob(push);
6745 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6755 static bool api_spoolss_XcvData(pipes_struct *p)
6757 const struct ndr_interface_call *call;
6758 struct ndr_pull *pull;
6759 struct ndr_push *push;
6760 enum ndr_err_code ndr_err;
6762 struct spoolss_XcvData *r;
6764 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_XCVDATA];
6766 r = talloc(talloc_tos(), struct spoolss_XcvData);
6771 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6776 pull = ndr_pull_init_blob(&blob, r, NULL);
6782 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6783 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6784 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6789 if (DEBUGLEVEL >= 10) {
6790 NDR_PRINT_IN_DEBUG(spoolss_XcvData, r);
6793 ZERO_STRUCT(r->out);
6794 r->out.status_code = r->in.status_code;
6795 r->out.out_data = talloc_zero_array(r, uint8_t, r->in.out_data_size);
6796 if (r->out.out_data == NULL) {
6801 r->out.needed = talloc_zero(r, uint32_t);
6802 if (r->out.needed == NULL) {
6807 r->out.result = _spoolss_XcvData(p, r);
6809 if (p->rng_fault_state) {
6811 /* Return true here, srv_pipe_hnd.c will take care */
6815 if (DEBUGLEVEL >= 10) {
6816 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, r);
6819 push = ndr_push_init_ctx(r, NULL);
6825 ndr_err = call->ndr_push(push, NDR_OUT, r);
6826 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6831 blob = ndr_push_blob(push);
6832 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6842 static bool api_spoolss_AddPrinterDriverEx(pipes_struct *p)
6844 const struct ndr_interface_call *call;
6845 struct ndr_pull *pull;
6846 struct ndr_push *push;
6847 enum ndr_err_code ndr_err;
6849 struct spoolss_AddPrinterDriverEx *r;
6851 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVEREX];
6853 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriverEx);
6858 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6863 pull = ndr_pull_init_blob(&blob, r, NULL);
6869 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6870 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6871 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6876 if (DEBUGLEVEL >= 10) {
6877 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, r);
6880 r->out.result = _spoolss_AddPrinterDriverEx(p, r);
6882 if (p->rng_fault_state) {
6884 /* Return true here, srv_pipe_hnd.c will take care */
6888 if (DEBUGLEVEL >= 10) {
6889 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, r);
6892 push = ndr_push_init_ctx(r, NULL);
6898 ndr_err = call->ndr_push(push, NDR_OUT, r);
6899 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6904 blob = ndr_push_blob(push);
6905 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6915 static bool api_spoolss_5a(pipes_struct *p)
6917 const struct ndr_interface_call *call;
6918 struct ndr_pull *pull;
6919 struct ndr_push *push;
6920 enum ndr_err_code ndr_err;
6922 struct spoolss_5a *r;
6924 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5A];
6926 r = talloc(talloc_tos(), struct spoolss_5a);
6931 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6936 pull = ndr_pull_init_blob(&blob, r, NULL);
6942 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6943 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6944 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6949 if (DEBUGLEVEL >= 10) {
6950 NDR_PRINT_IN_DEBUG(spoolss_5a, r);
6953 r->out.result = _spoolss_5a(p, r);
6955 if (p->rng_fault_state) {
6957 /* Return true here, srv_pipe_hnd.c will take care */
6961 if (DEBUGLEVEL >= 10) {
6962 NDR_PRINT_OUT_DEBUG(spoolss_5a, r);
6965 push = ndr_push_init_ctx(r, NULL);
6971 ndr_err = call->ndr_push(push, NDR_OUT, r);
6972 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6977 blob = ndr_push_blob(push);
6978 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6988 static bool api_spoolss_5b(pipes_struct *p)
6990 const struct ndr_interface_call *call;
6991 struct ndr_pull *pull;
6992 struct ndr_push *push;
6993 enum ndr_err_code ndr_err;
6995 struct spoolss_5b *r;
6997 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5B];
6999 r = talloc(talloc_tos(), struct spoolss_5b);
7004 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7009 pull = ndr_pull_init_blob(&blob, r, NULL);
7015 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7016 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7017 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7022 if (DEBUGLEVEL >= 10) {
7023 NDR_PRINT_IN_DEBUG(spoolss_5b, r);
7026 r->out.result = _spoolss_5b(p, r);
7028 if (p->rng_fault_state) {
7030 /* Return true here, srv_pipe_hnd.c will take care */
7034 if (DEBUGLEVEL >= 10) {
7035 NDR_PRINT_OUT_DEBUG(spoolss_5b, r);
7038 push = ndr_push_init_ctx(r, NULL);
7044 ndr_err = call->ndr_push(push, NDR_OUT, r);
7045 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7050 blob = ndr_push_blob(push);
7051 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7061 static bool api_spoolss_5c(pipes_struct *p)
7063 const struct ndr_interface_call *call;
7064 struct ndr_pull *pull;
7065 struct ndr_push *push;
7066 enum ndr_err_code ndr_err;
7068 struct spoolss_5c *r;
7070 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5C];
7072 r = talloc(talloc_tos(), struct spoolss_5c);
7077 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7082 pull = ndr_pull_init_blob(&blob, r, NULL);
7088 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7089 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7090 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7095 if (DEBUGLEVEL >= 10) {
7096 NDR_PRINT_IN_DEBUG(spoolss_5c, r);
7099 r->out.result = _spoolss_5c(p, r);
7101 if (p->rng_fault_state) {
7103 /* Return true here, srv_pipe_hnd.c will take care */
7107 if (DEBUGLEVEL >= 10) {
7108 NDR_PRINT_OUT_DEBUG(spoolss_5c, r);
7111 push = ndr_push_init_ctx(r, NULL);
7117 ndr_err = call->ndr_push(push, NDR_OUT, r);
7118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7123 blob = ndr_push_blob(push);
7124 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7134 static bool api_spoolss_5d(pipes_struct *p)
7136 const struct ndr_interface_call *call;
7137 struct ndr_pull *pull;
7138 struct ndr_push *push;
7139 enum ndr_err_code ndr_err;
7141 struct spoolss_5d *r;
7143 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5D];
7145 r = talloc(talloc_tos(), struct spoolss_5d);
7150 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7155 pull = ndr_pull_init_blob(&blob, r, NULL);
7161 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7162 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7163 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7168 if (DEBUGLEVEL >= 10) {
7169 NDR_PRINT_IN_DEBUG(spoolss_5d, r);
7172 r->out.result = _spoolss_5d(p, r);
7174 if (p->rng_fault_state) {
7176 /* Return true here, srv_pipe_hnd.c will take care */
7180 if (DEBUGLEVEL >= 10) {
7181 NDR_PRINT_OUT_DEBUG(spoolss_5d, r);
7184 push = ndr_push_init_ctx(r, NULL);
7190 ndr_err = call->ndr_push(push, NDR_OUT, r);
7191 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7196 blob = ndr_push_blob(push);
7197 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7207 static bool api_spoolss_5e(pipes_struct *p)
7209 const struct ndr_interface_call *call;
7210 struct ndr_pull *pull;
7211 struct ndr_push *push;
7212 enum ndr_err_code ndr_err;
7214 struct spoolss_5e *r;
7216 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5E];
7218 r = talloc(talloc_tos(), struct spoolss_5e);
7223 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7228 pull = ndr_pull_init_blob(&blob, r, NULL);
7234 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7235 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7236 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7241 if (DEBUGLEVEL >= 10) {
7242 NDR_PRINT_IN_DEBUG(spoolss_5e, r);
7245 r->out.result = _spoolss_5e(p, r);
7247 if (p->rng_fault_state) {
7249 /* Return true here, srv_pipe_hnd.c will take care */
7253 if (DEBUGLEVEL >= 10) {
7254 NDR_PRINT_OUT_DEBUG(spoolss_5e, r);
7257 push = ndr_push_init_ctx(r, NULL);
7263 ndr_err = call->ndr_push(push, NDR_OUT, r);
7264 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7269 blob = ndr_push_blob(push);
7270 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7280 static bool api_spoolss_5f(pipes_struct *p)
7282 const struct ndr_interface_call *call;
7283 struct ndr_pull *pull;
7284 struct ndr_push *push;
7285 enum ndr_err_code ndr_err;
7287 struct spoolss_5f *r;
7289 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5F];
7291 r = talloc(talloc_tos(), struct spoolss_5f);
7296 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7301 pull = ndr_pull_init_blob(&blob, r, NULL);
7307 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7308 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7309 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7314 if (DEBUGLEVEL >= 10) {
7315 NDR_PRINT_IN_DEBUG(spoolss_5f, r);
7318 r->out.result = _spoolss_5f(p, r);
7320 if (p->rng_fault_state) {
7322 /* Return true here, srv_pipe_hnd.c will take care */
7326 if (DEBUGLEVEL >= 10) {
7327 NDR_PRINT_OUT_DEBUG(spoolss_5f, r);
7330 push = ndr_push_init_ctx(r, NULL);
7336 ndr_err = call->ndr_push(push, NDR_OUT, r);
7337 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7342 blob = ndr_push_blob(push);
7343 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7355 static struct api_struct api_spoolss_cmds[] =
7357 {"SPOOLSS_ENUMPRINTERS", NDR_SPOOLSS_ENUMPRINTERS, api_spoolss_EnumPrinters},
7358 {"SPOOLSS_OPENPRINTER", NDR_SPOOLSS_OPENPRINTER, api_spoolss_OpenPrinter},
7359 {"SPOOLSS_SETJOB", NDR_SPOOLSS_SETJOB, api_spoolss_SetJob},
7360 {"SPOOLSS_GETJOB", NDR_SPOOLSS_GETJOB, api_spoolss_GetJob},
7361 {"SPOOLSS_ENUMJOBS", NDR_SPOOLSS_ENUMJOBS, api_spoolss_EnumJobs},
7362 {"SPOOLSS_ADDPRINTER", NDR_SPOOLSS_ADDPRINTER, api_spoolss_AddPrinter},
7363 {"SPOOLSS_DELETEPRINTER", NDR_SPOOLSS_DELETEPRINTER, api_spoolss_DeletePrinter},
7364 {"SPOOLSS_SETPRINTER", NDR_SPOOLSS_SETPRINTER, api_spoolss_SetPrinter},
7365 {"SPOOLSS_GETPRINTER", NDR_SPOOLSS_GETPRINTER, api_spoolss_GetPrinter},
7366 {"SPOOLSS_ADDPRINTERDRIVER", NDR_SPOOLSS_ADDPRINTERDRIVER, api_spoolss_AddPrinterDriver},
7367 {"SPOOLSS_ENUMPRINTERDRIVERS", NDR_SPOOLSS_ENUMPRINTERDRIVERS, api_spoolss_EnumPrinterDrivers},
7368 {"SPOOLSS_GETPRINTERDRIVER", NDR_SPOOLSS_GETPRINTERDRIVER, api_spoolss_GetPrinterDriver},
7369 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_GetPrinterDriverDirectory},
7370 {"SPOOLSS_DELETEPRINTERDRIVER", NDR_SPOOLSS_DELETEPRINTERDRIVER, api_spoolss_DeletePrinterDriver},
7371 {"SPOOLSS_ADDPRINTPROCESSOR", NDR_SPOOLSS_ADDPRINTPROCESSOR, api_spoolss_AddPrintProcessor},
7372 {"SPOOLSS_ENUMPRINTPROCESSORS", NDR_SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_EnumPrintProcessors},
7373 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY", NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY, api_spoolss_GetPrintProcessorDirectory},
7374 {"SPOOLSS_STARTDOCPRINTER", NDR_SPOOLSS_STARTDOCPRINTER, api_spoolss_StartDocPrinter},
7375 {"SPOOLSS_STARTPAGEPRINTER", NDR_SPOOLSS_STARTPAGEPRINTER, api_spoolss_StartPagePrinter},
7376 {"SPOOLSS_WRITEPRINTER", NDR_SPOOLSS_WRITEPRINTER, api_spoolss_WritePrinter},
7377 {"SPOOLSS_ENDPAGEPRINTER", NDR_SPOOLSS_ENDPAGEPRINTER, api_spoolss_EndPagePrinter},
7378 {"SPOOLSS_ABORTPRINTER", NDR_SPOOLSS_ABORTPRINTER, api_spoolss_AbortPrinter},
7379 {"SPOOLSS_READPRINTER", NDR_SPOOLSS_READPRINTER, api_spoolss_ReadPrinter},
7380 {"SPOOLSS_ENDDOCPRINTER", NDR_SPOOLSS_ENDDOCPRINTER, api_spoolss_EndDocPrinter},
7381 {"SPOOLSS_ADDJOB", NDR_SPOOLSS_ADDJOB, api_spoolss_AddJob},
7382 {"SPOOLSS_SCHEDULEJOB", NDR_SPOOLSS_SCHEDULEJOB, api_spoolss_ScheduleJob},
7383 {"SPOOLSS_GETPRINTERDATA", NDR_SPOOLSS_GETPRINTERDATA, api_spoolss_GetPrinterData},
7384 {"SPOOLSS_SETPRINTERDATA", NDR_SPOOLSS_SETPRINTERDATA, api_spoolss_SetPrinterData},
7385 {"SPOOLSS_WAITFORPRINTERCHANGE", NDR_SPOOLSS_WAITFORPRINTERCHANGE, api_spoolss_WaitForPrinterChange},
7386 {"SPOOLSS_CLOSEPRINTER", NDR_SPOOLSS_CLOSEPRINTER, api_spoolss_ClosePrinter},
7387 {"SPOOLSS_ADDFORM", NDR_SPOOLSS_ADDFORM, api_spoolss_AddForm},
7388 {"SPOOLSS_DELETEFORM", NDR_SPOOLSS_DELETEFORM, api_spoolss_DeleteForm},
7389 {"SPOOLSS_GETFORM", NDR_SPOOLSS_GETFORM, api_spoolss_GetForm},
7390 {"SPOOLSS_SETFORM", NDR_SPOOLSS_SETFORM, api_spoolss_SetForm},
7391 {"SPOOLSS_ENUMFORMS", NDR_SPOOLSS_ENUMFORMS, api_spoolss_EnumForms},
7392 {"SPOOLSS_ENUMPORTS", NDR_SPOOLSS_ENUMPORTS, api_spoolss_EnumPorts},
7393 {"SPOOLSS_ENUMMONITORS", NDR_SPOOLSS_ENUMMONITORS, api_spoolss_EnumMonitors},
7394 {"SPOOLSS_ADDPORT", NDR_SPOOLSS_ADDPORT, api_spoolss_AddPort},
7395 {"SPOOLSS_CONFIGUREPORT", NDR_SPOOLSS_CONFIGUREPORT, api_spoolss_ConfigurePort},
7396 {"SPOOLSS_DELETEPORT", NDR_SPOOLSS_DELETEPORT, api_spoolss_DeletePort},
7397 {"SPOOLSS_CREATEPRINTERIC", NDR_SPOOLSS_CREATEPRINTERIC, api_spoolss_CreatePrinterIC},
7398 {"SPOOLSS_PLAYGDISCRIPTONPRINTERIC", NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC, api_spoolss_PlayGDIScriptOnPrinterIC},
7399 {"SPOOLSS_DELETEPRINTERIC", NDR_SPOOLSS_DELETEPRINTERIC, api_spoolss_DeletePrinterIC},
7400 {"SPOOLSS_ADDPRINTERCONNECTION", NDR_SPOOLSS_ADDPRINTERCONNECTION, api_spoolss_AddPrinterConnection},
7401 {"SPOOLSS_DELETEPRINTERCONNECTION", NDR_SPOOLSS_DELETEPRINTERCONNECTION, api_spoolss_DeletePrinterConnection},
7402 {"SPOOLSS_PRINTERMESSAGEBOX", NDR_SPOOLSS_PRINTERMESSAGEBOX, api_spoolss_PrinterMessageBox},
7403 {"SPOOLSS_ADDMONITOR", NDR_SPOOLSS_ADDMONITOR, api_spoolss_AddMonitor},
7404 {"SPOOLSS_DELETEMONITOR", NDR_SPOOLSS_DELETEMONITOR, api_spoolss_DeleteMonitor},
7405 {"SPOOLSS_DELETEPRINTPROCESSOR", NDR_SPOOLSS_DELETEPRINTPROCESSOR, api_spoolss_DeletePrintProcessor},
7406 {"SPOOLSS_ADDPRINTPROVIDOR", NDR_SPOOLSS_ADDPRINTPROVIDOR, api_spoolss_AddPrintProvidor},
7407 {"SPOOLSS_DELETEPRINTPROVIDOR", NDR_SPOOLSS_DELETEPRINTPROVIDOR, api_spoolss_DeletePrintProvidor},
7408 {"SPOOLSS_ENUMPRINTPROCDATATYPES", NDR_SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_EnumPrintProcDataTypes},
7409 {"SPOOLSS_RESETPRINTER", NDR_SPOOLSS_RESETPRINTER, api_spoolss_ResetPrinter},
7410 {"SPOOLSS_GETPRINTERDRIVER2", NDR_SPOOLSS_GETPRINTERDRIVER2, api_spoolss_GetPrinterDriver2},
7411 {"SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_FindFirstPrinterChangeNotification},
7412 {"SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION, api_spoolss_FindNextPrinterChangeNotification},
7413 {"SPOOLSS_FINDCLOSEPRINTERNOTIFY", NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY, api_spoolss_FindClosePrinterNotify},
7414 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD, api_spoolss_RouterFindFirstPrinterChangeNotificationOld},
7415 {"SPOOLSS_REPLYOPENPRINTER", NDR_SPOOLSS_REPLYOPENPRINTER, api_spoolss_ReplyOpenPrinter},
7416 {"SPOOLSS_ROUTERREPLYPRINTER", NDR_SPOOLSS_ROUTERREPLYPRINTER, api_spoolss_RouterReplyPrinter},
7417 {"SPOOLSS_REPLYCLOSEPRINTER", NDR_SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_ReplyClosePrinter},
7418 {"SPOOLSS_ADDPORTEX", NDR_SPOOLSS_ADDPORTEX, api_spoolss_AddPortEx},
7419 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_RouterFindFirstPrinterChangeNotification},
7420 {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT, api_spoolss_SpoolerInit},
7421 {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX, api_spoolss_ResetPrinterEx},
7422 {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx},
7423 {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION, api_spoolss_RouterRefreshPrinterChangeNotification},
7424 {"SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindNextPrinterChangeNotifyEx},
7425 {"SPOOLSS_44", NDR_SPOOLSS_44, api_spoolss_44},
7426 {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX, api_spoolss_OpenPrinterEx},
7427 {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX, api_spoolss_AddPrinterEx},
7428 {"SPOOLSS_47", NDR_SPOOLSS_47, api_spoolss_47},
7429 {"SPOOLSS_ENUMPRINTERDATA", NDR_SPOOLSS_ENUMPRINTERDATA, api_spoolss_EnumPrinterData},
7430 {"SPOOLSS_DELETEPRINTERDATA", NDR_SPOOLSS_DELETEPRINTERDATA, api_spoolss_DeletePrinterData},
7431 {"SPOOLSS_4A", NDR_SPOOLSS_4A, api_spoolss_4a},
7432 {"SPOOLSS_4B", NDR_SPOOLSS_4B, api_spoolss_4b},
7433 {"SPOOLSS_4C", NDR_SPOOLSS_4C, api_spoolss_4c},
7434 {"SPOOLSS_SETPRINTERDATAEX", NDR_SPOOLSS_SETPRINTERDATAEX, api_spoolss_SetPrinterDataEx},
7435 {"SPOOLSS_GETPRINTERDATAEX", NDR_SPOOLSS_GETPRINTERDATAEX, api_spoolss_GetPrinterDataEx},
7436 {"SPOOLSS_ENUMPRINTERDATAEX", NDR_SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_EnumPrinterDataEx},
7437 {"SPOOLSS_ENUMPRINTERKEY", NDR_SPOOLSS_ENUMPRINTERKEY, api_spoolss_EnumPrinterKey},
7438 {"SPOOLSS_DELETEPRINTERDATAEX", NDR_SPOOLSS_DELETEPRINTERDATAEX, api_spoolss_DeletePrinterDataEx},
7439 {"SPOOLSS_DELETEPRINTERKEY", NDR_SPOOLSS_DELETEPRINTERKEY, api_spoolss_DeletePrinterKey},
7440 {"SPOOLSS_53", NDR_SPOOLSS_53, api_spoolss_53},
7441 {"SPOOLSS_DELETEPRINTERDRIVEREX", NDR_SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_DeletePrinterDriverEx},
7442 {"SPOOLSS_55", NDR_SPOOLSS_55, api_spoolss_55},
7443 {"SPOOLSS_56", NDR_SPOOLSS_56, api_spoolss_56},
7444 {"SPOOLSS_57", NDR_SPOOLSS_57, api_spoolss_57},
7445 {"SPOOLSS_XCVDATA", NDR_SPOOLSS_XCVDATA, api_spoolss_XcvData},
7446 {"SPOOLSS_ADDPRINTERDRIVEREX", NDR_SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_AddPrinterDriverEx},
7447 {"SPOOLSS_5A", NDR_SPOOLSS_5A, api_spoolss_5a},
7448 {"SPOOLSS_5B", NDR_SPOOLSS_5B, api_spoolss_5b},
7449 {"SPOOLSS_5C", NDR_SPOOLSS_5C, api_spoolss_5c},
7450 {"SPOOLSS_5D", NDR_SPOOLSS_5D, api_spoolss_5d},
7451 {"SPOOLSS_5E", NDR_SPOOLSS_5E, api_spoolss_5e},
7452 {"SPOOLSS_5F", NDR_SPOOLSS_5F, api_spoolss_5f},
7455 void spoolss_get_pipe_fns(struct api_struct **fns, int *n_fns)
7457 *fns = api_spoolss_cmds;
7458 *n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
7461 NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
7463 if (cli->pipes_struct == NULL) {
7464 return NT_STATUS_INVALID_PARAMETER;
7469 case NDR_SPOOLSS_ENUMPRINTERS: {
7470 struct spoolss_EnumPrinters *r = (struct spoolss_EnumPrinters *)_r;
7471 ZERO_STRUCT(r->out);
7472 r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrinterInfo, r->out.count);
7473 if (r->out.info == NULL) {
7474 return NT_STATUS_NO_MEMORY;
7477 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7478 if (r->out.needed == NULL) {
7479 return NT_STATUS_NO_MEMORY;
7482 r->out.result = _spoolss_EnumPrinters(cli->pipes_struct, r);
7483 return NT_STATUS_OK;
7486 case NDR_SPOOLSS_OPENPRINTER: {
7487 struct spoolss_OpenPrinter *r = (struct spoolss_OpenPrinter *)_r;
7488 ZERO_STRUCT(r->out);
7489 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
7490 if (r->out.handle == NULL) {
7491 return NT_STATUS_NO_MEMORY;
7494 r->out.result = _spoolss_OpenPrinter(cli->pipes_struct, r);
7495 return NT_STATUS_OK;
7498 case NDR_SPOOLSS_SETJOB: {
7499 struct spoolss_SetJob *r = (struct spoolss_SetJob *)_r;
7500 r->out.result = _spoolss_SetJob(cli->pipes_struct, r);
7501 return NT_STATUS_OK;
7504 case NDR_SPOOLSS_GETJOB: {
7505 struct spoolss_GetJob *r = (struct spoolss_GetJob *)_r;
7506 ZERO_STRUCT(r->out);
7507 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo);
7508 if (r->out.info == NULL) {
7509 return NT_STATUS_NO_MEMORY;
7512 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7513 if (r->out.needed == NULL) {
7514 return NT_STATUS_NO_MEMORY;
7517 r->out.result = _spoolss_GetJob(cli->pipes_struct, r);
7518 return NT_STATUS_OK;
7521 case NDR_SPOOLSS_ENUMJOBS: {
7522 struct spoolss_EnumJobs *r = (struct spoolss_EnumJobs *)_r;
7523 ZERO_STRUCT(r->out);
7524 r->out.info = talloc_zero_array(mem_ctx, union spoolss_JobInfo, r->out.count);
7525 if (r->out.info == NULL) {
7526 return NT_STATUS_NO_MEMORY;
7529 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7530 if (r->out.needed == NULL) {
7531 return NT_STATUS_NO_MEMORY;
7534 r->out.result = _spoolss_EnumJobs(cli->pipes_struct, r);
7535 return NT_STATUS_OK;
7538 case NDR_SPOOLSS_ADDPRINTER: {
7539 struct spoolss_AddPrinter *r = (struct spoolss_AddPrinter *)_r;
7540 r->out.result = _spoolss_AddPrinter(cli->pipes_struct, r);
7541 return NT_STATUS_OK;
7544 case NDR_SPOOLSS_DELETEPRINTER: {
7545 struct spoolss_DeletePrinter *r = (struct spoolss_DeletePrinter *)_r;
7546 r->out.result = _spoolss_DeletePrinter(cli->pipes_struct, r);
7547 return NT_STATUS_OK;
7550 case NDR_SPOOLSS_SETPRINTER: {
7551 struct spoolss_SetPrinter *r = (struct spoolss_SetPrinter *)_r;
7552 r->out.result = _spoolss_SetPrinter(cli->pipes_struct, r);
7553 return NT_STATUS_OK;
7556 case NDR_SPOOLSS_GETPRINTER: {
7557 struct spoolss_GetPrinter *r = (struct spoolss_GetPrinter *)_r;
7558 ZERO_STRUCT(r->out);
7559 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo);
7560 if (r->out.info == NULL) {
7561 return NT_STATUS_NO_MEMORY;
7564 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7565 if (r->out.needed == NULL) {
7566 return NT_STATUS_NO_MEMORY;
7569 r->out.result = _spoolss_GetPrinter(cli->pipes_struct, r);
7570 return NT_STATUS_OK;
7573 case NDR_SPOOLSS_ADDPRINTERDRIVER: {
7574 struct spoolss_AddPrinterDriver *r = (struct spoolss_AddPrinterDriver *)_r;
7575 r->out.result = _spoolss_AddPrinterDriver(cli->pipes_struct, r);
7576 return NT_STATUS_OK;
7579 case NDR_SPOOLSS_ENUMPRINTERDRIVERS: {
7580 struct spoolss_EnumPrinterDrivers *r = (struct spoolss_EnumPrinterDrivers *)_r;
7581 ZERO_STRUCT(r->out);
7582 r->out.info = talloc_zero_array(mem_ctx, union spoolss_DriverInfo, r->out.count);
7583 if (r->out.info == NULL) {
7584 return NT_STATUS_NO_MEMORY;
7587 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7588 if (r->out.needed == NULL) {
7589 return NT_STATUS_NO_MEMORY;
7592 r->out.result = _spoolss_EnumPrinterDrivers(cli->pipes_struct, r);
7593 return NT_STATUS_OK;
7596 case NDR_SPOOLSS_GETPRINTERDRIVER: {
7597 struct spoolss_GetPrinterDriver *r = (struct spoolss_GetPrinterDriver *)_r;
7598 r->out.result = _spoolss_GetPrinterDriver(cli->pipes_struct, r);
7599 return NT_STATUS_OK;
7602 case NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY: {
7603 struct spoolss_GetPrinterDriverDirectory *r = (struct spoolss_GetPrinterDriverDirectory *)_r;
7604 ZERO_STRUCT(r->out);
7605 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverDirectoryInfo);
7606 if (r->out.info == NULL) {
7607 return NT_STATUS_NO_MEMORY;
7610 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7611 if (r->out.needed == NULL) {
7612 return NT_STATUS_NO_MEMORY;
7615 r->out.result = _spoolss_GetPrinterDriverDirectory(cli->pipes_struct, r);
7616 return NT_STATUS_OK;
7619 case NDR_SPOOLSS_DELETEPRINTERDRIVER: {
7620 struct spoolss_DeletePrinterDriver *r = (struct spoolss_DeletePrinterDriver *)_r;
7621 r->out.result = _spoolss_DeletePrinterDriver(cli->pipes_struct, r);
7622 return NT_STATUS_OK;
7625 case NDR_SPOOLSS_ADDPRINTPROCESSOR: {
7626 struct spoolss_AddPrintProcessor *r = (struct spoolss_AddPrintProcessor *)_r;
7627 r->out.result = _spoolss_AddPrintProcessor(cli->pipes_struct, r);
7628 return NT_STATUS_OK;
7631 case NDR_SPOOLSS_ENUMPRINTPROCESSORS: {
7632 struct spoolss_EnumPrintProcessors *r = (struct spoolss_EnumPrintProcessors *)_r;
7633 ZERO_STRUCT(r->out);
7634 r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrintProcessorInfo, r->out.count);
7635 if (r->out.info == NULL) {
7636 return NT_STATUS_NO_MEMORY;
7639 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7640 if (r->out.needed == NULL) {
7641 return NT_STATUS_NO_MEMORY;
7644 r->out.result = _spoolss_EnumPrintProcessors(cli->pipes_struct, r);
7645 return NT_STATUS_OK;
7648 case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY: {
7649 struct spoolss_GetPrintProcessorDirectory *r = (struct spoolss_GetPrintProcessorDirectory *)_r;
7650 r->out.result = _spoolss_GetPrintProcessorDirectory(cli->pipes_struct, r);
7651 return NT_STATUS_OK;
7654 case NDR_SPOOLSS_STARTDOCPRINTER: {
7655 struct spoolss_StartDocPrinter *r = (struct spoolss_StartDocPrinter *)_r;
7656 ZERO_STRUCT(r->out);
7657 r->out.job_id = talloc_zero(mem_ctx, uint32_t);
7658 if (r->out.job_id == NULL) {
7659 return NT_STATUS_NO_MEMORY;
7662 r->out.result = _spoolss_StartDocPrinter(cli->pipes_struct, r);
7663 return NT_STATUS_OK;
7666 case NDR_SPOOLSS_STARTPAGEPRINTER: {
7667 struct spoolss_StartPagePrinter *r = (struct spoolss_StartPagePrinter *)_r;
7668 r->out.result = _spoolss_StartPagePrinter(cli->pipes_struct, r);
7669 return NT_STATUS_OK;
7672 case NDR_SPOOLSS_WRITEPRINTER: {
7673 struct spoolss_WritePrinter *r = (struct spoolss_WritePrinter *)_r;
7674 ZERO_STRUCT(r->out);
7675 r->out.num_written = talloc_zero(mem_ctx, uint32_t);
7676 if (r->out.num_written == NULL) {
7677 return NT_STATUS_NO_MEMORY;
7680 r->out.result = _spoolss_WritePrinter(cli->pipes_struct, r);
7681 return NT_STATUS_OK;
7684 case NDR_SPOOLSS_ENDPAGEPRINTER: {
7685 struct spoolss_EndPagePrinter *r = (struct spoolss_EndPagePrinter *)_r;
7686 r->out.result = _spoolss_EndPagePrinter(cli->pipes_struct, r);
7687 return NT_STATUS_OK;
7690 case NDR_SPOOLSS_ABORTPRINTER: {
7691 struct spoolss_AbortPrinter *r = (struct spoolss_AbortPrinter *)_r;
7692 r->out.result = _spoolss_AbortPrinter(cli->pipes_struct, r);
7693 return NT_STATUS_OK;
7696 case NDR_SPOOLSS_READPRINTER: {
7697 struct spoolss_ReadPrinter *r = (struct spoolss_ReadPrinter *)_r;
7698 ZERO_STRUCT(r->out);
7699 r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_size);
7700 if (r->out.data == NULL) {
7701 return NT_STATUS_NO_MEMORY;
7704 r->out._data_size = talloc_zero(mem_ctx, uint32_t);
7705 if (r->out._data_size == NULL) {
7706 return NT_STATUS_NO_MEMORY;
7709 r->out.result = _spoolss_ReadPrinter(cli->pipes_struct, r);
7710 return NT_STATUS_OK;
7713 case NDR_SPOOLSS_ENDDOCPRINTER: {
7714 struct spoolss_EndDocPrinter *r = (struct spoolss_EndDocPrinter *)_r;
7715 r->out.result = _spoolss_EndDocPrinter(cli->pipes_struct, r);
7716 return NT_STATUS_OK;
7719 case NDR_SPOOLSS_ADDJOB: {
7720 struct spoolss_AddJob *r = (struct spoolss_AddJob *)_r;
7721 r->out.result = _spoolss_AddJob(cli->pipes_struct, r);
7722 return NT_STATUS_OK;
7725 case NDR_SPOOLSS_SCHEDULEJOB: {
7726 struct spoolss_ScheduleJob *r = (struct spoolss_ScheduleJob *)_r;
7727 r->out.result = _spoolss_ScheduleJob(cli->pipes_struct, r);
7728 return NT_STATUS_OK;
7731 case NDR_SPOOLSS_GETPRINTERDATA: {
7732 struct spoolss_GetPrinterData *r = (struct spoolss_GetPrinterData *)_r;
7733 ZERO_STRUCT(r->out);
7734 r->out.type = talloc_zero(mem_ctx, enum spoolss_PrinterDataType);
7735 if (r->out.type == NULL) {
7736 return NT_STATUS_NO_MEMORY;
7739 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7740 if (r->out.needed == NULL) {
7741 return NT_STATUS_NO_MEMORY;
7744 r->out.result = _spoolss_GetPrinterData(cli->pipes_struct, r);
7745 return NT_STATUS_OK;
7748 case NDR_SPOOLSS_SETPRINTERDATA: {
7749 struct spoolss_SetPrinterData *r = (struct spoolss_SetPrinterData *)_r;
7750 r->out.result = _spoolss_SetPrinterData(cli->pipes_struct, r);
7751 return NT_STATUS_OK;
7754 case NDR_SPOOLSS_WAITFORPRINTERCHANGE: {
7755 struct spoolss_WaitForPrinterChange *r = (struct spoolss_WaitForPrinterChange *)_r;
7756 r->out.result = _spoolss_WaitForPrinterChange(cli->pipes_struct, r);
7757 return NT_STATUS_OK;
7760 case NDR_SPOOLSS_CLOSEPRINTER: {
7761 struct spoolss_ClosePrinter *r = (struct spoolss_ClosePrinter *)_r;
7762 ZERO_STRUCT(r->out);
7763 r->out.handle = r->in.handle;
7764 r->out.result = _spoolss_ClosePrinter(cli->pipes_struct, r);
7765 return NT_STATUS_OK;
7768 case NDR_SPOOLSS_ADDFORM: {
7769 struct spoolss_AddForm *r = (struct spoolss_AddForm *)_r;
7770 r->out.result = _spoolss_AddForm(cli->pipes_struct, r);
7771 return NT_STATUS_OK;
7774 case NDR_SPOOLSS_DELETEFORM: {
7775 struct spoolss_DeleteForm *r = (struct spoolss_DeleteForm *)_r;
7776 r->out.result = _spoolss_DeleteForm(cli->pipes_struct, r);
7777 return NT_STATUS_OK;
7780 case NDR_SPOOLSS_GETFORM: {
7781 struct spoolss_GetForm *r = (struct spoolss_GetForm *)_r;
7782 ZERO_STRUCT(r->out);
7783 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo);
7784 if (r->out.info == NULL) {
7785 return NT_STATUS_NO_MEMORY;
7788 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7789 if (r->out.needed == NULL) {
7790 return NT_STATUS_NO_MEMORY;
7793 r->out.result = _spoolss_GetForm(cli->pipes_struct, r);
7794 return NT_STATUS_OK;
7797 case NDR_SPOOLSS_SETFORM: {
7798 struct spoolss_SetForm *r = (struct spoolss_SetForm *)_r;
7799 r->out.result = _spoolss_SetForm(cli->pipes_struct, r);
7800 return NT_STATUS_OK;
7803 case NDR_SPOOLSS_ENUMFORMS: {
7804 struct spoolss_EnumForms *r = (struct spoolss_EnumForms *)_r;
7805 ZERO_STRUCT(r->out);
7806 r->out.info = talloc_zero_array(mem_ctx, union spoolss_FormInfo, r->out.count);
7807 if (r->out.info == NULL) {
7808 return NT_STATUS_NO_MEMORY;
7811 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7812 if (r->out.needed == NULL) {
7813 return NT_STATUS_NO_MEMORY;
7816 r->out.result = _spoolss_EnumForms(cli->pipes_struct, r);
7817 return NT_STATUS_OK;
7820 case NDR_SPOOLSS_ENUMPORTS: {
7821 struct spoolss_EnumPorts *r = (struct spoolss_EnumPorts *)_r;
7822 ZERO_STRUCT(r->out);
7823 r->out.info = talloc_zero_array(mem_ctx, union spoolss_PortInfo, r->out.count);
7824 if (r->out.info == NULL) {
7825 return NT_STATUS_NO_MEMORY;
7828 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7829 if (r->out.needed == NULL) {
7830 return NT_STATUS_NO_MEMORY;
7833 r->out.result = _spoolss_EnumPorts(cli->pipes_struct, r);
7834 return NT_STATUS_OK;
7837 case NDR_SPOOLSS_ENUMMONITORS: {
7838 struct spoolss_EnumMonitors *r = (struct spoolss_EnumMonitors *)_r;
7839 ZERO_STRUCT(r->out);
7840 r->out.info = talloc_zero_array(mem_ctx, union spoolss_MonitorInfo, r->out.count);
7841 if (r->out.info == NULL) {
7842 return NT_STATUS_NO_MEMORY;
7845 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7846 if (r->out.needed == NULL) {
7847 return NT_STATUS_NO_MEMORY;
7850 r->out.result = _spoolss_EnumMonitors(cli->pipes_struct, r);
7851 return NT_STATUS_OK;
7854 case NDR_SPOOLSS_ADDPORT: {
7855 struct spoolss_AddPort *r = (struct spoolss_AddPort *)_r;
7856 r->out.result = _spoolss_AddPort(cli->pipes_struct, r);
7857 return NT_STATUS_OK;
7860 case NDR_SPOOLSS_CONFIGUREPORT: {
7861 struct spoolss_ConfigurePort *r = (struct spoolss_ConfigurePort *)_r;
7862 r->out.result = _spoolss_ConfigurePort(cli->pipes_struct, r);
7863 return NT_STATUS_OK;
7866 case NDR_SPOOLSS_DELETEPORT: {
7867 struct spoolss_DeletePort *r = (struct spoolss_DeletePort *)_r;
7868 r->out.result = _spoolss_DeletePort(cli->pipes_struct, r);
7869 return NT_STATUS_OK;
7872 case NDR_SPOOLSS_CREATEPRINTERIC: {
7873 struct spoolss_CreatePrinterIC *r = (struct spoolss_CreatePrinterIC *)_r;
7874 r->out.result = _spoolss_CreatePrinterIC(cli->pipes_struct, r);
7875 return NT_STATUS_OK;
7878 case NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC: {
7879 struct spoolss_PlayGDIScriptOnPrinterIC *r = (struct spoolss_PlayGDIScriptOnPrinterIC *)_r;
7880 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(cli->pipes_struct, r);
7881 return NT_STATUS_OK;
7884 case NDR_SPOOLSS_DELETEPRINTERIC: {
7885 struct spoolss_DeletePrinterIC *r = (struct spoolss_DeletePrinterIC *)_r;
7886 r->out.result = _spoolss_DeletePrinterIC(cli->pipes_struct, r);
7887 return NT_STATUS_OK;
7890 case NDR_SPOOLSS_ADDPRINTERCONNECTION: {
7891 struct spoolss_AddPrinterConnection *r = (struct spoolss_AddPrinterConnection *)_r;
7892 r->out.result = _spoolss_AddPrinterConnection(cli->pipes_struct, r);
7893 return NT_STATUS_OK;
7896 case NDR_SPOOLSS_DELETEPRINTERCONNECTION: {
7897 struct spoolss_DeletePrinterConnection *r = (struct spoolss_DeletePrinterConnection *)_r;
7898 r->out.result = _spoolss_DeletePrinterConnection(cli->pipes_struct, r);
7899 return NT_STATUS_OK;
7902 case NDR_SPOOLSS_PRINTERMESSAGEBOX: {
7903 struct spoolss_PrinterMessageBox *r = (struct spoolss_PrinterMessageBox *)_r;
7904 r->out.result = _spoolss_PrinterMessageBox(cli->pipes_struct, r);
7905 return NT_STATUS_OK;
7908 case NDR_SPOOLSS_ADDMONITOR: {
7909 struct spoolss_AddMonitor *r = (struct spoolss_AddMonitor *)_r;
7910 r->out.result = _spoolss_AddMonitor(cli->pipes_struct, r);
7911 return NT_STATUS_OK;
7914 case NDR_SPOOLSS_DELETEMONITOR: {
7915 struct spoolss_DeleteMonitor *r = (struct spoolss_DeleteMonitor *)_r;
7916 r->out.result = _spoolss_DeleteMonitor(cli->pipes_struct, r);
7917 return NT_STATUS_OK;
7920 case NDR_SPOOLSS_DELETEPRINTPROCESSOR: {
7921 struct spoolss_DeletePrintProcessor *r = (struct spoolss_DeletePrintProcessor *)_r;
7922 r->out.result = _spoolss_DeletePrintProcessor(cli->pipes_struct, r);
7923 return NT_STATUS_OK;
7926 case NDR_SPOOLSS_ADDPRINTPROVIDOR: {
7927 struct spoolss_AddPrintProvidor *r = (struct spoolss_AddPrintProvidor *)_r;
7928 r->out.result = _spoolss_AddPrintProvidor(cli->pipes_struct, r);
7929 return NT_STATUS_OK;
7932 case NDR_SPOOLSS_DELETEPRINTPROVIDOR: {
7933 struct spoolss_DeletePrintProvidor *r = (struct spoolss_DeletePrintProvidor *)_r;
7934 r->out.result = _spoolss_DeletePrintProvidor(cli->pipes_struct, r);
7935 return NT_STATUS_OK;
7938 case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES: {
7939 struct spoolss_EnumPrintProcDataTypes *r = (struct spoolss_EnumPrintProcDataTypes *)_r;
7940 r->out.result = _spoolss_EnumPrintProcDataTypes(cli->pipes_struct, r);
7941 return NT_STATUS_OK;
7944 case NDR_SPOOLSS_RESETPRINTER: {
7945 struct spoolss_ResetPrinter *r = (struct spoolss_ResetPrinter *)_r;
7946 r->out.result = _spoolss_ResetPrinter(cli->pipes_struct, r);
7947 return NT_STATUS_OK;
7950 case NDR_SPOOLSS_GETPRINTERDRIVER2: {
7951 struct spoolss_GetPrinterDriver2 *r = (struct spoolss_GetPrinterDriver2 *)_r;
7952 ZERO_STRUCT(r->out);
7953 r->out.info = talloc_zero(mem_ctx, DATA_BLOB);
7954 if (r->out.info == NULL) {
7955 return NT_STATUS_NO_MEMORY;
7958 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7959 if (r->out.needed == NULL) {
7960 return NT_STATUS_NO_MEMORY;
7963 r->out.server_major_version = talloc_zero(mem_ctx, uint32_t);
7964 if (r->out.server_major_version == NULL) {
7965 return NT_STATUS_NO_MEMORY;
7968 r->out.server_minor_version = talloc_zero(mem_ctx, uint32_t);
7969 if (r->out.server_minor_version == NULL) {
7970 return NT_STATUS_NO_MEMORY;
7973 r->out.result = _spoolss_GetPrinterDriver2(cli->pipes_struct, r);
7974 return NT_STATUS_OK;
7977 case NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION: {
7978 struct spoolss_FindFirstPrinterChangeNotification *r = (struct spoolss_FindFirstPrinterChangeNotification *)_r;
7979 r->out.result = _spoolss_FindFirstPrinterChangeNotification(cli->pipes_struct, r);
7980 return NT_STATUS_OK;
7983 case NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION: {
7984 struct spoolss_FindNextPrinterChangeNotification *r = (struct spoolss_FindNextPrinterChangeNotification *)_r;
7985 r->out.result = _spoolss_FindNextPrinterChangeNotification(cli->pipes_struct, r);
7986 return NT_STATUS_OK;
7989 case NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY: {
7990 struct spoolss_FindClosePrinterNotify *r = (struct spoolss_FindClosePrinterNotify *)_r;
7991 r->out.result = _spoolss_FindClosePrinterNotify(cli->pipes_struct, r);
7992 return NT_STATUS_OK;
7995 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD: {
7996 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r = (struct spoolss_RouterFindFirstPrinterChangeNotificationOld *)_r;
7997 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(cli->pipes_struct, r);
7998 return NT_STATUS_OK;
8001 case NDR_SPOOLSS_REPLYOPENPRINTER: {
8002 struct spoolss_ReplyOpenPrinter *r = (struct spoolss_ReplyOpenPrinter *)_r;
8003 ZERO_STRUCT(r->out);
8004 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8005 if (r->out.handle == NULL) {
8006 return NT_STATUS_NO_MEMORY;
8009 r->out.result = _spoolss_ReplyOpenPrinter(cli->pipes_struct, r);
8010 return NT_STATUS_OK;
8013 case NDR_SPOOLSS_ROUTERREPLYPRINTER: {
8014 struct spoolss_RouterReplyPrinter *r = (struct spoolss_RouterReplyPrinter *)_r;
8015 r->out.result = _spoolss_RouterReplyPrinter(cli->pipes_struct, r);
8016 return NT_STATUS_OK;
8019 case NDR_SPOOLSS_REPLYCLOSEPRINTER: {
8020 struct spoolss_ReplyClosePrinter *r = (struct spoolss_ReplyClosePrinter *)_r;
8021 ZERO_STRUCT(r->out);
8022 r->out.handle = r->in.handle;
8023 r->out.result = _spoolss_ReplyClosePrinter(cli->pipes_struct, r);
8024 return NT_STATUS_OK;
8027 case NDR_SPOOLSS_ADDPORTEX: {
8028 struct spoolss_AddPortEx *r = (struct spoolss_AddPortEx *)_r;
8029 r->out.result = _spoolss_AddPortEx(cli->pipes_struct, r);
8030 return NT_STATUS_OK;
8033 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION: {
8034 struct spoolss_RouterFindFirstPrinterChangeNotification *r = (struct spoolss_RouterFindFirstPrinterChangeNotification *)_r;
8035 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(cli->pipes_struct, r);
8036 return NT_STATUS_OK;
8039 case NDR_SPOOLSS_SPOOLERINIT: {
8040 struct spoolss_SpoolerInit *r = (struct spoolss_SpoolerInit *)_r;
8041 r->out.result = _spoolss_SpoolerInit(cli->pipes_struct, r);
8042 return NT_STATUS_OK;
8045 case NDR_SPOOLSS_RESETPRINTEREX: {
8046 struct spoolss_ResetPrinterEx *r = (struct spoolss_ResetPrinterEx *)_r;
8047 r->out.result = _spoolss_ResetPrinterEx(cli->pipes_struct, r);
8048 return NT_STATUS_OK;
8051 case NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX: {
8052 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r = (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *)_r;
8053 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli->pipes_struct, r);
8054 return NT_STATUS_OK;
8057 case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION: {
8058 struct spoolss_RouterRefreshPrinterChangeNotification *r = (struct spoolss_RouterRefreshPrinterChangeNotification *)_r;
8059 r->out.result = _spoolss_RouterRefreshPrinterChangeNotification(cli->pipes_struct, r);
8060 return NT_STATUS_OK;
8063 case NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX: {
8064 struct spoolss_RemoteFindNextPrinterChangeNotifyEx *r = (struct spoolss_RemoteFindNextPrinterChangeNotifyEx *)_r;
8065 ZERO_STRUCT(r->out);
8066 r->out.info = talloc_zero(mem_ctx, struct spoolss_NotifyInfo *);
8067 if (r->out.info == NULL) {
8068 return NT_STATUS_NO_MEMORY;
8071 r->out.result = _spoolss_RemoteFindNextPrinterChangeNotifyEx(cli->pipes_struct, r);
8072 return NT_STATUS_OK;
8075 case NDR_SPOOLSS_44: {
8076 struct spoolss_44 *r = (struct spoolss_44 *)_r;
8077 r->out.result = _spoolss_44(cli->pipes_struct, r);
8078 return NT_STATUS_OK;
8081 case NDR_SPOOLSS_OPENPRINTEREX: {
8082 struct spoolss_OpenPrinterEx *r = (struct spoolss_OpenPrinterEx *)_r;
8083 ZERO_STRUCT(r->out);
8084 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8085 if (r->out.handle == NULL) {
8086 return NT_STATUS_NO_MEMORY;
8089 r->out.result = _spoolss_OpenPrinterEx(cli->pipes_struct, r);
8090 return NT_STATUS_OK;
8093 case NDR_SPOOLSS_ADDPRINTEREX: {
8094 struct spoolss_AddPrinterEx *r = (struct spoolss_AddPrinterEx *)_r;
8095 r->out.result = _spoolss_AddPrinterEx(cli->pipes_struct, r);
8096 return NT_STATUS_OK;
8099 case NDR_SPOOLSS_47: {
8100 struct spoolss_47 *r = (struct spoolss_47 *)_r;
8101 r->out.result = _spoolss_47(cli->pipes_struct, r);
8102 return NT_STATUS_OK;
8105 case NDR_SPOOLSS_ENUMPRINTERDATA: {
8106 struct spoolss_EnumPrinterData *r = (struct spoolss_EnumPrinterData *)_r;
8107 ZERO_STRUCT(r->out);
8108 r->out.value_name = talloc_zero_array(mem_ctx, const char, r->in.value_offered / 2);
8109 if (r->out.value_name == NULL) {
8110 return NT_STATUS_NO_MEMORY;
8113 r->out.value_needed = talloc_zero(mem_ctx, uint32_t);
8114 if (r->out.value_needed == NULL) {
8115 return NT_STATUS_NO_MEMORY;
8118 r->out.printerdata_type = talloc_zero(mem_ctx, uint32_t);
8119 if (r->out.printerdata_type == NULL) {
8120 return NT_STATUS_NO_MEMORY;
8123 r->out.buffer = talloc_zero(mem_ctx, DATA_BLOB);
8124 if (r->out.buffer == NULL) {
8125 return NT_STATUS_NO_MEMORY;
8128 r->out.data_needed = talloc_zero(mem_ctx, uint32_t);
8129 if (r->out.data_needed == NULL) {
8130 return NT_STATUS_NO_MEMORY;
8133 r->out.result = _spoolss_EnumPrinterData(cli->pipes_struct, r);
8134 return NT_STATUS_OK;
8137 case NDR_SPOOLSS_DELETEPRINTERDATA: {
8138 struct spoolss_DeletePrinterData *r = (struct spoolss_DeletePrinterData *)_r;
8139 r->out.result = _spoolss_DeletePrinterData(cli->pipes_struct, r);
8140 return NT_STATUS_OK;
8143 case NDR_SPOOLSS_4A: {
8144 struct spoolss_4a *r = (struct spoolss_4a *)_r;
8145 r->out.result = _spoolss_4a(cli->pipes_struct, r);
8146 return NT_STATUS_OK;
8149 case NDR_SPOOLSS_4B: {
8150 struct spoolss_4b *r = (struct spoolss_4b *)_r;
8151 r->out.result = _spoolss_4b(cli->pipes_struct, r);
8152 return NT_STATUS_OK;
8155 case NDR_SPOOLSS_4C: {
8156 struct spoolss_4c *r = (struct spoolss_4c *)_r;
8157 r->out.result = _spoolss_4c(cli->pipes_struct, r);
8158 return NT_STATUS_OK;
8161 case NDR_SPOOLSS_SETPRINTERDATAEX: {
8162 struct spoolss_SetPrinterDataEx *r = (struct spoolss_SetPrinterDataEx *)_r;
8163 r->out.result = _spoolss_SetPrinterDataEx(cli->pipes_struct, r);
8164 return NT_STATUS_OK;
8167 case NDR_SPOOLSS_GETPRINTERDATAEX: {
8168 struct spoolss_GetPrinterDataEx *r = (struct spoolss_GetPrinterDataEx *)_r;
8169 ZERO_STRUCT(r->out);
8170 r->out.type = talloc_zero(mem_ctx, uint32_t);
8171 if (r->out.type == NULL) {
8172 return NT_STATUS_NO_MEMORY;
8175 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
8176 if (r->out.buffer == NULL) {
8177 return NT_STATUS_NO_MEMORY;
8180 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8181 if (r->out.needed == NULL) {
8182 return NT_STATUS_NO_MEMORY;
8185 r->out.result = _spoolss_GetPrinterDataEx(cli->pipes_struct, r);
8186 return NT_STATUS_OK;
8189 case NDR_SPOOLSS_ENUMPRINTERDATAEX: {
8190 struct spoolss_EnumPrinterDataEx *r = (struct spoolss_EnumPrinterDataEx *)_r;
8191 ZERO_STRUCT(r->out);
8192 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
8193 if (r->out.buffer == NULL) {
8194 return NT_STATUS_NO_MEMORY;
8197 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8198 if (r->out.needed == NULL) {
8199 return NT_STATUS_NO_MEMORY;
8202 r->out.count = talloc_zero(mem_ctx, uint32_t);
8203 if (r->out.count == NULL) {
8204 return NT_STATUS_NO_MEMORY;
8207 r->out.result = _spoolss_EnumPrinterDataEx(cli->pipes_struct, r);
8208 return NT_STATUS_OK;
8211 case NDR_SPOOLSS_ENUMPRINTERKEY: {
8212 struct spoolss_EnumPrinterKey *r = (struct spoolss_EnumPrinterKey *)_r;
8213 ZERO_STRUCT(r->out);
8214 r->out.key_buffer = talloc_zero_array(mem_ctx, uint16_t, r->in.key_buffer_size / 2);
8215 if (r->out.key_buffer == NULL) {
8216 return NT_STATUS_NO_MEMORY;
8219 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8220 if (r->out.needed == NULL) {
8221 return NT_STATUS_NO_MEMORY;
8224 r->out.result = _spoolss_EnumPrinterKey(cli->pipes_struct, r);
8225 return NT_STATUS_OK;
8228 case NDR_SPOOLSS_DELETEPRINTERDATAEX: {
8229 struct spoolss_DeletePrinterDataEx *r = (struct spoolss_DeletePrinterDataEx *)_r;
8230 r->out.result = _spoolss_DeletePrinterDataEx(cli->pipes_struct, r);
8231 return NT_STATUS_OK;
8234 case NDR_SPOOLSS_DELETEPRINTERKEY: {
8235 struct spoolss_DeletePrinterKey *r = (struct spoolss_DeletePrinterKey *)_r;
8236 r->out.result = _spoolss_DeletePrinterKey(cli->pipes_struct, r);
8237 return NT_STATUS_OK;
8240 case NDR_SPOOLSS_53: {
8241 struct spoolss_53 *r = (struct spoolss_53 *)_r;
8242 r->out.result = _spoolss_53(cli->pipes_struct, r);
8243 return NT_STATUS_OK;
8246 case NDR_SPOOLSS_DELETEPRINTERDRIVEREX: {
8247 struct spoolss_DeletePrinterDriverEx *r = (struct spoolss_DeletePrinterDriverEx *)_r;
8248 r->out.result = _spoolss_DeletePrinterDriverEx(cli->pipes_struct, r);
8249 return NT_STATUS_OK;
8252 case NDR_SPOOLSS_55: {
8253 struct spoolss_55 *r = (struct spoolss_55 *)_r;
8254 r->out.result = _spoolss_55(cli->pipes_struct, r);
8255 return NT_STATUS_OK;
8258 case NDR_SPOOLSS_56: {
8259 struct spoolss_56 *r = (struct spoolss_56 *)_r;
8260 r->out.result = _spoolss_56(cli->pipes_struct, r);
8261 return NT_STATUS_OK;
8264 case NDR_SPOOLSS_57: {
8265 struct spoolss_57 *r = (struct spoolss_57 *)_r;
8266 r->out.result = _spoolss_57(cli->pipes_struct, r);
8267 return NT_STATUS_OK;
8270 case NDR_SPOOLSS_XCVDATA: {
8271 struct spoolss_XcvData *r = (struct spoolss_XcvData *)_r;
8272 ZERO_STRUCT(r->out);
8273 r->out.status_code = r->in.status_code;
8274 r->out.out_data = talloc_zero_array(mem_ctx, uint8_t, r->in.out_data_size);
8275 if (r->out.out_data == NULL) {
8276 return NT_STATUS_NO_MEMORY;
8279 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8280 if (r->out.needed == NULL) {
8281 return NT_STATUS_NO_MEMORY;
8284 r->out.result = _spoolss_XcvData(cli->pipes_struct, r);
8285 return NT_STATUS_OK;
8288 case NDR_SPOOLSS_ADDPRINTERDRIVEREX: {
8289 struct spoolss_AddPrinterDriverEx *r = (struct spoolss_AddPrinterDriverEx *)_r;
8290 r->out.result = _spoolss_AddPrinterDriverEx(cli->pipes_struct, r);
8291 return NT_STATUS_OK;
8294 case NDR_SPOOLSS_5A: {
8295 struct spoolss_5a *r = (struct spoolss_5a *)_r;
8296 r->out.result = _spoolss_5a(cli->pipes_struct, r);
8297 return NT_STATUS_OK;
8300 case NDR_SPOOLSS_5B: {
8301 struct spoolss_5b *r = (struct spoolss_5b *)_r;
8302 r->out.result = _spoolss_5b(cli->pipes_struct, r);
8303 return NT_STATUS_OK;
8306 case NDR_SPOOLSS_5C: {
8307 struct spoolss_5c *r = (struct spoolss_5c *)_r;
8308 r->out.result = _spoolss_5c(cli->pipes_struct, r);
8309 return NT_STATUS_OK;
8312 case NDR_SPOOLSS_5D: {
8313 struct spoolss_5d *r = (struct spoolss_5d *)_r;
8314 r->out.result = _spoolss_5d(cli->pipes_struct, r);
8315 return NT_STATUS_OK;
8318 case NDR_SPOOLSS_5E: {
8319 struct spoolss_5e *r = (struct spoolss_5e *)_r;
8320 r->out.result = _spoolss_5e(cli->pipes_struct, r);
8321 return NT_STATUS_OK;
8324 case NDR_SPOOLSS_5F: {
8325 struct spoolss_5f *r = (struct spoolss_5f *)_r;
8326 r->out.result = _spoolss_5f(cli->pipes_struct, r);
8327 return NT_STATUS_OK;
8331 return NT_STATUS_NOT_IMPLEMENTED;
8335 NTSTATUS rpc_spoolss_init(void)
8337 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", &ndr_table_spoolss, api_spoolss_cmds, sizeof(api_spoolss_cmds) / sizeof(struct api_struct));