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 winreg_Type
);
2117 if (r
->out
.type
== NULL
) {
2122 r
->out
.data
= talloc_zero(r
, union spoolss_PrinterData
);
2123 if (r
->out
.data
== NULL
) {
2128 r
->out
.needed
= talloc_zero(r
, uint32_t);
2129 if (r
->out
.needed
== NULL
) {
2134 r
->out
.result
= _spoolss_GetPrinterData(p
, r
);
2136 if (p
->rng_fault_state
) {
2138 /* Return true here, srv_pipe_hnd.c will take care */
2142 if (DEBUGLEVEL
>= 10) {
2143 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData
, r
);
2146 push
= ndr_push_init_ctx(r
, NULL
);
2152 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2153 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2158 blob
= ndr_push_blob(push
);
2159 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2169 static bool api_spoolss_SetPrinterData(pipes_struct
*p
)
2171 const struct ndr_interface_call
*call
;
2172 struct ndr_pull
*pull
;
2173 struct ndr_push
*push
;
2174 enum ndr_err_code ndr_err
;
2176 struct spoolss_SetPrinterData
*r
;
2178 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETPRINTERDATA
];
2180 r
= talloc(talloc_tos(), struct spoolss_SetPrinterData
);
2185 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2190 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2196 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2197 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2198 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2203 if (DEBUGLEVEL
>= 10) {
2204 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData
, r
);
2207 r
->out
.result
= _spoolss_SetPrinterData(p
, r
);
2209 if (p
->rng_fault_state
) {
2211 /* Return true here, srv_pipe_hnd.c will take care */
2215 if (DEBUGLEVEL
>= 10) {
2216 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData
, r
);
2219 push
= ndr_push_init_ctx(r
, NULL
);
2225 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2226 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2231 blob
= ndr_push_blob(push
);
2232 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2242 static bool api_spoolss_WaitForPrinterChange(pipes_struct
*p
)
2244 const struct ndr_interface_call
*call
;
2245 struct ndr_pull
*pull
;
2246 struct ndr_push
*push
;
2247 enum ndr_err_code ndr_err
;
2249 struct spoolss_WaitForPrinterChange
*r
;
2251 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_WAITFORPRINTERCHANGE
];
2253 r
= talloc(talloc_tos(), struct spoolss_WaitForPrinterChange
);
2258 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2263 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2269 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2270 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2271 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2276 if (DEBUGLEVEL
>= 10) {
2277 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange
, r
);
2280 r
->out
.result
= _spoolss_WaitForPrinterChange(p
, r
);
2282 if (p
->rng_fault_state
) {
2284 /* Return true here, srv_pipe_hnd.c will take care */
2288 if (DEBUGLEVEL
>= 10) {
2289 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange
, r
);
2292 push
= ndr_push_init_ctx(r
, NULL
);
2298 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2299 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2304 blob
= ndr_push_blob(push
);
2305 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2315 static bool api_spoolss_ClosePrinter(pipes_struct
*p
)
2317 const struct ndr_interface_call
*call
;
2318 struct ndr_pull
*pull
;
2319 struct ndr_push
*push
;
2320 enum ndr_err_code ndr_err
;
2322 struct spoolss_ClosePrinter
*r
;
2324 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_CLOSEPRINTER
];
2326 r
= talloc(talloc_tos(), struct spoolss_ClosePrinter
);
2331 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2336 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2342 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2343 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2344 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2349 if (DEBUGLEVEL
>= 10) {
2350 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter
, r
);
2353 ZERO_STRUCT(r
->out
);
2354 r
->out
.handle
= r
->in
.handle
;
2355 r
->out
.result
= _spoolss_ClosePrinter(p
, r
);
2357 if (p
->rng_fault_state
) {
2359 /* Return true here, srv_pipe_hnd.c will take care */
2363 if (DEBUGLEVEL
>= 10) {
2364 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter
, r
);
2367 push
= ndr_push_init_ctx(r
, NULL
);
2373 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2374 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2379 blob
= ndr_push_blob(push
);
2380 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2390 static bool api_spoolss_AddForm(pipes_struct
*p
)
2392 const struct ndr_interface_call
*call
;
2393 struct ndr_pull
*pull
;
2394 struct ndr_push
*push
;
2395 enum ndr_err_code ndr_err
;
2397 struct spoolss_AddForm
*r
;
2399 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDFORM
];
2401 r
= talloc(talloc_tos(), struct spoolss_AddForm
);
2406 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2411 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2417 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2418 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2419 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2424 if (DEBUGLEVEL
>= 10) {
2425 NDR_PRINT_IN_DEBUG(spoolss_AddForm
, r
);
2428 r
->out
.result
= _spoolss_AddForm(p
, r
);
2430 if (p
->rng_fault_state
) {
2432 /* Return true here, srv_pipe_hnd.c will take care */
2436 if (DEBUGLEVEL
>= 10) {
2437 NDR_PRINT_OUT_DEBUG(spoolss_AddForm
, r
);
2440 push
= ndr_push_init_ctx(r
, NULL
);
2446 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2447 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2452 blob
= ndr_push_blob(push
);
2453 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2463 static bool api_spoolss_DeleteForm(pipes_struct
*p
)
2465 const struct ndr_interface_call
*call
;
2466 struct ndr_pull
*pull
;
2467 struct ndr_push
*push
;
2468 enum ndr_err_code ndr_err
;
2470 struct spoolss_DeleteForm
*r
;
2472 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEFORM
];
2474 r
= talloc(talloc_tos(), struct spoolss_DeleteForm
);
2479 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2484 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2490 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2491 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2492 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2497 if (DEBUGLEVEL
>= 10) {
2498 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm
, r
);
2501 r
->out
.result
= _spoolss_DeleteForm(p
, r
);
2503 if (p
->rng_fault_state
) {
2505 /* Return true here, srv_pipe_hnd.c will take care */
2509 if (DEBUGLEVEL
>= 10) {
2510 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm
, r
);
2513 push
= ndr_push_init_ctx(r
, NULL
);
2519 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2520 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2525 blob
= ndr_push_blob(push
);
2526 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2536 static bool api_spoolss_GetForm(pipes_struct
*p
)
2538 const struct ndr_interface_call
*call
;
2539 struct ndr_pull
*pull
;
2540 struct ndr_push
*push
;
2541 enum ndr_err_code ndr_err
;
2543 struct spoolss_GetForm
*r
;
2545 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETFORM
];
2547 r
= talloc(talloc_tos(), struct spoolss_GetForm
);
2552 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2557 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2563 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2564 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2565 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2570 if (DEBUGLEVEL
>= 10) {
2571 NDR_PRINT_IN_DEBUG(spoolss_GetForm
, r
);
2574 ZERO_STRUCT(r
->out
);
2575 r
->out
.info
= talloc_zero(r
, union spoolss_FormInfo
);
2576 if (r
->out
.info
== NULL
) {
2581 r
->out
.needed
= talloc_zero(r
, uint32_t);
2582 if (r
->out
.needed
== NULL
) {
2587 r
->out
.result
= _spoolss_GetForm(p
, r
);
2589 if (p
->rng_fault_state
) {
2591 /* Return true here, srv_pipe_hnd.c will take care */
2595 if (DEBUGLEVEL
>= 10) {
2596 NDR_PRINT_OUT_DEBUG(spoolss_GetForm
, r
);
2599 push
= ndr_push_init_ctx(r
, NULL
);
2605 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2606 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2611 blob
= ndr_push_blob(push
);
2612 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2622 static bool api_spoolss_SetForm(pipes_struct
*p
)
2624 const struct ndr_interface_call
*call
;
2625 struct ndr_pull
*pull
;
2626 struct ndr_push
*push
;
2627 enum ndr_err_code ndr_err
;
2629 struct spoolss_SetForm
*r
;
2631 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETFORM
];
2633 r
= talloc(talloc_tos(), struct spoolss_SetForm
);
2638 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2643 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2649 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2650 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2651 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2656 if (DEBUGLEVEL
>= 10) {
2657 NDR_PRINT_IN_DEBUG(spoolss_SetForm
, r
);
2660 r
->out
.result
= _spoolss_SetForm(p
, r
);
2662 if (p
->rng_fault_state
) {
2664 /* Return true here, srv_pipe_hnd.c will take care */
2668 if (DEBUGLEVEL
>= 10) {
2669 NDR_PRINT_OUT_DEBUG(spoolss_SetForm
, r
);
2672 push
= ndr_push_init_ctx(r
, NULL
);
2678 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2679 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2684 blob
= ndr_push_blob(push
);
2685 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2695 static bool api_spoolss_EnumForms(pipes_struct
*p
)
2697 const struct ndr_interface_call
*call
;
2698 struct ndr_pull
*pull
;
2699 struct ndr_push
*push
;
2700 enum ndr_err_code ndr_err
;
2702 struct spoolss_EnumForms
*r
;
2704 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMFORMS
];
2706 r
= talloc(talloc_tos(), struct spoolss_EnumForms
);
2711 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2716 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2722 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2723 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2724 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2729 if (DEBUGLEVEL
>= 10) {
2730 NDR_PRINT_IN_DEBUG(spoolss_EnumForms
, r
);
2733 ZERO_STRUCT(r
->out
);
2734 r
->out
.count
= talloc_zero(r
, uint32_t);
2735 if (r
->out
.count
== NULL
) {
2740 r
->out
.info
= talloc_zero(r
, union spoolss_FormInfo
*);
2741 if (r
->out
.info
== NULL
) {
2746 r
->out
.needed
= talloc_zero(r
, uint32_t);
2747 if (r
->out
.needed
== NULL
) {
2752 r
->out
.result
= _spoolss_EnumForms(p
, r
);
2754 if (p
->rng_fault_state
) {
2756 /* Return true here, srv_pipe_hnd.c will take care */
2760 if (DEBUGLEVEL
>= 10) {
2761 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms
, r
);
2764 push
= ndr_push_init_ctx(r
, NULL
);
2770 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2771 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2776 blob
= ndr_push_blob(push
);
2777 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2787 static bool api_spoolss_EnumPorts(pipes_struct
*p
)
2789 const struct ndr_interface_call
*call
;
2790 struct ndr_pull
*pull
;
2791 struct ndr_push
*push
;
2792 enum ndr_err_code ndr_err
;
2794 struct spoolss_EnumPorts
*r
;
2796 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPORTS
];
2798 r
= talloc(talloc_tos(), struct spoolss_EnumPorts
);
2803 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2808 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2814 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2815 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2816 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2821 if (DEBUGLEVEL
>= 10) {
2822 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts
, r
);
2825 ZERO_STRUCT(r
->out
);
2826 r
->out
.count
= talloc_zero(r
, uint32_t);
2827 if (r
->out
.count
== NULL
) {
2832 r
->out
.info
= talloc_zero(r
, union spoolss_PortInfo
*);
2833 if (r
->out
.info
== NULL
) {
2838 r
->out
.needed
= talloc_zero(r
, uint32_t);
2839 if (r
->out
.needed
== NULL
) {
2844 r
->out
.result
= _spoolss_EnumPorts(p
, r
);
2846 if (p
->rng_fault_state
) {
2848 /* Return true here, srv_pipe_hnd.c will take care */
2852 if (DEBUGLEVEL
>= 10) {
2853 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts
, r
);
2856 push
= ndr_push_init_ctx(r
, NULL
);
2862 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2863 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2868 blob
= ndr_push_blob(push
);
2869 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2879 static bool api_spoolss_EnumMonitors(pipes_struct
*p
)
2881 const struct ndr_interface_call
*call
;
2882 struct ndr_pull
*pull
;
2883 struct ndr_push
*push
;
2884 enum ndr_err_code ndr_err
;
2886 struct spoolss_EnumMonitors
*r
;
2888 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMMONITORS
];
2890 r
= talloc(talloc_tos(), struct spoolss_EnumMonitors
);
2895 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2900 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2906 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2907 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
2908 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2913 if (DEBUGLEVEL
>= 10) {
2914 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors
, r
);
2917 ZERO_STRUCT(r
->out
);
2918 r
->out
.count
= talloc_zero(r
, uint32_t);
2919 if (r
->out
.count
== NULL
) {
2924 r
->out
.info
= talloc_zero(r
, union spoolss_MonitorInfo
*);
2925 if (r
->out
.info
== NULL
) {
2930 r
->out
.needed
= talloc_zero(r
, uint32_t);
2931 if (r
->out
.needed
== NULL
) {
2936 r
->out
.result
= _spoolss_EnumMonitors(p
, r
);
2938 if (p
->rng_fault_state
) {
2940 /* Return true here, srv_pipe_hnd.c will take care */
2944 if (DEBUGLEVEL
>= 10) {
2945 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors
, r
);
2948 push
= ndr_push_init_ctx(r
, NULL
);
2954 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
2955 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
2960 blob
= ndr_push_blob(push
);
2961 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
2971 static bool api_spoolss_AddPort(pipes_struct
*p
)
2973 const struct ndr_interface_call
*call
;
2974 struct ndr_pull
*pull
;
2975 struct ndr_push
*push
;
2976 enum ndr_err_code ndr_err
;
2978 struct spoolss_AddPort
*r
;
2980 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPORT
];
2982 r
= talloc(talloc_tos(), struct spoolss_AddPort
);
2987 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
2992 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
2998 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
2999 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3000 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3005 if (DEBUGLEVEL
>= 10) {
3006 NDR_PRINT_IN_DEBUG(spoolss_AddPort
, r
);
3009 r
->out
.result
= _spoolss_AddPort(p
, r
);
3011 if (p
->rng_fault_state
) {
3013 /* Return true here, srv_pipe_hnd.c will take care */
3017 if (DEBUGLEVEL
>= 10) {
3018 NDR_PRINT_OUT_DEBUG(spoolss_AddPort
, r
);
3021 push
= ndr_push_init_ctx(r
, NULL
);
3027 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3028 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3033 blob
= ndr_push_blob(push
);
3034 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3044 static bool api_spoolss_ConfigurePort(pipes_struct
*p
)
3046 const struct ndr_interface_call
*call
;
3047 struct ndr_pull
*pull
;
3048 struct ndr_push
*push
;
3049 enum ndr_err_code ndr_err
;
3051 struct spoolss_ConfigurePort
*r
;
3053 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_CONFIGUREPORT
];
3055 r
= talloc(talloc_tos(), struct spoolss_ConfigurePort
);
3060 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3065 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3071 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3072 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3073 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3078 if (DEBUGLEVEL
>= 10) {
3079 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort
, r
);
3082 r
->out
.result
= _spoolss_ConfigurePort(p
, r
);
3084 if (p
->rng_fault_state
) {
3086 /* Return true here, srv_pipe_hnd.c will take care */
3090 if (DEBUGLEVEL
>= 10) {
3091 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort
, r
);
3094 push
= ndr_push_init_ctx(r
, NULL
);
3100 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3101 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3106 blob
= ndr_push_blob(push
);
3107 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3117 static bool api_spoolss_DeletePort(pipes_struct
*p
)
3119 const struct ndr_interface_call
*call
;
3120 struct ndr_pull
*pull
;
3121 struct ndr_push
*push
;
3122 enum ndr_err_code ndr_err
;
3124 struct spoolss_DeletePort
*r
;
3126 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPORT
];
3128 r
= talloc(talloc_tos(), struct spoolss_DeletePort
);
3133 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3138 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3144 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3145 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3146 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3151 if (DEBUGLEVEL
>= 10) {
3152 NDR_PRINT_IN_DEBUG(spoolss_DeletePort
, r
);
3155 r
->out
.result
= _spoolss_DeletePort(p
, r
);
3157 if (p
->rng_fault_state
) {
3159 /* Return true here, srv_pipe_hnd.c will take care */
3163 if (DEBUGLEVEL
>= 10) {
3164 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort
, r
);
3167 push
= ndr_push_init_ctx(r
, NULL
);
3173 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3174 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3179 blob
= ndr_push_blob(push
);
3180 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3190 static bool api_spoolss_CreatePrinterIC(pipes_struct
*p
)
3192 const struct ndr_interface_call
*call
;
3193 struct ndr_pull
*pull
;
3194 struct ndr_push
*push
;
3195 enum ndr_err_code ndr_err
;
3197 struct spoolss_CreatePrinterIC
*r
;
3199 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_CREATEPRINTERIC
];
3201 r
= talloc(talloc_tos(), struct spoolss_CreatePrinterIC
);
3206 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3211 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3217 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3218 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3219 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3224 if (DEBUGLEVEL
>= 10) {
3225 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC
, r
);
3228 r
->out
.result
= _spoolss_CreatePrinterIC(p
, r
);
3230 if (p
->rng_fault_state
) {
3232 /* Return true here, srv_pipe_hnd.c will take care */
3236 if (DEBUGLEVEL
>= 10) {
3237 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC
, r
);
3240 push
= ndr_push_init_ctx(r
, NULL
);
3246 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3247 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3252 blob
= ndr_push_blob(push
);
3253 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3263 static bool api_spoolss_PlayGDIScriptOnPrinterIC(pipes_struct
*p
)
3265 const struct ndr_interface_call
*call
;
3266 struct ndr_pull
*pull
;
3267 struct ndr_push
*push
;
3268 enum ndr_err_code ndr_err
;
3270 struct spoolss_PlayGDIScriptOnPrinterIC
*r
;
3272 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
];
3274 r
= talloc(talloc_tos(), struct spoolss_PlayGDIScriptOnPrinterIC
);
3279 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3284 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3290 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3291 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3292 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3297 if (DEBUGLEVEL
>= 10) {
3298 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, r
);
3301 r
->out
.result
= _spoolss_PlayGDIScriptOnPrinterIC(p
, r
);
3303 if (p
->rng_fault_state
) {
3305 /* Return true here, srv_pipe_hnd.c will take care */
3309 if (DEBUGLEVEL
>= 10) {
3310 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, r
);
3313 push
= ndr_push_init_ctx(r
, NULL
);
3319 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3320 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3325 blob
= ndr_push_blob(push
);
3326 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3336 static bool api_spoolss_DeletePrinterIC(pipes_struct
*p
)
3338 const struct ndr_interface_call
*call
;
3339 struct ndr_pull
*pull
;
3340 struct ndr_push
*push
;
3341 enum ndr_err_code ndr_err
;
3343 struct spoolss_DeletePrinterIC
*r
;
3345 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERIC
];
3347 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterIC
);
3352 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3357 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3363 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3364 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3365 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3370 if (DEBUGLEVEL
>= 10) {
3371 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC
, r
);
3374 r
->out
.result
= _spoolss_DeletePrinterIC(p
, r
);
3376 if (p
->rng_fault_state
) {
3378 /* Return true here, srv_pipe_hnd.c will take care */
3382 if (DEBUGLEVEL
>= 10) {
3383 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC
, r
);
3386 push
= ndr_push_init_ctx(r
, NULL
);
3392 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3393 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3398 blob
= ndr_push_blob(push
);
3399 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3409 static bool api_spoolss_AddPrinterConnection(pipes_struct
*p
)
3411 const struct ndr_interface_call
*call
;
3412 struct ndr_pull
*pull
;
3413 struct ndr_push
*push
;
3414 enum ndr_err_code ndr_err
;
3416 struct spoolss_AddPrinterConnection
*r
;
3418 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTERCONNECTION
];
3420 r
= talloc(talloc_tos(), struct spoolss_AddPrinterConnection
);
3425 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3430 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3436 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3437 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3438 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3443 if (DEBUGLEVEL
>= 10) {
3444 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection
, r
);
3447 r
->out
.result
= _spoolss_AddPrinterConnection(p
, r
);
3449 if (p
->rng_fault_state
) {
3451 /* Return true here, srv_pipe_hnd.c will take care */
3455 if (DEBUGLEVEL
>= 10) {
3456 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection
, r
);
3459 push
= ndr_push_init_ctx(r
, NULL
);
3465 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3466 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3471 blob
= ndr_push_blob(push
);
3472 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3482 static bool api_spoolss_DeletePrinterConnection(pipes_struct
*p
)
3484 const struct ndr_interface_call
*call
;
3485 struct ndr_pull
*pull
;
3486 struct ndr_push
*push
;
3487 enum ndr_err_code ndr_err
;
3489 struct spoolss_DeletePrinterConnection
*r
;
3491 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERCONNECTION
];
3493 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterConnection
);
3498 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3503 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3509 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3510 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3511 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3516 if (DEBUGLEVEL
>= 10) {
3517 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection
, r
);
3520 r
->out
.result
= _spoolss_DeletePrinterConnection(p
, r
);
3522 if (p
->rng_fault_state
) {
3524 /* Return true here, srv_pipe_hnd.c will take care */
3528 if (DEBUGLEVEL
>= 10) {
3529 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection
, r
);
3532 push
= ndr_push_init_ctx(r
, NULL
);
3538 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3539 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3544 blob
= ndr_push_blob(push
);
3545 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3555 static bool api_spoolss_PrinterMessageBox(pipes_struct
*p
)
3557 const struct ndr_interface_call
*call
;
3558 struct ndr_pull
*pull
;
3559 struct ndr_push
*push
;
3560 enum ndr_err_code ndr_err
;
3562 struct spoolss_PrinterMessageBox
*r
;
3564 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_PRINTERMESSAGEBOX
];
3566 r
= talloc(talloc_tos(), struct spoolss_PrinterMessageBox
);
3571 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3576 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3582 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3583 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3584 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3589 if (DEBUGLEVEL
>= 10) {
3590 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox
, r
);
3593 r
->out
.result
= _spoolss_PrinterMessageBox(p
, r
);
3595 if (p
->rng_fault_state
) {
3597 /* Return true here, srv_pipe_hnd.c will take care */
3601 if (DEBUGLEVEL
>= 10) {
3602 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox
, r
);
3605 push
= ndr_push_init_ctx(r
, NULL
);
3611 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3612 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3617 blob
= ndr_push_blob(push
);
3618 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3628 static bool api_spoolss_AddMonitor(pipes_struct
*p
)
3630 const struct ndr_interface_call
*call
;
3631 struct ndr_pull
*pull
;
3632 struct ndr_push
*push
;
3633 enum ndr_err_code ndr_err
;
3635 struct spoolss_AddMonitor
*r
;
3637 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDMONITOR
];
3639 r
= talloc(talloc_tos(), struct spoolss_AddMonitor
);
3644 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3649 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3655 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3656 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3657 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3662 if (DEBUGLEVEL
>= 10) {
3663 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor
, r
);
3666 r
->out
.result
= _spoolss_AddMonitor(p
, r
);
3668 if (p
->rng_fault_state
) {
3670 /* Return true here, srv_pipe_hnd.c will take care */
3674 if (DEBUGLEVEL
>= 10) {
3675 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor
, r
);
3678 push
= ndr_push_init_ctx(r
, NULL
);
3684 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3685 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3690 blob
= ndr_push_blob(push
);
3691 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3701 static bool api_spoolss_DeleteMonitor(pipes_struct
*p
)
3703 const struct ndr_interface_call
*call
;
3704 struct ndr_pull
*pull
;
3705 struct ndr_push
*push
;
3706 enum ndr_err_code ndr_err
;
3708 struct spoolss_DeleteMonitor
*r
;
3710 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEMONITOR
];
3712 r
= talloc(talloc_tos(), struct spoolss_DeleteMonitor
);
3717 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3722 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3728 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3729 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3730 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3735 if (DEBUGLEVEL
>= 10) {
3736 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor
, r
);
3739 r
->out
.result
= _spoolss_DeleteMonitor(p
, r
);
3741 if (p
->rng_fault_state
) {
3743 /* Return true here, srv_pipe_hnd.c will take care */
3747 if (DEBUGLEVEL
>= 10) {
3748 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor
, r
);
3751 push
= ndr_push_init_ctx(r
, NULL
);
3757 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3758 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3763 blob
= ndr_push_blob(push
);
3764 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3774 static bool api_spoolss_DeletePrintProcessor(pipes_struct
*p
)
3776 const struct ndr_interface_call
*call
;
3777 struct ndr_pull
*pull
;
3778 struct ndr_push
*push
;
3779 enum ndr_err_code ndr_err
;
3781 struct spoolss_DeletePrintProcessor
*r
;
3783 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTPROCESSOR
];
3785 r
= talloc(talloc_tos(), struct spoolss_DeletePrintProcessor
);
3790 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3795 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3801 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3802 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3803 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3808 if (DEBUGLEVEL
>= 10) {
3809 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor
, r
);
3812 r
->out
.result
= _spoolss_DeletePrintProcessor(p
, r
);
3814 if (p
->rng_fault_state
) {
3816 /* Return true here, srv_pipe_hnd.c will take care */
3820 if (DEBUGLEVEL
>= 10) {
3821 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor
, r
);
3824 push
= ndr_push_init_ctx(r
, NULL
);
3830 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3831 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3836 blob
= ndr_push_blob(push
);
3837 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3847 static bool api_spoolss_AddPrintProvidor(pipes_struct
*p
)
3849 const struct ndr_interface_call
*call
;
3850 struct ndr_pull
*pull
;
3851 struct ndr_push
*push
;
3852 enum ndr_err_code ndr_err
;
3854 struct spoolss_AddPrintProvidor
*r
;
3856 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTPROVIDOR
];
3858 r
= talloc(talloc_tos(), struct spoolss_AddPrintProvidor
);
3863 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3868 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3874 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3875 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3876 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3881 if (DEBUGLEVEL
>= 10) {
3882 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor
, r
);
3885 r
->out
.result
= _spoolss_AddPrintProvidor(p
, r
);
3887 if (p
->rng_fault_state
) {
3889 /* Return true here, srv_pipe_hnd.c will take care */
3893 if (DEBUGLEVEL
>= 10) {
3894 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor
, r
);
3897 push
= ndr_push_init_ctx(r
, NULL
);
3903 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3904 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3909 blob
= ndr_push_blob(push
);
3910 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3920 static bool api_spoolss_DeletePrintProvidor(pipes_struct
*p
)
3922 const struct ndr_interface_call
*call
;
3923 struct ndr_pull
*pull
;
3924 struct ndr_push
*push
;
3925 enum ndr_err_code ndr_err
;
3927 struct spoolss_DeletePrintProvidor
*r
;
3929 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTPROVIDOR
];
3931 r
= talloc(talloc_tos(), struct spoolss_DeletePrintProvidor
);
3936 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
3941 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
3947 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
3948 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
3949 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3954 if (DEBUGLEVEL
>= 10) {
3955 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor
, r
);
3958 r
->out
.result
= _spoolss_DeletePrintProvidor(p
, r
);
3960 if (p
->rng_fault_state
) {
3962 /* Return true here, srv_pipe_hnd.c will take care */
3966 if (DEBUGLEVEL
>= 10) {
3967 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor
, r
);
3970 push
= ndr_push_init_ctx(r
, NULL
);
3976 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
3977 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
3982 blob
= ndr_push_blob(push
);
3983 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
3993 static bool api_spoolss_EnumPrintProcDataTypes(pipes_struct
*p
)
3995 const struct ndr_interface_call
*call
;
3996 struct ndr_pull
*pull
;
3997 struct ndr_push
*push
;
3998 enum ndr_err_code ndr_err
;
4000 struct spoolss_EnumPrintProcDataTypes
*r
;
4002 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
];
4004 r
= talloc(talloc_tos(), struct spoolss_EnumPrintProcDataTypes
);
4009 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4014 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4020 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4021 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4022 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4027 if (DEBUGLEVEL
>= 10) {
4028 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes
, r
);
4031 ZERO_STRUCT(r
->out
);
4032 r
->out
.count
= talloc_zero(r
, uint32_t);
4033 if (r
->out
.count
== NULL
) {
4038 r
->out
.info
= talloc_zero(r
, union spoolss_PrintProcDataTypesInfo
*);
4039 if (r
->out
.info
== NULL
) {
4044 r
->out
.needed
= talloc_zero(r
, uint32_t);
4045 if (r
->out
.needed
== NULL
) {
4050 r
->out
.result
= _spoolss_EnumPrintProcDataTypes(p
, r
);
4052 if (p
->rng_fault_state
) {
4054 /* Return true here, srv_pipe_hnd.c will take care */
4058 if (DEBUGLEVEL
>= 10) {
4059 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes
, r
);
4062 push
= ndr_push_init_ctx(r
, NULL
);
4068 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4069 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4074 blob
= ndr_push_blob(push
);
4075 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4085 static bool api_spoolss_ResetPrinter(pipes_struct
*p
)
4087 const struct ndr_interface_call
*call
;
4088 struct ndr_pull
*pull
;
4089 struct ndr_push
*push
;
4090 enum ndr_err_code ndr_err
;
4092 struct spoolss_ResetPrinter
*r
;
4094 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_RESETPRINTER
];
4096 r
= talloc(talloc_tos(), struct spoolss_ResetPrinter
);
4101 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4106 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4112 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4113 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4114 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4119 if (DEBUGLEVEL
>= 10) {
4120 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter
, r
);
4123 r
->out
.result
= _spoolss_ResetPrinter(p
, r
);
4125 if (p
->rng_fault_state
) {
4127 /* Return true here, srv_pipe_hnd.c will take care */
4131 if (DEBUGLEVEL
>= 10) {
4132 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter
, r
);
4135 push
= ndr_push_init_ctx(r
, NULL
);
4141 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4142 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4147 blob
= ndr_push_blob(push
);
4148 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4158 static bool api_spoolss_GetPrinterDriver2(pipes_struct
*p
)
4160 const struct ndr_interface_call
*call
;
4161 struct ndr_pull
*pull
;
4162 struct ndr_push
*push
;
4163 enum ndr_err_code ndr_err
;
4165 struct spoolss_GetPrinterDriver2
*r
;
4167 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTERDRIVER2
];
4169 r
= talloc(talloc_tos(), struct spoolss_GetPrinterDriver2
);
4174 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4179 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4185 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4186 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4187 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4192 if (DEBUGLEVEL
>= 10) {
4193 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2
, r
);
4196 ZERO_STRUCT(r
->out
);
4197 r
->out
.info
= talloc_zero(r
, union spoolss_DriverInfo
);
4198 if (r
->out
.info
== NULL
) {
4203 r
->out
.needed
= talloc_zero(r
, uint32_t);
4204 if (r
->out
.needed
== NULL
) {
4209 r
->out
.server_major_version
= talloc_zero(r
, uint32_t);
4210 if (r
->out
.server_major_version
== NULL
) {
4215 r
->out
.server_minor_version
= talloc_zero(r
, uint32_t);
4216 if (r
->out
.server_minor_version
== NULL
) {
4221 r
->out
.result
= _spoolss_GetPrinterDriver2(p
, r
);
4223 if (p
->rng_fault_state
) {
4225 /* Return true here, srv_pipe_hnd.c will take care */
4229 if (DEBUGLEVEL
>= 10) {
4230 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2
, r
);
4233 push
= ndr_push_init_ctx(r
, NULL
);
4239 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4240 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4245 blob
= ndr_push_blob(push
);
4246 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4256 static bool api_spoolss_FindFirstPrinterChangeNotification(pipes_struct
*p
)
4258 const struct ndr_interface_call
*call
;
4259 struct ndr_pull
*pull
;
4260 struct ndr_push
*push
;
4261 enum ndr_err_code ndr_err
;
4263 struct spoolss_FindFirstPrinterChangeNotification
*r
;
4265 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
];
4267 r
= talloc(talloc_tos(), struct spoolss_FindFirstPrinterChangeNotification
);
4272 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4277 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4283 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4284 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4285 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4290 if (DEBUGLEVEL
>= 10) {
4291 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification
, r
);
4294 r
->out
.result
= _spoolss_FindFirstPrinterChangeNotification(p
, r
);
4296 if (p
->rng_fault_state
) {
4298 /* Return true here, srv_pipe_hnd.c will take care */
4302 if (DEBUGLEVEL
>= 10) {
4303 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification
, r
);
4306 push
= ndr_push_init_ctx(r
, NULL
);
4312 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4313 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4318 blob
= ndr_push_blob(push
);
4319 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4329 static bool api_spoolss_FindNextPrinterChangeNotification(pipes_struct
*p
)
4331 const struct ndr_interface_call
*call
;
4332 struct ndr_pull
*pull
;
4333 struct ndr_push
*push
;
4334 enum ndr_err_code ndr_err
;
4336 struct spoolss_FindNextPrinterChangeNotification
*r
;
4338 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
];
4340 r
= talloc(talloc_tos(), struct spoolss_FindNextPrinterChangeNotification
);
4345 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4350 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4356 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4357 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4358 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4363 if (DEBUGLEVEL
>= 10) {
4364 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification
, r
);
4367 r
->out
.result
= _spoolss_FindNextPrinterChangeNotification(p
, r
);
4369 if (p
->rng_fault_state
) {
4371 /* Return true here, srv_pipe_hnd.c will take care */
4375 if (DEBUGLEVEL
>= 10) {
4376 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification
, r
);
4379 push
= ndr_push_init_ctx(r
, NULL
);
4385 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4386 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4391 blob
= ndr_push_blob(push
);
4392 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4402 static bool api_spoolss_FindClosePrinterNotify(pipes_struct
*p
)
4404 const struct ndr_interface_call
*call
;
4405 struct ndr_pull
*pull
;
4406 struct ndr_push
*push
;
4407 enum ndr_err_code ndr_err
;
4409 struct spoolss_FindClosePrinterNotify
*r
;
4411 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
];
4413 r
= talloc(talloc_tos(), struct spoolss_FindClosePrinterNotify
);
4418 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4423 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4429 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4430 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4431 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4436 if (DEBUGLEVEL
>= 10) {
4437 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify
, r
);
4440 r
->out
.result
= _spoolss_FindClosePrinterNotify(p
, r
);
4442 if (p
->rng_fault_state
) {
4444 /* Return true here, srv_pipe_hnd.c will take care */
4448 if (DEBUGLEVEL
>= 10) {
4449 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify
, r
);
4452 push
= ndr_push_init_ctx(r
, NULL
);
4458 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4459 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4464 blob
= ndr_push_blob(push
);
4465 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4475 static bool api_spoolss_RouterFindFirstPrinterChangeNotificationOld(pipes_struct
*p
)
4477 const struct ndr_interface_call
*call
;
4478 struct ndr_pull
*pull
;
4479 struct ndr_push
*push
;
4480 enum ndr_err_code ndr_err
;
4482 struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
;
4484 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
];
4486 r
= talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotificationOld
);
4491 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4496 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4502 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4503 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4504 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4509 if (DEBUGLEVEL
>= 10) {
4510 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, r
);
4513 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotificationOld(p
, r
);
4515 if (p
->rng_fault_state
) {
4517 /* Return true here, srv_pipe_hnd.c will take care */
4521 if (DEBUGLEVEL
>= 10) {
4522 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, r
);
4525 push
= ndr_push_init_ctx(r
, NULL
);
4531 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4532 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4537 blob
= ndr_push_blob(push
);
4538 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4548 static bool api_spoolss_ReplyOpenPrinter(pipes_struct
*p
)
4550 const struct ndr_interface_call
*call
;
4551 struct ndr_pull
*pull
;
4552 struct ndr_push
*push
;
4553 enum ndr_err_code ndr_err
;
4555 struct spoolss_ReplyOpenPrinter
*r
;
4557 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_REPLYOPENPRINTER
];
4559 r
= talloc(talloc_tos(), struct spoolss_ReplyOpenPrinter
);
4564 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4569 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4575 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4576 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4577 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4582 if (DEBUGLEVEL
>= 10) {
4583 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter
, r
);
4586 ZERO_STRUCT(r
->out
);
4587 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
4588 if (r
->out
.handle
== NULL
) {
4593 r
->out
.result
= _spoolss_ReplyOpenPrinter(p
, r
);
4595 if (p
->rng_fault_state
) {
4597 /* Return true here, srv_pipe_hnd.c will take care */
4601 if (DEBUGLEVEL
>= 10) {
4602 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter
, r
);
4605 push
= ndr_push_init_ctx(r
, NULL
);
4611 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4612 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4617 blob
= ndr_push_blob(push
);
4618 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4628 static bool api_spoolss_RouterReplyPrinter(pipes_struct
*p
)
4630 const struct ndr_interface_call
*call
;
4631 struct ndr_pull
*pull
;
4632 struct ndr_push
*push
;
4633 enum ndr_err_code ndr_err
;
4635 struct spoolss_RouterReplyPrinter
*r
;
4637 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERREPLYPRINTER
];
4639 r
= talloc(talloc_tos(), struct spoolss_RouterReplyPrinter
);
4644 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4649 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4655 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4656 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4657 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4662 if (DEBUGLEVEL
>= 10) {
4663 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter
, r
);
4666 r
->out
.result
= _spoolss_RouterReplyPrinter(p
, r
);
4668 if (p
->rng_fault_state
) {
4670 /* Return true here, srv_pipe_hnd.c will take care */
4674 if (DEBUGLEVEL
>= 10) {
4675 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter
, r
);
4678 push
= ndr_push_init_ctx(r
, NULL
);
4684 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4685 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4690 blob
= ndr_push_blob(push
);
4691 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4701 static bool api_spoolss_ReplyClosePrinter(pipes_struct
*p
)
4703 const struct ndr_interface_call
*call
;
4704 struct ndr_pull
*pull
;
4705 struct ndr_push
*push
;
4706 enum ndr_err_code ndr_err
;
4708 struct spoolss_ReplyClosePrinter
*r
;
4710 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_REPLYCLOSEPRINTER
];
4712 r
= talloc(talloc_tos(), struct spoolss_ReplyClosePrinter
);
4717 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4722 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4728 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4729 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4730 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4735 if (DEBUGLEVEL
>= 10) {
4736 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter
, r
);
4739 ZERO_STRUCT(r
->out
);
4740 r
->out
.handle
= r
->in
.handle
;
4741 r
->out
.result
= _spoolss_ReplyClosePrinter(p
, r
);
4743 if (p
->rng_fault_state
) {
4745 /* Return true here, srv_pipe_hnd.c will take care */
4749 if (DEBUGLEVEL
>= 10) {
4750 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter
, r
);
4753 push
= ndr_push_init_ctx(r
, NULL
);
4759 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4760 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4765 blob
= ndr_push_blob(push
);
4766 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4776 static bool api_spoolss_AddPortEx(pipes_struct
*p
)
4778 const struct ndr_interface_call
*call
;
4779 struct ndr_pull
*pull
;
4780 struct ndr_push
*push
;
4781 enum ndr_err_code ndr_err
;
4783 struct spoolss_AddPortEx
*r
;
4785 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPORTEX
];
4787 r
= talloc(talloc_tos(), struct spoolss_AddPortEx
);
4792 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4797 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4803 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4804 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4805 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4810 if (DEBUGLEVEL
>= 10) {
4811 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx
, r
);
4814 r
->out
.result
= _spoolss_AddPortEx(p
, r
);
4816 if (p
->rng_fault_state
) {
4818 /* Return true here, srv_pipe_hnd.c will take care */
4822 if (DEBUGLEVEL
>= 10) {
4823 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx
, r
);
4826 push
= ndr_push_init_ctx(r
, NULL
);
4832 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4833 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4838 blob
= ndr_push_blob(push
);
4839 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4849 static bool api_spoolss_RouterFindFirstPrinterChangeNotification(pipes_struct
*p
)
4851 const struct ndr_interface_call
*call
;
4852 struct ndr_pull
*pull
;
4853 struct ndr_push
*push
;
4854 enum ndr_err_code ndr_err
;
4856 struct spoolss_RouterFindFirstPrinterChangeNotification
*r
;
4858 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
];
4860 r
= talloc(talloc_tos(), struct spoolss_RouterFindFirstPrinterChangeNotification
);
4865 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4870 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4876 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4877 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4878 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4883 if (DEBUGLEVEL
>= 10) {
4884 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, r
);
4887 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotification(p
, r
);
4889 if (p
->rng_fault_state
) {
4891 /* Return true here, srv_pipe_hnd.c will take care */
4895 if (DEBUGLEVEL
>= 10) {
4896 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, r
);
4899 push
= ndr_push_init_ctx(r
, NULL
);
4905 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4906 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4911 blob
= ndr_push_blob(push
);
4912 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4922 static bool api_spoolss_SpoolerInit(pipes_struct
*p
)
4924 const struct ndr_interface_call
*call
;
4925 struct ndr_pull
*pull
;
4926 struct ndr_push
*push
;
4927 enum ndr_err_code ndr_err
;
4929 struct spoolss_SpoolerInit
*r
;
4931 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SPOOLERINIT
];
4933 r
= talloc(talloc_tos(), struct spoolss_SpoolerInit
);
4938 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
4943 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
4949 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
4950 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
4951 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4956 if (DEBUGLEVEL
>= 10) {
4957 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit
, r
);
4960 r
->out
.result
= _spoolss_SpoolerInit(p
, r
);
4962 if (p
->rng_fault_state
) {
4964 /* Return true here, srv_pipe_hnd.c will take care */
4968 if (DEBUGLEVEL
>= 10) {
4969 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit
, r
);
4972 push
= ndr_push_init_ctx(r
, NULL
);
4978 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
4979 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
4984 blob
= ndr_push_blob(push
);
4985 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
4995 static bool api_spoolss_ResetPrinterEx(pipes_struct
*p
)
4997 const struct ndr_interface_call
*call
;
4998 struct ndr_pull
*pull
;
4999 struct ndr_push
*push
;
5000 enum ndr_err_code ndr_err
;
5002 struct spoolss_ResetPrinterEx
*r
;
5004 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_RESETPRINTEREX
];
5006 r
= talloc(talloc_tos(), struct spoolss_ResetPrinterEx
);
5011 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5016 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5022 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5023 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5024 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5029 if (DEBUGLEVEL
>= 10) {
5030 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx
, r
);
5033 r
->out
.result
= _spoolss_ResetPrinterEx(p
, r
);
5035 if (p
->rng_fault_state
) {
5037 /* Return true here, srv_pipe_hnd.c will take care */
5041 if (DEBUGLEVEL
>= 10) {
5042 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx
, r
);
5045 push
= ndr_push_init_ctx(r
, NULL
);
5051 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5052 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5057 blob
= ndr_push_blob(push
);
5058 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5068 static bool api_spoolss_RemoteFindFirstPrinterChangeNotifyEx(pipes_struct
*p
)
5070 const struct ndr_interface_call
*call
;
5071 struct ndr_pull
*pull
;
5072 struct ndr_push
*push
;
5073 enum ndr_err_code ndr_err
;
5075 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
;
5077 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
];
5079 r
= talloc(talloc_tos(), struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
);
5084 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5089 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5095 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5096 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5097 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5102 if (DEBUGLEVEL
>= 10) {
5103 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, r
);
5106 r
->out
.result
= _spoolss_RemoteFindFirstPrinterChangeNotifyEx(p
, r
);
5108 if (p
->rng_fault_state
) {
5110 /* Return true here, srv_pipe_hnd.c will take care */
5114 if (DEBUGLEVEL
>= 10) {
5115 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, r
);
5118 push
= ndr_push_init_ctx(r
, NULL
);
5124 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5125 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5130 blob
= ndr_push_blob(push
);
5131 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5141 static bool api_spoolss_RouterReplyPrinterEx(pipes_struct
*p
)
5143 const struct ndr_interface_call
*call
;
5144 struct ndr_pull
*pull
;
5145 struct ndr_push
*push
;
5146 enum ndr_err_code ndr_err
;
5148 struct spoolss_RouterReplyPrinterEx
*r
;
5150 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERREPLYPRINTEREX
];
5152 r
= talloc(talloc_tos(), struct spoolss_RouterReplyPrinterEx
);
5157 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5162 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5168 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5169 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5170 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5175 if (DEBUGLEVEL
>= 10) {
5176 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx
, r
);
5179 ZERO_STRUCT(r
->out
);
5180 r
->out
.reply_result
= talloc_zero(r
, uint32_t);
5181 if (r
->out
.reply_result
== NULL
) {
5186 r
->out
.result
= _spoolss_RouterReplyPrinterEx(p
, r
);
5188 if (p
->rng_fault_state
) {
5190 /* Return true here, srv_pipe_hnd.c will take care */
5194 if (DEBUGLEVEL
>= 10) {
5195 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx
, r
);
5198 push
= ndr_push_init_ctx(r
, NULL
);
5204 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5205 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5210 blob
= ndr_push_blob(push
);
5211 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5221 static bool api_spoolss_RouterRefreshPrinterChangeNotify(pipes_struct
*p
)
5223 const struct ndr_interface_call
*call
;
5224 struct ndr_pull
*pull
;
5225 struct ndr_push
*push
;
5226 enum ndr_err_code ndr_err
;
5228 struct spoolss_RouterRefreshPrinterChangeNotify
*r
;
5230 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
];
5232 r
= talloc(talloc_tos(), struct spoolss_RouterRefreshPrinterChangeNotify
);
5237 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5242 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5248 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5249 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5250 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5255 if (DEBUGLEVEL
>= 10) {
5256 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, r
);
5259 ZERO_STRUCT(r
->out
);
5260 r
->out
.info
= talloc_zero(r
, struct spoolss_NotifyInfo
*);
5261 if (r
->out
.info
== NULL
) {
5266 r
->out
.result
= _spoolss_RouterRefreshPrinterChangeNotify(p
, r
);
5268 if (p
->rng_fault_state
) {
5270 /* Return true here, srv_pipe_hnd.c will take care */
5274 if (DEBUGLEVEL
>= 10) {
5275 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, r
);
5278 push
= ndr_push_init_ctx(r
, NULL
);
5284 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5285 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5290 blob
= ndr_push_blob(push
);
5291 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5301 static bool api_spoolss_44(pipes_struct
*p
)
5303 const struct ndr_interface_call
*call
;
5304 struct ndr_pull
*pull
;
5305 struct ndr_push
*push
;
5306 enum ndr_err_code ndr_err
;
5308 struct spoolss_44
*r
;
5310 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_44
];
5312 r
= talloc(talloc_tos(), struct spoolss_44
);
5317 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5322 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5328 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5329 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5330 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5335 if (DEBUGLEVEL
>= 10) {
5336 NDR_PRINT_IN_DEBUG(spoolss_44
, r
);
5339 r
->out
.result
= _spoolss_44(p
, r
);
5341 if (p
->rng_fault_state
) {
5343 /* Return true here, srv_pipe_hnd.c will take care */
5347 if (DEBUGLEVEL
>= 10) {
5348 NDR_PRINT_OUT_DEBUG(spoolss_44
, r
);
5351 push
= ndr_push_init_ctx(r
, NULL
);
5357 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5358 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5363 blob
= ndr_push_blob(push
);
5364 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5374 static bool api_spoolss_OpenPrinterEx(pipes_struct
*p
)
5376 const struct ndr_interface_call
*call
;
5377 struct ndr_pull
*pull
;
5378 struct ndr_push
*push
;
5379 enum ndr_err_code ndr_err
;
5381 struct spoolss_OpenPrinterEx
*r
;
5383 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_OPENPRINTEREX
];
5385 r
= talloc(talloc_tos(), struct spoolss_OpenPrinterEx
);
5390 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5395 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5401 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5402 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5403 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5408 if (DEBUGLEVEL
>= 10) {
5409 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx
, r
);
5412 ZERO_STRUCT(r
->out
);
5413 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
5414 if (r
->out
.handle
== NULL
) {
5419 r
->out
.result
= _spoolss_OpenPrinterEx(p
, r
);
5421 if (p
->rng_fault_state
) {
5423 /* Return true here, srv_pipe_hnd.c will take care */
5427 if (DEBUGLEVEL
>= 10) {
5428 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx
, r
);
5431 push
= ndr_push_init_ctx(r
, NULL
);
5437 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5438 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5443 blob
= ndr_push_blob(push
);
5444 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5454 static bool api_spoolss_AddPrinterEx(pipes_struct
*p
)
5456 const struct ndr_interface_call
*call
;
5457 struct ndr_pull
*pull
;
5458 struct ndr_push
*push
;
5459 enum ndr_err_code ndr_err
;
5461 struct spoolss_AddPrinterEx
*r
;
5463 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTEREX
];
5465 r
= talloc(talloc_tos(), struct spoolss_AddPrinterEx
);
5470 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5475 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5481 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5482 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5483 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5488 if (DEBUGLEVEL
>= 10) {
5489 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx
, r
);
5492 ZERO_STRUCT(r
->out
);
5493 r
->out
.handle
= talloc_zero(r
, struct policy_handle
);
5494 if (r
->out
.handle
== NULL
) {
5499 r
->out
.result
= _spoolss_AddPrinterEx(p
, r
);
5501 if (p
->rng_fault_state
) {
5503 /* Return true here, srv_pipe_hnd.c will take care */
5507 if (DEBUGLEVEL
>= 10) {
5508 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx
, r
);
5511 push
= ndr_push_init_ctx(r
, NULL
);
5517 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5518 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5523 blob
= ndr_push_blob(push
);
5524 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5534 static bool api_spoolss_47(pipes_struct
*p
)
5536 const struct ndr_interface_call
*call
;
5537 struct ndr_pull
*pull
;
5538 struct ndr_push
*push
;
5539 enum ndr_err_code ndr_err
;
5541 struct spoolss_47
*r
;
5543 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_47
];
5545 r
= talloc(talloc_tos(), struct spoolss_47
);
5550 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5555 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5561 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5562 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5563 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5568 if (DEBUGLEVEL
>= 10) {
5569 NDR_PRINT_IN_DEBUG(spoolss_47
, r
);
5572 r
->out
.result
= _spoolss_47(p
, r
);
5574 if (p
->rng_fault_state
) {
5576 /* Return true here, srv_pipe_hnd.c will take care */
5580 if (DEBUGLEVEL
>= 10) {
5581 NDR_PRINT_OUT_DEBUG(spoolss_47
, r
);
5584 push
= ndr_push_init_ctx(r
, NULL
);
5590 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5591 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5596 blob
= ndr_push_blob(push
);
5597 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5607 static bool api_spoolss_EnumPrinterData(pipes_struct
*p
)
5609 const struct ndr_interface_call
*call
;
5610 struct ndr_pull
*pull
;
5611 struct ndr_push
*push
;
5612 enum ndr_err_code ndr_err
;
5614 struct spoolss_EnumPrinterData
*r
;
5616 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERDATA
];
5618 r
= talloc(talloc_tos(), struct spoolss_EnumPrinterData
);
5623 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5628 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5634 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5635 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5636 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5641 if (DEBUGLEVEL
>= 10) {
5642 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData
, r
);
5645 ZERO_STRUCT(r
->out
);
5646 r
->out
.value_name
= talloc_zero_array(r
, const char, r
->in
.value_offered
/ 2);
5647 if (r
->out
.value_name
== NULL
) {
5652 r
->out
.value_needed
= talloc_zero(r
, uint32_t);
5653 if (r
->out
.value_needed
== NULL
) {
5658 r
->out
.type
= talloc_zero(r
, enum winreg_Type
);
5659 if (r
->out
.type
== NULL
) {
5664 r
->out
.data
= talloc_zero_array(r
, uint8_t, r
->in
.data_offered
);
5665 if (r
->out
.data
== NULL
) {
5670 r
->out
.data_needed
= talloc_zero(r
, uint32_t);
5671 if (r
->out
.data_needed
== NULL
) {
5676 r
->out
.result
= _spoolss_EnumPrinterData(p
, r
);
5678 if (p
->rng_fault_state
) {
5680 /* Return true here, srv_pipe_hnd.c will take care */
5684 if (DEBUGLEVEL
>= 10) {
5685 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData
, r
);
5688 push
= ndr_push_init_ctx(r
, NULL
);
5694 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5695 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5700 blob
= ndr_push_blob(push
);
5701 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5711 static bool api_spoolss_DeletePrinterData(pipes_struct
*p
)
5713 const struct ndr_interface_call
*call
;
5714 struct ndr_pull
*pull
;
5715 struct ndr_push
*push
;
5716 enum ndr_err_code ndr_err
;
5718 struct spoolss_DeletePrinterData
*r
;
5720 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERDATA
];
5722 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterData
);
5727 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5732 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5738 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5739 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5740 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5745 if (DEBUGLEVEL
>= 10) {
5746 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData
, r
);
5749 r
->out
.result
= _spoolss_DeletePrinterData(p
, r
);
5751 if (p
->rng_fault_state
) {
5753 /* Return true here, srv_pipe_hnd.c will take care */
5757 if (DEBUGLEVEL
>= 10) {
5758 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData
, r
);
5761 push
= ndr_push_init_ctx(r
, NULL
);
5767 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5768 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5773 blob
= ndr_push_blob(push
);
5774 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5784 static bool api_spoolss_4a(pipes_struct
*p
)
5786 const struct ndr_interface_call
*call
;
5787 struct ndr_pull
*pull
;
5788 struct ndr_push
*push
;
5789 enum ndr_err_code ndr_err
;
5791 struct spoolss_4a
*r
;
5793 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_4A
];
5795 r
= talloc(talloc_tos(), struct spoolss_4a
);
5800 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5805 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5811 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5812 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5813 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5818 if (DEBUGLEVEL
>= 10) {
5819 NDR_PRINT_IN_DEBUG(spoolss_4a
, r
);
5822 r
->out
.result
= _spoolss_4a(p
, r
);
5824 if (p
->rng_fault_state
) {
5826 /* Return true here, srv_pipe_hnd.c will take care */
5830 if (DEBUGLEVEL
>= 10) {
5831 NDR_PRINT_OUT_DEBUG(spoolss_4a
, r
);
5834 push
= ndr_push_init_ctx(r
, NULL
);
5840 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5841 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5846 blob
= ndr_push_blob(push
);
5847 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5857 static bool api_spoolss_4b(pipes_struct
*p
)
5859 const struct ndr_interface_call
*call
;
5860 struct ndr_pull
*pull
;
5861 struct ndr_push
*push
;
5862 enum ndr_err_code ndr_err
;
5864 struct spoolss_4b
*r
;
5866 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_4B
];
5868 r
= talloc(talloc_tos(), struct spoolss_4b
);
5873 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5878 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5884 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5885 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5891 if (DEBUGLEVEL
>= 10) {
5892 NDR_PRINT_IN_DEBUG(spoolss_4b
, r
);
5895 r
->out
.result
= _spoolss_4b(p
, r
);
5897 if (p
->rng_fault_state
) {
5899 /* Return true here, srv_pipe_hnd.c will take care */
5903 if (DEBUGLEVEL
>= 10) {
5904 NDR_PRINT_OUT_DEBUG(spoolss_4b
, r
);
5907 push
= ndr_push_init_ctx(r
, NULL
);
5913 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5914 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5919 blob
= ndr_push_blob(push
);
5920 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
5930 static bool api_spoolss_4c(pipes_struct
*p
)
5932 const struct ndr_interface_call
*call
;
5933 struct ndr_pull
*pull
;
5934 struct ndr_push
*push
;
5935 enum ndr_err_code ndr_err
;
5937 struct spoolss_4c
*r
;
5939 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_4C
];
5941 r
= talloc(talloc_tos(), struct spoolss_4c
);
5946 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
5951 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
5957 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
5958 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
5959 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5964 if (DEBUGLEVEL
>= 10) {
5965 NDR_PRINT_IN_DEBUG(spoolss_4c
, r
);
5968 r
->out
.result
= _spoolss_4c(p
, r
);
5970 if (p
->rng_fault_state
) {
5972 /* Return true here, srv_pipe_hnd.c will take care */
5976 if (DEBUGLEVEL
>= 10) {
5977 NDR_PRINT_OUT_DEBUG(spoolss_4c
, r
);
5980 push
= ndr_push_init_ctx(r
, NULL
);
5986 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
5987 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
5992 blob
= ndr_push_blob(push
);
5993 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6003 static bool api_spoolss_SetPrinterDataEx(pipes_struct
*p
)
6005 const struct ndr_interface_call
*call
;
6006 struct ndr_pull
*pull
;
6007 struct ndr_push
*push
;
6008 enum ndr_err_code ndr_err
;
6010 struct spoolss_SetPrinterDataEx
*r
;
6012 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_SETPRINTERDATAEX
];
6014 r
= talloc(talloc_tos(), struct spoolss_SetPrinterDataEx
);
6019 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6024 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6030 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6031 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6032 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6037 if (DEBUGLEVEL
>= 10) {
6038 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx
, r
);
6041 r
->out
.result
= _spoolss_SetPrinterDataEx(p
, r
);
6043 if (p
->rng_fault_state
) {
6045 /* Return true here, srv_pipe_hnd.c will take care */
6049 if (DEBUGLEVEL
>= 10) {
6050 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx
, r
);
6053 push
= ndr_push_init_ctx(r
, NULL
);
6059 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6060 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6065 blob
= ndr_push_blob(push
);
6066 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6076 static bool api_spoolss_GetPrinterDataEx(pipes_struct
*p
)
6078 const struct ndr_interface_call
*call
;
6079 struct ndr_pull
*pull
;
6080 struct ndr_push
*push
;
6081 enum ndr_err_code ndr_err
;
6083 struct spoolss_GetPrinterDataEx
*r
;
6085 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_GETPRINTERDATAEX
];
6087 r
= talloc(talloc_tos(), struct spoolss_GetPrinterDataEx
);
6092 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6097 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6103 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6104 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6105 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6110 if (DEBUGLEVEL
>= 10) {
6111 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx
, r
);
6114 ZERO_STRUCT(r
->out
);
6115 r
->out
.type
= talloc_zero(r
, enum winreg_Type
);
6116 if (r
->out
.type
== NULL
) {
6121 r
->out
.buffer
= talloc_zero_array(r
, uint8_t, r
->in
.offered
);
6122 if (r
->out
.buffer
== NULL
) {
6127 r
->out
.needed
= talloc_zero(r
, uint32_t);
6128 if (r
->out
.needed
== NULL
) {
6133 r
->out
.result
= _spoolss_GetPrinterDataEx(p
, r
);
6135 if (p
->rng_fault_state
) {
6137 /* Return true here, srv_pipe_hnd.c will take care */
6141 if (DEBUGLEVEL
>= 10) {
6142 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx
, r
);
6145 push
= ndr_push_init_ctx(r
, NULL
);
6151 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6152 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6157 blob
= ndr_push_blob(push
);
6158 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6168 static bool api_spoolss_EnumPrinterDataEx(pipes_struct
*p
)
6170 const struct ndr_interface_call
*call
;
6171 struct ndr_pull
*pull
;
6172 struct ndr_push
*push
;
6173 enum ndr_err_code ndr_err
;
6175 struct spoolss_EnumPrinterDataEx
*r
;
6177 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERDATAEX
];
6179 r
= talloc(talloc_tos(), struct spoolss_EnumPrinterDataEx
);
6184 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6189 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6195 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6196 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6197 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6202 if (DEBUGLEVEL
>= 10) {
6203 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx
, r
);
6206 ZERO_STRUCT(r
->out
);
6207 r
->out
.count
= talloc_zero(r
, uint32_t);
6208 if (r
->out
.count
== NULL
) {
6213 r
->out
.info
= talloc_zero(r
, struct spoolss_PrinterEnumValues
*);
6214 if (r
->out
.info
== NULL
) {
6219 r
->out
.needed
= talloc_zero(r
, uint32_t);
6220 if (r
->out
.needed
== NULL
) {
6225 r
->out
.result
= _spoolss_EnumPrinterDataEx(p
, r
);
6227 if (p
->rng_fault_state
) {
6229 /* Return true here, srv_pipe_hnd.c will take care */
6233 if (DEBUGLEVEL
>= 10) {
6234 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx
, r
);
6237 push
= ndr_push_init_ctx(r
, NULL
);
6243 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6244 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6249 blob
= ndr_push_blob(push
);
6250 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6260 static bool api_spoolss_EnumPrinterKey(pipes_struct
*p
)
6262 const struct ndr_interface_call
*call
;
6263 struct ndr_pull
*pull
;
6264 struct ndr_push
*push
;
6265 enum ndr_err_code ndr_err
;
6267 struct spoolss_EnumPrinterKey
*r
;
6269 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ENUMPRINTERKEY
];
6271 r
= talloc(talloc_tos(), struct spoolss_EnumPrinterKey
);
6276 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6281 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6287 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6288 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6289 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6294 if (DEBUGLEVEL
>= 10) {
6295 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey
, r
);
6298 ZERO_STRUCT(r
->out
);
6299 r
->out
.key_buffer
= talloc_zero(r
, const char **);
6300 if (r
->out
.key_buffer
== NULL
) {
6305 r
->out
.needed
= talloc_zero(r
, uint32_t);
6306 if (r
->out
.needed
== NULL
) {
6311 r
->out
.result
= _spoolss_EnumPrinterKey(p
, r
);
6313 if (p
->rng_fault_state
) {
6315 /* Return true here, srv_pipe_hnd.c will take care */
6319 if (DEBUGLEVEL
>= 10) {
6320 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey
, r
);
6323 push
= ndr_push_init_ctx(r
, NULL
);
6329 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6330 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6335 blob
= ndr_push_blob(push
);
6336 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6346 static bool api_spoolss_DeletePrinterDataEx(pipes_struct
*p
)
6348 const struct ndr_interface_call
*call
;
6349 struct ndr_pull
*pull
;
6350 struct ndr_push
*push
;
6351 enum ndr_err_code ndr_err
;
6353 struct spoolss_DeletePrinterDataEx
*r
;
6355 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERDATAEX
];
6357 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterDataEx
);
6362 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6367 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6373 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6374 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6375 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6380 if (DEBUGLEVEL
>= 10) {
6381 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx
, r
);
6384 r
->out
.result
= _spoolss_DeletePrinterDataEx(p
, r
);
6386 if (p
->rng_fault_state
) {
6388 /* Return true here, srv_pipe_hnd.c will take care */
6392 if (DEBUGLEVEL
>= 10) {
6393 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx
, r
);
6396 push
= ndr_push_init_ctx(r
, NULL
);
6402 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6403 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6408 blob
= ndr_push_blob(push
);
6409 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6419 static bool api_spoolss_DeletePrinterKey(pipes_struct
*p
)
6421 const struct ndr_interface_call
*call
;
6422 struct ndr_pull
*pull
;
6423 struct ndr_push
*push
;
6424 enum ndr_err_code ndr_err
;
6426 struct spoolss_DeletePrinterKey
*r
;
6428 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERKEY
];
6430 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterKey
);
6435 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6440 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6446 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6447 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6448 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6453 if (DEBUGLEVEL
>= 10) {
6454 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey
, r
);
6457 r
->out
.result
= _spoolss_DeletePrinterKey(p
, r
);
6459 if (p
->rng_fault_state
) {
6461 /* Return true here, srv_pipe_hnd.c will take care */
6465 if (DEBUGLEVEL
>= 10) {
6466 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey
, r
);
6469 push
= ndr_push_init_ctx(r
, NULL
);
6475 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6476 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6481 blob
= ndr_push_blob(push
);
6482 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6492 static bool api_spoolss_53(pipes_struct
*p
)
6494 const struct ndr_interface_call
*call
;
6495 struct ndr_pull
*pull
;
6496 struct ndr_push
*push
;
6497 enum ndr_err_code ndr_err
;
6499 struct spoolss_53
*r
;
6501 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_53
];
6503 r
= talloc(talloc_tos(), struct spoolss_53
);
6508 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6513 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6519 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6520 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6521 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6526 if (DEBUGLEVEL
>= 10) {
6527 NDR_PRINT_IN_DEBUG(spoolss_53
, r
);
6530 r
->out
.result
= _spoolss_53(p
, r
);
6532 if (p
->rng_fault_state
) {
6534 /* Return true here, srv_pipe_hnd.c will take care */
6538 if (DEBUGLEVEL
>= 10) {
6539 NDR_PRINT_OUT_DEBUG(spoolss_53
, r
);
6542 push
= ndr_push_init_ctx(r
, NULL
);
6548 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6549 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6554 blob
= ndr_push_blob(push
);
6555 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6565 static bool api_spoolss_DeletePrinterDriverEx(pipes_struct
*p
)
6567 const struct ndr_interface_call
*call
;
6568 struct ndr_pull
*pull
;
6569 struct ndr_push
*push
;
6570 enum ndr_err_code ndr_err
;
6572 struct spoolss_DeletePrinterDriverEx
*r
;
6574 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_DELETEPRINTERDRIVEREX
];
6576 r
= talloc(talloc_tos(), struct spoolss_DeletePrinterDriverEx
);
6581 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6586 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6592 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6593 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6594 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6599 if (DEBUGLEVEL
>= 10) {
6600 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx
, r
);
6603 r
->out
.result
= _spoolss_DeletePrinterDriverEx(p
, r
);
6605 if (p
->rng_fault_state
) {
6607 /* Return true here, srv_pipe_hnd.c will take care */
6611 if (DEBUGLEVEL
>= 10) {
6612 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx
, r
);
6615 push
= ndr_push_init_ctx(r
, NULL
);
6621 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6622 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6627 blob
= ndr_push_blob(push
);
6628 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6638 static bool api_spoolss_55(pipes_struct
*p
)
6640 const struct ndr_interface_call
*call
;
6641 struct ndr_pull
*pull
;
6642 struct ndr_push
*push
;
6643 enum ndr_err_code ndr_err
;
6645 struct spoolss_55
*r
;
6647 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_55
];
6649 r
= talloc(talloc_tos(), struct spoolss_55
);
6654 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6659 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6665 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6666 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6667 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6672 if (DEBUGLEVEL
>= 10) {
6673 NDR_PRINT_IN_DEBUG(spoolss_55
, r
);
6676 r
->out
.result
= _spoolss_55(p
, r
);
6678 if (p
->rng_fault_state
) {
6680 /* Return true here, srv_pipe_hnd.c will take care */
6684 if (DEBUGLEVEL
>= 10) {
6685 NDR_PRINT_OUT_DEBUG(spoolss_55
, r
);
6688 push
= ndr_push_init_ctx(r
, NULL
);
6694 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6695 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6700 blob
= ndr_push_blob(push
);
6701 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6711 static bool api_spoolss_56(pipes_struct
*p
)
6713 const struct ndr_interface_call
*call
;
6714 struct ndr_pull
*pull
;
6715 struct ndr_push
*push
;
6716 enum ndr_err_code ndr_err
;
6718 struct spoolss_56
*r
;
6720 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_56
];
6722 r
= talloc(talloc_tos(), struct spoolss_56
);
6727 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6732 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6738 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6739 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6740 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6745 if (DEBUGLEVEL
>= 10) {
6746 NDR_PRINT_IN_DEBUG(spoolss_56
, r
);
6749 r
->out
.result
= _spoolss_56(p
, r
);
6751 if (p
->rng_fault_state
) {
6753 /* Return true here, srv_pipe_hnd.c will take care */
6757 if (DEBUGLEVEL
>= 10) {
6758 NDR_PRINT_OUT_DEBUG(spoolss_56
, r
);
6761 push
= ndr_push_init_ctx(r
, NULL
);
6767 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6768 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6773 blob
= ndr_push_blob(push
);
6774 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6784 static bool api_spoolss_57(pipes_struct
*p
)
6786 const struct ndr_interface_call
*call
;
6787 struct ndr_pull
*pull
;
6788 struct ndr_push
*push
;
6789 enum ndr_err_code ndr_err
;
6791 struct spoolss_57
*r
;
6793 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_57
];
6795 r
= talloc(talloc_tos(), struct spoolss_57
);
6800 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6805 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6811 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6812 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6813 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6818 if (DEBUGLEVEL
>= 10) {
6819 NDR_PRINT_IN_DEBUG(spoolss_57
, r
);
6822 r
->out
.result
= _spoolss_57(p
, r
);
6824 if (p
->rng_fault_state
) {
6826 /* Return true here, srv_pipe_hnd.c will take care */
6830 if (DEBUGLEVEL
>= 10) {
6831 NDR_PRINT_OUT_DEBUG(spoolss_57
, r
);
6834 push
= ndr_push_init_ctx(r
, NULL
);
6840 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6841 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6846 blob
= ndr_push_blob(push
);
6847 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6857 static bool api_spoolss_XcvData(pipes_struct
*p
)
6859 const struct ndr_interface_call
*call
;
6860 struct ndr_pull
*pull
;
6861 struct ndr_push
*push
;
6862 enum ndr_err_code ndr_err
;
6864 struct spoolss_XcvData
*r
;
6866 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_XCVDATA
];
6868 r
= talloc(talloc_tos(), struct spoolss_XcvData
);
6873 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6878 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6884 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6885 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6886 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6891 if (DEBUGLEVEL
>= 10) {
6892 NDR_PRINT_IN_DEBUG(spoolss_XcvData
, r
);
6895 ZERO_STRUCT(r
->out
);
6896 r
->out
.status_code
= r
->in
.status_code
;
6897 r
->out
.out_data
= talloc_zero_array(r
, uint8_t, r
->in
.out_data_size
);
6898 if (r
->out
.out_data
== NULL
) {
6903 r
->out
.needed
= talloc_zero(r
, uint32_t);
6904 if (r
->out
.needed
== NULL
) {
6909 r
->out
.result
= _spoolss_XcvData(p
, r
);
6911 if (p
->rng_fault_state
) {
6913 /* Return true here, srv_pipe_hnd.c will take care */
6917 if (DEBUGLEVEL
>= 10) {
6918 NDR_PRINT_OUT_DEBUG(spoolss_XcvData
, r
);
6921 push
= ndr_push_init_ctx(r
, NULL
);
6927 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
6928 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6933 blob
= ndr_push_blob(push
);
6934 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
6944 static bool api_spoolss_AddPrinterDriverEx(pipes_struct
*p
)
6946 const struct ndr_interface_call
*call
;
6947 struct ndr_pull
*pull
;
6948 struct ndr_push
*push
;
6949 enum ndr_err_code ndr_err
;
6951 struct spoolss_AddPrinterDriverEx
*r
;
6953 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_ADDPRINTERDRIVEREX
];
6955 r
= talloc(talloc_tos(), struct spoolss_AddPrinterDriverEx
);
6960 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
6965 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
6971 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
6972 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
6973 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
6978 if (DEBUGLEVEL
>= 10) {
6979 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx
, r
);
6982 r
->out
.result
= _spoolss_AddPrinterDriverEx(p
, r
);
6984 if (p
->rng_fault_state
) {
6986 /* Return true here, srv_pipe_hnd.c will take care */
6990 if (DEBUGLEVEL
>= 10) {
6991 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx
, r
);
6994 push
= ndr_push_init_ctx(r
, NULL
);
7000 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7001 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7006 blob
= ndr_push_blob(push
);
7007 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7017 static bool api_spoolss_5a(pipes_struct
*p
)
7019 const struct ndr_interface_call
*call
;
7020 struct ndr_pull
*pull
;
7021 struct ndr_push
*push
;
7022 enum ndr_err_code ndr_err
;
7024 struct spoolss_5a
*r
;
7026 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5A
];
7028 r
= talloc(talloc_tos(), struct spoolss_5a
);
7033 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7038 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7044 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7045 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7046 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7051 if (DEBUGLEVEL
>= 10) {
7052 NDR_PRINT_IN_DEBUG(spoolss_5a
, r
);
7055 r
->out
.result
= _spoolss_5a(p
, r
);
7057 if (p
->rng_fault_state
) {
7059 /* Return true here, srv_pipe_hnd.c will take care */
7063 if (DEBUGLEVEL
>= 10) {
7064 NDR_PRINT_OUT_DEBUG(spoolss_5a
, r
);
7067 push
= ndr_push_init_ctx(r
, NULL
);
7073 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7074 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7079 blob
= ndr_push_blob(push
);
7080 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7090 static bool api_spoolss_5b(pipes_struct
*p
)
7092 const struct ndr_interface_call
*call
;
7093 struct ndr_pull
*pull
;
7094 struct ndr_push
*push
;
7095 enum ndr_err_code ndr_err
;
7097 struct spoolss_5b
*r
;
7099 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5B
];
7101 r
= talloc(talloc_tos(), struct spoolss_5b
);
7106 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7111 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7117 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7118 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7119 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7124 if (DEBUGLEVEL
>= 10) {
7125 NDR_PRINT_IN_DEBUG(spoolss_5b
, r
);
7128 r
->out
.result
= _spoolss_5b(p
, r
);
7130 if (p
->rng_fault_state
) {
7132 /* Return true here, srv_pipe_hnd.c will take care */
7136 if (DEBUGLEVEL
>= 10) {
7137 NDR_PRINT_OUT_DEBUG(spoolss_5b
, r
);
7140 push
= ndr_push_init_ctx(r
, NULL
);
7146 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7147 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7152 blob
= ndr_push_blob(push
);
7153 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7163 static bool api_spoolss_5c(pipes_struct
*p
)
7165 const struct ndr_interface_call
*call
;
7166 struct ndr_pull
*pull
;
7167 struct ndr_push
*push
;
7168 enum ndr_err_code ndr_err
;
7170 struct spoolss_5c
*r
;
7172 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5C
];
7174 r
= talloc(talloc_tos(), struct spoolss_5c
);
7179 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7184 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7190 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7191 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7192 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7197 if (DEBUGLEVEL
>= 10) {
7198 NDR_PRINT_IN_DEBUG(spoolss_5c
, r
);
7201 r
->out
.result
= _spoolss_5c(p
, r
);
7203 if (p
->rng_fault_state
) {
7205 /* Return true here, srv_pipe_hnd.c will take care */
7209 if (DEBUGLEVEL
>= 10) {
7210 NDR_PRINT_OUT_DEBUG(spoolss_5c
, r
);
7213 push
= ndr_push_init_ctx(r
, NULL
);
7219 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7220 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7225 blob
= ndr_push_blob(push
);
7226 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7236 static bool api_spoolss_5d(pipes_struct
*p
)
7238 const struct ndr_interface_call
*call
;
7239 struct ndr_pull
*pull
;
7240 struct ndr_push
*push
;
7241 enum ndr_err_code ndr_err
;
7243 struct spoolss_5d
*r
;
7245 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5D
];
7247 r
= talloc(talloc_tos(), struct spoolss_5d
);
7252 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7257 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7263 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7264 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7265 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7270 if (DEBUGLEVEL
>= 10) {
7271 NDR_PRINT_IN_DEBUG(spoolss_5d
, r
);
7274 r
->out
.result
= _spoolss_5d(p
, r
);
7276 if (p
->rng_fault_state
) {
7278 /* Return true here, srv_pipe_hnd.c will take care */
7282 if (DEBUGLEVEL
>= 10) {
7283 NDR_PRINT_OUT_DEBUG(spoolss_5d
, r
);
7286 push
= ndr_push_init_ctx(r
, NULL
);
7292 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7293 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7298 blob
= ndr_push_blob(push
);
7299 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7309 static bool api_spoolss_5e(pipes_struct
*p
)
7311 const struct ndr_interface_call
*call
;
7312 struct ndr_pull
*pull
;
7313 struct ndr_push
*push
;
7314 enum ndr_err_code ndr_err
;
7316 struct spoolss_5e
*r
;
7318 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5E
];
7320 r
= talloc(talloc_tos(), struct spoolss_5e
);
7325 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7330 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7336 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7337 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7338 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7343 if (DEBUGLEVEL
>= 10) {
7344 NDR_PRINT_IN_DEBUG(spoolss_5e
, r
);
7347 r
->out
.result
= _spoolss_5e(p
, r
);
7349 if (p
->rng_fault_state
) {
7351 /* Return true here, srv_pipe_hnd.c will take care */
7355 if (DEBUGLEVEL
>= 10) {
7356 NDR_PRINT_OUT_DEBUG(spoolss_5e
, r
);
7359 push
= ndr_push_init_ctx(r
, NULL
);
7365 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7366 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7371 blob
= ndr_push_blob(push
);
7372 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7382 static bool api_spoolss_5f(pipes_struct
*p
)
7384 const struct ndr_interface_call
*call
;
7385 struct ndr_pull
*pull
;
7386 struct ndr_push
*push
;
7387 enum ndr_err_code ndr_err
;
7389 struct spoolss_5f
*r
;
7391 call
= &ndr_table_spoolss
.calls
[NDR_SPOOLSS_5F
];
7393 r
= talloc(talloc_tos(), struct spoolss_5f
);
7398 if (!prs_data_blob(&p
->in_data
.data
, &blob
, r
)) {
7403 pull
= ndr_pull_init_blob(&blob
, r
, NULL
);
7409 pull
->flags
|= LIBNDR_FLAG_REF_ALLOC
;
7410 ndr_err
= call
->ndr_pull(pull
, NDR_IN
, r
);
7411 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7416 if (DEBUGLEVEL
>= 10) {
7417 NDR_PRINT_IN_DEBUG(spoolss_5f
, r
);
7420 r
->out
.result
= _spoolss_5f(p
, r
);
7422 if (p
->rng_fault_state
) {
7424 /* Return true here, srv_pipe_hnd.c will take care */
7428 if (DEBUGLEVEL
>= 10) {
7429 NDR_PRINT_OUT_DEBUG(spoolss_5f
, r
);
7432 push
= ndr_push_init_ctx(r
, NULL
);
7438 ndr_err
= call
->ndr_push(push
, NDR_OUT
, r
);
7439 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err
)) {
7444 blob
= ndr_push_blob(push
);
7445 if (!prs_copy_data_in(&p
->out_data
.rdata
, (const char *)blob
.data
, (uint32_t)blob
.length
)) {
7457 static struct api_struct api_spoolss_cmds
[] =
7459 {"SPOOLSS_ENUMPRINTERS", NDR_SPOOLSS_ENUMPRINTERS
, api_spoolss_EnumPrinters
},
7460 {"SPOOLSS_OPENPRINTER", NDR_SPOOLSS_OPENPRINTER
, api_spoolss_OpenPrinter
},
7461 {"SPOOLSS_SETJOB", NDR_SPOOLSS_SETJOB
, api_spoolss_SetJob
},
7462 {"SPOOLSS_GETJOB", NDR_SPOOLSS_GETJOB
, api_spoolss_GetJob
},
7463 {"SPOOLSS_ENUMJOBS", NDR_SPOOLSS_ENUMJOBS
, api_spoolss_EnumJobs
},
7464 {"SPOOLSS_ADDPRINTER", NDR_SPOOLSS_ADDPRINTER
, api_spoolss_AddPrinter
},
7465 {"SPOOLSS_DELETEPRINTER", NDR_SPOOLSS_DELETEPRINTER
, api_spoolss_DeletePrinter
},
7466 {"SPOOLSS_SETPRINTER", NDR_SPOOLSS_SETPRINTER
, api_spoolss_SetPrinter
},
7467 {"SPOOLSS_GETPRINTER", NDR_SPOOLSS_GETPRINTER
, api_spoolss_GetPrinter
},
7468 {"SPOOLSS_ADDPRINTERDRIVER", NDR_SPOOLSS_ADDPRINTERDRIVER
, api_spoolss_AddPrinterDriver
},
7469 {"SPOOLSS_ENUMPRINTERDRIVERS", NDR_SPOOLSS_ENUMPRINTERDRIVERS
, api_spoolss_EnumPrinterDrivers
},
7470 {"SPOOLSS_GETPRINTERDRIVER", NDR_SPOOLSS_GETPRINTERDRIVER
, api_spoolss_GetPrinterDriver
},
7471 {"SPOOLSS_GETPRINTERDRIVERDIRECTORY", NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
, api_spoolss_GetPrinterDriverDirectory
},
7472 {"SPOOLSS_DELETEPRINTERDRIVER", NDR_SPOOLSS_DELETEPRINTERDRIVER
, api_spoolss_DeletePrinterDriver
},
7473 {"SPOOLSS_ADDPRINTPROCESSOR", NDR_SPOOLSS_ADDPRINTPROCESSOR
, api_spoolss_AddPrintProcessor
},
7474 {"SPOOLSS_ENUMPRINTPROCESSORS", NDR_SPOOLSS_ENUMPRINTPROCESSORS
, api_spoolss_EnumPrintProcessors
},
7475 {"SPOOLSS_GETPRINTPROCESSORDIRECTORY", NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
, api_spoolss_GetPrintProcessorDirectory
},
7476 {"SPOOLSS_STARTDOCPRINTER", NDR_SPOOLSS_STARTDOCPRINTER
, api_spoolss_StartDocPrinter
},
7477 {"SPOOLSS_STARTPAGEPRINTER", NDR_SPOOLSS_STARTPAGEPRINTER
, api_spoolss_StartPagePrinter
},
7478 {"SPOOLSS_WRITEPRINTER", NDR_SPOOLSS_WRITEPRINTER
, api_spoolss_WritePrinter
},
7479 {"SPOOLSS_ENDPAGEPRINTER", NDR_SPOOLSS_ENDPAGEPRINTER
, api_spoolss_EndPagePrinter
},
7480 {"SPOOLSS_ABORTPRINTER", NDR_SPOOLSS_ABORTPRINTER
, api_spoolss_AbortPrinter
},
7481 {"SPOOLSS_READPRINTER", NDR_SPOOLSS_READPRINTER
, api_spoolss_ReadPrinter
},
7482 {"SPOOLSS_ENDDOCPRINTER", NDR_SPOOLSS_ENDDOCPRINTER
, api_spoolss_EndDocPrinter
},
7483 {"SPOOLSS_ADDJOB", NDR_SPOOLSS_ADDJOB
, api_spoolss_AddJob
},
7484 {"SPOOLSS_SCHEDULEJOB", NDR_SPOOLSS_SCHEDULEJOB
, api_spoolss_ScheduleJob
},
7485 {"SPOOLSS_GETPRINTERDATA", NDR_SPOOLSS_GETPRINTERDATA
, api_spoolss_GetPrinterData
},
7486 {"SPOOLSS_SETPRINTERDATA", NDR_SPOOLSS_SETPRINTERDATA
, api_spoolss_SetPrinterData
},
7487 {"SPOOLSS_WAITFORPRINTERCHANGE", NDR_SPOOLSS_WAITFORPRINTERCHANGE
, api_spoolss_WaitForPrinterChange
},
7488 {"SPOOLSS_CLOSEPRINTER", NDR_SPOOLSS_CLOSEPRINTER
, api_spoolss_ClosePrinter
},
7489 {"SPOOLSS_ADDFORM", NDR_SPOOLSS_ADDFORM
, api_spoolss_AddForm
},
7490 {"SPOOLSS_DELETEFORM", NDR_SPOOLSS_DELETEFORM
, api_spoolss_DeleteForm
},
7491 {"SPOOLSS_GETFORM", NDR_SPOOLSS_GETFORM
, api_spoolss_GetForm
},
7492 {"SPOOLSS_SETFORM", NDR_SPOOLSS_SETFORM
, api_spoolss_SetForm
},
7493 {"SPOOLSS_ENUMFORMS", NDR_SPOOLSS_ENUMFORMS
, api_spoolss_EnumForms
},
7494 {"SPOOLSS_ENUMPORTS", NDR_SPOOLSS_ENUMPORTS
, api_spoolss_EnumPorts
},
7495 {"SPOOLSS_ENUMMONITORS", NDR_SPOOLSS_ENUMMONITORS
, api_spoolss_EnumMonitors
},
7496 {"SPOOLSS_ADDPORT", NDR_SPOOLSS_ADDPORT
, api_spoolss_AddPort
},
7497 {"SPOOLSS_CONFIGUREPORT", NDR_SPOOLSS_CONFIGUREPORT
, api_spoolss_ConfigurePort
},
7498 {"SPOOLSS_DELETEPORT", NDR_SPOOLSS_DELETEPORT
, api_spoolss_DeletePort
},
7499 {"SPOOLSS_CREATEPRINTERIC", NDR_SPOOLSS_CREATEPRINTERIC
, api_spoolss_CreatePrinterIC
},
7500 {"SPOOLSS_PLAYGDISCRIPTONPRINTERIC", NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
, api_spoolss_PlayGDIScriptOnPrinterIC
},
7501 {"SPOOLSS_DELETEPRINTERIC", NDR_SPOOLSS_DELETEPRINTERIC
, api_spoolss_DeletePrinterIC
},
7502 {"SPOOLSS_ADDPRINTERCONNECTION", NDR_SPOOLSS_ADDPRINTERCONNECTION
, api_spoolss_AddPrinterConnection
},
7503 {"SPOOLSS_DELETEPRINTERCONNECTION", NDR_SPOOLSS_DELETEPRINTERCONNECTION
, api_spoolss_DeletePrinterConnection
},
7504 {"SPOOLSS_PRINTERMESSAGEBOX", NDR_SPOOLSS_PRINTERMESSAGEBOX
, api_spoolss_PrinterMessageBox
},
7505 {"SPOOLSS_ADDMONITOR", NDR_SPOOLSS_ADDMONITOR
, api_spoolss_AddMonitor
},
7506 {"SPOOLSS_DELETEMONITOR", NDR_SPOOLSS_DELETEMONITOR
, api_spoolss_DeleteMonitor
},
7507 {"SPOOLSS_DELETEPRINTPROCESSOR", NDR_SPOOLSS_DELETEPRINTPROCESSOR
, api_spoolss_DeletePrintProcessor
},
7508 {"SPOOLSS_ADDPRINTPROVIDOR", NDR_SPOOLSS_ADDPRINTPROVIDOR
, api_spoolss_AddPrintProvidor
},
7509 {"SPOOLSS_DELETEPRINTPROVIDOR", NDR_SPOOLSS_DELETEPRINTPROVIDOR
, api_spoolss_DeletePrintProvidor
},
7510 {"SPOOLSS_ENUMPRINTPROCDATATYPES", NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
, api_spoolss_EnumPrintProcDataTypes
},
7511 {"SPOOLSS_RESETPRINTER", NDR_SPOOLSS_RESETPRINTER
, api_spoolss_ResetPrinter
},
7512 {"SPOOLSS_GETPRINTERDRIVER2", NDR_SPOOLSS_GETPRINTERDRIVER2
, api_spoolss_GetPrinterDriver2
},
7513 {"SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
, api_spoolss_FindFirstPrinterChangeNotification
},
7514 {"SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
, api_spoolss_FindNextPrinterChangeNotification
},
7515 {"SPOOLSS_FINDCLOSEPRINTERNOTIFY", NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
, api_spoolss_FindClosePrinterNotify
},
7516 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
, api_spoolss_RouterFindFirstPrinterChangeNotificationOld
},
7517 {"SPOOLSS_REPLYOPENPRINTER", NDR_SPOOLSS_REPLYOPENPRINTER
, api_spoolss_ReplyOpenPrinter
},
7518 {"SPOOLSS_ROUTERREPLYPRINTER", NDR_SPOOLSS_ROUTERREPLYPRINTER
, api_spoolss_RouterReplyPrinter
},
7519 {"SPOOLSS_REPLYCLOSEPRINTER", NDR_SPOOLSS_REPLYCLOSEPRINTER
, api_spoolss_ReplyClosePrinter
},
7520 {"SPOOLSS_ADDPORTEX", NDR_SPOOLSS_ADDPORTEX
, api_spoolss_AddPortEx
},
7521 {"SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION", NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
, api_spoolss_RouterFindFirstPrinterChangeNotification
},
7522 {"SPOOLSS_SPOOLERINIT", NDR_SPOOLSS_SPOOLERINIT
, api_spoolss_SpoolerInit
},
7523 {"SPOOLSS_RESETPRINTEREX", NDR_SPOOLSS_RESETPRINTEREX
, api_spoolss_ResetPrinterEx
},
7524 {"SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX", NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
, api_spoolss_RemoteFindFirstPrinterChangeNotifyEx
},
7525 {"SPOOLSS_ROUTERREPLYPRINTEREX", NDR_SPOOLSS_ROUTERREPLYPRINTEREX
, api_spoolss_RouterReplyPrinterEx
},
7526 {"SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY", NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
, api_spoolss_RouterRefreshPrinterChangeNotify
},
7527 {"SPOOLSS_44", NDR_SPOOLSS_44
, api_spoolss_44
},
7528 {"SPOOLSS_OPENPRINTEREX", NDR_SPOOLSS_OPENPRINTEREX
, api_spoolss_OpenPrinterEx
},
7529 {"SPOOLSS_ADDPRINTEREX", NDR_SPOOLSS_ADDPRINTEREX
, api_spoolss_AddPrinterEx
},
7530 {"SPOOLSS_47", NDR_SPOOLSS_47
, api_spoolss_47
},
7531 {"SPOOLSS_ENUMPRINTERDATA", NDR_SPOOLSS_ENUMPRINTERDATA
, api_spoolss_EnumPrinterData
},
7532 {"SPOOLSS_DELETEPRINTERDATA", NDR_SPOOLSS_DELETEPRINTERDATA
, api_spoolss_DeletePrinterData
},
7533 {"SPOOLSS_4A", NDR_SPOOLSS_4A
, api_spoolss_4a
},
7534 {"SPOOLSS_4B", NDR_SPOOLSS_4B
, api_spoolss_4b
},
7535 {"SPOOLSS_4C", NDR_SPOOLSS_4C
, api_spoolss_4c
},
7536 {"SPOOLSS_SETPRINTERDATAEX", NDR_SPOOLSS_SETPRINTERDATAEX
, api_spoolss_SetPrinterDataEx
},
7537 {"SPOOLSS_GETPRINTERDATAEX", NDR_SPOOLSS_GETPRINTERDATAEX
, api_spoolss_GetPrinterDataEx
},
7538 {"SPOOLSS_ENUMPRINTERDATAEX", NDR_SPOOLSS_ENUMPRINTERDATAEX
, api_spoolss_EnumPrinterDataEx
},
7539 {"SPOOLSS_ENUMPRINTERKEY", NDR_SPOOLSS_ENUMPRINTERKEY
, api_spoolss_EnumPrinterKey
},
7540 {"SPOOLSS_DELETEPRINTERDATAEX", NDR_SPOOLSS_DELETEPRINTERDATAEX
, api_spoolss_DeletePrinterDataEx
},
7541 {"SPOOLSS_DELETEPRINTERKEY", NDR_SPOOLSS_DELETEPRINTERKEY
, api_spoolss_DeletePrinterKey
},
7542 {"SPOOLSS_53", NDR_SPOOLSS_53
, api_spoolss_53
},
7543 {"SPOOLSS_DELETEPRINTERDRIVEREX", NDR_SPOOLSS_DELETEPRINTERDRIVEREX
, api_spoolss_DeletePrinterDriverEx
},
7544 {"SPOOLSS_55", NDR_SPOOLSS_55
, api_spoolss_55
},
7545 {"SPOOLSS_56", NDR_SPOOLSS_56
, api_spoolss_56
},
7546 {"SPOOLSS_57", NDR_SPOOLSS_57
, api_spoolss_57
},
7547 {"SPOOLSS_XCVDATA", NDR_SPOOLSS_XCVDATA
, api_spoolss_XcvData
},
7548 {"SPOOLSS_ADDPRINTERDRIVEREX", NDR_SPOOLSS_ADDPRINTERDRIVEREX
, api_spoolss_AddPrinterDriverEx
},
7549 {"SPOOLSS_5A", NDR_SPOOLSS_5A
, api_spoolss_5a
},
7550 {"SPOOLSS_5B", NDR_SPOOLSS_5B
, api_spoolss_5b
},
7551 {"SPOOLSS_5C", NDR_SPOOLSS_5C
, api_spoolss_5c
},
7552 {"SPOOLSS_5D", NDR_SPOOLSS_5D
, api_spoolss_5d
},
7553 {"SPOOLSS_5E", NDR_SPOOLSS_5E
, api_spoolss_5e
},
7554 {"SPOOLSS_5F", NDR_SPOOLSS_5F
, api_spoolss_5f
},
7557 void spoolss_get_pipe_fns(struct api_struct
**fns
, int *n_fns
)
7559 *fns
= api_spoolss_cmds
;
7560 *n_fns
= sizeof(api_spoolss_cmds
) / sizeof(struct api_struct
);
7563 NTSTATUS
rpc_spoolss_dispatch(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const struct ndr_interface_table
*table
, uint32_t opnum
, void *_r
)
7565 if (cli
->pipes_struct
== NULL
) {
7566 return NT_STATUS_INVALID_PARAMETER
;
7571 case NDR_SPOOLSS_ENUMPRINTERS
: {
7572 struct spoolss_EnumPrinters
*r
= (struct spoolss_EnumPrinters
*)_r
;
7573 ZERO_STRUCT(r
->out
);
7574 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7575 if (r
->out
.count
== NULL
) {
7576 return NT_STATUS_NO_MEMORY
;
7579 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrinterInfo
*);
7580 if (r
->out
.info
== NULL
) {
7581 return NT_STATUS_NO_MEMORY
;
7584 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7585 if (r
->out
.needed
== NULL
) {
7586 return NT_STATUS_NO_MEMORY
;
7589 r
->out
.result
= _spoolss_EnumPrinters(cli
->pipes_struct
, r
);
7590 return NT_STATUS_OK
;
7593 case NDR_SPOOLSS_OPENPRINTER
: {
7594 struct spoolss_OpenPrinter
*r
= (struct spoolss_OpenPrinter
*)_r
;
7595 ZERO_STRUCT(r
->out
);
7596 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
7597 if (r
->out
.handle
== NULL
) {
7598 return NT_STATUS_NO_MEMORY
;
7601 r
->out
.result
= _spoolss_OpenPrinter(cli
->pipes_struct
, r
);
7602 return NT_STATUS_OK
;
7605 case NDR_SPOOLSS_SETJOB
: {
7606 struct spoolss_SetJob
*r
= (struct spoolss_SetJob
*)_r
;
7607 r
->out
.result
= _spoolss_SetJob(cli
->pipes_struct
, r
);
7608 return NT_STATUS_OK
;
7611 case NDR_SPOOLSS_GETJOB
: {
7612 struct spoolss_GetJob
*r
= (struct spoolss_GetJob
*)_r
;
7613 ZERO_STRUCT(r
->out
);
7614 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_JobInfo
);
7615 if (r
->out
.info
== NULL
) {
7616 return NT_STATUS_NO_MEMORY
;
7619 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7620 if (r
->out
.needed
== NULL
) {
7621 return NT_STATUS_NO_MEMORY
;
7624 r
->out
.result
= _spoolss_GetJob(cli
->pipes_struct
, r
);
7625 return NT_STATUS_OK
;
7628 case NDR_SPOOLSS_ENUMJOBS
: {
7629 struct spoolss_EnumJobs
*r
= (struct spoolss_EnumJobs
*)_r
;
7630 ZERO_STRUCT(r
->out
);
7631 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7632 if (r
->out
.count
== NULL
) {
7633 return NT_STATUS_NO_MEMORY
;
7636 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_JobInfo
*);
7637 if (r
->out
.info
== NULL
) {
7638 return NT_STATUS_NO_MEMORY
;
7641 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7642 if (r
->out
.needed
== NULL
) {
7643 return NT_STATUS_NO_MEMORY
;
7646 r
->out
.result
= _spoolss_EnumJobs(cli
->pipes_struct
, r
);
7647 return NT_STATUS_OK
;
7650 case NDR_SPOOLSS_ADDPRINTER
: {
7651 struct spoolss_AddPrinter
*r
= (struct spoolss_AddPrinter
*)_r
;
7652 r
->out
.result
= _spoolss_AddPrinter(cli
->pipes_struct
, r
);
7653 return NT_STATUS_OK
;
7656 case NDR_SPOOLSS_DELETEPRINTER
: {
7657 struct spoolss_DeletePrinter
*r
= (struct spoolss_DeletePrinter
*)_r
;
7658 r
->out
.result
= _spoolss_DeletePrinter(cli
->pipes_struct
, r
);
7659 return NT_STATUS_OK
;
7662 case NDR_SPOOLSS_SETPRINTER
: {
7663 struct spoolss_SetPrinter
*r
= (struct spoolss_SetPrinter
*)_r
;
7664 r
->out
.result
= _spoolss_SetPrinter(cli
->pipes_struct
, r
);
7665 return NT_STATUS_OK
;
7668 case NDR_SPOOLSS_GETPRINTER
: {
7669 struct spoolss_GetPrinter
*r
= (struct spoolss_GetPrinter
*)_r
;
7670 ZERO_STRUCT(r
->out
);
7671 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrinterInfo
);
7672 if (r
->out
.info
== NULL
) {
7673 return NT_STATUS_NO_MEMORY
;
7676 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7677 if (r
->out
.needed
== NULL
) {
7678 return NT_STATUS_NO_MEMORY
;
7681 r
->out
.result
= _spoolss_GetPrinter(cli
->pipes_struct
, r
);
7682 return NT_STATUS_OK
;
7685 case NDR_SPOOLSS_ADDPRINTERDRIVER
: {
7686 struct spoolss_AddPrinterDriver
*r
= (struct spoolss_AddPrinterDriver
*)_r
;
7687 r
->out
.result
= _spoolss_AddPrinterDriver(cli
->pipes_struct
, r
);
7688 return NT_STATUS_OK
;
7691 case NDR_SPOOLSS_ENUMPRINTERDRIVERS
: {
7692 struct spoolss_EnumPrinterDrivers
*r
= (struct spoolss_EnumPrinterDrivers
*)_r
;
7693 ZERO_STRUCT(r
->out
);
7694 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7695 if (r
->out
.count
== NULL
) {
7696 return NT_STATUS_NO_MEMORY
;
7699 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_DriverInfo
*);
7700 if (r
->out
.info
== NULL
) {
7701 return NT_STATUS_NO_MEMORY
;
7704 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7705 if (r
->out
.needed
== NULL
) {
7706 return NT_STATUS_NO_MEMORY
;
7709 r
->out
.result
= _spoolss_EnumPrinterDrivers(cli
->pipes_struct
, r
);
7710 return NT_STATUS_OK
;
7713 case NDR_SPOOLSS_GETPRINTERDRIVER
: {
7714 struct spoolss_GetPrinterDriver
*r
= (struct spoolss_GetPrinterDriver
*)_r
;
7715 r
->out
.result
= _spoolss_GetPrinterDriver(cli
->pipes_struct
, r
);
7716 return NT_STATUS_OK
;
7719 case NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
: {
7720 struct spoolss_GetPrinterDriverDirectory
*r
= (struct spoolss_GetPrinterDriverDirectory
*)_r
;
7721 ZERO_STRUCT(r
->out
);
7722 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_DriverDirectoryInfo
);
7723 if (r
->out
.info
== NULL
) {
7724 return NT_STATUS_NO_MEMORY
;
7727 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7728 if (r
->out
.needed
== NULL
) {
7729 return NT_STATUS_NO_MEMORY
;
7732 r
->out
.result
= _spoolss_GetPrinterDriverDirectory(cli
->pipes_struct
, r
);
7733 return NT_STATUS_OK
;
7736 case NDR_SPOOLSS_DELETEPRINTERDRIVER
: {
7737 struct spoolss_DeletePrinterDriver
*r
= (struct spoolss_DeletePrinterDriver
*)_r
;
7738 r
->out
.result
= _spoolss_DeletePrinterDriver(cli
->pipes_struct
, r
);
7739 return NT_STATUS_OK
;
7742 case NDR_SPOOLSS_ADDPRINTPROCESSOR
: {
7743 struct spoolss_AddPrintProcessor
*r
= (struct spoolss_AddPrintProcessor
*)_r
;
7744 r
->out
.result
= _spoolss_AddPrintProcessor(cli
->pipes_struct
, r
);
7745 return NT_STATUS_OK
;
7748 case NDR_SPOOLSS_ENUMPRINTPROCESSORS
: {
7749 struct spoolss_EnumPrintProcessors
*r
= (struct spoolss_EnumPrintProcessors
*)_r
;
7750 ZERO_STRUCT(r
->out
);
7751 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7752 if (r
->out
.count
== NULL
) {
7753 return NT_STATUS_NO_MEMORY
;
7756 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrintProcessorInfo
*);
7757 if (r
->out
.info
== NULL
) {
7758 return NT_STATUS_NO_MEMORY
;
7761 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7762 if (r
->out
.needed
== NULL
) {
7763 return NT_STATUS_NO_MEMORY
;
7766 r
->out
.result
= _spoolss_EnumPrintProcessors(cli
->pipes_struct
, r
);
7767 return NT_STATUS_OK
;
7770 case NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
: {
7771 struct spoolss_GetPrintProcessorDirectory
*r
= (struct spoolss_GetPrintProcessorDirectory
*)_r
;
7772 ZERO_STRUCT(r
->out
);
7773 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrintProcessorDirectoryInfo
);
7774 if (r
->out
.info
== NULL
) {
7775 return NT_STATUS_NO_MEMORY
;
7778 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7779 if (r
->out
.needed
== NULL
) {
7780 return NT_STATUS_NO_MEMORY
;
7783 r
->out
.result
= _spoolss_GetPrintProcessorDirectory(cli
->pipes_struct
, r
);
7784 return NT_STATUS_OK
;
7787 case NDR_SPOOLSS_STARTDOCPRINTER
: {
7788 struct spoolss_StartDocPrinter
*r
= (struct spoolss_StartDocPrinter
*)_r
;
7789 ZERO_STRUCT(r
->out
);
7790 r
->out
.job_id
= talloc_zero(mem_ctx
, uint32_t);
7791 if (r
->out
.job_id
== NULL
) {
7792 return NT_STATUS_NO_MEMORY
;
7795 r
->out
.result
= _spoolss_StartDocPrinter(cli
->pipes_struct
, r
);
7796 return NT_STATUS_OK
;
7799 case NDR_SPOOLSS_STARTPAGEPRINTER
: {
7800 struct spoolss_StartPagePrinter
*r
= (struct spoolss_StartPagePrinter
*)_r
;
7801 r
->out
.result
= _spoolss_StartPagePrinter(cli
->pipes_struct
, r
);
7802 return NT_STATUS_OK
;
7805 case NDR_SPOOLSS_WRITEPRINTER
: {
7806 struct spoolss_WritePrinter
*r
= (struct spoolss_WritePrinter
*)_r
;
7807 ZERO_STRUCT(r
->out
);
7808 r
->out
.num_written
= talloc_zero(mem_ctx
, uint32_t);
7809 if (r
->out
.num_written
== NULL
) {
7810 return NT_STATUS_NO_MEMORY
;
7813 r
->out
.result
= _spoolss_WritePrinter(cli
->pipes_struct
, r
);
7814 return NT_STATUS_OK
;
7817 case NDR_SPOOLSS_ENDPAGEPRINTER
: {
7818 struct spoolss_EndPagePrinter
*r
= (struct spoolss_EndPagePrinter
*)_r
;
7819 r
->out
.result
= _spoolss_EndPagePrinter(cli
->pipes_struct
, r
);
7820 return NT_STATUS_OK
;
7823 case NDR_SPOOLSS_ABORTPRINTER
: {
7824 struct spoolss_AbortPrinter
*r
= (struct spoolss_AbortPrinter
*)_r
;
7825 r
->out
.result
= _spoolss_AbortPrinter(cli
->pipes_struct
, r
);
7826 return NT_STATUS_OK
;
7829 case NDR_SPOOLSS_READPRINTER
: {
7830 struct spoolss_ReadPrinter
*r
= (struct spoolss_ReadPrinter
*)_r
;
7831 ZERO_STRUCT(r
->out
);
7832 r
->out
.data
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.data_size
);
7833 if (r
->out
.data
== NULL
) {
7834 return NT_STATUS_NO_MEMORY
;
7837 r
->out
._data_size
= talloc_zero(mem_ctx
, uint32_t);
7838 if (r
->out
._data_size
== NULL
) {
7839 return NT_STATUS_NO_MEMORY
;
7842 r
->out
.result
= _spoolss_ReadPrinter(cli
->pipes_struct
, r
);
7843 return NT_STATUS_OK
;
7846 case NDR_SPOOLSS_ENDDOCPRINTER
: {
7847 struct spoolss_EndDocPrinter
*r
= (struct spoolss_EndDocPrinter
*)_r
;
7848 r
->out
.result
= _spoolss_EndDocPrinter(cli
->pipes_struct
, r
);
7849 return NT_STATUS_OK
;
7852 case NDR_SPOOLSS_ADDJOB
: {
7853 struct spoolss_AddJob
*r
= (struct spoolss_AddJob
*)_r
;
7854 ZERO_STRUCT(r
->out
);
7855 r
->out
.buffer
= r
->in
.buffer
;
7856 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7857 if (r
->out
.needed
== NULL
) {
7858 return NT_STATUS_NO_MEMORY
;
7861 r
->out
.result
= _spoolss_AddJob(cli
->pipes_struct
, r
);
7862 return NT_STATUS_OK
;
7865 case NDR_SPOOLSS_SCHEDULEJOB
: {
7866 struct spoolss_ScheduleJob
*r
= (struct spoolss_ScheduleJob
*)_r
;
7867 r
->out
.result
= _spoolss_ScheduleJob(cli
->pipes_struct
, r
);
7868 return NT_STATUS_OK
;
7871 case NDR_SPOOLSS_GETPRINTERDATA
: {
7872 struct spoolss_GetPrinterData
*r
= (struct spoolss_GetPrinterData
*)_r
;
7873 ZERO_STRUCT(r
->out
);
7874 r
->out
.type
= talloc_zero(mem_ctx
, enum winreg_Type
);
7875 if (r
->out
.type
== NULL
) {
7876 return NT_STATUS_NO_MEMORY
;
7879 r
->out
.data
= talloc_zero(mem_ctx
, union spoolss_PrinterData
);
7880 if (r
->out
.data
== NULL
) {
7881 return NT_STATUS_NO_MEMORY
;
7884 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7885 if (r
->out
.needed
== NULL
) {
7886 return NT_STATUS_NO_MEMORY
;
7889 r
->out
.result
= _spoolss_GetPrinterData(cli
->pipes_struct
, r
);
7890 return NT_STATUS_OK
;
7893 case NDR_SPOOLSS_SETPRINTERDATA
: {
7894 struct spoolss_SetPrinterData
*r
= (struct spoolss_SetPrinterData
*)_r
;
7895 r
->out
.result
= _spoolss_SetPrinterData(cli
->pipes_struct
, r
);
7896 return NT_STATUS_OK
;
7899 case NDR_SPOOLSS_WAITFORPRINTERCHANGE
: {
7900 struct spoolss_WaitForPrinterChange
*r
= (struct spoolss_WaitForPrinterChange
*)_r
;
7901 r
->out
.result
= _spoolss_WaitForPrinterChange(cli
->pipes_struct
, r
);
7902 return NT_STATUS_OK
;
7905 case NDR_SPOOLSS_CLOSEPRINTER
: {
7906 struct spoolss_ClosePrinter
*r
= (struct spoolss_ClosePrinter
*)_r
;
7907 ZERO_STRUCT(r
->out
);
7908 r
->out
.handle
= r
->in
.handle
;
7909 r
->out
.result
= _spoolss_ClosePrinter(cli
->pipes_struct
, r
);
7910 return NT_STATUS_OK
;
7913 case NDR_SPOOLSS_ADDFORM
: {
7914 struct spoolss_AddForm
*r
= (struct spoolss_AddForm
*)_r
;
7915 r
->out
.result
= _spoolss_AddForm(cli
->pipes_struct
, r
);
7916 return NT_STATUS_OK
;
7919 case NDR_SPOOLSS_DELETEFORM
: {
7920 struct spoolss_DeleteForm
*r
= (struct spoolss_DeleteForm
*)_r
;
7921 r
->out
.result
= _spoolss_DeleteForm(cli
->pipes_struct
, r
);
7922 return NT_STATUS_OK
;
7925 case NDR_SPOOLSS_GETFORM
: {
7926 struct spoolss_GetForm
*r
= (struct spoolss_GetForm
*)_r
;
7927 ZERO_STRUCT(r
->out
);
7928 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_FormInfo
);
7929 if (r
->out
.info
== NULL
) {
7930 return NT_STATUS_NO_MEMORY
;
7933 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7934 if (r
->out
.needed
== NULL
) {
7935 return NT_STATUS_NO_MEMORY
;
7938 r
->out
.result
= _spoolss_GetForm(cli
->pipes_struct
, r
);
7939 return NT_STATUS_OK
;
7942 case NDR_SPOOLSS_SETFORM
: {
7943 struct spoolss_SetForm
*r
= (struct spoolss_SetForm
*)_r
;
7944 r
->out
.result
= _spoolss_SetForm(cli
->pipes_struct
, r
);
7945 return NT_STATUS_OK
;
7948 case NDR_SPOOLSS_ENUMFORMS
: {
7949 struct spoolss_EnumForms
*r
= (struct spoolss_EnumForms
*)_r
;
7950 ZERO_STRUCT(r
->out
);
7951 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7952 if (r
->out
.count
== NULL
) {
7953 return NT_STATUS_NO_MEMORY
;
7956 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_FormInfo
*);
7957 if (r
->out
.info
== NULL
) {
7958 return NT_STATUS_NO_MEMORY
;
7961 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7962 if (r
->out
.needed
== NULL
) {
7963 return NT_STATUS_NO_MEMORY
;
7966 r
->out
.result
= _spoolss_EnumForms(cli
->pipes_struct
, r
);
7967 return NT_STATUS_OK
;
7970 case NDR_SPOOLSS_ENUMPORTS
: {
7971 struct spoolss_EnumPorts
*r
= (struct spoolss_EnumPorts
*)_r
;
7972 ZERO_STRUCT(r
->out
);
7973 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7974 if (r
->out
.count
== NULL
) {
7975 return NT_STATUS_NO_MEMORY
;
7978 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PortInfo
*);
7979 if (r
->out
.info
== NULL
) {
7980 return NT_STATUS_NO_MEMORY
;
7983 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
7984 if (r
->out
.needed
== NULL
) {
7985 return NT_STATUS_NO_MEMORY
;
7988 r
->out
.result
= _spoolss_EnumPorts(cli
->pipes_struct
, r
);
7989 return NT_STATUS_OK
;
7992 case NDR_SPOOLSS_ENUMMONITORS
: {
7993 struct spoolss_EnumMonitors
*r
= (struct spoolss_EnumMonitors
*)_r
;
7994 ZERO_STRUCT(r
->out
);
7995 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
7996 if (r
->out
.count
== NULL
) {
7997 return NT_STATUS_NO_MEMORY
;
8000 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_MonitorInfo
*);
8001 if (r
->out
.info
== NULL
) {
8002 return NT_STATUS_NO_MEMORY
;
8005 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8006 if (r
->out
.needed
== NULL
) {
8007 return NT_STATUS_NO_MEMORY
;
8010 r
->out
.result
= _spoolss_EnumMonitors(cli
->pipes_struct
, r
);
8011 return NT_STATUS_OK
;
8014 case NDR_SPOOLSS_ADDPORT
: {
8015 struct spoolss_AddPort
*r
= (struct spoolss_AddPort
*)_r
;
8016 r
->out
.result
= _spoolss_AddPort(cli
->pipes_struct
, r
);
8017 return NT_STATUS_OK
;
8020 case NDR_SPOOLSS_CONFIGUREPORT
: {
8021 struct spoolss_ConfigurePort
*r
= (struct spoolss_ConfigurePort
*)_r
;
8022 r
->out
.result
= _spoolss_ConfigurePort(cli
->pipes_struct
, r
);
8023 return NT_STATUS_OK
;
8026 case NDR_SPOOLSS_DELETEPORT
: {
8027 struct spoolss_DeletePort
*r
= (struct spoolss_DeletePort
*)_r
;
8028 r
->out
.result
= _spoolss_DeletePort(cli
->pipes_struct
, r
);
8029 return NT_STATUS_OK
;
8032 case NDR_SPOOLSS_CREATEPRINTERIC
: {
8033 struct spoolss_CreatePrinterIC
*r
= (struct spoolss_CreatePrinterIC
*)_r
;
8034 r
->out
.result
= _spoolss_CreatePrinterIC(cli
->pipes_struct
, r
);
8035 return NT_STATUS_OK
;
8038 case NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
: {
8039 struct spoolss_PlayGDIScriptOnPrinterIC
*r
= (struct spoolss_PlayGDIScriptOnPrinterIC
*)_r
;
8040 r
->out
.result
= _spoolss_PlayGDIScriptOnPrinterIC(cli
->pipes_struct
, r
);
8041 return NT_STATUS_OK
;
8044 case NDR_SPOOLSS_DELETEPRINTERIC
: {
8045 struct spoolss_DeletePrinterIC
*r
= (struct spoolss_DeletePrinterIC
*)_r
;
8046 r
->out
.result
= _spoolss_DeletePrinterIC(cli
->pipes_struct
, r
);
8047 return NT_STATUS_OK
;
8050 case NDR_SPOOLSS_ADDPRINTERCONNECTION
: {
8051 struct spoolss_AddPrinterConnection
*r
= (struct spoolss_AddPrinterConnection
*)_r
;
8052 r
->out
.result
= _spoolss_AddPrinterConnection(cli
->pipes_struct
, r
);
8053 return NT_STATUS_OK
;
8056 case NDR_SPOOLSS_DELETEPRINTERCONNECTION
: {
8057 struct spoolss_DeletePrinterConnection
*r
= (struct spoolss_DeletePrinterConnection
*)_r
;
8058 r
->out
.result
= _spoolss_DeletePrinterConnection(cli
->pipes_struct
, r
);
8059 return NT_STATUS_OK
;
8062 case NDR_SPOOLSS_PRINTERMESSAGEBOX
: {
8063 struct spoolss_PrinterMessageBox
*r
= (struct spoolss_PrinterMessageBox
*)_r
;
8064 r
->out
.result
= _spoolss_PrinterMessageBox(cli
->pipes_struct
, r
);
8065 return NT_STATUS_OK
;
8068 case NDR_SPOOLSS_ADDMONITOR
: {
8069 struct spoolss_AddMonitor
*r
= (struct spoolss_AddMonitor
*)_r
;
8070 r
->out
.result
= _spoolss_AddMonitor(cli
->pipes_struct
, r
);
8071 return NT_STATUS_OK
;
8074 case NDR_SPOOLSS_DELETEMONITOR
: {
8075 struct spoolss_DeleteMonitor
*r
= (struct spoolss_DeleteMonitor
*)_r
;
8076 r
->out
.result
= _spoolss_DeleteMonitor(cli
->pipes_struct
, r
);
8077 return NT_STATUS_OK
;
8080 case NDR_SPOOLSS_DELETEPRINTPROCESSOR
: {
8081 struct spoolss_DeletePrintProcessor
*r
= (struct spoolss_DeletePrintProcessor
*)_r
;
8082 r
->out
.result
= _spoolss_DeletePrintProcessor(cli
->pipes_struct
, r
);
8083 return NT_STATUS_OK
;
8086 case NDR_SPOOLSS_ADDPRINTPROVIDOR
: {
8087 struct spoolss_AddPrintProvidor
*r
= (struct spoolss_AddPrintProvidor
*)_r
;
8088 r
->out
.result
= _spoolss_AddPrintProvidor(cli
->pipes_struct
, r
);
8089 return NT_STATUS_OK
;
8092 case NDR_SPOOLSS_DELETEPRINTPROVIDOR
: {
8093 struct spoolss_DeletePrintProvidor
*r
= (struct spoolss_DeletePrintProvidor
*)_r
;
8094 r
->out
.result
= _spoolss_DeletePrintProvidor(cli
->pipes_struct
, r
);
8095 return NT_STATUS_OK
;
8098 case NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
: {
8099 struct spoolss_EnumPrintProcDataTypes
*r
= (struct spoolss_EnumPrintProcDataTypes
*)_r
;
8100 ZERO_STRUCT(r
->out
);
8101 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
8102 if (r
->out
.count
== NULL
) {
8103 return NT_STATUS_NO_MEMORY
;
8106 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_PrintProcDataTypesInfo
*);
8107 if (r
->out
.info
== NULL
) {
8108 return NT_STATUS_NO_MEMORY
;
8111 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8112 if (r
->out
.needed
== NULL
) {
8113 return NT_STATUS_NO_MEMORY
;
8116 r
->out
.result
= _spoolss_EnumPrintProcDataTypes(cli
->pipes_struct
, r
);
8117 return NT_STATUS_OK
;
8120 case NDR_SPOOLSS_RESETPRINTER
: {
8121 struct spoolss_ResetPrinter
*r
= (struct spoolss_ResetPrinter
*)_r
;
8122 r
->out
.result
= _spoolss_ResetPrinter(cli
->pipes_struct
, r
);
8123 return NT_STATUS_OK
;
8126 case NDR_SPOOLSS_GETPRINTERDRIVER2
: {
8127 struct spoolss_GetPrinterDriver2
*r
= (struct spoolss_GetPrinterDriver2
*)_r
;
8128 ZERO_STRUCT(r
->out
);
8129 r
->out
.info
= talloc_zero(mem_ctx
, union spoolss_DriverInfo
);
8130 if (r
->out
.info
== NULL
) {
8131 return NT_STATUS_NO_MEMORY
;
8134 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8135 if (r
->out
.needed
== NULL
) {
8136 return NT_STATUS_NO_MEMORY
;
8139 r
->out
.server_major_version
= talloc_zero(mem_ctx
, uint32_t);
8140 if (r
->out
.server_major_version
== NULL
) {
8141 return NT_STATUS_NO_MEMORY
;
8144 r
->out
.server_minor_version
= talloc_zero(mem_ctx
, uint32_t);
8145 if (r
->out
.server_minor_version
== NULL
) {
8146 return NT_STATUS_NO_MEMORY
;
8149 r
->out
.result
= _spoolss_GetPrinterDriver2(cli
->pipes_struct
, r
);
8150 return NT_STATUS_OK
;
8153 case NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
: {
8154 struct spoolss_FindFirstPrinterChangeNotification
*r
= (struct spoolss_FindFirstPrinterChangeNotification
*)_r
;
8155 r
->out
.result
= _spoolss_FindFirstPrinterChangeNotification(cli
->pipes_struct
, r
);
8156 return NT_STATUS_OK
;
8159 case NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
: {
8160 struct spoolss_FindNextPrinterChangeNotification
*r
= (struct spoolss_FindNextPrinterChangeNotification
*)_r
;
8161 r
->out
.result
= _spoolss_FindNextPrinterChangeNotification(cli
->pipes_struct
, r
);
8162 return NT_STATUS_OK
;
8165 case NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
: {
8166 struct spoolss_FindClosePrinterNotify
*r
= (struct spoolss_FindClosePrinterNotify
*)_r
;
8167 r
->out
.result
= _spoolss_FindClosePrinterNotify(cli
->pipes_struct
, r
);
8168 return NT_STATUS_OK
;
8171 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
: {
8172 struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
= (struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*)_r
;
8173 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotificationOld(cli
->pipes_struct
, r
);
8174 return NT_STATUS_OK
;
8177 case NDR_SPOOLSS_REPLYOPENPRINTER
: {
8178 struct spoolss_ReplyOpenPrinter
*r
= (struct spoolss_ReplyOpenPrinter
*)_r
;
8179 ZERO_STRUCT(r
->out
);
8180 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
8181 if (r
->out
.handle
== NULL
) {
8182 return NT_STATUS_NO_MEMORY
;
8185 r
->out
.result
= _spoolss_ReplyOpenPrinter(cli
->pipes_struct
, r
);
8186 return NT_STATUS_OK
;
8189 case NDR_SPOOLSS_ROUTERREPLYPRINTER
: {
8190 struct spoolss_RouterReplyPrinter
*r
= (struct spoolss_RouterReplyPrinter
*)_r
;
8191 r
->out
.result
= _spoolss_RouterReplyPrinter(cli
->pipes_struct
, r
);
8192 return NT_STATUS_OK
;
8195 case NDR_SPOOLSS_REPLYCLOSEPRINTER
: {
8196 struct spoolss_ReplyClosePrinter
*r
= (struct spoolss_ReplyClosePrinter
*)_r
;
8197 ZERO_STRUCT(r
->out
);
8198 r
->out
.handle
= r
->in
.handle
;
8199 r
->out
.result
= _spoolss_ReplyClosePrinter(cli
->pipes_struct
, r
);
8200 return NT_STATUS_OK
;
8203 case NDR_SPOOLSS_ADDPORTEX
: {
8204 struct spoolss_AddPortEx
*r
= (struct spoolss_AddPortEx
*)_r
;
8205 r
->out
.result
= _spoolss_AddPortEx(cli
->pipes_struct
, r
);
8206 return NT_STATUS_OK
;
8209 case NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
: {
8210 struct spoolss_RouterFindFirstPrinterChangeNotification
*r
= (struct spoolss_RouterFindFirstPrinterChangeNotification
*)_r
;
8211 r
->out
.result
= _spoolss_RouterFindFirstPrinterChangeNotification(cli
->pipes_struct
, r
);
8212 return NT_STATUS_OK
;
8215 case NDR_SPOOLSS_SPOOLERINIT
: {
8216 struct spoolss_SpoolerInit
*r
= (struct spoolss_SpoolerInit
*)_r
;
8217 r
->out
.result
= _spoolss_SpoolerInit(cli
->pipes_struct
, r
);
8218 return NT_STATUS_OK
;
8221 case NDR_SPOOLSS_RESETPRINTEREX
: {
8222 struct spoolss_ResetPrinterEx
*r
= (struct spoolss_ResetPrinterEx
*)_r
;
8223 r
->out
.result
= _spoolss_ResetPrinterEx(cli
->pipes_struct
, r
);
8224 return NT_STATUS_OK
;
8227 case NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
: {
8228 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
= (struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*)_r
;
8229 r
->out
.result
= _spoolss_RemoteFindFirstPrinterChangeNotifyEx(cli
->pipes_struct
, r
);
8230 return NT_STATUS_OK
;
8233 case NDR_SPOOLSS_ROUTERREPLYPRINTEREX
: {
8234 struct spoolss_RouterReplyPrinterEx
*r
= (struct spoolss_RouterReplyPrinterEx
*)_r
;
8235 ZERO_STRUCT(r
->out
);
8236 r
->out
.reply_result
= talloc_zero(mem_ctx
, uint32_t);
8237 if (r
->out
.reply_result
== NULL
) {
8238 return NT_STATUS_NO_MEMORY
;
8241 r
->out
.result
= _spoolss_RouterReplyPrinterEx(cli
->pipes_struct
, r
);
8242 return NT_STATUS_OK
;
8245 case NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
: {
8246 struct spoolss_RouterRefreshPrinterChangeNotify
*r
= (struct spoolss_RouterRefreshPrinterChangeNotify
*)_r
;
8247 ZERO_STRUCT(r
->out
);
8248 r
->out
.info
= talloc_zero(mem_ctx
, struct spoolss_NotifyInfo
*);
8249 if (r
->out
.info
== NULL
) {
8250 return NT_STATUS_NO_MEMORY
;
8253 r
->out
.result
= _spoolss_RouterRefreshPrinterChangeNotify(cli
->pipes_struct
, r
);
8254 return NT_STATUS_OK
;
8257 case NDR_SPOOLSS_44
: {
8258 struct spoolss_44
*r
= (struct spoolss_44
*)_r
;
8259 r
->out
.result
= _spoolss_44(cli
->pipes_struct
, r
);
8260 return NT_STATUS_OK
;
8263 case NDR_SPOOLSS_OPENPRINTEREX
: {
8264 struct spoolss_OpenPrinterEx
*r
= (struct spoolss_OpenPrinterEx
*)_r
;
8265 ZERO_STRUCT(r
->out
);
8266 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
8267 if (r
->out
.handle
== NULL
) {
8268 return NT_STATUS_NO_MEMORY
;
8271 r
->out
.result
= _spoolss_OpenPrinterEx(cli
->pipes_struct
, r
);
8272 return NT_STATUS_OK
;
8275 case NDR_SPOOLSS_ADDPRINTEREX
: {
8276 struct spoolss_AddPrinterEx
*r
= (struct spoolss_AddPrinterEx
*)_r
;
8277 ZERO_STRUCT(r
->out
);
8278 r
->out
.handle
= talloc_zero(mem_ctx
, struct policy_handle
);
8279 if (r
->out
.handle
== NULL
) {
8280 return NT_STATUS_NO_MEMORY
;
8283 r
->out
.result
= _spoolss_AddPrinterEx(cli
->pipes_struct
, r
);
8284 return NT_STATUS_OK
;
8287 case NDR_SPOOLSS_47
: {
8288 struct spoolss_47
*r
= (struct spoolss_47
*)_r
;
8289 r
->out
.result
= _spoolss_47(cli
->pipes_struct
, r
);
8290 return NT_STATUS_OK
;
8293 case NDR_SPOOLSS_ENUMPRINTERDATA
: {
8294 struct spoolss_EnumPrinterData
*r
= (struct spoolss_EnumPrinterData
*)_r
;
8295 ZERO_STRUCT(r
->out
);
8296 r
->out
.value_name
= talloc_zero_array(mem_ctx
, const char, r
->in
.value_offered
/ 2);
8297 if (r
->out
.value_name
== NULL
) {
8298 return NT_STATUS_NO_MEMORY
;
8301 r
->out
.value_needed
= talloc_zero(mem_ctx
, uint32_t);
8302 if (r
->out
.value_needed
== NULL
) {
8303 return NT_STATUS_NO_MEMORY
;
8306 r
->out
.type
= talloc_zero(mem_ctx
, enum winreg_Type
);
8307 if (r
->out
.type
== NULL
) {
8308 return NT_STATUS_NO_MEMORY
;
8311 r
->out
.data
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.data_offered
);
8312 if (r
->out
.data
== NULL
) {
8313 return NT_STATUS_NO_MEMORY
;
8316 r
->out
.data_needed
= talloc_zero(mem_ctx
, uint32_t);
8317 if (r
->out
.data_needed
== NULL
) {
8318 return NT_STATUS_NO_MEMORY
;
8321 r
->out
.result
= _spoolss_EnumPrinterData(cli
->pipes_struct
, r
);
8322 return NT_STATUS_OK
;
8325 case NDR_SPOOLSS_DELETEPRINTERDATA
: {
8326 struct spoolss_DeletePrinterData
*r
= (struct spoolss_DeletePrinterData
*)_r
;
8327 r
->out
.result
= _spoolss_DeletePrinterData(cli
->pipes_struct
, r
);
8328 return NT_STATUS_OK
;
8331 case NDR_SPOOLSS_4A
: {
8332 struct spoolss_4a
*r
= (struct spoolss_4a
*)_r
;
8333 r
->out
.result
= _spoolss_4a(cli
->pipes_struct
, r
);
8334 return NT_STATUS_OK
;
8337 case NDR_SPOOLSS_4B
: {
8338 struct spoolss_4b
*r
= (struct spoolss_4b
*)_r
;
8339 r
->out
.result
= _spoolss_4b(cli
->pipes_struct
, r
);
8340 return NT_STATUS_OK
;
8343 case NDR_SPOOLSS_4C
: {
8344 struct spoolss_4c
*r
= (struct spoolss_4c
*)_r
;
8345 r
->out
.result
= _spoolss_4c(cli
->pipes_struct
, r
);
8346 return NT_STATUS_OK
;
8349 case NDR_SPOOLSS_SETPRINTERDATAEX
: {
8350 struct spoolss_SetPrinterDataEx
*r
= (struct spoolss_SetPrinterDataEx
*)_r
;
8351 r
->out
.result
= _spoolss_SetPrinterDataEx(cli
->pipes_struct
, r
);
8352 return NT_STATUS_OK
;
8355 case NDR_SPOOLSS_GETPRINTERDATAEX
: {
8356 struct spoolss_GetPrinterDataEx
*r
= (struct spoolss_GetPrinterDataEx
*)_r
;
8357 ZERO_STRUCT(r
->out
);
8358 r
->out
.type
= talloc_zero(mem_ctx
, enum winreg_Type
);
8359 if (r
->out
.type
== NULL
) {
8360 return NT_STATUS_NO_MEMORY
;
8363 r
->out
.buffer
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.offered
);
8364 if (r
->out
.buffer
== NULL
) {
8365 return NT_STATUS_NO_MEMORY
;
8368 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8369 if (r
->out
.needed
== NULL
) {
8370 return NT_STATUS_NO_MEMORY
;
8373 r
->out
.result
= _spoolss_GetPrinterDataEx(cli
->pipes_struct
, r
);
8374 return NT_STATUS_OK
;
8377 case NDR_SPOOLSS_ENUMPRINTERDATAEX
: {
8378 struct spoolss_EnumPrinterDataEx
*r
= (struct spoolss_EnumPrinterDataEx
*)_r
;
8379 ZERO_STRUCT(r
->out
);
8380 r
->out
.count
= talloc_zero(mem_ctx
, uint32_t);
8381 if (r
->out
.count
== NULL
) {
8382 return NT_STATUS_NO_MEMORY
;
8385 r
->out
.info
= talloc_zero(mem_ctx
, struct spoolss_PrinterEnumValues
*);
8386 if (r
->out
.info
== NULL
) {
8387 return NT_STATUS_NO_MEMORY
;
8390 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8391 if (r
->out
.needed
== NULL
) {
8392 return NT_STATUS_NO_MEMORY
;
8395 r
->out
.result
= _spoolss_EnumPrinterDataEx(cli
->pipes_struct
, r
);
8396 return NT_STATUS_OK
;
8399 case NDR_SPOOLSS_ENUMPRINTERKEY
: {
8400 struct spoolss_EnumPrinterKey
*r
= (struct spoolss_EnumPrinterKey
*)_r
;
8401 ZERO_STRUCT(r
->out
);
8402 r
->out
.key_buffer
= talloc_zero(mem_ctx
, const char **);
8403 if (r
->out
.key_buffer
== NULL
) {
8404 return NT_STATUS_NO_MEMORY
;
8407 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8408 if (r
->out
.needed
== NULL
) {
8409 return NT_STATUS_NO_MEMORY
;
8412 r
->out
.result
= _spoolss_EnumPrinterKey(cli
->pipes_struct
, r
);
8413 return NT_STATUS_OK
;
8416 case NDR_SPOOLSS_DELETEPRINTERDATAEX
: {
8417 struct spoolss_DeletePrinterDataEx
*r
= (struct spoolss_DeletePrinterDataEx
*)_r
;
8418 r
->out
.result
= _spoolss_DeletePrinterDataEx(cli
->pipes_struct
, r
);
8419 return NT_STATUS_OK
;
8422 case NDR_SPOOLSS_DELETEPRINTERKEY
: {
8423 struct spoolss_DeletePrinterKey
*r
= (struct spoolss_DeletePrinterKey
*)_r
;
8424 r
->out
.result
= _spoolss_DeletePrinterKey(cli
->pipes_struct
, r
);
8425 return NT_STATUS_OK
;
8428 case NDR_SPOOLSS_53
: {
8429 struct spoolss_53
*r
= (struct spoolss_53
*)_r
;
8430 r
->out
.result
= _spoolss_53(cli
->pipes_struct
, r
);
8431 return NT_STATUS_OK
;
8434 case NDR_SPOOLSS_DELETEPRINTERDRIVEREX
: {
8435 struct spoolss_DeletePrinterDriverEx
*r
= (struct spoolss_DeletePrinterDriverEx
*)_r
;
8436 r
->out
.result
= _spoolss_DeletePrinterDriverEx(cli
->pipes_struct
, r
);
8437 return NT_STATUS_OK
;
8440 case NDR_SPOOLSS_55
: {
8441 struct spoolss_55
*r
= (struct spoolss_55
*)_r
;
8442 r
->out
.result
= _spoolss_55(cli
->pipes_struct
, r
);
8443 return NT_STATUS_OK
;
8446 case NDR_SPOOLSS_56
: {
8447 struct spoolss_56
*r
= (struct spoolss_56
*)_r
;
8448 r
->out
.result
= _spoolss_56(cli
->pipes_struct
, r
);
8449 return NT_STATUS_OK
;
8452 case NDR_SPOOLSS_57
: {
8453 struct spoolss_57
*r
= (struct spoolss_57
*)_r
;
8454 r
->out
.result
= _spoolss_57(cli
->pipes_struct
, r
);
8455 return NT_STATUS_OK
;
8458 case NDR_SPOOLSS_XCVDATA
: {
8459 struct spoolss_XcvData
*r
= (struct spoolss_XcvData
*)_r
;
8460 ZERO_STRUCT(r
->out
);
8461 r
->out
.status_code
= r
->in
.status_code
;
8462 r
->out
.out_data
= talloc_zero_array(mem_ctx
, uint8_t, r
->in
.out_data_size
);
8463 if (r
->out
.out_data
== NULL
) {
8464 return NT_STATUS_NO_MEMORY
;
8467 r
->out
.needed
= talloc_zero(mem_ctx
, uint32_t);
8468 if (r
->out
.needed
== NULL
) {
8469 return NT_STATUS_NO_MEMORY
;
8472 r
->out
.result
= _spoolss_XcvData(cli
->pipes_struct
, r
);
8473 return NT_STATUS_OK
;
8476 case NDR_SPOOLSS_ADDPRINTERDRIVEREX
: {
8477 struct spoolss_AddPrinterDriverEx
*r
= (struct spoolss_AddPrinterDriverEx
*)_r
;
8478 r
->out
.result
= _spoolss_AddPrinterDriverEx(cli
->pipes_struct
, r
);
8479 return NT_STATUS_OK
;
8482 case NDR_SPOOLSS_5A
: {
8483 struct spoolss_5a
*r
= (struct spoolss_5a
*)_r
;
8484 r
->out
.result
= _spoolss_5a(cli
->pipes_struct
, r
);
8485 return NT_STATUS_OK
;
8488 case NDR_SPOOLSS_5B
: {
8489 struct spoolss_5b
*r
= (struct spoolss_5b
*)_r
;
8490 r
->out
.result
= _spoolss_5b(cli
->pipes_struct
, r
);
8491 return NT_STATUS_OK
;
8494 case NDR_SPOOLSS_5C
: {
8495 struct spoolss_5c
*r
= (struct spoolss_5c
*)_r
;
8496 r
->out
.result
= _spoolss_5c(cli
->pipes_struct
, r
);
8497 return NT_STATUS_OK
;
8500 case NDR_SPOOLSS_5D
: {
8501 struct spoolss_5d
*r
= (struct spoolss_5d
*)_r
;
8502 r
->out
.result
= _spoolss_5d(cli
->pipes_struct
, r
);
8503 return NT_STATUS_OK
;
8506 case NDR_SPOOLSS_5E
: {
8507 struct spoolss_5e
*r
= (struct spoolss_5e
*)_r
;
8508 r
->out
.result
= _spoolss_5e(cli
->pipes_struct
, r
);
8509 return NT_STATUS_OK
;
8512 case NDR_SPOOLSS_5F
: {
8513 struct spoolss_5f
*r
= (struct spoolss_5f
*)_r
;
8514 r
->out
.result
= _spoolss_5f(cli
->pipes_struct
, r
);
8515 return NT_STATUS_OK
;
8519 return NT_STATUS_NOT_IMPLEMENTED
;
8523 NTSTATUS
rpc_spoolss_init(void)
8525 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION
, "spoolss", "spoolss", &ndr_table_spoolss
, api_spoolss_cmds
, sizeof(api_spoolss_cmds
) / sizeof(struct api_struct
));