2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_spoolss.h"
9 NTSTATUS
rpccli_spoolss_EnumPrinters(struct rpc_pipe_client
*cli
,
11 uint32_t flags
/* [in] */,
12 const char *server
/* [in] [unique,charset(UTF16)] */,
13 uint32_t level
/* [in] */,
14 DATA_BLOB
*buffer
/* [in] [unique] */,
15 uint32_t offered
/* [in] */,
16 uint32_t *count
/* [out] [ref] */,
17 union spoolss_PrinterInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
18 uint32_t *needed
/* [out] [ref] */,
21 struct spoolss_EnumPrinters r
;
29 r
.in
.offered
= offered
;
31 if (DEBUGLEVEL
>= 10) {
32 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters
, &r
);
35 status
= cli
->dispatch(cli
,
38 NDR_SPOOLSS_ENUMPRINTERS
,
41 if (!NT_STATUS_IS_OK(status
)) {
45 if (DEBUGLEVEL
>= 10) {
46 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters
, &r
);
49 if (NT_STATUS_IS_ERR(status
)) {
53 /* Return variables */
54 *count
= *r
.out
.count
;
56 *needed
= *r
.out
.needed
;
60 *werror
= r
.out
.result
;
63 return werror_to_ntstatus(r
.out
.result
);
66 NTSTATUS
rpccli_spoolss_OpenPrinter(struct rpc_pipe_client
*cli
,
68 const char *printername
/* [in] [unique,charset(UTF16)] */,
69 const char *datatype
/* [in] [unique,charset(UTF16)] */,
70 struct spoolss_DevmodeContainer devmode_ctr
/* [in] */,
71 uint32_t access_mask
/* [in] */,
72 struct policy_handle
*handle
/* [out] [ref] */,
75 struct spoolss_OpenPrinter r
;
79 r
.in
.printername
= printername
;
80 r
.in
.datatype
= datatype
;
81 r
.in
.devmode_ctr
= devmode_ctr
;
82 r
.in
.access_mask
= access_mask
;
84 if (DEBUGLEVEL
>= 10) {
85 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter
, &r
);
88 status
= cli
->dispatch(cli
,
91 NDR_SPOOLSS_OPENPRINTER
,
94 if (!NT_STATUS_IS_OK(status
)) {
98 if (DEBUGLEVEL
>= 10) {
99 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter
, &r
);
102 if (NT_STATUS_IS_ERR(status
)) {
106 /* Return variables */
107 *handle
= *r
.out
.handle
;
111 *werror
= r
.out
.result
;
114 return werror_to_ntstatus(r
.out
.result
);
117 NTSTATUS
rpccli_spoolss_SetJob(struct rpc_pipe_client
*cli
,
119 struct policy_handle
*handle
/* [in] [ref] */,
120 uint32_t job_id
/* [in] */,
121 struct spoolss_JobInfoContainer
*ctr
/* [in] [unique] */,
122 enum spoolss_JobControl command
/* [in] */,
125 struct spoolss_SetJob r
;
129 r
.in
.handle
= handle
;
130 r
.in
.job_id
= job_id
;
132 r
.in
.command
= command
;
134 if (DEBUGLEVEL
>= 10) {
135 NDR_PRINT_IN_DEBUG(spoolss_SetJob
, &r
);
138 status
= cli
->dispatch(cli
,
144 if (!NT_STATUS_IS_OK(status
)) {
148 if (DEBUGLEVEL
>= 10) {
149 NDR_PRINT_OUT_DEBUG(spoolss_SetJob
, &r
);
152 if (NT_STATUS_IS_ERR(status
)) {
156 /* Return variables */
160 *werror
= r
.out
.result
;
163 return werror_to_ntstatus(r
.out
.result
);
166 NTSTATUS
rpccli_spoolss_GetJob(struct rpc_pipe_client
*cli
,
168 struct policy_handle
*handle
/* [in] [ref] */,
169 uint32_t job_id
/* [in] */,
170 uint32_t level
/* [in] */,
171 DATA_BLOB
*buffer
/* [in] [unique] */,
172 uint32_t offered
/* [in] */,
173 union spoolss_JobInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
174 uint32_t *needed
/* [out] [ref] */,
177 struct spoolss_GetJob r
;
181 r
.in
.handle
= handle
;
182 r
.in
.job_id
= job_id
;
184 r
.in
.buffer
= buffer
;
185 r
.in
.offered
= offered
;
187 if (DEBUGLEVEL
>= 10) {
188 NDR_PRINT_IN_DEBUG(spoolss_GetJob
, &r
);
191 status
= cli
->dispatch(cli
,
197 if (!NT_STATUS_IS_OK(status
)) {
201 if (DEBUGLEVEL
>= 10) {
202 NDR_PRINT_OUT_DEBUG(spoolss_GetJob
, &r
);
205 if (NT_STATUS_IS_ERR(status
)) {
209 /* Return variables */
210 if (info
&& r
.out
.info
) {
213 *needed
= *r
.out
.needed
;
217 *werror
= r
.out
.result
;
220 return werror_to_ntstatus(r
.out
.result
);
223 NTSTATUS
rpccli_spoolss_EnumJobs(struct rpc_pipe_client
*cli
,
225 struct policy_handle
*handle
/* [in] [ref] */,
226 uint32_t firstjob
/* [in] */,
227 uint32_t numjobs
/* [in] */,
228 uint32_t level
/* [in] */,
229 DATA_BLOB
*buffer
/* [in] [unique] */,
230 uint32_t offered
/* [in] */,
231 uint32_t *count
/* [out] [ref] */,
232 union spoolss_JobInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
233 uint32_t *needed
/* [out] [ref] */,
236 struct spoolss_EnumJobs r
;
240 r
.in
.handle
= handle
;
241 r
.in
.firstjob
= firstjob
;
242 r
.in
.numjobs
= numjobs
;
244 r
.in
.buffer
= buffer
;
245 r
.in
.offered
= offered
;
247 if (DEBUGLEVEL
>= 10) {
248 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs
, &r
);
251 status
= cli
->dispatch(cli
,
254 NDR_SPOOLSS_ENUMJOBS
,
257 if (!NT_STATUS_IS_OK(status
)) {
261 if (DEBUGLEVEL
>= 10) {
262 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs
, &r
);
265 if (NT_STATUS_IS_ERR(status
)) {
269 /* Return variables */
270 *count
= *r
.out
.count
;
272 *needed
= *r
.out
.needed
;
276 *werror
= r
.out
.result
;
279 return werror_to_ntstatus(r
.out
.result
);
282 NTSTATUS
rpccli_spoolss_AddPrinter(struct rpc_pipe_client
*cli
,
284 const char *server
/* [in] [unique,charset(UTF16)] */,
285 struct spoolss_SetPrinterInfoCtr
*info_ctr
/* [in] [ref] */,
286 struct spoolss_DevmodeContainer
*devmode_ctr
/* [in] [ref] */,
287 struct sec_desc_buf
*secdesc_ctr
/* [in] [ref] */,
288 struct policy_handle
*handle
/* [out] [ref] */,
291 struct spoolss_AddPrinter r
;
295 r
.in
.server
= server
;
296 r
.in
.info_ctr
= info_ctr
;
297 r
.in
.devmode_ctr
= devmode_ctr
;
298 r
.in
.secdesc_ctr
= secdesc_ctr
;
300 if (DEBUGLEVEL
>= 10) {
301 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter
, &r
);
304 status
= cli
->dispatch(cli
,
307 NDR_SPOOLSS_ADDPRINTER
,
310 if (!NT_STATUS_IS_OK(status
)) {
314 if (DEBUGLEVEL
>= 10) {
315 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter
, &r
);
318 if (NT_STATUS_IS_ERR(status
)) {
322 /* Return variables */
323 *handle
= *r
.out
.handle
;
327 *werror
= r
.out
.result
;
330 return werror_to_ntstatus(r
.out
.result
);
333 NTSTATUS
rpccli_spoolss_DeletePrinter(struct rpc_pipe_client
*cli
,
335 struct policy_handle
*handle
/* [in] [ref] */,
338 struct spoolss_DeletePrinter r
;
342 r
.in
.handle
= handle
;
344 if (DEBUGLEVEL
>= 10) {
345 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter
, &r
);
348 status
= cli
->dispatch(cli
,
351 NDR_SPOOLSS_DELETEPRINTER
,
354 if (!NT_STATUS_IS_OK(status
)) {
358 if (DEBUGLEVEL
>= 10) {
359 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter
, &r
);
362 if (NT_STATUS_IS_ERR(status
)) {
366 /* Return variables */
370 *werror
= r
.out
.result
;
373 return werror_to_ntstatus(r
.out
.result
);
376 NTSTATUS
rpccli_spoolss_SetPrinter(struct rpc_pipe_client
*cli
,
378 struct policy_handle
*handle
/* [in] [ref] */,
379 struct spoolss_SetPrinterInfoCtr
*info_ctr
/* [in] [ref] */,
380 struct spoolss_DevmodeContainer
*devmode_ctr
/* [in] [ref] */,
381 struct sec_desc_buf
*secdesc_ctr
/* [in] [ref] */,
382 enum spoolss_PrinterControl command
/* [in] */,
385 struct spoolss_SetPrinter r
;
389 r
.in
.handle
= handle
;
390 r
.in
.info_ctr
= info_ctr
;
391 r
.in
.devmode_ctr
= devmode_ctr
;
392 r
.in
.secdesc_ctr
= secdesc_ctr
;
393 r
.in
.command
= command
;
395 if (DEBUGLEVEL
>= 10) {
396 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter
, &r
);
399 status
= cli
->dispatch(cli
,
402 NDR_SPOOLSS_SETPRINTER
,
405 if (!NT_STATUS_IS_OK(status
)) {
409 if (DEBUGLEVEL
>= 10) {
410 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter
, &r
);
413 if (NT_STATUS_IS_ERR(status
)) {
417 /* Return variables */
421 *werror
= r
.out
.result
;
424 return werror_to_ntstatus(r
.out
.result
);
427 NTSTATUS
rpccli_spoolss_GetPrinter(struct rpc_pipe_client
*cli
,
429 struct policy_handle
*handle
/* [in] [ref] */,
430 uint32_t level
/* [in] */,
431 DATA_BLOB
*buffer
/* [in] [unique] */,
432 uint32_t offered
/* [in] */,
433 union spoolss_PrinterInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
434 uint32_t *needed
/* [out] [ref] */,
437 struct spoolss_GetPrinter r
;
441 r
.in
.handle
= handle
;
443 r
.in
.buffer
= buffer
;
444 r
.in
.offered
= offered
;
446 if (DEBUGLEVEL
>= 10) {
447 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter
, &r
);
450 status
= cli
->dispatch(cli
,
453 NDR_SPOOLSS_GETPRINTER
,
456 if (!NT_STATUS_IS_OK(status
)) {
460 if (DEBUGLEVEL
>= 10) {
461 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter
, &r
);
464 if (NT_STATUS_IS_ERR(status
)) {
468 /* Return variables */
469 if (info
&& r
.out
.info
) {
472 *needed
= *r
.out
.needed
;
476 *werror
= r
.out
.result
;
479 return werror_to_ntstatus(r
.out
.result
);
482 NTSTATUS
rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client
*cli
,
484 const char *servername
/* [in] [unique,charset(UTF16)] */,
485 struct spoolss_AddDriverInfoCtr
*info_ctr
/* [in] [ref] */,
488 struct spoolss_AddPrinterDriver r
;
492 r
.in
.servername
= servername
;
493 r
.in
.info_ctr
= info_ctr
;
495 if (DEBUGLEVEL
>= 10) {
496 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver
, &r
);
499 status
= cli
->dispatch(cli
,
502 NDR_SPOOLSS_ADDPRINTERDRIVER
,
505 if (!NT_STATUS_IS_OK(status
)) {
509 if (DEBUGLEVEL
>= 10) {
510 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver
, &r
);
513 if (NT_STATUS_IS_ERR(status
)) {
517 /* Return variables */
521 *werror
= r
.out
.result
;
524 return werror_to_ntstatus(r
.out
.result
);
527 NTSTATUS
rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client
*cli
,
529 const char *server
/* [in] [unique,charset(UTF16)] */,
530 const char *environment
/* [in] [unique,charset(UTF16)] */,
531 uint32_t level
/* [in] */,
532 DATA_BLOB
*buffer
/* [in] [unique] */,
533 uint32_t offered
/* [in] */,
534 uint32_t *count
/* [out] [ref] */,
535 union spoolss_DriverInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
536 uint32_t *needed
/* [out] [ref] */,
539 struct spoolss_EnumPrinterDrivers r
;
543 r
.in
.server
= server
;
544 r
.in
.environment
= environment
;
546 r
.in
.buffer
= buffer
;
547 r
.in
.offered
= offered
;
549 if (DEBUGLEVEL
>= 10) {
550 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers
, &r
);
553 status
= cli
->dispatch(cli
,
556 NDR_SPOOLSS_ENUMPRINTERDRIVERS
,
559 if (!NT_STATUS_IS_OK(status
)) {
563 if (DEBUGLEVEL
>= 10) {
564 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers
, &r
);
567 if (NT_STATUS_IS_ERR(status
)) {
571 /* Return variables */
572 *count
= *r
.out
.count
;
574 *needed
= *r
.out
.needed
;
578 *werror
= r
.out
.result
;
581 return werror_to_ntstatus(r
.out
.result
);
584 NTSTATUS
rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client
*cli
,
586 struct policy_handle
*handle
/* [in] [ref] */,
587 const char *architecture
/* [in] [unique,charset(UTF16)] */,
588 uint32_t level
/* [in] */,
589 DATA_BLOB
*buffer
/* [in] [unique] */,
590 uint32_t offered
/* [in] */,
591 union spoolss_DriverInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
592 uint32_t *needed
/* [out] [ref] */,
595 struct spoolss_GetPrinterDriver r
;
599 r
.in
.handle
= handle
;
600 r
.in
.architecture
= architecture
;
602 r
.in
.buffer
= buffer
;
603 r
.in
.offered
= offered
;
605 if (DEBUGLEVEL
>= 10) {
606 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver
, &r
);
609 status
= cli
->dispatch(cli
,
612 NDR_SPOOLSS_GETPRINTERDRIVER
,
615 if (!NT_STATUS_IS_OK(status
)) {
619 if (DEBUGLEVEL
>= 10) {
620 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver
, &r
);
623 if (NT_STATUS_IS_ERR(status
)) {
627 /* Return variables */
628 if (info
&& r
.out
.info
) {
631 *needed
= *r
.out
.needed
;
635 *werror
= r
.out
.result
;
638 return werror_to_ntstatus(r
.out
.result
);
641 NTSTATUS
rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client
*cli
,
643 const char *server
/* [in] [unique,charset(UTF16)] */,
644 const char *environment
/* [in] [unique,charset(UTF16)] */,
645 uint32_t level
/* [in] */,
646 DATA_BLOB
*buffer
/* [in] [unique] */,
647 uint32_t offered
/* [in] */,
648 union spoolss_DriverDirectoryInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
649 uint32_t *needed
/* [out] [ref] */,
652 struct spoolss_GetPrinterDriverDirectory r
;
656 r
.in
.server
= server
;
657 r
.in
.environment
= environment
;
659 r
.in
.buffer
= buffer
;
660 r
.in
.offered
= offered
;
662 if (DEBUGLEVEL
>= 10) {
663 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory
, &r
);
666 status
= cli
->dispatch(cli
,
669 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
,
672 if (!NT_STATUS_IS_OK(status
)) {
676 if (DEBUGLEVEL
>= 10) {
677 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory
, &r
);
680 if (NT_STATUS_IS_ERR(status
)) {
684 /* Return variables */
685 if (info
&& r
.out
.info
) {
688 *needed
= *r
.out
.needed
;
692 *werror
= r
.out
.result
;
695 return werror_to_ntstatus(r
.out
.result
);
698 NTSTATUS
rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client
*cli
,
700 const char *server
/* [in] [unique,charset(UTF16)] */,
701 const char *architecture
/* [in] [charset(UTF16)] */,
702 const char *driver
/* [in] [charset(UTF16)] */,
705 struct spoolss_DeletePrinterDriver r
;
709 r
.in
.server
= server
;
710 r
.in
.architecture
= architecture
;
711 r
.in
.driver
= driver
;
713 if (DEBUGLEVEL
>= 10) {
714 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver
, &r
);
717 status
= cli
->dispatch(cli
,
720 NDR_SPOOLSS_DELETEPRINTERDRIVER
,
723 if (!NT_STATUS_IS_OK(status
)) {
727 if (DEBUGLEVEL
>= 10) {
728 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver
, &r
);
731 if (NT_STATUS_IS_ERR(status
)) {
735 /* Return variables */
739 *werror
= r
.out
.result
;
742 return werror_to_ntstatus(r
.out
.result
);
745 NTSTATUS
rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client
*cli
,
747 const char *server
/* [in] [unique,charset(UTF16)] */,
748 const char *architecture
/* [in] [charset(UTF16)] */,
749 const char *path_name
/* [in] [charset(UTF16)] */,
750 const char *print_processor_name
/* [in] [charset(UTF16)] */,
753 struct spoolss_AddPrintProcessor r
;
757 r
.in
.server
= server
;
758 r
.in
.architecture
= architecture
;
759 r
.in
.path_name
= path_name
;
760 r
.in
.print_processor_name
= print_processor_name
;
762 if (DEBUGLEVEL
>= 10) {
763 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor
, &r
);
766 status
= cli
->dispatch(cli
,
769 NDR_SPOOLSS_ADDPRINTPROCESSOR
,
772 if (!NT_STATUS_IS_OK(status
)) {
776 if (DEBUGLEVEL
>= 10) {
777 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor
, &r
);
780 if (NT_STATUS_IS_ERR(status
)) {
784 /* Return variables */
788 *werror
= r
.out
.result
;
791 return werror_to_ntstatus(r
.out
.result
);
794 NTSTATUS
rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client
*cli
,
796 const char *servername
/* [in] [unique,charset(UTF16)] */,
797 const char *environment
/* [in] [unique,charset(UTF16)] */,
798 uint32_t level
/* [in] */,
799 DATA_BLOB
*buffer
/* [in] [unique] */,
800 uint32_t offered
/* [in] */,
801 uint32_t *count
/* [out] [ref] */,
802 union spoolss_PrintProcessorInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
803 uint32_t *needed
/* [out] [ref] */,
806 struct spoolss_EnumPrintProcessors r
;
810 r
.in
.servername
= servername
;
811 r
.in
.environment
= environment
;
813 r
.in
.buffer
= buffer
;
814 r
.in
.offered
= offered
;
816 if (DEBUGLEVEL
>= 10) {
817 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors
, &r
);
820 status
= cli
->dispatch(cli
,
823 NDR_SPOOLSS_ENUMPRINTPROCESSORS
,
826 if (!NT_STATUS_IS_OK(status
)) {
830 if (DEBUGLEVEL
>= 10) {
831 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors
, &r
);
834 if (NT_STATUS_IS_ERR(status
)) {
838 /* Return variables */
839 *count
= *r
.out
.count
;
841 *needed
= *r
.out
.needed
;
845 *werror
= r
.out
.result
;
848 return werror_to_ntstatus(r
.out
.result
);
851 NTSTATUS
rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client
*cli
,
853 const char *server
/* [in] [unique,charset(UTF16)] */,
854 const char *environment
/* [in] [unique,charset(UTF16)] */,
855 uint32_t level
/* [in] */,
856 DATA_BLOB
*buffer
/* [in] [unique] */,
857 uint32_t offered
/* [in] */,
858 union spoolss_PrintProcessorDirectoryInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
859 uint32_t *needed
/* [out] [ref] */,
862 struct spoolss_GetPrintProcessorDirectory r
;
866 r
.in
.server
= server
;
867 r
.in
.environment
= environment
;
869 r
.in
.buffer
= buffer
;
870 r
.in
.offered
= offered
;
872 if (DEBUGLEVEL
>= 10) {
873 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory
, &r
);
876 status
= cli
->dispatch(cli
,
879 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
,
882 if (!NT_STATUS_IS_OK(status
)) {
886 if (DEBUGLEVEL
>= 10) {
887 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory
, &r
);
890 if (NT_STATUS_IS_ERR(status
)) {
894 /* Return variables */
895 if (info
&& r
.out
.info
) {
898 *needed
= *r
.out
.needed
;
902 *werror
= r
.out
.result
;
905 return werror_to_ntstatus(r
.out
.result
);
908 NTSTATUS
rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client
*cli
,
910 struct policy_handle
*handle
/* [in] [ref] */,
911 uint32_t level
/* [in] */,
912 union spoolss_DocumentInfo info
/* [in] [switch_is(level)] */,
913 uint32_t *job_id
/* [out] [ref] */,
916 struct spoolss_StartDocPrinter r
;
920 r
.in
.handle
= handle
;
924 if (DEBUGLEVEL
>= 10) {
925 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter
, &r
);
928 status
= cli
->dispatch(cli
,
931 NDR_SPOOLSS_STARTDOCPRINTER
,
934 if (!NT_STATUS_IS_OK(status
)) {
938 if (DEBUGLEVEL
>= 10) {
939 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter
, &r
);
942 if (NT_STATUS_IS_ERR(status
)) {
946 /* Return variables */
947 *job_id
= *r
.out
.job_id
;
951 *werror
= r
.out
.result
;
954 return werror_to_ntstatus(r
.out
.result
);
957 NTSTATUS
rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client
*cli
,
959 struct policy_handle
*handle
/* [in] [ref] */,
962 struct spoolss_StartPagePrinter r
;
966 r
.in
.handle
= handle
;
968 if (DEBUGLEVEL
>= 10) {
969 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter
, &r
);
972 status
= cli
->dispatch(cli
,
975 NDR_SPOOLSS_STARTPAGEPRINTER
,
978 if (!NT_STATUS_IS_OK(status
)) {
982 if (DEBUGLEVEL
>= 10) {
983 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter
, &r
);
986 if (NT_STATUS_IS_ERR(status
)) {
990 /* Return variables */
994 *werror
= r
.out
.result
;
997 return werror_to_ntstatus(r
.out
.result
);
1000 NTSTATUS
rpccli_spoolss_WritePrinter(struct rpc_pipe_client
*cli
,
1001 TALLOC_CTX
*mem_ctx
,
1002 struct policy_handle
*handle
/* [in] [ref] */,
1003 DATA_BLOB data
/* [in] */,
1004 uint32_t _data_size
/* [in] [value(r->in.data.length)] */,
1005 uint32_t *num_written
/* [out] [ref] */,
1008 struct spoolss_WritePrinter r
;
1012 r
.in
.handle
= handle
;
1014 r
.in
._data_size
= _data_size
;
1016 if (DEBUGLEVEL
>= 10) {
1017 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter
, &r
);
1020 status
= cli
->dispatch(cli
,
1023 NDR_SPOOLSS_WRITEPRINTER
,
1026 if (!NT_STATUS_IS_OK(status
)) {
1030 if (DEBUGLEVEL
>= 10) {
1031 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter
, &r
);
1034 if (NT_STATUS_IS_ERR(status
)) {
1038 /* Return variables */
1039 *num_written
= *r
.out
.num_written
;
1043 *werror
= r
.out
.result
;
1046 return werror_to_ntstatus(r
.out
.result
);
1049 NTSTATUS
rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client
*cli
,
1050 TALLOC_CTX
*mem_ctx
,
1051 struct policy_handle
*handle
/* [in] [ref] */,
1054 struct spoolss_EndPagePrinter r
;
1058 r
.in
.handle
= handle
;
1060 if (DEBUGLEVEL
>= 10) {
1061 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter
, &r
);
1064 status
= cli
->dispatch(cli
,
1067 NDR_SPOOLSS_ENDPAGEPRINTER
,
1070 if (!NT_STATUS_IS_OK(status
)) {
1074 if (DEBUGLEVEL
>= 10) {
1075 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter
, &r
);
1078 if (NT_STATUS_IS_ERR(status
)) {
1082 /* Return variables */
1086 *werror
= r
.out
.result
;
1089 return werror_to_ntstatus(r
.out
.result
);
1092 NTSTATUS
rpccli_spoolss_AbortPrinter(struct rpc_pipe_client
*cli
,
1093 TALLOC_CTX
*mem_ctx
,
1094 struct policy_handle
*handle
/* [in] [ref] */,
1097 struct spoolss_AbortPrinter r
;
1101 r
.in
.handle
= handle
;
1103 if (DEBUGLEVEL
>= 10) {
1104 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter
, &r
);
1107 status
= cli
->dispatch(cli
,
1110 NDR_SPOOLSS_ABORTPRINTER
,
1113 if (!NT_STATUS_IS_OK(status
)) {
1117 if (DEBUGLEVEL
>= 10) {
1118 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter
, &r
);
1121 if (NT_STATUS_IS_ERR(status
)) {
1125 /* Return variables */
1129 *werror
= r
.out
.result
;
1132 return werror_to_ntstatus(r
.out
.result
);
1135 NTSTATUS
rpccli_spoolss_ReadPrinter(struct rpc_pipe_client
*cli
,
1136 TALLOC_CTX
*mem_ctx
,
1137 struct policy_handle
*handle
/* [in] [ref] */,
1138 uint8_t *data
/* [out] [ref,size_is(data_size)] */,
1139 uint32_t data_size
/* [in] */,
1140 uint32_t *_data_size
/* [out] [ref] */,
1143 struct spoolss_ReadPrinter r
;
1147 r
.in
.handle
= handle
;
1148 r
.in
.data_size
= data_size
;
1150 if (DEBUGLEVEL
>= 10) {
1151 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter
, &r
);
1154 status
= cli
->dispatch(cli
,
1157 NDR_SPOOLSS_READPRINTER
,
1160 if (!NT_STATUS_IS_OK(status
)) {
1164 if (DEBUGLEVEL
>= 10) {
1165 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter
, &r
);
1168 if (NT_STATUS_IS_ERR(status
)) {
1172 /* Return variables */
1173 memcpy(data
, r
.out
.data
, r
.in
.data_size
* sizeof(*data
));
1174 *_data_size
= *r
.out
._data_size
;
1178 *werror
= r
.out
.result
;
1181 return werror_to_ntstatus(r
.out
.result
);
1184 NTSTATUS
rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client
*cli
,
1185 TALLOC_CTX
*mem_ctx
,
1186 struct policy_handle
*handle
/* [in] [ref] */,
1189 struct spoolss_EndDocPrinter r
;
1193 r
.in
.handle
= handle
;
1195 if (DEBUGLEVEL
>= 10) {
1196 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter
, &r
);
1199 status
= cli
->dispatch(cli
,
1202 NDR_SPOOLSS_ENDDOCPRINTER
,
1205 if (!NT_STATUS_IS_OK(status
)) {
1209 if (DEBUGLEVEL
>= 10) {
1210 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter
, &r
);
1213 if (NT_STATUS_IS_ERR(status
)) {
1217 /* Return variables */
1221 *werror
= r
.out
.result
;
1224 return werror_to_ntstatus(r
.out
.result
);
1227 NTSTATUS
rpccli_spoolss_AddJob(struct rpc_pipe_client
*cli
,
1228 TALLOC_CTX
*mem_ctx
,
1229 struct policy_handle
*handle
/* [in] [ref] */,
1230 uint32_t level
/* [in] */,
1231 uint8_t *buffer
/* [in,out] [unique,size_is(offered)] */,
1232 uint32_t offered
/* [in] */,
1233 uint32_t *needed
/* [out] [ref] */,
1236 struct spoolss_AddJob r
;
1240 r
.in
.handle
= handle
;
1242 r
.in
.buffer
= buffer
;
1243 r
.in
.offered
= offered
;
1245 if (DEBUGLEVEL
>= 10) {
1246 NDR_PRINT_IN_DEBUG(spoolss_AddJob
, &r
);
1249 status
= cli
->dispatch(cli
,
1255 if (!NT_STATUS_IS_OK(status
)) {
1259 if (DEBUGLEVEL
>= 10) {
1260 NDR_PRINT_OUT_DEBUG(spoolss_AddJob
, &r
);
1263 if (NT_STATUS_IS_ERR(status
)) {
1267 /* Return variables */
1268 if (buffer
&& r
.out
.buffer
) {
1269 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
1271 *needed
= *r
.out
.needed
;
1275 *werror
= r
.out
.result
;
1278 return werror_to_ntstatus(r
.out
.result
);
1281 NTSTATUS
rpccli_spoolss_ScheduleJob(struct rpc_pipe_client
*cli
,
1282 TALLOC_CTX
*mem_ctx
,
1283 struct policy_handle
*handle
/* [in] [ref] */,
1284 uint32_t jobid
/* [in] */,
1287 struct spoolss_ScheduleJob r
;
1291 r
.in
.handle
= handle
;
1294 if (DEBUGLEVEL
>= 10) {
1295 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob
, &r
);
1298 status
= cli
->dispatch(cli
,
1301 NDR_SPOOLSS_SCHEDULEJOB
,
1304 if (!NT_STATUS_IS_OK(status
)) {
1308 if (DEBUGLEVEL
>= 10) {
1309 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob
, &r
);
1312 if (NT_STATUS_IS_ERR(status
)) {
1316 /* Return variables */
1320 *werror
= r
.out
.result
;
1323 return werror_to_ntstatus(r
.out
.result
);
1326 NTSTATUS
rpccli_spoolss_GetPrinterData(struct rpc_pipe_client
*cli
,
1327 TALLOC_CTX
*mem_ctx
,
1328 struct policy_handle
*handle
/* [in] [ref] */,
1329 const char *value_name
/* [in] [charset(UTF16)] */,
1330 uint32_t offered
/* [in] */,
1331 enum winreg_Type
*type
/* [out] [ref] */,
1332 union spoolss_PrinterData
*data
/* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
1333 uint32_t *needed
/* [out] [ref] */,
1336 struct spoolss_GetPrinterData r
;
1340 r
.in
.handle
= handle
;
1341 r
.in
.value_name
= value_name
;
1342 r
.in
.offered
= offered
;
1344 if (DEBUGLEVEL
>= 10) {
1345 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData
, &r
);
1348 status
= cli
->dispatch(cli
,
1351 NDR_SPOOLSS_GETPRINTERDATA
,
1354 if (!NT_STATUS_IS_OK(status
)) {
1358 if (DEBUGLEVEL
>= 10) {
1359 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData
, &r
);
1362 if (NT_STATUS_IS_ERR(status
)) {
1366 /* Return variables */
1367 *type
= *r
.out
.type
;
1368 *data
= *r
.out
.data
;
1369 *needed
= *r
.out
.needed
;
1373 *werror
= r
.out
.result
;
1376 return werror_to_ntstatus(r
.out
.result
);
1379 NTSTATUS
rpccli_spoolss_SetPrinterData(struct rpc_pipe_client
*cli
,
1380 TALLOC_CTX
*mem_ctx
,
1381 struct policy_handle
*handle
/* [in] [ref] */,
1382 const char *value_name
/* [in] [charset(UTF16)] */,
1383 enum winreg_Type type
/* [in] */,
1384 union spoolss_PrinterData data
/* [in] [subcontext(4),switch_is(type)] */,
1385 uint32_t _offered
/* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1388 struct spoolss_SetPrinterData r
;
1392 r
.in
.handle
= handle
;
1393 r
.in
.value_name
= value_name
;
1396 r
.in
._offered
= _offered
;
1398 if (DEBUGLEVEL
>= 10) {
1399 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData
, &r
);
1402 status
= cli
->dispatch(cli
,
1405 NDR_SPOOLSS_SETPRINTERDATA
,
1408 if (!NT_STATUS_IS_OK(status
)) {
1412 if (DEBUGLEVEL
>= 10) {
1413 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData
, &r
);
1416 if (NT_STATUS_IS_ERR(status
)) {
1420 /* Return variables */
1424 *werror
= r
.out
.result
;
1427 return werror_to_ntstatus(r
.out
.result
);
1430 NTSTATUS
rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client
*cli
,
1431 TALLOC_CTX
*mem_ctx
,
1434 struct spoolss_WaitForPrinterChange r
;
1439 if (DEBUGLEVEL
>= 10) {
1440 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange
, &r
);
1443 status
= cli
->dispatch(cli
,
1446 NDR_SPOOLSS_WAITFORPRINTERCHANGE
,
1449 if (!NT_STATUS_IS_OK(status
)) {
1453 if (DEBUGLEVEL
>= 10) {
1454 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange
, &r
);
1457 if (NT_STATUS_IS_ERR(status
)) {
1461 /* Return variables */
1465 *werror
= r
.out
.result
;
1468 return werror_to_ntstatus(r
.out
.result
);
1471 NTSTATUS
rpccli_spoolss_ClosePrinter(struct rpc_pipe_client
*cli
,
1472 TALLOC_CTX
*mem_ctx
,
1473 struct policy_handle
*handle
/* [in,out] [ref] */,
1476 struct spoolss_ClosePrinter r
;
1480 r
.in
.handle
= handle
;
1482 if (DEBUGLEVEL
>= 10) {
1483 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter
, &r
);
1486 status
= cli
->dispatch(cli
,
1489 NDR_SPOOLSS_CLOSEPRINTER
,
1492 if (!NT_STATUS_IS_OK(status
)) {
1496 if (DEBUGLEVEL
>= 10) {
1497 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter
, &r
);
1500 if (NT_STATUS_IS_ERR(status
)) {
1504 /* Return variables */
1505 *handle
= *r
.out
.handle
;
1509 *werror
= r
.out
.result
;
1512 return werror_to_ntstatus(r
.out
.result
);
1515 NTSTATUS
rpccli_spoolss_AddForm(struct rpc_pipe_client
*cli
,
1516 TALLOC_CTX
*mem_ctx
,
1517 struct policy_handle
*handle
/* [in] [ref] */,
1518 uint32_t level
/* [in] */,
1519 union spoolss_AddFormInfo info
/* [in] [switch_is(level)] */,
1522 struct spoolss_AddForm r
;
1526 r
.in
.handle
= handle
;
1530 if (DEBUGLEVEL
>= 10) {
1531 NDR_PRINT_IN_DEBUG(spoolss_AddForm
, &r
);
1534 status
= cli
->dispatch(cli
,
1537 NDR_SPOOLSS_ADDFORM
,
1540 if (!NT_STATUS_IS_OK(status
)) {
1544 if (DEBUGLEVEL
>= 10) {
1545 NDR_PRINT_OUT_DEBUG(spoolss_AddForm
, &r
);
1548 if (NT_STATUS_IS_ERR(status
)) {
1552 /* Return variables */
1556 *werror
= r
.out
.result
;
1559 return werror_to_ntstatus(r
.out
.result
);
1562 NTSTATUS
rpccli_spoolss_DeleteForm(struct rpc_pipe_client
*cli
,
1563 TALLOC_CTX
*mem_ctx
,
1564 struct policy_handle
*handle
/* [in] [ref] */,
1565 const char *form_name
/* [in] [charset(UTF16)] */,
1568 struct spoolss_DeleteForm r
;
1572 r
.in
.handle
= handle
;
1573 r
.in
.form_name
= form_name
;
1575 if (DEBUGLEVEL
>= 10) {
1576 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm
, &r
);
1579 status
= cli
->dispatch(cli
,
1582 NDR_SPOOLSS_DELETEFORM
,
1585 if (!NT_STATUS_IS_OK(status
)) {
1589 if (DEBUGLEVEL
>= 10) {
1590 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm
, &r
);
1593 if (NT_STATUS_IS_ERR(status
)) {
1597 /* Return variables */
1601 *werror
= r
.out
.result
;
1604 return werror_to_ntstatus(r
.out
.result
);
1607 NTSTATUS
rpccli_spoolss_GetForm(struct rpc_pipe_client
*cli
,
1608 TALLOC_CTX
*mem_ctx
,
1609 struct policy_handle
*handle
/* [in] [ref] */,
1610 const char *form_name
/* [in] [charset(UTF16)] */,
1611 uint32_t level
/* [in] */,
1612 DATA_BLOB
*buffer
/* [in] [unique] */,
1613 uint32_t offered
/* [in] */,
1614 union spoolss_FormInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1615 uint32_t *needed
/* [out] [ref] */,
1618 struct spoolss_GetForm r
;
1622 r
.in
.handle
= handle
;
1623 r
.in
.form_name
= form_name
;
1625 r
.in
.buffer
= buffer
;
1626 r
.in
.offered
= offered
;
1628 if (DEBUGLEVEL
>= 10) {
1629 NDR_PRINT_IN_DEBUG(spoolss_GetForm
, &r
);
1632 status
= cli
->dispatch(cli
,
1635 NDR_SPOOLSS_GETFORM
,
1638 if (!NT_STATUS_IS_OK(status
)) {
1642 if (DEBUGLEVEL
>= 10) {
1643 NDR_PRINT_OUT_DEBUG(spoolss_GetForm
, &r
);
1646 if (NT_STATUS_IS_ERR(status
)) {
1650 /* Return variables */
1651 if (info
&& r
.out
.info
) {
1652 *info
= *r
.out
.info
;
1654 *needed
= *r
.out
.needed
;
1658 *werror
= r
.out
.result
;
1661 return werror_to_ntstatus(r
.out
.result
);
1664 NTSTATUS
rpccli_spoolss_SetForm(struct rpc_pipe_client
*cli
,
1665 TALLOC_CTX
*mem_ctx
,
1666 struct policy_handle
*handle
/* [in] [ref] */,
1667 const char *form_name
/* [in] [charset(UTF16)] */,
1668 uint32_t level
/* [in] */,
1669 union spoolss_AddFormInfo info
/* [in] [switch_is(level)] */,
1672 struct spoolss_SetForm r
;
1676 r
.in
.handle
= handle
;
1677 r
.in
.form_name
= form_name
;
1681 if (DEBUGLEVEL
>= 10) {
1682 NDR_PRINT_IN_DEBUG(spoolss_SetForm
, &r
);
1685 status
= cli
->dispatch(cli
,
1688 NDR_SPOOLSS_SETFORM
,
1691 if (!NT_STATUS_IS_OK(status
)) {
1695 if (DEBUGLEVEL
>= 10) {
1696 NDR_PRINT_OUT_DEBUG(spoolss_SetForm
, &r
);
1699 if (NT_STATUS_IS_ERR(status
)) {
1703 /* Return variables */
1707 *werror
= r
.out
.result
;
1710 return werror_to_ntstatus(r
.out
.result
);
1713 NTSTATUS
rpccli_spoolss_EnumForms(struct rpc_pipe_client
*cli
,
1714 TALLOC_CTX
*mem_ctx
,
1715 struct policy_handle
*handle
/* [in] [ref] */,
1716 uint32_t level
/* [in] */,
1717 DATA_BLOB
*buffer
/* [in] [unique] */,
1718 uint32_t offered
/* [in] */,
1719 uint32_t *count
/* [out] [ref] */,
1720 union spoolss_FormInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
1721 uint32_t *needed
/* [out] [ref] */,
1724 struct spoolss_EnumForms r
;
1728 r
.in
.handle
= handle
;
1730 r
.in
.buffer
= buffer
;
1731 r
.in
.offered
= offered
;
1733 if (DEBUGLEVEL
>= 10) {
1734 NDR_PRINT_IN_DEBUG(spoolss_EnumForms
, &r
);
1737 status
= cli
->dispatch(cli
,
1740 NDR_SPOOLSS_ENUMFORMS
,
1743 if (!NT_STATUS_IS_OK(status
)) {
1747 if (DEBUGLEVEL
>= 10) {
1748 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms
, &r
);
1751 if (NT_STATUS_IS_ERR(status
)) {
1755 /* Return variables */
1756 *count
= *r
.out
.count
;
1757 *info
= *r
.out
.info
;
1758 *needed
= *r
.out
.needed
;
1762 *werror
= r
.out
.result
;
1765 return werror_to_ntstatus(r
.out
.result
);
1768 NTSTATUS
rpccli_spoolss_EnumPorts(struct rpc_pipe_client
*cli
,
1769 TALLOC_CTX
*mem_ctx
,
1770 const char *servername
/* [in] [unique,charset(UTF16)] */,
1771 uint32_t level
/* [in] */,
1772 DATA_BLOB
*buffer
/* [in] [unique] */,
1773 uint32_t offered
/* [in] */,
1774 uint32_t *count
/* [out] [ref] */,
1775 union spoolss_PortInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
1776 uint32_t *needed
/* [out] [ref] */,
1779 struct spoolss_EnumPorts r
;
1783 r
.in
.servername
= servername
;
1785 r
.in
.buffer
= buffer
;
1786 r
.in
.offered
= offered
;
1788 if (DEBUGLEVEL
>= 10) {
1789 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts
, &r
);
1792 status
= cli
->dispatch(cli
,
1795 NDR_SPOOLSS_ENUMPORTS
,
1798 if (!NT_STATUS_IS_OK(status
)) {
1802 if (DEBUGLEVEL
>= 10) {
1803 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts
, &r
);
1806 if (NT_STATUS_IS_ERR(status
)) {
1810 /* Return variables */
1811 *count
= *r
.out
.count
;
1812 *info
= *r
.out
.info
;
1813 *needed
= *r
.out
.needed
;
1817 *werror
= r
.out
.result
;
1820 return werror_to_ntstatus(r
.out
.result
);
1823 NTSTATUS
rpccli_spoolss_EnumMonitors(struct rpc_pipe_client
*cli
,
1824 TALLOC_CTX
*mem_ctx
,
1825 const char *servername
/* [in] [unique,charset(UTF16)] */,
1826 uint32_t level
/* [in] */,
1827 DATA_BLOB
*buffer
/* [in] [unique] */,
1828 uint32_t offered
/* [in] */,
1829 uint32_t *count
/* [out] [ref] */,
1830 union spoolss_MonitorInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
1831 uint32_t *needed
/* [out] [ref] */,
1834 struct spoolss_EnumMonitors r
;
1838 r
.in
.servername
= servername
;
1840 r
.in
.buffer
= buffer
;
1841 r
.in
.offered
= offered
;
1843 if (DEBUGLEVEL
>= 10) {
1844 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors
, &r
);
1847 status
= cli
->dispatch(cli
,
1850 NDR_SPOOLSS_ENUMMONITORS
,
1853 if (!NT_STATUS_IS_OK(status
)) {
1857 if (DEBUGLEVEL
>= 10) {
1858 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors
, &r
);
1861 if (NT_STATUS_IS_ERR(status
)) {
1865 /* Return variables */
1866 *count
= *r
.out
.count
;
1867 *info
= *r
.out
.info
;
1868 *needed
= *r
.out
.needed
;
1872 *werror
= r
.out
.result
;
1875 return werror_to_ntstatus(r
.out
.result
);
1878 NTSTATUS
rpccli_spoolss_AddPort(struct rpc_pipe_client
*cli
,
1879 TALLOC_CTX
*mem_ctx
,
1880 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1881 uint32_t unknown
/* [in] */,
1882 const char *monitor_name
/* [in] [charset(UTF16)] */,
1885 struct spoolss_AddPort r
;
1889 r
.in
.server_name
= server_name
;
1890 r
.in
.unknown
= unknown
;
1891 r
.in
.monitor_name
= monitor_name
;
1893 if (DEBUGLEVEL
>= 10) {
1894 NDR_PRINT_IN_DEBUG(spoolss_AddPort
, &r
);
1897 status
= cli
->dispatch(cli
,
1900 NDR_SPOOLSS_ADDPORT
,
1903 if (!NT_STATUS_IS_OK(status
)) {
1907 if (DEBUGLEVEL
>= 10) {
1908 NDR_PRINT_OUT_DEBUG(spoolss_AddPort
, &r
);
1911 if (NT_STATUS_IS_ERR(status
)) {
1915 /* Return variables */
1919 *werror
= r
.out
.result
;
1922 return werror_to_ntstatus(r
.out
.result
);
1925 NTSTATUS
rpccli_spoolss_ConfigurePort(struct rpc_pipe_client
*cli
,
1926 TALLOC_CTX
*mem_ctx
,
1929 struct spoolss_ConfigurePort r
;
1934 if (DEBUGLEVEL
>= 10) {
1935 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort
, &r
);
1938 status
= cli
->dispatch(cli
,
1941 NDR_SPOOLSS_CONFIGUREPORT
,
1944 if (!NT_STATUS_IS_OK(status
)) {
1948 if (DEBUGLEVEL
>= 10) {
1949 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort
, &r
);
1952 if (NT_STATUS_IS_ERR(status
)) {
1956 /* Return variables */
1960 *werror
= r
.out
.result
;
1963 return werror_to_ntstatus(r
.out
.result
);
1966 NTSTATUS
rpccli_spoolss_DeletePort(struct rpc_pipe_client
*cli
,
1967 TALLOC_CTX
*mem_ctx
,
1970 struct spoolss_DeletePort r
;
1975 if (DEBUGLEVEL
>= 10) {
1976 NDR_PRINT_IN_DEBUG(spoolss_DeletePort
, &r
);
1979 status
= cli
->dispatch(cli
,
1982 NDR_SPOOLSS_DELETEPORT
,
1985 if (!NT_STATUS_IS_OK(status
)) {
1989 if (DEBUGLEVEL
>= 10) {
1990 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort
, &r
);
1993 if (NT_STATUS_IS_ERR(status
)) {
1997 /* Return variables */
2001 *werror
= r
.out
.result
;
2004 return werror_to_ntstatus(r
.out
.result
);
2007 NTSTATUS
rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client
*cli
,
2008 TALLOC_CTX
*mem_ctx
,
2011 struct spoolss_CreatePrinterIC r
;
2016 if (DEBUGLEVEL
>= 10) {
2017 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC
, &r
);
2020 status
= cli
->dispatch(cli
,
2023 NDR_SPOOLSS_CREATEPRINTERIC
,
2026 if (!NT_STATUS_IS_OK(status
)) {
2030 if (DEBUGLEVEL
>= 10) {
2031 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC
, &r
);
2034 if (NT_STATUS_IS_ERR(status
)) {
2038 /* Return variables */
2042 *werror
= r
.out
.result
;
2045 return werror_to_ntstatus(r
.out
.result
);
2048 NTSTATUS
rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client
*cli
,
2049 TALLOC_CTX
*mem_ctx
,
2052 struct spoolss_PlayGDIScriptOnPrinterIC r
;
2057 if (DEBUGLEVEL
>= 10) {
2058 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, &r
);
2061 status
= cli
->dispatch(cli
,
2064 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
,
2067 if (!NT_STATUS_IS_OK(status
)) {
2071 if (DEBUGLEVEL
>= 10) {
2072 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, &r
);
2075 if (NT_STATUS_IS_ERR(status
)) {
2079 /* Return variables */
2083 *werror
= r
.out
.result
;
2086 return werror_to_ntstatus(r
.out
.result
);
2089 NTSTATUS
rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client
*cli
,
2090 TALLOC_CTX
*mem_ctx
,
2093 struct spoolss_DeletePrinterIC r
;
2098 if (DEBUGLEVEL
>= 10) {
2099 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC
, &r
);
2102 status
= cli
->dispatch(cli
,
2105 NDR_SPOOLSS_DELETEPRINTERIC
,
2108 if (!NT_STATUS_IS_OK(status
)) {
2112 if (DEBUGLEVEL
>= 10) {
2113 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC
, &r
);
2116 if (NT_STATUS_IS_ERR(status
)) {
2120 /* Return variables */
2124 *werror
= r
.out
.result
;
2127 return werror_to_ntstatus(r
.out
.result
);
2130 NTSTATUS
rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client
*cli
,
2131 TALLOC_CTX
*mem_ctx
,
2134 struct spoolss_AddPrinterConnection r
;
2139 if (DEBUGLEVEL
>= 10) {
2140 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection
, &r
);
2143 status
= cli
->dispatch(cli
,
2146 NDR_SPOOLSS_ADDPRINTERCONNECTION
,
2149 if (!NT_STATUS_IS_OK(status
)) {
2153 if (DEBUGLEVEL
>= 10) {
2154 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection
, &r
);
2157 if (NT_STATUS_IS_ERR(status
)) {
2161 /* Return variables */
2165 *werror
= r
.out
.result
;
2168 return werror_to_ntstatus(r
.out
.result
);
2171 NTSTATUS
rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client
*cli
,
2172 TALLOC_CTX
*mem_ctx
,
2175 struct spoolss_DeletePrinterConnection r
;
2180 if (DEBUGLEVEL
>= 10) {
2181 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection
, &r
);
2184 status
= cli
->dispatch(cli
,
2187 NDR_SPOOLSS_DELETEPRINTERCONNECTION
,
2190 if (!NT_STATUS_IS_OK(status
)) {
2194 if (DEBUGLEVEL
>= 10) {
2195 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection
, &r
);
2198 if (NT_STATUS_IS_ERR(status
)) {
2202 /* Return variables */
2206 *werror
= r
.out
.result
;
2209 return werror_to_ntstatus(r
.out
.result
);
2212 NTSTATUS
rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client
*cli
,
2213 TALLOC_CTX
*mem_ctx
,
2216 struct spoolss_PrinterMessageBox r
;
2221 if (DEBUGLEVEL
>= 10) {
2222 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox
, &r
);
2225 status
= cli
->dispatch(cli
,
2228 NDR_SPOOLSS_PRINTERMESSAGEBOX
,
2231 if (!NT_STATUS_IS_OK(status
)) {
2235 if (DEBUGLEVEL
>= 10) {
2236 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox
, &r
);
2239 if (NT_STATUS_IS_ERR(status
)) {
2243 /* Return variables */
2247 *werror
= r
.out
.result
;
2250 return werror_to_ntstatus(r
.out
.result
);
2253 NTSTATUS
rpccli_spoolss_AddMonitor(struct rpc_pipe_client
*cli
,
2254 TALLOC_CTX
*mem_ctx
,
2257 struct spoolss_AddMonitor r
;
2262 if (DEBUGLEVEL
>= 10) {
2263 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor
, &r
);
2266 status
= cli
->dispatch(cli
,
2269 NDR_SPOOLSS_ADDMONITOR
,
2272 if (!NT_STATUS_IS_OK(status
)) {
2276 if (DEBUGLEVEL
>= 10) {
2277 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor
, &r
);
2280 if (NT_STATUS_IS_ERR(status
)) {
2284 /* Return variables */
2288 *werror
= r
.out
.result
;
2291 return werror_to_ntstatus(r
.out
.result
);
2294 NTSTATUS
rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client
*cli
,
2295 TALLOC_CTX
*mem_ctx
,
2298 struct spoolss_DeleteMonitor r
;
2303 if (DEBUGLEVEL
>= 10) {
2304 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor
, &r
);
2307 status
= cli
->dispatch(cli
,
2310 NDR_SPOOLSS_DELETEMONITOR
,
2313 if (!NT_STATUS_IS_OK(status
)) {
2317 if (DEBUGLEVEL
>= 10) {
2318 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor
, &r
);
2321 if (NT_STATUS_IS_ERR(status
)) {
2325 /* Return variables */
2329 *werror
= r
.out
.result
;
2332 return werror_to_ntstatus(r
.out
.result
);
2335 NTSTATUS
rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client
*cli
,
2336 TALLOC_CTX
*mem_ctx
,
2339 struct spoolss_DeletePrintProcessor r
;
2344 if (DEBUGLEVEL
>= 10) {
2345 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor
, &r
);
2348 status
= cli
->dispatch(cli
,
2351 NDR_SPOOLSS_DELETEPRINTPROCESSOR
,
2354 if (!NT_STATUS_IS_OK(status
)) {
2358 if (DEBUGLEVEL
>= 10) {
2359 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor
, &r
);
2362 if (NT_STATUS_IS_ERR(status
)) {
2366 /* Return variables */
2370 *werror
= r
.out
.result
;
2373 return werror_to_ntstatus(r
.out
.result
);
2376 NTSTATUS
rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client
*cli
,
2377 TALLOC_CTX
*mem_ctx
,
2380 struct spoolss_AddPrintProvidor r
;
2385 if (DEBUGLEVEL
>= 10) {
2386 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor
, &r
);
2389 status
= cli
->dispatch(cli
,
2392 NDR_SPOOLSS_ADDPRINTPROVIDOR
,
2395 if (!NT_STATUS_IS_OK(status
)) {
2399 if (DEBUGLEVEL
>= 10) {
2400 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor
, &r
);
2403 if (NT_STATUS_IS_ERR(status
)) {
2407 /* Return variables */
2411 *werror
= r
.out
.result
;
2414 return werror_to_ntstatus(r
.out
.result
);
2417 NTSTATUS
rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client
*cli
,
2418 TALLOC_CTX
*mem_ctx
,
2421 struct spoolss_DeletePrintProvidor r
;
2426 if (DEBUGLEVEL
>= 10) {
2427 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor
, &r
);
2430 status
= cli
->dispatch(cli
,
2433 NDR_SPOOLSS_DELETEPRINTPROVIDOR
,
2436 if (!NT_STATUS_IS_OK(status
)) {
2440 if (DEBUGLEVEL
>= 10) {
2441 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor
, &r
);
2444 if (NT_STATUS_IS_ERR(status
)) {
2448 /* Return variables */
2452 *werror
= r
.out
.result
;
2455 return werror_to_ntstatus(r
.out
.result
);
2458 NTSTATUS
rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client
*cli
,
2459 TALLOC_CTX
*mem_ctx
,
2460 const char *servername
/* [in] [unique,charset(UTF16)] */,
2461 const char *print_processor_name
/* [in] [unique,charset(UTF16)] */,
2462 uint32_t level
/* [in] */,
2463 DATA_BLOB
*buffer
/* [in] [unique] */,
2464 uint32_t offered
/* [in] */,
2465 uint32_t *count
/* [out] [ref] */,
2466 union spoolss_PrintProcDataTypesInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
2467 uint32_t *needed
/* [out] [ref] */,
2470 struct spoolss_EnumPrintProcDataTypes r
;
2474 r
.in
.servername
= servername
;
2475 r
.in
.print_processor_name
= print_processor_name
;
2477 r
.in
.buffer
= buffer
;
2478 r
.in
.offered
= offered
;
2480 if (DEBUGLEVEL
>= 10) {
2481 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes
, &r
);
2484 status
= cli
->dispatch(cli
,
2487 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
,
2490 if (!NT_STATUS_IS_OK(status
)) {
2494 if (DEBUGLEVEL
>= 10) {
2495 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes
, &r
);
2498 if (NT_STATUS_IS_ERR(status
)) {
2502 /* Return variables */
2503 *count
= *r
.out
.count
;
2504 *info
= *r
.out
.info
;
2505 *needed
= *r
.out
.needed
;
2509 *werror
= r
.out
.result
;
2512 return werror_to_ntstatus(r
.out
.result
);
2515 NTSTATUS
rpccli_spoolss_ResetPrinter(struct rpc_pipe_client
*cli
,
2516 TALLOC_CTX
*mem_ctx
,
2517 struct policy_handle
*handle
/* [in] [ref] */,
2518 const char *data_type
/* [in] [unique,charset(UTF16)] */,
2519 struct spoolss_DevmodeContainer
*devmode_ctr
/* [in] [ref] */,
2522 struct spoolss_ResetPrinter r
;
2526 r
.in
.handle
= handle
;
2527 r
.in
.data_type
= data_type
;
2528 r
.in
.devmode_ctr
= devmode_ctr
;
2530 if (DEBUGLEVEL
>= 10) {
2531 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter
, &r
);
2534 status
= cli
->dispatch(cli
,
2537 NDR_SPOOLSS_RESETPRINTER
,
2540 if (!NT_STATUS_IS_OK(status
)) {
2544 if (DEBUGLEVEL
>= 10) {
2545 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter
, &r
);
2548 if (NT_STATUS_IS_ERR(status
)) {
2552 /* Return variables */
2556 *werror
= r
.out
.result
;
2559 return werror_to_ntstatus(r
.out
.result
);
2562 NTSTATUS
rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client
*cli
,
2563 TALLOC_CTX
*mem_ctx
,
2564 struct policy_handle
*handle
/* [in] [ref] */,
2565 const char *architecture
/* [in] [unique,charset(UTF16)] */,
2566 uint32_t level
/* [in] */,
2567 DATA_BLOB
*buffer
/* [in] [unique] */,
2568 uint32_t offered
/* [in] */,
2569 uint32_t client_major_version
/* [in] */,
2570 uint32_t client_minor_version
/* [in] */,
2571 union spoolss_DriverInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
2572 uint32_t *needed
/* [out] [ref] */,
2573 uint32_t *server_major_version
/* [out] [ref] */,
2574 uint32_t *server_minor_version
/* [out] [ref] */,
2577 struct spoolss_GetPrinterDriver2 r
;
2581 r
.in
.handle
= handle
;
2582 r
.in
.architecture
= architecture
;
2584 r
.in
.buffer
= buffer
;
2585 r
.in
.offered
= offered
;
2586 r
.in
.client_major_version
= client_major_version
;
2587 r
.in
.client_minor_version
= client_minor_version
;
2589 if (DEBUGLEVEL
>= 10) {
2590 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2
, &r
);
2593 status
= cli
->dispatch(cli
,
2596 NDR_SPOOLSS_GETPRINTERDRIVER2
,
2599 if (!NT_STATUS_IS_OK(status
)) {
2603 if (DEBUGLEVEL
>= 10) {
2604 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2
, &r
);
2607 if (NT_STATUS_IS_ERR(status
)) {
2611 /* Return variables */
2612 if (info
&& r
.out
.info
) {
2613 *info
= *r
.out
.info
;
2615 *needed
= *r
.out
.needed
;
2616 *server_major_version
= *r
.out
.server_major_version
;
2617 *server_minor_version
= *r
.out
.server_minor_version
;
2621 *werror
= r
.out
.result
;
2624 return werror_to_ntstatus(r
.out
.result
);
2627 NTSTATUS
rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2628 TALLOC_CTX
*mem_ctx
,
2631 struct spoolss_FindFirstPrinterChangeNotification r
;
2636 if (DEBUGLEVEL
>= 10) {
2637 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification
, &r
);
2640 status
= cli
->dispatch(cli
,
2643 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
,
2646 if (!NT_STATUS_IS_OK(status
)) {
2650 if (DEBUGLEVEL
>= 10) {
2651 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification
, &r
);
2654 if (NT_STATUS_IS_ERR(status
)) {
2658 /* Return variables */
2662 *werror
= r
.out
.result
;
2665 return werror_to_ntstatus(r
.out
.result
);
2668 NTSTATUS
rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2669 TALLOC_CTX
*mem_ctx
,
2672 struct spoolss_FindNextPrinterChangeNotification r
;
2677 if (DEBUGLEVEL
>= 10) {
2678 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification
, &r
);
2681 status
= cli
->dispatch(cli
,
2684 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
,
2687 if (!NT_STATUS_IS_OK(status
)) {
2691 if (DEBUGLEVEL
>= 10) {
2692 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification
, &r
);
2695 if (NT_STATUS_IS_ERR(status
)) {
2699 /* Return variables */
2703 *werror
= r
.out
.result
;
2706 return werror_to_ntstatus(r
.out
.result
);
2709 NTSTATUS
rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client
*cli
,
2710 TALLOC_CTX
*mem_ctx
,
2711 struct policy_handle
*handle
/* [in] [ref] */,
2714 struct spoolss_FindClosePrinterNotify r
;
2718 r
.in
.handle
= handle
;
2720 if (DEBUGLEVEL
>= 10) {
2721 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify
, &r
);
2724 status
= cli
->dispatch(cli
,
2727 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
,
2730 if (!NT_STATUS_IS_OK(status
)) {
2734 if (DEBUGLEVEL
>= 10) {
2735 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify
, &r
);
2738 if (NT_STATUS_IS_ERR(status
)) {
2742 /* Return variables */
2746 *werror
= r
.out
.result
;
2749 return werror_to_ntstatus(r
.out
.result
);
2752 NTSTATUS
rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client
*cli
,
2753 TALLOC_CTX
*mem_ctx
,
2756 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r
;
2761 if (DEBUGLEVEL
>= 10) {
2762 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, &r
);
2765 status
= cli
->dispatch(cli
,
2768 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
,
2771 if (!NT_STATUS_IS_OK(status
)) {
2775 if (DEBUGLEVEL
>= 10) {
2776 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, &r
);
2779 if (NT_STATUS_IS_ERR(status
)) {
2783 /* Return variables */
2787 *werror
= r
.out
.result
;
2790 return werror_to_ntstatus(r
.out
.result
);
2793 NTSTATUS
rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client
*cli
,
2794 TALLOC_CTX
*mem_ctx
,
2795 const char *server_name
/* [in] [charset(UTF16)] */,
2796 uint32_t printer_local
/* [in] */,
2797 enum winreg_Type type
/* [in] */,
2798 uint32_t bufsize
/* [in] [range(0,512)] */,
2799 uint8_t *buffer
/* [in] [unique,size_is(bufsize)] */,
2800 struct policy_handle
*handle
/* [out] [ref] */,
2803 struct spoolss_ReplyOpenPrinter r
;
2807 r
.in
.server_name
= server_name
;
2808 r
.in
.printer_local
= printer_local
;
2810 r
.in
.bufsize
= bufsize
;
2811 r
.in
.buffer
= buffer
;
2813 if (DEBUGLEVEL
>= 10) {
2814 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter
, &r
);
2817 status
= cli
->dispatch(cli
,
2820 NDR_SPOOLSS_REPLYOPENPRINTER
,
2823 if (!NT_STATUS_IS_OK(status
)) {
2827 if (DEBUGLEVEL
>= 10) {
2828 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter
, &r
);
2831 if (NT_STATUS_IS_ERR(status
)) {
2835 /* Return variables */
2836 *handle
= *r
.out
.handle
;
2840 *werror
= r
.out
.result
;
2843 return werror_to_ntstatus(r
.out
.result
);
2846 NTSTATUS
rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client
*cli
,
2847 TALLOC_CTX
*mem_ctx
,
2848 struct policy_handle
*handle
/* [in] [ref] */,
2849 uint32_t flags
/* [in] */,
2850 uint32_t bufsize
/* [in] [range(0,512)] */,
2851 uint8_t *buffer
/* [in] [unique,size_is(bufsize)] */,
2854 struct spoolss_RouterReplyPrinter r
;
2858 r
.in
.handle
= handle
;
2860 r
.in
.bufsize
= bufsize
;
2861 r
.in
.buffer
= buffer
;
2863 if (DEBUGLEVEL
>= 10) {
2864 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter
, &r
);
2867 status
= cli
->dispatch(cli
,
2870 NDR_SPOOLSS_ROUTERREPLYPRINTER
,
2873 if (!NT_STATUS_IS_OK(status
)) {
2877 if (DEBUGLEVEL
>= 10) {
2878 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter
, &r
);
2881 if (NT_STATUS_IS_ERR(status
)) {
2885 /* Return variables */
2889 *werror
= r
.out
.result
;
2892 return werror_to_ntstatus(r
.out
.result
);
2895 NTSTATUS
rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client
*cli
,
2896 TALLOC_CTX
*mem_ctx
,
2897 struct policy_handle
*handle
/* [in,out] [ref] */,
2900 struct spoolss_ReplyClosePrinter r
;
2904 r
.in
.handle
= handle
;
2906 if (DEBUGLEVEL
>= 10) {
2907 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter
, &r
);
2910 status
= cli
->dispatch(cli
,
2913 NDR_SPOOLSS_REPLYCLOSEPRINTER
,
2916 if (!NT_STATUS_IS_OK(status
)) {
2920 if (DEBUGLEVEL
>= 10) {
2921 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter
, &r
);
2924 if (NT_STATUS_IS_ERR(status
)) {
2928 /* Return variables */
2929 *handle
= *r
.out
.handle
;
2933 *werror
= r
.out
.result
;
2936 return werror_to_ntstatus(r
.out
.result
);
2939 NTSTATUS
rpccli_spoolss_AddPortEx(struct rpc_pipe_client
*cli
,
2940 TALLOC_CTX
*mem_ctx
,
2943 struct spoolss_AddPortEx r
;
2948 if (DEBUGLEVEL
>= 10) {
2949 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx
, &r
);
2952 status
= cli
->dispatch(cli
,
2955 NDR_SPOOLSS_ADDPORTEX
,
2958 if (!NT_STATUS_IS_OK(status
)) {
2962 if (DEBUGLEVEL
>= 10) {
2963 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx
, &r
);
2966 if (NT_STATUS_IS_ERR(status
)) {
2970 /* Return variables */
2974 *werror
= r
.out
.result
;
2977 return werror_to_ntstatus(r
.out
.result
);
2980 NTSTATUS
rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2981 TALLOC_CTX
*mem_ctx
,
2984 struct spoolss_RouterFindFirstPrinterChangeNotification r
;
2989 if (DEBUGLEVEL
>= 10) {
2990 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, &r
);
2993 status
= cli
->dispatch(cli
,
2996 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
,
2999 if (!NT_STATUS_IS_OK(status
)) {
3003 if (DEBUGLEVEL
>= 10) {
3004 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, &r
);
3007 if (NT_STATUS_IS_ERR(status
)) {
3011 /* Return variables */
3015 *werror
= r
.out
.result
;
3018 return werror_to_ntstatus(r
.out
.result
);
3021 NTSTATUS
rpccli_spoolss_SpoolerInit(struct rpc_pipe_client
*cli
,
3022 TALLOC_CTX
*mem_ctx
,
3025 struct spoolss_SpoolerInit r
;
3030 if (DEBUGLEVEL
>= 10) {
3031 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit
, &r
);
3034 status
= cli
->dispatch(cli
,
3037 NDR_SPOOLSS_SPOOLERINIT
,
3040 if (!NT_STATUS_IS_OK(status
)) {
3044 if (DEBUGLEVEL
>= 10) {
3045 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit
, &r
);
3048 if (NT_STATUS_IS_ERR(status
)) {
3052 /* Return variables */
3056 *werror
= r
.out
.result
;
3059 return werror_to_ntstatus(r
.out
.result
);
3062 NTSTATUS
rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client
*cli
,
3063 TALLOC_CTX
*mem_ctx
,
3066 struct spoolss_ResetPrinterEx r
;
3071 if (DEBUGLEVEL
>= 10) {
3072 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx
, &r
);
3075 status
= cli
->dispatch(cli
,
3078 NDR_SPOOLSS_RESETPRINTEREX
,
3081 if (!NT_STATUS_IS_OK(status
)) {
3085 if (DEBUGLEVEL
>= 10) {
3086 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx
, &r
);
3089 if (NT_STATUS_IS_ERR(status
)) {
3093 /* Return variables */
3097 *werror
= r
.out
.result
;
3100 return werror_to_ntstatus(r
.out
.result
);
3103 NTSTATUS
rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client
*cli
,
3104 TALLOC_CTX
*mem_ctx
,
3105 struct policy_handle
*handle
/* [in] [ref] */,
3106 uint32_t flags
/* [in] */,
3107 uint32_t options
/* [in] */,
3108 const char *local_machine
/* [in] [unique,charset(UTF16)] */,
3109 uint32_t printer_local
/* [in] */,
3110 struct spoolss_NotifyOption
*notify_options
/* [in] [unique] */,
3113 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r
;
3117 r
.in
.handle
= handle
;
3119 r
.in
.options
= options
;
3120 r
.in
.local_machine
= local_machine
;
3121 r
.in
.printer_local
= printer_local
;
3122 r
.in
.notify_options
= notify_options
;
3124 if (DEBUGLEVEL
>= 10) {
3125 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, &r
);
3128 status
= cli
->dispatch(cli
,
3131 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
,
3134 if (!NT_STATUS_IS_OK(status
)) {
3138 if (DEBUGLEVEL
>= 10) {
3139 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, &r
);
3142 if (NT_STATUS_IS_ERR(status
)) {
3146 /* Return variables */
3150 *werror
= r
.out
.result
;
3153 return werror_to_ntstatus(r
.out
.result
);
3156 NTSTATUS
rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client
*cli
,
3157 TALLOC_CTX
*mem_ctx
,
3158 struct policy_handle
*handle
/* [in] [ref] */,
3159 uint32_t color
/* [in] */,
3160 uint32_t flags
/* [in] */,
3161 uint32_t *reply_result
/* [out] [ref] */,
3162 uint32_t reply_type
/* [in] */,
3163 union spoolss_ReplyPrinterInfo info
/* [in] [switch_is(reply_type)] */,
3166 struct spoolss_RouterReplyPrinterEx r
;
3170 r
.in
.handle
= handle
;
3173 r
.in
.reply_type
= reply_type
;
3176 if (DEBUGLEVEL
>= 10) {
3177 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx
, &r
);
3180 status
= cli
->dispatch(cli
,
3183 NDR_SPOOLSS_ROUTERREPLYPRINTEREX
,
3186 if (!NT_STATUS_IS_OK(status
)) {
3190 if (DEBUGLEVEL
>= 10) {
3191 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx
, &r
);
3194 if (NT_STATUS_IS_ERR(status
)) {
3198 /* Return variables */
3199 *reply_result
= *r
.out
.reply_result
;
3203 *werror
= r
.out
.result
;
3206 return werror_to_ntstatus(r
.out
.result
);
3209 NTSTATUS
rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client
*cli
,
3210 TALLOC_CTX
*mem_ctx
,
3211 struct policy_handle
*handle
/* [in] [ref] */,
3212 uint32_t change_low
/* [in] */,
3213 struct spoolss_NotifyOption
*options
/* [in] [unique] */,
3214 struct spoolss_NotifyInfo
**info
/* [out] [ref] */,
3217 struct spoolss_RouterRefreshPrinterChangeNotify r
;
3221 r
.in
.handle
= handle
;
3222 r
.in
.change_low
= change_low
;
3223 r
.in
.options
= options
;
3225 if (DEBUGLEVEL
>= 10) {
3226 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, &r
);
3229 status
= cli
->dispatch(cli
,
3232 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
,
3235 if (!NT_STATUS_IS_OK(status
)) {
3239 if (DEBUGLEVEL
>= 10) {
3240 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, &r
);
3243 if (NT_STATUS_IS_ERR(status
)) {
3247 /* Return variables */
3248 *info
= *r
.out
.info
;
3252 *werror
= r
.out
.result
;
3255 return werror_to_ntstatus(r
.out
.result
);
3258 NTSTATUS
rpccli_spoolss_44(struct rpc_pipe_client
*cli
,
3259 TALLOC_CTX
*mem_ctx
,
3262 struct spoolss_44 r
;
3267 if (DEBUGLEVEL
>= 10) {
3268 NDR_PRINT_IN_DEBUG(spoolss_44
, &r
);
3271 status
= cli
->dispatch(cli
,
3277 if (!NT_STATUS_IS_OK(status
)) {
3281 if (DEBUGLEVEL
>= 10) {
3282 NDR_PRINT_OUT_DEBUG(spoolss_44
, &r
);
3285 if (NT_STATUS_IS_ERR(status
)) {
3289 /* Return variables */
3293 *werror
= r
.out
.result
;
3296 return werror_to_ntstatus(r
.out
.result
);
3299 NTSTATUS
rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client
*cli
,
3300 TALLOC_CTX
*mem_ctx
,
3301 const char *printername
/* [in] [unique,charset(UTF16)] */,
3302 const char *datatype
/* [in] [unique,charset(UTF16)] */,
3303 struct spoolss_DevmodeContainer devmode_ctr
/* [in] */,
3304 uint32_t access_mask
/* [in] */,
3305 uint32_t level
/* [in] */,
3306 union spoolss_UserLevel userlevel
/* [in] [switch_is(level)] */,
3307 struct policy_handle
*handle
/* [out] [ref] */,
3310 struct spoolss_OpenPrinterEx r
;
3314 r
.in
.printername
= printername
;
3315 r
.in
.datatype
= datatype
;
3316 r
.in
.devmode_ctr
= devmode_ctr
;
3317 r
.in
.access_mask
= access_mask
;
3319 r
.in
.userlevel
= userlevel
;
3321 if (DEBUGLEVEL
>= 10) {
3322 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx
, &r
);
3325 status
= cli
->dispatch(cli
,
3328 NDR_SPOOLSS_OPENPRINTEREX
,
3331 if (!NT_STATUS_IS_OK(status
)) {
3335 if (DEBUGLEVEL
>= 10) {
3336 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx
, &r
);
3339 if (NT_STATUS_IS_ERR(status
)) {
3343 /* Return variables */
3344 *handle
= *r
.out
.handle
;
3348 *werror
= r
.out
.result
;
3351 return werror_to_ntstatus(r
.out
.result
);
3354 NTSTATUS
rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client
*cli
,
3355 TALLOC_CTX
*mem_ctx
,
3356 const char *server
/* [in] [unique,charset(UTF16)] */,
3357 struct spoolss_SetPrinterInfoCtr
*info_ctr
/* [in] [ref] */,
3358 struct spoolss_DevmodeContainer
*devmode_ctr
/* [in] [ref] */,
3359 struct sec_desc_buf
*secdesc_ctr
/* [in] [ref] */,
3360 struct spoolss_UserLevelCtr
*userlevel_ctr
/* [in] [ref] */,
3361 struct policy_handle
*handle
/* [out] [ref] */,
3364 struct spoolss_AddPrinterEx r
;
3368 r
.in
.server
= server
;
3369 r
.in
.info_ctr
= info_ctr
;
3370 r
.in
.devmode_ctr
= devmode_ctr
;
3371 r
.in
.secdesc_ctr
= secdesc_ctr
;
3372 r
.in
.userlevel_ctr
= userlevel_ctr
;
3374 if (DEBUGLEVEL
>= 10) {
3375 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx
, &r
);
3378 status
= cli
->dispatch(cli
,
3381 NDR_SPOOLSS_ADDPRINTEREX
,
3384 if (!NT_STATUS_IS_OK(status
)) {
3388 if (DEBUGLEVEL
>= 10) {
3389 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx
, &r
);
3392 if (NT_STATUS_IS_ERR(status
)) {
3396 /* Return variables */
3397 *handle
= *r
.out
.handle
;
3401 *werror
= r
.out
.result
;
3404 return werror_to_ntstatus(r
.out
.result
);
3407 NTSTATUS
rpccli_spoolss_47(struct rpc_pipe_client
*cli
,
3408 TALLOC_CTX
*mem_ctx
,
3411 struct spoolss_47 r
;
3416 if (DEBUGLEVEL
>= 10) {
3417 NDR_PRINT_IN_DEBUG(spoolss_47
, &r
);
3420 status
= cli
->dispatch(cli
,
3426 if (!NT_STATUS_IS_OK(status
)) {
3430 if (DEBUGLEVEL
>= 10) {
3431 NDR_PRINT_OUT_DEBUG(spoolss_47
, &r
);
3434 if (NT_STATUS_IS_ERR(status
)) {
3438 /* Return variables */
3442 *werror
= r
.out
.result
;
3445 return werror_to_ntstatus(r
.out
.result
);
3448 NTSTATUS
rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client
*cli
,
3449 TALLOC_CTX
*mem_ctx
,
3450 struct policy_handle
*handle
/* [in] [ref] */,
3451 uint32_t enum_index
/* [in] */,
3452 const char *value_name
/* [out] [charset(UTF16),size_is(value_offered/2)] */,
3453 uint32_t value_offered
/* [in] */,
3454 uint32_t *value_needed
/* [out] [ref] */,
3455 enum winreg_Type
*type
/* [out] [ref] */,
3456 uint8_t *data
/* [out] [ref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(data_offered)] */,
3457 uint32_t data_offered
/* [in] */,
3458 uint32_t *data_needed
/* [out] [ref] */,
3461 struct spoolss_EnumPrinterData r
;
3465 r
.in
.handle
= handle
;
3466 r
.in
.enum_index
= enum_index
;
3467 r
.in
.value_offered
= value_offered
;
3468 r
.in
.data_offered
= data_offered
;
3470 if (DEBUGLEVEL
>= 10) {
3471 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData
, &r
);
3474 status
= cli
->dispatch(cli
,
3477 NDR_SPOOLSS_ENUMPRINTERDATA
,
3480 if (!NT_STATUS_IS_OK(status
)) {
3484 if (DEBUGLEVEL
>= 10) {
3485 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData
, &r
);
3488 if (NT_STATUS_IS_ERR(status
)) {
3492 /* Return variables */
3493 memcpy(CONST_DISCARD(char *, value_name
), r
.out
.value_name
, r
.in
.value_offered
/ 2 * sizeof(*value_name
));
3494 *value_needed
= *r
.out
.value_needed
;
3495 *type
= *r
.out
.type
;
3496 memcpy(data
, r
.out
.data
, r
.in
.data_offered
* sizeof(*data
));
3497 *data_needed
= *r
.out
.data_needed
;
3501 *werror
= r
.out
.result
;
3504 return werror_to_ntstatus(r
.out
.result
);
3507 NTSTATUS
rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client
*cli
,
3508 TALLOC_CTX
*mem_ctx
,
3509 struct policy_handle
*handle
/* [in] [ref] */,
3510 const char *value_name
/* [in] [charset(UTF16)] */,
3513 struct spoolss_DeletePrinterData r
;
3517 r
.in
.handle
= handle
;
3518 r
.in
.value_name
= value_name
;
3520 if (DEBUGLEVEL
>= 10) {
3521 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData
, &r
);
3524 status
= cli
->dispatch(cli
,
3527 NDR_SPOOLSS_DELETEPRINTERDATA
,
3530 if (!NT_STATUS_IS_OK(status
)) {
3534 if (DEBUGLEVEL
>= 10) {
3535 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData
, &r
);
3538 if (NT_STATUS_IS_ERR(status
)) {
3542 /* Return variables */
3546 *werror
= r
.out
.result
;
3549 return werror_to_ntstatus(r
.out
.result
);
3552 NTSTATUS
rpccli_spoolss_4a(struct rpc_pipe_client
*cli
,
3553 TALLOC_CTX
*mem_ctx
,
3556 struct spoolss_4a r
;
3561 if (DEBUGLEVEL
>= 10) {
3562 NDR_PRINT_IN_DEBUG(spoolss_4a
, &r
);
3565 status
= cli
->dispatch(cli
,
3571 if (!NT_STATUS_IS_OK(status
)) {
3575 if (DEBUGLEVEL
>= 10) {
3576 NDR_PRINT_OUT_DEBUG(spoolss_4a
, &r
);
3579 if (NT_STATUS_IS_ERR(status
)) {
3583 /* Return variables */
3587 *werror
= r
.out
.result
;
3590 return werror_to_ntstatus(r
.out
.result
);
3593 NTSTATUS
rpccli_spoolss_4b(struct rpc_pipe_client
*cli
,
3594 TALLOC_CTX
*mem_ctx
,
3597 struct spoolss_4b r
;
3602 if (DEBUGLEVEL
>= 10) {
3603 NDR_PRINT_IN_DEBUG(spoolss_4b
, &r
);
3606 status
= cli
->dispatch(cli
,
3612 if (!NT_STATUS_IS_OK(status
)) {
3616 if (DEBUGLEVEL
>= 10) {
3617 NDR_PRINT_OUT_DEBUG(spoolss_4b
, &r
);
3620 if (NT_STATUS_IS_ERR(status
)) {
3624 /* Return variables */
3628 *werror
= r
.out
.result
;
3631 return werror_to_ntstatus(r
.out
.result
);
3634 NTSTATUS
rpccli_spoolss_4c(struct rpc_pipe_client
*cli
,
3635 TALLOC_CTX
*mem_ctx
,
3638 struct spoolss_4c r
;
3643 if (DEBUGLEVEL
>= 10) {
3644 NDR_PRINT_IN_DEBUG(spoolss_4c
, &r
);
3647 status
= cli
->dispatch(cli
,
3653 if (!NT_STATUS_IS_OK(status
)) {
3657 if (DEBUGLEVEL
>= 10) {
3658 NDR_PRINT_OUT_DEBUG(spoolss_4c
, &r
);
3661 if (NT_STATUS_IS_ERR(status
)) {
3665 /* Return variables */
3669 *werror
= r
.out
.result
;
3672 return werror_to_ntstatus(r
.out
.result
);
3675 NTSTATUS
rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client
*cli
,
3676 TALLOC_CTX
*mem_ctx
,
3677 struct policy_handle
*handle
/* [in] [ref] */,
3678 const char *key_name
/* [in] [charset(UTF16)] */,
3679 const char *value_name
/* [in] [charset(UTF16)] */,
3680 enum winreg_Type type
/* [in] */,
3681 uint8_t *buffer
/* [in] [ref,size_is(offered)] */,
3682 uint32_t offered
/* [in] */,
3685 struct spoolss_SetPrinterDataEx r
;
3689 r
.in
.handle
= handle
;
3690 r
.in
.key_name
= key_name
;
3691 r
.in
.value_name
= value_name
;
3693 r
.in
.buffer
= buffer
;
3694 r
.in
.offered
= offered
;
3696 if (DEBUGLEVEL
>= 10) {
3697 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx
, &r
);
3700 status
= cli
->dispatch(cli
,
3703 NDR_SPOOLSS_SETPRINTERDATAEX
,
3706 if (!NT_STATUS_IS_OK(status
)) {
3710 if (DEBUGLEVEL
>= 10) {
3711 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx
, &r
);
3714 if (NT_STATUS_IS_ERR(status
)) {
3718 /* Return variables */
3722 *werror
= r
.out
.result
;
3725 return werror_to_ntstatus(r
.out
.result
);
3728 NTSTATUS
rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client
*cli
,
3729 TALLOC_CTX
*mem_ctx
,
3730 struct policy_handle
*handle
/* [in] [ref] */,
3731 const char *key_name
/* [in] [charset(UTF16)] */,
3732 const char *value_name
/* [in] [charset(UTF16)] */,
3733 enum winreg_Type
*type
/* [out] [ref] */,
3734 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
3735 uint32_t offered
/* [in] */,
3736 uint32_t *needed
/* [out] [ref] */,
3739 struct spoolss_GetPrinterDataEx r
;
3743 r
.in
.handle
= handle
;
3744 r
.in
.key_name
= key_name
;
3745 r
.in
.value_name
= value_name
;
3746 r
.in
.offered
= offered
;
3748 if (DEBUGLEVEL
>= 10) {
3749 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx
, &r
);
3752 status
= cli
->dispatch(cli
,
3755 NDR_SPOOLSS_GETPRINTERDATAEX
,
3758 if (!NT_STATUS_IS_OK(status
)) {
3762 if (DEBUGLEVEL
>= 10) {
3763 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx
, &r
);
3766 if (NT_STATUS_IS_ERR(status
)) {
3770 /* Return variables */
3771 *type
= *r
.out
.type
;
3772 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
3773 *needed
= *r
.out
.needed
;
3777 *werror
= r
.out
.result
;
3780 return werror_to_ntstatus(r
.out
.result
);
3783 NTSTATUS
rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client
*cli
,
3784 TALLOC_CTX
*mem_ctx
,
3785 struct policy_handle
*handle
/* [in] [ref] */,
3786 const char *key_name
/* [in] [charset(UTF16)] */,
3787 uint32_t offered
/* [in] */,
3788 uint32_t *count
/* [out] [ref] */,
3789 struct spoolss_PrinterEnumValues
**info
/* [out] [ref,size_is(,*count)] */,
3790 uint32_t *needed
/* [out] [ref] */,
3793 struct spoolss_EnumPrinterDataEx r
;
3797 r
.in
.handle
= handle
;
3798 r
.in
.key_name
= key_name
;
3799 r
.in
.offered
= offered
;
3801 if (DEBUGLEVEL
>= 10) {
3802 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx
, &r
);
3805 status
= cli
->dispatch(cli
,
3808 NDR_SPOOLSS_ENUMPRINTERDATAEX
,
3811 if (!NT_STATUS_IS_OK(status
)) {
3815 if (DEBUGLEVEL
>= 10) {
3816 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx
, &r
);
3819 if (NT_STATUS_IS_ERR(status
)) {
3823 /* Return variables */
3824 *count
= *r
.out
.count
;
3825 *info
= *r
.out
.info
;
3826 *needed
= *r
.out
.needed
;
3830 *werror
= r
.out
.result
;
3833 return werror_to_ntstatus(r
.out
.result
);
3836 NTSTATUS
rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client
*cli
,
3837 TALLOC_CTX
*mem_ctx
,
3838 struct policy_handle
*handle
/* [in] [ref] */,
3839 const char *key_name
/* [in] [charset(UTF16)] */,
3840 const char ** *key_buffer
/* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
3841 uint32_t offered
/* [in] */,
3842 uint32_t *needed
/* [out] [ref] */,
3845 struct spoolss_EnumPrinterKey r
;
3849 r
.in
.handle
= handle
;
3850 r
.in
.key_name
= key_name
;
3851 r
.in
.offered
= offered
;
3853 if (DEBUGLEVEL
>= 10) {
3854 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey
, &r
);
3857 status
= cli
->dispatch(cli
,
3860 NDR_SPOOLSS_ENUMPRINTERKEY
,
3863 if (!NT_STATUS_IS_OK(status
)) {
3867 if (DEBUGLEVEL
>= 10) {
3868 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey
, &r
);
3871 if (NT_STATUS_IS_ERR(status
)) {
3875 /* Return variables */
3876 *key_buffer
= *r
.out
.key_buffer
;
3877 *needed
= *r
.out
.needed
;
3881 *werror
= r
.out
.result
;
3884 return werror_to_ntstatus(r
.out
.result
);
3887 NTSTATUS
rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client
*cli
,
3888 TALLOC_CTX
*mem_ctx
,
3889 struct policy_handle
*handle
/* [in] [ref] */,
3890 const char *key_name
/* [in] [charset(UTF16)] */,
3891 const char *value_name
/* [in] [charset(UTF16)] */,
3894 struct spoolss_DeletePrinterDataEx r
;
3898 r
.in
.handle
= handle
;
3899 r
.in
.key_name
= key_name
;
3900 r
.in
.value_name
= value_name
;
3902 if (DEBUGLEVEL
>= 10) {
3903 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx
, &r
);
3906 status
= cli
->dispatch(cli
,
3909 NDR_SPOOLSS_DELETEPRINTERDATAEX
,
3912 if (!NT_STATUS_IS_OK(status
)) {
3916 if (DEBUGLEVEL
>= 10) {
3917 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx
, &r
);
3920 if (NT_STATUS_IS_ERR(status
)) {
3924 /* Return variables */
3928 *werror
= r
.out
.result
;
3931 return werror_to_ntstatus(r
.out
.result
);
3934 NTSTATUS
rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client
*cli
,
3935 TALLOC_CTX
*mem_ctx
,
3936 struct policy_handle
*handle
/* [in] [ref] */,
3937 const char *key_name
/* [in] [charset(UTF16)] */,
3940 struct spoolss_DeletePrinterKey r
;
3944 r
.in
.handle
= handle
;
3945 r
.in
.key_name
= key_name
;
3947 if (DEBUGLEVEL
>= 10) {
3948 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey
, &r
);
3951 status
= cli
->dispatch(cli
,
3954 NDR_SPOOLSS_DELETEPRINTERKEY
,
3957 if (!NT_STATUS_IS_OK(status
)) {
3961 if (DEBUGLEVEL
>= 10) {
3962 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey
, &r
);
3965 if (NT_STATUS_IS_ERR(status
)) {
3969 /* Return variables */
3973 *werror
= r
.out
.result
;
3976 return werror_to_ntstatus(r
.out
.result
);
3979 NTSTATUS
rpccli_spoolss_53(struct rpc_pipe_client
*cli
,
3980 TALLOC_CTX
*mem_ctx
,
3983 struct spoolss_53 r
;
3988 if (DEBUGLEVEL
>= 10) {
3989 NDR_PRINT_IN_DEBUG(spoolss_53
, &r
);
3992 status
= cli
->dispatch(cli
,
3998 if (!NT_STATUS_IS_OK(status
)) {
4002 if (DEBUGLEVEL
>= 10) {
4003 NDR_PRINT_OUT_DEBUG(spoolss_53
, &r
);
4006 if (NT_STATUS_IS_ERR(status
)) {
4010 /* Return variables */
4014 *werror
= r
.out
.result
;
4017 return werror_to_ntstatus(r
.out
.result
);
4020 NTSTATUS
rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client
*cli
,
4021 TALLOC_CTX
*mem_ctx
,
4022 const char *server
/* [in] [unique,charset(UTF16)] */,
4023 const char *architecture
/* [in] [charset(UTF16)] */,
4024 const char *driver
/* [in] [charset(UTF16)] */,
4025 uint32_t delete_flags
/* [in] */,
4026 uint32_t version
/* [in] */,
4029 struct spoolss_DeletePrinterDriverEx r
;
4033 r
.in
.server
= server
;
4034 r
.in
.architecture
= architecture
;
4035 r
.in
.driver
= driver
;
4036 r
.in
.delete_flags
= delete_flags
;
4037 r
.in
.version
= version
;
4039 if (DEBUGLEVEL
>= 10) {
4040 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx
, &r
);
4043 status
= cli
->dispatch(cli
,
4046 NDR_SPOOLSS_DELETEPRINTERDRIVEREX
,
4049 if (!NT_STATUS_IS_OK(status
)) {
4053 if (DEBUGLEVEL
>= 10) {
4054 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx
, &r
);
4057 if (NT_STATUS_IS_ERR(status
)) {
4061 /* Return variables */
4065 *werror
= r
.out
.result
;
4068 return werror_to_ntstatus(r
.out
.result
);
4071 NTSTATUS
rpccli_spoolss_55(struct rpc_pipe_client
*cli
,
4072 TALLOC_CTX
*mem_ctx
,
4075 struct spoolss_55 r
;
4080 if (DEBUGLEVEL
>= 10) {
4081 NDR_PRINT_IN_DEBUG(spoolss_55
, &r
);
4084 status
= cli
->dispatch(cli
,
4090 if (!NT_STATUS_IS_OK(status
)) {
4094 if (DEBUGLEVEL
>= 10) {
4095 NDR_PRINT_OUT_DEBUG(spoolss_55
, &r
);
4098 if (NT_STATUS_IS_ERR(status
)) {
4102 /* Return variables */
4106 *werror
= r
.out
.result
;
4109 return werror_to_ntstatus(r
.out
.result
);
4112 NTSTATUS
rpccli_spoolss_56(struct rpc_pipe_client
*cli
,
4113 TALLOC_CTX
*mem_ctx
,
4116 struct spoolss_56 r
;
4121 if (DEBUGLEVEL
>= 10) {
4122 NDR_PRINT_IN_DEBUG(spoolss_56
, &r
);
4125 status
= cli
->dispatch(cli
,
4131 if (!NT_STATUS_IS_OK(status
)) {
4135 if (DEBUGLEVEL
>= 10) {
4136 NDR_PRINT_OUT_DEBUG(spoolss_56
, &r
);
4139 if (NT_STATUS_IS_ERR(status
)) {
4143 /* Return variables */
4147 *werror
= r
.out
.result
;
4150 return werror_to_ntstatus(r
.out
.result
);
4153 NTSTATUS
rpccli_spoolss_57(struct rpc_pipe_client
*cli
,
4154 TALLOC_CTX
*mem_ctx
,
4157 struct spoolss_57 r
;
4162 if (DEBUGLEVEL
>= 10) {
4163 NDR_PRINT_IN_DEBUG(spoolss_57
, &r
);
4166 status
= cli
->dispatch(cli
,
4172 if (!NT_STATUS_IS_OK(status
)) {
4176 if (DEBUGLEVEL
>= 10) {
4177 NDR_PRINT_OUT_DEBUG(spoolss_57
, &r
);
4180 if (NT_STATUS_IS_ERR(status
)) {
4184 /* Return variables */
4188 *werror
= r
.out
.result
;
4191 return werror_to_ntstatus(r
.out
.result
);
4194 NTSTATUS
rpccli_spoolss_XcvData(struct rpc_pipe_client
*cli
,
4195 TALLOC_CTX
*mem_ctx
,
4196 struct policy_handle
*handle
/* [in] [ref] */,
4197 const char *function_name
/* [in] [charset(UTF16)] */,
4198 DATA_BLOB in_data
/* [in] */,
4199 uint32_t _in_data_length
/* [in] [value(r->in.in_data.length)] */,
4200 uint8_t *out_data
/* [out] [ref,size_is(out_data_size)] */,
4201 uint32_t out_data_size
/* [in] */,
4202 uint32_t *needed
/* [out] [ref] */,
4203 uint32_t *status_code
/* [in,out] [ref] */,
4206 struct spoolss_XcvData r
;
4210 r
.in
.handle
= handle
;
4211 r
.in
.function_name
= function_name
;
4212 r
.in
.in_data
= in_data
;
4213 r
.in
._in_data_length
= _in_data_length
;
4214 r
.in
.out_data_size
= out_data_size
;
4215 r
.in
.status_code
= status_code
;
4217 if (DEBUGLEVEL
>= 10) {
4218 NDR_PRINT_IN_DEBUG(spoolss_XcvData
, &r
);
4221 status
= cli
->dispatch(cli
,
4224 NDR_SPOOLSS_XCVDATA
,
4227 if (!NT_STATUS_IS_OK(status
)) {
4231 if (DEBUGLEVEL
>= 10) {
4232 NDR_PRINT_OUT_DEBUG(spoolss_XcvData
, &r
);
4235 if (NT_STATUS_IS_ERR(status
)) {
4239 /* Return variables */
4240 memcpy(out_data
, r
.out
.out_data
, r
.in
.out_data_size
* sizeof(*out_data
));
4241 *needed
= *r
.out
.needed
;
4242 *status_code
= *r
.out
.status_code
;
4246 *werror
= r
.out
.result
;
4249 return werror_to_ntstatus(r
.out
.result
);
4252 NTSTATUS
rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client
*cli
,
4253 TALLOC_CTX
*mem_ctx
,
4254 const char *servername
/* [in] [unique,charset(UTF16)] */,
4255 struct spoolss_AddDriverInfoCtr
*info_ctr
/* [in] [ref] */,
4256 uint32_t flags
/* [in] */,
4259 struct spoolss_AddPrinterDriverEx r
;
4263 r
.in
.servername
= servername
;
4264 r
.in
.info_ctr
= info_ctr
;
4267 if (DEBUGLEVEL
>= 10) {
4268 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx
, &r
);
4271 status
= cli
->dispatch(cli
,
4274 NDR_SPOOLSS_ADDPRINTERDRIVEREX
,
4277 if (!NT_STATUS_IS_OK(status
)) {
4281 if (DEBUGLEVEL
>= 10) {
4282 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx
, &r
);
4285 if (NT_STATUS_IS_ERR(status
)) {
4289 /* Return variables */
4293 *werror
= r
.out
.result
;
4296 return werror_to_ntstatus(r
.out
.result
);
4299 NTSTATUS
rpccli_spoolss_5a(struct rpc_pipe_client
*cli
,
4300 TALLOC_CTX
*mem_ctx
,
4303 struct spoolss_5a r
;
4308 if (DEBUGLEVEL
>= 10) {
4309 NDR_PRINT_IN_DEBUG(spoolss_5a
, &r
);
4312 status
= cli
->dispatch(cli
,
4318 if (!NT_STATUS_IS_OK(status
)) {
4322 if (DEBUGLEVEL
>= 10) {
4323 NDR_PRINT_OUT_DEBUG(spoolss_5a
, &r
);
4326 if (NT_STATUS_IS_ERR(status
)) {
4330 /* Return variables */
4334 *werror
= r
.out
.result
;
4337 return werror_to_ntstatus(r
.out
.result
);
4340 NTSTATUS
rpccli_spoolss_5b(struct rpc_pipe_client
*cli
,
4341 TALLOC_CTX
*mem_ctx
,
4344 struct spoolss_5b r
;
4349 if (DEBUGLEVEL
>= 10) {
4350 NDR_PRINT_IN_DEBUG(spoolss_5b
, &r
);
4353 status
= cli
->dispatch(cli
,
4359 if (!NT_STATUS_IS_OK(status
)) {
4363 if (DEBUGLEVEL
>= 10) {
4364 NDR_PRINT_OUT_DEBUG(spoolss_5b
, &r
);
4367 if (NT_STATUS_IS_ERR(status
)) {
4371 /* Return variables */
4375 *werror
= r
.out
.result
;
4378 return werror_to_ntstatus(r
.out
.result
);
4381 NTSTATUS
rpccli_spoolss_5c(struct rpc_pipe_client
*cli
,
4382 TALLOC_CTX
*mem_ctx
,
4385 struct spoolss_5c r
;
4390 if (DEBUGLEVEL
>= 10) {
4391 NDR_PRINT_IN_DEBUG(spoolss_5c
, &r
);
4394 status
= cli
->dispatch(cli
,
4400 if (!NT_STATUS_IS_OK(status
)) {
4404 if (DEBUGLEVEL
>= 10) {
4405 NDR_PRINT_OUT_DEBUG(spoolss_5c
, &r
);
4408 if (NT_STATUS_IS_ERR(status
)) {
4412 /* Return variables */
4416 *werror
= r
.out
.result
;
4419 return werror_to_ntstatus(r
.out
.result
);
4422 NTSTATUS
rpccli_spoolss_5d(struct rpc_pipe_client
*cli
,
4423 TALLOC_CTX
*mem_ctx
,
4426 struct spoolss_5d r
;
4431 if (DEBUGLEVEL
>= 10) {
4432 NDR_PRINT_IN_DEBUG(spoolss_5d
, &r
);
4435 status
= cli
->dispatch(cli
,
4441 if (!NT_STATUS_IS_OK(status
)) {
4445 if (DEBUGLEVEL
>= 10) {
4446 NDR_PRINT_OUT_DEBUG(spoolss_5d
, &r
);
4449 if (NT_STATUS_IS_ERR(status
)) {
4453 /* Return variables */
4457 *werror
= r
.out
.result
;
4460 return werror_to_ntstatus(r
.out
.result
);
4463 NTSTATUS
rpccli_spoolss_5e(struct rpc_pipe_client
*cli
,
4464 TALLOC_CTX
*mem_ctx
,
4467 struct spoolss_5e r
;
4472 if (DEBUGLEVEL
>= 10) {
4473 NDR_PRINT_IN_DEBUG(spoolss_5e
, &r
);
4476 status
= cli
->dispatch(cli
,
4482 if (!NT_STATUS_IS_OK(status
)) {
4486 if (DEBUGLEVEL
>= 10) {
4487 NDR_PRINT_OUT_DEBUG(spoolss_5e
, &r
);
4490 if (NT_STATUS_IS_ERR(status
)) {
4494 /* Return variables */
4498 *werror
= r
.out
.result
;
4501 return werror_to_ntstatus(r
.out
.result
);
4504 NTSTATUS
rpccli_spoolss_5f(struct rpc_pipe_client
*cli
,
4505 TALLOC_CTX
*mem_ctx
,
4508 struct spoolss_5f r
;
4513 if (DEBUGLEVEL
>= 10) {
4514 NDR_PRINT_IN_DEBUG(spoolss_5f
, &r
);
4517 status
= cli
->dispatch(cli
,
4523 if (!NT_STATUS_IS_OK(status
)) {
4527 if (DEBUGLEVEL
>= 10) {
4528 NDR_PRINT_OUT_DEBUG(spoolss_5f
, &r
);
4531 if (NT_STATUS_IS_ERR(status
)) {
4535 /* Return variables */
4539 *werror
= r
.out
.result
;
4542 return werror_to_ntstatus(r
.out
.result
);