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 ZERO_STRUCT(r->out);
1925 r->out.buffer = r->in.buffer;
1926 r->out.needed = talloc_zero(r, uint32_t);
1927 if (r->out.needed == NULL) {
1932 r->out.result = _spoolss_AddJob(p, r);
1934 if (p->rng_fault_state) {
1936 /* Return true here, srv_pipe_hnd.c will take care */
1940 if (DEBUGLEVEL >= 10) {
1941 NDR_PRINT_OUT_DEBUG(spoolss_AddJob, r);
1944 push = ndr_push_init_ctx(r, NULL);
1950 ndr_err = call->ndr_push(push, NDR_OUT, r);
1951 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1956 blob = ndr_push_blob(push);
1957 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1967 static bool api_spoolss_ScheduleJob(pipes_struct *p)
1969 const struct ndr_interface_call *call;
1970 struct ndr_pull *pull;
1971 struct ndr_push *push;
1972 enum ndr_err_code ndr_err;
1974 struct spoolss_ScheduleJob *r;
1976 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SCHEDULEJOB];
1978 r = talloc(talloc_tos(), struct spoolss_ScheduleJob);
1983 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1988 pull = ndr_pull_init_blob(&blob, r, NULL);
1994 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1995 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1996 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2001 if (DEBUGLEVEL >= 10) {
2002 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, r);
2005 r->out.result = _spoolss_ScheduleJob(p, r);
2007 if (p->rng_fault_state) {
2009 /* Return true here, srv_pipe_hnd.c will take care */
2013 if (DEBUGLEVEL >= 10) {
2014 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, r);
2017 push = ndr_push_init_ctx(r, NULL);
2023 ndr_err = call->ndr_push(push, NDR_OUT, r);
2024 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2029 blob = ndr_push_blob(push);
2030 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2040 static bool api_spoolss_GetPrinterData(pipes_struct *p)
2042 const struct ndr_interface_call *call;
2043 struct ndr_pull *pull;
2044 struct ndr_push *push;
2045 enum ndr_err_code ndr_err;
2047 struct spoolss_GetPrinterData *r;
2049 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATA];
2051 r = talloc(talloc_tos(), struct spoolss_GetPrinterData);
2056 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2061 pull = ndr_pull_init_blob(&blob, r, NULL);
2067 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2068 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2069 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2074 if (DEBUGLEVEL >= 10) {
2075 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, r);
2078 ZERO_STRUCT(r->out);
2079 r->out.type = talloc_zero(r, enum spoolss_PrinterDataType);
2080 if (r->out.type == NULL) {
2085 r->out.needed = talloc_zero(r, uint32_t);
2086 if (r->out.needed == NULL) {
2091 r->out.result = _spoolss_GetPrinterData(p, r);
2093 if (p->rng_fault_state) {
2095 /* Return true here, srv_pipe_hnd.c will take care */
2099 if (DEBUGLEVEL >= 10) {
2100 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, r);
2103 push = ndr_push_init_ctx(r, NULL);
2109 ndr_err = call->ndr_push(push, NDR_OUT, r);
2110 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2115 blob = ndr_push_blob(push);
2116 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2126 static bool api_spoolss_SetPrinterData(pipes_struct *p)
2128 const struct ndr_interface_call *call;
2129 struct ndr_pull *pull;
2130 struct ndr_push *push;
2131 enum ndr_err_code ndr_err;
2133 struct spoolss_SetPrinterData *r;
2135 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATA];
2137 r = talloc(talloc_tos(), struct spoolss_SetPrinterData);
2142 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2147 pull = ndr_pull_init_blob(&blob, r, NULL);
2153 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2154 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2155 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2160 if (DEBUGLEVEL >= 10) {
2161 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, r);
2164 r->out.result = _spoolss_SetPrinterData(p, r);
2166 if (p->rng_fault_state) {
2168 /* Return true here, srv_pipe_hnd.c will take care */
2172 if (DEBUGLEVEL >= 10) {
2173 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, r);
2176 push = ndr_push_init_ctx(r, NULL);
2182 ndr_err = call->ndr_push(push, NDR_OUT, r);
2183 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2188 blob = ndr_push_blob(push);
2189 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2199 static bool api_spoolss_WaitForPrinterChange(pipes_struct *p)
2201 const struct ndr_interface_call *call;
2202 struct ndr_pull *pull;
2203 struct ndr_push *push;
2204 enum ndr_err_code ndr_err;
2206 struct spoolss_WaitForPrinterChange *r;
2208 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_WAITFORPRINTERCHANGE];
2210 r = talloc(talloc_tos(), struct spoolss_WaitForPrinterChange);
2215 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2220 pull = ndr_pull_init_blob(&blob, r, NULL);
2226 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2227 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2228 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2233 if (DEBUGLEVEL >= 10) {
2234 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, r);
2237 r->out.result = _spoolss_WaitForPrinterChange(p, r);
2239 if (p->rng_fault_state) {
2241 /* Return true here, srv_pipe_hnd.c will take care */
2245 if (DEBUGLEVEL >= 10) {
2246 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, r);
2249 push = ndr_push_init_ctx(r, NULL);
2255 ndr_err = call->ndr_push(push, NDR_OUT, r);
2256 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2261 blob = ndr_push_blob(push);
2262 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2272 static bool api_spoolss_ClosePrinter(pipes_struct *p)
2274 const struct ndr_interface_call *call;
2275 struct ndr_pull *pull;
2276 struct ndr_push *push;
2277 enum ndr_err_code ndr_err;
2279 struct spoolss_ClosePrinter *r;
2281 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CLOSEPRINTER];
2283 r = talloc(talloc_tos(), struct spoolss_ClosePrinter);
2288 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2293 pull = ndr_pull_init_blob(&blob, r, NULL);
2299 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2300 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2301 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2306 if (DEBUGLEVEL >= 10) {
2307 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, r);
2310 ZERO_STRUCT(r->out);
2311 r->out.handle = r->in.handle;
2312 r->out.result = _spoolss_ClosePrinter(p, r);
2314 if (p->rng_fault_state) {
2316 /* Return true here, srv_pipe_hnd.c will take care */
2320 if (DEBUGLEVEL >= 10) {
2321 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, r);
2324 push = ndr_push_init_ctx(r, NULL);
2330 ndr_err = call->ndr_push(push, NDR_OUT, r);
2331 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2336 blob = ndr_push_blob(push);
2337 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2347 static bool api_spoolss_AddForm(pipes_struct *p)
2349 const struct ndr_interface_call *call;
2350 struct ndr_pull *pull;
2351 struct ndr_push *push;
2352 enum ndr_err_code ndr_err;
2354 struct spoolss_AddForm *r;
2356 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDFORM];
2358 r = talloc(talloc_tos(), struct spoolss_AddForm);
2363 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2368 pull = ndr_pull_init_blob(&blob, r, NULL);
2374 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2375 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2376 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2381 if (DEBUGLEVEL >= 10) {
2382 NDR_PRINT_IN_DEBUG(spoolss_AddForm, r);
2385 r->out.result = _spoolss_AddForm(p, r);
2387 if (p->rng_fault_state) {
2389 /* Return true here, srv_pipe_hnd.c will take care */
2393 if (DEBUGLEVEL >= 10) {
2394 NDR_PRINT_OUT_DEBUG(spoolss_AddForm, r);
2397 push = ndr_push_init_ctx(r, NULL);
2403 ndr_err = call->ndr_push(push, NDR_OUT, r);
2404 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2409 blob = ndr_push_blob(push);
2410 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2420 static bool api_spoolss_DeleteForm(pipes_struct *p)
2422 const struct ndr_interface_call *call;
2423 struct ndr_pull *pull;
2424 struct ndr_push *push;
2425 enum ndr_err_code ndr_err;
2427 struct spoolss_DeleteForm *r;
2429 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEFORM];
2431 r = talloc(talloc_tos(), struct spoolss_DeleteForm);
2436 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2441 pull = ndr_pull_init_blob(&blob, r, NULL);
2447 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2448 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2449 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2454 if (DEBUGLEVEL >= 10) {
2455 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, r);
2458 r->out.result = _spoolss_DeleteForm(p, r);
2460 if (p->rng_fault_state) {
2462 /* Return true here, srv_pipe_hnd.c will take care */
2466 if (DEBUGLEVEL >= 10) {
2467 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, r);
2470 push = ndr_push_init_ctx(r, NULL);
2476 ndr_err = call->ndr_push(push, NDR_OUT, r);
2477 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2482 blob = ndr_push_blob(push);
2483 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2493 static bool api_spoolss_GetForm(pipes_struct *p)
2495 const struct ndr_interface_call *call;
2496 struct ndr_pull *pull;
2497 struct ndr_push *push;
2498 enum ndr_err_code ndr_err;
2500 struct spoolss_GetForm *r;
2502 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETFORM];
2504 r = talloc(talloc_tos(), struct spoolss_GetForm);
2509 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2514 pull = ndr_pull_init_blob(&blob, r, NULL);
2520 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2521 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2522 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2527 if (DEBUGLEVEL >= 10) {
2528 NDR_PRINT_IN_DEBUG(spoolss_GetForm, r);
2531 ZERO_STRUCT(r->out);
2532 r->out.info = talloc_zero(r, union spoolss_FormInfo);
2533 if (r->out.info == NULL) {
2538 r->out.needed = talloc_zero(r, uint32_t);
2539 if (r->out.needed == NULL) {
2544 r->out.result = _spoolss_GetForm(p, r);
2546 if (p->rng_fault_state) {
2548 /* Return true here, srv_pipe_hnd.c will take care */
2552 if (DEBUGLEVEL >= 10) {
2553 NDR_PRINT_OUT_DEBUG(spoolss_GetForm, r);
2556 push = ndr_push_init_ctx(r, NULL);
2562 ndr_err = call->ndr_push(push, NDR_OUT, r);
2563 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2568 blob = ndr_push_blob(push);
2569 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2579 static bool api_spoolss_SetForm(pipes_struct *p)
2581 const struct ndr_interface_call *call;
2582 struct ndr_pull *pull;
2583 struct ndr_push *push;
2584 enum ndr_err_code ndr_err;
2586 struct spoolss_SetForm *r;
2588 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETFORM];
2590 r = talloc(talloc_tos(), struct spoolss_SetForm);
2595 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2600 pull = ndr_pull_init_blob(&blob, r, NULL);
2606 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2607 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2608 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2613 if (DEBUGLEVEL >= 10) {
2614 NDR_PRINT_IN_DEBUG(spoolss_SetForm, r);
2617 r->out.result = _spoolss_SetForm(p, r);
2619 if (p->rng_fault_state) {
2621 /* Return true here, srv_pipe_hnd.c will take care */
2625 if (DEBUGLEVEL >= 10) {
2626 NDR_PRINT_OUT_DEBUG(spoolss_SetForm, r);
2629 push = ndr_push_init_ctx(r, NULL);
2635 ndr_err = call->ndr_push(push, NDR_OUT, r);
2636 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2641 blob = ndr_push_blob(push);
2642 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2652 static bool api_spoolss_EnumForms(pipes_struct *p)
2654 const struct ndr_interface_call *call;
2655 struct ndr_pull *pull;
2656 struct ndr_push *push;
2657 enum ndr_err_code ndr_err;
2659 struct spoolss_EnumForms *r;
2661 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMFORMS];
2663 r = talloc(talloc_tos(), struct spoolss_EnumForms);
2668 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2673 pull = ndr_pull_init_blob(&blob, r, NULL);
2679 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2680 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2681 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2686 if (DEBUGLEVEL >= 10) {
2687 NDR_PRINT_IN_DEBUG(spoolss_EnumForms, r);
2690 ZERO_STRUCT(r->out);
2691 r->out.info = talloc_zero_array(r, union spoolss_FormInfo, r->out.count);
2692 if (r->out.info == NULL) {
2697 r->out.needed = talloc_zero(r, uint32_t);
2698 if (r->out.needed == NULL) {
2703 r->out.result = _spoolss_EnumForms(p, r);
2705 if (p->rng_fault_state) {
2707 /* Return true here, srv_pipe_hnd.c will take care */
2711 if (DEBUGLEVEL >= 10) {
2712 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, r);
2715 push = ndr_push_init_ctx(r, NULL);
2721 ndr_err = call->ndr_push(push, NDR_OUT, r);
2722 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2727 blob = ndr_push_blob(push);
2728 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2738 static bool api_spoolss_EnumPorts(pipes_struct *p)
2740 const struct ndr_interface_call *call;
2741 struct ndr_pull *pull;
2742 struct ndr_push *push;
2743 enum ndr_err_code ndr_err;
2745 struct spoolss_EnumPorts *r;
2747 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPORTS];
2749 r = talloc(talloc_tos(), struct spoolss_EnumPorts);
2754 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2759 pull = ndr_pull_init_blob(&blob, r, NULL);
2765 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2766 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2767 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2772 if (DEBUGLEVEL >= 10) {
2773 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, r);
2776 ZERO_STRUCT(r->out);
2777 r->out.info = talloc_zero_array(r, union spoolss_PortInfo, r->out.count);
2778 if (r->out.info == NULL) {
2783 r->out.needed = talloc_zero(r, uint32_t);
2784 if (r->out.needed == NULL) {
2789 r->out.result = _spoolss_EnumPorts(p, r);
2791 if (p->rng_fault_state) {
2793 /* Return true here, srv_pipe_hnd.c will take care */
2797 if (DEBUGLEVEL >= 10) {
2798 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, r);
2801 push = ndr_push_init_ctx(r, NULL);
2807 ndr_err = call->ndr_push(push, NDR_OUT, r);
2808 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2813 blob = ndr_push_blob(push);
2814 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2824 static bool api_spoolss_EnumMonitors(pipes_struct *p)
2826 const struct ndr_interface_call *call;
2827 struct ndr_pull *pull;
2828 struct ndr_push *push;
2829 enum ndr_err_code ndr_err;
2831 struct spoolss_EnumMonitors *r;
2833 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMMONITORS];
2835 r = talloc(talloc_tos(), struct spoolss_EnumMonitors);
2840 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2845 pull = ndr_pull_init_blob(&blob, r, NULL);
2851 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2852 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2853 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2858 if (DEBUGLEVEL >= 10) {
2859 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, r);
2862 ZERO_STRUCT(r->out);
2863 r->out.info = talloc_zero_array(r, union spoolss_MonitorInfo, r->out.count);
2864 if (r->out.info == NULL) {
2869 r->out.needed = talloc_zero(r, uint32_t);
2870 if (r->out.needed == NULL) {
2875 r->out.result = _spoolss_EnumMonitors(p, r);
2877 if (p->rng_fault_state) {
2879 /* Return true here, srv_pipe_hnd.c will take care */
2883 if (DEBUGLEVEL >= 10) {
2884 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, r);
2887 push = ndr_push_init_ctx(r, NULL);
2893 ndr_err = call->ndr_push(push, NDR_OUT, r);
2894 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2899 blob = ndr_push_blob(push);
2900 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2910 static bool api_spoolss_AddPort(pipes_struct *p)
2912 const struct ndr_interface_call *call;
2913 struct ndr_pull *pull;
2914 struct ndr_push *push;
2915 enum ndr_err_code ndr_err;
2917 struct spoolss_AddPort *r;
2919 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORT];
2921 r = talloc(talloc_tos(), struct spoolss_AddPort);
2926 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2931 pull = ndr_pull_init_blob(&blob, r, NULL);
2937 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2938 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2939 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2944 if (DEBUGLEVEL >= 10) {
2945 NDR_PRINT_IN_DEBUG(spoolss_AddPort, r);
2948 r->out.result = _spoolss_AddPort(p, r);
2950 if (p->rng_fault_state) {
2952 /* Return true here, srv_pipe_hnd.c will take care */
2956 if (DEBUGLEVEL >= 10) {
2957 NDR_PRINT_OUT_DEBUG(spoolss_AddPort, r);
2960 push = ndr_push_init_ctx(r, NULL);
2966 ndr_err = call->ndr_push(push, NDR_OUT, r);
2967 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2972 blob = ndr_push_blob(push);
2973 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2983 static bool api_spoolss_ConfigurePort(pipes_struct *p)
2985 const struct ndr_interface_call *call;
2986 struct ndr_pull *pull;
2987 struct ndr_push *push;
2988 enum ndr_err_code ndr_err;
2990 struct spoolss_ConfigurePort *r;
2992 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CONFIGUREPORT];
2994 r = talloc(talloc_tos(), struct spoolss_ConfigurePort);
2999 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3004 pull = ndr_pull_init_blob(&blob, r, NULL);
3010 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3011 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3012 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3017 if (DEBUGLEVEL >= 10) {
3018 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, r);
3021 r->out.result = _spoolss_ConfigurePort(p, r);
3023 if (p->rng_fault_state) {
3025 /* Return true here, srv_pipe_hnd.c will take care */
3029 if (DEBUGLEVEL >= 10) {
3030 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, r);
3033 push = ndr_push_init_ctx(r, NULL);
3039 ndr_err = call->ndr_push(push, NDR_OUT, r);
3040 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3045 blob = ndr_push_blob(push);
3046 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3056 static bool api_spoolss_DeletePort(pipes_struct *p)
3058 const struct ndr_interface_call *call;
3059 struct ndr_pull *pull;
3060 struct ndr_push *push;
3061 enum ndr_err_code ndr_err;
3063 struct spoolss_DeletePort *r;
3065 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPORT];
3067 r = talloc(talloc_tos(), struct spoolss_DeletePort);
3072 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3077 pull = ndr_pull_init_blob(&blob, r, NULL);
3083 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3084 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3085 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3090 if (DEBUGLEVEL >= 10) {
3091 NDR_PRINT_IN_DEBUG(spoolss_DeletePort, r);
3094 r->out.result = _spoolss_DeletePort(p, r);
3096 if (p->rng_fault_state) {
3098 /* Return true here, srv_pipe_hnd.c will take care */
3102 if (DEBUGLEVEL >= 10) {
3103 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, r);
3106 push = ndr_push_init_ctx(r, NULL);
3112 ndr_err = call->ndr_push(push, NDR_OUT, r);
3113 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3118 blob = ndr_push_blob(push);
3119 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3129 static bool api_spoolss_CreatePrinterIC(pipes_struct *p)
3131 const struct ndr_interface_call *call;
3132 struct ndr_pull *pull;
3133 struct ndr_push *push;
3134 enum ndr_err_code ndr_err;
3136 struct spoolss_CreatePrinterIC *r;
3138 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_CREATEPRINTERIC];
3140 r = talloc(talloc_tos(), struct spoolss_CreatePrinterIC);
3145 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3150 pull = ndr_pull_init_blob(&blob, r, NULL);
3156 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3157 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3158 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3163 if (DEBUGLEVEL >= 10) {
3164 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, r);
3167 r->out.result = _spoolss_CreatePrinterIC(p, r);
3169 if (p->rng_fault_state) {
3171 /* Return true here, srv_pipe_hnd.c will take care */
3175 if (DEBUGLEVEL >= 10) {
3176 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, r);
3179 push = ndr_push_init_ctx(r, NULL);
3185 ndr_err = call->ndr_push(push, NDR_OUT, r);
3186 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3191 blob = ndr_push_blob(push);
3192 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3202 static bool api_spoolss_PlayGDIScriptOnPrinterIC(pipes_struct *p)
3204 const struct ndr_interface_call *call;
3205 struct ndr_pull *pull;
3206 struct ndr_push *push;
3207 enum ndr_err_code ndr_err;
3209 struct spoolss_PlayGDIScriptOnPrinterIC *r;
3211 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC];
3213 r = talloc(talloc_tos(), struct spoolss_PlayGDIScriptOnPrinterIC);
3218 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3223 pull = ndr_pull_init_blob(&blob, r, NULL);
3229 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3230 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3231 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3236 if (DEBUGLEVEL >= 10) {
3237 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3240 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(p, r);
3242 if (p->rng_fault_state) {
3244 /* Return true here, srv_pipe_hnd.c will take care */
3248 if (DEBUGLEVEL >= 10) {
3249 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, r);
3252 push = ndr_push_init_ctx(r, NULL);
3258 ndr_err = call->ndr_push(push, NDR_OUT, r);
3259 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3264 blob = ndr_push_blob(push);
3265 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3275 static bool api_spoolss_DeletePrinterIC(pipes_struct *p)
3277 const struct ndr_interface_call *call;
3278 struct ndr_pull *pull;
3279 struct ndr_push *push;
3280 enum ndr_err_code ndr_err;
3282 struct spoolss_DeletePrinterIC *r;
3284 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERIC];
3286 r = talloc(talloc_tos(), struct spoolss_DeletePrinterIC);
3291 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3296 pull = ndr_pull_init_blob(&blob, r, NULL);
3302 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3303 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3304 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3309 if (DEBUGLEVEL >= 10) {
3310 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, r);
3313 r->out.result = _spoolss_DeletePrinterIC(p, r);
3315 if (p->rng_fault_state) {
3317 /* Return true here, srv_pipe_hnd.c will take care */
3321 if (DEBUGLEVEL >= 10) {
3322 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, r);
3325 push = ndr_push_init_ctx(r, NULL);
3331 ndr_err = call->ndr_push(push, NDR_OUT, r);
3332 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3337 blob = ndr_push_blob(push);
3338 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3348 static bool api_spoolss_AddPrinterConnection(pipes_struct *p)
3350 const struct ndr_interface_call *call;
3351 struct ndr_pull *pull;
3352 struct ndr_push *push;
3353 enum ndr_err_code ndr_err;
3355 struct spoolss_AddPrinterConnection *r;
3357 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERCONNECTION];
3359 r = talloc(talloc_tos(), struct spoolss_AddPrinterConnection);
3364 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3369 pull = ndr_pull_init_blob(&blob, r, NULL);
3375 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3376 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3377 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3382 if (DEBUGLEVEL >= 10) {
3383 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, r);
3386 r->out.result = _spoolss_AddPrinterConnection(p, r);
3388 if (p->rng_fault_state) {
3390 /* Return true here, srv_pipe_hnd.c will take care */
3394 if (DEBUGLEVEL >= 10) {
3395 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, r);
3398 push = ndr_push_init_ctx(r, NULL);
3404 ndr_err = call->ndr_push(push, NDR_OUT, r);
3405 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3410 blob = ndr_push_blob(push);
3411 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3421 static bool api_spoolss_DeletePrinterConnection(pipes_struct *p)
3423 const struct ndr_interface_call *call;
3424 struct ndr_pull *pull;
3425 struct ndr_push *push;
3426 enum ndr_err_code ndr_err;
3428 struct spoolss_DeletePrinterConnection *r;
3430 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERCONNECTION];
3432 r = talloc(talloc_tos(), struct spoolss_DeletePrinterConnection);
3437 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3442 pull = ndr_pull_init_blob(&blob, r, NULL);
3448 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3449 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3450 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3455 if (DEBUGLEVEL >= 10) {
3456 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, r);
3459 r->out.result = _spoolss_DeletePrinterConnection(p, r);
3461 if (p->rng_fault_state) {
3463 /* Return true here, srv_pipe_hnd.c will take care */
3467 if (DEBUGLEVEL >= 10) {
3468 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, r);
3471 push = ndr_push_init_ctx(r, NULL);
3477 ndr_err = call->ndr_push(push, NDR_OUT, r);
3478 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3483 blob = ndr_push_blob(push);
3484 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3494 static bool api_spoolss_PrinterMessageBox(pipes_struct *p)
3496 const struct ndr_interface_call *call;
3497 struct ndr_pull *pull;
3498 struct ndr_push *push;
3499 enum ndr_err_code ndr_err;
3501 struct spoolss_PrinterMessageBox *r;
3503 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_PRINTERMESSAGEBOX];
3505 r = talloc(talloc_tos(), struct spoolss_PrinterMessageBox);
3510 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3515 pull = ndr_pull_init_blob(&blob, r, NULL);
3521 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3522 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3523 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3528 if (DEBUGLEVEL >= 10) {
3529 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, r);
3532 r->out.result = _spoolss_PrinterMessageBox(p, r);
3534 if (p->rng_fault_state) {
3536 /* Return true here, srv_pipe_hnd.c will take care */
3540 if (DEBUGLEVEL >= 10) {
3541 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, r);
3544 push = ndr_push_init_ctx(r, NULL);
3550 ndr_err = call->ndr_push(push, NDR_OUT, r);
3551 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3556 blob = ndr_push_blob(push);
3557 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3567 static bool api_spoolss_AddMonitor(pipes_struct *p)
3569 const struct ndr_interface_call *call;
3570 struct ndr_pull *pull;
3571 struct ndr_push *push;
3572 enum ndr_err_code ndr_err;
3574 struct spoolss_AddMonitor *r;
3576 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDMONITOR];
3578 r = talloc(talloc_tos(), struct spoolss_AddMonitor);
3583 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3588 pull = ndr_pull_init_blob(&blob, r, NULL);
3594 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3595 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3596 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3601 if (DEBUGLEVEL >= 10) {
3602 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, r);
3605 r->out.result = _spoolss_AddMonitor(p, r);
3607 if (p->rng_fault_state) {
3609 /* Return true here, srv_pipe_hnd.c will take care */
3613 if (DEBUGLEVEL >= 10) {
3614 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, r);
3617 push = ndr_push_init_ctx(r, NULL);
3623 ndr_err = call->ndr_push(push, NDR_OUT, r);
3624 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3629 blob = ndr_push_blob(push);
3630 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3640 static bool api_spoolss_DeleteMonitor(pipes_struct *p)
3642 const struct ndr_interface_call *call;
3643 struct ndr_pull *pull;
3644 struct ndr_push *push;
3645 enum ndr_err_code ndr_err;
3647 struct spoolss_DeleteMonitor *r;
3649 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEMONITOR];
3651 r = talloc(talloc_tos(), struct spoolss_DeleteMonitor);
3656 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3661 pull = ndr_pull_init_blob(&blob, r, NULL);
3667 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3668 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3669 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3674 if (DEBUGLEVEL >= 10) {
3675 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, r);
3678 r->out.result = _spoolss_DeleteMonitor(p, r);
3680 if (p->rng_fault_state) {
3682 /* Return true here, srv_pipe_hnd.c will take care */
3686 if (DEBUGLEVEL >= 10) {
3687 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, r);
3690 push = ndr_push_init_ctx(r, NULL);
3696 ndr_err = call->ndr_push(push, NDR_OUT, r);
3697 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3702 blob = ndr_push_blob(push);
3703 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3713 static bool api_spoolss_DeletePrintProcessor(pipes_struct *p)
3715 const struct ndr_interface_call *call;
3716 struct ndr_pull *pull;
3717 struct ndr_push *push;
3718 enum ndr_err_code ndr_err;
3720 struct spoolss_DeletePrintProcessor *r;
3722 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROCESSOR];
3724 r = talloc(talloc_tos(), struct spoolss_DeletePrintProcessor);
3729 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3734 pull = ndr_pull_init_blob(&blob, r, NULL);
3740 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3741 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3742 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3747 if (DEBUGLEVEL >= 10) {
3748 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, r);
3751 r->out.result = _spoolss_DeletePrintProcessor(p, r);
3753 if (p->rng_fault_state) {
3755 /* Return true here, srv_pipe_hnd.c will take care */
3759 if (DEBUGLEVEL >= 10) {
3760 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, r);
3763 push = ndr_push_init_ctx(r, NULL);
3769 ndr_err = call->ndr_push(push, NDR_OUT, r);
3770 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3775 blob = ndr_push_blob(push);
3776 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3786 static bool api_spoolss_AddPrintProvidor(pipes_struct *p)
3788 const struct ndr_interface_call *call;
3789 struct ndr_pull *pull;
3790 struct ndr_push *push;
3791 enum ndr_err_code ndr_err;
3793 struct spoolss_AddPrintProvidor *r;
3795 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTPROVIDOR];
3797 r = talloc(talloc_tos(), struct spoolss_AddPrintProvidor);
3802 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3807 pull = ndr_pull_init_blob(&blob, r, NULL);
3813 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3814 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3815 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3820 if (DEBUGLEVEL >= 10) {
3821 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, r);
3824 r->out.result = _spoolss_AddPrintProvidor(p, r);
3826 if (p->rng_fault_state) {
3828 /* Return true here, srv_pipe_hnd.c will take care */
3832 if (DEBUGLEVEL >= 10) {
3833 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, r);
3836 push = ndr_push_init_ctx(r, NULL);
3842 ndr_err = call->ndr_push(push, NDR_OUT, r);
3843 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3848 blob = ndr_push_blob(push);
3849 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3859 static bool api_spoolss_DeletePrintProvidor(pipes_struct *p)
3861 const struct ndr_interface_call *call;
3862 struct ndr_pull *pull;
3863 struct ndr_push *push;
3864 enum ndr_err_code ndr_err;
3866 struct spoolss_DeletePrintProvidor *r;
3868 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTPROVIDOR];
3870 r = talloc(talloc_tos(), struct spoolss_DeletePrintProvidor);
3875 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3880 pull = ndr_pull_init_blob(&blob, r, NULL);
3886 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3887 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3888 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3893 if (DEBUGLEVEL >= 10) {
3894 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, r);
3897 r->out.result = _spoolss_DeletePrintProvidor(p, r);
3899 if (p->rng_fault_state) {
3901 /* Return true here, srv_pipe_hnd.c will take care */
3905 if (DEBUGLEVEL >= 10) {
3906 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, r);
3909 push = ndr_push_init_ctx(r, NULL);
3915 ndr_err = call->ndr_push(push, NDR_OUT, r);
3916 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3921 blob = ndr_push_blob(push);
3922 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
3932 static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct *p)
3934 const struct ndr_interface_call *call;
3935 struct ndr_pull *pull;
3936 struct ndr_push *push;
3937 enum ndr_err_code ndr_err;
3939 struct spoolss_EnumPrintProcDataTypes *r;
3941 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTPROCDATATYPES];
3943 r = talloc(talloc_tos(), struct spoolss_EnumPrintProcDataTypes);
3948 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
3953 pull = ndr_pull_init_blob(&blob, r, NULL);
3959 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
3960 ndr_err = call->ndr_pull(pull, NDR_IN, r);
3961 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3966 if (DEBUGLEVEL >= 10) {
3967 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, r);
3970 r->out.result = _spoolss_EnumPrintProcDataTypes(p, r);
3972 if (p->rng_fault_state) {
3974 /* Return true here, srv_pipe_hnd.c will take care */
3978 if (DEBUGLEVEL >= 10) {
3979 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, r);
3982 push = ndr_push_init_ctx(r, NULL);
3988 ndr_err = call->ndr_push(push, NDR_OUT, r);
3989 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
3994 blob = ndr_push_blob(push);
3995 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4005 static bool api_spoolss_ResetPrinter(pipes_struct *p)
4007 const struct ndr_interface_call *call;
4008 struct ndr_pull *pull;
4009 struct ndr_push *push;
4010 enum ndr_err_code ndr_err;
4012 struct spoolss_ResetPrinter *r;
4014 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTER];
4016 r = talloc(talloc_tos(), struct spoolss_ResetPrinter);
4021 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4026 pull = ndr_pull_init_blob(&blob, r, NULL);
4032 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4033 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4034 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4039 if (DEBUGLEVEL >= 10) {
4040 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, r);
4043 r->out.result = _spoolss_ResetPrinter(p, r);
4045 if (p->rng_fault_state) {
4047 /* Return true here, srv_pipe_hnd.c will take care */
4051 if (DEBUGLEVEL >= 10) {
4052 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, r);
4055 push = ndr_push_init_ctx(r, NULL);
4061 ndr_err = call->ndr_push(push, NDR_OUT, r);
4062 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4067 blob = ndr_push_blob(push);
4068 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4078 static bool api_spoolss_GetPrinterDriver2(pipes_struct *p)
4080 const struct ndr_interface_call *call;
4081 struct ndr_pull *pull;
4082 struct ndr_push *push;
4083 enum ndr_err_code ndr_err;
4085 struct spoolss_GetPrinterDriver2 *r;
4087 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDRIVER2];
4089 r = talloc(talloc_tos(), struct spoolss_GetPrinterDriver2);
4094 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4099 pull = ndr_pull_init_blob(&blob, r, NULL);
4105 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4106 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4107 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4112 if (DEBUGLEVEL >= 10) {
4113 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, r);
4116 ZERO_STRUCT(r->out);
4117 r->out.info = talloc_zero(r, DATA_BLOB);
4118 if (r->out.info == NULL) {
4123 r->out.needed = talloc_zero(r, uint32_t);
4124 if (r->out.needed == NULL) {
4129 r->out.server_major_version = talloc_zero(r, uint32_t);
4130 if (r->out.server_major_version == NULL) {
4135 r->out.server_minor_version = talloc_zero(r, uint32_t);
4136 if (r->out.server_minor_version == NULL) {
4141 r->out.result = _spoolss_GetPrinterDriver2(p, r);
4143 if (p->rng_fault_state) {
4145 /* Return true here, srv_pipe_hnd.c will take care */
4149 if (DEBUGLEVEL >= 10) {
4150 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, r);
4153 push = ndr_push_init_ctx(r, NULL);
4159 ndr_err = call->ndr_push(push, NDR_OUT, r);
4160 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4165 blob = ndr_push_blob(push);
4166 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4176 static bool api_spoolss_FindFirstPrinterChangeNotification(pipes_struct *p)
4178 const struct ndr_interface_call *call;
4179 struct ndr_pull *pull;
4180 struct ndr_push *push;
4181 enum ndr_err_code ndr_err;
4183 struct spoolss_FindFirstPrinterChangeNotification *r;
4185 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION];
4187 r = talloc(talloc_tos(), struct spoolss_FindFirstPrinterChangeNotification);
4192 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4197 pull = ndr_pull_init_blob(&blob, r, NULL);
4203 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4204 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4205 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4210 if (DEBUGLEVEL >= 10) {
4211 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4214 r->out.result = _spoolss_FindFirstPrinterChangeNotification(p, r);
4216 if (p->rng_fault_state) {
4218 /* Return true here, srv_pipe_hnd.c will take care */
4222 if (DEBUGLEVEL >= 10) {
4223 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, r);
4226 push = ndr_push_init_ctx(r, NULL);
4232 ndr_err = call->ndr_push(push, NDR_OUT, r);
4233 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4238 blob = ndr_push_blob(push);
4239 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4249 static bool api_spoolss_FindNextPrinterChangeNotification(pipes_struct *p)
4251 const struct ndr_interface_call *call;
4252 struct ndr_pull *pull;
4253 struct ndr_push *push;
4254 enum ndr_err_code ndr_err;
4256 struct spoolss_FindNextPrinterChangeNotification *r;
4258 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION];
4260 r = talloc(talloc_tos(), struct spoolss_FindNextPrinterChangeNotification);
4265 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4270 pull = ndr_pull_init_blob(&blob, r, NULL);
4276 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4277 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4278 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4283 if (DEBUGLEVEL >= 10) {
4284 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4287 r->out.result = _spoolss_FindNextPrinterChangeNotification(p, r);
4289 if (p->rng_fault_state) {
4291 /* Return true here, srv_pipe_hnd.c will take care */
4295 if (DEBUGLEVEL >= 10) {
4296 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, r);
4299 push = ndr_push_init_ctx(r, NULL);
4305 ndr_err = call->ndr_push(push, NDR_OUT, r);
4306 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4311 blob = ndr_push_blob(push);
4312 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4322 static bool api_spoolss_FindClosePrinterNotify(pipes_struct *p)
4324 const struct ndr_interface_call *call;
4325 struct ndr_pull *pull;
4326 struct ndr_push *push;
4327 enum ndr_err_code ndr_err;
4329 struct spoolss_FindClosePrinterNotify *r;
4331 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY];
4333 r = talloc(talloc_tos(), struct spoolss_FindClosePrinterNotify);
4338 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4343 pull = ndr_pull_init_blob(&blob, r, NULL);
4349 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4350 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4351 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4356 if (DEBUGLEVEL >= 10) {
4357 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, r);
4360 r->out.result = _spoolss_FindClosePrinterNotify(p, r);
4362 if (p->rng_fault_state) {
4364 /* Return true here, srv_pipe_hnd.c will take care */
4368 if (DEBUGLEVEL >= 10) {
4369 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, r);
4372 push = ndr_push_init_ctx(r, NULL);
4378 ndr_err = call->ndr_push(push, NDR_OUT, r);
4379 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4384 blob = ndr_push_blob(push);
4385 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4395 static bool api_spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct *p)
4397 const struct ndr_interface_call *call;
4398 struct ndr_pull *pull;
4399 struct ndr_push *push;
4400 enum ndr_err_code ndr_err;
4402 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r;
4404 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD];
4406 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotificationOld);
4411 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4416 pull = ndr_pull_init_blob(&blob, r, NULL);
4422 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4423 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4424 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4429 if (DEBUGLEVEL >= 10) {
4430 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4433 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(p, r);
4435 if (p->rng_fault_state) {
4437 /* Return true here, srv_pipe_hnd.c will take care */
4441 if (DEBUGLEVEL >= 10) {
4442 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, r);
4445 push = ndr_push_init_ctx(r, NULL);
4451 ndr_err = call->ndr_push(push, NDR_OUT, r);
4452 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4457 blob = ndr_push_blob(push);
4458 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4468 static bool api_spoolss_ReplyOpenPrinter(pipes_struct *p)
4470 const struct ndr_interface_call *call;
4471 struct ndr_pull *pull;
4472 struct ndr_push *push;
4473 enum ndr_err_code ndr_err;
4475 struct spoolss_ReplyOpenPrinter *r;
4477 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYOPENPRINTER];
4479 r = talloc(talloc_tos(), struct spoolss_ReplyOpenPrinter);
4484 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4489 pull = ndr_pull_init_blob(&blob, r, NULL);
4495 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4496 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4497 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4502 if (DEBUGLEVEL >= 10) {
4503 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, r);
4506 ZERO_STRUCT(r->out);
4507 r->out.handle = talloc_zero(r, struct policy_handle);
4508 if (r->out.handle == NULL) {
4513 r->out.result = _spoolss_ReplyOpenPrinter(p, r);
4515 if (p->rng_fault_state) {
4517 /* Return true here, srv_pipe_hnd.c will take care */
4521 if (DEBUGLEVEL >= 10) {
4522 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, r);
4525 push = ndr_push_init_ctx(r, NULL);
4531 ndr_err = call->ndr_push(push, NDR_OUT, r);
4532 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4537 blob = ndr_push_blob(push);
4538 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4548 static bool api_spoolss_RouterReplyPrinter(pipes_struct *p)
4550 const struct ndr_interface_call *call;
4551 struct ndr_pull *pull;
4552 struct ndr_push *push;
4553 enum ndr_err_code ndr_err;
4555 struct spoolss_RouterReplyPrinter *r;
4557 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTER];
4559 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinter);
4564 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4569 pull = ndr_pull_init_blob(&blob, r, NULL);
4575 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4576 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4577 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4582 if (DEBUGLEVEL >= 10) {
4583 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, r);
4586 r->out.result = _spoolss_RouterReplyPrinter(p, r);
4588 if (p->rng_fault_state) {
4590 /* Return true here, srv_pipe_hnd.c will take care */
4594 if (DEBUGLEVEL >= 10) {
4595 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, r);
4598 push = ndr_push_init_ctx(r, NULL);
4604 ndr_err = call->ndr_push(push, NDR_OUT, r);
4605 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4610 blob = ndr_push_blob(push);
4611 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4621 static bool api_spoolss_ReplyClosePrinter(pipes_struct *p)
4623 const struct ndr_interface_call *call;
4624 struct ndr_pull *pull;
4625 struct ndr_push *push;
4626 enum ndr_err_code ndr_err;
4628 struct spoolss_ReplyClosePrinter *r;
4630 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REPLYCLOSEPRINTER];
4632 r = talloc(talloc_tos(), struct spoolss_ReplyClosePrinter);
4637 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4642 pull = ndr_pull_init_blob(&blob, r, NULL);
4648 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4649 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4650 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4655 if (DEBUGLEVEL >= 10) {
4656 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, r);
4659 ZERO_STRUCT(r->out);
4660 r->out.handle = r->in.handle;
4661 r->out.result = _spoolss_ReplyClosePrinter(p, r);
4663 if (p->rng_fault_state) {
4665 /* Return true here, srv_pipe_hnd.c will take care */
4669 if (DEBUGLEVEL >= 10) {
4670 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, r);
4673 push = ndr_push_init_ctx(r, NULL);
4679 ndr_err = call->ndr_push(push, NDR_OUT, r);
4680 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4685 blob = ndr_push_blob(push);
4686 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4696 static bool api_spoolss_AddPortEx(pipes_struct *p)
4698 const struct ndr_interface_call *call;
4699 struct ndr_pull *pull;
4700 struct ndr_push *push;
4701 enum ndr_err_code ndr_err;
4703 struct spoolss_AddPortEx *r;
4705 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPORTEX];
4707 r = talloc(talloc_tos(), struct spoolss_AddPortEx);
4712 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4717 pull = ndr_pull_init_blob(&blob, r, NULL);
4723 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4724 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4725 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4730 if (DEBUGLEVEL >= 10) {
4731 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, r);
4734 r->out.result = _spoolss_AddPortEx(p, r);
4736 if (p->rng_fault_state) {
4738 /* Return true here, srv_pipe_hnd.c will take care */
4742 if (DEBUGLEVEL >= 10) {
4743 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, r);
4746 push = ndr_push_init_ctx(r, NULL);
4752 ndr_err = call->ndr_push(push, NDR_OUT, r);
4753 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4758 blob = ndr_push_blob(push);
4759 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4769 static bool api_spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct *p)
4771 const struct ndr_interface_call *call;
4772 struct ndr_pull *pull;
4773 struct ndr_push *push;
4774 enum ndr_err_code ndr_err;
4776 struct spoolss_RouterFindFirstPrinterChangeNotification *r;
4778 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION];
4780 r = talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotification);
4785 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4790 pull = ndr_pull_init_blob(&blob, r, NULL);
4796 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4797 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4798 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4803 if (DEBUGLEVEL >= 10) {
4804 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4807 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(p, r);
4809 if (p->rng_fault_state) {
4811 /* Return true here, srv_pipe_hnd.c will take care */
4815 if (DEBUGLEVEL >= 10) {
4816 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, r);
4819 push = ndr_push_init_ctx(r, NULL);
4825 ndr_err = call->ndr_push(push, NDR_OUT, r);
4826 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4831 blob = ndr_push_blob(push);
4832 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4842 static bool api_spoolss_SpoolerInit(pipes_struct *p)
4844 const struct ndr_interface_call *call;
4845 struct ndr_pull *pull;
4846 struct ndr_push *push;
4847 enum ndr_err_code ndr_err;
4849 struct spoolss_SpoolerInit *r;
4851 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SPOOLERINIT];
4853 r = talloc(talloc_tos(), struct spoolss_SpoolerInit);
4858 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4863 pull = ndr_pull_init_blob(&blob, r, NULL);
4869 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4870 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4871 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4876 if (DEBUGLEVEL >= 10) {
4877 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, r);
4880 r->out.result = _spoolss_SpoolerInit(p, r);
4882 if (p->rng_fault_state) {
4884 /* Return true here, srv_pipe_hnd.c will take care */
4888 if (DEBUGLEVEL >= 10) {
4889 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, r);
4892 push = ndr_push_init_ctx(r, NULL);
4898 ndr_err = call->ndr_push(push, NDR_OUT, r);
4899 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4904 blob = ndr_push_blob(push);
4905 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4915 static bool api_spoolss_ResetPrinterEx(pipes_struct *p)
4917 const struct ndr_interface_call *call;
4918 struct ndr_pull *pull;
4919 struct ndr_push *push;
4920 enum ndr_err_code ndr_err;
4922 struct spoolss_ResetPrinterEx *r;
4924 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_RESETPRINTEREX];
4926 r = talloc(talloc_tos(), struct spoolss_ResetPrinterEx);
4931 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
4936 pull = ndr_pull_init_blob(&blob, r, NULL);
4942 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
4943 ndr_err = call->ndr_pull(pull, NDR_IN, r);
4944 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4949 if (DEBUGLEVEL >= 10) {
4950 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, r);
4953 r->out.result = _spoolss_ResetPrinterEx(p, r);
4955 if (p->rng_fault_state) {
4957 /* Return true here, srv_pipe_hnd.c will take care */
4961 if (DEBUGLEVEL >= 10) {
4962 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, r);
4965 push = ndr_push_init_ctx(r, NULL);
4971 ndr_err = call->ndr_push(push, NDR_OUT, r);
4972 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
4977 blob = ndr_push_blob(push);
4978 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
4988 static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct *p)
4990 const struct ndr_interface_call *call;
4991 struct ndr_pull *pull;
4992 struct ndr_push *push;
4993 enum ndr_err_code ndr_err;
4995 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r;
4997 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX];
4999 r = talloc(talloc_tos(), struct spoolss_RemoteFindFirstPrinterChangeNotifyEx);
5004 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5009 pull = ndr_pull_init_blob(&blob, r, NULL);
5015 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5016 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5017 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5022 if (DEBUGLEVEL >= 10) {
5023 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5026 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p, r);
5028 if (p->rng_fault_state) {
5030 /* Return true here, srv_pipe_hnd.c will take care */
5034 if (DEBUGLEVEL >= 10) {
5035 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, r);
5038 push = ndr_push_init_ctx(r, NULL);
5044 ndr_err = call->ndr_push(push, NDR_OUT, r);
5045 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5050 blob = ndr_push_blob(push);
5051 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5061 static bool api_spoolss_RouterReplyPrinterEx(pipes_struct *p)
5063 const struct ndr_interface_call *call;
5064 struct ndr_pull *pull;
5065 struct ndr_push *push;
5066 enum ndr_err_code ndr_err;
5068 struct spoolss_RouterReplyPrinterEx *r;
5070 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREPLYPRINTEREX];
5072 r = talloc(talloc_tos(), struct spoolss_RouterReplyPrinterEx);
5077 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5082 pull = ndr_pull_init_blob(&blob, r, NULL);
5088 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5089 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5090 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5095 if (DEBUGLEVEL >= 10) {
5096 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, r);
5099 ZERO_STRUCT(r->out);
5100 r->out.reply_result = talloc_zero(r, uint32_t);
5101 if (r->out.reply_result == NULL) {
5106 r->out.result = _spoolss_RouterReplyPrinterEx(p, r);
5108 if (p->rng_fault_state) {
5110 /* Return true here, srv_pipe_hnd.c will take care */
5114 if (DEBUGLEVEL >= 10) {
5115 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, r);
5118 push = ndr_push_init_ctx(r, NULL);
5124 ndr_err = call->ndr_push(push, NDR_OUT, r);
5125 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5130 blob = ndr_push_blob(push);
5131 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5141 static bool api_spoolss_RouterRefreshPrinterChangeNotify(pipes_struct *p)
5143 const struct ndr_interface_call *call;
5144 struct ndr_pull *pull;
5145 struct ndr_push *push;
5146 enum ndr_err_code ndr_err;
5148 struct spoolss_RouterRefreshPrinterChangeNotify *r;
5150 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY];
5152 r = talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotify);
5157 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5162 pull = ndr_pull_init_blob(&blob, r, NULL);
5168 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5169 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5170 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5175 if (DEBUGLEVEL >= 10) {
5176 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5179 ZERO_STRUCT(r->out);
5180 r->out.info = talloc_zero(r, struct spoolss_NotifyInfo *);
5181 if (r->out.info == NULL) {
5186 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(p, r);
5188 if (p->rng_fault_state) {
5190 /* Return true here, srv_pipe_hnd.c will take care */
5194 if (DEBUGLEVEL >= 10) {
5195 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, r);
5198 push = ndr_push_init_ctx(r, NULL);
5204 ndr_err = call->ndr_push(push, NDR_OUT, r);
5205 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5210 blob = ndr_push_blob(push);
5211 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5221 static bool api_spoolss_44(pipes_struct *p)
5223 const struct ndr_interface_call *call;
5224 struct ndr_pull *pull;
5225 struct ndr_push *push;
5226 enum ndr_err_code ndr_err;
5228 struct spoolss_44 *r;
5230 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_44];
5232 r = talloc(talloc_tos(), struct spoolss_44);
5237 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5242 pull = ndr_pull_init_blob(&blob, r, NULL);
5248 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5249 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5250 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5255 if (DEBUGLEVEL >= 10) {
5256 NDR_PRINT_IN_DEBUG(spoolss_44, r);
5259 r->out.result = _spoolss_44(p, r);
5261 if (p->rng_fault_state) {
5263 /* Return true here, srv_pipe_hnd.c will take care */
5267 if (DEBUGLEVEL >= 10) {
5268 NDR_PRINT_OUT_DEBUG(spoolss_44, r);
5271 push = ndr_push_init_ctx(r, NULL);
5277 ndr_err = call->ndr_push(push, NDR_OUT, r);
5278 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5283 blob = ndr_push_blob(push);
5284 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5294 static bool api_spoolss_OpenPrinterEx(pipes_struct *p)
5296 const struct ndr_interface_call *call;
5297 struct ndr_pull *pull;
5298 struct ndr_push *push;
5299 enum ndr_err_code ndr_err;
5301 struct spoolss_OpenPrinterEx *r;
5303 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_OPENPRINTEREX];
5305 r = talloc(talloc_tos(), struct spoolss_OpenPrinterEx);
5310 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5315 pull = ndr_pull_init_blob(&blob, r, NULL);
5321 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5322 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5323 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5328 if (DEBUGLEVEL >= 10) {
5329 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, r);
5332 ZERO_STRUCT(r->out);
5333 r->out.handle = talloc_zero(r, struct policy_handle);
5334 if (r->out.handle == NULL) {
5339 r->out.result = _spoolss_OpenPrinterEx(p, r);
5341 if (p->rng_fault_state) {
5343 /* Return true here, srv_pipe_hnd.c will take care */
5347 if (DEBUGLEVEL >= 10) {
5348 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, r);
5351 push = ndr_push_init_ctx(r, NULL);
5357 ndr_err = call->ndr_push(push, NDR_OUT, r);
5358 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5363 blob = ndr_push_blob(push);
5364 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5374 static bool api_spoolss_AddPrinterEx(pipes_struct *p)
5376 const struct ndr_interface_call *call;
5377 struct ndr_pull *pull;
5378 struct ndr_push *push;
5379 enum ndr_err_code ndr_err;
5381 struct spoolss_AddPrinterEx *r;
5383 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTEREX];
5385 r = talloc(talloc_tos(), struct spoolss_AddPrinterEx);
5390 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5395 pull = ndr_pull_init_blob(&blob, r, NULL);
5401 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5402 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5403 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5408 if (DEBUGLEVEL >= 10) {
5409 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, r);
5412 r->out.result = _spoolss_AddPrinterEx(p, r);
5414 if (p->rng_fault_state) {
5416 /* Return true here, srv_pipe_hnd.c will take care */
5420 if (DEBUGLEVEL >= 10) {
5421 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, r);
5424 push = ndr_push_init_ctx(r, NULL);
5430 ndr_err = call->ndr_push(push, NDR_OUT, r);
5431 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5436 blob = ndr_push_blob(push);
5437 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5447 static bool api_spoolss_47(pipes_struct *p)
5449 const struct ndr_interface_call *call;
5450 struct ndr_pull *pull;
5451 struct ndr_push *push;
5452 enum ndr_err_code ndr_err;
5454 struct spoolss_47 *r;
5456 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_47];
5458 r = talloc(talloc_tos(), struct spoolss_47);
5463 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5468 pull = ndr_pull_init_blob(&blob, r, NULL);
5474 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5475 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5476 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5481 if (DEBUGLEVEL >= 10) {
5482 NDR_PRINT_IN_DEBUG(spoolss_47, r);
5485 r->out.result = _spoolss_47(p, r);
5487 if (p->rng_fault_state) {
5489 /* Return true here, srv_pipe_hnd.c will take care */
5493 if (DEBUGLEVEL >= 10) {
5494 NDR_PRINT_OUT_DEBUG(spoolss_47, r);
5497 push = ndr_push_init_ctx(r, NULL);
5503 ndr_err = call->ndr_push(push, NDR_OUT, r);
5504 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5509 blob = ndr_push_blob(push);
5510 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5520 static bool api_spoolss_EnumPrinterData(pipes_struct *p)
5522 const struct ndr_interface_call *call;
5523 struct ndr_pull *pull;
5524 struct ndr_push *push;
5525 enum ndr_err_code ndr_err;
5527 struct spoolss_EnumPrinterData *r;
5529 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATA];
5531 r = talloc(talloc_tos(), struct spoolss_EnumPrinterData);
5536 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5541 pull = ndr_pull_init_blob(&blob, r, NULL);
5547 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5548 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5549 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5554 if (DEBUGLEVEL >= 10) {
5555 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, r);
5558 ZERO_STRUCT(r->out);
5559 r->out.value_name = talloc_zero_array(r, const char, r->in.value_offered / 2);
5560 if (r->out.value_name == NULL) {
5565 r->out.value_needed = talloc_zero(r, uint32_t);
5566 if (r->out.value_needed == NULL) {
5571 r->out.printerdata_type = talloc_zero(r, uint32_t);
5572 if (r->out.printerdata_type == NULL) {
5577 r->out.buffer = talloc_zero(r, DATA_BLOB);
5578 if (r->out.buffer == NULL) {
5583 r->out.data_needed = talloc_zero(r, uint32_t);
5584 if (r->out.data_needed == NULL) {
5589 r->out.result = _spoolss_EnumPrinterData(p, r);
5591 if (p->rng_fault_state) {
5593 /* Return true here, srv_pipe_hnd.c will take care */
5597 if (DEBUGLEVEL >= 10) {
5598 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, r);
5601 push = ndr_push_init_ctx(r, NULL);
5607 ndr_err = call->ndr_push(push, NDR_OUT, r);
5608 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5613 blob = ndr_push_blob(push);
5614 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5624 static bool api_spoolss_DeletePrinterData(pipes_struct *p)
5626 const struct ndr_interface_call *call;
5627 struct ndr_pull *pull;
5628 struct ndr_push *push;
5629 enum ndr_err_code ndr_err;
5631 struct spoolss_DeletePrinterData *r;
5633 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATA];
5635 r = talloc(talloc_tos(), struct spoolss_DeletePrinterData);
5640 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5645 pull = ndr_pull_init_blob(&blob, r, NULL);
5651 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5652 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5653 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5658 if (DEBUGLEVEL >= 10) {
5659 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, r);
5662 r->out.result = _spoolss_DeletePrinterData(p, r);
5664 if (p->rng_fault_state) {
5666 /* Return true here, srv_pipe_hnd.c will take care */
5670 if (DEBUGLEVEL >= 10) {
5671 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, r);
5674 push = ndr_push_init_ctx(r, NULL);
5680 ndr_err = call->ndr_push(push, NDR_OUT, r);
5681 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5686 blob = ndr_push_blob(push);
5687 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5697 static bool api_spoolss_4a(pipes_struct *p)
5699 const struct ndr_interface_call *call;
5700 struct ndr_pull *pull;
5701 struct ndr_push *push;
5702 enum ndr_err_code ndr_err;
5704 struct spoolss_4a *r;
5706 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4A];
5708 r = talloc(talloc_tos(), struct spoolss_4a);
5713 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5718 pull = ndr_pull_init_blob(&blob, r, NULL);
5724 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5725 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5726 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5731 if (DEBUGLEVEL >= 10) {
5732 NDR_PRINT_IN_DEBUG(spoolss_4a, r);
5735 r->out.result = _spoolss_4a(p, r);
5737 if (p->rng_fault_state) {
5739 /* Return true here, srv_pipe_hnd.c will take care */
5743 if (DEBUGLEVEL >= 10) {
5744 NDR_PRINT_OUT_DEBUG(spoolss_4a, r);
5747 push = ndr_push_init_ctx(r, NULL);
5753 ndr_err = call->ndr_push(push, NDR_OUT, r);
5754 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5759 blob = ndr_push_blob(push);
5760 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5770 static bool api_spoolss_4b(pipes_struct *p)
5772 const struct ndr_interface_call *call;
5773 struct ndr_pull *pull;
5774 struct ndr_push *push;
5775 enum ndr_err_code ndr_err;
5777 struct spoolss_4b *r;
5779 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4B];
5781 r = talloc(talloc_tos(), struct spoolss_4b);
5786 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5791 pull = ndr_pull_init_blob(&blob, r, NULL);
5797 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5798 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5799 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5804 if (DEBUGLEVEL >= 10) {
5805 NDR_PRINT_IN_DEBUG(spoolss_4b, r);
5808 r->out.result = _spoolss_4b(p, r);
5810 if (p->rng_fault_state) {
5812 /* Return true here, srv_pipe_hnd.c will take care */
5816 if (DEBUGLEVEL >= 10) {
5817 NDR_PRINT_OUT_DEBUG(spoolss_4b, r);
5820 push = ndr_push_init_ctx(r, NULL);
5826 ndr_err = call->ndr_push(push, NDR_OUT, r);
5827 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5832 blob = ndr_push_blob(push);
5833 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5843 static bool api_spoolss_4c(pipes_struct *p)
5845 const struct ndr_interface_call *call;
5846 struct ndr_pull *pull;
5847 struct ndr_push *push;
5848 enum ndr_err_code ndr_err;
5850 struct spoolss_4c *r;
5852 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_4C];
5854 r = talloc(talloc_tos(), struct spoolss_4c);
5859 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5864 pull = ndr_pull_init_blob(&blob, r, NULL);
5870 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5871 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5872 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5877 if (DEBUGLEVEL >= 10) {
5878 NDR_PRINT_IN_DEBUG(spoolss_4c, r);
5881 r->out.result = _spoolss_4c(p, r);
5883 if (p->rng_fault_state) {
5885 /* Return true here, srv_pipe_hnd.c will take care */
5889 if (DEBUGLEVEL >= 10) {
5890 NDR_PRINT_OUT_DEBUG(spoolss_4c, r);
5893 push = ndr_push_init_ctx(r, NULL);
5899 ndr_err = call->ndr_push(push, NDR_OUT, r);
5900 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5905 blob = ndr_push_blob(push);
5906 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5916 static bool api_spoolss_SetPrinterDataEx(pipes_struct *p)
5918 const struct ndr_interface_call *call;
5919 struct ndr_pull *pull;
5920 struct ndr_push *push;
5921 enum ndr_err_code ndr_err;
5923 struct spoolss_SetPrinterDataEx *r;
5925 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_SETPRINTERDATAEX];
5927 r = talloc(talloc_tos(), struct spoolss_SetPrinterDataEx);
5932 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
5937 pull = ndr_pull_init_blob(&blob, r, NULL);
5943 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
5944 ndr_err = call->ndr_pull(pull, NDR_IN, r);
5945 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5950 if (DEBUGLEVEL >= 10) {
5951 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, r);
5954 r->out.result = _spoolss_SetPrinterDataEx(p, r);
5956 if (p->rng_fault_state) {
5958 /* Return true here, srv_pipe_hnd.c will take care */
5962 if (DEBUGLEVEL >= 10) {
5963 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, r);
5966 push = ndr_push_init_ctx(r, NULL);
5972 ndr_err = call->ndr_push(push, NDR_OUT, r);
5973 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
5978 blob = ndr_push_blob(push);
5979 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
5989 static bool api_spoolss_GetPrinterDataEx(pipes_struct *p)
5991 const struct ndr_interface_call *call;
5992 struct ndr_pull *pull;
5993 struct ndr_push *push;
5994 enum ndr_err_code ndr_err;
5996 struct spoolss_GetPrinterDataEx *r;
5998 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_GETPRINTERDATAEX];
6000 r = talloc(talloc_tos(), struct spoolss_GetPrinterDataEx);
6005 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6010 pull = ndr_pull_init_blob(&blob, r, NULL);
6016 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6017 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6018 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6023 if (DEBUGLEVEL >= 10) {
6024 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, r);
6027 ZERO_STRUCT(r->out);
6028 r->out.type = talloc_zero(r, uint32_t);
6029 if (r->out.type == NULL) {
6034 r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
6035 if (r->out.buffer == NULL) {
6040 r->out.needed = talloc_zero(r, uint32_t);
6041 if (r->out.needed == NULL) {
6046 r->out.result = _spoolss_GetPrinterDataEx(p, r);
6048 if (p->rng_fault_state) {
6050 /* Return true here, srv_pipe_hnd.c will take care */
6054 if (DEBUGLEVEL >= 10) {
6055 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, r);
6058 push = ndr_push_init_ctx(r, NULL);
6064 ndr_err = call->ndr_push(push, NDR_OUT, r);
6065 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6070 blob = ndr_push_blob(push);
6071 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6081 static bool api_spoolss_EnumPrinterDataEx(pipes_struct *p)
6083 const struct ndr_interface_call *call;
6084 struct ndr_pull *pull;
6085 struct ndr_push *push;
6086 enum ndr_err_code ndr_err;
6088 struct spoolss_EnumPrinterDataEx *r;
6090 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERDATAEX];
6092 r = talloc(talloc_tos(), struct spoolss_EnumPrinterDataEx);
6097 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6102 pull = ndr_pull_init_blob(&blob, r, NULL);
6108 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6109 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6110 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6115 if (DEBUGLEVEL >= 10) {
6116 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, r);
6119 ZERO_STRUCT(r->out);
6120 r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
6121 if (r->out.buffer == NULL) {
6126 r->out.needed = talloc_zero(r, uint32_t);
6127 if (r->out.needed == NULL) {
6132 r->out.count = talloc_zero(r, uint32_t);
6133 if (r->out.count == NULL) {
6138 r->out.result = _spoolss_EnumPrinterDataEx(p, r);
6140 if (p->rng_fault_state) {
6142 /* Return true here, srv_pipe_hnd.c will take care */
6146 if (DEBUGLEVEL >= 10) {
6147 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, r);
6150 push = ndr_push_init_ctx(r, NULL);
6156 ndr_err = call->ndr_push(push, NDR_OUT, r);
6157 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6162 blob = ndr_push_blob(push);
6163 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6173 static bool api_spoolss_EnumPrinterKey(pipes_struct *p)
6175 const struct ndr_interface_call *call;
6176 struct ndr_pull *pull;
6177 struct ndr_push *push;
6178 enum ndr_err_code ndr_err;
6180 struct spoolss_EnumPrinterKey *r;
6182 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ENUMPRINTERKEY];
6184 r = talloc(talloc_tos(), struct spoolss_EnumPrinterKey);
6189 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6194 pull = ndr_pull_init_blob(&blob, r, NULL);
6200 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6201 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6202 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6207 if (DEBUGLEVEL >= 10) {
6208 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, r);
6211 ZERO_STRUCT(r->out);
6212 r->out.key_buffer = talloc_zero_array(r, uint16_t, r->in.key_buffer_size / 2);
6213 if (r->out.key_buffer == NULL) {
6218 r->out.needed = talloc_zero(r, uint32_t);
6219 if (r->out.needed == NULL) {
6224 r->out.result = _spoolss_EnumPrinterKey(p, r);
6226 if (p->rng_fault_state) {
6228 /* Return true here, srv_pipe_hnd.c will take care */
6232 if (DEBUGLEVEL >= 10) {
6233 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, r);
6236 push = ndr_push_init_ctx(r, NULL);
6242 ndr_err = call->ndr_push(push, NDR_OUT, r);
6243 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6248 blob = ndr_push_blob(push);
6249 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6259 static bool api_spoolss_DeletePrinterDataEx(pipes_struct *p)
6261 const struct ndr_interface_call *call;
6262 struct ndr_pull *pull;
6263 struct ndr_push *push;
6264 enum ndr_err_code ndr_err;
6266 struct spoolss_DeletePrinterDataEx *r;
6268 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDATAEX];
6270 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDataEx);
6275 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6280 pull = ndr_pull_init_blob(&blob, r, NULL);
6286 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6287 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6288 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6293 if (DEBUGLEVEL >= 10) {
6294 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, r);
6297 r->out.result = _spoolss_DeletePrinterDataEx(p, r);
6299 if (p->rng_fault_state) {
6301 /* Return true here, srv_pipe_hnd.c will take care */
6305 if (DEBUGLEVEL >= 10) {
6306 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, r);
6309 push = ndr_push_init_ctx(r, NULL);
6315 ndr_err = call->ndr_push(push, NDR_OUT, r);
6316 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6321 blob = ndr_push_blob(push);
6322 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6332 static bool api_spoolss_DeletePrinterKey(pipes_struct *p)
6334 const struct ndr_interface_call *call;
6335 struct ndr_pull *pull;
6336 struct ndr_push *push;
6337 enum ndr_err_code ndr_err;
6339 struct spoolss_DeletePrinterKey *r;
6341 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERKEY];
6343 r = talloc(talloc_tos(), struct spoolss_DeletePrinterKey);
6348 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6353 pull = ndr_pull_init_blob(&blob, r, NULL);
6359 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6360 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6361 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6366 if (DEBUGLEVEL >= 10) {
6367 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, r);
6370 r->out.result = _spoolss_DeletePrinterKey(p, r);
6372 if (p->rng_fault_state) {
6374 /* Return true here, srv_pipe_hnd.c will take care */
6378 if (DEBUGLEVEL >= 10) {
6379 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, r);
6382 push = ndr_push_init_ctx(r, NULL);
6388 ndr_err = call->ndr_push(push, NDR_OUT, r);
6389 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6394 blob = ndr_push_blob(push);
6395 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6405 static bool api_spoolss_53(pipes_struct *p)
6407 const struct ndr_interface_call *call;
6408 struct ndr_pull *pull;
6409 struct ndr_push *push;
6410 enum ndr_err_code ndr_err;
6412 struct spoolss_53 *r;
6414 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_53];
6416 r = talloc(talloc_tos(), struct spoolss_53);
6421 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6426 pull = ndr_pull_init_blob(&blob, r, NULL);
6432 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6433 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6434 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6439 if (DEBUGLEVEL >= 10) {
6440 NDR_PRINT_IN_DEBUG(spoolss_53, r);
6443 r->out.result = _spoolss_53(p, r);
6445 if (p->rng_fault_state) {
6447 /* Return true here, srv_pipe_hnd.c will take care */
6451 if (DEBUGLEVEL >= 10) {
6452 NDR_PRINT_OUT_DEBUG(spoolss_53, r);
6455 push = ndr_push_init_ctx(r, NULL);
6461 ndr_err = call->ndr_push(push, NDR_OUT, r);
6462 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6467 blob = ndr_push_blob(push);
6468 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6478 static bool api_spoolss_DeletePrinterDriverEx(pipes_struct *p)
6480 const struct ndr_interface_call *call;
6481 struct ndr_pull *pull;
6482 struct ndr_push *push;
6483 enum ndr_err_code ndr_err;
6485 struct spoolss_DeletePrinterDriverEx *r;
6487 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_DELETEPRINTERDRIVEREX];
6489 r = talloc(talloc_tos(), struct spoolss_DeletePrinterDriverEx);
6494 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6499 pull = ndr_pull_init_blob(&blob, r, NULL);
6505 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6506 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6507 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6512 if (DEBUGLEVEL >= 10) {
6513 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, r);
6516 r->out.result = _spoolss_DeletePrinterDriverEx(p, r);
6518 if (p->rng_fault_state) {
6520 /* Return true here, srv_pipe_hnd.c will take care */
6524 if (DEBUGLEVEL >= 10) {
6525 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, r);
6528 push = ndr_push_init_ctx(r, NULL);
6534 ndr_err = call->ndr_push(push, NDR_OUT, r);
6535 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6540 blob = ndr_push_blob(push);
6541 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6551 static bool api_spoolss_55(pipes_struct *p)
6553 const struct ndr_interface_call *call;
6554 struct ndr_pull *pull;
6555 struct ndr_push *push;
6556 enum ndr_err_code ndr_err;
6558 struct spoolss_55 *r;
6560 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_55];
6562 r = talloc(talloc_tos(), struct spoolss_55);
6567 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6572 pull = ndr_pull_init_blob(&blob, r, NULL);
6578 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6579 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6580 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6585 if (DEBUGLEVEL >= 10) {
6586 NDR_PRINT_IN_DEBUG(spoolss_55, r);
6589 r->out.result = _spoolss_55(p, r);
6591 if (p->rng_fault_state) {
6593 /* Return true here, srv_pipe_hnd.c will take care */
6597 if (DEBUGLEVEL >= 10) {
6598 NDR_PRINT_OUT_DEBUG(spoolss_55, r);
6601 push = ndr_push_init_ctx(r, NULL);
6607 ndr_err = call->ndr_push(push, NDR_OUT, r);
6608 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6613 blob = ndr_push_blob(push);
6614 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6624 static bool api_spoolss_56(pipes_struct *p)
6626 const struct ndr_interface_call *call;
6627 struct ndr_pull *pull;
6628 struct ndr_push *push;
6629 enum ndr_err_code ndr_err;
6631 struct spoolss_56 *r;
6633 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_56];
6635 r = talloc(talloc_tos(), struct spoolss_56);
6640 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6645 pull = ndr_pull_init_blob(&blob, r, NULL);
6651 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6652 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6653 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6658 if (DEBUGLEVEL >= 10) {
6659 NDR_PRINT_IN_DEBUG(spoolss_56, r);
6662 r->out.result = _spoolss_56(p, r);
6664 if (p->rng_fault_state) {
6666 /* Return true here, srv_pipe_hnd.c will take care */
6670 if (DEBUGLEVEL >= 10) {
6671 NDR_PRINT_OUT_DEBUG(spoolss_56, r);
6674 push = ndr_push_init_ctx(r, NULL);
6680 ndr_err = call->ndr_push(push, NDR_OUT, r);
6681 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6686 blob = ndr_push_blob(push);
6687 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6697 static bool api_spoolss_57(pipes_struct *p)
6699 const struct ndr_interface_call *call;
6700 struct ndr_pull *pull;
6701 struct ndr_push *push;
6702 enum ndr_err_code ndr_err;
6704 struct spoolss_57 *r;
6706 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_57];
6708 r = talloc(talloc_tos(), struct spoolss_57);
6713 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6718 pull = ndr_pull_init_blob(&blob, r, NULL);
6724 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6725 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6726 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6731 if (DEBUGLEVEL >= 10) {
6732 NDR_PRINT_IN_DEBUG(spoolss_57, r);
6735 r->out.result = _spoolss_57(p, r);
6737 if (p->rng_fault_state) {
6739 /* Return true here, srv_pipe_hnd.c will take care */
6743 if (DEBUGLEVEL >= 10) {
6744 NDR_PRINT_OUT_DEBUG(spoolss_57, r);
6747 push = ndr_push_init_ctx(r, NULL);
6753 ndr_err = call->ndr_push(push, NDR_OUT, r);
6754 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6759 blob = ndr_push_blob(push);
6760 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6770 static bool api_spoolss_XcvData(pipes_struct *p)
6772 const struct ndr_interface_call *call;
6773 struct ndr_pull *pull;
6774 struct ndr_push *push;
6775 enum ndr_err_code ndr_err;
6777 struct spoolss_XcvData *r;
6779 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_XCVDATA];
6781 r = talloc(talloc_tos(), struct spoolss_XcvData);
6786 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6791 pull = ndr_pull_init_blob(&blob, r, NULL);
6797 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6798 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6799 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6804 if (DEBUGLEVEL >= 10) {
6805 NDR_PRINT_IN_DEBUG(spoolss_XcvData, r);
6808 ZERO_STRUCT(r->out);
6809 r->out.status_code = r->in.status_code;
6810 r->out.out_data = talloc_zero_array(r, uint8_t, r->in.out_data_size);
6811 if (r->out.out_data == NULL) {
6816 r->out.needed = talloc_zero(r, uint32_t);
6817 if (r->out.needed == NULL) {
6822 r->out.result = _spoolss_XcvData(p, r);
6824 if (p->rng_fault_state) {
6826 /* Return true here, srv_pipe_hnd.c will take care */
6830 if (DEBUGLEVEL >= 10) {
6831 NDR_PRINT_OUT_DEBUG(spoolss_XcvData, r);
6834 push = ndr_push_init_ctx(r, NULL);
6840 ndr_err = call->ndr_push(push, NDR_OUT, r);
6841 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6846 blob = ndr_push_blob(push);
6847 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6857 static bool api_spoolss_AddPrinterDriverEx(pipes_struct *p)
6859 const struct ndr_interface_call *call;
6860 struct ndr_pull *pull;
6861 struct ndr_push *push;
6862 enum ndr_err_code ndr_err;
6864 struct spoolss_AddPrinterDriverEx *r;
6866 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_ADDPRINTERDRIVEREX];
6868 r = talloc(talloc_tos(), struct spoolss_AddPrinterDriverEx);
6873 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6878 pull = ndr_pull_init_blob(&blob, r, NULL);
6884 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6885 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6891 if (DEBUGLEVEL >= 10) {
6892 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, r);
6895 r->out.result = _spoolss_AddPrinterDriverEx(p, r);
6897 if (p->rng_fault_state) {
6899 /* Return true here, srv_pipe_hnd.c will take care */
6903 if (DEBUGLEVEL >= 10) {
6904 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, r);
6907 push = ndr_push_init_ctx(r, NULL);
6913 ndr_err = call->ndr_push(push, NDR_OUT, r);
6914 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6919 blob = ndr_push_blob(push);
6920 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
6930 static bool api_spoolss_5a(pipes_struct *p)
6932 const struct ndr_interface_call *call;
6933 struct ndr_pull *pull;
6934 struct ndr_push *push;
6935 enum ndr_err_code ndr_err;
6937 struct spoolss_5a *r;
6939 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5A];
6941 r = talloc(talloc_tos(), struct spoolss_5a);
6946 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
6951 pull = ndr_pull_init_blob(&blob, r, NULL);
6957 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
6958 ndr_err = call->ndr_pull(pull, NDR_IN, r);
6959 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6964 if (DEBUGLEVEL >= 10) {
6965 NDR_PRINT_IN_DEBUG(spoolss_5a, r);
6968 r->out.result = _spoolss_5a(p, r);
6970 if (p->rng_fault_state) {
6972 /* Return true here, srv_pipe_hnd.c will take care */
6976 if (DEBUGLEVEL >= 10) {
6977 NDR_PRINT_OUT_DEBUG(spoolss_5a, r);
6980 push = ndr_push_init_ctx(r, NULL);
6986 ndr_err = call->ndr_push(push, NDR_OUT, r);
6987 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
6992 blob = ndr_push_blob(push);
6993 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7003 static bool api_spoolss_5b(pipes_struct *p)
7005 const struct ndr_interface_call *call;
7006 struct ndr_pull *pull;
7007 struct ndr_push *push;
7008 enum ndr_err_code ndr_err;
7010 struct spoolss_5b *r;
7012 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5B];
7014 r = talloc(talloc_tos(), struct spoolss_5b);
7019 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7024 pull = ndr_pull_init_blob(&blob, r, NULL);
7030 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7031 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7032 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7037 if (DEBUGLEVEL >= 10) {
7038 NDR_PRINT_IN_DEBUG(spoolss_5b, r);
7041 r->out.result = _spoolss_5b(p, r);
7043 if (p->rng_fault_state) {
7045 /* Return true here, srv_pipe_hnd.c will take care */
7049 if (DEBUGLEVEL >= 10) {
7050 NDR_PRINT_OUT_DEBUG(spoolss_5b, r);
7053 push = ndr_push_init_ctx(r, NULL);
7059 ndr_err = call->ndr_push(push, NDR_OUT, r);
7060 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7065 blob = ndr_push_blob(push);
7066 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7076 static bool api_spoolss_5c(pipes_struct *p)
7078 const struct ndr_interface_call *call;
7079 struct ndr_pull *pull;
7080 struct ndr_push *push;
7081 enum ndr_err_code ndr_err;
7083 struct spoolss_5c *r;
7085 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5C];
7087 r = talloc(talloc_tos(), struct spoolss_5c);
7092 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7097 pull = ndr_pull_init_blob(&blob, r, NULL);
7103 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7104 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7105 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7110 if (DEBUGLEVEL >= 10) {
7111 NDR_PRINT_IN_DEBUG(spoolss_5c, r);
7114 r->out.result = _spoolss_5c(p, r);
7116 if (p->rng_fault_state) {
7118 /* Return true here, srv_pipe_hnd.c will take care */
7122 if (DEBUGLEVEL >= 10) {
7123 NDR_PRINT_OUT_DEBUG(spoolss_5c, r);
7126 push = ndr_push_init_ctx(r, NULL);
7132 ndr_err = call->ndr_push(push, NDR_OUT, r);
7133 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7138 blob = ndr_push_blob(push);
7139 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7149 static bool api_spoolss_5d(pipes_struct *p)
7151 const struct ndr_interface_call *call;
7152 struct ndr_pull *pull;
7153 struct ndr_push *push;
7154 enum ndr_err_code ndr_err;
7156 struct spoolss_5d *r;
7158 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5D];
7160 r = talloc(talloc_tos(), struct spoolss_5d);
7165 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7170 pull = ndr_pull_init_blob(&blob, r, NULL);
7176 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7177 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7178 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7183 if (DEBUGLEVEL >= 10) {
7184 NDR_PRINT_IN_DEBUG(spoolss_5d, r);
7187 r->out.result = _spoolss_5d(p, r);
7189 if (p->rng_fault_state) {
7191 /* Return true here, srv_pipe_hnd.c will take care */
7195 if (DEBUGLEVEL >= 10) {
7196 NDR_PRINT_OUT_DEBUG(spoolss_5d, r);
7199 push = ndr_push_init_ctx(r, NULL);
7205 ndr_err = call->ndr_push(push, NDR_OUT, r);
7206 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7211 blob = ndr_push_blob(push);
7212 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7222 static bool api_spoolss_5e(pipes_struct *p)
7224 const struct ndr_interface_call *call;
7225 struct ndr_pull *pull;
7226 struct ndr_push *push;
7227 enum ndr_err_code ndr_err;
7229 struct spoolss_5e *r;
7231 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5E];
7233 r = talloc(talloc_tos(), struct spoolss_5e);
7238 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7243 pull = ndr_pull_init_blob(&blob, r, NULL);
7249 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7250 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7251 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7256 if (DEBUGLEVEL >= 10) {
7257 NDR_PRINT_IN_DEBUG(spoolss_5e, r);
7260 r->out.result = _spoolss_5e(p, r);
7262 if (p->rng_fault_state) {
7264 /* Return true here, srv_pipe_hnd.c will take care */
7268 if (DEBUGLEVEL >= 10) {
7269 NDR_PRINT_OUT_DEBUG(spoolss_5e, r);
7272 push = ndr_push_init_ctx(r, NULL);
7278 ndr_err = call->ndr_push(push, NDR_OUT, r);
7279 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7284 blob = ndr_push_blob(push);
7285 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7295 static bool api_spoolss_5f(pipes_struct *p)
7297 const struct ndr_interface_call *call;
7298 struct ndr_pull *pull;
7299 struct ndr_push *push;
7300 enum ndr_err_code ndr_err;
7302 struct spoolss_5f *r;
7304 call = &ndr_table_spoolss.calls[NDR_SPOOLSS_5F];
7306 r = talloc(talloc_tos(), struct spoolss_5f);
7311 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
7316 pull = ndr_pull_init_blob(&blob, r, NULL);
7322 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
7323 ndr_err = call->ndr_pull(pull, NDR_IN, r);
7324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7329 if (DEBUGLEVEL >= 10) {
7330 NDR_PRINT_IN_DEBUG(spoolss_5f, r);
7333 r->out.result = _spoolss_5f(p, r);
7335 if (p->rng_fault_state) {
7337 /* Return true here, srv_pipe_hnd.c will take care */
7341 if (DEBUGLEVEL >= 10) {
7342 NDR_PRINT_OUT_DEBUG(spoolss_5f, r);
7345 push = ndr_push_init_ctx(r, NULL);
7351 ndr_err = call->ndr_push(push, NDR_OUT, r);
7352 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
7357 blob = ndr_push_blob(push);
7358 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
7370 static struct api_struct api_spoolss_cmds[] =
7372 {"SPOOLSS_ENUMPRINTERS", NDR_SPOOLSS_ENUMPRINTERS, api_spoolss_EnumPrinters},
7373 {"SPOOLSS_OPENPRINTER", NDR_SPOOLSS_OPENPRINTER, api_spoolss_OpenPrinter},
7374 {"SPOOLSS_SETJOB", NDR_SPOOLSS_SETJOB, api_spoolss_SetJob},
7375 {"SPOOLSS_GETJOB", NDR_SPOOLSS_GETJOB, api_spoolss_GetJob},
7376 {"SPOOLSS_ENUMJOBS", NDR_SPOOLSS_ENUMJOBS, api_spoolss_EnumJobs},
7377 {"SPOOLSS_ADDPRINTER", NDR_SPOOLSS_ADDPRINTER, api_spoolss_AddPrinter},
7378 {"SPOOLSS_DELETEPRINTER", NDR_SPOOLSS_DELETEPRINTER, api_spoolss_DeletePrinter},
7379 {"SPOOLSS_SETPRINTER", NDR_SPOOLSS_SETPRINTER, api_spoolss_SetPrinter},
7380 {"SPOOLSS_GETPRINTER", NDR_SPOOLSS_GETPRINTER, api_spoolss_GetPrinter},
7381 {"SPOOLSS_ADDPRINTERDRIVER", NDR_SPOOLSS_ADDPRINTERDRIVER, api_spoolss_AddPrinterDriver},
7382 {"SPOOLSS_ENUMPRINTERDRIVERS", NDR_SPOOLSS_ENUMPRINTERDRIVERS, api_spoolss_EnumPrinterDrivers},
7383 {"SPOOLSS_GETPRINTERDRIVER", NDR_SPOOLSS_GETPRINTERDRIVER, api_spoolss_GetPrinterDriver},
7384 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY, api_spoolss_GetPrinterDriverDirectory},
7385 {"SPOOLSS_DELETEPRINTERDRIVER", NDR_SPOOLSS_DELETEPRINTERDRIVER, api_spoolss_DeletePrinterDriver},
7386 {"SPOOLSS_ADDPRINTPROCESSOR", NDR_SPOOLSS_ADDPRINTPROCESSOR, api_spoolss_AddPrintProcessor},
7387 {"SPOOLSS_ENUMPRINTPROCESSORS", NDR_SPOOLSS_ENUMPRINTPROCESSORS, api_spoolss_EnumPrintProcessors},
7388 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY", NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY, api_spoolss_GetPrintProcessorDirectory},
7389 {"SPOOLSS_STARTDOCPRINTER", NDR_SPOOLSS_STARTDOCPRINTER, api_spoolss_StartDocPrinter},
7390 {"SPOOLSS_STARTPAGEPRINTER", NDR_SPOOLSS_STARTPAGEPRINTER, api_spoolss_StartPagePrinter},
7391 {"SPOOLSS_WRITEPRINTER", NDR_SPOOLSS_WRITEPRINTER, api_spoolss_WritePrinter},
7392 {"SPOOLSS_ENDPAGEPRINTER", NDR_SPOOLSS_ENDPAGEPRINTER, api_spoolss_EndPagePrinter},
7393 {"SPOOLSS_ABORTPRINTER", NDR_SPOOLSS_ABORTPRINTER, api_spoolss_AbortPrinter},
7394 {"SPOOLSS_READPRINTER", NDR_SPOOLSS_READPRINTER, api_spoolss_ReadPrinter},
7395 {"SPOOLSS_ENDDOCPRINTER", NDR_SPOOLSS_ENDDOCPRINTER, api_spoolss_EndDocPrinter},
7396 {"SPOOLSS_ADDJOB", NDR_SPOOLSS_ADDJOB, api_spoolss_AddJob},
7397 {"SPOOLSS_SCHEDULEJOB", NDR_SPOOLSS_SCHEDULEJOB, api_spoolss_ScheduleJob},
7398 {"SPOOLSS_GETPRINTERDATA", NDR_SPOOLSS_GETPRINTERDATA, api_spoolss_GetPrinterData},
7399 {"SPOOLSS_SETPRINTERDATA", NDR_SPOOLSS_SETPRINTERDATA, api_spoolss_SetPrinterData},
7400 {"SPOOLSS_WAITFORPRINTERCHANGE", NDR_SPOOLSS_WAITFORPRINTERCHANGE, api_spoolss_WaitForPrinterChange},
7401 {"SPOOLSS_CLOSEPRINTER", NDR_SPOOLSS_CLOSEPRINTER, api_spoolss_ClosePrinter},
7402 {"SPOOLSS_ADDFORM", NDR_SPOOLSS_ADDFORM, api_spoolss_AddForm},
7403 {"SPOOLSS_DELETEFORM", NDR_SPOOLSS_DELETEFORM, api_spoolss_DeleteForm},
7404 {"SPOOLSS_GETFORM", NDR_SPOOLSS_GETFORM, api_spoolss_GetForm},
7405 {"SPOOLSS_SETFORM", NDR_SPOOLSS_SETFORM, api_spoolss_SetForm},
7406 {"SPOOLSS_ENUMFORMS", NDR_SPOOLSS_ENUMFORMS, api_spoolss_EnumForms},
7407 {"SPOOLSS_ENUMPORTS", NDR_SPOOLSS_ENUMPORTS, api_spoolss_EnumPorts},
7408 {"SPOOLSS_ENUMMONITORS", NDR_SPOOLSS_ENUMMONITORS, api_spoolss_EnumMonitors},
7409 {"SPOOLSS_ADDPORT", NDR_SPOOLSS_ADDPORT, api_spoolss_AddPort},
7410 {"SPOOLSS_CONFIGUREPORT", NDR_SPOOLSS_CONFIGUREPORT, api_spoolss_ConfigurePort},
7411 {"SPOOLSS_DELETEPORT", NDR_SPOOLSS_DELETEPORT, api_spoolss_DeletePort},
7412 {"SPOOLSS_CREATEPRINTERIC", NDR_SPOOLSS_CREATEPRINTERIC, api_spoolss_CreatePrinterIC},
7413 {"SPOOLSS_PLAYGDISCRIPTONPRINTERIC", NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC, api_spoolss_PlayGDIScriptOnPrinterIC},
7414 {"SPOOLSS_DELETEPRINTERIC", NDR_SPOOLSS_DELETEPRINTERIC, api_spoolss_DeletePrinterIC},
7415 {"SPOOLSS_ADDPRINTERCONNECTION", NDR_SPOOLSS_ADDPRINTERCONNECTION, api_spoolss_AddPrinterConnection},
7416 {"SPOOLSS_DELETEPRINTERCONNECTION", NDR_SPOOLSS_DELETEPRINTERCONNECTION, api_spoolss_DeletePrinterConnection},
7417 {"SPOOLSS_PRINTERMESSAGEBOX", NDR_SPOOLSS_PRINTERMESSAGEBOX, api_spoolss_PrinterMessageBox},
7418 {"SPOOLSS_ADDMONITOR", NDR_SPOOLSS_ADDMONITOR, api_spoolss_AddMonitor},
7419 {"SPOOLSS_DELETEMONITOR", NDR_SPOOLSS_DELETEMONITOR, api_spoolss_DeleteMonitor},
7420 {"SPOOLSS_DELETEPRINTPROCESSOR", NDR_SPOOLSS_DELETEPRINTPROCESSOR, api_spoolss_DeletePrintProcessor},
7421 {"SPOOLSS_ADDPRINTPROVIDOR", NDR_SPOOLSS_ADDPRINTPROVIDOR, api_spoolss_AddPrintProvidor},
7422 {"SPOOLSS_DELETEPRINTPROVIDOR", NDR_SPOOLSS_DELETEPRINTPROVIDOR, api_spoolss_DeletePrintProvidor},
7423 {"SPOOLSS_ENUMPRINTPROCDATATYPES", NDR_SPOOLSS_ENUMPRINTPROCDATATYPES, api_spoolss_EnumPrintProcDataTypes},
7424 {"SPOOLSS_RESETPRINTER", NDR_SPOOLSS_RESETPRINTER, api_spoolss_ResetPrinter},
7425 {"SPOOLSS_GETPRINTERDRIVER2", NDR_SPOOLSS_GETPRINTERDRIVER2, api_spoolss_GetPrinterDriver2},
7426 {"SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_FindFirstPrinterChangeNotification},
7427 {"SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION, api_spoolss_FindNextPrinterChangeNotification},
7428 {"SPOOLSS_FINDCLOSEPRINTERNOTIFY", NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY, api_spoolss_FindClosePrinterNotify},
7429 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD, api_spoolss_RouterFindFirstPrinterChangeNotificationOld},
7430 {"SPOOLSS_REPLYOPENPRINTER", NDR_SPOOLSS_REPLYOPENPRINTER, api_spoolss_ReplyOpenPrinter},
7431 {"SPOOLSS_ROUTERREPLYPRINTER", NDR_SPOOLSS_ROUTERREPLYPRINTER, api_spoolss_RouterReplyPrinter},
7432 {"SPOOLSS_REPLYCLOSEPRINTER", NDR_SPOOLSS_REPLYCLOSEPRINTER, api_spoolss_ReplyClosePrinter},
7433 {"SPOOLSS_ADDPORTEX", NDR_SPOOLSS_ADDPORTEX, api_spoolss_AddPortEx},
7434 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION, api_spoolss_RouterFindFirstPrinterChangeNotification},
7435 {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT, api_spoolss_SpoolerInit},
7436 {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX, api_spoolss_ResetPrinterEx},
7437 {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx},
7438 {"SPOOLSS_ROUTERREPLYPRINTEREX", NDR_SPOOLSS_ROUTERREPLYPRINTEREX, api_spoolss_RouterReplyPrinterEx},
7439 {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY, api_spoolss_RouterRefreshPrinterChangeNotify},
7440 {"SPOOLSS_44", NDR_SPOOLSS_44, api_spoolss_44},
7441 {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX, api_spoolss_OpenPrinterEx},
7442 {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX, api_spoolss_AddPrinterEx},
7443 {"SPOOLSS_47", NDR_SPOOLSS_47, api_spoolss_47},
7444 {"SPOOLSS_ENUMPRINTERDATA", NDR_SPOOLSS_ENUMPRINTERDATA, api_spoolss_EnumPrinterData},
7445 {"SPOOLSS_DELETEPRINTERDATA", NDR_SPOOLSS_DELETEPRINTERDATA, api_spoolss_DeletePrinterData},
7446 {"SPOOLSS_4A", NDR_SPOOLSS_4A, api_spoolss_4a},
7447 {"SPOOLSS_4B", NDR_SPOOLSS_4B, api_spoolss_4b},
7448 {"SPOOLSS_4C", NDR_SPOOLSS_4C, api_spoolss_4c},
7449 {"SPOOLSS_SETPRINTERDATAEX", NDR_SPOOLSS_SETPRINTERDATAEX, api_spoolss_SetPrinterDataEx},
7450 {"SPOOLSS_GETPRINTERDATAEX", NDR_SPOOLSS_GETPRINTERDATAEX, api_spoolss_GetPrinterDataEx},
7451 {"SPOOLSS_ENUMPRINTERDATAEX", NDR_SPOOLSS_ENUMPRINTERDATAEX, api_spoolss_EnumPrinterDataEx},
7452 {"SPOOLSS_ENUMPRINTERKEY", NDR_SPOOLSS_ENUMPRINTERKEY, api_spoolss_EnumPrinterKey},
7453 {"SPOOLSS_DELETEPRINTERDATAEX", NDR_SPOOLSS_DELETEPRINTERDATAEX, api_spoolss_DeletePrinterDataEx},
7454 {"SPOOLSS_DELETEPRINTERKEY", NDR_SPOOLSS_DELETEPRINTERKEY, api_spoolss_DeletePrinterKey},
7455 {"SPOOLSS_53", NDR_SPOOLSS_53, api_spoolss_53},
7456 {"SPOOLSS_DELETEPRINTERDRIVEREX", NDR_SPOOLSS_DELETEPRINTERDRIVEREX, api_spoolss_DeletePrinterDriverEx},
7457 {"SPOOLSS_55", NDR_SPOOLSS_55, api_spoolss_55},
7458 {"SPOOLSS_56", NDR_SPOOLSS_56, api_spoolss_56},
7459 {"SPOOLSS_57", NDR_SPOOLSS_57, api_spoolss_57},
7460 {"SPOOLSS_XCVDATA", NDR_SPOOLSS_XCVDATA, api_spoolss_XcvData},
7461 {"SPOOLSS_ADDPRINTERDRIVEREX", NDR_SPOOLSS_ADDPRINTERDRIVEREX, api_spoolss_AddPrinterDriverEx},
7462 {"SPOOLSS_5A", NDR_SPOOLSS_5A, api_spoolss_5a},
7463 {"SPOOLSS_5B", NDR_SPOOLSS_5B, api_spoolss_5b},
7464 {"SPOOLSS_5C", NDR_SPOOLSS_5C, api_spoolss_5c},
7465 {"SPOOLSS_5D", NDR_SPOOLSS_5D, api_spoolss_5d},
7466 {"SPOOLSS_5E", NDR_SPOOLSS_5E, api_spoolss_5e},
7467 {"SPOOLSS_5F", NDR_SPOOLSS_5F, api_spoolss_5f},
7470 void spoolss_get_pipe_fns(struct api_struct **fns, int *n_fns)
7472 *fns = api_spoolss_cmds;
7473 *n_fns = sizeof(api_spoolss_cmds) / sizeof(struct api_struct);
7476 NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
7478 if (cli->pipes_struct == NULL) {
7479 return NT_STATUS_INVALID_PARAMETER;
7484 case NDR_SPOOLSS_ENUMPRINTERS: {
7485 struct spoolss_EnumPrinters *r = (struct spoolss_EnumPrinters *)_r;
7486 ZERO_STRUCT(r->out);
7487 r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrinterInfo, r->out.count);
7488 if (r->out.info == NULL) {
7489 return NT_STATUS_NO_MEMORY;
7492 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7493 if (r->out.needed == NULL) {
7494 return NT_STATUS_NO_MEMORY;
7497 r->out.result = _spoolss_EnumPrinters(cli->pipes_struct, r);
7498 return NT_STATUS_OK;
7501 case NDR_SPOOLSS_OPENPRINTER: {
7502 struct spoolss_OpenPrinter *r = (struct spoolss_OpenPrinter *)_r;
7503 ZERO_STRUCT(r->out);
7504 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
7505 if (r->out.handle == NULL) {
7506 return NT_STATUS_NO_MEMORY;
7509 r->out.result = _spoolss_OpenPrinter(cli->pipes_struct, r);
7510 return NT_STATUS_OK;
7513 case NDR_SPOOLSS_SETJOB: {
7514 struct spoolss_SetJob *r = (struct spoolss_SetJob *)_r;
7515 r->out.result = _spoolss_SetJob(cli->pipes_struct, r);
7516 return NT_STATUS_OK;
7519 case NDR_SPOOLSS_GETJOB: {
7520 struct spoolss_GetJob *r = (struct spoolss_GetJob *)_r;
7521 ZERO_STRUCT(r->out);
7522 r->out.info = talloc_zero(mem_ctx, union spoolss_JobInfo);
7523 if (r->out.info == NULL) {
7524 return NT_STATUS_NO_MEMORY;
7527 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7528 if (r->out.needed == NULL) {
7529 return NT_STATUS_NO_MEMORY;
7532 r->out.result = _spoolss_GetJob(cli->pipes_struct, r);
7533 return NT_STATUS_OK;
7536 case NDR_SPOOLSS_ENUMJOBS: {
7537 struct spoolss_EnumJobs *r = (struct spoolss_EnumJobs *)_r;
7538 ZERO_STRUCT(r->out);
7539 r->out.info = talloc_zero_array(mem_ctx, union spoolss_JobInfo, r->out.count);
7540 if (r->out.info == NULL) {
7541 return NT_STATUS_NO_MEMORY;
7544 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7545 if (r->out.needed == NULL) {
7546 return NT_STATUS_NO_MEMORY;
7549 r->out.result = _spoolss_EnumJobs(cli->pipes_struct, r);
7550 return NT_STATUS_OK;
7553 case NDR_SPOOLSS_ADDPRINTER: {
7554 struct spoolss_AddPrinter *r = (struct spoolss_AddPrinter *)_r;
7555 r->out.result = _spoolss_AddPrinter(cli->pipes_struct, r);
7556 return NT_STATUS_OK;
7559 case NDR_SPOOLSS_DELETEPRINTER: {
7560 struct spoolss_DeletePrinter *r = (struct spoolss_DeletePrinter *)_r;
7561 r->out.result = _spoolss_DeletePrinter(cli->pipes_struct, r);
7562 return NT_STATUS_OK;
7565 case NDR_SPOOLSS_SETPRINTER: {
7566 struct spoolss_SetPrinter *r = (struct spoolss_SetPrinter *)_r;
7567 r->out.result = _spoolss_SetPrinter(cli->pipes_struct, r);
7568 return NT_STATUS_OK;
7571 case NDR_SPOOLSS_GETPRINTER: {
7572 struct spoolss_GetPrinter *r = (struct spoolss_GetPrinter *)_r;
7573 ZERO_STRUCT(r->out);
7574 r->out.info = talloc_zero(mem_ctx, union spoolss_PrinterInfo);
7575 if (r->out.info == NULL) {
7576 return NT_STATUS_NO_MEMORY;
7579 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7580 if (r->out.needed == NULL) {
7581 return NT_STATUS_NO_MEMORY;
7584 r->out.result = _spoolss_GetPrinter(cli->pipes_struct, r);
7585 return NT_STATUS_OK;
7588 case NDR_SPOOLSS_ADDPRINTERDRIVER: {
7589 struct spoolss_AddPrinterDriver *r = (struct spoolss_AddPrinterDriver *)_r;
7590 r->out.result = _spoolss_AddPrinterDriver(cli->pipes_struct, r);
7591 return NT_STATUS_OK;
7594 case NDR_SPOOLSS_ENUMPRINTERDRIVERS: {
7595 struct spoolss_EnumPrinterDrivers *r = (struct spoolss_EnumPrinterDrivers *)_r;
7596 ZERO_STRUCT(r->out);
7597 r->out.info = talloc_zero_array(mem_ctx, union spoolss_DriverInfo, r->out.count);
7598 if (r->out.info == NULL) {
7599 return NT_STATUS_NO_MEMORY;
7602 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7603 if (r->out.needed == NULL) {
7604 return NT_STATUS_NO_MEMORY;
7607 r->out.result = _spoolss_EnumPrinterDrivers(cli->pipes_struct, r);
7608 return NT_STATUS_OK;
7611 case NDR_SPOOLSS_GETPRINTERDRIVER: {
7612 struct spoolss_GetPrinterDriver *r = (struct spoolss_GetPrinterDriver *)_r;
7613 r->out.result = _spoolss_GetPrinterDriver(cli->pipes_struct, r);
7614 return NT_STATUS_OK;
7617 case NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY: {
7618 struct spoolss_GetPrinterDriverDirectory *r = (struct spoolss_GetPrinterDriverDirectory *)_r;
7619 ZERO_STRUCT(r->out);
7620 r->out.info = talloc_zero(mem_ctx, union spoolss_DriverDirectoryInfo);
7621 if (r->out.info == NULL) {
7622 return NT_STATUS_NO_MEMORY;
7625 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7626 if (r->out.needed == NULL) {
7627 return NT_STATUS_NO_MEMORY;
7630 r->out.result = _spoolss_GetPrinterDriverDirectory(cli->pipes_struct, r);
7631 return NT_STATUS_OK;
7634 case NDR_SPOOLSS_DELETEPRINTERDRIVER: {
7635 struct spoolss_DeletePrinterDriver *r = (struct spoolss_DeletePrinterDriver *)_r;
7636 r->out.result = _spoolss_DeletePrinterDriver(cli->pipes_struct, r);
7637 return NT_STATUS_OK;
7640 case NDR_SPOOLSS_ADDPRINTPROCESSOR: {
7641 struct spoolss_AddPrintProcessor *r = (struct spoolss_AddPrintProcessor *)_r;
7642 r->out.result = _spoolss_AddPrintProcessor(cli->pipes_struct, r);
7643 return NT_STATUS_OK;
7646 case NDR_SPOOLSS_ENUMPRINTPROCESSORS: {
7647 struct spoolss_EnumPrintProcessors *r = (struct spoolss_EnumPrintProcessors *)_r;
7648 ZERO_STRUCT(r->out);
7649 r->out.info = talloc_zero_array(mem_ctx, union spoolss_PrintProcessorInfo, r->out.count);
7650 if (r->out.info == NULL) {
7651 return NT_STATUS_NO_MEMORY;
7654 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7655 if (r->out.needed == NULL) {
7656 return NT_STATUS_NO_MEMORY;
7659 r->out.result = _spoolss_EnumPrintProcessors(cli->pipes_struct, r);
7660 return NT_STATUS_OK;
7663 case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY: {
7664 struct spoolss_GetPrintProcessorDirectory *r = (struct spoolss_GetPrintProcessorDirectory *)_r;
7665 r->out.result = _spoolss_GetPrintProcessorDirectory(cli->pipes_struct, r);
7666 return NT_STATUS_OK;
7669 case NDR_SPOOLSS_STARTDOCPRINTER: {
7670 struct spoolss_StartDocPrinter *r = (struct spoolss_StartDocPrinter *)_r;
7671 ZERO_STRUCT(r->out);
7672 r->out.job_id = talloc_zero(mem_ctx, uint32_t);
7673 if (r->out.job_id == NULL) {
7674 return NT_STATUS_NO_MEMORY;
7677 r->out.result = _spoolss_StartDocPrinter(cli->pipes_struct, r);
7678 return NT_STATUS_OK;
7681 case NDR_SPOOLSS_STARTPAGEPRINTER: {
7682 struct spoolss_StartPagePrinter *r = (struct spoolss_StartPagePrinter *)_r;
7683 r->out.result = _spoolss_StartPagePrinter(cli->pipes_struct, r);
7684 return NT_STATUS_OK;
7687 case NDR_SPOOLSS_WRITEPRINTER: {
7688 struct spoolss_WritePrinter *r = (struct spoolss_WritePrinter *)_r;
7689 ZERO_STRUCT(r->out);
7690 r->out.num_written = talloc_zero(mem_ctx, uint32_t);
7691 if (r->out.num_written == NULL) {
7692 return NT_STATUS_NO_MEMORY;
7695 r->out.result = _spoolss_WritePrinter(cli->pipes_struct, r);
7696 return NT_STATUS_OK;
7699 case NDR_SPOOLSS_ENDPAGEPRINTER: {
7700 struct spoolss_EndPagePrinter *r = (struct spoolss_EndPagePrinter *)_r;
7701 r->out.result = _spoolss_EndPagePrinter(cli->pipes_struct, r);
7702 return NT_STATUS_OK;
7705 case NDR_SPOOLSS_ABORTPRINTER: {
7706 struct spoolss_AbortPrinter *r = (struct spoolss_AbortPrinter *)_r;
7707 r->out.result = _spoolss_AbortPrinter(cli->pipes_struct, r);
7708 return NT_STATUS_OK;
7711 case NDR_SPOOLSS_READPRINTER: {
7712 struct spoolss_ReadPrinter *r = (struct spoolss_ReadPrinter *)_r;
7713 ZERO_STRUCT(r->out);
7714 r->out.data = talloc_zero_array(mem_ctx, uint8_t, r->in.data_size);
7715 if (r->out.data == NULL) {
7716 return NT_STATUS_NO_MEMORY;
7719 r->out._data_size = talloc_zero(mem_ctx, uint32_t);
7720 if (r->out._data_size == NULL) {
7721 return NT_STATUS_NO_MEMORY;
7724 r->out.result = _spoolss_ReadPrinter(cli->pipes_struct, r);
7725 return NT_STATUS_OK;
7728 case NDR_SPOOLSS_ENDDOCPRINTER: {
7729 struct spoolss_EndDocPrinter *r = (struct spoolss_EndDocPrinter *)_r;
7730 r->out.result = _spoolss_EndDocPrinter(cli->pipes_struct, r);
7731 return NT_STATUS_OK;
7734 case NDR_SPOOLSS_ADDJOB: {
7735 struct spoolss_AddJob *r = (struct spoolss_AddJob *)_r;
7736 ZERO_STRUCT(r->out);
7737 r->out.buffer = r->in.buffer;
7738 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7739 if (r->out.needed == NULL) {
7740 return NT_STATUS_NO_MEMORY;
7743 r->out.result = _spoolss_AddJob(cli->pipes_struct, r);
7744 return NT_STATUS_OK;
7747 case NDR_SPOOLSS_SCHEDULEJOB: {
7748 struct spoolss_ScheduleJob *r = (struct spoolss_ScheduleJob *)_r;
7749 r->out.result = _spoolss_ScheduleJob(cli->pipes_struct, r);
7750 return NT_STATUS_OK;
7753 case NDR_SPOOLSS_GETPRINTERDATA: {
7754 struct spoolss_GetPrinterData *r = (struct spoolss_GetPrinterData *)_r;
7755 ZERO_STRUCT(r->out);
7756 r->out.type = talloc_zero(mem_ctx, enum spoolss_PrinterDataType);
7757 if (r->out.type == NULL) {
7758 return NT_STATUS_NO_MEMORY;
7761 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7762 if (r->out.needed == NULL) {
7763 return NT_STATUS_NO_MEMORY;
7766 r->out.result = _spoolss_GetPrinterData(cli->pipes_struct, r);
7767 return NT_STATUS_OK;
7770 case NDR_SPOOLSS_SETPRINTERDATA: {
7771 struct spoolss_SetPrinterData *r = (struct spoolss_SetPrinterData *)_r;
7772 r->out.result = _spoolss_SetPrinterData(cli->pipes_struct, r);
7773 return NT_STATUS_OK;
7776 case NDR_SPOOLSS_WAITFORPRINTERCHANGE: {
7777 struct spoolss_WaitForPrinterChange *r = (struct spoolss_WaitForPrinterChange *)_r;
7778 r->out.result = _spoolss_WaitForPrinterChange(cli->pipes_struct, r);
7779 return NT_STATUS_OK;
7782 case NDR_SPOOLSS_CLOSEPRINTER: {
7783 struct spoolss_ClosePrinter *r = (struct spoolss_ClosePrinter *)_r;
7784 ZERO_STRUCT(r->out);
7785 r->out.handle = r->in.handle;
7786 r->out.result = _spoolss_ClosePrinter(cli->pipes_struct, r);
7787 return NT_STATUS_OK;
7790 case NDR_SPOOLSS_ADDFORM: {
7791 struct spoolss_AddForm *r = (struct spoolss_AddForm *)_r;
7792 r->out.result = _spoolss_AddForm(cli->pipes_struct, r);
7793 return NT_STATUS_OK;
7796 case NDR_SPOOLSS_DELETEFORM: {
7797 struct spoolss_DeleteForm *r = (struct spoolss_DeleteForm *)_r;
7798 r->out.result = _spoolss_DeleteForm(cli->pipes_struct, r);
7799 return NT_STATUS_OK;
7802 case NDR_SPOOLSS_GETFORM: {
7803 struct spoolss_GetForm *r = (struct spoolss_GetForm *)_r;
7804 ZERO_STRUCT(r->out);
7805 r->out.info = talloc_zero(mem_ctx, union spoolss_FormInfo);
7806 if (r->out.info == NULL) {
7807 return NT_STATUS_NO_MEMORY;
7810 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7811 if (r->out.needed == NULL) {
7812 return NT_STATUS_NO_MEMORY;
7815 r->out.result = _spoolss_GetForm(cli->pipes_struct, r);
7816 return NT_STATUS_OK;
7819 case NDR_SPOOLSS_SETFORM: {
7820 struct spoolss_SetForm *r = (struct spoolss_SetForm *)_r;
7821 r->out.result = _spoolss_SetForm(cli->pipes_struct, r);
7822 return NT_STATUS_OK;
7825 case NDR_SPOOLSS_ENUMFORMS: {
7826 struct spoolss_EnumForms *r = (struct spoolss_EnumForms *)_r;
7827 ZERO_STRUCT(r->out);
7828 r->out.info = talloc_zero_array(mem_ctx, union spoolss_FormInfo, r->out.count);
7829 if (r->out.info == NULL) {
7830 return NT_STATUS_NO_MEMORY;
7833 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7834 if (r->out.needed == NULL) {
7835 return NT_STATUS_NO_MEMORY;
7838 r->out.result = _spoolss_EnumForms(cli->pipes_struct, r);
7839 return NT_STATUS_OK;
7842 case NDR_SPOOLSS_ENUMPORTS: {
7843 struct spoolss_EnumPorts *r = (struct spoolss_EnumPorts *)_r;
7844 ZERO_STRUCT(r->out);
7845 r->out.info = talloc_zero_array(mem_ctx, union spoolss_PortInfo, r->out.count);
7846 if (r->out.info == NULL) {
7847 return NT_STATUS_NO_MEMORY;
7850 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7851 if (r->out.needed == NULL) {
7852 return NT_STATUS_NO_MEMORY;
7855 r->out.result = _spoolss_EnumPorts(cli->pipes_struct, r);
7856 return NT_STATUS_OK;
7859 case NDR_SPOOLSS_ENUMMONITORS: {
7860 struct spoolss_EnumMonitors *r = (struct spoolss_EnumMonitors *)_r;
7861 ZERO_STRUCT(r->out);
7862 r->out.info = talloc_zero_array(mem_ctx, union spoolss_MonitorInfo, r->out.count);
7863 if (r->out.info == NULL) {
7864 return NT_STATUS_NO_MEMORY;
7867 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7868 if (r->out.needed == NULL) {
7869 return NT_STATUS_NO_MEMORY;
7872 r->out.result = _spoolss_EnumMonitors(cli->pipes_struct, r);
7873 return NT_STATUS_OK;
7876 case NDR_SPOOLSS_ADDPORT: {
7877 struct spoolss_AddPort *r = (struct spoolss_AddPort *)_r;
7878 r->out.result = _spoolss_AddPort(cli->pipes_struct, r);
7879 return NT_STATUS_OK;
7882 case NDR_SPOOLSS_CONFIGUREPORT: {
7883 struct spoolss_ConfigurePort *r = (struct spoolss_ConfigurePort *)_r;
7884 r->out.result = _spoolss_ConfigurePort(cli->pipes_struct, r);
7885 return NT_STATUS_OK;
7888 case NDR_SPOOLSS_DELETEPORT: {
7889 struct spoolss_DeletePort *r = (struct spoolss_DeletePort *)_r;
7890 r->out.result = _spoolss_DeletePort(cli->pipes_struct, r);
7891 return NT_STATUS_OK;
7894 case NDR_SPOOLSS_CREATEPRINTERIC: {
7895 struct spoolss_CreatePrinterIC *r = (struct spoolss_CreatePrinterIC *)_r;
7896 r->out.result = _spoolss_CreatePrinterIC(cli->pipes_struct, r);
7897 return NT_STATUS_OK;
7900 case NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC: {
7901 struct spoolss_PlayGDIScriptOnPrinterIC *r = (struct spoolss_PlayGDIScriptOnPrinterIC *)_r;
7902 r->out.result = _spoolss_PlayGDIScriptOnPrinterIC(cli->pipes_struct, r);
7903 return NT_STATUS_OK;
7906 case NDR_SPOOLSS_DELETEPRINTERIC: {
7907 struct spoolss_DeletePrinterIC *r = (struct spoolss_DeletePrinterIC *)_r;
7908 r->out.result = _spoolss_DeletePrinterIC(cli->pipes_struct, r);
7909 return NT_STATUS_OK;
7912 case NDR_SPOOLSS_ADDPRINTERCONNECTION: {
7913 struct spoolss_AddPrinterConnection *r = (struct spoolss_AddPrinterConnection *)_r;
7914 r->out.result = _spoolss_AddPrinterConnection(cli->pipes_struct, r);
7915 return NT_STATUS_OK;
7918 case NDR_SPOOLSS_DELETEPRINTERCONNECTION: {
7919 struct spoolss_DeletePrinterConnection *r = (struct spoolss_DeletePrinterConnection *)_r;
7920 r->out.result = _spoolss_DeletePrinterConnection(cli->pipes_struct, r);
7921 return NT_STATUS_OK;
7924 case NDR_SPOOLSS_PRINTERMESSAGEBOX: {
7925 struct spoolss_PrinterMessageBox *r = (struct spoolss_PrinterMessageBox *)_r;
7926 r->out.result = _spoolss_PrinterMessageBox(cli->pipes_struct, r);
7927 return NT_STATUS_OK;
7930 case NDR_SPOOLSS_ADDMONITOR: {
7931 struct spoolss_AddMonitor *r = (struct spoolss_AddMonitor *)_r;
7932 r->out.result = _spoolss_AddMonitor(cli->pipes_struct, r);
7933 return NT_STATUS_OK;
7936 case NDR_SPOOLSS_DELETEMONITOR: {
7937 struct spoolss_DeleteMonitor *r = (struct spoolss_DeleteMonitor *)_r;
7938 r->out.result = _spoolss_DeleteMonitor(cli->pipes_struct, r);
7939 return NT_STATUS_OK;
7942 case NDR_SPOOLSS_DELETEPRINTPROCESSOR: {
7943 struct spoolss_DeletePrintProcessor *r = (struct spoolss_DeletePrintProcessor *)_r;
7944 r->out.result = _spoolss_DeletePrintProcessor(cli->pipes_struct, r);
7945 return NT_STATUS_OK;
7948 case NDR_SPOOLSS_ADDPRINTPROVIDOR: {
7949 struct spoolss_AddPrintProvidor *r = (struct spoolss_AddPrintProvidor *)_r;
7950 r->out.result = _spoolss_AddPrintProvidor(cli->pipes_struct, r);
7951 return NT_STATUS_OK;
7954 case NDR_SPOOLSS_DELETEPRINTPROVIDOR: {
7955 struct spoolss_DeletePrintProvidor *r = (struct spoolss_DeletePrintProvidor *)_r;
7956 r->out.result = _spoolss_DeletePrintProvidor(cli->pipes_struct, r);
7957 return NT_STATUS_OK;
7960 case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES: {
7961 struct spoolss_EnumPrintProcDataTypes *r = (struct spoolss_EnumPrintProcDataTypes *)_r;
7962 r->out.result = _spoolss_EnumPrintProcDataTypes(cli->pipes_struct, r);
7963 return NT_STATUS_OK;
7966 case NDR_SPOOLSS_RESETPRINTER: {
7967 struct spoolss_ResetPrinter *r = (struct spoolss_ResetPrinter *)_r;
7968 r->out.result = _spoolss_ResetPrinter(cli->pipes_struct, r);
7969 return NT_STATUS_OK;
7972 case NDR_SPOOLSS_GETPRINTERDRIVER2: {
7973 struct spoolss_GetPrinterDriver2 *r = (struct spoolss_GetPrinterDriver2 *)_r;
7974 ZERO_STRUCT(r->out);
7975 r->out.info = talloc_zero(mem_ctx, DATA_BLOB);
7976 if (r->out.info == NULL) {
7977 return NT_STATUS_NO_MEMORY;
7980 r->out.needed = talloc_zero(mem_ctx, uint32_t);
7981 if (r->out.needed == NULL) {
7982 return NT_STATUS_NO_MEMORY;
7985 r->out.server_major_version = talloc_zero(mem_ctx, uint32_t);
7986 if (r->out.server_major_version == NULL) {
7987 return NT_STATUS_NO_MEMORY;
7990 r->out.server_minor_version = talloc_zero(mem_ctx, uint32_t);
7991 if (r->out.server_minor_version == NULL) {
7992 return NT_STATUS_NO_MEMORY;
7995 r->out.result = _spoolss_GetPrinterDriver2(cli->pipes_struct, r);
7996 return NT_STATUS_OK;
7999 case NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION: {
8000 struct spoolss_FindFirstPrinterChangeNotification *r = (struct spoolss_FindFirstPrinterChangeNotification *)_r;
8001 r->out.result = _spoolss_FindFirstPrinterChangeNotification(cli->pipes_struct, r);
8002 return NT_STATUS_OK;
8005 case NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION: {
8006 struct spoolss_FindNextPrinterChangeNotification *r = (struct spoolss_FindNextPrinterChangeNotification *)_r;
8007 r->out.result = _spoolss_FindNextPrinterChangeNotification(cli->pipes_struct, r);
8008 return NT_STATUS_OK;
8011 case NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY: {
8012 struct spoolss_FindClosePrinterNotify *r = (struct spoolss_FindClosePrinterNotify *)_r;
8013 r->out.result = _spoolss_FindClosePrinterNotify(cli->pipes_struct, r);
8014 return NT_STATUS_OK;
8017 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD: {
8018 struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r = (struct spoolss_RouterFindFirstPrinterChangeNotificationOld *)_r;
8019 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotificationOld(cli->pipes_struct, r);
8020 return NT_STATUS_OK;
8023 case NDR_SPOOLSS_REPLYOPENPRINTER: {
8024 struct spoolss_ReplyOpenPrinter *r = (struct spoolss_ReplyOpenPrinter *)_r;
8025 ZERO_STRUCT(r->out);
8026 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8027 if (r->out.handle == NULL) {
8028 return NT_STATUS_NO_MEMORY;
8031 r->out.result = _spoolss_ReplyOpenPrinter(cli->pipes_struct, r);
8032 return NT_STATUS_OK;
8035 case NDR_SPOOLSS_ROUTERREPLYPRINTER: {
8036 struct spoolss_RouterReplyPrinter *r = (struct spoolss_RouterReplyPrinter *)_r;
8037 r->out.result = _spoolss_RouterReplyPrinter(cli->pipes_struct, r);
8038 return NT_STATUS_OK;
8041 case NDR_SPOOLSS_REPLYCLOSEPRINTER: {
8042 struct spoolss_ReplyClosePrinter *r = (struct spoolss_ReplyClosePrinter *)_r;
8043 ZERO_STRUCT(r->out);
8044 r->out.handle = r->in.handle;
8045 r->out.result = _spoolss_ReplyClosePrinter(cli->pipes_struct, r);
8046 return NT_STATUS_OK;
8049 case NDR_SPOOLSS_ADDPORTEX: {
8050 struct spoolss_AddPortEx *r = (struct spoolss_AddPortEx *)_r;
8051 r->out.result = _spoolss_AddPortEx(cli->pipes_struct, r);
8052 return NT_STATUS_OK;
8055 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION: {
8056 struct spoolss_RouterFindFirstPrinterChangeNotification *r = (struct spoolss_RouterFindFirstPrinterChangeNotification *)_r;
8057 r->out.result = _spoolss_RouterFindFirstPrinterChangeNotification(cli->pipes_struct, r);
8058 return NT_STATUS_OK;
8061 case NDR_SPOOLSS_SPOOLERINIT: {
8062 struct spoolss_SpoolerInit *r = (struct spoolss_SpoolerInit *)_r;
8063 r->out.result = _spoolss_SpoolerInit(cli->pipes_struct, r);
8064 return NT_STATUS_OK;
8067 case NDR_SPOOLSS_RESETPRINTEREX: {
8068 struct spoolss_ResetPrinterEx *r = (struct spoolss_ResetPrinterEx *)_r;
8069 r->out.result = _spoolss_ResetPrinterEx(cli->pipes_struct, r);
8070 return NT_STATUS_OK;
8073 case NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX: {
8074 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r = (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *)_r;
8075 r->out.result = _spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli->pipes_struct, r);
8076 return NT_STATUS_OK;
8079 case NDR_SPOOLSS_ROUTERREPLYPRINTEREX: {
8080 struct spoolss_RouterReplyPrinterEx *r = (struct spoolss_RouterReplyPrinterEx *)_r;
8081 ZERO_STRUCT(r->out);
8082 r->out.reply_result = talloc_zero(mem_ctx, uint32_t);
8083 if (r->out.reply_result == NULL) {
8084 return NT_STATUS_NO_MEMORY;
8087 r->out.result = _spoolss_RouterReplyPrinterEx(cli->pipes_struct, r);
8088 return NT_STATUS_OK;
8091 case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY: {
8092 struct spoolss_RouterRefreshPrinterChangeNotify *r = (struct spoolss_RouterRefreshPrinterChangeNotify *)_r;
8093 ZERO_STRUCT(r->out);
8094 r->out.info = talloc_zero(mem_ctx, struct spoolss_NotifyInfo *);
8095 if (r->out.info == NULL) {
8096 return NT_STATUS_NO_MEMORY;
8099 r->out.result = _spoolss_RouterRefreshPrinterChangeNotify(cli->pipes_struct, r);
8100 return NT_STATUS_OK;
8103 case NDR_SPOOLSS_44: {
8104 struct spoolss_44 *r = (struct spoolss_44 *)_r;
8105 r->out.result = _spoolss_44(cli->pipes_struct, r);
8106 return NT_STATUS_OK;
8109 case NDR_SPOOLSS_OPENPRINTEREX: {
8110 struct spoolss_OpenPrinterEx *r = (struct spoolss_OpenPrinterEx *)_r;
8111 ZERO_STRUCT(r->out);
8112 r->out.handle = talloc_zero(mem_ctx, struct policy_handle);
8113 if (r->out.handle == NULL) {
8114 return NT_STATUS_NO_MEMORY;
8117 r->out.result = _spoolss_OpenPrinterEx(cli->pipes_struct, r);
8118 return NT_STATUS_OK;
8121 case NDR_SPOOLSS_ADDPRINTEREX: {
8122 struct spoolss_AddPrinterEx *r = (struct spoolss_AddPrinterEx *)_r;
8123 r->out.result = _spoolss_AddPrinterEx(cli->pipes_struct, r);
8124 return NT_STATUS_OK;
8127 case NDR_SPOOLSS_47: {
8128 struct spoolss_47 *r = (struct spoolss_47 *)_r;
8129 r->out.result = _spoolss_47(cli->pipes_struct, r);
8130 return NT_STATUS_OK;
8133 case NDR_SPOOLSS_ENUMPRINTERDATA: {
8134 struct spoolss_EnumPrinterData *r = (struct spoolss_EnumPrinterData *)_r;
8135 ZERO_STRUCT(r->out);
8136 r->out.value_name = talloc_zero_array(mem_ctx, const char, r->in.value_offered / 2);
8137 if (r->out.value_name == NULL) {
8138 return NT_STATUS_NO_MEMORY;
8141 r->out.value_needed = talloc_zero(mem_ctx, uint32_t);
8142 if (r->out.value_needed == NULL) {
8143 return NT_STATUS_NO_MEMORY;
8146 r->out.printerdata_type = talloc_zero(mem_ctx, uint32_t);
8147 if (r->out.printerdata_type == NULL) {
8148 return NT_STATUS_NO_MEMORY;
8151 r->out.buffer = talloc_zero(mem_ctx, DATA_BLOB);
8152 if (r->out.buffer == NULL) {
8153 return NT_STATUS_NO_MEMORY;
8156 r->out.data_needed = talloc_zero(mem_ctx, uint32_t);
8157 if (r->out.data_needed == NULL) {
8158 return NT_STATUS_NO_MEMORY;
8161 r->out.result = _spoolss_EnumPrinterData(cli->pipes_struct, r);
8162 return NT_STATUS_OK;
8165 case NDR_SPOOLSS_DELETEPRINTERDATA: {
8166 struct spoolss_DeletePrinterData *r = (struct spoolss_DeletePrinterData *)_r;
8167 r->out.result = _spoolss_DeletePrinterData(cli->pipes_struct, r);
8168 return NT_STATUS_OK;
8171 case NDR_SPOOLSS_4A: {
8172 struct spoolss_4a *r = (struct spoolss_4a *)_r;
8173 r->out.result = _spoolss_4a(cli->pipes_struct, r);
8174 return NT_STATUS_OK;
8177 case NDR_SPOOLSS_4B: {
8178 struct spoolss_4b *r = (struct spoolss_4b *)_r;
8179 r->out.result = _spoolss_4b(cli->pipes_struct, r);
8180 return NT_STATUS_OK;
8183 case NDR_SPOOLSS_4C: {
8184 struct spoolss_4c *r = (struct spoolss_4c *)_r;
8185 r->out.result = _spoolss_4c(cli->pipes_struct, r);
8186 return NT_STATUS_OK;
8189 case NDR_SPOOLSS_SETPRINTERDATAEX: {
8190 struct spoolss_SetPrinterDataEx *r = (struct spoolss_SetPrinterDataEx *)_r;
8191 r->out.result = _spoolss_SetPrinterDataEx(cli->pipes_struct, r);
8192 return NT_STATUS_OK;
8195 case NDR_SPOOLSS_GETPRINTERDATAEX: {
8196 struct spoolss_GetPrinterDataEx *r = (struct spoolss_GetPrinterDataEx *)_r;
8197 ZERO_STRUCT(r->out);
8198 r->out.type = talloc_zero(mem_ctx, uint32_t);
8199 if (r->out.type == NULL) {
8200 return NT_STATUS_NO_MEMORY;
8203 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
8204 if (r->out.buffer == NULL) {
8205 return NT_STATUS_NO_MEMORY;
8208 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8209 if (r->out.needed == NULL) {
8210 return NT_STATUS_NO_MEMORY;
8213 r->out.result = _spoolss_GetPrinterDataEx(cli->pipes_struct, r);
8214 return NT_STATUS_OK;
8217 case NDR_SPOOLSS_ENUMPRINTERDATAEX: {
8218 struct spoolss_EnumPrinterDataEx *r = (struct spoolss_EnumPrinterDataEx *)_r;
8219 ZERO_STRUCT(r->out);
8220 r->out.buffer = talloc_zero_array(mem_ctx, uint8_t, r->in.offered);
8221 if (r->out.buffer == NULL) {
8222 return NT_STATUS_NO_MEMORY;
8225 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8226 if (r->out.needed == NULL) {
8227 return NT_STATUS_NO_MEMORY;
8230 r->out.count = talloc_zero(mem_ctx, uint32_t);
8231 if (r->out.count == NULL) {
8232 return NT_STATUS_NO_MEMORY;
8235 r->out.result = _spoolss_EnumPrinterDataEx(cli->pipes_struct, r);
8236 return NT_STATUS_OK;
8239 case NDR_SPOOLSS_ENUMPRINTERKEY: {
8240 struct spoolss_EnumPrinterKey *r = (struct spoolss_EnumPrinterKey *)_r;
8241 ZERO_STRUCT(r->out);
8242 r->out.key_buffer = talloc_zero_array(mem_ctx, uint16_t, r->in.key_buffer_size / 2);
8243 if (r->out.key_buffer == NULL) {
8244 return NT_STATUS_NO_MEMORY;
8247 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8248 if (r->out.needed == NULL) {
8249 return NT_STATUS_NO_MEMORY;
8252 r->out.result = _spoolss_EnumPrinterKey(cli->pipes_struct, r);
8253 return NT_STATUS_OK;
8256 case NDR_SPOOLSS_DELETEPRINTERDATAEX: {
8257 struct spoolss_DeletePrinterDataEx *r = (struct spoolss_DeletePrinterDataEx *)_r;
8258 r->out.result = _spoolss_DeletePrinterDataEx(cli->pipes_struct, r);
8259 return NT_STATUS_OK;
8262 case NDR_SPOOLSS_DELETEPRINTERKEY: {
8263 struct spoolss_DeletePrinterKey *r = (struct spoolss_DeletePrinterKey *)_r;
8264 r->out.result = _spoolss_DeletePrinterKey(cli->pipes_struct, r);
8265 return NT_STATUS_OK;
8268 case NDR_SPOOLSS_53: {
8269 struct spoolss_53 *r = (struct spoolss_53 *)_r;
8270 r->out.result = _spoolss_53(cli->pipes_struct, r);
8271 return NT_STATUS_OK;
8274 case NDR_SPOOLSS_DELETEPRINTERDRIVEREX: {
8275 struct spoolss_DeletePrinterDriverEx *r = (struct spoolss_DeletePrinterDriverEx *)_r;
8276 r->out.result = _spoolss_DeletePrinterDriverEx(cli->pipes_struct, r);
8277 return NT_STATUS_OK;
8280 case NDR_SPOOLSS_55: {
8281 struct spoolss_55 *r = (struct spoolss_55 *)_r;
8282 r->out.result = _spoolss_55(cli->pipes_struct, r);
8283 return NT_STATUS_OK;
8286 case NDR_SPOOLSS_56: {
8287 struct spoolss_56 *r = (struct spoolss_56 *)_r;
8288 r->out.result = _spoolss_56(cli->pipes_struct, r);
8289 return NT_STATUS_OK;
8292 case NDR_SPOOLSS_57: {
8293 struct spoolss_57 *r = (struct spoolss_57 *)_r;
8294 r->out.result = _spoolss_57(cli->pipes_struct, r);
8295 return NT_STATUS_OK;
8298 case NDR_SPOOLSS_XCVDATA: {
8299 struct spoolss_XcvData *r = (struct spoolss_XcvData *)_r;
8300 ZERO_STRUCT(r->out);
8301 r->out.status_code = r->in.status_code;
8302 r->out.out_data = talloc_zero_array(mem_ctx, uint8_t, r->in.out_data_size);
8303 if (r->out.out_data == NULL) {
8304 return NT_STATUS_NO_MEMORY;
8307 r->out.needed = talloc_zero(mem_ctx, uint32_t);
8308 if (r->out.needed == NULL) {
8309 return NT_STATUS_NO_MEMORY;
8312 r->out.result = _spoolss_XcvData(cli->pipes_struct, r);
8313 return NT_STATUS_OK;
8316 case NDR_SPOOLSS_ADDPRINTERDRIVEREX: {
8317 struct spoolss_AddPrinterDriverEx *r = (struct spoolss_AddPrinterDriverEx *)_r;
8318 r->out.result = _spoolss_AddPrinterDriverEx(cli->pipes_struct, r);
8319 return NT_STATUS_OK;
8322 case NDR_SPOOLSS_5A: {
8323 struct spoolss_5a *r = (struct spoolss_5a *)_r;
8324 r->out.result = _spoolss_5a(cli->pipes_struct, r);
8325 return NT_STATUS_OK;
8328 case NDR_SPOOLSS_5B: {
8329 struct spoolss_5b *r = (struct spoolss_5b *)_r;
8330 r->out.result = _spoolss_5b(cli->pipes_struct, r);
8331 return NT_STATUS_OK;
8334 case NDR_SPOOLSS_5C: {
8335 struct spoolss_5c *r = (struct spoolss_5c *)_r;
8336 r->out.result = _spoolss_5c(cli->pipes_struct, r);
8337 return NT_STATUS_OK;
8340 case NDR_SPOOLSS_5D: {
8341 struct spoolss_5d *r = (struct spoolss_5d *)_r;
8342 r->out.result = _spoolss_5d(cli->pipes_struct, r);
8343 return NT_STATUS_OK;
8346 case NDR_SPOOLSS_5E: {
8347 struct spoolss_5e *r = (struct spoolss_5e *)_r;
8348 r->out.result = _spoolss_5e(cli->pipes_struct, r);
8349 return NT_STATUS_OK;
8352 case NDR_SPOOLSS_5F: {
8353 struct spoolss_5f *r = (struct spoolss_5f *)_r;
8354 r->out.result = _spoolss_5f(cli->pipes_struct, r);
8355 return NT_STATUS_OK;
8359 return NT_STATUS_NOT_IMPLEMENTED;
8363 NTSTATUS rpc_spoolss_init(void)
8365 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "spoolss", "spoolss", &ndr_table_spoolss, api_spoolss_cmds, sizeof(api_spoolss_cmds) / sizeof(struct api_struct));