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
,
286 struct spoolss_AddPrinter r
;
291 if (DEBUGLEVEL
>= 10) {
292 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter
, &r
);
295 status
= cli
->dispatch(cli
,
298 NDR_SPOOLSS_ADDPRINTER
,
301 if (!NT_STATUS_IS_OK(status
)) {
305 if (DEBUGLEVEL
>= 10) {
306 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter
, &r
);
309 if (NT_STATUS_IS_ERR(status
)) {
313 /* Return variables */
317 *werror
= r
.out
.result
;
320 return werror_to_ntstatus(r
.out
.result
);
323 NTSTATUS
rpccli_spoolss_DeletePrinter(struct rpc_pipe_client
*cli
,
325 struct policy_handle
*handle
/* [in] [ref] */,
328 struct spoolss_DeletePrinter r
;
332 r
.in
.handle
= handle
;
334 if (DEBUGLEVEL
>= 10) {
335 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter
, &r
);
338 status
= cli
->dispatch(cli
,
341 NDR_SPOOLSS_DELETEPRINTER
,
344 if (!NT_STATUS_IS_OK(status
)) {
348 if (DEBUGLEVEL
>= 10) {
349 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter
, &r
);
352 if (NT_STATUS_IS_ERR(status
)) {
356 /* Return variables */
360 *werror
= r
.out
.result
;
363 return werror_to_ntstatus(r
.out
.result
);
366 NTSTATUS
rpccli_spoolss_SetPrinter(struct rpc_pipe_client
*cli
,
368 struct policy_handle
*handle
/* [in] [ref] */,
369 struct spoolss_SetPrinterInfoCtr
*info_ctr
/* [in] [ref] */,
370 struct spoolss_DevmodeContainer
*devmode_ctr
/* [in] [ref] */,
371 struct sec_desc_buf
*secdesc_ctr
/* [in] [ref] */,
372 enum spoolss_PrinterControl command
/* [in] */,
375 struct spoolss_SetPrinter r
;
379 r
.in
.handle
= handle
;
380 r
.in
.info_ctr
= info_ctr
;
381 r
.in
.devmode_ctr
= devmode_ctr
;
382 r
.in
.secdesc_ctr
= secdesc_ctr
;
383 r
.in
.command
= command
;
385 if (DEBUGLEVEL
>= 10) {
386 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter
, &r
);
389 status
= cli
->dispatch(cli
,
392 NDR_SPOOLSS_SETPRINTER
,
395 if (!NT_STATUS_IS_OK(status
)) {
399 if (DEBUGLEVEL
>= 10) {
400 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter
, &r
);
403 if (NT_STATUS_IS_ERR(status
)) {
407 /* Return variables */
411 *werror
= r
.out
.result
;
414 return werror_to_ntstatus(r
.out
.result
);
417 NTSTATUS
rpccli_spoolss_GetPrinter(struct rpc_pipe_client
*cli
,
419 struct policy_handle
*handle
/* [in] [ref] */,
420 uint32_t level
/* [in] */,
421 DATA_BLOB
*buffer
/* [in] [unique] */,
422 uint32_t offered
/* [in] */,
423 union spoolss_PrinterInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
424 uint32_t *needed
/* [out] [ref] */,
427 struct spoolss_GetPrinter r
;
431 r
.in
.handle
= handle
;
433 r
.in
.buffer
= buffer
;
434 r
.in
.offered
= offered
;
436 if (DEBUGLEVEL
>= 10) {
437 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter
, &r
);
440 status
= cli
->dispatch(cli
,
443 NDR_SPOOLSS_GETPRINTER
,
446 if (!NT_STATUS_IS_OK(status
)) {
450 if (DEBUGLEVEL
>= 10) {
451 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter
, &r
);
454 if (NT_STATUS_IS_ERR(status
)) {
458 /* Return variables */
459 if (info
&& r
.out
.info
) {
462 *needed
= *r
.out
.needed
;
466 *werror
= r
.out
.result
;
469 return werror_to_ntstatus(r
.out
.result
);
472 NTSTATUS
rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client
*cli
,
474 const char *servername
/* [in] [unique,charset(UTF16)] */,
475 struct spoolss_AddDriverInfoCtr
*info_ctr
/* [in] [ref] */,
478 struct spoolss_AddPrinterDriver r
;
482 r
.in
.servername
= servername
;
483 r
.in
.info_ctr
= info_ctr
;
485 if (DEBUGLEVEL
>= 10) {
486 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver
, &r
);
489 status
= cli
->dispatch(cli
,
492 NDR_SPOOLSS_ADDPRINTERDRIVER
,
495 if (!NT_STATUS_IS_OK(status
)) {
499 if (DEBUGLEVEL
>= 10) {
500 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver
, &r
);
503 if (NT_STATUS_IS_ERR(status
)) {
507 /* Return variables */
511 *werror
= r
.out
.result
;
514 return werror_to_ntstatus(r
.out
.result
);
517 NTSTATUS
rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client
*cli
,
519 const char *server
/* [in] [unique,charset(UTF16)] */,
520 const char *environment
/* [in] [unique,charset(UTF16)] */,
521 uint32_t level
/* [in] */,
522 DATA_BLOB
*buffer
/* [in] [unique] */,
523 uint32_t offered
/* [in] */,
524 uint32_t *count
/* [out] [ref] */,
525 union spoolss_DriverInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
526 uint32_t *needed
/* [out] [ref] */,
529 struct spoolss_EnumPrinterDrivers r
;
533 r
.in
.server
= server
;
534 r
.in
.environment
= environment
;
536 r
.in
.buffer
= buffer
;
537 r
.in
.offered
= offered
;
539 if (DEBUGLEVEL
>= 10) {
540 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers
, &r
);
543 status
= cli
->dispatch(cli
,
546 NDR_SPOOLSS_ENUMPRINTERDRIVERS
,
549 if (!NT_STATUS_IS_OK(status
)) {
553 if (DEBUGLEVEL
>= 10) {
554 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers
, &r
);
557 if (NT_STATUS_IS_ERR(status
)) {
561 /* Return variables */
562 *count
= *r
.out
.count
;
564 *needed
= *r
.out
.needed
;
568 *werror
= r
.out
.result
;
571 return werror_to_ntstatus(r
.out
.result
);
574 NTSTATUS
rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client
*cli
,
578 struct spoolss_GetPrinterDriver r
;
583 if (DEBUGLEVEL
>= 10) {
584 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver
, &r
);
587 status
= cli
->dispatch(cli
,
590 NDR_SPOOLSS_GETPRINTERDRIVER
,
593 if (!NT_STATUS_IS_OK(status
)) {
597 if (DEBUGLEVEL
>= 10) {
598 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver
, &r
);
601 if (NT_STATUS_IS_ERR(status
)) {
605 /* Return variables */
609 *werror
= r
.out
.result
;
612 return werror_to_ntstatus(r
.out
.result
);
615 NTSTATUS
rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client
*cli
,
617 const char *server
/* [in] [unique,charset(UTF16)] */,
618 const char *environment
/* [in] [unique,charset(UTF16)] */,
619 uint32_t level
/* [in] */,
620 DATA_BLOB
*buffer
/* [in] [unique] */,
621 uint32_t offered
/* [in] */,
622 union spoolss_DriverDirectoryInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
623 uint32_t *needed
/* [out] [ref] */,
626 struct spoolss_GetPrinterDriverDirectory r
;
630 r
.in
.server
= server
;
631 r
.in
.environment
= environment
;
633 r
.in
.buffer
= buffer
;
634 r
.in
.offered
= offered
;
636 if (DEBUGLEVEL
>= 10) {
637 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory
, &r
);
640 status
= cli
->dispatch(cli
,
643 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
,
646 if (!NT_STATUS_IS_OK(status
)) {
650 if (DEBUGLEVEL
>= 10) {
651 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory
, &r
);
654 if (NT_STATUS_IS_ERR(status
)) {
658 /* Return variables */
659 if (info
&& r
.out
.info
) {
662 *needed
= *r
.out
.needed
;
666 *werror
= r
.out
.result
;
669 return werror_to_ntstatus(r
.out
.result
);
672 NTSTATUS
rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client
*cli
,
674 const char *server
/* [in] [unique,charset(UTF16)] */,
675 const char *architecture
/* [in] [charset(UTF16)] */,
676 const char *driver
/* [in] [charset(UTF16)] */,
679 struct spoolss_DeletePrinterDriver r
;
683 r
.in
.server
= server
;
684 r
.in
.architecture
= architecture
;
685 r
.in
.driver
= driver
;
687 if (DEBUGLEVEL
>= 10) {
688 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver
, &r
);
691 status
= cli
->dispatch(cli
,
694 NDR_SPOOLSS_DELETEPRINTERDRIVER
,
697 if (!NT_STATUS_IS_OK(status
)) {
701 if (DEBUGLEVEL
>= 10) {
702 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver
, &r
);
705 if (NT_STATUS_IS_ERR(status
)) {
709 /* Return variables */
713 *werror
= r
.out
.result
;
716 return werror_to_ntstatus(r
.out
.result
);
719 NTSTATUS
rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client
*cli
,
721 const char *server
/* [in] [unique,charset(UTF16)] */,
722 const char *architecture
/* [in] [charset(UTF16)] */,
723 const char *path_name
/* [in] [charset(UTF16)] */,
724 const char *print_processor_name
/* [in] [charset(UTF16)] */,
727 struct spoolss_AddPrintProcessor r
;
731 r
.in
.server
= server
;
732 r
.in
.architecture
= architecture
;
733 r
.in
.path_name
= path_name
;
734 r
.in
.print_processor_name
= print_processor_name
;
736 if (DEBUGLEVEL
>= 10) {
737 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor
, &r
);
740 status
= cli
->dispatch(cli
,
743 NDR_SPOOLSS_ADDPRINTPROCESSOR
,
746 if (!NT_STATUS_IS_OK(status
)) {
750 if (DEBUGLEVEL
>= 10) {
751 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor
, &r
);
754 if (NT_STATUS_IS_ERR(status
)) {
758 /* Return variables */
762 *werror
= r
.out
.result
;
765 return werror_to_ntstatus(r
.out
.result
);
768 NTSTATUS
rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client
*cli
,
770 const char *servername
/* [in] [unique,charset(UTF16)] */,
771 const char *environment
/* [in] [unique,charset(UTF16)] */,
772 uint32_t level
/* [in] */,
773 DATA_BLOB
*buffer
/* [in] [unique] */,
774 uint32_t offered
/* [in] */,
775 uint32_t *count
/* [out] [ref] */,
776 union spoolss_PrintProcessorInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
777 uint32_t *needed
/* [out] [ref] */,
780 struct spoolss_EnumPrintProcessors r
;
784 r
.in
.servername
= servername
;
785 r
.in
.environment
= environment
;
787 r
.in
.buffer
= buffer
;
788 r
.in
.offered
= offered
;
790 if (DEBUGLEVEL
>= 10) {
791 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors
, &r
);
794 status
= cli
->dispatch(cli
,
797 NDR_SPOOLSS_ENUMPRINTPROCESSORS
,
800 if (!NT_STATUS_IS_OK(status
)) {
804 if (DEBUGLEVEL
>= 10) {
805 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors
, &r
);
808 if (NT_STATUS_IS_ERR(status
)) {
812 /* Return variables */
813 *count
= *r
.out
.count
;
815 *needed
= *r
.out
.needed
;
819 *werror
= r
.out
.result
;
822 return werror_to_ntstatus(r
.out
.result
);
825 NTSTATUS
rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client
*cli
,
827 const char *server
/* [in] [unique,charset(UTF16)] */,
828 const char *environment
/* [in] [unique,charset(UTF16)] */,
829 uint32_t level
/* [in] */,
830 DATA_BLOB
*buffer
/* [in] [unique] */,
831 uint32_t offered
/* [in] */,
832 union spoolss_PrintProcessorDirectoryInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
833 uint32_t *needed
/* [out] [ref] */,
836 struct spoolss_GetPrintProcessorDirectory r
;
840 r
.in
.server
= server
;
841 r
.in
.environment
= environment
;
843 r
.in
.buffer
= buffer
;
844 r
.in
.offered
= offered
;
846 if (DEBUGLEVEL
>= 10) {
847 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory
, &r
);
850 status
= cli
->dispatch(cli
,
853 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
,
856 if (!NT_STATUS_IS_OK(status
)) {
860 if (DEBUGLEVEL
>= 10) {
861 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory
, &r
);
864 if (NT_STATUS_IS_ERR(status
)) {
868 /* Return variables */
869 if (info
&& r
.out
.info
) {
872 *needed
= *r
.out
.needed
;
876 *werror
= r
.out
.result
;
879 return werror_to_ntstatus(r
.out
.result
);
882 NTSTATUS
rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client
*cli
,
884 struct policy_handle
*handle
/* [in] [ref] */,
885 uint32_t level
/* [in] */,
886 union spoolss_DocumentInfo info
/* [in] [switch_is(level)] */,
887 uint32_t *job_id
/* [out] [ref] */,
890 struct spoolss_StartDocPrinter r
;
894 r
.in
.handle
= handle
;
898 if (DEBUGLEVEL
>= 10) {
899 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter
, &r
);
902 status
= cli
->dispatch(cli
,
905 NDR_SPOOLSS_STARTDOCPRINTER
,
908 if (!NT_STATUS_IS_OK(status
)) {
912 if (DEBUGLEVEL
>= 10) {
913 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter
, &r
);
916 if (NT_STATUS_IS_ERR(status
)) {
920 /* Return variables */
921 *job_id
= *r
.out
.job_id
;
925 *werror
= r
.out
.result
;
928 return werror_to_ntstatus(r
.out
.result
);
931 NTSTATUS
rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client
*cli
,
933 struct policy_handle
*handle
/* [in] [ref] */,
936 struct spoolss_StartPagePrinter r
;
940 r
.in
.handle
= handle
;
942 if (DEBUGLEVEL
>= 10) {
943 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter
, &r
);
946 status
= cli
->dispatch(cli
,
949 NDR_SPOOLSS_STARTPAGEPRINTER
,
952 if (!NT_STATUS_IS_OK(status
)) {
956 if (DEBUGLEVEL
>= 10) {
957 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter
, &r
);
960 if (NT_STATUS_IS_ERR(status
)) {
964 /* Return variables */
968 *werror
= r
.out
.result
;
971 return werror_to_ntstatus(r
.out
.result
);
974 NTSTATUS
rpccli_spoolss_WritePrinter(struct rpc_pipe_client
*cli
,
976 struct policy_handle
*handle
/* [in] [ref] */,
977 DATA_BLOB data
/* [in] */,
978 uint32_t _data_size
/* [in] [value(r->in.data.length)] */,
979 uint32_t *num_written
/* [out] [ref] */,
982 struct spoolss_WritePrinter r
;
986 r
.in
.handle
= handle
;
988 r
.in
._data_size
= _data_size
;
990 if (DEBUGLEVEL
>= 10) {
991 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter
, &r
);
994 status
= cli
->dispatch(cli
,
997 NDR_SPOOLSS_WRITEPRINTER
,
1000 if (!NT_STATUS_IS_OK(status
)) {
1004 if (DEBUGLEVEL
>= 10) {
1005 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter
, &r
);
1008 if (NT_STATUS_IS_ERR(status
)) {
1012 /* Return variables */
1013 *num_written
= *r
.out
.num_written
;
1017 *werror
= r
.out
.result
;
1020 return werror_to_ntstatus(r
.out
.result
);
1023 NTSTATUS
rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client
*cli
,
1024 TALLOC_CTX
*mem_ctx
,
1025 struct policy_handle
*handle
/* [in] [ref] */,
1028 struct spoolss_EndPagePrinter r
;
1032 r
.in
.handle
= handle
;
1034 if (DEBUGLEVEL
>= 10) {
1035 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter
, &r
);
1038 status
= cli
->dispatch(cli
,
1041 NDR_SPOOLSS_ENDPAGEPRINTER
,
1044 if (!NT_STATUS_IS_OK(status
)) {
1048 if (DEBUGLEVEL
>= 10) {
1049 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter
, &r
);
1052 if (NT_STATUS_IS_ERR(status
)) {
1056 /* Return variables */
1060 *werror
= r
.out
.result
;
1063 return werror_to_ntstatus(r
.out
.result
);
1066 NTSTATUS
rpccli_spoolss_AbortPrinter(struct rpc_pipe_client
*cli
,
1067 TALLOC_CTX
*mem_ctx
,
1068 struct policy_handle
*handle
/* [in] [ref] */,
1071 struct spoolss_AbortPrinter r
;
1075 r
.in
.handle
= handle
;
1077 if (DEBUGLEVEL
>= 10) {
1078 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter
, &r
);
1081 status
= cli
->dispatch(cli
,
1084 NDR_SPOOLSS_ABORTPRINTER
,
1087 if (!NT_STATUS_IS_OK(status
)) {
1091 if (DEBUGLEVEL
>= 10) {
1092 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter
, &r
);
1095 if (NT_STATUS_IS_ERR(status
)) {
1099 /* Return variables */
1103 *werror
= r
.out
.result
;
1106 return werror_to_ntstatus(r
.out
.result
);
1109 NTSTATUS
rpccli_spoolss_ReadPrinter(struct rpc_pipe_client
*cli
,
1110 TALLOC_CTX
*mem_ctx
,
1111 struct policy_handle
*handle
/* [in] [ref] */,
1112 uint8_t *data
/* [out] [ref,size_is(data_size)] */,
1113 uint32_t data_size
/* [in] */,
1114 uint32_t *_data_size
/* [out] [ref] */,
1117 struct spoolss_ReadPrinter r
;
1121 r
.in
.handle
= handle
;
1122 r
.in
.data_size
= data_size
;
1124 if (DEBUGLEVEL
>= 10) {
1125 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter
, &r
);
1128 status
= cli
->dispatch(cli
,
1131 NDR_SPOOLSS_READPRINTER
,
1134 if (!NT_STATUS_IS_OK(status
)) {
1138 if (DEBUGLEVEL
>= 10) {
1139 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter
, &r
);
1142 if (NT_STATUS_IS_ERR(status
)) {
1146 /* Return variables */
1147 memcpy(data
, r
.out
.data
, r
.in
.data_size
* sizeof(*data
));
1148 *_data_size
= *r
.out
._data_size
;
1152 *werror
= r
.out
.result
;
1155 return werror_to_ntstatus(r
.out
.result
);
1158 NTSTATUS
rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client
*cli
,
1159 TALLOC_CTX
*mem_ctx
,
1160 struct policy_handle
*handle
/* [in] [ref] */,
1163 struct spoolss_EndDocPrinter r
;
1167 r
.in
.handle
= handle
;
1169 if (DEBUGLEVEL
>= 10) {
1170 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter
, &r
);
1173 status
= cli
->dispatch(cli
,
1176 NDR_SPOOLSS_ENDDOCPRINTER
,
1179 if (!NT_STATUS_IS_OK(status
)) {
1183 if (DEBUGLEVEL
>= 10) {
1184 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter
, &r
);
1187 if (NT_STATUS_IS_ERR(status
)) {
1191 /* Return variables */
1195 *werror
= r
.out
.result
;
1198 return werror_to_ntstatus(r
.out
.result
);
1201 NTSTATUS
rpccli_spoolss_AddJob(struct rpc_pipe_client
*cli
,
1202 TALLOC_CTX
*mem_ctx
,
1203 struct policy_handle
*handle
/* [in] [ref] */,
1204 uint32_t level
/* [in] */,
1205 uint8_t *buffer
/* [in,out] [unique,size_is(offered)] */,
1206 uint32_t offered
/* [in] */,
1207 uint32_t *needed
/* [out] [ref] */,
1210 struct spoolss_AddJob r
;
1214 r
.in
.handle
= handle
;
1216 r
.in
.buffer
= buffer
;
1217 r
.in
.offered
= offered
;
1219 if (DEBUGLEVEL
>= 10) {
1220 NDR_PRINT_IN_DEBUG(spoolss_AddJob
, &r
);
1223 status
= cli
->dispatch(cli
,
1229 if (!NT_STATUS_IS_OK(status
)) {
1233 if (DEBUGLEVEL
>= 10) {
1234 NDR_PRINT_OUT_DEBUG(spoolss_AddJob
, &r
);
1237 if (NT_STATUS_IS_ERR(status
)) {
1241 /* Return variables */
1242 if (buffer
&& r
.out
.buffer
) {
1243 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
1245 *needed
= *r
.out
.needed
;
1249 *werror
= r
.out
.result
;
1252 return werror_to_ntstatus(r
.out
.result
);
1255 NTSTATUS
rpccli_spoolss_ScheduleJob(struct rpc_pipe_client
*cli
,
1256 TALLOC_CTX
*mem_ctx
,
1257 struct policy_handle
*handle
/* [in] [ref] */,
1258 uint32_t jobid
/* [in] */,
1261 struct spoolss_ScheduleJob r
;
1265 r
.in
.handle
= handle
;
1268 if (DEBUGLEVEL
>= 10) {
1269 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob
, &r
);
1272 status
= cli
->dispatch(cli
,
1275 NDR_SPOOLSS_SCHEDULEJOB
,
1278 if (!NT_STATUS_IS_OK(status
)) {
1282 if (DEBUGLEVEL
>= 10) {
1283 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob
, &r
);
1286 if (NT_STATUS_IS_ERR(status
)) {
1290 /* Return variables */
1294 *werror
= r
.out
.result
;
1297 return werror_to_ntstatus(r
.out
.result
);
1300 NTSTATUS
rpccli_spoolss_GetPrinterData(struct rpc_pipe_client
*cli
,
1301 TALLOC_CTX
*mem_ctx
,
1302 struct policy_handle
*handle
/* [in] [ref] */,
1303 const char *value_name
/* [in] [charset(UTF16)] */,
1304 uint32_t offered
/* [in] */,
1305 enum winreg_Type
*type
/* [out] [ref] */,
1306 union spoolss_PrinterData
*data
/* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
1307 uint32_t *needed
/* [out] [ref] */,
1310 struct spoolss_GetPrinterData r
;
1314 r
.in
.handle
= handle
;
1315 r
.in
.value_name
= value_name
;
1316 r
.in
.offered
= offered
;
1318 if (DEBUGLEVEL
>= 10) {
1319 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData
, &r
);
1322 status
= cli
->dispatch(cli
,
1325 NDR_SPOOLSS_GETPRINTERDATA
,
1328 if (!NT_STATUS_IS_OK(status
)) {
1332 if (DEBUGLEVEL
>= 10) {
1333 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData
, &r
);
1336 if (NT_STATUS_IS_ERR(status
)) {
1340 /* Return variables */
1341 *type
= *r
.out
.type
;
1342 *data
= *r
.out
.data
;
1343 *needed
= *r
.out
.needed
;
1347 *werror
= r
.out
.result
;
1350 return werror_to_ntstatus(r
.out
.result
);
1353 NTSTATUS
rpccli_spoolss_SetPrinterData(struct rpc_pipe_client
*cli
,
1354 TALLOC_CTX
*mem_ctx
,
1355 struct policy_handle
*handle
/* [in] [ref] */,
1356 const char *value_name
/* [in] [charset(UTF16)] */,
1357 enum winreg_Type type
/* [in] */,
1358 union spoolss_PrinterData data
/* [in] [subcontext(4),switch_is(type)] */,
1359 uint32_t _offered
/* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1362 struct spoolss_SetPrinterData r
;
1366 r
.in
.handle
= handle
;
1367 r
.in
.value_name
= value_name
;
1370 r
.in
._offered
= _offered
;
1372 if (DEBUGLEVEL
>= 10) {
1373 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData
, &r
);
1376 status
= cli
->dispatch(cli
,
1379 NDR_SPOOLSS_SETPRINTERDATA
,
1382 if (!NT_STATUS_IS_OK(status
)) {
1386 if (DEBUGLEVEL
>= 10) {
1387 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData
, &r
);
1390 if (NT_STATUS_IS_ERR(status
)) {
1394 /* Return variables */
1398 *werror
= r
.out
.result
;
1401 return werror_to_ntstatus(r
.out
.result
);
1404 NTSTATUS
rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client
*cli
,
1405 TALLOC_CTX
*mem_ctx
,
1408 struct spoolss_WaitForPrinterChange r
;
1413 if (DEBUGLEVEL
>= 10) {
1414 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange
, &r
);
1417 status
= cli
->dispatch(cli
,
1420 NDR_SPOOLSS_WAITFORPRINTERCHANGE
,
1423 if (!NT_STATUS_IS_OK(status
)) {
1427 if (DEBUGLEVEL
>= 10) {
1428 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange
, &r
);
1431 if (NT_STATUS_IS_ERR(status
)) {
1435 /* Return variables */
1439 *werror
= r
.out
.result
;
1442 return werror_to_ntstatus(r
.out
.result
);
1445 NTSTATUS
rpccli_spoolss_ClosePrinter(struct rpc_pipe_client
*cli
,
1446 TALLOC_CTX
*mem_ctx
,
1447 struct policy_handle
*handle
/* [in,out] [ref] */,
1450 struct spoolss_ClosePrinter r
;
1454 r
.in
.handle
= handle
;
1456 if (DEBUGLEVEL
>= 10) {
1457 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter
, &r
);
1460 status
= cli
->dispatch(cli
,
1463 NDR_SPOOLSS_CLOSEPRINTER
,
1466 if (!NT_STATUS_IS_OK(status
)) {
1470 if (DEBUGLEVEL
>= 10) {
1471 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter
, &r
);
1474 if (NT_STATUS_IS_ERR(status
)) {
1478 /* Return variables */
1479 *handle
= *r
.out
.handle
;
1483 *werror
= r
.out
.result
;
1486 return werror_to_ntstatus(r
.out
.result
);
1489 NTSTATUS
rpccli_spoolss_AddForm(struct rpc_pipe_client
*cli
,
1490 TALLOC_CTX
*mem_ctx
,
1491 struct policy_handle
*handle
/* [in] [ref] */,
1492 uint32_t level
/* [in] */,
1493 union spoolss_AddFormInfo info
/* [in] [switch_is(level)] */,
1496 struct spoolss_AddForm r
;
1500 r
.in
.handle
= handle
;
1504 if (DEBUGLEVEL
>= 10) {
1505 NDR_PRINT_IN_DEBUG(spoolss_AddForm
, &r
);
1508 status
= cli
->dispatch(cli
,
1511 NDR_SPOOLSS_ADDFORM
,
1514 if (!NT_STATUS_IS_OK(status
)) {
1518 if (DEBUGLEVEL
>= 10) {
1519 NDR_PRINT_OUT_DEBUG(spoolss_AddForm
, &r
);
1522 if (NT_STATUS_IS_ERR(status
)) {
1526 /* Return variables */
1530 *werror
= r
.out
.result
;
1533 return werror_to_ntstatus(r
.out
.result
);
1536 NTSTATUS
rpccli_spoolss_DeleteForm(struct rpc_pipe_client
*cli
,
1537 TALLOC_CTX
*mem_ctx
,
1538 struct policy_handle
*handle
/* [in] [ref] */,
1539 const char *form_name
/* [in] [charset(UTF16)] */,
1542 struct spoolss_DeleteForm r
;
1546 r
.in
.handle
= handle
;
1547 r
.in
.form_name
= form_name
;
1549 if (DEBUGLEVEL
>= 10) {
1550 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm
, &r
);
1553 status
= cli
->dispatch(cli
,
1556 NDR_SPOOLSS_DELETEFORM
,
1559 if (!NT_STATUS_IS_OK(status
)) {
1563 if (DEBUGLEVEL
>= 10) {
1564 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm
, &r
);
1567 if (NT_STATUS_IS_ERR(status
)) {
1571 /* Return variables */
1575 *werror
= r
.out
.result
;
1578 return werror_to_ntstatus(r
.out
.result
);
1581 NTSTATUS
rpccli_spoolss_GetForm(struct rpc_pipe_client
*cli
,
1582 TALLOC_CTX
*mem_ctx
,
1583 struct policy_handle
*handle
/* [in] [ref] */,
1584 const char *form_name
/* [in] [charset(UTF16)] */,
1585 uint32_t level
/* [in] */,
1586 DATA_BLOB
*buffer
/* [in] [unique] */,
1587 uint32_t offered
/* [in] */,
1588 union spoolss_FormInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1589 uint32_t *needed
/* [out] [ref] */,
1592 struct spoolss_GetForm r
;
1596 r
.in
.handle
= handle
;
1597 r
.in
.form_name
= form_name
;
1599 r
.in
.buffer
= buffer
;
1600 r
.in
.offered
= offered
;
1602 if (DEBUGLEVEL
>= 10) {
1603 NDR_PRINT_IN_DEBUG(spoolss_GetForm
, &r
);
1606 status
= cli
->dispatch(cli
,
1609 NDR_SPOOLSS_GETFORM
,
1612 if (!NT_STATUS_IS_OK(status
)) {
1616 if (DEBUGLEVEL
>= 10) {
1617 NDR_PRINT_OUT_DEBUG(spoolss_GetForm
, &r
);
1620 if (NT_STATUS_IS_ERR(status
)) {
1624 /* Return variables */
1625 if (info
&& r
.out
.info
) {
1626 *info
= *r
.out
.info
;
1628 *needed
= *r
.out
.needed
;
1632 *werror
= r
.out
.result
;
1635 return werror_to_ntstatus(r
.out
.result
);
1638 NTSTATUS
rpccli_spoolss_SetForm(struct rpc_pipe_client
*cli
,
1639 TALLOC_CTX
*mem_ctx
,
1640 struct policy_handle
*handle
/* [in] [ref] */,
1641 const char *form_name
/* [in] [charset(UTF16)] */,
1642 uint32_t level
/* [in] */,
1643 union spoolss_AddFormInfo info
/* [in] [switch_is(level)] */,
1646 struct spoolss_SetForm r
;
1650 r
.in
.handle
= handle
;
1651 r
.in
.form_name
= form_name
;
1655 if (DEBUGLEVEL
>= 10) {
1656 NDR_PRINT_IN_DEBUG(spoolss_SetForm
, &r
);
1659 status
= cli
->dispatch(cli
,
1662 NDR_SPOOLSS_SETFORM
,
1665 if (!NT_STATUS_IS_OK(status
)) {
1669 if (DEBUGLEVEL
>= 10) {
1670 NDR_PRINT_OUT_DEBUG(spoolss_SetForm
, &r
);
1673 if (NT_STATUS_IS_ERR(status
)) {
1677 /* Return variables */
1681 *werror
= r
.out
.result
;
1684 return werror_to_ntstatus(r
.out
.result
);
1687 NTSTATUS
rpccli_spoolss_EnumForms(struct rpc_pipe_client
*cli
,
1688 TALLOC_CTX
*mem_ctx
,
1689 struct policy_handle
*handle
/* [in] [ref] */,
1690 uint32_t level
/* [in] */,
1691 DATA_BLOB
*buffer
/* [in] [unique] */,
1692 uint32_t offered
/* [in] */,
1693 uint32_t *count
/* [out] [ref] */,
1694 union spoolss_FormInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
1695 uint32_t *needed
/* [out] [ref] */,
1698 struct spoolss_EnumForms r
;
1702 r
.in
.handle
= handle
;
1704 r
.in
.buffer
= buffer
;
1705 r
.in
.offered
= offered
;
1707 if (DEBUGLEVEL
>= 10) {
1708 NDR_PRINT_IN_DEBUG(spoolss_EnumForms
, &r
);
1711 status
= cli
->dispatch(cli
,
1714 NDR_SPOOLSS_ENUMFORMS
,
1717 if (!NT_STATUS_IS_OK(status
)) {
1721 if (DEBUGLEVEL
>= 10) {
1722 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms
, &r
);
1725 if (NT_STATUS_IS_ERR(status
)) {
1729 /* Return variables */
1730 *count
= *r
.out
.count
;
1731 *info
= *r
.out
.info
;
1732 *needed
= *r
.out
.needed
;
1736 *werror
= r
.out
.result
;
1739 return werror_to_ntstatus(r
.out
.result
);
1742 NTSTATUS
rpccli_spoolss_EnumPorts(struct rpc_pipe_client
*cli
,
1743 TALLOC_CTX
*mem_ctx
,
1744 const char *servername
/* [in] [unique,charset(UTF16)] */,
1745 uint32_t level
/* [in] */,
1746 DATA_BLOB
*buffer
/* [in] [unique] */,
1747 uint32_t offered
/* [in] */,
1748 uint32_t *count
/* [out] [ref] */,
1749 union spoolss_PortInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
1750 uint32_t *needed
/* [out] [ref] */,
1753 struct spoolss_EnumPorts r
;
1757 r
.in
.servername
= servername
;
1759 r
.in
.buffer
= buffer
;
1760 r
.in
.offered
= offered
;
1762 if (DEBUGLEVEL
>= 10) {
1763 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts
, &r
);
1766 status
= cli
->dispatch(cli
,
1769 NDR_SPOOLSS_ENUMPORTS
,
1772 if (!NT_STATUS_IS_OK(status
)) {
1776 if (DEBUGLEVEL
>= 10) {
1777 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts
, &r
);
1780 if (NT_STATUS_IS_ERR(status
)) {
1784 /* Return variables */
1785 *count
= *r
.out
.count
;
1786 *info
= *r
.out
.info
;
1787 *needed
= *r
.out
.needed
;
1791 *werror
= r
.out
.result
;
1794 return werror_to_ntstatus(r
.out
.result
);
1797 NTSTATUS
rpccli_spoolss_EnumMonitors(struct rpc_pipe_client
*cli
,
1798 TALLOC_CTX
*mem_ctx
,
1799 const char *servername
/* [in] [unique,charset(UTF16)] */,
1800 uint32_t level
/* [in] */,
1801 DATA_BLOB
*buffer
/* [in] [unique] */,
1802 uint32_t offered
/* [in] */,
1803 uint32_t *count
/* [out] [ref] */,
1804 union spoolss_MonitorInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
1805 uint32_t *needed
/* [out] [ref] */,
1808 struct spoolss_EnumMonitors r
;
1812 r
.in
.servername
= servername
;
1814 r
.in
.buffer
= buffer
;
1815 r
.in
.offered
= offered
;
1817 if (DEBUGLEVEL
>= 10) {
1818 NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors
, &r
);
1821 status
= cli
->dispatch(cli
,
1824 NDR_SPOOLSS_ENUMMONITORS
,
1827 if (!NT_STATUS_IS_OK(status
)) {
1831 if (DEBUGLEVEL
>= 10) {
1832 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors
, &r
);
1835 if (NT_STATUS_IS_ERR(status
)) {
1839 /* Return variables */
1840 *count
= *r
.out
.count
;
1841 *info
= *r
.out
.info
;
1842 *needed
= *r
.out
.needed
;
1846 *werror
= r
.out
.result
;
1849 return werror_to_ntstatus(r
.out
.result
);
1852 NTSTATUS
rpccli_spoolss_AddPort(struct rpc_pipe_client
*cli
,
1853 TALLOC_CTX
*mem_ctx
,
1854 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1855 uint32_t unknown
/* [in] */,
1856 const char *monitor_name
/* [in] [charset(UTF16)] */,
1859 struct spoolss_AddPort r
;
1863 r
.in
.server_name
= server_name
;
1864 r
.in
.unknown
= unknown
;
1865 r
.in
.monitor_name
= monitor_name
;
1867 if (DEBUGLEVEL
>= 10) {
1868 NDR_PRINT_IN_DEBUG(spoolss_AddPort
, &r
);
1871 status
= cli
->dispatch(cli
,
1874 NDR_SPOOLSS_ADDPORT
,
1877 if (!NT_STATUS_IS_OK(status
)) {
1881 if (DEBUGLEVEL
>= 10) {
1882 NDR_PRINT_OUT_DEBUG(spoolss_AddPort
, &r
);
1885 if (NT_STATUS_IS_ERR(status
)) {
1889 /* Return variables */
1893 *werror
= r
.out
.result
;
1896 return werror_to_ntstatus(r
.out
.result
);
1899 NTSTATUS
rpccli_spoolss_ConfigurePort(struct rpc_pipe_client
*cli
,
1900 TALLOC_CTX
*mem_ctx
,
1903 struct spoolss_ConfigurePort r
;
1908 if (DEBUGLEVEL
>= 10) {
1909 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort
, &r
);
1912 status
= cli
->dispatch(cli
,
1915 NDR_SPOOLSS_CONFIGUREPORT
,
1918 if (!NT_STATUS_IS_OK(status
)) {
1922 if (DEBUGLEVEL
>= 10) {
1923 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort
, &r
);
1926 if (NT_STATUS_IS_ERR(status
)) {
1930 /* Return variables */
1934 *werror
= r
.out
.result
;
1937 return werror_to_ntstatus(r
.out
.result
);
1940 NTSTATUS
rpccli_spoolss_DeletePort(struct rpc_pipe_client
*cli
,
1941 TALLOC_CTX
*mem_ctx
,
1944 struct spoolss_DeletePort r
;
1949 if (DEBUGLEVEL
>= 10) {
1950 NDR_PRINT_IN_DEBUG(spoolss_DeletePort
, &r
);
1953 status
= cli
->dispatch(cli
,
1956 NDR_SPOOLSS_DELETEPORT
,
1959 if (!NT_STATUS_IS_OK(status
)) {
1963 if (DEBUGLEVEL
>= 10) {
1964 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort
, &r
);
1967 if (NT_STATUS_IS_ERR(status
)) {
1971 /* Return variables */
1975 *werror
= r
.out
.result
;
1978 return werror_to_ntstatus(r
.out
.result
);
1981 NTSTATUS
rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client
*cli
,
1982 TALLOC_CTX
*mem_ctx
,
1985 struct spoolss_CreatePrinterIC r
;
1990 if (DEBUGLEVEL
>= 10) {
1991 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC
, &r
);
1994 status
= cli
->dispatch(cli
,
1997 NDR_SPOOLSS_CREATEPRINTERIC
,
2000 if (!NT_STATUS_IS_OK(status
)) {
2004 if (DEBUGLEVEL
>= 10) {
2005 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC
, &r
);
2008 if (NT_STATUS_IS_ERR(status
)) {
2012 /* Return variables */
2016 *werror
= r
.out
.result
;
2019 return werror_to_ntstatus(r
.out
.result
);
2022 NTSTATUS
rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client
*cli
,
2023 TALLOC_CTX
*mem_ctx
,
2026 struct spoolss_PlayGDIScriptOnPrinterIC r
;
2031 if (DEBUGLEVEL
>= 10) {
2032 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, &r
);
2035 status
= cli
->dispatch(cli
,
2038 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
,
2041 if (!NT_STATUS_IS_OK(status
)) {
2045 if (DEBUGLEVEL
>= 10) {
2046 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, &r
);
2049 if (NT_STATUS_IS_ERR(status
)) {
2053 /* Return variables */
2057 *werror
= r
.out
.result
;
2060 return werror_to_ntstatus(r
.out
.result
);
2063 NTSTATUS
rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client
*cli
,
2064 TALLOC_CTX
*mem_ctx
,
2067 struct spoolss_DeletePrinterIC r
;
2072 if (DEBUGLEVEL
>= 10) {
2073 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC
, &r
);
2076 status
= cli
->dispatch(cli
,
2079 NDR_SPOOLSS_DELETEPRINTERIC
,
2082 if (!NT_STATUS_IS_OK(status
)) {
2086 if (DEBUGLEVEL
>= 10) {
2087 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC
, &r
);
2090 if (NT_STATUS_IS_ERR(status
)) {
2094 /* Return variables */
2098 *werror
= r
.out
.result
;
2101 return werror_to_ntstatus(r
.out
.result
);
2104 NTSTATUS
rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client
*cli
,
2105 TALLOC_CTX
*mem_ctx
,
2108 struct spoolss_AddPrinterConnection r
;
2113 if (DEBUGLEVEL
>= 10) {
2114 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection
, &r
);
2117 status
= cli
->dispatch(cli
,
2120 NDR_SPOOLSS_ADDPRINTERCONNECTION
,
2123 if (!NT_STATUS_IS_OK(status
)) {
2127 if (DEBUGLEVEL
>= 10) {
2128 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection
, &r
);
2131 if (NT_STATUS_IS_ERR(status
)) {
2135 /* Return variables */
2139 *werror
= r
.out
.result
;
2142 return werror_to_ntstatus(r
.out
.result
);
2145 NTSTATUS
rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client
*cli
,
2146 TALLOC_CTX
*mem_ctx
,
2149 struct spoolss_DeletePrinterConnection r
;
2154 if (DEBUGLEVEL
>= 10) {
2155 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection
, &r
);
2158 status
= cli
->dispatch(cli
,
2161 NDR_SPOOLSS_DELETEPRINTERCONNECTION
,
2164 if (!NT_STATUS_IS_OK(status
)) {
2168 if (DEBUGLEVEL
>= 10) {
2169 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection
, &r
);
2172 if (NT_STATUS_IS_ERR(status
)) {
2176 /* Return variables */
2180 *werror
= r
.out
.result
;
2183 return werror_to_ntstatus(r
.out
.result
);
2186 NTSTATUS
rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client
*cli
,
2187 TALLOC_CTX
*mem_ctx
,
2190 struct spoolss_PrinterMessageBox r
;
2195 if (DEBUGLEVEL
>= 10) {
2196 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox
, &r
);
2199 status
= cli
->dispatch(cli
,
2202 NDR_SPOOLSS_PRINTERMESSAGEBOX
,
2205 if (!NT_STATUS_IS_OK(status
)) {
2209 if (DEBUGLEVEL
>= 10) {
2210 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox
, &r
);
2213 if (NT_STATUS_IS_ERR(status
)) {
2217 /* Return variables */
2221 *werror
= r
.out
.result
;
2224 return werror_to_ntstatus(r
.out
.result
);
2227 NTSTATUS
rpccli_spoolss_AddMonitor(struct rpc_pipe_client
*cli
,
2228 TALLOC_CTX
*mem_ctx
,
2231 struct spoolss_AddMonitor r
;
2236 if (DEBUGLEVEL
>= 10) {
2237 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor
, &r
);
2240 status
= cli
->dispatch(cli
,
2243 NDR_SPOOLSS_ADDMONITOR
,
2246 if (!NT_STATUS_IS_OK(status
)) {
2250 if (DEBUGLEVEL
>= 10) {
2251 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor
, &r
);
2254 if (NT_STATUS_IS_ERR(status
)) {
2258 /* Return variables */
2262 *werror
= r
.out
.result
;
2265 return werror_to_ntstatus(r
.out
.result
);
2268 NTSTATUS
rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client
*cli
,
2269 TALLOC_CTX
*mem_ctx
,
2272 struct spoolss_DeleteMonitor r
;
2277 if (DEBUGLEVEL
>= 10) {
2278 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor
, &r
);
2281 status
= cli
->dispatch(cli
,
2284 NDR_SPOOLSS_DELETEMONITOR
,
2287 if (!NT_STATUS_IS_OK(status
)) {
2291 if (DEBUGLEVEL
>= 10) {
2292 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor
, &r
);
2295 if (NT_STATUS_IS_ERR(status
)) {
2299 /* Return variables */
2303 *werror
= r
.out
.result
;
2306 return werror_to_ntstatus(r
.out
.result
);
2309 NTSTATUS
rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client
*cli
,
2310 TALLOC_CTX
*mem_ctx
,
2313 struct spoolss_DeletePrintProcessor r
;
2318 if (DEBUGLEVEL
>= 10) {
2319 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor
, &r
);
2322 status
= cli
->dispatch(cli
,
2325 NDR_SPOOLSS_DELETEPRINTPROCESSOR
,
2328 if (!NT_STATUS_IS_OK(status
)) {
2332 if (DEBUGLEVEL
>= 10) {
2333 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor
, &r
);
2336 if (NT_STATUS_IS_ERR(status
)) {
2340 /* Return variables */
2344 *werror
= r
.out
.result
;
2347 return werror_to_ntstatus(r
.out
.result
);
2350 NTSTATUS
rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client
*cli
,
2351 TALLOC_CTX
*mem_ctx
,
2354 struct spoolss_AddPrintProvidor r
;
2359 if (DEBUGLEVEL
>= 10) {
2360 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor
, &r
);
2363 status
= cli
->dispatch(cli
,
2366 NDR_SPOOLSS_ADDPRINTPROVIDOR
,
2369 if (!NT_STATUS_IS_OK(status
)) {
2373 if (DEBUGLEVEL
>= 10) {
2374 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor
, &r
);
2377 if (NT_STATUS_IS_ERR(status
)) {
2381 /* Return variables */
2385 *werror
= r
.out
.result
;
2388 return werror_to_ntstatus(r
.out
.result
);
2391 NTSTATUS
rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client
*cli
,
2392 TALLOC_CTX
*mem_ctx
,
2395 struct spoolss_DeletePrintProvidor r
;
2400 if (DEBUGLEVEL
>= 10) {
2401 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor
, &r
);
2404 status
= cli
->dispatch(cli
,
2407 NDR_SPOOLSS_DELETEPRINTPROVIDOR
,
2410 if (!NT_STATUS_IS_OK(status
)) {
2414 if (DEBUGLEVEL
>= 10) {
2415 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor
, &r
);
2418 if (NT_STATUS_IS_ERR(status
)) {
2422 /* Return variables */
2426 *werror
= r
.out
.result
;
2429 return werror_to_ntstatus(r
.out
.result
);
2432 NTSTATUS
rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client
*cli
,
2433 TALLOC_CTX
*mem_ctx
,
2434 const char *servername
/* [in] [unique,charset(UTF16)] */,
2435 const char *print_processor_name
/* [in] [unique,charset(UTF16)] */,
2436 uint32_t level
/* [in] */,
2437 DATA_BLOB
*buffer
/* [in] [unique] */,
2438 uint32_t offered
/* [in] */,
2439 uint32_t *count
/* [out] [ref] */,
2440 union spoolss_PrintProcDataTypesInfo
**info
/* [out] [ref,switch_is(level),size_is(,*count)] */,
2441 uint32_t *needed
/* [out] [ref] */,
2444 struct spoolss_EnumPrintProcDataTypes r
;
2448 r
.in
.servername
= servername
;
2449 r
.in
.print_processor_name
= print_processor_name
;
2451 r
.in
.buffer
= buffer
;
2452 r
.in
.offered
= offered
;
2454 if (DEBUGLEVEL
>= 10) {
2455 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes
, &r
);
2458 status
= cli
->dispatch(cli
,
2461 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
,
2464 if (!NT_STATUS_IS_OK(status
)) {
2468 if (DEBUGLEVEL
>= 10) {
2469 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes
, &r
);
2472 if (NT_STATUS_IS_ERR(status
)) {
2476 /* Return variables */
2477 *count
= *r
.out
.count
;
2478 *info
= *r
.out
.info
;
2479 *needed
= *r
.out
.needed
;
2483 *werror
= r
.out
.result
;
2486 return werror_to_ntstatus(r
.out
.result
);
2489 NTSTATUS
rpccli_spoolss_ResetPrinter(struct rpc_pipe_client
*cli
,
2490 TALLOC_CTX
*mem_ctx
,
2491 struct policy_handle
*handle
/* [in] [ref] */,
2492 const char *data_type
/* [in] [unique,charset(UTF16)] */,
2493 struct spoolss_DevmodeContainer
*devmode_ctr
/* [in] [ref] */,
2496 struct spoolss_ResetPrinter r
;
2500 r
.in
.handle
= handle
;
2501 r
.in
.data_type
= data_type
;
2502 r
.in
.devmode_ctr
= devmode_ctr
;
2504 if (DEBUGLEVEL
>= 10) {
2505 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter
, &r
);
2508 status
= cli
->dispatch(cli
,
2511 NDR_SPOOLSS_RESETPRINTER
,
2514 if (!NT_STATUS_IS_OK(status
)) {
2518 if (DEBUGLEVEL
>= 10) {
2519 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter
, &r
);
2522 if (NT_STATUS_IS_ERR(status
)) {
2526 /* Return variables */
2530 *werror
= r
.out
.result
;
2533 return werror_to_ntstatus(r
.out
.result
);
2536 NTSTATUS
rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client
*cli
,
2537 TALLOC_CTX
*mem_ctx
,
2538 struct policy_handle
*handle
/* [in] [ref] */,
2539 const char *architecture
/* [in] [unique,charset(UTF16)] */,
2540 uint32_t level
/* [in] */,
2541 DATA_BLOB
*buffer
/* [in] [unique] */,
2542 uint32_t offered
/* [in] */,
2543 uint32_t client_major_version
/* [in] */,
2544 uint32_t client_minor_version
/* [in] */,
2545 union spoolss_DriverInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
2546 uint32_t *needed
/* [out] [ref] */,
2547 uint32_t *server_major_version
/* [out] [ref] */,
2548 uint32_t *server_minor_version
/* [out] [ref] */,
2551 struct spoolss_GetPrinterDriver2 r
;
2555 r
.in
.handle
= handle
;
2556 r
.in
.architecture
= architecture
;
2558 r
.in
.buffer
= buffer
;
2559 r
.in
.offered
= offered
;
2560 r
.in
.client_major_version
= client_major_version
;
2561 r
.in
.client_minor_version
= client_minor_version
;
2563 if (DEBUGLEVEL
>= 10) {
2564 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2
, &r
);
2567 status
= cli
->dispatch(cli
,
2570 NDR_SPOOLSS_GETPRINTERDRIVER2
,
2573 if (!NT_STATUS_IS_OK(status
)) {
2577 if (DEBUGLEVEL
>= 10) {
2578 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2
, &r
);
2581 if (NT_STATUS_IS_ERR(status
)) {
2585 /* Return variables */
2586 if (info
&& r
.out
.info
) {
2587 *info
= *r
.out
.info
;
2589 *needed
= *r
.out
.needed
;
2590 *server_major_version
= *r
.out
.server_major_version
;
2591 *server_minor_version
= *r
.out
.server_minor_version
;
2595 *werror
= r
.out
.result
;
2598 return werror_to_ntstatus(r
.out
.result
);
2601 NTSTATUS
rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2602 TALLOC_CTX
*mem_ctx
,
2605 struct spoolss_FindFirstPrinterChangeNotification r
;
2610 if (DEBUGLEVEL
>= 10) {
2611 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification
, &r
);
2614 status
= cli
->dispatch(cli
,
2617 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
,
2620 if (!NT_STATUS_IS_OK(status
)) {
2624 if (DEBUGLEVEL
>= 10) {
2625 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification
, &r
);
2628 if (NT_STATUS_IS_ERR(status
)) {
2632 /* Return variables */
2636 *werror
= r
.out
.result
;
2639 return werror_to_ntstatus(r
.out
.result
);
2642 NTSTATUS
rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2643 TALLOC_CTX
*mem_ctx
,
2646 struct spoolss_FindNextPrinterChangeNotification r
;
2651 if (DEBUGLEVEL
>= 10) {
2652 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification
, &r
);
2655 status
= cli
->dispatch(cli
,
2658 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
,
2661 if (!NT_STATUS_IS_OK(status
)) {
2665 if (DEBUGLEVEL
>= 10) {
2666 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification
, &r
);
2669 if (NT_STATUS_IS_ERR(status
)) {
2673 /* Return variables */
2677 *werror
= r
.out
.result
;
2680 return werror_to_ntstatus(r
.out
.result
);
2683 NTSTATUS
rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client
*cli
,
2684 TALLOC_CTX
*mem_ctx
,
2685 struct policy_handle
*handle
/* [in] [ref] */,
2688 struct spoolss_FindClosePrinterNotify r
;
2692 r
.in
.handle
= handle
;
2694 if (DEBUGLEVEL
>= 10) {
2695 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify
, &r
);
2698 status
= cli
->dispatch(cli
,
2701 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
,
2704 if (!NT_STATUS_IS_OK(status
)) {
2708 if (DEBUGLEVEL
>= 10) {
2709 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify
, &r
);
2712 if (NT_STATUS_IS_ERR(status
)) {
2716 /* Return variables */
2720 *werror
= r
.out
.result
;
2723 return werror_to_ntstatus(r
.out
.result
);
2726 NTSTATUS
rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client
*cli
,
2727 TALLOC_CTX
*mem_ctx
,
2730 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r
;
2735 if (DEBUGLEVEL
>= 10) {
2736 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, &r
);
2739 status
= cli
->dispatch(cli
,
2742 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
,
2745 if (!NT_STATUS_IS_OK(status
)) {
2749 if (DEBUGLEVEL
>= 10) {
2750 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, &r
);
2753 if (NT_STATUS_IS_ERR(status
)) {
2757 /* Return variables */
2761 *werror
= r
.out
.result
;
2764 return werror_to_ntstatus(r
.out
.result
);
2767 NTSTATUS
rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client
*cli
,
2768 TALLOC_CTX
*mem_ctx
,
2769 const char *server_name
/* [in] [charset(UTF16)] */,
2770 uint32_t printer_local
/* [in] */,
2771 enum winreg_Type type
/* [in] */,
2772 uint32_t bufsize
/* [in] [range(0,512)] */,
2773 uint8_t *buffer
/* [in] [unique,size_is(bufsize)] */,
2774 struct policy_handle
*handle
/* [out] [ref] */,
2777 struct spoolss_ReplyOpenPrinter r
;
2781 r
.in
.server_name
= server_name
;
2782 r
.in
.printer_local
= printer_local
;
2784 r
.in
.bufsize
= bufsize
;
2785 r
.in
.buffer
= buffer
;
2787 if (DEBUGLEVEL
>= 10) {
2788 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter
, &r
);
2791 status
= cli
->dispatch(cli
,
2794 NDR_SPOOLSS_REPLYOPENPRINTER
,
2797 if (!NT_STATUS_IS_OK(status
)) {
2801 if (DEBUGLEVEL
>= 10) {
2802 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter
, &r
);
2805 if (NT_STATUS_IS_ERR(status
)) {
2809 /* Return variables */
2810 *handle
= *r
.out
.handle
;
2814 *werror
= r
.out
.result
;
2817 return werror_to_ntstatus(r
.out
.result
);
2820 NTSTATUS
rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client
*cli
,
2821 TALLOC_CTX
*mem_ctx
,
2822 struct policy_handle
*handle
/* [in] [ref] */,
2823 uint32_t flags
/* [in] */,
2824 uint32_t bufsize
/* [in] [range(0,512)] */,
2825 uint8_t *buffer
/* [in] [unique,size_is(bufsize)] */,
2828 struct spoolss_RouterReplyPrinter r
;
2832 r
.in
.handle
= handle
;
2834 r
.in
.bufsize
= bufsize
;
2835 r
.in
.buffer
= buffer
;
2837 if (DEBUGLEVEL
>= 10) {
2838 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter
, &r
);
2841 status
= cli
->dispatch(cli
,
2844 NDR_SPOOLSS_ROUTERREPLYPRINTER
,
2847 if (!NT_STATUS_IS_OK(status
)) {
2851 if (DEBUGLEVEL
>= 10) {
2852 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter
, &r
);
2855 if (NT_STATUS_IS_ERR(status
)) {
2859 /* Return variables */
2863 *werror
= r
.out
.result
;
2866 return werror_to_ntstatus(r
.out
.result
);
2869 NTSTATUS
rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client
*cli
,
2870 TALLOC_CTX
*mem_ctx
,
2871 struct policy_handle
*handle
/* [in,out] [ref] */,
2874 struct spoolss_ReplyClosePrinter r
;
2878 r
.in
.handle
= handle
;
2880 if (DEBUGLEVEL
>= 10) {
2881 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter
, &r
);
2884 status
= cli
->dispatch(cli
,
2887 NDR_SPOOLSS_REPLYCLOSEPRINTER
,
2890 if (!NT_STATUS_IS_OK(status
)) {
2894 if (DEBUGLEVEL
>= 10) {
2895 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter
, &r
);
2898 if (NT_STATUS_IS_ERR(status
)) {
2902 /* Return variables */
2903 *handle
= *r
.out
.handle
;
2907 *werror
= r
.out
.result
;
2910 return werror_to_ntstatus(r
.out
.result
);
2913 NTSTATUS
rpccli_spoolss_AddPortEx(struct rpc_pipe_client
*cli
,
2914 TALLOC_CTX
*mem_ctx
,
2917 struct spoolss_AddPortEx r
;
2922 if (DEBUGLEVEL
>= 10) {
2923 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx
, &r
);
2926 status
= cli
->dispatch(cli
,
2929 NDR_SPOOLSS_ADDPORTEX
,
2932 if (!NT_STATUS_IS_OK(status
)) {
2936 if (DEBUGLEVEL
>= 10) {
2937 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx
, &r
);
2940 if (NT_STATUS_IS_ERR(status
)) {
2944 /* Return variables */
2948 *werror
= r
.out
.result
;
2951 return werror_to_ntstatus(r
.out
.result
);
2954 NTSTATUS
rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2955 TALLOC_CTX
*mem_ctx
,
2958 struct spoolss_RouterFindFirstPrinterChangeNotification r
;
2963 if (DEBUGLEVEL
>= 10) {
2964 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, &r
);
2967 status
= cli
->dispatch(cli
,
2970 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
,
2973 if (!NT_STATUS_IS_OK(status
)) {
2977 if (DEBUGLEVEL
>= 10) {
2978 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, &r
);
2981 if (NT_STATUS_IS_ERR(status
)) {
2985 /* Return variables */
2989 *werror
= r
.out
.result
;
2992 return werror_to_ntstatus(r
.out
.result
);
2995 NTSTATUS
rpccli_spoolss_SpoolerInit(struct rpc_pipe_client
*cli
,
2996 TALLOC_CTX
*mem_ctx
,
2999 struct spoolss_SpoolerInit r
;
3004 if (DEBUGLEVEL
>= 10) {
3005 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit
, &r
);
3008 status
= cli
->dispatch(cli
,
3011 NDR_SPOOLSS_SPOOLERINIT
,
3014 if (!NT_STATUS_IS_OK(status
)) {
3018 if (DEBUGLEVEL
>= 10) {
3019 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit
, &r
);
3022 if (NT_STATUS_IS_ERR(status
)) {
3026 /* Return variables */
3030 *werror
= r
.out
.result
;
3033 return werror_to_ntstatus(r
.out
.result
);
3036 NTSTATUS
rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client
*cli
,
3037 TALLOC_CTX
*mem_ctx
,
3040 struct spoolss_ResetPrinterEx r
;
3045 if (DEBUGLEVEL
>= 10) {
3046 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx
, &r
);
3049 status
= cli
->dispatch(cli
,
3052 NDR_SPOOLSS_RESETPRINTEREX
,
3055 if (!NT_STATUS_IS_OK(status
)) {
3059 if (DEBUGLEVEL
>= 10) {
3060 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx
, &r
);
3063 if (NT_STATUS_IS_ERR(status
)) {
3067 /* Return variables */
3071 *werror
= r
.out
.result
;
3074 return werror_to_ntstatus(r
.out
.result
);
3077 NTSTATUS
rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client
*cli
,
3078 TALLOC_CTX
*mem_ctx
,
3079 struct policy_handle
*handle
/* [in] [ref] */,
3080 uint32_t flags
/* [in] */,
3081 uint32_t options
/* [in] */,
3082 const char *local_machine
/* [in] [unique,charset(UTF16)] */,
3083 uint32_t printer_local
/* [in] */,
3084 struct spoolss_NotifyOption
*notify_options
/* [in] [unique] */,
3087 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r
;
3091 r
.in
.handle
= handle
;
3093 r
.in
.options
= options
;
3094 r
.in
.local_machine
= local_machine
;
3095 r
.in
.printer_local
= printer_local
;
3096 r
.in
.notify_options
= notify_options
;
3098 if (DEBUGLEVEL
>= 10) {
3099 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, &r
);
3102 status
= cli
->dispatch(cli
,
3105 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
,
3108 if (!NT_STATUS_IS_OK(status
)) {
3112 if (DEBUGLEVEL
>= 10) {
3113 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, &r
);
3116 if (NT_STATUS_IS_ERR(status
)) {
3120 /* Return variables */
3124 *werror
= r
.out
.result
;
3127 return werror_to_ntstatus(r
.out
.result
);
3130 NTSTATUS
rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client
*cli
,
3131 TALLOC_CTX
*mem_ctx
,
3132 struct policy_handle
*handle
/* [in] [ref] */,
3133 uint32_t color
/* [in] */,
3134 uint32_t flags
/* [in] */,
3135 uint32_t *reply_result
/* [out] [ref] */,
3136 uint32_t reply_type
/* [in] */,
3137 union spoolss_ReplyPrinterInfo info
/* [in] [switch_is(reply_type)] */,
3140 struct spoolss_RouterReplyPrinterEx r
;
3144 r
.in
.handle
= handle
;
3147 r
.in
.reply_type
= reply_type
;
3150 if (DEBUGLEVEL
>= 10) {
3151 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx
, &r
);
3154 status
= cli
->dispatch(cli
,
3157 NDR_SPOOLSS_ROUTERREPLYPRINTEREX
,
3160 if (!NT_STATUS_IS_OK(status
)) {
3164 if (DEBUGLEVEL
>= 10) {
3165 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx
, &r
);
3168 if (NT_STATUS_IS_ERR(status
)) {
3172 /* Return variables */
3173 *reply_result
= *r
.out
.reply_result
;
3177 *werror
= r
.out
.result
;
3180 return werror_to_ntstatus(r
.out
.result
);
3183 NTSTATUS
rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client
*cli
,
3184 TALLOC_CTX
*mem_ctx
,
3185 struct policy_handle
*handle
/* [in] [ref] */,
3186 uint32_t change_low
/* [in] */,
3187 struct spoolss_NotifyOption
*options
/* [in] [unique] */,
3188 struct spoolss_NotifyInfo
**info
/* [out] [ref] */,
3191 struct spoolss_RouterRefreshPrinterChangeNotify r
;
3195 r
.in
.handle
= handle
;
3196 r
.in
.change_low
= change_low
;
3197 r
.in
.options
= options
;
3199 if (DEBUGLEVEL
>= 10) {
3200 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, &r
);
3203 status
= cli
->dispatch(cli
,
3206 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY
,
3209 if (!NT_STATUS_IS_OK(status
)) {
3213 if (DEBUGLEVEL
>= 10) {
3214 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotify
, &r
);
3217 if (NT_STATUS_IS_ERR(status
)) {
3221 /* Return variables */
3222 *info
= *r
.out
.info
;
3226 *werror
= r
.out
.result
;
3229 return werror_to_ntstatus(r
.out
.result
);
3232 NTSTATUS
rpccli_spoolss_44(struct rpc_pipe_client
*cli
,
3233 TALLOC_CTX
*mem_ctx
,
3236 struct spoolss_44 r
;
3241 if (DEBUGLEVEL
>= 10) {
3242 NDR_PRINT_IN_DEBUG(spoolss_44
, &r
);
3245 status
= cli
->dispatch(cli
,
3251 if (!NT_STATUS_IS_OK(status
)) {
3255 if (DEBUGLEVEL
>= 10) {
3256 NDR_PRINT_OUT_DEBUG(spoolss_44
, &r
);
3259 if (NT_STATUS_IS_ERR(status
)) {
3263 /* Return variables */
3267 *werror
= r
.out
.result
;
3270 return werror_to_ntstatus(r
.out
.result
);
3273 NTSTATUS
rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client
*cli
,
3274 TALLOC_CTX
*mem_ctx
,
3275 const char *printername
/* [in] [unique,charset(UTF16)] */,
3276 const char *datatype
/* [in] [unique,charset(UTF16)] */,
3277 struct spoolss_DevmodeContainer devmode_ctr
/* [in] */,
3278 uint32_t access_mask
/* [in] */,
3279 uint32_t level
/* [in] */,
3280 union spoolss_UserLevel userlevel
/* [in] [switch_is(level)] */,
3281 struct policy_handle
*handle
/* [out] [ref] */,
3284 struct spoolss_OpenPrinterEx r
;
3288 r
.in
.printername
= printername
;
3289 r
.in
.datatype
= datatype
;
3290 r
.in
.devmode_ctr
= devmode_ctr
;
3291 r
.in
.access_mask
= access_mask
;
3293 r
.in
.userlevel
= userlevel
;
3295 if (DEBUGLEVEL
>= 10) {
3296 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx
, &r
);
3299 status
= cli
->dispatch(cli
,
3302 NDR_SPOOLSS_OPENPRINTEREX
,
3305 if (!NT_STATUS_IS_OK(status
)) {
3309 if (DEBUGLEVEL
>= 10) {
3310 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx
, &r
);
3313 if (NT_STATUS_IS_ERR(status
)) {
3317 /* Return variables */
3318 *handle
= *r
.out
.handle
;
3322 *werror
= r
.out
.result
;
3325 return werror_to_ntstatus(r
.out
.result
);
3328 NTSTATUS
rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client
*cli
,
3329 TALLOC_CTX
*mem_ctx
,
3330 const char *server
/* [in] [unique,charset(UTF16)] */,
3331 struct spoolss_SetPrinterInfoCtr
*info_ctr
/* [in] [ref] */,
3332 struct spoolss_DevmodeContainer
*devmode_ctr
/* [in] [ref] */,
3333 struct sec_desc_buf
*secdesc_ctr
/* [in] [ref] */,
3334 struct spoolss_UserLevelCtr
*userlevel_ctr
/* [in] [ref] */,
3335 struct policy_handle
*handle
/* [out] [ref] */,
3338 struct spoolss_AddPrinterEx r
;
3342 r
.in
.server
= server
;
3343 r
.in
.info_ctr
= info_ctr
;
3344 r
.in
.devmode_ctr
= devmode_ctr
;
3345 r
.in
.secdesc_ctr
= secdesc_ctr
;
3346 r
.in
.userlevel_ctr
= userlevel_ctr
;
3348 if (DEBUGLEVEL
>= 10) {
3349 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx
, &r
);
3352 status
= cli
->dispatch(cli
,
3355 NDR_SPOOLSS_ADDPRINTEREX
,
3358 if (!NT_STATUS_IS_OK(status
)) {
3362 if (DEBUGLEVEL
>= 10) {
3363 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx
, &r
);
3366 if (NT_STATUS_IS_ERR(status
)) {
3370 /* Return variables */
3371 *handle
= *r
.out
.handle
;
3375 *werror
= r
.out
.result
;
3378 return werror_to_ntstatus(r
.out
.result
);
3381 NTSTATUS
rpccli_spoolss_47(struct rpc_pipe_client
*cli
,
3382 TALLOC_CTX
*mem_ctx
,
3385 struct spoolss_47 r
;
3390 if (DEBUGLEVEL
>= 10) {
3391 NDR_PRINT_IN_DEBUG(spoolss_47
, &r
);
3394 status
= cli
->dispatch(cli
,
3400 if (!NT_STATUS_IS_OK(status
)) {
3404 if (DEBUGLEVEL
>= 10) {
3405 NDR_PRINT_OUT_DEBUG(spoolss_47
, &r
);
3408 if (NT_STATUS_IS_ERR(status
)) {
3412 /* Return variables */
3416 *werror
= r
.out
.result
;
3419 return werror_to_ntstatus(r
.out
.result
);
3422 NTSTATUS
rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client
*cli
,
3423 TALLOC_CTX
*mem_ctx
,
3424 struct policy_handle
*handle
/* [in] [ref] */,
3425 uint32_t enum_index
/* [in] */,
3426 const char *value_name
/* [out] [charset(UTF16),size_is(value_offered/2)] */,
3427 uint32_t value_offered
/* [in] */,
3428 uint32_t *value_needed
/* [out] [ref] */,
3429 enum winreg_Type
*type
/* [out] [ref] */,
3430 uint8_t *data
/* [out] [ref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(data_offered)] */,
3431 uint32_t data_offered
/* [in] */,
3432 uint32_t *data_needed
/* [out] [ref] */,
3435 struct spoolss_EnumPrinterData r
;
3439 r
.in
.handle
= handle
;
3440 r
.in
.enum_index
= enum_index
;
3441 r
.in
.value_offered
= value_offered
;
3442 r
.in
.data_offered
= data_offered
;
3444 if (DEBUGLEVEL
>= 10) {
3445 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData
, &r
);
3448 status
= cli
->dispatch(cli
,
3451 NDR_SPOOLSS_ENUMPRINTERDATA
,
3454 if (!NT_STATUS_IS_OK(status
)) {
3458 if (DEBUGLEVEL
>= 10) {
3459 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData
, &r
);
3462 if (NT_STATUS_IS_ERR(status
)) {
3466 /* Return variables */
3467 memcpy(CONST_DISCARD(char *, value_name
), r
.out
.value_name
, r
.in
.value_offered
/ 2 * sizeof(*value_name
));
3468 *value_needed
= *r
.out
.value_needed
;
3469 *type
= *r
.out
.type
;
3470 memcpy(data
, r
.out
.data
, r
.in
.data_offered
* sizeof(*data
));
3471 *data_needed
= *r
.out
.data_needed
;
3475 *werror
= r
.out
.result
;
3478 return werror_to_ntstatus(r
.out
.result
);
3481 NTSTATUS
rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client
*cli
,
3482 TALLOC_CTX
*mem_ctx
,
3483 struct policy_handle
*handle
/* [in] [ref] */,
3484 const char *value_name
/* [in] [charset(UTF16)] */,
3487 struct spoolss_DeletePrinterData r
;
3491 r
.in
.handle
= handle
;
3492 r
.in
.value_name
= value_name
;
3494 if (DEBUGLEVEL
>= 10) {
3495 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData
, &r
);
3498 status
= cli
->dispatch(cli
,
3501 NDR_SPOOLSS_DELETEPRINTERDATA
,
3504 if (!NT_STATUS_IS_OK(status
)) {
3508 if (DEBUGLEVEL
>= 10) {
3509 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData
, &r
);
3512 if (NT_STATUS_IS_ERR(status
)) {
3516 /* Return variables */
3520 *werror
= r
.out
.result
;
3523 return werror_to_ntstatus(r
.out
.result
);
3526 NTSTATUS
rpccli_spoolss_4a(struct rpc_pipe_client
*cli
,
3527 TALLOC_CTX
*mem_ctx
,
3530 struct spoolss_4a r
;
3535 if (DEBUGLEVEL
>= 10) {
3536 NDR_PRINT_IN_DEBUG(spoolss_4a
, &r
);
3539 status
= cli
->dispatch(cli
,
3545 if (!NT_STATUS_IS_OK(status
)) {
3549 if (DEBUGLEVEL
>= 10) {
3550 NDR_PRINT_OUT_DEBUG(spoolss_4a
, &r
);
3553 if (NT_STATUS_IS_ERR(status
)) {
3557 /* Return variables */
3561 *werror
= r
.out
.result
;
3564 return werror_to_ntstatus(r
.out
.result
);
3567 NTSTATUS
rpccli_spoolss_4b(struct rpc_pipe_client
*cli
,
3568 TALLOC_CTX
*mem_ctx
,
3571 struct spoolss_4b r
;
3576 if (DEBUGLEVEL
>= 10) {
3577 NDR_PRINT_IN_DEBUG(spoolss_4b
, &r
);
3580 status
= cli
->dispatch(cli
,
3586 if (!NT_STATUS_IS_OK(status
)) {
3590 if (DEBUGLEVEL
>= 10) {
3591 NDR_PRINT_OUT_DEBUG(spoolss_4b
, &r
);
3594 if (NT_STATUS_IS_ERR(status
)) {
3598 /* Return variables */
3602 *werror
= r
.out
.result
;
3605 return werror_to_ntstatus(r
.out
.result
);
3608 NTSTATUS
rpccli_spoolss_4c(struct rpc_pipe_client
*cli
,
3609 TALLOC_CTX
*mem_ctx
,
3612 struct spoolss_4c r
;
3617 if (DEBUGLEVEL
>= 10) {
3618 NDR_PRINT_IN_DEBUG(spoolss_4c
, &r
);
3621 status
= cli
->dispatch(cli
,
3627 if (!NT_STATUS_IS_OK(status
)) {
3631 if (DEBUGLEVEL
>= 10) {
3632 NDR_PRINT_OUT_DEBUG(spoolss_4c
, &r
);
3635 if (NT_STATUS_IS_ERR(status
)) {
3639 /* Return variables */
3643 *werror
= r
.out
.result
;
3646 return werror_to_ntstatus(r
.out
.result
);
3649 NTSTATUS
rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client
*cli
,
3650 TALLOC_CTX
*mem_ctx
,
3651 struct policy_handle
*handle
/* [in] [ref] */,
3652 const char *key_name
/* [in] [charset(UTF16)] */,
3653 const char *value_name
/* [in] [charset(UTF16)] */,
3654 enum winreg_Type type
/* [in] */,
3655 uint8_t *buffer
/* [in] [ref,size_is(offered)] */,
3656 uint32_t offered
/* [in] */,
3659 struct spoolss_SetPrinterDataEx r
;
3663 r
.in
.handle
= handle
;
3664 r
.in
.key_name
= key_name
;
3665 r
.in
.value_name
= value_name
;
3667 r
.in
.buffer
= buffer
;
3668 r
.in
.offered
= offered
;
3670 if (DEBUGLEVEL
>= 10) {
3671 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx
, &r
);
3674 status
= cli
->dispatch(cli
,
3677 NDR_SPOOLSS_SETPRINTERDATAEX
,
3680 if (!NT_STATUS_IS_OK(status
)) {
3684 if (DEBUGLEVEL
>= 10) {
3685 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx
, &r
);
3688 if (NT_STATUS_IS_ERR(status
)) {
3692 /* Return variables */
3696 *werror
= r
.out
.result
;
3699 return werror_to_ntstatus(r
.out
.result
);
3702 NTSTATUS
rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client
*cli
,
3703 TALLOC_CTX
*mem_ctx
,
3704 struct policy_handle
*handle
/* [in] [ref] */,
3705 const char *key_name
/* [in] [charset(UTF16)] */,
3706 const char *value_name
/* [in] [charset(UTF16)] */,
3707 enum winreg_Type
*type
/* [out] [ref] */,
3708 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
3709 uint32_t offered
/* [in] */,
3710 uint32_t *needed
/* [out] [ref] */,
3713 struct spoolss_GetPrinterDataEx r
;
3717 r
.in
.handle
= handle
;
3718 r
.in
.key_name
= key_name
;
3719 r
.in
.value_name
= value_name
;
3720 r
.in
.offered
= offered
;
3722 if (DEBUGLEVEL
>= 10) {
3723 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx
, &r
);
3726 status
= cli
->dispatch(cli
,
3729 NDR_SPOOLSS_GETPRINTERDATAEX
,
3732 if (!NT_STATUS_IS_OK(status
)) {
3736 if (DEBUGLEVEL
>= 10) {
3737 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx
, &r
);
3740 if (NT_STATUS_IS_ERR(status
)) {
3744 /* Return variables */
3745 *type
= *r
.out
.type
;
3746 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
3747 *needed
= *r
.out
.needed
;
3751 *werror
= r
.out
.result
;
3754 return werror_to_ntstatus(r
.out
.result
);
3757 NTSTATUS
rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client
*cli
,
3758 TALLOC_CTX
*mem_ctx
,
3759 struct policy_handle
*handle
/* [in] [ref] */,
3760 const char *key_name
/* [in] [charset(UTF16)] */,
3761 uint32_t offered
/* [in] */,
3762 uint32_t *count
/* [out] [ref] */,
3763 struct spoolss_PrinterEnumValues
**info
/* [out] [ref,size_is(,*count)] */,
3764 uint32_t *needed
/* [out] [ref] */,
3767 struct spoolss_EnumPrinterDataEx r
;
3771 r
.in
.handle
= handle
;
3772 r
.in
.key_name
= key_name
;
3773 r
.in
.offered
= offered
;
3775 if (DEBUGLEVEL
>= 10) {
3776 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx
, &r
);
3779 status
= cli
->dispatch(cli
,
3782 NDR_SPOOLSS_ENUMPRINTERDATAEX
,
3785 if (!NT_STATUS_IS_OK(status
)) {
3789 if (DEBUGLEVEL
>= 10) {
3790 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx
, &r
);
3793 if (NT_STATUS_IS_ERR(status
)) {
3797 /* Return variables */
3798 *count
= *r
.out
.count
;
3799 *info
= *r
.out
.info
;
3800 *needed
= *r
.out
.needed
;
3804 *werror
= r
.out
.result
;
3807 return werror_to_ntstatus(r
.out
.result
);
3810 NTSTATUS
rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client
*cli
,
3811 TALLOC_CTX
*mem_ctx
,
3812 struct policy_handle
*handle
/* [in] [ref] */,
3813 const char *key_name
/* [in] [charset(UTF16)] */,
3814 const char ** *key_buffer
/* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */,
3815 uint32_t offered
/* [in] */,
3816 uint32_t *needed
/* [out] [ref] */,
3819 struct spoolss_EnumPrinterKey r
;
3823 r
.in
.handle
= handle
;
3824 r
.in
.key_name
= key_name
;
3825 r
.in
.offered
= offered
;
3827 if (DEBUGLEVEL
>= 10) {
3828 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey
, &r
);
3831 status
= cli
->dispatch(cli
,
3834 NDR_SPOOLSS_ENUMPRINTERKEY
,
3837 if (!NT_STATUS_IS_OK(status
)) {
3841 if (DEBUGLEVEL
>= 10) {
3842 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey
, &r
);
3845 if (NT_STATUS_IS_ERR(status
)) {
3849 /* Return variables */
3850 *key_buffer
= *r
.out
.key_buffer
;
3851 *needed
= *r
.out
.needed
;
3855 *werror
= r
.out
.result
;
3858 return werror_to_ntstatus(r
.out
.result
);
3861 NTSTATUS
rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client
*cli
,
3862 TALLOC_CTX
*mem_ctx
,
3863 struct policy_handle
*handle
/* [in] [ref] */,
3864 const char *key_name
/* [in] [charset(UTF16)] */,
3865 const char *value_name
/* [in] [charset(UTF16)] */,
3868 struct spoolss_DeletePrinterDataEx r
;
3872 r
.in
.handle
= handle
;
3873 r
.in
.key_name
= key_name
;
3874 r
.in
.value_name
= value_name
;
3876 if (DEBUGLEVEL
>= 10) {
3877 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx
, &r
);
3880 status
= cli
->dispatch(cli
,
3883 NDR_SPOOLSS_DELETEPRINTERDATAEX
,
3886 if (!NT_STATUS_IS_OK(status
)) {
3890 if (DEBUGLEVEL
>= 10) {
3891 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx
, &r
);
3894 if (NT_STATUS_IS_ERR(status
)) {
3898 /* Return variables */
3902 *werror
= r
.out
.result
;
3905 return werror_to_ntstatus(r
.out
.result
);
3908 NTSTATUS
rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client
*cli
,
3909 TALLOC_CTX
*mem_ctx
,
3910 struct policy_handle
*handle
/* [in] [ref] */,
3911 const char *key_name
/* [in] [charset(UTF16)] */,
3914 struct spoolss_DeletePrinterKey r
;
3918 r
.in
.handle
= handle
;
3919 r
.in
.key_name
= key_name
;
3921 if (DEBUGLEVEL
>= 10) {
3922 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey
, &r
);
3925 status
= cli
->dispatch(cli
,
3928 NDR_SPOOLSS_DELETEPRINTERKEY
,
3931 if (!NT_STATUS_IS_OK(status
)) {
3935 if (DEBUGLEVEL
>= 10) {
3936 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey
, &r
);
3939 if (NT_STATUS_IS_ERR(status
)) {
3943 /* Return variables */
3947 *werror
= r
.out
.result
;
3950 return werror_to_ntstatus(r
.out
.result
);
3953 NTSTATUS
rpccli_spoolss_53(struct rpc_pipe_client
*cli
,
3954 TALLOC_CTX
*mem_ctx
,
3957 struct spoolss_53 r
;
3962 if (DEBUGLEVEL
>= 10) {
3963 NDR_PRINT_IN_DEBUG(spoolss_53
, &r
);
3966 status
= cli
->dispatch(cli
,
3972 if (!NT_STATUS_IS_OK(status
)) {
3976 if (DEBUGLEVEL
>= 10) {
3977 NDR_PRINT_OUT_DEBUG(spoolss_53
, &r
);
3980 if (NT_STATUS_IS_ERR(status
)) {
3984 /* Return variables */
3988 *werror
= r
.out
.result
;
3991 return werror_to_ntstatus(r
.out
.result
);
3994 NTSTATUS
rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client
*cli
,
3995 TALLOC_CTX
*mem_ctx
,
3996 const char *server
/* [in] [unique,charset(UTF16)] */,
3997 const char *architecture
/* [in] [charset(UTF16)] */,
3998 const char *driver
/* [in] [charset(UTF16)] */,
3999 uint32_t delete_flags
/* [in] */,
4000 uint32_t version
/* [in] */,
4003 struct spoolss_DeletePrinterDriverEx r
;
4007 r
.in
.server
= server
;
4008 r
.in
.architecture
= architecture
;
4009 r
.in
.driver
= driver
;
4010 r
.in
.delete_flags
= delete_flags
;
4011 r
.in
.version
= version
;
4013 if (DEBUGLEVEL
>= 10) {
4014 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx
, &r
);
4017 status
= cli
->dispatch(cli
,
4020 NDR_SPOOLSS_DELETEPRINTERDRIVEREX
,
4023 if (!NT_STATUS_IS_OK(status
)) {
4027 if (DEBUGLEVEL
>= 10) {
4028 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx
, &r
);
4031 if (NT_STATUS_IS_ERR(status
)) {
4035 /* Return variables */
4039 *werror
= r
.out
.result
;
4042 return werror_to_ntstatus(r
.out
.result
);
4045 NTSTATUS
rpccli_spoolss_55(struct rpc_pipe_client
*cli
,
4046 TALLOC_CTX
*mem_ctx
,
4049 struct spoolss_55 r
;
4054 if (DEBUGLEVEL
>= 10) {
4055 NDR_PRINT_IN_DEBUG(spoolss_55
, &r
);
4058 status
= cli
->dispatch(cli
,
4064 if (!NT_STATUS_IS_OK(status
)) {
4068 if (DEBUGLEVEL
>= 10) {
4069 NDR_PRINT_OUT_DEBUG(spoolss_55
, &r
);
4072 if (NT_STATUS_IS_ERR(status
)) {
4076 /* Return variables */
4080 *werror
= r
.out
.result
;
4083 return werror_to_ntstatus(r
.out
.result
);
4086 NTSTATUS
rpccli_spoolss_56(struct rpc_pipe_client
*cli
,
4087 TALLOC_CTX
*mem_ctx
,
4090 struct spoolss_56 r
;
4095 if (DEBUGLEVEL
>= 10) {
4096 NDR_PRINT_IN_DEBUG(spoolss_56
, &r
);
4099 status
= cli
->dispatch(cli
,
4105 if (!NT_STATUS_IS_OK(status
)) {
4109 if (DEBUGLEVEL
>= 10) {
4110 NDR_PRINT_OUT_DEBUG(spoolss_56
, &r
);
4113 if (NT_STATUS_IS_ERR(status
)) {
4117 /* Return variables */
4121 *werror
= r
.out
.result
;
4124 return werror_to_ntstatus(r
.out
.result
);
4127 NTSTATUS
rpccli_spoolss_57(struct rpc_pipe_client
*cli
,
4128 TALLOC_CTX
*mem_ctx
,
4131 struct spoolss_57 r
;
4136 if (DEBUGLEVEL
>= 10) {
4137 NDR_PRINT_IN_DEBUG(spoolss_57
, &r
);
4140 status
= cli
->dispatch(cli
,
4146 if (!NT_STATUS_IS_OK(status
)) {
4150 if (DEBUGLEVEL
>= 10) {
4151 NDR_PRINT_OUT_DEBUG(spoolss_57
, &r
);
4154 if (NT_STATUS_IS_ERR(status
)) {
4158 /* Return variables */
4162 *werror
= r
.out
.result
;
4165 return werror_to_ntstatus(r
.out
.result
);
4168 NTSTATUS
rpccli_spoolss_XcvData(struct rpc_pipe_client
*cli
,
4169 TALLOC_CTX
*mem_ctx
,
4170 struct policy_handle
*handle
/* [in] [ref] */,
4171 const char *function_name
/* [in] [charset(UTF16)] */,
4172 DATA_BLOB in_data
/* [in] */,
4173 uint32_t _in_data_length
/* [in] [value(r->in.in_data.length)] */,
4174 uint8_t *out_data
/* [out] [ref,size_is(out_data_size)] */,
4175 uint32_t out_data_size
/* [in] */,
4176 uint32_t *needed
/* [out] [ref] */,
4177 uint32_t *status_code
/* [in,out] [ref] */,
4180 struct spoolss_XcvData r
;
4184 r
.in
.handle
= handle
;
4185 r
.in
.function_name
= function_name
;
4186 r
.in
.in_data
= in_data
;
4187 r
.in
._in_data_length
= _in_data_length
;
4188 r
.in
.out_data_size
= out_data_size
;
4189 r
.in
.status_code
= status_code
;
4191 if (DEBUGLEVEL
>= 10) {
4192 NDR_PRINT_IN_DEBUG(spoolss_XcvData
, &r
);
4195 status
= cli
->dispatch(cli
,
4198 NDR_SPOOLSS_XCVDATA
,
4201 if (!NT_STATUS_IS_OK(status
)) {
4205 if (DEBUGLEVEL
>= 10) {
4206 NDR_PRINT_OUT_DEBUG(spoolss_XcvData
, &r
);
4209 if (NT_STATUS_IS_ERR(status
)) {
4213 /* Return variables */
4214 memcpy(out_data
, r
.out
.out_data
, r
.in
.out_data_size
* sizeof(*out_data
));
4215 *needed
= *r
.out
.needed
;
4216 *status_code
= *r
.out
.status_code
;
4220 *werror
= r
.out
.result
;
4223 return werror_to_ntstatus(r
.out
.result
);
4226 NTSTATUS
rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client
*cli
,
4227 TALLOC_CTX
*mem_ctx
,
4228 const char *servername
/* [in] [unique,charset(UTF16)] */,
4229 struct spoolss_AddDriverInfoCtr
*info_ctr
/* [in] [ref] */,
4230 uint32_t flags
/* [in] */,
4233 struct spoolss_AddPrinterDriverEx r
;
4237 r
.in
.servername
= servername
;
4238 r
.in
.info_ctr
= info_ctr
;
4241 if (DEBUGLEVEL
>= 10) {
4242 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx
, &r
);
4245 status
= cli
->dispatch(cli
,
4248 NDR_SPOOLSS_ADDPRINTERDRIVEREX
,
4251 if (!NT_STATUS_IS_OK(status
)) {
4255 if (DEBUGLEVEL
>= 10) {
4256 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx
, &r
);
4259 if (NT_STATUS_IS_ERR(status
)) {
4263 /* Return variables */
4267 *werror
= r
.out
.result
;
4270 return werror_to_ntstatus(r
.out
.result
);
4273 NTSTATUS
rpccli_spoolss_5a(struct rpc_pipe_client
*cli
,
4274 TALLOC_CTX
*mem_ctx
,
4277 struct spoolss_5a r
;
4282 if (DEBUGLEVEL
>= 10) {
4283 NDR_PRINT_IN_DEBUG(spoolss_5a
, &r
);
4286 status
= cli
->dispatch(cli
,
4292 if (!NT_STATUS_IS_OK(status
)) {
4296 if (DEBUGLEVEL
>= 10) {
4297 NDR_PRINT_OUT_DEBUG(spoolss_5a
, &r
);
4300 if (NT_STATUS_IS_ERR(status
)) {
4304 /* Return variables */
4308 *werror
= r
.out
.result
;
4311 return werror_to_ntstatus(r
.out
.result
);
4314 NTSTATUS
rpccli_spoolss_5b(struct rpc_pipe_client
*cli
,
4315 TALLOC_CTX
*mem_ctx
,
4318 struct spoolss_5b r
;
4323 if (DEBUGLEVEL
>= 10) {
4324 NDR_PRINT_IN_DEBUG(spoolss_5b
, &r
);
4327 status
= cli
->dispatch(cli
,
4333 if (!NT_STATUS_IS_OK(status
)) {
4337 if (DEBUGLEVEL
>= 10) {
4338 NDR_PRINT_OUT_DEBUG(spoolss_5b
, &r
);
4341 if (NT_STATUS_IS_ERR(status
)) {
4345 /* Return variables */
4349 *werror
= r
.out
.result
;
4352 return werror_to_ntstatus(r
.out
.result
);
4355 NTSTATUS
rpccli_spoolss_5c(struct rpc_pipe_client
*cli
,
4356 TALLOC_CTX
*mem_ctx
,
4359 struct spoolss_5c r
;
4364 if (DEBUGLEVEL
>= 10) {
4365 NDR_PRINT_IN_DEBUG(spoolss_5c
, &r
);
4368 status
= cli
->dispatch(cli
,
4374 if (!NT_STATUS_IS_OK(status
)) {
4378 if (DEBUGLEVEL
>= 10) {
4379 NDR_PRINT_OUT_DEBUG(spoolss_5c
, &r
);
4382 if (NT_STATUS_IS_ERR(status
)) {
4386 /* Return variables */
4390 *werror
= r
.out
.result
;
4393 return werror_to_ntstatus(r
.out
.result
);
4396 NTSTATUS
rpccli_spoolss_5d(struct rpc_pipe_client
*cli
,
4397 TALLOC_CTX
*mem_ctx
,
4400 struct spoolss_5d r
;
4405 if (DEBUGLEVEL
>= 10) {
4406 NDR_PRINT_IN_DEBUG(spoolss_5d
, &r
);
4409 status
= cli
->dispatch(cli
,
4415 if (!NT_STATUS_IS_OK(status
)) {
4419 if (DEBUGLEVEL
>= 10) {
4420 NDR_PRINT_OUT_DEBUG(spoolss_5d
, &r
);
4423 if (NT_STATUS_IS_ERR(status
)) {
4427 /* Return variables */
4431 *werror
= r
.out
.result
;
4434 return werror_to_ntstatus(r
.out
.result
);
4437 NTSTATUS
rpccli_spoolss_5e(struct rpc_pipe_client
*cli
,
4438 TALLOC_CTX
*mem_ctx
,
4441 struct spoolss_5e r
;
4446 if (DEBUGLEVEL
>= 10) {
4447 NDR_PRINT_IN_DEBUG(spoolss_5e
, &r
);
4450 status
= cli
->dispatch(cli
,
4456 if (!NT_STATUS_IS_OK(status
)) {
4460 if (DEBUGLEVEL
>= 10) {
4461 NDR_PRINT_OUT_DEBUG(spoolss_5e
, &r
);
4464 if (NT_STATUS_IS_ERR(status
)) {
4468 /* Return variables */
4472 *werror
= r
.out
.result
;
4475 return werror_to_ntstatus(r
.out
.result
);
4478 NTSTATUS
rpccli_spoolss_5f(struct rpc_pipe_client
*cli
,
4479 TALLOC_CTX
*mem_ctx
,
4482 struct spoolss_5f r
;
4487 if (DEBUGLEVEL
>= 10) {
4488 NDR_PRINT_IN_DEBUG(spoolss_5f
, &r
);
4491 status
= cli
->dispatch(cli
,
4497 if (!NT_STATUS_IS_OK(status
)) {
4501 if (DEBUGLEVEL
>= 10) {
4502 NDR_PRINT_OUT_DEBUG(spoolss_5f
, &r
);
4505 if (NT_STATUS_IS_ERR(status
)) {
4509 /* Return variables */
4513 *werror
= r
.out
.result
;
4516 return werror_to_ntstatus(r
.out
.result
);