2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/srv_spoolss.h"
9 static bool api_spoolss_EnumPrinters(pipes_struct
*p
)
11 const struct ndr_interface_call
*call
;
12 struct ndr_pull
*pull
;
13 struct ndr_push
*push
;
14 enum ndr_err_code ndr_err
;
16 struct spoolss_EnumPrinters
*r
;
18 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERS
];
20 r
= talloc(talloc_tos(), struct spoolss_EnumPrinters
);
25 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
30 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
36 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
37 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
43 if (DEBUGLEVEL
>= 10) {
44 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters
, r
);
48 r
->out
.count
= talloc_zero(r
, uint32_t);
49 if (r
->out
.count
== NULL
) {
54 r
->out
.info
= talloc_zero(r
, union spoolss_PrinterInfo
*);
55 if (r
->out
.info
== NULL
) {
60 r
->out
.needed
= talloc_zero(r
, uint32_t);
61 if (r
->out
.needed
== NULL
) {
66 r
->out
.result
= _spoolss_EnumPrinters(p
, r
);
68 if (p
->rng_fault_state
) {
70 /* Return true here, srv_pipe_hnd.c will take care */
74 if (DEBUGLEVEL
>= 10) {
75 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters
, r
);
78 push
= ndr_push_init_ctx(r
, NULL
);
84 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
85 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
90 blob
= ndr_push_blob(push
);
91 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
101 static bool api_spoolss_OpenPrinter(pipes_struct
*p
)
103 const struct ndr_interface_call
*call
;
104 struct ndr_pull
*pull
;
105 struct ndr_push
*push
;
106 enum ndr_err_code ndr_err
;
108 struct spoolss_OpenPrinter
*r
;
110 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_OPENPRINTER
];
112 r
= talloc(talloc_tos(), struct spoolss_OpenPrinter
);
117 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
122 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
128 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
129 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
130 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
135 if (DEBUGLEVEL
>= 10) {
136 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter
, r
);
140 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
141 if (r
->out
.handle
== NULL
) {
146 r
->out
.result
= _spoolss_OpenPrinter(p
, r
);
148 if (p
->rng_fault_state
) {
150 /* Return true here, srv_pipe_hnd.c will take care */
154 if (DEBUGLEVEL
>= 10) {
155 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter
, r
);
158 push
= ndr_push_init_ctx(r
, NULL
);
164 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
165 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
170 blob
= ndr_push_blob(push
);
171 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
181 static bool api_spoolss_SetJob(pipes_struct
*p
)
183 const struct ndr_interface_call
*call
;
184 struct ndr_pull
*pull
;
185 struct ndr_push
*push
;
186 enum ndr_err_code ndr_err
;
188 struct spoolss_SetJob
*r
;
190 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETJOB
];
192 r
= talloc(talloc_tos(), struct spoolss_SetJob
);
197 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
202 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
208 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
209 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
210 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
215 if (DEBUGLEVEL
>= 10) {
216 NDR_PRINT_IN_DEBUG(spoolss_SetJob
, r
);
219 r
->out
.result
= _spoolss_SetJob(p
, r
);
221 if (p
->rng_fault_state
) {
223 /* Return true here, srv_pipe_hnd.c will take care */
227 if (DEBUGLEVEL
>= 10) {
228 NDR_PRINT_OUT_DEBUG(spoolss_SetJob
, r
);
231 push
= ndr_push_init_ctx(r
, NULL
);
237 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
243 blob
= ndr_push_blob(push
);
244 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
254 static bool api_spoolss_GetJob(pipes_struct
*p
)
256 const struct ndr_interface_call
*call
;
257 struct ndr_pull
*pull
;
258 struct ndr_push
*push
;
259 enum ndr_err_code ndr_err
;
261 struct spoolss_GetJob
*r
;
263 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETJOB
];
265 r
= talloc(talloc_tos(), struct spoolss_GetJob
);
270 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
275 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
281 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
282 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
283 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
288 if (DEBUGLEVEL
>= 10) {
289 NDR_PRINT_IN_DEBUG(spoolss_GetJob
, r
);
293 r
->out
.info
= talloc_zero(r
, union spoolss_JobInfo
);
294 if (r
->out
.info
== NULL
) {
299 r
->out
.needed
= talloc_zero(r
, uint32_t);
300 if (r
->out
.needed
== NULL
) {
305 r
->out
.result
= _spoolss_GetJob(p
, r
);
307 if (p
->rng_fault_state
) {
309 /* Return true here, srv_pipe_hnd.c will take care */
313 if (DEBUGLEVEL
>= 10) {
314 NDR_PRINT_OUT_DEBUG(spoolss_GetJob
, r
);
317 push
= ndr_push_init_ctx(r
, NULL
);
323 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
329 blob
= ndr_push_blob(push
);
330 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
340 static bool api_spoolss_EnumJobs(pipes_struct
*p
)
342 const struct ndr_interface_call
*call
;
343 struct ndr_pull
*pull
;
344 struct ndr_push
*push
;
345 enum ndr_err_code ndr_err
;
347 struct spoolss_EnumJobs
*r
;
349 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMJOBS
];
351 r
= talloc(talloc_tos(), struct spoolss_EnumJobs
);
356 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
361 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
367 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
368 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
374 if (DEBUGLEVEL
>= 10) {
375 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs
, r
);
379 r
->out
.count
= talloc_zero(r
, uint32_t);
380 if (r
->out
.count
== NULL
) {
385 r
->out
.info
= talloc_zero(r
, union spoolss_JobInfo
*);
386 if (r
->out
.info
== NULL
) {
391 r
->out
.needed
= talloc_zero(r
, uint32_t);
392 if (r
->out
.needed
== NULL
) {
397 r
->out
.result
= _spoolss_EnumJobs(p
, r
);
399 if (p
->rng_fault_state
) {
401 /* Return true here, srv_pipe_hnd.c will take care */
405 if (DEBUGLEVEL
>= 10) {
406 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs
, r
);
409 push
= ndr_push_init_ctx(r
, NULL
);
415 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
416 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
421 blob
= ndr_push_blob(push
);
422 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
432 static bool api_spoolss_AddPrinter(pipes_struct
*p
)
434 const struct ndr_interface_call
*call
;
435 struct ndr_pull
*pull
;
436 struct ndr_push
*push
;
437 enum ndr_err_code ndr_err
;
439 struct spoolss_AddPrinter
*r
;
441 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTER
];
443 r
= talloc(talloc_tos(), struct spoolss_AddPrinter
);
448 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
453 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
459 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
460 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
461 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
466 if (DEBUGLEVEL
>= 10) {
467 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter
, r
);
470 r
->out
.result
= _spoolss_AddPrinter(p
, r
);
472 if (p
->rng_fault_state
) {
474 /* Return true here, srv_pipe_hnd.c will take care */
478 if (DEBUGLEVEL
>= 10) {
479 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter
, r
);
482 push
= ndr_push_init_ctx(r
, NULL
);
488 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
489 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
494 blob
= ndr_push_blob(push
);
495 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
505 static bool api_spoolss_DeletePrinter(pipes_struct
*p
)
507 const struct ndr_interface_call
*call
;
508 struct ndr_pull
*pull
;
509 struct ndr_push
*push
;
510 enum ndr_err_code ndr_err
;
512 struct spoolss_DeletePrinter
*r
;
514 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTER
];
516 r
= talloc(talloc_tos(), struct spoolss_DeletePrinter
);
521 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
526 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
532 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
533 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
534 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
539 if (DEBUGLEVEL
>= 10) {
540 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter
, r
);
543 r
->out
.result
= _spoolss_DeletePrinter(p
, r
);
545 if (p
->rng_fault_state
) {
547 /* Return true here, srv_pipe_hnd.c will take care */
551 if (DEBUGLEVEL
>= 10) {
552 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter
, r
);
555 push
= ndr_push_init_ctx(r
, NULL
);
561 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
562 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
567 blob
= ndr_push_blob(push
);
568 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
578 static bool api_spoolss_SetPrinter(pipes_struct
*p
)
580 const struct ndr_interface_call
*call
;
581 struct ndr_pull
*pull
;
582 struct ndr_push
*push
;
583 enum ndr_err_code ndr_err
;
585 struct spoolss_SetPrinter
*r
;
587 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETPRINTER
];
589 r
= talloc(talloc_tos(), struct spoolss_SetPrinter
);
594 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
599 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
605 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
606 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
607 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
612 if (DEBUGLEVEL
>= 10) {
613 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter
, r
);
616 r
->out
.result
= _spoolss_SetPrinter(p
, r
);
618 if (p
->rng_fault_state
) {
620 /* Return true here, srv_pipe_hnd.c will take care */
624 if (DEBUGLEVEL
>= 10) {
625 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter
, r
);
628 push
= ndr_push_init_ctx(r
, NULL
);
634 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
635 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
640 blob
= ndr_push_blob(push
);
641 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
651 static bool api_spoolss_GetPrinter(pipes_struct
*p
)
653 const struct ndr_interface_call
*call
;
654 struct ndr_pull
*pull
;
655 struct ndr_push
*push
;
656 enum ndr_err_code ndr_err
;
658 struct spoolss_GetPrinter
*r
;
660 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTER
];
662 r
= talloc(talloc_tos(), struct spoolss_GetPrinter
);
667 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
672 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
678 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
679 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
680 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
685 if (DEBUGLEVEL
>= 10) {
686 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter
, r
);
690 r
->out
.info
= talloc_zero(r
, union spoolss_PrinterInfo
);
691 if (r
->out
.info
== NULL
) {
696 r
->out
.needed
= talloc_zero(r
, uint32_t);
697 if (r
->out
.needed
== NULL
) {
702 r
->out
.result
= _spoolss_GetPrinter(p
, r
);
704 if (p
->rng_fault_state
) {
706 /* Return true here, srv_pipe_hnd.c will take care */
710 if (DEBUGLEVEL
>= 10) {
711 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter
, r
);
714 push
= ndr_push_init_ctx(r
, NULL
);
720 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
721 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
726 blob
= ndr_push_blob(push
);
727 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
737 static bool api_spoolss_AddPrinterDriver(pipes_struct
*p
)
739 const struct ndr_interface_call
*call
;
740 struct ndr_pull
*pull
;
741 struct ndr_push
*push
;
742 enum ndr_err_code ndr_err
;
744 struct spoolss_AddPrinterDriver
*r
;
746 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTERDRIVER
];
748 r
= talloc(talloc_tos(), struct spoolss_AddPrinterDriver
);
753 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
758 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
764 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
765 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
766 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
771 if (DEBUGLEVEL
>= 10) {
772 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver
, r
);
775 r
->out
.result
= _spoolss_AddPrinterDriver(p
, r
);
777 if (p
->rng_fault_state
) {
779 /* Return true here, srv_pipe_hnd.c will take care */
783 if (DEBUGLEVEL
>= 10) {
784 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver
, r
);
787 push
= ndr_push_init_ctx(r
, NULL
);
793 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
794 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
799 blob
= ndr_push_blob(push
);
800 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
810 static bool api_spoolss_EnumPrinterDrivers(pipes_struct
*p
)
812 const struct ndr_interface_call
*call
;
813 struct ndr_pull
*pull
;
814 struct ndr_push
*push
;
815 enum ndr_err_code ndr_err
;
817 struct spoolss_EnumPrinterDrivers
*r
;
819 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERDRIVERS
];
821 r
= talloc(talloc_tos(), struct spoolss_EnumPrinterDrivers
);
826 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
831 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
837 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
838 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
839 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
844 if (DEBUGLEVEL
>= 10) {
845 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers
, r
);
849 r
->out
.count
= talloc_zero(r
, uint32_t);
850 if (r
->out
.count
== NULL
) {
855 r
->out
.info
= talloc_zero(r
, union spoolss_DriverInfo
*);
856 if (r
->out
.info
== NULL
) {
861 r
->out
.needed
= talloc_zero(r
, uint32_t);
862 if (r
->out
.needed
== NULL
) {
867 r
->out
.result
= _spoolss_EnumPrinterDrivers(p
, r
);
869 if (p
->rng_fault_state
) {
871 /* Return true here, srv_pipe_hnd.c will take care */
875 if (DEBUGLEVEL
>= 10) {
876 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers
, r
);
879 push
= ndr_push_init_ctx(r
, NULL
);
885 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
891 blob
= ndr_push_blob(push
);
892 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
902 static bool api_spoolss_GetPrinterDriver(pipes_struct
*p
)
904 const struct ndr_interface_call
*call
;
905 struct ndr_pull
*pull
;
906 struct ndr_push
*push
;
907 enum ndr_err_code ndr_err
;
909 struct spoolss_GetPrinterDriver
*r
;
911 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTERDRIVER
];
913 r
= talloc(talloc_tos(), struct spoolss_GetPrinterDriver
);
918 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
923 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
929 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
930 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
931 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
936 if (DEBUGLEVEL
>= 10) {
937 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver
, r
);
940 r
->out
.result
= _spoolss_GetPrinterDriver(p
, r
);
942 if (p
->rng_fault_state
) {
944 /* Return true here, srv_pipe_hnd.c will take care */
948 if (DEBUGLEVEL
>= 10) {
949 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver
, r
);
952 push
= ndr_push_init_ctx(r
, NULL
);
958 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
959 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
964 blob
= ndr_push_blob(push
);
965 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
975 static bool api_spoolss_GetPrinterDriverDirectory(pipes_struct
*p
)
977 const struct ndr_interface_call
*call
;
978 struct ndr_pull
*pull
;
979 struct ndr_push
*push
;
980 enum ndr_err_code ndr_err
;
982 struct spoolss_GetPrinterDriverDirectory
*r
;
984 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
];
986 r
= talloc(talloc_tos(), struct spoolss_GetPrinterDriverDirectory
);
991 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
996 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1002 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1003 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1004 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1009 if (DEBUGLEVEL
>= 10) {
1010 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory
, r
);
1013 ZERO_STRUCT(r
->out
);
1014 r
->out
.info
= talloc_zero(r
, union spoolss_DriverDirectoryInfo
);
1015 if (r
->out
.info
== NULL
) {
1020 r
->out
.needed
= talloc_zero(r
, uint32_t);
1021 if (r
->out
.needed
== NULL
) {
1026 r
->out
.result
= _spoolss_GetPrinterDriverDirectory(p
, r
);
1028 if (p
->rng_fault_state
) {
1030 /* Return true here, srv_pipe_hnd.c will take care */
1034 if (DEBUGLEVEL
>= 10) {
1035 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory
, r
);
1038 push
= ndr_push_init_ctx(r
, NULL
);
1044 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1045 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1050 blob
= ndr_push_blob(push
);
1051 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1061 static bool api_spoolss_DeletePrinterDriver(pipes_struct
*p
)
1063 const struct ndr_interface_call
*call
;
1064 struct ndr_pull
*pull
;
1065 struct ndr_push
*push
;
1066 enum ndr_err_code ndr_err
;
1068 struct spoolss_DeletePrinterDriver
*r
;
1070 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERDRIVER
];
1072 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterDriver
);
1077 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1082 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1088 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1089 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1090 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1095 if (DEBUGLEVEL
>= 10) {
1096 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver
, r
);
1099 r
->out
.result
= _spoolss_DeletePrinterDriver(p
, r
);
1101 if (p
->rng_fault_state
) {
1103 /* Return true here, srv_pipe_hnd.c will take care */
1107 if (DEBUGLEVEL
>= 10) {
1108 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver
, r
);
1111 push
= ndr_push_init_ctx(r
, NULL
);
1117 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1123 blob
= ndr_push_blob(push
);
1124 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1134 static bool api_spoolss_AddPrintProcessor(pipes_struct
*p
)
1136 const struct ndr_interface_call
*call
;
1137 struct ndr_pull
*pull
;
1138 struct ndr_push
*push
;
1139 enum ndr_err_code ndr_err
;
1141 struct spoolss_AddPrintProcessor
*r
;
1143 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTPROCESSOR
];
1145 r
= talloc(talloc_tos(), struct spoolss_AddPrintProcessor
);
1150 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1155 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1161 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1162 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1163 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1168 if (DEBUGLEVEL
>= 10) {
1169 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor
, r
);
1172 r
->out
.result
= _spoolss_AddPrintProcessor(p
, r
);
1174 if (p
->rng_fault_state
) {
1176 /* Return true here, srv_pipe_hnd.c will take care */
1180 if (DEBUGLEVEL
>= 10) {
1181 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor
, r
);
1184 push
= ndr_push_init_ctx(r
, NULL
);
1190 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1191 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1196 blob
= ndr_push_blob(push
);
1197 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1207 static bool api_spoolss_EnumPrintProcessors(pipes_struct
*p
)
1209 const struct ndr_interface_call
*call
;
1210 struct ndr_pull
*pull
;
1211 struct ndr_push
*push
;
1212 enum ndr_err_code ndr_err
;
1214 struct spoolss_EnumPrintProcessors
*r
;
1216 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTPROCESSORS
];
1218 r
= talloc(talloc_tos(), struct spoolss_EnumPrintProcessors
);
1223 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1228 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1234 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1235 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1236 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1241 if (DEBUGLEVEL
>= 10) {
1242 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors
, r
);
1245 ZERO_STRUCT(r
->out
);
1246 r
->out
.count
= talloc_zero(r
, uint32_t);
1247 if (r
->out
.count
== NULL
) {
1252 r
->out
.info
= talloc_zero(r
, union spoolss_PrintProcessorInfo
*);
1253 if (r
->out
.info
== NULL
) {
1258 r
->out
.needed
= talloc_zero(r
, uint32_t);
1259 if (r
->out
.needed
== NULL
) {
1264 r
->out
.result
= _spoolss_EnumPrintProcessors(p
, r
);
1266 if (p
->rng_fault_state
) {
1268 /* Return true here, srv_pipe_hnd.c will take care */
1272 if (DEBUGLEVEL
>= 10) {
1273 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors
, r
);
1276 push
= ndr_push_init_ctx(r
, NULL
);
1282 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1283 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1288 blob
= ndr_push_blob(push
);
1289 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1299 static bool api_spoolss_GetPrintProcessorDirectory(pipes_struct
*p
)
1301 const struct ndr_interface_call
*call
;
1302 struct ndr_pull
*pull
;
1303 struct ndr_push
*push
;
1304 enum ndr_err_code ndr_err
;
1306 struct spoolss_GetPrintProcessorDirectory
*r
;
1308 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
];
1310 r
= talloc(talloc_tos(), struct spoolss_GetPrintProcessorDirectory
);
1315 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1320 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1326 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1327 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1328 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1333 if (DEBUGLEVEL
>= 10) {
1334 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory
, r
);
1337 ZERO_STRUCT(r
->out
);
1338 r
->out
.info
= talloc_zero(r
, union spoolss_PrintProcessorDirectoryInfo
);
1339 if (r
->out
.info
== NULL
) {
1344 r
->out
.needed
= talloc_zero(r
, uint32_t);
1345 if (r
->out
.needed
== NULL
) {
1350 r
->out
.result
= _spoolss_GetPrintProcessorDirectory(p
, r
);
1352 if (p
->rng_fault_state
) {
1354 /* Return true here, srv_pipe_hnd.c will take care */
1358 if (DEBUGLEVEL
>= 10) {
1359 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory
, r
);
1362 push
= ndr_push_init_ctx(r
, NULL
);
1368 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1374 blob
= ndr_push_blob(push
);
1375 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1385 static bool api_spoolss_StartDocPrinter(pipes_struct
*p
)
1387 const struct ndr_interface_call
*call
;
1388 struct ndr_pull
*pull
;
1389 struct ndr_push
*push
;
1390 enum ndr_err_code ndr_err
;
1392 struct spoolss_StartDocPrinter
*r
;
1394 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_STARTDOCPRINTER
];
1396 r
= talloc(talloc_tos(), struct spoolss_StartDocPrinter
);
1401 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1406 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1412 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1413 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1414 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1419 if (DEBUGLEVEL
>= 10) {
1420 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter
, r
);
1423 ZERO_STRUCT(r
->out
);
1424 r
->out
.job_id
= talloc_zero(r
, uint32_t);
1425 if (r
->out
.job_id
== NULL
) {
1430 r
->out
.result
= _spoolss_StartDocPrinter(p
, r
);
1432 if (p
->rng_fault_state
) {
1434 /* Return true here, srv_pipe_hnd.c will take care */
1438 if (DEBUGLEVEL
>= 10) {
1439 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter
, r
);
1442 push
= ndr_push_init_ctx(r
, NULL
);
1448 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1449 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1454 blob
= ndr_push_blob(push
);
1455 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1465 static bool api_spoolss_StartPagePrinter(pipes_struct
*p
)
1467 const struct ndr_interface_call
*call
;
1468 struct ndr_pull
*pull
;
1469 struct ndr_push
*push
;
1470 enum ndr_err_code ndr_err
;
1472 struct spoolss_StartPagePrinter
*r
;
1474 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_STARTPAGEPRINTER
];
1476 r
= talloc(talloc_tos(), struct spoolss_StartPagePrinter
);
1481 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1486 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1492 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1493 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1494 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1499 if (DEBUGLEVEL
>= 10) {
1500 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter
, r
);
1503 r
->out
.result
= _spoolss_StartPagePrinter(p
, r
);
1505 if (p
->rng_fault_state
) {
1507 /* Return true here, srv_pipe_hnd.c will take care */
1511 if (DEBUGLEVEL
>= 10) {
1512 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter
, r
);
1515 push
= ndr_push_init_ctx(r
, NULL
);
1521 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1522 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1527 blob
= ndr_push_blob(push
);
1528 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1538 static bool api_spoolss_WritePrinter(pipes_struct
*p
)
1540 const struct ndr_interface_call
*call
;
1541 struct ndr_pull
*pull
;
1542 struct ndr_push
*push
;
1543 enum ndr_err_code ndr_err
;
1545 struct spoolss_WritePrinter
*r
;
1547 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_WRITEPRINTER
];
1549 r
= talloc(talloc_tos(), struct spoolss_WritePrinter
);
1554 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1559 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1565 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1566 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1567 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1572 if (DEBUGLEVEL
>= 10) {
1573 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter
, r
);
1576 ZERO_STRUCT(r
->out
);
1577 r
->out
.num_written
= talloc_zero(r
, uint32_t);
1578 if (r
->out
.num_written
== NULL
) {
1583 r
->out
.result
= _spoolss_WritePrinter(p
, r
);
1585 if (p
->rng_fault_state
) {
1587 /* Return true here, srv_pipe_hnd.c will take care */
1591 if (DEBUGLEVEL
>= 10) {
1592 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter
, r
);
1595 push
= ndr_push_init_ctx(r
, NULL
);
1601 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1602 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1607 blob
= ndr_push_blob(push
);
1608 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1618 static bool api_spoolss_EndPagePrinter(pipes_struct
*p
)
1620 const struct ndr_interface_call
*call
;
1621 struct ndr_pull
*pull
;
1622 struct ndr_push
*push
;
1623 enum ndr_err_code ndr_err
;
1625 struct spoolss_EndPagePrinter
*r
;
1627 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENDPAGEPRINTER
];
1629 r
= talloc(talloc_tos(), struct spoolss_EndPagePrinter
);
1634 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1639 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1645 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1646 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1647 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1652 if (DEBUGLEVEL
>= 10) {
1653 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter
, r
);
1656 r
->out
.result
= _spoolss_EndPagePrinter(p
, r
);
1658 if (p
->rng_fault_state
) {
1660 /* Return true here, srv_pipe_hnd.c will take care */
1664 if (DEBUGLEVEL
>= 10) {
1665 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter
, r
);
1668 push
= ndr_push_init_ctx(r
, NULL
);
1674 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1675 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1680 blob
= ndr_push_blob(push
);
1681 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1691 static bool api_spoolss_AbortPrinter(pipes_struct
*p
)
1693 const struct ndr_interface_call
*call
;
1694 struct ndr_pull
*pull
;
1695 struct ndr_push
*push
;
1696 enum ndr_err_code ndr_err
;
1698 struct spoolss_AbortPrinter
*r
;
1700 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ABORTPRINTER
];
1702 r
= talloc(talloc_tos(), struct spoolss_AbortPrinter
);
1707 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1712 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1718 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1719 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1720 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1725 if (DEBUGLEVEL
>= 10) {
1726 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter
, r
);
1729 r
->out
.result
= _spoolss_AbortPrinter(p
, r
);
1731 if (p
->rng_fault_state
) {
1733 /* Return true here, srv_pipe_hnd.c will take care */
1737 if (DEBUGLEVEL
>= 10) {
1738 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter
, r
);
1741 push
= ndr_push_init_ctx(r
, NULL
);
1747 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1748 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1753 blob
= ndr_push_blob(push
);
1754 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1764 static bool api_spoolss_ReadPrinter(pipes_struct
*p
)
1766 const struct ndr_interface_call
*call
;
1767 struct ndr_pull
*pull
;
1768 struct ndr_push
*push
;
1769 enum ndr_err_code ndr_err
;
1771 struct spoolss_ReadPrinter
*r
;
1773 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_READPRINTER
];
1775 r
= talloc(talloc_tos(), struct spoolss_ReadPrinter
);
1780 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1785 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1791 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1792 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1793 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1798 if (DEBUGLEVEL
>= 10) {
1799 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter
, r
);
1802 ZERO_STRUCT(r
->out
);
1803 r
->out
.data
= talloc_zero_array(r
, uint8_t, r
->in
.data_size
);
1804 if (r
->out
.data
== NULL
) {
1809 r
->out
._data_size
= talloc_zero(r
, uint32_t);
1810 if (r
->out
._data_size
== NULL
) {
1815 r
->out
.result
= _spoolss_ReadPrinter(p
, r
);
1817 if (p
->rng_fault_state
) {
1819 /* Return true here, srv_pipe_hnd.c will take care */
1823 if (DEBUGLEVEL
>= 10) {
1824 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter
, r
);
1827 push
= ndr_push_init_ctx(r
, NULL
);
1833 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1834 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1839 blob
= ndr_push_blob(push
);
1840 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1850 static bool api_spoolss_EndDocPrinter(pipes_struct
*p
)
1852 const struct ndr_interface_call
*call
;
1853 struct ndr_pull
*pull
;
1854 struct ndr_push
*push
;
1855 enum ndr_err_code ndr_err
;
1857 struct spoolss_EndDocPrinter
*r
;
1859 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENDDOCPRINTER
];
1861 r
= talloc(talloc_tos(), struct spoolss_EndDocPrinter
);
1866 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1871 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1877 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1878 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1879 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1884 if (DEBUGLEVEL
>= 10) {
1885 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter
, r
);
1888 r
->out
.result
= _spoolss_EndDocPrinter(p
, r
);
1890 if (p
->rng_fault_state
) {
1892 /* Return true here, srv_pipe_hnd.c will take care */
1896 if (DEBUGLEVEL
>= 10) {
1897 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter
, r
);
1900 push
= ndr_push_init_ctx(r
, NULL
);
1906 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1907 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1912 blob
= ndr_push_blob(push
);
1913 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
1923 static bool api_spoolss_AddJob(pipes_struct
*p
)
1925 const struct ndr_interface_call
*call
;
1926 struct ndr_pull
*pull
;
1927 struct ndr_push
*push
;
1928 enum ndr_err_code ndr_err
;
1930 struct spoolss_AddJob
*r
;
1932 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDJOB
];
1934 r
= talloc(talloc_tos(), struct spoolss_AddJob
);
1939 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
1944 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
1950 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
1951 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
1952 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1957 if (DEBUGLEVEL
>= 10) {
1958 NDR_PRINT_IN_DEBUG(spoolss_AddJob
, r
);
1961 ZERO_STRUCT(r
->out
);
1962 r
->out
.buffer
= r
->in
.buffer
;
1963 r
->out
.needed
= talloc_zero(r
, uint32_t);
1964 if (r
->out
.needed
== NULL
) {
1969 r
->out
.result
= _spoolss_AddJob(p
, r
);
1971 if (p
->rng_fault_state
) {
1973 /* Return true here, srv_pipe_hnd.c will take care */
1977 if (DEBUGLEVEL
>= 10) {
1978 NDR_PRINT_OUT_DEBUG(spoolss_AddJob
, r
);
1981 push
= ndr_push_init_ctx(r
, NULL
);
1987 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
1988 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
1993 blob
= ndr_push_blob(push
);
1994 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2004 static bool api_spoolss_ScheduleJob(pipes_struct
*p
)
2006 const struct ndr_interface_call
*call
;
2007 struct ndr_pull
*pull
;
2008 struct ndr_push
*push
;
2009 enum ndr_err_code ndr_err
;
2011 struct spoolss_ScheduleJob
*r
;
2013 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SCHEDULEJOB
];
2015 r
= talloc(talloc_tos(), struct spoolss_ScheduleJob
);
2020 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2025 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2031 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2032 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2033 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2038 if (DEBUGLEVEL
>= 10) {
2039 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob
, r
);
2042 r
->out
.result
= _spoolss_ScheduleJob(p
, r
);
2044 if (p
->rng_fault_state
) {
2046 /* Return true here, srv_pipe_hnd.c will take care */
2050 if (DEBUGLEVEL
>= 10) {
2051 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob
, r
);
2054 push
= ndr_push_init_ctx(r
, NULL
);
2060 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2061 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2066 blob
= ndr_push_blob(push
);
2067 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2077 static bool api_spoolss_GetPrinterData(pipes_struct
*p
)
2079 const struct ndr_interface_call
*call
;
2080 struct ndr_pull
*pull
;
2081 struct ndr_push
*push
;
2082 enum ndr_err_code ndr_err
;
2084 struct spoolss_GetPrinterData
*r
;
2086 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTERDATA
];
2088 r
= talloc(talloc_tos(), struct spoolss_GetPrinterData
);
2093 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2098 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2104 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2105 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2106 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2111 if (DEBUGLEVEL
>= 10) {
2112 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData
, r
);
2115 ZERO_STRUCT(r
->out
);
2116 r
->out
.type
= talloc_zero(r
, enum spoolss_PrinterDataType
);
2117 if (r
->out
.type
== NULL
) {
2122 r
->out
.needed
= talloc_zero(r
, uint32_t);
2123 if (r
->out
.needed
== NULL
) {
2128 r
->out
.result
= _spoolss_GetPrinterData(p
, r
);
2130 if (p
->rng_fault_state
) {
2132 /* Return true here, srv_pipe_hnd.c will take care */
2136 if (DEBUGLEVEL
>= 10) {
2137 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData
, r
);
2140 push
= ndr_push_init_ctx(r
, NULL
);
2146 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2152 blob
= ndr_push_blob(push
);
2153 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2163 static bool api_spoolss_SetPrinterData(pipes_struct
*p
)
2165 const struct ndr_interface_call
*call
;
2166 struct ndr_pull
*pull
;
2167 struct ndr_push
*push
;
2168 enum ndr_err_code ndr_err
;
2170 struct spoolss_SetPrinterData
*r
;
2172 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETPRINTERDATA
];
2174 r
= talloc(talloc_tos(), struct spoolss_SetPrinterData
);
2179 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2184 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2190 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2191 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2192 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2197 if (DEBUGLEVEL
>= 10) {
2198 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData
, r
);
2201 r
->out
.result
= _spoolss_SetPrinterData(p
, r
);
2203 if (p
->rng_fault_state
) {
2205 /* Return true here, srv_pipe_hnd.c will take care */
2209 if (DEBUGLEVEL
>= 10) {
2210 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData
, r
);
2213 push
= ndr_push_init_ctx(r
, NULL
);
2219 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2220 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2225 blob
= ndr_push_blob(push
);
2226 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2236 static bool api_spoolss_WaitForPrinterChange(pipes_struct
*p
)
2238 const struct ndr_interface_call
*call
;
2239 struct ndr_pull
*pull
;
2240 struct ndr_push
*push
;
2241 enum ndr_err_code ndr_err
;
2243 struct spoolss_WaitForPrinterChange
*r
;
2245 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_WAITFORPRINTERCHANGE
];
2247 r
= talloc(talloc_tos(), struct spoolss_WaitForPrinterChange
);
2252 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2257 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2263 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2264 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2265 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2270 if (DEBUGLEVEL
>= 10) {
2271 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange
, r
);
2274 r
->out
.result
= _spoolss_WaitForPrinterChange(p
, r
);
2276 if (p
->rng_fault_state
) {
2278 /* Return true here, srv_pipe_hnd.c will take care */
2282 if (DEBUGLEVEL
>= 10) {
2283 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange
, r
);
2286 push
= ndr_push_init_ctx(r
, NULL
);
2292 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2293 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2298 blob
= ndr_push_blob(push
);
2299 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2309 static bool api_spoolss_ClosePrinter(pipes_struct
*p
)
2311 const struct ndr_interface_call
*call
;
2312 struct ndr_pull
*pull
;
2313 struct ndr_push
*push
;
2314 enum ndr_err_code ndr_err
;
2316 struct spoolss_ClosePrinter
*r
;
2318 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_CLOSEPRINTER
];
2320 r
= talloc(talloc_tos(), struct spoolss_ClosePrinter
);
2325 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2330 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2336 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2337 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2338 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2343 if (DEBUGLEVEL
>= 10) {
2344 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter
, r
);
2347 ZERO_STRUCT(r
->out
);
2348 r
->out
.handle
= r
->in
.handle
;
2349 r
->out
.result
= _spoolss_ClosePrinter(p
, r
);
2351 if (p
->rng_fault_state
) {
2353 /* Return true here, srv_pipe_hnd.c will take care */
2357 if (DEBUGLEVEL
>= 10) {
2358 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter
, r
);
2361 push
= ndr_push_init_ctx(r
, NULL
);
2367 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2368 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2373 blob
= ndr_push_blob(push
);
2374 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2384 static bool api_spoolss_AddForm(pipes_struct
*p
)
2386 const struct ndr_interface_call
*call
;
2387 struct ndr_pull
*pull
;
2388 struct ndr_push
*push
;
2389 enum ndr_err_code ndr_err
;
2391 struct spoolss_AddForm
*r
;
2393 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDFORM
];
2395 r
= talloc(talloc_tos(), struct spoolss_AddForm
);
2400 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2405 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2411 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2412 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2413 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2418 if (DEBUGLEVEL
>= 10) {
2419 NDR_PRINT_IN_DEBUG(spoolss_AddForm
, r
);
2422 r
->out
.result
= _spoolss_AddForm(p
, r
);
2424 if (p
->rng_fault_state
) {
2426 /* Return true here, srv_pipe_hnd.c will take care */
2430 if (DEBUGLEVEL
>= 10) {
2431 NDR_PRINT_OUT_DEBUG(spoolss_AddForm
, r
);
2434 push
= ndr_push_init_ctx(r
, NULL
);
2440 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2441 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2446 blob
= ndr_push_blob(push
);
2447 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2457 static bool api_spoolss_DeleteForm(pipes_struct
*p
)
2459 const struct ndr_interface_call
*call
;
2460 struct ndr_pull
*pull
;
2461 struct ndr_push
*push
;
2462 enum ndr_err_code ndr_err
;
2464 struct spoolss_DeleteForm
*r
;
2466 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEFORM
];
2468 r
= talloc(talloc_tos(), struct spoolss_DeleteForm
);
2473 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2478 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2484 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2485 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2486 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2491 if (DEBUGLEVEL
>= 10) {
2492 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm
, r
);
2495 r
->out
.result
= _spoolss_DeleteForm(p
, r
);
2497 if (p
->rng_fault_state
) {
2499 /* Return true here, srv_pipe_hnd.c will take care */
2503 if (DEBUGLEVEL
>= 10) {
2504 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm
, r
);
2507 push
= ndr_push_init_ctx(r
, NULL
);
2513 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2514 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2519 blob
= ndr_push_blob(push
);
2520 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2530 static bool api_spoolss_GetForm(pipes_struct
*p
)
2532 const struct ndr_interface_call
*call
;
2533 struct ndr_pull
*pull
;
2534 struct ndr_push
*push
;
2535 enum ndr_err_code ndr_err
;
2537 struct spoolss_GetForm
*r
;
2539 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETFORM
];
2541 r
= talloc(talloc_tos(), struct spoolss_GetForm
);
2546 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2551 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2557 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2558 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2559 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2564 if (DEBUGLEVEL
>= 10) {
2565 NDR_PRINT_IN_DEBUG(spoolss_GetForm
, r
);
2568 ZERO_STRUCT(r
->out
);
2569 r
->out
.info
= talloc_zero(r
, union spoolss_FormInfo
);
2570 if (r
->out
.info
== NULL
) {
2575 r
->out
.needed
= talloc_zero(r
, uint32_t);
2576 if (r
->out
.needed
== NULL
) {
2581 r
->out
.result
= _spoolss_GetForm(p
, r
);
2583 if (p
->rng_fault_state
) {
2585 /* Return true here, srv_pipe_hnd.c will take care */
2589 if (DEBUGLEVEL
>= 10) {
2590 NDR_PRINT_OUT_DEBUG(spoolss_GetForm
, r
);
2593 push
= ndr_push_init_ctx(r
, NULL
);
2599 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2600 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2605 blob
= ndr_push_blob(push
);
2606 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2616 static bool api_spoolss_SetForm(pipes_struct
*p
)
2618 const struct ndr_interface_call
*call
;
2619 struct ndr_pull
*pull
;
2620 struct ndr_push
*push
;
2621 enum ndr_err_code ndr_err
;
2623 struct spoolss_SetForm
*r
;
2625 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETFORM
];
2627 r
= talloc(talloc_tos(), struct spoolss_SetForm
);
2632 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2637 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2643 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2644 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2645 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2650 if (DEBUGLEVEL
>= 10) {
2651 NDR_PRINT_IN_DEBUG(spoolss_SetForm
, r
);
2654 r
->out
.result
= _spoolss_SetForm(p
, r
);
2656 if (p
->rng_fault_state
) {
2658 /* Return true here, srv_pipe_hnd.c will take care */
2662 if (DEBUGLEVEL
>= 10) {
2663 NDR_PRINT_OUT_DEBUG(spoolss_SetForm
, r
);
2666 push
= ndr_push_init_ctx(r
, NULL
);
2672 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2673 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2678 blob
= ndr_push_blob(push
);
2679 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2689 static bool api_spoolss_EnumForms(pipes_struct
*p
)
2691 const struct ndr_interface_call
*call
;
2692 struct ndr_pull
*pull
;
2693 struct ndr_push
*push
;
2694 enum ndr_err_code ndr_err
;
2696 struct spoolss_EnumForms
*r
;
2698 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMFORMS
];
2700 r
= talloc(talloc_tos(), struct spoolss_EnumForms
);
2705 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2710 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2716 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2717 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2718 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2723 if (DEBUGLEVEL
>= 10) {
2724 NDR_PRINT_IN_DEBUG(spoolss_EnumForms
, r
);
2727 ZERO_STRUCT(r
->out
);
2728 r
->out
.count
= talloc_zero(r
, uint32_t);
2729 if (r
->out
.count
== NULL
) {
2734 r
->out
.info
= talloc_zero(r
, union spoolss_FormInfo
*);
2735 if (r
->out
.info
== NULL
) {
2740 r
->out
.needed
= talloc_zero(r
, uint32_t);
2741 if (r
->out
.needed
== NULL
) {
2746 r
->out
.result
= _spoolss_EnumForms(p
, r
);
2748 if (p
->rng_fault_state
) {
2750 /* Return true here, srv_pipe_hnd.c will take care */
2754 if (DEBUGLEVEL
>= 10) {
2755 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms
, r
);
2758 push
= ndr_push_init_ctx(r
, NULL
);
2764 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2765 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2770 blob
= ndr_push_blob(push
);
2771 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2781 static bool api_spoolss_EnumPorts(pipes_struct
*p
)
2783 const struct ndr_interface_call
*call
;
2784 struct ndr_pull
*pull
;
2785 struct ndr_push
*push
;
2786 enum ndr_err_code ndr_err
;
2788 struct spoolss_EnumPorts
*r
;
2790 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPORTS
];
2792 r
= talloc(talloc_tos(), struct spoolss_EnumPorts
);
2797 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2802 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2808 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2809 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2810 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2815 if (DEBUGLEVEL
>= 10) {
2816 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts
, r
);
2819 ZERO_STRUCT(r
->out
);
2820 r
->out
.count
= talloc_zero(r
, uint32_t);
2821 if (r
->out
.count
== NULL
) {
2826 r
->out
.info
= talloc_zero(r
, union spoolss_PortInfo
*);
2827 if (r
->out
.info
== NULL
) {
2832 r
->out
.needed
= talloc_zero(r
, uint32_t);
2833 if (r
->out
.needed
== NULL
) {
2838 r
->out
.result
= _spoolss_EnumPorts(p
, r
);
2840 if (p
->rng_fault_state
) {
2842 /* Return true here, srv_pipe_hnd.c will take care */
2846 if (DEBUGLEVEL
>= 10) {
2847 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts
, r
);
2850 push
= ndr_push_init_ctx(r
, NULL
);
2856 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2857 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2862 blob
= ndr_push_blob(push
);
2863 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2873 static bool api_spoolss_EnumMonitors(pipes_struct
*p
)
2875 const struct ndr_interface_call
*call
;
2876 struct ndr_pull
*pull
;
2877 struct ndr_push
*push
;
2878 enum ndr_err_code ndr_err
;
2880 struct spoolss_EnumMonitors
*r
;
2882 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMMONITORS
];
2884 r
= talloc(talloc_tos(), struct spoolss_EnumMonitors
);
2889 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2894 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2900 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2901 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2902 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2907 if (DEBUGLEVEL
>= 10) {
2908 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors
, r
);
2911 ZERO_STRUCT(r
->out
);
2912 r
->out
.count
= talloc_zero(r
, uint32_t);
2913 if (r
->out
.count
== NULL
) {
2918 r
->out
.info
= talloc_zero(r
, union spoolss_MonitorInfo
*);
2919 if (r
->out
.info
== NULL
) {
2924 r
->out
.needed
= talloc_zero(r
, uint32_t);
2925 if (r
->out
.needed
== NULL
) {
2930 r
->out
.result
= _spoolss_EnumMonitors(p
, r
);
2932 if (p
->rng_fault_state
) {
2934 /* Return true here, srv_pipe_hnd.c will take care */
2938 if (DEBUGLEVEL
>= 10) {
2939 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors
, r
);
2942 push
= ndr_push_init_ctx(r
, NULL
);
2948 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2949 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2954 blob
= ndr_push_blob(push
);
2955 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2965 static bool api_spoolss_AddPort(pipes_struct
*p
)
2967 const struct ndr_interface_call
*call
;
2968 struct ndr_pull
*pull
;
2969 struct ndr_push
*push
;
2970 enum ndr_err_code ndr_err
;
2972 struct spoolss_AddPort
*r
;
2974 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPORT
];
2976 r
= talloc(talloc_tos(), struct spoolss_AddPort
);
2981 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2986 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2992 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2993 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2994 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2999 if (DEBUGLEVEL
>= 10) {
3000 NDR_PRINT_IN_DEBUG(spoolss_AddPort
, r
);
3003 r
->out
.result
= _spoolss_AddPort(p
, r
);
3005 if (p
->rng_fault_state
) {
3007 /* Return true here, srv_pipe_hnd.c will take care */
3011 if (DEBUGLEVEL
>= 10) {
3012 NDR_PRINT_OUT_DEBUG(spoolss_AddPort
, r
);
3015 push
= ndr_push_init_ctx(r
, NULL
);
3021 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3022 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3027 blob
= ndr_push_blob(push
);
3028 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3038 static bool api_spoolss_ConfigurePort(pipes_struct
*p
)
3040 const struct ndr_interface_call
*call
;
3041 struct ndr_pull
*pull
;
3042 struct ndr_push
*push
;
3043 enum ndr_err_code ndr_err
;
3045 struct spoolss_ConfigurePort
*r
;
3047 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_CONFIGUREPORT
];
3049 r
= talloc(talloc_tos(), struct spoolss_ConfigurePort
);
3054 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3059 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3065 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3066 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3067 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3072 if (DEBUGLEVEL
>= 10) {
3073 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort
, r
);
3076 r
->out
.result
= _spoolss_ConfigurePort(p
, r
);
3078 if (p
->rng_fault_state
) {
3080 /* Return true here, srv_pipe_hnd.c will take care */
3084 if (DEBUGLEVEL
>= 10) {
3085 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort
, r
);
3088 push
= ndr_push_init_ctx(r
, NULL
);
3094 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3095 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3100 blob
= ndr_push_blob(push
);
3101 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3111 static bool api_spoolss_DeletePort(pipes_struct
*p
)
3113 const struct ndr_interface_call
*call
;
3114 struct ndr_pull
*pull
;
3115 struct ndr_push
*push
;
3116 enum ndr_err_code ndr_err
;
3118 struct spoolss_DeletePort
*r
;
3120 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPORT
];
3122 r
= talloc(talloc_tos(), struct spoolss_DeletePort
);
3127 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3132 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3138 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3139 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3140 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3145 if (DEBUGLEVEL
>= 10) {
3146 NDR_PRINT_IN_DEBUG(spoolss_DeletePort
, r
);
3149 r
->out
.result
= _spoolss_DeletePort(p
, r
);
3151 if (p
->rng_fault_state
) {
3153 /* Return true here, srv_pipe_hnd.c will take care */
3157 if (DEBUGLEVEL
>= 10) {
3158 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort
, r
);
3161 push
= ndr_push_init_ctx(r
, NULL
);
3167 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3168 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3173 blob
= ndr_push_blob(push
);
3174 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3184 static bool api_spoolss_CreatePrinterIC(pipes_struct
*p
)
3186 const struct ndr_interface_call
*call
;
3187 struct ndr_pull
*pull
;
3188 struct ndr_push
*push
;
3189 enum ndr_err_code ndr_err
;
3191 struct spoolss_CreatePrinterIC
*r
;
3193 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_CREATEPRINTERIC
];
3195 r
= talloc(talloc_tos(), struct spoolss_CreatePrinterIC
);
3200 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3205 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3211 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3212 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3213 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3218 if (DEBUGLEVEL
>= 10) {
3219 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC
, r
);
3222 r
->out
.result
= _spoolss_CreatePrinterIC(p
, r
);
3224 if (p
->rng_fault_state
) {
3226 /* Return true here, srv_pipe_hnd.c will take care */
3230 if (DEBUGLEVEL
>= 10) {
3231 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC
, r
);
3234 push
= ndr_push_init_ctx(r
, NULL
);
3240 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3241 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3246 blob
= ndr_push_blob(push
);
3247 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3257 static bool api_spoolss_PlayGDIScriptOnPrinterIC(pipes_struct
*p
)
3259 const struct ndr_interface_call
*call
;
3260 struct ndr_pull
*pull
;
3261 struct ndr_push
*push
;
3262 enum ndr_err_code ndr_err
;
3264 struct spoolss_PlayGDIScriptOnPrinterIC
*r
;
3266 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
];
3268 r
= talloc(talloc_tos(), struct spoolss_PlayGDIScriptOnPrinterIC
);
3273 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3278 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3284 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3285 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3286 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3291 if (DEBUGLEVEL
>= 10) {
3292 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, r
);
3295 r
->out
.result
= _spoolss_PlayGDIScriptOnPrinterIC(p
, r
);
3297 if (p
->rng_fault_state
) {
3299 /* Return true here, srv_pipe_hnd.c will take care */
3303 if (DEBUGLEVEL
>= 10) {
3304 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, r
);
3307 push
= ndr_push_init_ctx(r
, NULL
);
3313 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3314 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3319 blob
= ndr_push_blob(push
);
3320 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3330 static bool api_spoolss_DeletePrinterIC(pipes_struct
*p
)
3332 const struct ndr_interface_call
*call
;
3333 struct ndr_pull
*pull
;
3334 struct ndr_push
*push
;
3335 enum ndr_err_code ndr_err
;
3337 struct spoolss_DeletePrinterIC
*r
;
3339 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERIC
];
3341 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterIC
);
3346 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3351 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3357 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3358 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3359 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3364 if (DEBUGLEVEL
>= 10) {
3365 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC
, r
);
3368 r
->out
.result
= _spoolss_DeletePrinterIC(p
, r
);
3370 if (p
->rng_fault_state
) {
3372 /* Return true here, srv_pipe_hnd.c will take care */
3376 if (DEBUGLEVEL
>= 10) {
3377 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC
, r
);
3380 push
= ndr_push_init_ctx(r
, NULL
);
3386 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3387 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3392 blob
= ndr_push_blob(push
);
3393 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3403 static bool api_spoolss_AddPrinterConnection(pipes_struct
*p
)
3405 const struct ndr_interface_call
*call
;
3406 struct ndr_pull
*pull
;
3407 struct ndr_push
*push
;
3408 enum ndr_err_code ndr_err
;
3410 struct spoolss_AddPrinterConnection
*r
;
3412 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTERCONNECTION
];
3414 r
= talloc(talloc_tos(), struct spoolss_AddPrinterConnection
);
3419 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3424 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3430 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3431 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3432 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3437 if (DEBUGLEVEL
>= 10) {
3438 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection
, r
);
3441 r
->out
.result
= _spoolss_AddPrinterConnection(p
, r
);
3443 if (p
->rng_fault_state
) {
3445 /* Return true here, srv_pipe_hnd.c will take care */
3449 if (DEBUGLEVEL
>= 10) {
3450 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection
, r
);
3453 push
= ndr_push_init_ctx(r
, NULL
);
3459 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3460 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3465 blob
= ndr_push_blob(push
);
3466 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3476 static bool api_spoolss_DeletePrinterConnection(pipes_struct
*p
)
3478 const struct ndr_interface_call
*call
;
3479 struct ndr_pull
*pull
;
3480 struct ndr_push
*push
;
3481 enum ndr_err_code ndr_err
;
3483 struct spoolss_DeletePrinterConnection
*r
;
3485 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERCONNECTION
];
3487 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterConnection
);
3492 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3497 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3503 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3504 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3505 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3510 if (DEBUGLEVEL
>= 10) {
3511 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection
, r
);
3514 r
->out
.result
= _spoolss_DeletePrinterConnection(p
, r
);
3516 if (p
->rng_fault_state
) {
3518 /* Return true here, srv_pipe_hnd.c will take care */
3522 if (DEBUGLEVEL
>= 10) {
3523 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection
, r
);
3526 push
= ndr_push_init_ctx(r
, NULL
);
3532 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3533 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3538 blob
= ndr_push_blob(push
);
3539 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3549 static bool api_spoolss_PrinterMessageBox(pipes_struct
*p
)
3551 const struct ndr_interface_call
*call
;
3552 struct ndr_pull
*pull
;
3553 struct ndr_push
*push
;
3554 enum ndr_err_code ndr_err
;
3556 struct spoolss_PrinterMessageBox
*r
;
3558 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_PRINTERMESSAGEBOX
];
3560 r
= talloc(talloc_tos(), struct spoolss_PrinterMessageBox
);
3565 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3570 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3576 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3577 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3578 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3583 if (DEBUGLEVEL
>= 10) {
3584 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox
, r
);
3587 r
->out
.result
= _spoolss_PrinterMessageBox(p
, r
);
3589 if (p
->rng_fault_state
) {
3591 /* Return true here, srv_pipe_hnd.c will take care */
3595 if (DEBUGLEVEL
>= 10) {
3596 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox
, r
);
3599 push
= ndr_push_init_ctx(r
, NULL
);
3605 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3606 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3611 blob
= ndr_push_blob(push
);
3612 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3622 static bool api_spoolss_AddMonitor(pipes_struct
*p
)
3624 const struct ndr_interface_call
*call
;
3625 struct ndr_pull
*pull
;
3626 struct ndr_push
*push
;
3627 enum ndr_err_code ndr_err
;
3629 struct spoolss_AddMonitor
*r
;
3631 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDMONITOR
];
3633 r
= talloc(talloc_tos(), struct spoolss_AddMonitor
);
3638 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3643 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3649 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3650 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3651 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3656 if (DEBUGLEVEL
>= 10) {
3657 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor
, r
);
3660 r
->out
.result
= _spoolss_AddMonitor(p
, r
);
3662 if (p
->rng_fault_state
) {
3664 /* Return true here, srv_pipe_hnd.c will take care */
3668 if (DEBUGLEVEL
>= 10) {
3669 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor
, r
);
3672 push
= ndr_push_init_ctx(r
, NULL
);
3678 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3679 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3684 blob
= ndr_push_blob(push
);
3685 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3695 static bool api_spoolss_DeleteMonitor(pipes_struct
*p
)
3697 const struct ndr_interface_call
*call
;
3698 struct ndr_pull
*pull
;
3699 struct ndr_push
*push
;
3700 enum ndr_err_code ndr_err
;
3702 struct spoolss_DeleteMonitor
*r
;
3704 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEMONITOR
];
3706 r
= talloc(talloc_tos(), struct spoolss_DeleteMonitor
);
3711 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3716 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3722 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3723 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3724 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3729 if (DEBUGLEVEL
>= 10) {
3730 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor
, r
);
3733 r
->out
.result
= _spoolss_DeleteMonitor(p
, r
);
3735 if (p
->rng_fault_state
) {
3737 /* Return true here, srv_pipe_hnd.c will take care */
3741 if (DEBUGLEVEL
>= 10) {
3742 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor
, r
);
3745 push
= ndr_push_init_ctx(r
, NULL
);
3751 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3752 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3757 blob
= ndr_push_blob(push
);
3758 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3768 static bool api_spoolss_DeletePrintProcessor(pipes_struct
*p
)
3770 const struct ndr_interface_call
*call
;
3771 struct ndr_pull
*pull
;
3772 struct ndr_push
*push
;
3773 enum ndr_err_code ndr_err
;
3775 struct spoolss_DeletePrintProcessor
*r
;
3777 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTPROCESSOR
];
3779 r
= talloc(talloc_tos(), struct spoolss_DeletePrintProcessor
);
3784 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3789 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3795 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3796 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3797 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3802 if (DEBUGLEVEL
>= 10) {
3803 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor
, r
);
3806 r
->out
.result
= _spoolss_DeletePrintProcessor(p
, r
);
3808 if (p
->rng_fault_state
) {
3810 /* Return true here, srv_pipe_hnd.c will take care */
3814 if (DEBUGLEVEL
>= 10) {
3815 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor
, r
);
3818 push
= ndr_push_init_ctx(r
, NULL
);
3824 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3825 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3830 blob
= ndr_push_blob(push
);
3831 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3841 static bool api_spoolss_AddPrintProvidor(pipes_struct
*p
)
3843 const struct ndr_interface_call
*call
;
3844 struct ndr_pull
*pull
;
3845 struct ndr_push
*push
;
3846 enum ndr_err_code ndr_err
;
3848 struct spoolss_AddPrintProvidor
*r
;
3850 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTPROVIDOR
];
3852 r
= talloc(talloc_tos(), struct spoolss_AddPrintProvidor
);
3857 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3862 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3868 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3869 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3870 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3875 if (DEBUGLEVEL
>= 10) {
3876 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor
, r
);
3879 r
->out
.result
= _spoolss_AddPrintProvidor(p
, r
);
3881 if (p
->rng_fault_state
) {
3883 /* Return true here, srv_pipe_hnd.c will take care */
3887 if (DEBUGLEVEL
>= 10) {
3888 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor
, r
);
3891 push
= ndr_push_init_ctx(r
, NULL
);
3897 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3898 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3903 blob
= ndr_push_blob(push
);
3904 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3914 static bool api_spoolss_DeletePrintProvidor(pipes_struct
*p
)
3916 const struct ndr_interface_call
*call
;
3917 struct ndr_pull
*pull
;
3918 struct ndr_push
*push
;
3919 enum ndr_err_code ndr_err
;
3921 struct spoolss_DeletePrintProvidor
*r
;
3923 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTPROVIDOR
];
3925 r
= talloc(talloc_tos(), struct spoolss_DeletePrintProvidor
);
3930 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3935 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3941 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3942 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3943 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3948 if (DEBUGLEVEL
>= 10) {
3949 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor
, r
);
3952 r
->out
.result
= _spoolss_DeletePrintProvidor(p
, r
);
3954 if (p
->rng_fault_state
) {
3956 /* Return true here, srv_pipe_hnd.c will take care */
3960 if (DEBUGLEVEL
>= 10) {
3961 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor
, r
);
3964 push
= ndr_push_init_ctx(r
, NULL
);
3970 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3971 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3976 blob
= ndr_push_blob(push
);
3977 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3987 static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct
*p
)
3989 const struct ndr_interface_call
*call
;
3990 struct ndr_pull
*pull
;
3991 struct ndr_push
*push
;
3992 enum ndr_err_code ndr_err
;
3994 struct spoolss_EnumPrintProcDataTypes
*r
;
3996 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
];
3998 r
= talloc(talloc_tos(), struct spoolss_EnumPrintProcDataTypes
);
4003 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4008 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4014 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4015 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4016 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4021 if (DEBUGLEVEL
>= 10) {
4022 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes
, r
);
4025 ZERO_STRUCT(r
->out
);
4026 r
->out
.count
= talloc_zero(r
, uint32_t);
4027 if (r
->out
.count
== NULL
) {
4032 r
->out
.info
= talloc_zero(r
, union spoolss_PrintProcDataTypesInfo
*);
4033 if (r
->out
.info
== NULL
) {
4038 r
->out
.needed
= talloc_zero(r
, uint32_t);
4039 if (r
->out
.needed
== NULL
) {
4044 r
->out
.result
= _spoolss_EnumPrintProcDataTypes(p
, r
);
4046 if (p
->rng_fault_state
) {
4048 /* Return true here, srv_pipe_hnd.c will take care */
4052 if (DEBUGLEVEL
>= 10) {
4053 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes
, r
);
4056 push
= ndr_push_init_ctx(r
, NULL
);
4062 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4063 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4068 blob
= ndr_push_blob(push
);
4069 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4079 static bool api_spoolss_ResetPrinter(pipes_struct
*p
)
4081 const struct ndr_interface_call
*call
;
4082 struct ndr_pull
*pull
;
4083 struct ndr_push
*push
;
4084 enum ndr_err_code ndr_err
;
4086 struct spoolss_ResetPrinter
*r
;
4088 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_RESETPRINTER
];
4090 r
= talloc(talloc_tos(), struct spoolss_ResetPrinter
);
4095 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4100 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4106 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4107 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4108 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4113 if (DEBUGLEVEL
>= 10) {
4114 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter
, r
);
4117 r
->out
.result
= _spoolss_ResetPrinter(p
, r
);
4119 if (p
->rng_fault_state
) {
4121 /* Return true here, srv_pipe_hnd.c will take care */
4125 if (DEBUGLEVEL
>= 10) {
4126 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter
, r
);
4129 push
= ndr_push_init_ctx(r
, NULL
);
4135 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4136 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4141 blob
= ndr_push_blob(push
);
4142 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4152 static bool api_spoolss_GetPrinterDriver2(pipes_struct
*p
)
4154 const struct ndr_interface_call
*call
;
4155 struct ndr_pull
*pull
;
4156 struct ndr_push
*push
;
4157 enum ndr_err_code ndr_err
;
4159 struct spoolss_GetPrinterDriver2
*r
;
4161 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTERDRIVER2
];
4163 r
= talloc(talloc_tos(), struct spoolss_GetPrinterDriver2
);
4168 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4173 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4179 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4180 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4181 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4186 if (DEBUGLEVEL
>= 10) {
4187 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2
, r
);
4190 ZERO_STRUCT(r
->out
);
4191 r
->out
.info
= talloc_zero(r
, union spoolss_DriverInfo
);
4192 if (r
->out
.info
== NULL
) {
4197 r
->out
.needed
= talloc_zero(r
, uint32_t);
4198 if (r
->out
.needed
== NULL
) {
4203 r
->out
.server_major_version
= talloc_zero(r
, uint32_t);
4204 if (r
->out
.server_major_version
== NULL
) {
4209 r
->out
.server_minor_version
= talloc_zero(r
, uint32_t);
4210 if (r
->out
.server_minor_version
== NULL
) {
4215 r
->out
.result
= _spoolss_GetPrinterDriver2(p
, r
);
4217 if (p
->rng_fault_state
) {
4219 /* Return true here, srv_pipe_hnd.c will take care */
4223 if (DEBUGLEVEL
>= 10) {
4224 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2
, r
);
4227 push
= ndr_push_init_ctx(r
, NULL
);
4233 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4234 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4239 blob
= ndr_push_blob(push
);
4240 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4250 static bool api_spoolss_FindFirstPrinterChangeNotification(pipes_struct
*p
)
4252 const struct ndr_interface_call
*call
;
4253 struct ndr_pull
*pull
;
4254 struct ndr_push
*push
;
4255 enum ndr_err_code ndr_err
;
4257 struct spoolss_FindFirstPrinterChangeNotification
*r
;
4259 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
];
4261 r
= talloc(talloc_tos(), struct spoolss_FindFirstPrinterChangeNotification
);
4266 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4271 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4277 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4278 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4279 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4284 if (DEBUGLEVEL
>= 10) {
4285 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification
, r
);
4288 r
->out
.result
= _spoolss_FindFirstPrinterChangeNotification(p
, r
);
4290 if (p
->rng_fault_state
) {
4292 /* Return true here, srv_pipe_hnd.c will take care */
4296 if (DEBUGLEVEL
>= 10) {
4297 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification
, r
);
4300 push
= ndr_push_init_ctx(r
, NULL
);
4306 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4307 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4312 blob
= ndr_push_blob(push
);
4313 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4323 static bool api_spoolss_FindNextPrinterChangeNotification(pipes_struct
*p
)
4325 const struct ndr_interface_call
*call
;
4326 struct ndr_pull
*pull
;
4327 struct ndr_push
*push
;
4328 enum ndr_err_code ndr_err
;
4330 struct spoolss_FindNextPrinterChangeNotification
*r
;
4332 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
];
4334 r
= talloc(talloc_tos(), struct spoolss_FindNextPrinterChangeNotification
);
4339 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4344 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4350 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4351 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4352 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4357 if (DEBUGLEVEL
>= 10) {
4358 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification
, r
);
4361 r
->out
.result
= _spoolss_FindNextPrinterChangeNotification(p
, r
);
4363 if (p
->rng_fault_state
) {
4365 /* Return true here, srv_pipe_hnd.c will take care */
4369 if (DEBUGLEVEL
>= 10) {
4370 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification
, r
);
4373 push
= ndr_push_init_ctx(r
, NULL
);
4379 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4380 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4385 blob
= ndr_push_blob(push
);
4386 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4396 static bool api_spoolss_FindClosePrinterNotify(pipes_struct
*p
)
4398 const struct ndr_interface_call
*call
;
4399 struct ndr_pull
*pull
;
4400 struct ndr_push
*push
;
4401 enum ndr_err_code ndr_err
;
4403 struct spoolss_FindClosePrinterNotify
*r
;
4405 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
];
4407 r
= talloc(talloc_tos(), struct spoolss_FindClosePrinterNotify
);
4412 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4417 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4423 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4424 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4425 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4430 if (DEBUGLEVEL
>= 10) {
4431 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify
, r
);
4434 r
->out
.result
= _spoolss_FindClosePrinterNotify(p
, r
);
4436 if (p
->rng_fault_state
) {
4438 /* Return true here, srv_pipe_hnd.c will take care */
4442 if (DEBUGLEVEL
>= 10) {
4443 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify
, r
);
4446 push
= ndr_push_init_ctx(r
, NULL
);
4452 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4453 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4458 blob
= ndr_push_blob(push
);
4459 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4469 static bool api_spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct
*p
)
4471 const struct ndr_interface_call
*call
;
4472 struct ndr_pull
*pull
;
4473 struct ndr_push
*push
;
4474 enum ndr_err_code ndr_err
;
4476 struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
;
4478 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
];
4480 r
= talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotificationOld
);
4485 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4490 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4496 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4497 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4498 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4503 if (DEBUGLEVEL
>= 10) {
4504 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, r
);
4507 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotificationOld(p
, r
);
4509 if (p
->rng_fault_state
) {
4511 /* Return true here, srv_pipe_hnd.c will take care */
4515 if (DEBUGLEVEL
>= 10) {
4516 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, r
);
4519 push
= ndr_push_init_ctx(r
, NULL
);
4525 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4526 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4531 blob
= ndr_push_blob(push
);
4532 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4542 static bool api_spoolss_ReplyOpenPrinter(pipes_struct
*p
)
4544 const struct ndr_interface_call
*call
;
4545 struct ndr_pull
*pull
;
4546 struct ndr_push
*push
;
4547 enum ndr_err_code ndr_err
;
4549 struct spoolss_ReplyOpenPrinter
*r
;
4551 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_REPLYOPENPRINTER
];
4553 r
= talloc(talloc_tos(), struct spoolss_ReplyOpenPrinter
);
4558 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4563 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4569 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4570 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4571 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4576 if (DEBUGLEVEL
>= 10) {
4577 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter
, r
);
4580 ZERO_STRUCT(r
->out
);
4581 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
4582 if (r
->out
.handle
== NULL
) {
4587 r
->out
.result
= _spoolss_ReplyOpenPrinter(p
, r
);
4589 if (p
->rng_fault_state
) {
4591 /* Return true here, srv_pipe_hnd.c will take care */
4595 if (DEBUGLEVEL
>= 10) {
4596 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter
, r
);
4599 push
= ndr_push_init_ctx(r
, NULL
);
4605 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4606 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4611 blob
= ndr_push_blob(push
);
4612 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4622 static bool api_spoolss_RouterReplyPrinter(pipes_struct
*p
)
4624 const struct ndr_interface_call
*call
;
4625 struct ndr_pull
*pull
;
4626 struct ndr_push
*push
;
4627 enum ndr_err_code ndr_err
;
4629 struct spoolss_RouterReplyPrinter
*r
;
4631 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERREPLYPRINTER
];
4633 r
= talloc(talloc_tos(), struct spoolss_RouterReplyPrinter
);
4638 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4643 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4649 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4650 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4651 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4656 if (DEBUGLEVEL
>= 10) {
4657 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter
, r
);
4660 r
->out
.result
= _spoolss_RouterReplyPrinter(p
, r
);
4662 if (p
->rng_fault_state
) {
4664 /* Return true here, srv_pipe_hnd.c will take care */
4668 if (DEBUGLEVEL
>= 10) {
4669 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter
, r
);
4672 push
= ndr_push_init_ctx(r
, NULL
);
4678 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4679 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4684 blob
= ndr_push_blob(push
);
4685 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4695 static bool api_spoolss_ReplyClosePrinter(pipes_struct
*p
)
4697 const struct ndr_interface_call
*call
;
4698 struct ndr_pull
*pull
;
4699 struct ndr_push
*push
;
4700 enum ndr_err_code ndr_err
;
4702 struct spoolss_ReplyClosePrinter
*r
;
4704 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_REPLYCLOSEPRINTER
];
4706 r
= talloc(talloc_tos(), struct spoolss_ReplyClosePrinter
);
4711 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4716 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4722 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4723 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4724 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4729 if (DEBUGLEVEL
>= 10) {
4730 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter
, r
);
4733 ZERO_STRUCT(r
->out
);
4734 r
->out
.handle
= r
->in
.handle
;
4735 r
->out
.result
= _spoolss_ReplyClosePrinter(p
, r
);
4737 if (p
->rng_fault_state
) {
4739 /* Return true here, srv_pipe_hnd.c will take care */
4743 if (DEBUGLEVEL
>= 10) {
4744 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter
, r
);
4747 push
= ndr_push_init_ctx(r
, NULL
);
4753 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4754 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4759 blob
= ndr_push_blob(push
);
4760 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4770 static bool api_spoolss_AddPortEx(pipes_struct
*p
)
4772 const struct ndr_interface_call
*call
;
4773 struct ndr_pull
*pull
;
4774 struct ndr_push
*push
;
4775 enum ndr_err_code ndr_err
;
4777 struct spoolss_AddPortEx
*r
;
4779 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPORTEX
];
4781 r
= talloc(talloc_tos(), struct spoolss_AddPortEx
);
4786 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4791 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4797 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4798 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4799 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4804 if (DEBUGLEVEL
>= 10) {
4805 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx
, r
);
4808 r
->out
.result
= _spoolss_AddPortEx(p
, r
);
4810 if (p
->rng_fault_state
) {
4812 /* Return true here, srv_pipe_hnd.c will take care */
4816 if (DEBUGLEVEL
>= 10) {
4817 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx
, r
);
4820 push
= ndr_push_init_ctx(r
, NULL
);
4826 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4827 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4832 blob
= ndr_push_blob(push
);
4833 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4843 static bool api_spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct
*p
)
4845 const struct ndr_interface_call
*call
;
4846 struct ndr_pull
*pull
;
4847 struct ndr_push
*push
;
4848 enum ndr_err_code ndr_err
;
4850 struct spoolss_RouterFindFirstPrinterChangeNotification
*r
;
4852 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
];
4854 r
= talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotification
);
4859 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4864 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4870 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4871 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4872 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4877 if (DEBUGLEVEL
>= 10) {
4878 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, r
);
4881 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotification(p
, r
);
4883 if (p
->rng_fault_state
) {
4885 /* Return true here, srv_pipe_hnd.c will take care */
4889 if (DEBUGLEVEL
>= 10) {
4890 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, r
);
4893 push
= ndr_push_init_ctx(r
, NULL
);
4899 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4900 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4905 blob
= ndr_push_blob(push
);
4906 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4916 static bool api_spoolss_SpoolerInit(pipes_struct
*p
)
4918 const struct ndr_interface_call
*call
;
4919 struct ndr_pull
*pull
;
4920 struct ndr_push
*push
;
4921 enum ndr_err_code ndr_err
;
4923 struct spoolss_SpoolerInit
*r
;
4925 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SPOOLERINIT
];
4927 r
= talloc(talloc_tos(), struct spoolss_SpoolerInit
);
4932 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4937 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4943 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4944 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4945 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4950 if (DEBUGLEVEL
>= 10) {
4951 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit
, r
);
4954 r
->out
.result
= _spoolss_SpoolerInit(p
, r
);
4956 if (p
->rng_fault_state
) {
4958 /* Return true here, srv_pipe_hnd.c will take care */
4962 if (DEBUGLEVEL
>= 10) {
4963 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit
, r
);
4966 push
= ndr_push_init_ctx(r
, NULL
);
4972 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4973 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4978 blob
= ndr_push_blob(push
);
4979 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4989 static bool api_spoolss_ResetPrinterEx(pipes_struct
*p
)
4991 const struct ndr_interface_call
*call
;
4992 struct ndr_pull
*pull
;
4993 struct ndr_push
*push
;
4994 enum ndr_err_code ndr_err
;
4996 struct spoolss_ResetPrinterEx
*r
;
4998 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_RESETPRINTEREX
];
5000 r
= talloc(talloc_tos(), struct spoolss_ResetPrinterEx
);
5005 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5010 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5016 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5017 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5018 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5023 if (DEBUGLEVEL
>= 10) {
5024 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx
, r
);
5027 r
->out
.result
= _spoolss_ResetPrinterEx(p
, r
);
5029 if (p
->rng_fault_state
) {
5031 /* Return true here, srv_pipe_hnd.c will take care */
5035 if (DEBUGLEVEL
>= 10) {
5036 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx
, r
);
5039 push
= ndr_push_init_ctx(r
, NULL
);
5045 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5046 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5051 blob
= ndr_push_blob(push
);
5052 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5062 static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct
*p
)
5064 const struct ndr_interface_call
*call
;
5065 struct ndr_pull
*pull
;
5066 struct ndr_push
*push
;
5067 enum ndr_err_code ndr_err
;
5069 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
;
5071 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
];
5073 r
= talloc(talloc_tos(), struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
);
5078 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5083 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5089 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5090 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5091 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5096 if (DEBUGLEVEL
>= 10) {
5097 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, r
);
5100 r
->out
.result
= _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p
, r
);
5102 if (p
->rng_fault_state
) {
5104 /* Return true here, srv_pipe_hnd.c will take care */
5108 if (DEBUGLEVEL
>= 10) {
5109 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, r
);
5112 push
= ndr_push_init_ctx(r
, NULL
);
5118 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5119 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5124 blob
= ndr_push_blob(push
);
5125 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5135 static bool api_spoolss_RouterReplyPrinterEx(pipes_struct
*p
)
5137 const struct ndr_interface_call
*call
;
5138 struct ndr_pull
*pull
;
5139 struct ndr_push
*push
;
5140 enum ndr_err_code ndr_err
;
5142 struct spoolss_RouterReplyPrinterEx
*r
;
5144 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERREPLYPRINTEREX
];
5146 r
= talloc(talloc_tos(), struct spoolss_RouterReplyPrinterEx
);
5151 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5156 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5162 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5163 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5164 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5169 if (DEBUGLEVEL
>= 10) {
5170 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx
, r
);
5173 ZERO_STRUCT(r
->out
);
5174 r
->out
.reply_result
= talloc_zero(r
, uint32_t);
5175 if (r
->out
.reply_result
== NULL
) {
5180 r
->out
.result
= _spoolss_RouterReplyPrinterEx(p
, r
);
5182 if (p
->rng_fault_state
) {
5184 /* Return true here, srv_pipe_hnd.c will take care */
5188 if (DEBUGLEVEL
>= 10) {
5189 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx
, r
);
5192 push
= ndr_push_init_ctx(r
, NULL
);
5198 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5199 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5204 blob
= ndr_push_blob(push
);
5205 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5215 static bool api_spoolss_RouterRefreshPrinterChangeNotify(pipes_struct
*p
)
5217 const struct ndr_interface_call
*call
;
5218 struct ndr_pull
*pull
;
5219 struct ndr_push
*push
;
5220 enum ndr_err_code ndr_err
;
5222 struct spoolss_RouterRefreshPrinterChangeNotify
*r
;
5224 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
];
5226 r
= talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotify
);
5231 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5236 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5242 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5243 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5244 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5249 if (DEBUGLEVEL
>= 10) {
5250 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, r
);
5253 ZERO_STRUCT(r
->out
);
5254 r
->out
.info
= talloc_zero(r
, struct spoolss_NotifyInfo
*);
5255 if (r
->out
.info
== NULL
) {
5260 r
->out
.result
= _spoolss_RouterRefreshPrinterChangeNotify(p
, r
);
5262 if (p
->rng_fault_state
) {
5264 /* Return true here, srv_pipe_hnd.c will take care */
5268 if (DEBUGLEVEL
>= 10) {
5269 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, r
);
5272 push
= ndr_push_init_ctx(r
, NULL
);
5278 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5279 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5284 blob
= ndr_push_blob(push
);
5285 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5295 static bool api_spoolss_44(pipes_struct
*p
)
5297 const struct ndr_interface_call
*call
;
5298 struct ndr_pull
*pull
;
5299 struct ndr_push
*push
;
5300 enum ndr_err_code ndr_err
;
5302 struct spoolss_44
*r
;
5304 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_44
];
5306 r
= talloc(talloc_tos(), struct spoolss_44
);
5311 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5316 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5322 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5323 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5329 if (DEBUGLEVEL
>= 10) {
5330 NDR_PRINT_IN_DEBUG(spoolss_44
, r
);
5333 r
->out
.result
= _spoolss_44(p
, r
);
5335 if (p
->rng_fault_state
) {
5337 /* Return true here, srv_pipe_hnd.c will take care */
5341 if (DEBUGLEVEL
>= 10) {
5342 NDR_PRINT_OUT_DEBUG(spoolss_44
, r
);
5345 push
= ndr_push_init_ctx(r
, NULL
);
5351 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5352 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5357 blob
= ndr_push_blob(push
);
5358 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5368 static bool api_spoolss_OpenPrinterEx(pipes_struct
*p
)
5370 const struct ndr_interface_call
*call
;
5371 struct ndr_pull
*pull
;
5372 struct ndr_push
*push
;
5373 enum ndr_err_code ndr_err
;
5375 struct spoolss_OpenPrinterEx
*r
;
5377 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_OPENPRINTEREX
];
5379 r
= talloc(talloc_tos(), struct spoolss_OpenPrinterEx
);
5384 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5389 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5395 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5396 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5397 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5402 if (DEBUGLEVEL
>= 10) {
5403 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx
, r
);
5406 ZERO_STRUCT(r
->out
);
5407 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
5408 if (r
->out
.handle
== NULL
) {
5413 r
->out
.result
= _spoolss_OpenPrinterEx(p
, r
);
5415 if (p
->rng_fault_state
) {
5417 /* Return true here, srv_pipe_hnd.c will take care */
5421 if (DEBUGLEVEL
>= 10) {
5422 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx
, r
);
5425 push
= ndr_push_init_ctx(r
, NULL
);
5431 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5432 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5437 blob
= ndr_push_blob(push
);
5438 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5448 static bool api_spoolss_AddPrinterEx(pipes_struct
*p
)
5450 const struct ndr_interface_call
*call
;
5451 struct ndr_pull
*pull
;
5452 struct ndr_push
*push
;
5453 enum ndr_err_code ndr_err
;
5455 struct spoolss_AddPrinterEx
*r
;
5457 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTEREX
];
5459 r
= talloc(talloc_tos(), struct spoolss_AddPrinterEx
);
5464 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5469 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5475 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5476 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5477 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5482 if (DEBUGLEVEL
>= 10) {
5483 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx
, r
);
5486 ZERO_STRUCT(r
->out
);
5487 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
5488 if (r
->out
.handle
== NULL
) {
5493 r
->out
.result
= _spoolss_AddPrinterEx(p
, r
);
5495 if (p
->rng_fault_state
) {
5497 /* Return true here, srv_pipe_hnd.c will take care */
5501 if (DEBUGLEVEL
>= 10) {
5502 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx
, r
);
5505 push
= ndr_push_init_ctx(r
, NULL
);
5511 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5517 blob
= ndr_push_blob(push
);
5518 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5528 static bool api_spoolss_47(pipes_struct
*p
)
5530 const struct ndr_interface_call
*call
;
5531 struct ndr_pull
*pull
;
5532 struct ndr_push
*push
;
5533 enum ndr_err_code ndr_err
;
5535 struct spoolss_47
*r
;
5537 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_47
];
5539 r
= talloc(talloc_tos(), struct spoolss_47
);
5544 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5549 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5555 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5556 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5557 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5562 if (DEBUGLEVEL
>= 10) {
5563 NDR_PRINT_IN_DEBUG(spoolss_47
, r
);
5566 r
->out
.result
= _spoolss_47(p
, r
);
5568 if (p
->rng_fault_state
) {
5570 /* Return true here, srv_pipe_hnd.c will take care */
5574 if (DEBUGLEVEL
>= 10) {
5575 NDR_PRINT_OUT_DEBUG(spoolss_47
, r
);
5578 push
= ndr_push_init_ctx(r
, NULL
);
5584 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5585 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5590 blob
= ndr_push_blob(push
);
5591 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5601 static bool api_spoolss_EnumPrinterData(pipes_struct
*p
)
5603 const struct ndr_interface_call
*call
;
5604 struct ndr_pull
*pull
;
5605 struct ndr_push
*push
;
5606 enum ndr_err_code ndr_err
;
5608 struct spoolss_EnumPrinterData
*r
;
5610 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERDATA
];
5612 r
= talloc(talloc_tos(), struct spoolss_EnumPrinterData
);
5617 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5622 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5628 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5629 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5630 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5635 if (DEBUGLEVEL
>= 10) {
5636 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData
, r
);
5639 ZERO_STRUCT(r
->out
);
5640 r
->out
.value_name
= talloc_zero_array(r
, const char, r
->in
.value_offered
/ 2);
5641 if (r
->out
.value_name
== NULL
) {
5646 r
->out
.value_needed
= talloc_zero(r
, uint32_t);
5647 if (r
->out
.value_needed
== NULL
) {
5652 r
->out
.printerdata_type
= talloc_zero(r
, uint32_t);
5653 if (r
->out
.printerdata_type
== NULL
) {
5658 r
->out
.buffer
= talloc_zero(r
, DATA_BLOB
);
5659 if (r
->out
.buffer
== NULL
) {
5664 r
->out
.data_needed
= talloc_zero(r
, uint32_t);
5665 if (r
->out
.data_needed
== NULL
) {
5670 r
->out
.result
= _spoolss_EnumPrinterData(p
, r
);
5672 if (p
->rng_fault_state
) {
5674 /* Return true here, srv_pipe_hnd.c will take care */
5678 if (DEBUGLEVEL
>= 10) {
5679 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData
, r
);
5682 push
= ndr_push_init_ctx(r
, NULL
);
5688 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5689 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5694 blob
= ndr_push_blob(push
);
5695 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5705 static bool api_spoolss_DeletePrinterData(pipes_struct
*p
)
5707 const struct ndr_interface_call
*call
;
5708 struct ndr_pull
*pull
;
5709 struct ndr_push
*push
;
5710 enum ndr_err_code ndr_err
;
5712 struct spoolss_DeletePrinterData
*r
;
5714 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERDATA
];
5716 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterData
);
5721 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5726 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5732 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5733 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5734 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5739 if (DEBUGLEVEL
>= 10) {
5740 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData
, r
);
5743 r
->out
.result
= _spoolss_DeletePrinterData(p
, r
);
5745 if (p
->rng_fault_state
) {
5747 /* Return true here, srv_pipe_hnd.c will take care */
5751 if (DEBUGLEVEL
>= 10) {
5752 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData
, r
);
5755 push
= ndr_push_init_ctx(r
, NULL
);
5761 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5762 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5767 blob
= ndr_push_blob(push
);
5768 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5778 static bool api_spoolss_4a(pipes_struct
*p
)
5780 const struct ndr_interface_call
*call
;
5781 struct ndr_pull
*pull
;
5782 struct ndr_push
*push
;
5783 enum ndr_err_code ndr_err
;
5785 struct spoolss_4a
*r
;
5787 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_4A
];
5789 r
= talloc(talloc_tos(), struct spoolss_4a
);
5794 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5799 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5805 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5806 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5807 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5812 if (DEBUGLEVEL
>= 10) {
5813 NDR_PRINT_IN_DEBUG(spoolss_4a
, r
);
5816 r
->out
.result
= _spoolss_4a(p
, r
);
5818 if (p
->rng_fault_state
) {
5820 /* Return true here, srv_pipe_hnd.c will take care */
5824 if (DEBUGLEVEL
>= 10) {
5825 NDR_PRINT_OUT_DEBUG(spoolss_4a
, r
);
5828 push
= ndr_push_init_ctx(r
, NULL
);
5834 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5835 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5840 blob
= ndr_push_blob(push
);
5841 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5851 static bool api_spoolss_4b(pipes_struct
*p
)
5853 const struct ndr_interface_call
*call
;
5854 struct ndr_pull
*pull
;
5855 struct ndr_push
*push
;
5856 enum ndr_err_code ndr_err
;
5858 struct spoolss_4b
*r
;
5860 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_4B
];
5862 r
= talloc(talloc_tos(), struct spoolss_4b
);
5867 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5872 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5878 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5879 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5880 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5885 if (DEBUGLEVEL
>= 10) {
5886 NDR_PRINT_IN_DEBUG(spoolss_4b
, r
);
5889 r
->out
.result
= _spoolss_4b(p
, r
);
5891 if (p
->rng_fault_state
) {
5893 /* Return true here, srv_pipe_hnd.c will take care */
5897 if (DEBUGLEVEL
>= 10) {
5898 NDR_PRINT_OUT_DEBUG(spoolss_4b
, r
);
5901 push
= ndr_push_init_ctx(r
, NULL
);
5907 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5908 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5913 blob
= ndr_push_blob(push
);
5914 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5924 static bool api_spoolss_4c(pipes_struct
*p
)
5926 const struct ndr_interface_call
*call
;
5927 struct ndr_pull
*pull
;
5928 struct ndr_push
*push
;
5929 enum ndr_err_code ndr_err
;
5931 struct spoolss_4c
*r
;
5933 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_4C
];
5935 r
= talloc(talloc_tos(), struct spoolss_4c
);
5940 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5945 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5951 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5952 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5953 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5958 if (DEBUGLEVEL
>= 10) {
5959 NDR_PRINT_IN_DEBUG(spoolss_4c
, r
);
5962 r
->out
.result
= _spoolss_4c(p
, r
);
5964 if (p
->rng_fault_state
) {
5966 /* Return true here, srv_pipe_hnd.c will take care */
5970 if (DEBUGLEVEL
>= 10) {
5971 NDR_PRINT_OUT_DEBUG(spoolss_4c
, r
);
5974 push
= ndr_push_init_ctx(r
, NULL
);
5980 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5981 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5986 blob
= ndr_push_blob(push
);
5987 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5997 static bool api_spoolss_SetPrinterDataEx(pipes_struct
*p
)
5999 const struct ndr_interface_call
*call
;
6000 struct ndr_pull
*pull
;
6001 struct ndr_push
*push
;
6002 enum ndr_err_code ndr_err
;
6004 struct spoolss_SetPrinterDataEx
*r
;
6006 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETPRINTERDATAEX
];
6008 r
= talloc(talloc_tos(), struct spoolss_SetPrinterDataEx
);
6013 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6018 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6024 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6025 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6026 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6031 if (DEBUGLEVEL
>= 10) {
6032 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx
, r
);
6035 r
->out
.result
= _spoolss_SetPrinterDataEx(p
, r
);
6037 if (p
->rng_fault_state
) {
6039 /* Return true here, srv_pipe_hnd.c will take care */
6043 if (DEBUGLEVEL
>= 10) {
6044 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx
, r
);
6047 push
= ndr_push_init_ctx(r
, NULL
);
6053 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6054 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6059 blob
= ndr_push_blob(push
);
6060 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6070 static bool api_spoolss_GetPrinterDataEx(pipes_struct
*p
)
6072 const struct ndr_interface_call
*call
;
6073 struct ndr_pull
*pull
;
6074 struct ndr_push
*push
;
6075 enum ndr_err_code ndr_err
;
6077 struct spoolss_GetPrinterDataEx
*r
;
6079 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTERDATAEX
];
6081 r
= talloc(talloc_tos(), struct spoolss_GetPrinterDataEx
);
6086 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6091 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6097 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6098 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6099 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6104 if (DEBUGLEVEL
>= 10) {
6105 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx
, r
);
6108 ZERO_STRUCT(r
->out
);
6109 r
->out
.type
= talloc_zero(r
, uint32_t);
6110 if (r
->out
.type
== NULL
) {
6115 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
6116 if (r
->out
.buffer
== NULL
) {
6121 r
->out
.needed
= talloc_zero(r
, uint32_t);
6122 if (r
->out
.needed
== NULL
) {
6127 r
->out
.result
= _spoolss_GetPrinterDataEx(p
, r
);
6129 if (p
->rng_fault_state
) {
6131 /* Return true here, srv_pipe_hnd.c will take care */
6135 if (DEBUGLEVEL
>= 10) {
6136 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx
, r
);
6139 push
= ndr_push_init_ctx(r
, NULL
);
6145 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6146 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6151 blob
= ndr_push_blob(push
);
6152 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6162 static bool api_spoolss_EnumPrinterDataEx(pipes_struct
*p
)
6164 const struct ndr_interface_call
*call
;
6165 struct ndr_pull
*pull
;
6166 struct ndr_push
*push
;
6167 enum ndr_err_code ndr_err
;
6169 struct spoolss_EnumPrinterDataEx
*r
;
6171 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERDATAEX
];
6173 r
= talloc(talloc_tos(), struct spoolss_EnumPrinterDataEx
);
6178 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6183 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6189 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6190 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6191 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6196 if (DEBUGLEVEL
>= 10) {
6197 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx
, r
);
6200 ZERO_STRUCT(r
->out
);
6201 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
6202 if (r
->out
.buffer
== NULL
) {
6207 r
->out
.needed
= talloc_zero(r
, uint32_t);
6208 if (r
->out
.needed
== NULL
) {
6213 r
->out
.count
= talloc_zero(r
, uint32_t);
6214 if (r
->out
.count
== NULL
) {
6219 r
->out
.result
= _spoolss_EnumPrinterDataEx(p
, r
);
6221 if (p
->rng_fault_state
) {
6223 /* Return true here, srv_pipe_hnd.c will take care */
6227 if (DEBUGLEVEL
>= 10) {
6228 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx
, r
);
6231 push
= ndr_push_init_ctx(r
, NULL
);
6237 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6238 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6243 blob
= ndr_push_blob(push
);
6244 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6254 static bool api_spoolss_EnumPrinterKey(pipes_struct
*p
)
6256 const struct ndr_interface_call
*call
;
6257 struct ndr_pull
*pull
;
6258 struct ndr_push
*push
;
6259 enum ndr_err_code ndr_err
;
6261 struct spoolss_EnumPrinterKey
*r
;
6263 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERKEY
];
6265 r
= talloc(talloc_tos(), struct spoolss_EnumPrinterKey
);
6270 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6275 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6281 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6282 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6283 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6288 if (DEBUGLEVEL
>= 10) {
6289 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey
, r
);
6292 ZERO_STRUCT(r
->out
);
6293 r
->out
.key_buffer
= talloc_zero_array(r
, uint16_t, r
->in
.key_buffer_size
/ 2);
6294 if (r
->out
.key_buffer
== NULL
) {
6299 r
->out
.needed
= talloc_zero(r
, uint32_t);
6300 if (r
->out
.needed
== NULL
) {
6305 r
->out
.result
= _spoolss_EnumPrinterKey(p
, r
);
6307 if (p
->rng_fault_state
) {
6309 /* Return true here, srv_pipe_hnd.c will take care */
6313 if (DEBUGLEVEL
>= 10) {
6314 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey
, r
);
6317 push
= ndr_push_init_ctx(r
, NULL
);
6323 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6324 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6329 blob
= ndr_push_blob(push
);
6330 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6340 static bool api_spoolss_DeletePrinterDataEx(pipes_struct
*p
)
6342 const struct ndr_interface_call
*call
;
6343 struct ndr_pull
*pull
;
6344 struct ndr_push
*push
;
6345 enum ndr_err_code ndr_err
;
6347 struct spoolss_DeletePrinterDataEx
*r
;
6349 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERDATAEX
];
6351 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterDataEx
);
6356 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6361 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6367 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6368 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6369 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6374 if (DEBUGLEVEL
>= 10) {
6375 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx
, r
);
6378 r
->out
.result
= _spoolss_DeletePrinterDataEx(p
, r
);
6380 if (p
->rng_fault_state
) {
6382 /* Return true here, srv_pipe_hnd.c will take care */
6386 if (DEBUGLEVEL
>= 10) {
6387 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx
, r
);
6390 push
= ndr_push_init_ctx(r
, NULL
);
6396 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6397 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6402 blob
= ndr_push_blob(push
);
6403 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6413 static bool api_spoolss_DeletePrinterKey(pipes_struct
*p
)
6415 const struct ndr_interface_call
*call
;
6416 struct ndr_pull
*pull
;
6417 struct ndr_push
*push
;
6418 enum ndr_err_code ndr_err
;
6420 struct spoolss_DeletePrinterKey
*r
;
6422 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERKEY
];
6424 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterKey
);
6429 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6434 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6440 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6441 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6442 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6447 if (DEBUGLEVEL
>= 10) {
6448 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey
, r
);
6451 r
->out
.result
= _spoolss_DeletePrinterKey(p
, r
);
6453 if (p
->rng_fault_state
) {
6455 /* Return true here, srv_pipe_hnd.c will take care */
6459 if (DEBUGLEVEL
>= 10) {
6460 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey
, r
);
6463 push
= ndr_push_init_ctx(r
, NULL
);
6469 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6470 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6475 blob
= ndr_push_blob(push
);
6476 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6486 static bool api_spoolss_53(pipes_struct
*p
)
6488 const struct ndr_interface_call
*call
;
6489 struct ndr_pull
*pull
;
6490 struct ndr_push
*push
;
6491 enum ndr_err_code ndr_err
;
6493 struct spoolss_53
*r
;
6495 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_53
];
6497 r
= talloc(talloc_tos(), struct spoolss_53
);
6502 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6507 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6513 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6514 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6515 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6520 if (DEBUGLEVEL
>= 10) {
6521 NDR_PRINT_IN_DEBUG(spoolss_53
, r
);
6524 r
->out
.result
= _spoolss_53(p
, r
);
6526 if (p
->rng_fault_state
) {
6528 /* Return true here, srv_pipe_hnd.c will take care */
6532 if (DEBUGLEVEL
>= 10) {
6533 NDR_PRINT_OUT_DEBUG(spoolss_53
, r
);
6536 push
= ndr_push_init_ctx(r
, NULL
);
6542 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6543 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6548 blob
= ndr_push_blob(push
);
6549 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6559 static bool api_spoolss_DeletePrinterDriverEx(pipes_struct
*p
)
6561 const struct ndr_interface_call
*call
;
6562 struct ndr_pull
*pull
;
6563 struct ndr_push
*push
;
6564 enum ndr_err_code ndr_err
;
6566 struct spoolss_DeletePrinterDriverEx
*r
;
6568 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERDRIVEREX
];
6570 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterDriverEx
);
6575 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6580 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6586 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6587 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6588 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6593 if (DEBUGLEVEL
>= 10) {
6594 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx
, r
);
6597 r
->out
.result
= _spoolss_DeletePrinterDriverEx(p
, r
);
6599 if (p
->rng_fault_state
) {
6601 /* Return true here, srv_pipe_hnd.c will take care */
6605 if (DEBUGLEVEL
>= 10) {
6606 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx
, r
);
6609 push
= ndr_push_init_ctx(r
, NULL
);
6615 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6616 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6621 blob
= ndr_push_blob(push
);
6622 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6632 static bool api_spoolss_55(pipes_struct
*p
)
6634 const struct ndr_interface_call
*call
;
6635 struct ndr_pull
*pull
;
6636 struct ndr_push
*push
;
6637 enum ndr_err_code ndr_err
;
6639 struct spoolss_55
*r
;
6641 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_55
];
6643 r
= talloc(talloc_tos(), struct spoolss_55
);
6648 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6653 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6659 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6660 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6661 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6666 if (DEBUGLEVEL
>= 10) {
6667 NDR_PRINT_IN_DEBUG(spoolss_55
, r
);
6670 r
->out
.result
= _spoolss_55(p
, r
);
6672 if (p
->rng_fault_state
) {
6674 /* Return true here, srv_pipe_hnd.c will take care */
6678 if (DEBUGLEVEL
>= 10) {
6679 NDR_PRINT_OUT_DEBUG(spoolss_55
, r
);
6682 push
= ndr_push_init_ctx(r
, NULL
);
6688 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6689 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6694 blob
= ndr_push_blob(push
);
6695 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6705 static bool api_spoolss_56(pipes_struct
*p
)
6707 const struct ndr_interface_call
*call
;
6708 struct ndr_pull
*pull
;
6709 struct ndr_push
*push
;
6710 enum ndr_err_code ndr_err
;
6712 struct spoolss_56
*r
;
6714 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_56
];
6716 r
= talloc(talloc_tos(), struct spoolss_56
);
6721 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6726 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6732 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6733 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6734 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6739 if (DEBUGLEVEL
>= 10) {
6740 NDR_PRINT_IN_DEBUG(spoolss_56
, r
);
6743 r
->out
.result
= _spoolss_56(p
, r
);
6745 if (p
->rng_fault_state
) {
6747 /* Return true here, srv_pipe_hnd.c will take care */
6751 if (DEBUGLEVEL
>= 10) {
6752 NDR_PRINT_OUT_DEBUG(spoolss_56
, r
);
6755 push
= ndr_push_init_ctx(r
, NULL
);
6761 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6762 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6767 blob
= ndr_push_blob(push
);
6768 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6778 static bool api_spoolss_57(pipes_struct
*p
)
6780 const struct ndr_interface_call
*call
;
6781 struct ndr_pull
*pull
;
6782 struct ndr_push
*push
;
6783 enum ndr_err_code ndr_err
;
6785 struct spoolss_57
*r
;
6787 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_57
];
6789 r
= talloc(talloc_tos(), struct spoolss_57
);
6794 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6799 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6805 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6806 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6807 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6812 if (DEBUGLEVEL
>= 10) {
6813 NDR_PRINT_IN_DEBUG(spoolss_57
, r
);
6816 r
->out
.result
= _spoolss_57(p
, r
);
6818 if (p
->rng_fault_state
) {
6820 /* Return true here, srv_pipe_hnd.c will take care */
6824 if (DEBUGLEVEL
>= 10) {
6825 NDR_PRINT_OUT_DEBUG(spoolss_57
, r
);
6828 push
= ndr_push_init_ctx(r
, NULL
);
6834 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6835 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6840 blob
= ndr_push_blob(push
);
6841 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6851 static bool api_spoolss_XcvData(pipes_struct
*p
)
6853 const struct ndr_interface_call
*call
;
6854 struct ndr_pull
*pull
;
6855 struct ndr_push
*push
;
6856 enum ndr_err_code ndr_err
;
6858 struct spoolss_XcvData
*r
;
6860 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_XCVDATA
];
6862 r
= talloc(talloc_tos(), struct spoolss_XcvData
);
6867 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6872 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6878 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6879 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6880 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6885 if (DEBUGLEVEL
>= 10) {
6886 NDR_PRINT_IN_DEBUG(spoolss_XcvData
, r
);
6889 ZERO_STRUCT(r
->out
);
6890 r
->out
.status_code
= r
->in
.status_code
;
6891 r
->out
.out_data
= talloc_zero_array(r
, uint8_t, r
->in
.out_data_size
);
6892 if (r
->out
.out_data
== NULL
) {
6897 r
->out
.needed
= talloc_zero(r
, uint32_t);
6898 if (r
->out
.needed
== NULL
) {
6903 r
->out
.result
= _spoolss_XcvData(p
, r
);
6905 if (p
->rng_fault_state
) {
6907 /* Return true here, srv_pipe_hnd.c will take care */
6911 if (DEBUGLEVEL
>= 10) {
6912 NDR_PRINT_OUT_DEBUG(spoolss_XcvData
, r
);
6915 push
= ndr_push_init_ctx(r
, NULL
);
6921 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6922 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6927 blob
= ndr_push_blob(push
);
6928 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6938 static bool api_spoolss_AddPrinterDriverEx(pipes_struct
*p
)
6940 const struct ndr_interface_call
*call
;
6941 struct ndr_pull
*pull
;
6942 struct ndr_push
*push
;
6943 enum ndr_err_code ndr_err
;
6945 struct spoolss_AddPrinterDriverEx
*r
;
6947 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTERDRIVEREX
];
6949 r
= talloc(talloc_tos(), struct spoolss_AddPrinterDriverEx
);
6954 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6959 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6965 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6966 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6967 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6972 if (DEBUGLEVEL
>= 10) {
6973 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx
, r
);
6976 r
->out
.result
= _spoolss_AddPrinterDriverEx(p
, r
);
6978 if (p
->rng_fault_state
) {
6980 /* Return true here, srv_pipe_hnd.c will take care */
6984 if (DEBUGLEVEL
>= 10) {
6985 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx
, r
);
6988 push
= ndr_push_init_ctx(r
, NULL
);
6994 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6995 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7000 blob
= ndr_push_blob(push
);
7001 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7011 static bool api_spoolss_5a(pipes_struct
*p
)
7013 const struct ndr_interface_call
*call
;
7014 struct ndr_pull
*pull
;
7015 struct ndr_push
*push
;
7016 enum ndr_err_code ndr_err
;
7018 struct spoolss_5a
*r
;
7020 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5A
];
7022 r
= talloc(talloc_tos(), struct spoolss_5a
);
7027 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7032 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7038 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7039 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7040 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7045 if (DEBUGLEVEL
>= 10) {
7046 NDR_PRINT_IN_DEBUG(spoolss_5a
, r
);
7049 r
->out
.result
= _spoolss_5a(p
, r
);
7051 if (p
->rng_fault_state
) {
7053 /* Return true here, srv_pipe_hnd.c will take care */
7057 if (DEBUGLEVEL
>= 10) {
7058 NDR_PRINT_OUT_DEBUG(spoolss_5a
, r
);
7061 push
= ndr_push_init_ctx(r
, NULL
);
7067 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7068 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7073 blob
= ndr_push_blob(push
);
7074 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7084 static bool api_spoolss_5b(pipes_struct
*p
)
7086 const struct ndr_interface_call
*call
;
7087 struct ndr_pull
*pull
;
7088 struct ndr_push
*push
;
7089 enum ndr_err_code ndr_err
;
7091 struct spoolss_5b
*r
;
7093 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5B
];
7095 r
= talloc(talloc_tos(), struct spoolss_5b
);
7100 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7105 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7111 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7112 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7113 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7118 if (DEBUGLEVEL
>= 10) {
7119 NDR_PRINT_IN_DEBUG(spoolss_5b
, r
);
7122 r
->out
.result
= _spoolss_5b(p
, r
);
7124 if (p
->rng_fault_state
) {
7126 /* Return true here, srv_pipe_hnd.c will take care */
7130 if (DEBUGLEVEL
>= 10) {
7131 NDR_PRINT_OUT_DEBUG(spoolss_5b
, r
);
7134 push
= ndr_push_init_ctx(r
, NULL
);
7140 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7141 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7146 blob
= ndr_push_blob(push
);
7147 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7157 static bool api_spoolss_5c(pipes_struct
*p
)
7159 const struct ndr_interface_call
*call
;
7160 struct ndr_pull
*pull
;
7161 struct ndr_push
*push
;
7162 enum ndr_err_code ndr_err
;
7164 struct spoolss_5c
*r
;
7166 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5C
];
7168 r
= talloc(talloc_tos(), struct spoolss_5c
);
7173 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7178 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7184 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7185 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7186 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7191 if (DEBUGLEVEL
>= 10) {
7192 NDR_PRINT_IN_DEBUG(spoolss_5c
, r
);
7195 r
->out
.result
= _spoolss_5c(p
, r
);
7197 if (p
->rng_fault_state
) {
7199 /* Return true here, srv_pipe_hnd.c will take care */
7203 if (DEBUGLEVEL
>= 10) {
7204 NDR_PRINT_OUT_DEBUG(spoolss_5c
, r
);
7207 push
= ndr_push_init_ctx(r
, NULL
);
7213 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7214 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7219 blob
= ndr_push_blob(push
);
7220 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7230 static bool api_spoolss_5d(pipes_struct
*p
)
7232 const struct ndr_interface_call
*call
;
7233 struct ndr_pull
*pull
;
7234 struct ndr_push
*push
;
7235 enum ndr_err_code ndr_err
;
7237 struct spoolss_5d
*r
;
7239 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5D
];
7241 r
= talloc(talloc_tos(), struct spoolss_5d
);
7246 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7251 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7257 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7258 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7259 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7264 if (DEBUGLEVEL
>= 10) {
7265 NDR_PRINT_IN_DEBUG(spoolss_5d
, r
);
7268 r
->out
.result
= _spoolss_5d(p
, r
);
7270 if (p
->rng_fault_state
) {
7272 /* Return true here, srv_pipe_hnd.c will take care */
7276 if (DEBUGLEVEL
>= 10) {
7277 NDR_PRINT_OUT_DEBUG(spoolss_5d
, r
);
7280 push
= ndr_push_init_ctx(r
, NULL
);
7286 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7287 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7292 blob
= ndr_push_blob(push
);
7293 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7303 static bool api_spoolss_5e(pipes_struct
*p
)
7305 const struct ndr_interface_call
*call
;
7306 struct ndr_pull
*pull
;
7307 struct ndr_push
*push
;
7308 enum ndr_err_code ndr_err
;
7310 struct spoolss_5e
*r
;
7312 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5E
];
7314 r
= talloc(talloc_tos(), struct spoolss_5e
);
7319 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7324 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7330 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7331 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7332 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7337 if (DEBUGLEVEL
>= 10) {
7338 NDR_PRINT_IN_DEBUG(spoolss_5e
, r
);
7341 r
->out
.result
= _spoolss_5e(p
, r
);
7343 if (p
->rng_fault_state
) {
7345 /* Return true here, srv_pipe_hnd.c will take care */
7349 if (DEBUGLEVEL
>= 10) {
7350 NDR_PRINT_OUT_DEBUG(spoolss_5e
, r
);
7353 push
= ndr_push_init_ctx(r
, NULL
);
7359 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7360 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7365 blob
= ndr_push_blob(push
);
7366 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7376 static bool api_spoolss_5f(pipes_struct
*p
)
7378 const struct ndr_interface_call
*call
;
7379 struct ndr_pull
*pull
;
7380 struct ndr_push
*push
;
7381 enum ndr_err_code ndr_err
;
7383 struct spoolss_5f
*r
;
7385 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5F
];
7387 r
= talloc(talloc_tos(), struct spoolss_5f
);
7392 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7397 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7403 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7404 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7405 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7410 if (DEBUGLEVEL
>= 10) {
7411 NDR_PRINT_IN_DEBUG(spoolss_5f
, r
);
7414 r
->out
.result
= _spoolss_5f(p
, r
);
7416 if (p
->rng_fault_state
) {
7418 /* Return true here, srv_pipe_hnd.c will take care */
7422 if (DEBUGLEVEL
>= 10) {
7423 NDR_PRINT_OUT_DEBUG(spoolss_5f
, r
);
7426 push
= ndr_push_init_ctx(r
, NULL
);
7432 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7433 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7438 blob
= ndr_push_blob(push
);
7439 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7451 static struct api_struct api_spoolss_cmds
[] =
7453 {"SPOOLSS_ENUMPRINTERS", NDR_SPOOLSS_ENUMPRINTERS
, api_spoolss_EnumPrinters
},
7454 {"SPOOLSS_OPENPRINTER", NDR_SPOOLSS_OPENPRINTER
, api_spoolss_OpenPrinter
},
7455 {"SPOOLSS_SETJOB", NDR_SPOOLSS_SETJOB
, api_spoolss_SetJob
},
7456 {"SPOOLSS_GETJOB", NDR_SPOOLSS_GETJOB
, api_spoolss_GetJob
},
7457 {"SPOOLSS_ENUMJOBS", NDR_SPOOLSS_ENUMJOBS
, api_spoolss_EnumJobs
},
7458 {"SPOOLSS_ADDPRINTER", NDR_SPOOLSS_ADDPRINTER
, api_spoolss_AddPrinter
},
7459 {"SPOOLSS_DELETEPRINTER", NDR_SPOOLSS_DELETEPRINTER
, api_spoolss_DeletePrinter
},
7460 {"SPOOLSS_SETPRINTER", NDR_SPOOLSS_SETPRINTER
, api_spoolss_SetPrinter
},
7461 {"SPOOLSS_GETPRINTER", NDR_SPOOLSS_GETPRINTER
, api_spoolss_GetPrinter
},
7462 {"SPOOLSS_ADDPRINTERDRIVER", NDR_SPOOLSS_ADDPRINTERDRIVER
, api_spoolss_AddPrinterDriver
},
7463 {"SPOOLSS_ENUMPRINTERDRIVERS", NDR_SPOOLSS_ENUMPRINTERDRIVERS
, api_spoolss_EnumPrinterDrivers
},
7464 {"SPOOLSS_GETPRINTERDRIVER", NDR_SPOOLSS_GETPRINTERDRIVER
, api_spoolss_GetPrinterDriver
},
7465 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
, api_spoolss_GetPrinterDriverDirectory
},
7466 {"SPOOLSS_DELETEPRINTERDRIVER", NDR_SPOOLSS_DELETEPRINTERDRIVER
, api_spoolss_DeletePrinterDriver
},
7467 {"SPOOLSS_ADDPRINTPROCESSOR", NDR_SPOOLSS_ADDPRINTPROCESSOR
, api_spoolss_AddPrintProcessor
},
7468 {"SPOOLSS_ENUMPRINTPROCESSORS", NDR_SPOOLSS_ENUMPRINTPROCESSORS
, api_spoolss_EnumPrintProcessors
},
7469 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY", NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
, api_spoolss_GetPrintProcessorDirectory
},
7470 {"SPOOLSS_STARTDOCPRINTER", NDR_SPOOLSS_STARTDOCPRINTER
, api_spoolss_StartDocPrinter
},
7471 {"SPOOLSS_STARTPAGEPRINTER", NDR_SPOOLSS_STARTPAGEPRINTER
, api_spoolss_StartPagePrinter
},
7472 {"SPOOLSS_WRITEPRINTER", NDR_SPOOLSS_WRITEPRINTER
, api_spoolss_WritePrinter
},
7473 {"SPOOLSS_ENDPAGEPRINTER", NDR_SPOOLSS_ENDPAGEPRINTER
, api_spoolss_EndPagePrinter
},
7474 {"SPOOLSS_ABORTPRINTER", NDR_SPOOLSS_ABORTPRINTER
, api_spoolss_AbortPrinter
},
7475 {"SPOOLSS_READPRINTER", NDR_SPOOLSS_READPRINTER
, api_spoolss_ReadPrinter
},
7476 {"SPOOLSS_ENDDOCPRINTER", NDR_SPOOLSS_ENDDOCPRINTER
, api_spoolss_EndDocPrinter
},
7477 {"SPOOLSS_ADDJOB", NDR_SPOOLSS_ADDJOB
, api_spoolss_AddJob
},
7478 {"SPOOLSS_SCHEDULEJOB", NDR_SPOOLSS_SCHEDULEJOB
, api_spoolss_ScheduleJob
},
7479 {"SPOOLSS_GETPRINTERDATA", NDR_SPOOLSS_GETPRINTERDATA
, api_spoolss_GetPrinterData
},
7480 {"SPOOLSS_SETPRINTERDATA", NDR_SPOOLSS_SETPRINTERDATA
, api_spoolss_SetPrinterData
},
7481 {"SPOOLSS_WAITFORPRINTERCHANGE", NDR_SPOOLSS_WAITFORPRINTERCHANGE
, api_spoolss_WaitForPrinterChange
},
7482 {"SPOOLSS_CLOSEPRINTER", NDR_SPOOLSS_CLOSEPRINTER
, api_spoolss_ClosePrinter
},
7483 {"SPOOLSS_ADDFORM", NDR_SPOOLSS_ADDFORM
, api_spoolss_AddForm
},
7484 {"SPOOLSS_DELETEFORM", NDR_SPOOLSS_DELETEFORM
, api_spoolss_DeleteForm
},
7485 {"SPOOLSS_GETFORM", NDR_SPOOLSS_GETFORM
, api_spoolss_GetForm
},
7486 {"SPOOLSS_SETFORM", NDR_SPOOLSS_SETFORM
, api_spoolss_SetForm
},
7487 {"SPOOLSS_ENUMFORMS", NDR_SPOOLSS_ENUMFORMS
, api_spoolss_EnumForms
},
7488 {"SPOOLSS_ENUMPORTS", NDR_SPOOLSS_ENUMPORTS
, api_spoolss_EnumPorts
},
7489 {"SPOOLSS_ENUMMONITORS", NDR_SPOOLSS_ENUMMONITORS
, api_spoolss_EnumMonitors
},
7490 {"SPOOLSS_ADDPORT", NDR_SPOOLSS_ADDPORT
, api_spoolss_AddPort
},
7491 {"SPOOLSS_CONFIGUREPORT", NDR_SPOOLSS_CONFIGUREPORT
, api_spoolss_ConfigurePort
},
7492 {"SPOOLSS_DELETEPORT", NDR_SPOOLSS_DELETEPORT
, api_spoolss_DeletePort
},
7493 {"SPOOLSS_CREATEPRINTERIC", NDR_SPOOLSS_CREATEPRINTERIC
, api_spoolss_CreatePrinterIC
},
7494 {"SPOOLSS_PLAYGDISCRIPTONPRINTERIC", NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
, api_spoolss_PlayGDIScriptOnPrinterIC
},
7495 {"SPOOLSS_DELETEPRINTERIC", NDR_SPOOLSS_DELETEPRINTERIC
, api_spoolss_DeletePrinterIC
},
7496 {"SPOOLSS_ADDPRINTERCONNECTION", NDR_SPOOLSS_ADDPRINTERCONNECTION
, api_spoolss_AddPrinterConnection
},
7497 {"SPOOLSS_DELETEPRINTERCONNECTION", NDR_SPOOLSS_DELETEPRINTERCONNECTION
, api_spoolss_DeletePrinterConnection
},
7498 {"SPOOLSS_PRINTERMESSAGEBOX", NDR_SPOOLSS_PRINTERMESSAGEBOX
, api_spoolss_PrinterMessageBox
},
7499 {"SPOOLSS_ADDMONITOR", NDR_SPOOLSS_ADDMONITOR
, api_spoolss_AddMonitor
},
7500 {"SPOOLSS_DELETEMONITOR", NDR_SPOOLSS_DELETEMONITOR
, api_spoolss_DeleteMonitor
},
7501 {"SPOOLSS_DELETEPRINTPROCESSOR", NDR_SPOOLSS_DELETEPRINTPROCESSOR
, api_spoolss_DeletePrintProcessor
},
7502 {"SPOOLSS_ADDPRINTPROVIDOR", NDR_SPOOLSS_ADDPRINTPROVIDOR
, api_spoolss_AddPrintProvidor
},
7503 {"SPOOLSS_DELETEPRINTPROVIDOR", NDR_SPOOLSS_DELETEPRINTPROVIDOR
, api_spoolss_DeletePrintProvidor
},
7504 {"SPOOLSS_ENUMPRINTPROCDATATYPES", NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
, api_spoolss_EnumPrintProcDataTypes
},
7505 {"SPOOLSS_RESETPRINTER", NDR_SPOOLSS_RESETPRINTER
, api_spoolss_ResetPrinter
},
7506 {"SPOOLSS_GETPRINTERDRIVER2", NDR_SPOOLSS_GETPRINTERDRIVER2
, api_spoolss_GetPrinterDriver2
},
7507 {"SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
, api_spoolss_FindFirstPrinterChangeNotification
},
7508 {"SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
, api_spoolss_FindNextPrinterChangeNotification
},
7509 {"SPOOLSS_FINDCLOSEPRINTERNOTIFY", NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
, api_spoolss_FindClosePrinterNotify
},
7510 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
, api_spoolss_RouterFindFirstPrinterChangeNotificationOld
},
7511 {"SPOOLSS_REPLYOPENPRINTER", NDR_SPOOLSS_REPLYOPENPRINTER
, api_spoolss_ReplyOpenPrinter
},
7512 {"SPOOLSS_ROUTERREPLYPRINTER", NDR_SPOOLSS_ROUTERREPLYPRINTER
, api_spoolss_RouterReplyPrinter
},
7513 {"SPOOLSS_REPLYCLOSEPRINTER", NDR_SPOOLSS_REPLYCLOSEPRINTER
, api_spoolss_ReplyClosePrinter
},
7514 {"SPOOLSS_ADDPORTEX", NDR_SPOOLSS_ADDPORTEX
, api_spoolss_AddPortEx
},
7515 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
, api_spoolss_RouterFindFirstPrinterChangeNotification
},
7516 {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT
, api_spoolss_SpoolerInit
},
7517 {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX
, api_spoolss_ResetPrinterEx
},
7518 {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx
},
7519 {"SPOOLSS_ROUTERREPLYPRINTEREX", NDR_SPOOLSS_ROUTERREPLYPRINTEREX
, api_spoolss_RouterReplyPrinterEx
},
7520 {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
, api_spoolss_RouterRefreshPrinterChangeNotify
},
7521 {"SPOOLSS_44", NDR_SPOOLSS_44
, api_spoolss_44
},
7522 {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX
, api_spoolss_OpenPrinterEx
},
7523 {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX
, api_spoolss_AddPrinterEx
},
7524 {"SPOOLSS_47", NDR_SPOOLSS_47
, api_spoolss_47
},
7525 {"SPOOLSS_ENUMPRINTERDATA", NDR_SPOOLSS_ENUMPRINTERDATA
, api_spoolss_EnumPrinterData
},
7526 {"SPOOLSS_DELETEPRINTERDATA", NDR_SPOOLSS_DELETEPRINTERDATA
, api_spoolss_DeletePrinterData
},
7527 {"SPOOLSS_4A", NDR_SPOOLSS_4A
, api_spoolss_4a
},
7528 {"SPOOLSS_4B", NDR_SPOOLSS_4B
, api_spoolss_4b
},
7529 {"SPOOLSS_4C", NDR_SPOOLSS_4C
, api_spoolss_4c
},
7530 {"SPOOLSS_SETPRINTERDATAEX", NDR_SPOOLSS_SETPRINTERDATAEX
, api_spoolss_SetPrinterDataEx
},
7531 {"SPOOLSS_GETPRINTERDATAEX", NDR_SPOOLSS_GETPRINTERDATAEX
, api_spoolss_GetPrinterDataEx
},
7532 {"SPOOLSS_ENUMPRINTERDATAEX", NDR_SPOOLSS_ENUMPRINTERDATAEX
, api_spoolss_EnumPrinterDataEx
},
7533 {"SPOOLSS_ENUMPRINTERKEY", NDR_SPOOLSS_ENUMPRINTERKEY
, api_spoolss_EnumPrinterKey
},
7534 {"SPOOLSS_DELETEPRINTERDATAEX", NDR_SPOOLSS_DELETEPRINTERDATAEX
, api_spoolss_DeletePrinterDataEx
},
7535 {"SPOOLSS_DELETEPRINTERKEY", NDR_SPOOLSS_DELETEPRINTERKEY
, api_spoolss_DeletePrinterKey
},
7536 {"SPOOLSS_53", NDR_SPOOLSS_53
, api_spoolss_53
},
7537 {"SPOOLSS_DELETEPRINTERDRIVEREX", NDR_SPOOLSS_DELETEPRINTERDRIVEREX
, api_spoolss_DeletePrinterDriverEx
},
7538 {"SPOOLSS_55", NDR_SPOOLSS_55
, api_spoolss_55
},
7539 {"SPOOLSS_56", NDR_SPOOLSS_56
, api_spoolss_56
},
7540 {"SPOOLSS_57", NDR_SPOOLSS_57
, api_spoolss_57
},
7541 {"SPOOLSS_XCVDATA", NDR_SPOOLSS_XCVDATA
, api_spoolss_XcvData
},
7542 {"SPOOLSS_ADDPRINTERDRIVEREX", NDR_SPOOLSS_ADDPRINTERDRIVEREX
, api_spoolss_AddPrinterDriverEx
},
7543 {"SPOOLSS_5A", NDR_SPOOLSS_5A
, api_spoolss_5a
},
7544 {"SPOOLSS_5B", NDR_SPOOLSS_5B
, api_spoolss_5b
},
7545 {"SPOOLSS_5C", NDR_SPOOLSS_5C
, api_spoolss_5c
},
7546 {"SPOOLSS_5D", NDR_SPOOLSS_5D
, api_spoolss_5d
},
7547 {"SPOOLSS_5E", NDR_SPOOLSS_5E
, api_spoolss_5e
},
7548 {"SPOOLSS_5F", NDR_SPOOLSS_5F
, api_spoolss_5f
},
7551 void spoolss_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
7553 *fns
= api_spoolss_cmds
;
7554 *n_fns
= sizeof(api_spoolss_cmds
) / sizeof(struct api_struct
);
7557 NTSTATUS
rpc_spoolss_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
7559 if (cli
->pipes_struct
== NULL
) {
7560 return NT_STATUS_INVALID_PARAMETER
;
7565 case NDR_SPOOLSS_ENUMPRINTERS
: {
7566 struct spoolss_EnumPrinters
*r
= (struct spoolss_EnumPrinters
*)_r
;
7567 ZERO_STRUCT(r
->out
);
7568 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7569 if (r
->out
.count
== NULL
) {
7570 return NT_STATUS_NO_MEMORY
;
7573 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrinterInfo
*);
7574 if (r
->out
.info
== NULL
) {
7575 return NT_STATUS_NO_MEMORY
;
7578 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7579 if (r
->out
.needed
== NULL
) {
7580 return NT_STATUS_NO_MEMORY
;
7583 r
->out
.result
= _spoolss_EnumPrinters(cli
->pipes_struct
, r
);
7584 return NT_STATUS_OK
;
7587 case NDR_SPOOLSS_OPENPRINTER
: {
7588 struct spoolss_OpenPrinter
*r
= (struct spoolss_OpenPrinter
*)_r
;
7589 ZERO_STRUCT(r
->out
);
7590 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
7591 if (r
->out
.handle
== NULL
) {
7592 return NT_STATUS_NO_MEMORY
;
7595 r
->out
.result
= _spoolss_OpenPrinter(cli
->pipes_struct
, r
);
7596 return NT_STATUS_OK
;
7599 case NDR_SPOOLSS_SETJOB
: {
7600 struct spoolss_SetJob
*r
= (struct spoolss_SetJob
*)_r
;
7601 r
->out
.result
= _spoolss_SetJob(cli
->pipes_struct
, r
);
7602 return NT_STATUS_OK
;
7605 case NDR_SPOOLSS_GETJOB
: {
7606 struct spoolss_GetJob
*r
= (struct spoolss_GetJob
*)_r
;
7607 ZERO_STRUCT(r
->out
);
7608 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_JobInfo
);
7609 if (r
->out
.info
== NULL
) {
7610 return NT_STATUS_NO_MEMORY
;
7613 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7614 if (r
->out
.needed
== NULL
) {
7615 return NT_STATUS_NO_MEMORY
;
7618 r
->out
.result
= _spoolss_GetJob(cli
->pipes_struct
, r
);
7619 return NT_STATUS_OK
;
7622 case NDR_SPOOLSS_ENUMJOBS
: {
7623 struct spoolss_EnumJobs
*r
= (struct spoolss_EnumJobs
*)_r
;
7624 ZERO_STRUCT(r
->out
);
7625 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7626 if (r
->out
.count
== NULL
) {
7627 return NT_STATUS_NO_MEMORY
;
7630 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_JobInfo
*);
7631 if (r
->out
.info
== NULL
) {
7632 return NT_STATUS_NO_MEMORY
;
7635 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7636 if (r
->out
.needed
== NULL
) {
7637 return NT_STATUS_NO_MEMORY
;
7640 r
->out
.result
= _spoolss_EnumJobs(cli
->pipes_struct
, r
);
7641 return NT_STATUS_OK
;
7644 case NDR_SPOOLSS_ADDPRINTER
: {
7645 struct spoolss_AddPrinter
*r
= (struct spoolss_AddPrinter
*)_r
;
7646 r
->out
.result
= _spoolss_AddPrinter(cli
->pipes_struct
, r
);
7647 return NT_STATUS_OK
;
7650 case NDR_SPOOLSS_DELETEPRINTER
: {
7651 struct spoolss_DeletePrinter
*r
= (struct spoolss_DeletePrinter
*)_r
;
7652 r
->out
.result
= _spoolss_DeletePrinter(cli
->pipes_struct
, r
);
7653 return NT_STATUS_OK
;
7656 case NDR_SPOOLSS_SETPRINTER
: {
7657 struct spoolss_SetPrinter
*r
= (struct spoolss_SetPrinter
*)_r
;
7658 r
->out
.result
= _spoolss_SetPrinter(cli
->pipes_struct
, r
);
7659 return NT_STATUS_OK
;
7662 case NDR_SPOOLSS_GETPRINTER
: {
7663 struct spoolss_GetPrinter
*r
= (struct spoolss_GetPrinter
*)_r
;
7664 ZERO_STRUCT(r
->out
);
7665 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrinterInfo
);
7666 if (r
->out
.info
== NULL
) {
7667 return NT_STATUS_NO_MEMORY
;
7670 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7671 if (r
->out
.needed
== NULL
) {
7672 return NT_STATUS_NO_MEMORY
;
7675 r
->out
.result
= _spoolss_GetPrinter(cli
->pipes_struct
, r
);
7676 return NT_STATUS_OK
;
7679 case NDR_SPOOLSS_ADDPRINTERDRIVER
: {
7680 struct spoolss_AddPrinterDriver
*r
= (struct spoolss_AddPrinterDriver
*)_r
;
7681 r
->out
.result
= _spoolss_AddPrinterDriver(cli
->pipes_struct
, r
);
7682 return NT_STATUS_OK
;
7685 case NDR_SPOOLSS_ENUMPRINTERDRIVERS
: {
7686 struct spoolss_EnumPrinterDrivers
*r
= (struct spoolss_EnumPrinterDrivers
*)_r
;
7687 ZERO_STRUCT(r
->out
);
7688 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7689 if (r
->out
.count
== NULL
) {
7690 return NT_STATUS_NO_MEMORY
;
7693 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_DriverInfo
*);
7694 if (r
->out
.info
== NULL
) {
7695 return NT_STATUS_NO_MEMORY
;
7698 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7699 if (r
->out
.needed
== NULL
) {
7700 return NT_STATUS_NO_MEMORY
;
7703 r
->out
.result
= _spoolss_EnumPrinterDrivers(cli
->pipes_struct
, r
);
7704 return NT_STATUS_OK
;
7707 case NDR_SPOOLSS_GETPRINTERDRIVER
: {
7708 struct spoolss_GetPrinterDriver
*r
= (struct spoolss_GetPrinterDriver
*)_r
;
7709 r
->out
.result
= _spoolss_GetPrinterDriver(cli
->pipes_struct
, r
);
7710 return NT_STATUS_OK
;
7713 case NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
: {
7714 struct spoolss_GetPrinterDriverDirectory
*r
= (struct spoolss_GetPrinterDriverDirectory
*)_r
;
7715 ZERO_STRUCT(r
->out
);
7716 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_DriverDirectoryInfo
);
7717 if (r
->out
.info
== NULL
) {
7718 return NT_STATUS_NO_MEMORY
;
7721 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7722 if (r
->out
.needed
== NULL
) {
7723 return NT_STATUS_NO_MEMORY
;
7726 r
->out
.result
= _spoolss_GetPrinterDriverDirectory(cli
->pipes_struct
, r
);
7727 return NT_STATUS_OK
;
7730 case NDR_SPOOLSS_DELETEPRINTERDRIVER
: {
7731 struct spoolss_DeletePrinterDriver
*r
= (struct spoolss_DeletePrinterDriver
*)_r
;
7732 r
->out
.result
= _spoolss_DeletePrinterDriver(cli
->pipes_struct
, r
);
7733 return NT_STATUS_OK
;
7736 case NDR_SPOOLSS_ADDPRINTPROCESSOR
: {
7737 struct spoolss_AddPrintProcessor
*r
= (struct spoolss_AddPrintProcessor
*)_r
;
7738 r
->out
.result
= _spoolss_AddPrintProcessor(cli
->pipes_struct
, r
);
7739 return NT_STATUS_OK
;
7742 case NDR_SPOOLSS_ENUMPRINTPROCESSORS
: {
7743 struct spoolss_EnumPrintProcessors
*r
= (struct spoolss_EnumPrintProcessors
*)_r
;
7744 ZERO_STRUCT(r
->out
);
7745 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7746 if (r
->out
.count
== NULL
) {
7747 return NT_STATUS_NO_MEMORY
;
7750 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrintProcessorInfo
*);
7751 if (r
->out
.info
== NULL
) {
7752 return NT_STATUS_NO_MEMORY
;
7755 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7756 if (r
->out
.needed
== NULL
) {
7757 return NT_STATUS_NO_MEMORY
;
7760 r
->out
.result
= _spoolss_EnumPrintProcessors(cli
->pipes_struct
, r
);
7761 return NT_STATUS_OK
;
7764 case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
: {
7765 struct spoolss_GetPrintProcessorDirectory
*r
= (struct spoolss_GetPrintProcessorDirectory
*)_r
;
7766 ZERO_STRUCT(r
->out
);
7767 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrintProcessorDirectoryInfo
);
7768 if (r
->out
.info
== NULL
) {
7769 return NT_STATUS_NO_MEMORY
;
7772 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7773 if (r
->out
.needed
== NULL
) {
7774 return NT_STATUS_NO_MEMORY
;
7777 r
->out
.result
= _spoolss_GetPrintProcessorDirectory(cli
->pipes_struct
, r
);
7778 return NT_STATUS_OK
;
7781 case NDR_SPOOLSS_STARTDOCPRINTER
: {
7782 struct spoolss_StartDocPrinter
*r
= (struct spoolss_StartDocPrinter
*)_r
;
7783 ZERO_STRUCT(r
->out
);
7784 r
->out
.job_id
= talloc_zero(mem_ctx
, uint32_t);
7785 if (r
->out
.job_id
== NULL
) {
7786 return NT_STATUS_NO_MEMORY
;
7789 r
->out
.result
= _spoolss_StartDocPrinter(cli
->pipes_struct
, r
);
7790 return NT_STATUS_OK
;
7793 case NDR_SPOOLSS_STARTPAGEPRINTER
: {
7794 struct spoolss_StartPagePrinter
*r
= (struct spoolss_StartPagePrinter
*)_r
;
7795 r
->out
.result
= _spoolss_StartPagePrinter(cli
->pipes_struct
, r
);
7796 return NT_STATUS_OK
;
7799 case NDR_SPOOLSS_WRITEPRINTER
: {
7800 struct spoolss_WritePrinter
*r
= (struct spoolss_WritePrinter
*)_r
;
7801 ZERO_STRUCT(r
->out
);
7802 r
->out
.num_written
= talloc_zero(mem_ctx
, uint32_t);
7803 if (r
->out
.num_written
== NULL
) {
7804 return NT_STATUS_NO_MEMORY
;
7807 r
->out
.result
= _spoolss_WritePrinter(cli
->pipes_struct
, r
);
7808 return NT_STATUS_OK
;
7811 case NDR_SPOOLSS_ENDPAGEPRINTER
: {
7812 struct spoolss_EndPagePrinter
*r
= (struct spoolss_EndPagePrinter
*)_r
;
7813 r
->out
.result
= _spoolss_EndPagePrinter(cli
->pipes_struct
, r
);
7814 return NT_STATUS_OK
;
7817 case NDR_SPOOLSS_ABORTPRINTER
: {
7818 struct spoolss_AbortPrinter
*r
= (struct spoolss_AbortPrinter
*)_r
;
7819 r
->out
.result
= _spoolss_AbortPrinter(cli
->pipes_struct
, r
);
7820 return NT_STATUS_OK
;
7823 case NDR_SPOOLSS_READPRINTER
: {
7824 struct spoolss_ReadPrinter
*r
= (struct spoolss_ReadPrinter
*)_r
;
7825 ZERO_STRUCT(r
->out
);
7826 r
->out
.data
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.data_size
);
7827 if (r
->out
.data
== NULL
) {
7828 return NT_STATUS_NO_MEMORY
;
7831 r
->out
._data_size
= talloc_zero(mem_ctx
, uint32_t);
7832 if (r
->out
._data_size
== NULL
) {
7833 return NT_STATUS_NO_MEMORY
;
7836 r
->out
.result
= _spoolss_ReadPrinter(cli
->pipes_struct
, r
);
7837 return NT_STATUS_OK
;
7840 case NDR_SPOOLSS_ENDDOCPRINTER
: {
7841 struct spoolss_EndDocPrinter
*r
= (struct spoolss_EndDocPrinter
*)_r
;
7842 r
->out
.result
= _spoolss_EndDocPrinter(cli
->pipes_struct
, r
);
7843 return NT_STATUS_OK
;
7846 case NDR_SPOOLSS_ADDJOB
: {
7847 struct spoolss_AddJob
*r
= (struct spoolss_AddJob
*)_r
;
7848 ZERO_STRUCT(r
->out
);
7849 r
->out
.buffer
= r
->in
.buffer
;
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_AddJob(cli
->pipes_struct
, r
);
7856 return NT_STATUS_OK
;
7859 case NDR_SPOOLSS_SCHEDULEJOB
: {
7860 struct spoolss_ScheduleJob
*r
= (struct spoolss_ScheduleJob
*)_r
;
7861 r
->out
.result
= _spoolss_ScheduleJob(cli
->pipes_struct
, r
);
7862 return NT_STATUS_OK
;
7865 case NDR_SPOOLSS_GETPRINTERDATA
: {
7866 struct spoolss_GetPrinterData
*r
= (struct spoolss_GetPrinterData
*)_r
;
7867 ZERO_STRUCT(r
->out
);
7868 r
->out
.type
= talloc_zero(mem_ctx
, enum spoolss_PrinterDataType
);
7869 if (r
->out
.type
== NULL
) {
7870 return NT_STATUS_NO_MEMORY
;
7873 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7874 if (r
->out
.needed
== NULL
) {
7875 return NT_STATUS_NO_MEMORY
;
7878 r
->out
.result
= _spoolss_GetPrinterData(cli
->pipes_struct
, r
);
7879 return NT_STATUS_OK
;
7882 case NDR_SPOOLSS_SETPRINTERDATA
: {
7883 struct spoolss_SetPrinterData
*r
= (struct spoolss_SetPrinterData
*)_r
;
7884 r
->out
.result
= _spoolss_SetPrinterData(cli
->pipes_struct
, r
);
7885 return NT_STATUS_OK
;
7888 case NDR_SPOOLSS_WAITFORPRINTERCHANGE
: {
7889 struct spoolss_WaitForPrinterChange
*r
= (struct spoolss_WaitForPrinterChange
*)_r
;
7890 r
->out
.result
= _spoolss_WaitForPrinterChange(cli
->pipes_struct
, r
);
7891 return NT_STATUS_OK
;
7894 case NDR_SPOOLSS_CLOSEPRINTER
: {
7895 struct spoolss_ClosePrinter
*r
= (struct spoolss_ClosePrinter
*)_r
;
7896 ZERO_STRUCT(r
->out
);
7897 r
->out
.handle
= r
->in
.handle
;
7898 r
->out
.result
= _spoolss_ClosePrinter(cli
->pipes_struct
, r
);
7899 return NT_STATUS_OK
;
7902 case NDR_SPOOLSS_ADDFORM
: {
7903 struct spoolss_AddForm
*r
= (struct spoolss_AddForm
*)_r
;
7904 r
->out
.result
= _spoolss_AddForm(cli
->pipes_struct
, r
);
7905 return NT_STATUS_OK
;
7908 case NDR_SPOOLSS_DELETEFORM
: {
7909 struct spoolss_DeleteForm
*r
= (struct spoolss_DeleteForm
*)_r
;
7910 r
->out
.result
= _spoolss_DeleteForm(cli
->pipes_struct
, r
);
7911 return NT_STATUS_OK
;
7914 case NDR_SPOOLSS_GETFORM
: {
7915 struct spoolss_GetForm
*r
= (struct spoolss_GetForm
*)_r
;
7916 ZERO_STRUCT(r
->out
);
7917 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_FormInfo
);
7918 if (r
->out
.info
== NULL
) {
7919 return NT_STATUS_NO_MEMORY
;
7922 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7923 if (r
->out
.needed
== NULL
) {
7924 return NT_STATUS_NO_MEMORY
;
7927 r
->out
.result
= _spoolss_GetForm(cli
->pipes_struct
, r
);
7928 return NT_STATUS_OK
;
7931 case NDR_SPOOLSS_SETFORM
: {
7932 struct spoolss_SetForm
*r
= (struct spoolss_SetForm
*)_r
;
7933 r
->out
.result
= _spoolss_SetForm(cli
->pipes_struct
, r
);
7934 return NT_STATUS_OK
;
7937 case NDR_SPOOLSS_ENUMFORMS
: {
7938 struct spoolss_EnumForms
*r
= (struct spoolss_EnumForms
*)_r
;
7939 ZERO_STRUCT(r
->out
);
7940 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7941 if (r
->out
.count
== NULL
) {
7942 return NT_STATUS_NO_MEMORY
;
7945 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_FormInfo
*);
7946 if (r
->out
.info
== NULL
) {
7947 return NT_STATUS_NO_MEMORY
;
7950 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7951 if (r
->out
.needed
== NULL
) {
7952 return NT_STATUS_NO_MEMORY
;
7955 r
->out
.result
= _spoolss_EnumForms(cli
->pipes_struct
, r
);
7956 return NT_STATUS_OK
;
7959 case NDR_SPOOLSS_ENUMPORTS
: {
7960 struct spoolss_EnumPorts
*r
= (struct spoolss_EnumPorts
*)_r
;
7961 ZERO_STRUCT(r
->out
);
7962 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7963 if (r
->out
.count
== NULL
) {
7964 return NT_STATUS_NO_MEMORY
;
7967 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PortInfo
*);
7968 if (r
->out
.info
== NULL
) {
7969 return NT_STATUS_NO_MEMORY
;
7972 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7973 if (r
->out
.needed
== NULL
) {
7974 return NT_STATUS_NO_MEMORY
;
7977 r
->out
.result
= _spoolss_EnumPorts(cli
->pipes_struct
, r
);
7978 return NT_STATUS_OK
;
7981 case NDR_SPOOLSS_ENUMMONITORS
: {
7982 struct spoolss_EnumMonitors
*r
= (struct spoolss_EnumMonitors
*)_r
;
7983 ZERO_STRUCT(r
->out
);
7984 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7985 if (r
->out
.count
== NULL
) {
7986 return NT_STATUS_NO_MEMORY
;
7989 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_MonitorInfo
*);
7990 if (r
->out
.info
== NULL
) {
7991 return NT_STATUS_NO_MEMORY
;
7994 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7995 if (r
->out
.needed
== NULL
) {
7996 return NT_STATUS_NO_MEMORY
;
7999 r
->out
.result
= _spoolss_EnumMonitors(cli
->pipes_struct
, r
);
8000 return NT_STATUS_OK
;
8003 case NDR_SPOOLSS_ADDPORT
: {
8004 struct spoolss_AddPort
*r
= (struct spoolss_AddPort
*)_r
;
8005 r
->out
.result
= _spoolss_AddPort(cli
->pipes_struct
, r
);
8006 return NT_STATUS_OK
;
8009 case NDR_SPOOLSS_CONFIGUREPORT
: {
8010 struct spoolss_ConfigurePort
*r
= (struct spoolss_ConfigurePort
*)_r
;
8011 r
->out
.result
= _spoolss_ConfigurePort(cli
->pipes_struct
, r
);
8012 return NT_STATUS_OK
;
8015 case NDR_SPOOLSS_DELETEPORT
: {
8016 struct spoolss_DeletePort
*r
= (struct spoolss_DeletePort
*)_r
;
8017 r
->out
.result
= _spoolss_DeletePort(cli
->pipes_struct
, r
);
8018 return NT_STATUS_OK
;
8021 case NDR_SPOOLSS_CREATEPRINTERIC
: {
8022 struct spoolss_CreatePrinterIC
*r
= (struct spoolss_CreatePrinterIC
*)_r
;
8023 r
->out
.result
= _spoolss_CreatePrinterIC(cli
->pipes_struct
, r
);
8024 return NT_STATUS_OK
;
8027 case NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
: {
8028 struct spoolss_PlayGDIScriptOnPrinterIC
*r
= (struct spoolss_PlayGDIScriptOnPrinterIC
*)_r
;
8029 r
->out
.result
= _spoolss_PlayGDIScriptOnPrinterIC(cli
->pipes_struct
, r
);
8030 return NT_STATUS_OK
;
8033 case NDR_SPOOLSS_DELETEPRINTERIC
: {
8034 struct spoolss_DeletePrinterIC
*r
= (struct spoolss_DeletePrinterIC
*)_r
;
8035 r
->out
.result
= _spoolss_DeletePrinterIC(cli
->pipes_struct
, r
);
8036 return NT_STATUS_OK
;
8039 case NDR_SPOOLSS_ADDPRINTERCONNECTION
: {
8040 struct spoolss_AddPrinterConnection
*r
= (struct spoolss_AddPrinterConnection
*)_r
;
8041 r
->out
.result
= _spoolss_AddPrinterConnection(cli
->pipes_struct
, r
);
8042 return NT_STATUS_OK
;
8045 case NDR_SPOOLSS_DELETEPRINTERCONNECTION
: {
8046 struct spoolss_DeletePrinterConnection
*r
= (struct spoolss_DeletePrinterConnection
*)_r
;
8047 r
->out
.result
= _spoolss_DeletePrinterConnection(cli
->pipes_struct
, r
);
8048 return NT_STATUS_OK
;
8051 case NDR_SPOOLSS_PRINTERMESSAGEBOX
: {
8052 struct spoolss_PrinterMessageBox
*r
= (struct spoolss_PrinterMessageBox
*)_r
;
8053 r
->out
.result
= _spoolss_PrinterMessageBox(cli
->pipes_struct
, r
);
8054 return NT_STATUS_OK
;
8057 case NDR_SPOOLSS_ADDMONITOR
: {
8058 struct spoolss_AddMonitor
*r
= (struct spoolss_AddMonitor
*)_r
;
8059 r
->out
.result
= _spoolss_AddMonitor(cli
->pipes_struct
, r
);
8060 return NT_STATUS_OK
;
8063 case NDR_SPOOLSS_DELETEMONITOR
: {
8064 struct spoolss_DeleteMonitor
*r
= (struct spoolss_DeleteMonitor
*)_r
;
8065 r
->out
.result
= _spoolss_DeleteMonitor(cli
->pipes_struct
, r
);
8066 return NT_STATUS_OK
;
8069 case NDR_SPOOLSS_DELETEPRINTPROCESSOR
: {
8070 struct spoolss_DeletePrintProcessor
*r
= (struct spoolss_DeletePrintProcessor
*)_r
;
8071 r
->out
.result
= _spoolss_DeletePrintProcessor(cli
->pipes_struct
, r
);
8072 return NT_STATUS_OK
;
8075 case NDR_SPOOLSS_ADDPRINTPROVIDOR
: {
8076 struct spoolss_AddPrintProvidor
*r
= (struct spoolss_AddPrintProvidor
*)_r
;
8077 r
->out
.result
= _spoolss_AddPrintProvidor(cli
->pipes_struct
, r
);
8078 return NT_STATUS_OK
;
8081 case NDR_SPOOLSS_DELETEPRINTPROVIDOR
: {
8082 struct spoolss_DeletePrintProvidor
*r
= (struct spoolss_DeletePrintProvidor
*)_r
;
8083 r
->out
.result
= _spoolss_DeletePrintProvidor(cli
->pipes_struct
, r
);
8084 return NT_STATUS_OK
;
8087 case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
: {
8088 struct spoolss_EnumPrintProcDataTypes
*r
= (struct spoolss_EnumPrintProcDataTypes
*)_r
;
8089 ZERO_STRUCT(r
->out
);
8090 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
8091 if (r
->out
.count
== NULL
) {
8092 return NT_STATUS_NO_MEMORY
;
8095 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrintProcDataTypesInfo
*);
8096 if (r
->out
.info
== NULL
) {
8097 return NT_STATUS_NO_MEMORY
;
8100 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8101 if (r
->out
.needed
== NULL
) {
8102 return NT_STATUS_NO_MEMORY
;
8105 r
->out
.result
= _spoolss_EnumPrintProcDataTypes(cli
->pipes_struct
, r
);
8106 return NT_STATUS_OK
;
8109 case NDR_SPOOLSS_RESETPRINTER
: {
8110 struct spoolss_ResetPrinter
*r
= (struct spoolss_ResetPrinter
*)_r
;
8111 r
->out
.result
= _spoolss_ResetPrinter(cli
->pipes_struct
, r
);
8112 return NT_STATUS_OK
;
8115 case NDR_SPOOLSS_GETPRINTERDRIVER2
: {
8116 struct spoolss_GetPrinterDriver2
*r
= (struct spoolss_GetPrinterDriver2
*)_r
;
8117 ZERO_STRUCT(r
->out
);
8118 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_DriverInfo
);
8119 if (r
->out
.info
== NULL
) {
8120 return NT_STATUS_NO_MEMORY
;
8123 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8124 if (r
->out
.needed
== NULL
) {
8125 return NT_STATUS_NO_MEMORY
;
8128 r
->out
.server_major_version
= talloc_zero(mem_ctx
, uint32_t);
8129 if (r
->out
.server_major_version
== NULL
) {
8130 return NT_STATUS_NO_MEMORY
;
8133 r
->out
.server_minor_version
= talloc_zero(mem_ctx
, uint32_t);
8134 if (r
->out
.server_minor_version
== NULL
) {
8135 return NT_STATUS_NO_MEMORY
;
8138 r
->out
.result
= _spoolss_GetPrinterDriver2(cli
->pipes_struct
, r
);
8139 return NT_STATUS_OK
;
8142 case NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
: {
8143 struct spoolss_FindFirstPrinterChangeNotification
*r
= (struct spoolss_FindFirstPrinterChangeNotification
*)_r
;
8144 r
->out
.result
= _spoolss_FindFirstPrinterChangeNotification(cli
->pipes_struct
, r
);
8145 return NT_STATUS_OK
;
8148 case NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
: {
8149 struct spoolss_FindNextPrinterChangeNotification
*r
= (struct spoolss_FindNextPrinterChangeNotification
*)_r
;
8150 r
->out
.result
= _spoolss_FindNextPrinterChangeNotification(cli
->pipes_struct
, r
);
8151 return NT_STATUS_OK
;
8154 case NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
: {
8155 struct spoolss_FindClosePrinterNotify
*r
= (struct spoolss_FindClosePrinterNotify
*)_r
;
8156 r
->out
.result
= _spoolss_FindClosePrinterNotify(cli
->pipes_struct
, r
);
8157 return NT_STATUS_OK
;
8160 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
: {
8161 struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
= (struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*)_r
;
8162 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotificationOld(cli
->pipes_struct
, r
);
8163 return NT_STATUS_OK
;
8166 case NDR_SPOOLSS_REPLYOPENPRINTER
: {
8167 struct spoolss_ReplyOpenPrinter
*r
= (struct spoolss_ReplyOpenPrinter
*)_r
;
8168 ZERO_STRUCT(r
->out
);
8169 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
8170 if (r
->out
.handle
== NULL
) {
8171 return NT_STATUS_NO_MEMORY
;
8174 r
->out
.result
= _spoolss_ReplyOpenPrinter(cli
->pipes_struct
, r
);
8175 return NT_STATUS_OK
;
8178 case NDR_SPOOLSS_ROUTERREPLYPRINTER
: {
8179 struct spoolss_RouterReplyPrinter
*r
= (struct spoolss_RouterReplyPrinter
*)_r
;
8180 r
->out
.result
= _spoolss_RouterReplyPrinter(cli
->pipes_struct
, r
);
8181 return NT_STATUS_OK
;
8184 case NDR_SPOOLSS_REPLYCLOSEPRINTER
: {
8185 struct spoolss_ReplyClosePrinter
*r
= (struct spoolss_ReplyClosePrinter
*)_r
;
8186 ZERO_STRUCT(r
->out
);
8187 r
->out
.handle
= r
->in
.handle
;
8188 r
->out
.result
= _spoolss_ReplyClosePrinter(cli
->pipes_struct
, r
);
8189 return NT_STATUS_OK
;
8192 case NDR_SPOOLSS_ADDPORTEX
: {
8193 struct spoolss_AddPortEx
*r
= (struct spoolss_AddPortEx
*)_r
;
8194 r
->out
.result
= _spoolss_AddPortEx(cli
->pipes_struct
, r
);
8195 return NT_STATUS_OK
;
8198 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
: {
8199 struct spoolss_RouterFindFirstPrinterChangeNotification
*r
= (struct spoolss_RouterFindFirstPrinterChangeNotification
*)_r
;
8200 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotification(cli
->pipes_struct
, r
);
8201 return NT_STATUS_OK
;
8204 case NDR_SPOOLSS_SPOOLERINIT
: {
8205 struct spoolss_SpoolerInit
*r
= (struct spoolss_SpoolerInit
*)_r
;
8206 r
->out
.result
= _spoolss_SpoolerInit(cli
->pipes_struct
, r
);
8207 return NT_STATUS_OK
;
8210 case NDR_SPOOLSS_RESETPRINTEREX
: {
8211 struct spoolss_ResetPrinterEx
*r
= (struct spoolss_ResetPrinterEx
*)_r
;
8212 r
->out
.result
= _spoolss_ResetPrinterEx(cli
->pipes_struct
, r
);
8213 return NT_STATUS_OK
;
8216 case NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
: {
8217 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
= (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*)_r
;
8218 r
->out
.result
= _spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli
->pipes_struct
, r
);
8219 return NT_STATUS_OK
;
8222 case NDR_SPOOLSS_ROUTERREPLYPRINTEREX
: {
8223 struct spoolss_RouterReplyPrinterEx
*r
= (struct spoolss_RouterReplyPrinterEx
*)_r
;
8224 ZERO_STRUCT(r
->out
);
8225 r
->out
.reply_result
= talloc_zero(mem_ctx
, uint32_t);
8226 if (r
->out
.reply_result
== NULL
) {
8227 return NT_STATUS_NO_MEMORY
;
8230 r
->out
.result
= _spoolss_RouterReplyPrinterEx(cli
->pipes_struct
, r
);
8231 return NT_STATUS_OK
;
8234 case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
: {
8235 struct spoolss_RouterRefreshPrinterChangeNotify
*r
= (struct spoolss_RouterRefreshPrinterChangeNotify
*)_r
;
8236 ZERO_STRUCT(r
->out
);
8237 r
->out
.info
= talloc_zero(mem_ctx
, struct spoolss_NotifyInfo
*);
8238 if (r
->out
.info
== NULL
) {
8239 return NT_STATUS_NO_MEMORY
;
8242 r
->out
.result
= _spoolss_RouterRefreshPrinterChangeNotify(cli
->pipes_struct
, r
);
8243 return NT_STATUS_OK
;
8246 case NDR_SPOOLSS_44
: {
8247 struct spoolss_44
*r
= (struct spoolss_44
*)_r
;
8248 r
->out
.result
= _spoolss_44(cli
->pipes_struct
, r
);
8249 return NT_STATUS_OK
;
8252 case NDR_SPOOLSS_OPENPRINTEREX
: {
8253 struct spoolss_OpenPrinterEx
*r
= (struct spoolss_OpenPrinterEx
*)_r
;
8254 ZERO_STRUCT(r
->out
);
8255 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
8256 if (r
->out
.handle
== NULL
) {
8257 return NT_STATUS_NO_MEMORY
;
8260 r
->out
.result
= _spoolss_OpenPrinterEx(cli
->pipes_struct
, r
);
8261 return NT_STATUS_OK
;
8264 case NDR_SPOOLSS_ADDPRINTEREX
: {
8265 struct spoolss_AddPrinterEx
*r
= (struct spoolss_AddPrinterEx
*)_r
;
8266 ZERO_STRUCT(r
->out
);
8267 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
8268 if (r
->out
.handle
== NULL
) {
8269 return NT_STATUS_NO_MEMORY
;
8272 r
->out
.result
= _spoolss_AddPrinterEx(cli
->pipes_struct
, r
);
8273 return NT_STATUS_OK
;
8276 case NDR_SPOOLSS_47
: {
8277 struct spoolss_47
*r
= (struct spoolss_47
*)_r
;
8278 r
->out
.result
= _spoolss_47(cli
->pipes_struct
, r
);
8279 return NT_STATUS_OK
;
8282 case NDR_SPOOLSS_ENUMPRINTERDATA
: {
8283 struct spoolss_EnumPrinterData
*r
= (struct spoolss_EnumPrinterData
*)_r
;
8284 ZERO_STRUCT(r
->out
);
8285 r
->out
.value_name
= talloc_zero_array(mem_ctx
, const char, r
->in
.value_offered
/ 2);
8286 if (r
->out
.value_name
== NULL
) {
8287 return NT_STATUS_NO_MEMORY
;
8290 r
->out
.value_needed
= talloc_zero(mem_ctx
, uint32_t);
8291 if (r
->out
.value_needed
== NULL
) {
8292 return NT_STATUS_NO_MEMORY
;
8295 r
->out
.printerdata_type
= talloc_zero(mem_ctx
, uint32_t);
8296 if (r
->out
.printerdata_type
== NULL
) {
8297 return NT_STATUS_NO_MEMORY
;
8300 r
->out
.buffer
= talloc_zero(mem_ctx
, DATA_BLOB
);
8301 if (r
->out
.buffer
== NULL
) {
8302 return NT_STATUS_NO_MEMORY
;
8305 r
->out
.data_needed
= talloc_zero(mem_ctx
, uint32_t);
8306 if (r
->out
.data_needed
== NULL
) {
8307 return NT_STATUS_NO_MEMORY
;
8310 r
->out
.result
= _spoolss_EnumPrinterData(cli
->pipes_struct
, r
);
8311 return NT_STATUS_OK
;
8314 case NDR_SPOOLSS_DELETEPRINTERDATA
: {
8315 struct spoolss_DeletePrinterData
*r
= (struct spoolss_DeletePrinterData
*)_r
;
8316 r
->out
.result
= _spoolss_DeletePrinterData(cli
->pipes_struct
, r
);
8317 return NT_STATUS_OK
;
8320 case NDR_SPOOLSS_4A
: {
8321 struct spoolss_4a
*r
= (struct spoolss_4a
*)_r
;
8322 r
->out
.result
= _spoolss_4a(cli
->pipes_struct
, r
);
8323 return NT_STATUS_OK
;
8326 case NDR_SPOOLSS_4B
: {
8327 struct spoolss_4b
*r
= (struct spoolss_4b
*)_r
;
8328 r
->out
.result
= _spoolss_4b(cli
->pipes_struct
, r
);
8329 return NT_STATUS_OK
;
8332 case NDR_SPOOLSS_4C
: {
8333 struct spoolss_4c
*r
= (struct spoolss_4c
*)_r
;
8334 r
->out
.result
= _spoolss_4c(cli
->pipes_struct
, r
);
8335 return NT_STATUS_OK
;
8338 case NDR_SPOOLSS_SETPRINTERDATAEX
: {
8339 struct spoolss_SetPrinterDataEx
*r
= (struct spoolss_SetPrinterDataEx
*)_r
;
8340 r
->out
.result
= _spoolss_SetPrinterDataEx(cli
->pipes_struct
, r
);
8341 return NT_STATUS_OK
;
8344 case NDR_SPOOLSS_GETPRINTERDATAEX
: {
8345 struct spoolss_GetPrinterDataEx
*r
= (struct spoolss_GetPrinterDataEx
*)_r
;
8346 ZERO_STRUCT(r
->out
);
8347 r
->out
.type
= talloc_zero(mem_ctx
, uint32_t);
8348 if (r
->out
.type
== NULL
) {
8349 return NT_STATUS_NO_MEMORY
;
8352 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
8353 if (r
->out
.buffer
== NULL
) {
8354 return NT_STATUS_NO_MEMORY
;
8357 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8358 if (r
->out
.needed
== NULL
) {
8359 return NT_STATUS_NO_MEMORY
;
8362 r
->out
.result
= _spoolss_GetPrinterDataEx(cli
->pipes_struct
, r
);
8363 return NT_STATUS_OK
;
8366 case NDR_SPOOLSS_ENUMPRINTERDATAEX
: {
8367 struct spoolss_EnumPrinterDataEx
*r
= (struct spoolss_EnumPrinterDataEx
*)_r
;
8368 ZERO_STRUCT(r
->out
);
8369 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
8370 if (r
->out
.buffer
== NULL
) {
8371 return NT_STATUS_NO_MEMORY
;
8374 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8375 if (r
->out
.needed
== NULL
) {
8376 return NT_STATUS_NO_MEMORY
;
8379 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
8380 if (r
->out
.count
== NULL
) {
8381 return NT_STATUS_NO_MEMORY
;
8384 r
->out
.result
= _spoolss_EnumPrinterDataEx(cli
->pipes_struct
, r
);
8385 return NT_STATUS_OK
;
8388 case NDR_SPOOLSS_ENUMPRINTERKEY
: {
8389 struct spoolss_EnumPrinterKey
*r
= (struct spoolss_EnumPrinterKey
*)_r
;
8390 ZERO_STRUCT(r
->out
);
8391 r
->out
.key_buffer
= talloc_zero_array(mem_ctx
, uint16_t, r
->in
.key_buffer_size
/ 2);
8392 if (r
->out
.key_buffer
== NULL
) {
8393 return NT_STATUS_NO_MEMORY
;
8396 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8397 if (r
->out
.needed
== NULL
) {
8398 return NT_STATUS_NO_MEMORY
;
8401 r
->out
.result
= _spoolss_EnumPrinterKey(cli
->pipes_struct
, r
);
8402 return NT_STATUS_OK
;
8405 case NDR_SPOOLSS_DELETEPRINTERDATAEX
: {
8406 struct spoolss_DeletePrinterDataEx
*r
= (struct spoolss_DeletePrinterDataEx
*)_r
;
8407 r
->out
.result
= _spoolss_DeletePrinterDataEx(cli
->pipes_struct
, r
);
8408 return NT_STATUS_OK
;
8411 case NDR_SPOOLSS_DELETEPRINTERKEY
: {
8412 struct spoolss_DeletePrinterKey
*r
= (struct spoolss_DeletePrinterKey
*)_r
;
8413 r
->out
.result
= _spoolss_DeletePrinterKey(cli
->pipes_struct
, r
);
8414 return NT_STATUS_OK
;
8417 case NDR_SPOOLSS_53
: {
8418 struct spoolss_53
*r
= (struct spoolss_53
*)_r
;
8419 r
->out
.result
= _spoolss_53(cli
->pipes_struct
, r
);
8420 return NT_STATUS_OK
;
8423 case NDR_SPOOLSS_DELETEPRINTERDRIVEREX
: {
8424 struct spoolss_DeletePrinterDriverEx
*r
= (struct spoolss_DeletePrinterDriverEx
*)_r
;
8425 r
->out
.result
= _spoolss_DeletePrinterDriverEx(cli
->pipes_struct
, r
);
8426 return NT_STATUS_OK
;
8429 case NDR_SPOOLSS_55
: {
8430 struct spoolss_55
*r
= (struct spoolss_55
*)_r
;
8431 r
->out
.result
= _spoolss_55(cli
->pipes_struct
, r
);
8432 return NT_STATUS_OK
;
8435 case NDR_SPOOLSS_56
: {
8436 struct spoolss_56
*r
= (struct spoolss_56
*)_r
;
8437 r
->out
.result
= _spoolss_56(cli
->pipes_struct
, r
);
8438 return NT_STATUS_OK
;
8441 case NDR_SPOOLSS_57
: {
8442 struct spoolss_57
*r
= (struct spoolss_57
*)_r
;
8443 r
->out
.result
= _spoolss_57(cli
->pipes_struct
, r
);
8444 return NT_STATUS_OK
;
8447 case NDR_SPOOLSS_XCVDATA
: {
8448 struct spoolss_XcvData
*r
= (struct spoolss_XcvData
*)_r
;
8449 ZERO_STRUCT(r
->out
);
8450 r
->out
.status_code
= r
->in
.status_code
;
8451 r
->out
.out_data
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.out_data_size
);
8452 if (r
->out
.out_data
== NULL
) {
8453 return NT_STATUS_NO_MEMORY
;
8456 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8457 if (r
->out
.needed
== NULL
) {
8458 return NT_STATUS_NO_MEMORY
;
8461 r
->out
.result
= _spoolss_XcvData(cli
->pipes_struct
, r
);
8462 return NT_STATUS_OK
;
8465 case NDR_SPOOLSS_ADDPRINTERDRIVEREX
: {
8466 struct spoolss_AddPrinterDriverEx
*r
= (struct spoolss_AddPrinterDriverEx
*)_r
;
8467 r
->out
.result
= _spoolss_AddPrinterDriverEx(cli
->pipes_struct
, r
);
8468 return NT_STATUS_OK
;
8471 case NDR_SPOOLSS_5A
: {
8472 struct spoolss_5a
*r
= (struct spoolss_5a
*)_r
;
8473 r
->out
.result
= _spoolss_5a(cli
->pipes_struct
, r
);
8474 return NT_STATUS_OK
;
8477 case NDR_SPOOLSS_5B
: {
8478 struct spoolss_5b
*r
= (struct spoolss_5b
*)_r
;
8479 r
->out
.result
= _spoolss_5b(cli
->pipes_struct
, r
);
8480 return NT_STATUS_OK
;
8483 case NDR_SPOOLSS_5C
: {
8484 struct spoolss_5c
*r
= (struct spoolss_5c
*)_r
;
8485 r
->out
.result
= _spoolss_5c(cli
->pipes_struct
, r
);
8486 return NT_STATUS_OK
;
8489 case NDR_SPOOLSS_5D
: {
8490 struct spoolss_5d
*r
= (struct spoolss_5d
*)_r
;
8491 r
->out
.result
= _spoolss_5d(cli
->pipes_struct
, r
);
8492 return NT_STATUS_OK
;
8495 case NDR_SPOOLSS_5E
: {
8496 struct spoolss_5e
*r
= (struct spoolss_5e
*)_r
;
8497 r
->out
.result
= _spoolss_5e(cli
->pipes_struct
, r
);
8498 return NT_STATUS_OK
;
8501 case NDR_SPOOLSS_5F
: {
8502 struct spoolss_5f
*r
= (struct spoolss_5f
*)_r
;
8503 r
->out
.result
= _spoolss_5f(cli
->pipes_struct
, r
);
8504 return NT_STATUS_OK
;
8508 return NT_STATUS_NOT_IMPLEMENTED
;
8512 NTSTATUS
rpc_spoolss_init(void)
8514 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "spoolss", "spoolss", &ndr_table_spoolss
, api_spoolss_cmds
, sizeof(api_spoolss_cmds
) / sizeof(struct api_struct
));