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 union spoolss_PrinterInfo
*info
/* [out] [unique,switch_is(level),size_is(count)] */,
17 uint32_t *needed
/* [out] [ref] */,
18 uint32_t count
/* [out] */,
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 if (info
&& r
.out
.info
) {
55 memcpy(info
, r
.out
.info
, count
* sizeof(*info
));
57 *needed
= *r
.out
.needed
;
58 return NT_STATUS_NOT_SUPPORTED
;
62 *werror
= r
.out
.result
;
65 return werror_to_ntstatus(r
.out
.result
);
68 NTSTATUS
rpccli_spoolss_OpenPrinter(struct rpc_pipe_client
*cli
,
70 const char *printername
/* [in] [unique,charset(UTF16)] */,
71 const char *datatype
/* [in] [unique,charset(UTF16)] */,
72 struct spoolss_DevmodeContainer devmode_ctr
/* [in] */,
73 uint32_t access_mask
/* [in] */,
74 struct policy_handle
*handle
/* [out] [ref] */,
77 struct spoolss_OpenPrinter r
;
81 r
.in
.printername
= printername
;
82 r
.in
.datatype
= datatype
;
83 r
.in
.devmode_ctr
= devmode_ctr
;
84 r
.in
.access_mask
= access_mask
;
86 if (DEBUGLEVEL
>= 10) {
87 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter
, &r
);
90 status
= cli
->dispatch(cli
,
93 NDR_SPOOLSS_OPENPRINTER
,
96 if (!NT_STATUS_IS_OK(status
)) {
100 if (DEBUGLEVEL
>= 10) {
101 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter
, &r
);
104 if (NT_STATUS_IS_ERR(status
)) {
108 /* Return variables */
109 *handle
= *r
.out
.handle
;
113 *werror
= r
.out
.result
;
116 return werror_to_ntstatus(r
.out
.result
);
119 NTSTATUS
rpccli_spoolss_SetJob(struct rpc_pipe_client
*cli
,
121 struct policy_handle
*handle
/* [in] [ref] */,
122 uint32_t job_id
/* [in] */,
123 struct spoolss_JobInfoContainer
*ctr
/* [in] [unique] */,
124 enum spoolss_JobControl command
/* [in] */,
127 struct spoolss_SetJob r
;
131 r
.in
.handle
= handle
;
132 r
.in
.job_id
= job_id
;
134 r
.in
.command
= command
;
136 if (DEBUGLEVEL
>= 10) {
137 NDR_PRINT_IN_DEBUG(spoolss_SetJob
, &r
);
140 status
= cli
->dispatch(cli
,
146 if (!NT_STATUS_IS_OK(status
)) {
150 if (DEBUGLEVEL
>= 10) {
151 NDR_PRINT_OUT_DEBUG(spoolss_SetJob
, &r
);
154 if (NT_STATUS_IS_ERR(status
)) {
158 /* Return variables */
162 *werror
= r
.out
.result
;
165 return werror_to_ntstatus(r
.out
.result
);
168 NTSTATUS
rpccli_spoolss_GetJob(struct rpc_pipe_client
*cli
,
170 struct policy_handle
*handle
/* [in] [ref] */,
171 uint32_t job_id
/* [in] */,
172 uint32_t level
/* [in] */,
173 DATA_BLOB
*buffer
/* [in] [unique] */,
174 uint32_t offered
/* [in] */,
175 union spoolss_JobInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
176 uint32_t *needed
/* [out] [ref] */,
179 struct spoolss_GetJob r
;
183 r
.in
.handle
= handle
;
184 r
.in
.job_id
= job_id
;
186 r
.in
.buffer
= buffer
;
187 r
.in
.offered
= offered
;
189 if (DEBUGLEVEL
>= 10) {
190 NDR_PRINT_IN_DEBUG(spoolss_GetJob
, &r
);
193 status
= cli
->dispatch(cli
,
199 if (!NT_STATUS_IS_OK(status
)) {
203 if (DEBUGLEVEL
>= 10) {
204 NDR_PRINT_OUT_DEBUG(spoolss_GetJob
, &r
);
207 if (NT_STATUS_IS_ERR(status
)) {
211 /* Return variables */
212 if (info
&& r
.out
.info
) {
215 *needed
= *r
.out
.needed
;
219 *werror
= r
.out
.result
;
222 return werror_to_ntstatus(r
.out
.result
);
225 NTSTATUS
rpccli_spoolss_EnumJobs(struct rpc_pipe_client
*cli
,
227 struct policy_handle
*handle
/* [in] [ref] */,
228 uint32_t firstjob
/* [in] */,
229 uint32_t numjobs
/* [in] */,
230 uint32_t level
/* [in] */,
231 DATA_BLOB
*buffer
/* [in] [unique] */,
232 uint32_t offered
/* [in] */,
233 union spoolss_JobInfo
*info
/* [out] [unique,switch_is(level),size_is(count)] */,
234 uint32_t *needed
/* [out] [ref] */,
235 uint32_t count
/* [out] */,
238 struct spoolss_EnumJobs r
;
242 r
.in
.handle
= handle
;
243 r
.in
.firstjob
= firstjob
;
244 r
.in
.numjobs
= numjobs
;
246 r
.in
.buffer
= buffer
;
247 r
.in
.offered
= offered
;
249 if (DEBUGLEVEL
>= 10) {
250 NDR_PRINT_IN_DEBUG(spoolss_EnumJobs
, &r
);
253 status
= cli
->dispatch(cli
,
256 NDR_SPOOLSS_ENUMJOBS
,
259 if (!NT_STATUS_IS_OK(status
)) {
263 if (DEBUGLEVEL
>= 10) {
264 NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs
, &r
);
267 if (NT_STATUS_IS_ERR(status
)) {
271 /* Return variables */
272 if (info
&& r
.out
.info
) {
273 memcpy(info
, r
.out
.info
, count
* sizeof(*info
));
275 *needed
= *r
.out
.needed
;
276 return NT_STATUS_NOT_SUPPORTED
;
280 *werror
= r
.out
.result
;
283 return werror_to_ntstatus(r
.out
.result
);
286 NTSTATUS
rpccli_spoolss_AddPrinter(struct rpc_pipe_client
*cli
,
290 struct spoolss_AddPrinter r
;
295 if (DEBUGLEVEL
>= 10) {
296 NDR_PRINT_IN_DEBUG(spoolss_AddPrinter
, &r
);
299 status
= cli
->dispatch(cli
,
302 NDR_SPOOLSS_ADDPRINTER
,
305 if (!NT_STATUS_IS_OK(status
)) {
309 if (DEBUGLEVEL
>= 10) {
310 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter
, &r
);
313 if (NT_STATUS_IS_ERR(status
)) {
317 /* Return variables */
321 *werror
= r
.out
.result
;
324 return werror_to_ntstatus(r
.out
.result
);
327 NTSTATUS
rpccli_spoolss_DeletePrinter(struct rpc_pipe_client
*cli
,
329 struct policy_handle
*handle
/* [in] [ref] */,
332 struct spoolss_DeletePrinter r
;
336 r
.in
.handle
= handle
;
338 if (DEBUGLEVEL
>= 10) {
339 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter
, &r
);
342 status
= cli
->dispatch(cli
,
345 NDR_SPOOLSS_DELETEPRINTER
,
348 if (!NT_STATUS_IS_OK(status
)) {
352 if (DEBUGLEVEL
>= 10) {
353 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter
, &r
);
356 if (NT_STATUS_IS_ERR(status
)) {
360 /* Return variables */
364 *werror
= r
.out
.result
;
367 return werror_to_ntstatus(r
.out
.result
);
370 NTSTATUS
rpccli_spoolss_SetPrinter(struct rpc_pipe_client
*cli
,
372 struct policy_handle
*handle
/* [in] [ref] */,
373 uint32_t level
/* [in] */,
374 union spoolss_SetPrinterInfo info
/* [in] [switch_is(level)] */,
375 struct spoolss_DevmodeContainer devmode_ctr
/* [in] */,
376 struct sec_desc_buf secdesc_ctr
/* [in] */,
377 enum spoolss_PrinterControl command
/* [in] */,
380 struct spoolss_SetPrinter r
;
384 r
.in
.handle
= handle
;
387 r
.in
.devmode_ctr
= devmode_ctr
;
388 r
.in
.secdesc_ctr
= secdesc_ctr
;
389 r
.in
.command
= command
;
391 if (DEBUGLEVEL
>= 10) {
392 NDR_PRINT_IN_DEBUG(spoolss_SetPrinter
, &r
);
395 status
= cli
->dispatch(cli
,
398 NDR_SPOOLSS_SETPRINTER
,
401 if (!NT_STATUS_IS_OK(status
)) {
405 if (DEBUGLEVEL
>= 10) {
406 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter
, &r
);
409 if (NT_STATUS_IS_ERR(status
)) {
413 /* Return variables */
417 *werror
= r
.out
.result
;
420 return werror_to_ntstatus(r
.out
.result
);
423 NTSTATUS
rpccli_spoolss_GetPrinter(struct rpc_pipe_client
*cli
,
425 struct policy_handle
*handle
/* [in] [ref] */,
426 uint32_t level
/* [in] */,
427 DATA_BLOB
*buffer
/* [in] [unique] */,
428 uint32_t offered
/* [in] */,
429 union spoolss_PrinterInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
430 uint32_t *needed
/* [out] [ref] */,
433 struct spoolss_GetPrinter r
;
437 r
.in
.handle
= handle
;
439 r
.in
.buffer
= buffer
;
440 r
.in
.offered
= offered
;
442 if (DEBUGLEVEL
>= 10) {
443 NDR_PRINT_IN_DEBUG(spoolss_GetPrinter
, &r
);
446 status
= cli
->dispatch(cli
,
449 NDR_SPOOLSS_GETPRINTER
,
452 if (!NT_STATUS_IS_OK(status
)) {
456 if (DEBUGLEVEL
>= 10) {
457 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter
, &r
);
460 if (NT_STATUS_IS_ERR(status
)) {
464 /* Return variables */
465 if (info
&& r
.out
.info
) {
468 *needed
= *r
.out
.needed
;
472 *werror
= r
.out
.result
;
475 return werror_to_ntstatus(r
.out
.result
);
478 NTSTATUS
rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client
*cli
,
482 struct spoolss_AddPrinterDriver r
;
487 if (DEBUGLEVEL
>= 10) {
488 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver
, &r
);
491 status
= cli
->dispatch(cli
,
494 NDR_SPOOLSS_ADDPRINTERDRIVER
,
497 if (!NT_STATUS_IS_OK(status
)) {
501 if (DEBUGLEVEL
>= 10) {
502 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver
, &r
);
505 if (NT_STATUS_IS_ERR(status
)) {
509 /* Return variables */
513 *werror
= r
.out
.result
;
516 return werror_to_ntstatus(r
.out
.result
);
519 NTSTATUS
rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client
*cli
,
521 const char *server
/* [in] [unique,charset(UTF16)] */,
522 const char *environment
/* [in] [unique,charset(UTF16)] */,
523 uint32_t level
/* [in] */,
524 DATA_BLOB
*buffer
/* [in] [unique] */,
525 uint32_t offered
/* [in] */,
526 union spoolss_DriverInfo
*info
/* [out] [unique,switch_is(level),size_is(count)] */,
527 uint32_t *needed
/* [out] [ref] */,
528 uint32_t count
/* [out] */,
531 struct spoolss_EnumPrinterDrivers r
;
535 r
.in
.server
= server
;
536 r
.in
.environment
= environment
;
538 r
.in
.buffer
= buffer
;
539 r
.in
.offered
= offered
;
541 if (DEBUGLEVEL
>= 10) {
542 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers
, &r
);
545 status
= cli
->dispatch(cli
,
548 NDR_SPOOLSS_ENUMPRINTERDRIVERS
,
551 if (!NT_STATUS_IS_OK(status
)) {
555 if (DEBUGLEVEL
>= 10) {
556 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers
, &r
);
559 if (NT_STATUS_IS_ERR(status
)) {
563 /* Return variables */
564 if (info
&& r
.out
.info
) {
565 memcpy(info
, r
.out
.info
, count
* sizeof(*info
));
567 *needed
= *r
.out
.needed
;
568 return NT_STATUS_NOT_SUPPORTED
;
572 *werror
= r
.out
.result
;
575 return werror_to_ntstatus(r
.out
.result
);
578 NTSTATUS
rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client
*cli
,
582 struct spoolss_GetPrinterDriver r
;
587 if (DEBUGLEVEL
>= 10) {
588 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver
, &r
);
591 status
= cli
->dispatch(cli
,
594 NDR_SPOOLSS_GETPRINTERDRIVER
,
597 if (!NT_STATUS_IS_OK(status
)) {
601 if (DEBUGLEVEL
>= 10) {
602 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver
, &r
);
605 if (NT_STATUS_IS_ERR(status
)) {
609 /* Return variables */
613 *werror
= r
.out
.result
;
616 return werror_to_ntstatus(r
.out
.result
);
619 NTSTATUS
rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client
*cli
,
621 const char *server
/* [in] [unique,charset(UTF16)] */,
622 const char *environment
/* [in] [unique,charset(UTF16)] */,
623 uint32_t level
/* [in] */,
624 DATA_BLOB
*buffer
/* [in] [unique] */,
625 uint32_t offered
/* [in] */,
626 union spoolss_DriverDirectoryInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
627 uint32_t *needed
/* [out] [ref] */,
630 struct spoolss_GetPrinterDriverDirectory r
;
634 r
.in
.server
= server
;
635 r
.in
.environment
= environment
;
637 r
.in
.buffer
= buffer
;
638 r
.in
.offered
= offered
;
640 if (DEBUGLEVEL
>= 10) {
641 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory
, &r
);
644 status
= cli
->dispatch(cli
,
647 NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY
,
650 if (!NT_STATUS_IS_OK(status
)) {
654 if (DEBUGLEVEL
>= 10) {
655 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory
, &r
);
658 if (NT_STATUS_IS_ERR(status
)) {
662 /* Return variables */
663 if (info
&& r
.out
.info
) {
666 *needed
= *r
.out
.needed
;
670 *werror
= r
.out
.result
;
673 return werror_to_ntstatus(r
.out
.result
);
676 NTSTATUS
rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client
*cli
,
678 struct policy_handle
*handle
/* [in] [ref] */,
679 const char *server
/* [in] [unique,charset(UTF16)] */,
680 const char *architecture
/* [in] [charset(UTF16)] */,
681 const char *driver
/* [in] [charset(UTF16)] */,
684 struct spoolss_DeletePrinterDriver r
;
688 r
.in
.handle
= handle
;
689 r
.in
.server
= server
;
690 r
.in
.architecture
= architecture
;
691 r
.in
.driver
= driver
;
693 if (DEBUGLEVEL
>= 10) {
694 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver
, &r
);
697 status
= cli
->dispatch(cli
,
700 NDR_SPOOLSS_DELETEPRINTERDRIVER
,
703 if (!NT_STATUS_IS_OK(status
)) {
707 if (DEBUGLEVEL
>= 10) {
708 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver
, &r
);
711 if (NT_STATUS_IS_ERR(status
)) {
715 /* Return variables */
719 *werror
= r
.out
.result
;
722 return werror_to_ntstatus(r
.out
.result
);
725 NTSTATUS
rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client
*cli
,
729 struct spoolss_AddPrintProcessor r
;
734 if (DEBUGLEVEL
>= 10) {
735 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor
, &r
);
738 status
= cli
->dispatch(cli
,
741 NDR_SPOOLSS_ADDPRINTPROCESSOR
,
744 if (!NT_STATUS_IS_OK(status
)) {
748 if (DEBUGLEVEL
>= 10) {
749 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor
, &r
);
752 if (NT_STATUS_IS_ERR(status
)) {
756 /* Return variables */
760 *werror
= r
.out
.result
;
763 return werror_to_ntstatus(r
.out
.result
);
766 NTSTATUS
rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client
*cli
,
768 const char *servername
/* [in] [unique,charset(UTF16)] */,
769 const char *environment
/* [in] [unique,charset(UTF16)] */,
770 uint32_t level
/* [in] */,
771 DATA_BLOB
*buffer
/* [in] [unique] */,
772 uint32_t offered
/* [in] */,
773 union spoolss_PrintProcessorInfo
*info
/* [out] [unique,switch_is(level),size_is(count)] */,
774 uint32_t *needed
/* [out] [ref] */,
775 uint32_t count
/* [out] */,
778 struct spoolss_EnumPrintProcessors r
;
782 r
.in
.servername
= servername
;
783 r
.in
.environment
= environment
;
785 r
.in
.buffer
= buffer
;
786 r
.in
.offered
= offered
;
788 if (DEBUGLEVEL
>= 10) {
789 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors
, &r
);
792 status
= cli
->dispatch(cli
,
795 NDR_SPOOLSS_ENUMPRINTPROCESSORS
,
798 if (!NT_STATUS_IS_OK(status
)) {
802 if (DEBUGLEVEL
>= 10) {
803 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors
, &r
);
806 if (NT_STATUS_IS_ERR(status
)) {
810 /* Return variables */
811 if (info
&& r
.out
.info
) {
812 memcpy(info
, r
.out
.info
, count
* sizeof(*info
));
814 *needed
= *r
.out
.needed
;
815 return NT_STATUS_NOT_SUPPORTED
;
819 *werror
= r
.out
.result
;
822 return werror_to_ntstatus(r
.out
.result
);
825 NTSTATUS
rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client
*cli
,
829 struct spoolss_GetPrintProcessorDirectory r
;
834 if (DEBUGLEVEL
>= 10) {
835 NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory
, &r
);
838 status
= cli
->dispatch(cli
,
841 NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY
,
844 if (!NT_STATUS_IS_OK(status
)) {
848 if (DEBUGLEVEL
>= 10) {
849 NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory
, &r
);
852 if (NT_STATUS_IS_ERR(status
)) {
856 /* Return variables */
860 *werror
= r
.out
.result
;
863 return werror_to_ntstatus(r
.out
.result
);
866 NTSTATUS
rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client
*cli
,
868 struct policy_handle
*handle
/* [in] [ref] */,
869 uint32_t level
/* [in] */,
870 union spoolss_DocumentInfo info
/* [in] [switch_is(level)] */,
871 uint32_t *job_id
/* [out] [ref] */,
874 struct spoolss_StartDocPrinter r
;
878 r
.in
.handle
= handle
;
882 if (DEBUGLEVEL
>= 10) {
883 NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter
, &r
);
886 status
= cli
->dispatch(cli
,
889 NDR_SPOOLSS_STARTDOCPRINTER
,
892 if (!NT_STATUS_IS_OK(status
)) {
896 if (DEBUGLEVEL
>= 10) {
897 NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter
, &r
);
900 if (NT_STATUS_IS_ERR(status
)) {
904 /* Return variables */
905 *job_id
= *r
.out
.job_id
;
909 *werror
= r
.out
.result
;
912 return werror_to_ntstatus(r
.out
.result
);
915 NTSTATUS
rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client
*cli
,
917 struct policy_handle
*handle
/* [in] [ref] */,
920 struct spoolss_StartPagePrinter r
;
924 r
.in
.handle
= handle
;
926 if (DEBUGLEVEL
>= 10) {
927 NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter
, &r
);
930 status
= cli
->dispatch(cli
,
933 NDR_SPOOLSS_STARTPAGEPRINTER
,
936 if (!NT_STATUS_IS_OK(status
)) {
940 if (DEBUGLEVEL
>= 10) {
941 NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter
, &r
);
944 if (NT_STATUS_IS_ERR(status
)) {
948 /* Return variables */
952 *werror
= r
.out
.result
;
955 return werror_to_ntstatus(r
.out
.result
);
958 NTSTATUS
rpccli_spoolss_WritePrinter(struct rpc_pipe_client
*cli
,
960 struct policy_handle
*handle
/* [in] [ref] */,
961 DATA_BLOB data
/* [in] */,
962 uint32_t _data_size
/* [in] [value(r->in.data.length)] */,
963 uint32_t *num_written
/* [out] [ref] */,
966 struct spoolss_WritePrinter r
;
970 r
.in
.handle
= handle
;
972 r
.in
._data_size
= _data_size
;
974 if (DEBUGLEVEL
>= 10) {
975 NDR_PRINT_IN_DEBUG(spoolss_WritePrinter
, &r
);
978 status
= cli
->dispatch(cli
,
981 NDR_SPOOLSS_WRITEPRINTER
,
984 if (!NT_STATUS_IS_OK(status
)) {
988 if (DEBUGLEVEL
>= 10) {
989 NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter
, &r
);
992 if (NT_STATUS_IS_ERR(status
)) {
996 /* Return variables */
997 *num_written
= *r
.out
.num_written
;
1001 *werror
= r
.out
.result
;
1004 return werror_to_ntstatus(r
.out
.result
);
1007 NTSTATUS
rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client
*cli
,
1008 TALLOC_CTX
*mem_ctx
,
1009 struct policy_handle
*handle
/* [in] [ref] */,
1012 struct spoolss_EndPagePrinter r
;
1016 r
.in
.handle
= handle
;
1018 if (DEBUGLEVEL
>= 10) {
1019 NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter
, &r
);
1022 status
= cli
->dispatch(cli
,
1025 NDR_SPOOLSS_ENDPAGEPRINTER
,
1028 if (!NT_STATUS_IS_OK(status
)) {
1032 if (DEBUGLEVEL
>= 10) {
1033 NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter
, &r
);
1036 if (NT_STATUS_IS_ERR(status
)) {
1040 /* Return variables */
1044 *werror
= r
.out
.result
;
1047 return werror_to_ntstatus(r
.out
.result
);
1050 NTSTATUS
rpccli_spoolss_AbortPrinter(struct rpc_pipe_client
*cli
,
1051 TALLOC_CTX
*mem_ctx
,
1052 struct policy_handle
*handle
/* [in] [ref] */,
1055 struct spoolss_AbortPrinter r
;
1059 r
.in
.handle
= handle
;
1061 if (DEBUGLEVEL
>= 10) {
1062 NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter
, &r
);
1065 status
= cli
->dispatch(cli
,
1068 NDR_SPOOLSS_ABORTPRINTER
,
1071 if (!NT_STATUS_IS_OK(status
)) {
1075 if (DEBUGLEVEL
>= 10) {
1076 NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter
, &r
);
1079 if (NT_STATUS_IS_ERR(status
)) {
1083 /* Return variables */
1087 *werror
= r
.out
.result
;
1090 return werror_to_ntstatus(r
.out
.result
);
1093 NTSTATUS
rpccli_spoolss_ReadPrinter(struct rpc_pipe_client
*cli
,
1094 TALLOC_CTX
*mem_ctx
,
1095 struct policy_handle
*handle
/* [in] [ref] */,
1096 uint8_t *data
/* [out] [ref,size_is(data_size)] */,
1097 uint32_t data_size
/* [in] */,
1098 uint32_t *_data_size
/* [out] [ref] */,
1101 struct spoolss_ReadPrinter r
;
1105 r
.in
.handle
= handle
;
1106 r
.in
.data_size
= data_size
;
1108 if (DEBUGLEVEL
>= 10) {
1109 NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter
, &r
);
1112 status
= cli
->dispatch(cli
,
1115 NDR_SPOOLSS_READPRINTER
,
1118 if (!NT_STATUS_IS_OK(status
)) {
1122 if (DEBUGLEVEL
>= 10) {
1123 NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter
, &r
);
1126 if (NT_STATUS_IS_ERR(status
)) {
1130 /* Return variables */
1131 memcpy(data
, r
.out
.data
, r
.in
.data_size
* sizeof(*data
));
1132 *_data_size
= *r
.out
._data_size
;
1136 *werror
= r
.out
.result
;
1139 return werror_to_ntstatus(r
.out
.result
);
1142 NTSTATUS
rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client
*cli
,
1143 TALLOC_CTX
*mem_ctx
,
1144 struct policy_handle
*handle
/* [in] [ref] */,
1147 struct spoolss_EndDocPrinter r
;
1151 r
.in
.handle
= handle
;
1153 if (DEBUGLEVEL
>= 10) {
1154 NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter
, &r
);
1157 status
= cli
->dispatch(cli
,
1160 NDR_SPOOLSS_ENDDOCPRINTER
,
1163 if (!NT_STATUS_IS_OK(status
)) {
1167 if (DEBUGLEVEL
>= 10) {
1168 NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter
, &r
);
1171 if (NT_STATUS_IS_ERR(status
)) {
1175 /* Return variables */
1179 *werror
= r
.out
.result
;
1182 return werror_to_ntstatus(r
.out
.result
);
1185 NTSTATUS
rpccli_spoolss_AddJob(struct rpc_pipe_client
*cli
,
1186 TALLOC_CTX
*mem_ctx
,
1189 struct spoolss_AddJob r
;
1194 if (DEBUGLEVEL
>= 10) {
1195 NDR_PRINT_IN_DEBUG(spoolss_AddJob
, &r
);
1198 status
= cli
->dispatch(cli
,
1204 if (!NT_STATUS_IS_OK(status
)) {
1208 if (DEBUGLEVEL
>= 10) {
1209 NDR_PRINT_OUT_DEBUG(spoolss_AddJob
, &r
);
1212 if (NT_STATUS_IS_ERR(status
)) {
1216 /* Return variables */
1220 *werror
= r
.out
.result
;
1223 return werror_to_ntstatus(r
.out
.result
);
1226 NTSTATUS
rpccli_spoolss_ScheduleJob(struct rpc_pipe_client
*cli
,
1227 TALLOC_CTX
*mem_ctx
,
1230 struct spoolss_ScheduleJob r
;
1235 if (DEBUGLEVEL
>= 10) {
1236 NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob
, &r
);
1239 status
= cli
->dispatch(cli
,
1242 NDR_SPOOLSS_SCHEDULEJOB
,
1245 if (!NT_STATUS_IS_OK(status
)) {
1249 if (DEBUGLEVEL
>= 10) {
1250 NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob
, &r
);
1253 if (NT_STATUS_IS_ERR(status
)) {
1257 /* Return variables */
1261 *werror
= r
.out
.result
;
1264 return werror_to_ntstatus(r
.out
.result
);
1267 NTSTATUS
rpccli_spoolss_GetPrinterData(struct rpc_pipe_client
*cli
,
1268 TALLOC_CTX
*mem_ctx
,
1269 struct policy_handle
*handle
/* [in] [ref] */,
1270 const char *value_name
/* [in] [charset(UTF16)] */,
1271 uint32_t offered
/* [in] */,
1272 enum spoolss_PrinterDataType type
/* [out] */,
1273 union spoolss_PrinterData data
/* [out] [subcontext_size(offered),subcontext(4),switch_is(type)] */,
1274 uint32_t *needed
/* [out] [ref] */,
1277 struct spoolss_GetPrinterData r
;
1281 r
.in
.handle
= handle
;
1282 r
.in
.value_name
= value_name
;
1283 r
.in
.offered
= offered
;
1285 if (DEBUGLEVEL
>= 10) {
1286 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData
, &r
);
1289 status
= cli
->dispatch(cli
,
1292 NDR_SPOOLSS_GETPRINTERDATA
,
1295 if (!NT_STATUS_IS_OK(status
)) {
1299 if (DEBUGLEVEL
>= 10) {
1300 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData
, &r
);
1303 if (NT_STATUS_IS_ERR(status
)) {
1307 /* Return variables */
1308 return NT_STATUS_NOT_SUPPORTED
;
1309 return NT_STATUS_NOT_SUPPORTED
;
1310 *needed
= *r
.out
.needed
;
1314 *werror
= r
.out
.result
;
1317 return werror_to_ntstatus(r
.out
.result
);
1320 NTSTATUS
rpccli_spoolss_SetPrinterData(struct rpc_pipe_client
*cli
,
1321 TALLOC_CTX
*mem_ctx
,
1322 struct policy_handle
*handle
/* [in] [ref] */,
1323 const char *value_name
/* [in] [charset(UTF16)] */,
1324 enum spoolss_PrinterDataType type
/* [in] */,
1325 union spoolss_PrinterData data
/* [in] [subcontext(4),switch_is(type)] */,
1326 uint32_t _offered
/* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */,
1329 struct spoolss_SetPrinterData r
;
1333 r
.in
.handle
= handle
;
1334 r
.in
.value_name
= value_name
;
1337 r
.in
._offered
= _offered
;
1339 if (DEBUGLEVEL
>= 10) {
1340 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData
, &r
);
1343 status
= cli
->dispatch(cli
,
1346 NDR_SPOOLSS_SETPRINTERDATA
,
1349 if (!NT_STATUS_IS_OK(status
)) {
1353 if (DEBUGLEVEL
>= 10) {
1354 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData
, &r
);
1357 if (NT_STATUS_IS_ERR(status
)) {
1361 /* Return variables */
1365 *werror
= r
.out
.result
;
1368 return werror_to_ntstatus(r
.out
.result
);
1371 NTSTATUS
rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client
*cli
,
1372 TALLOC_CTX
*mem_ctx
,
1375 struct spoolss_WaitForPrinterChange r
;
1380 if (DEBUGLEVEL
>= 10) {
1381 NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange
, &r
);
1384 status
= cli
->dispatch(cli
,
1387 NDR_SPOOLSS_WAITFORPRINTERCHANGE
,
1390 if (!NT_STATUS_IS_OK(status
)) {
1394 if (DEBUGLEVEL
>= 10) {
1395 NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange
, &r
);
1398 if (NT_STATUS_IS_ERR(status
)) {
1402 /* Return variables */
1406 *werror
= r
.out
.result
;
1409 return werror_to_ntstatus(r
.out
.result
);
1412 NTSTATUS
rpccli_spoolss_ClosePrinter(struct rpc_pipe_client
*cli
,
1413 TALLOC_CTX
*mem_ctx
,
1414 struct policy_handle
*handle
/* [in,out] [ref] */,
1417 struct spoolss_ClosePrinter r
;
1421 r
.in
.handle
= handle
;
1423 if (DEBUGLEVEL
>= 10) {
1424 NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter
, &r
);
1427 status
= cli
->dispatch(cli
,
1430 NDR_SPOOLSS_CLOSEPRINTER
,
1433 if (!NT_STATUS_IS_OK(status
)) {
1437 if (DEBUGLEVEL
>= 10) {
1438 NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter
, &r
);
1441 if (NT_STATUS_IS_ERR(status
)) {
1445 /* Return variables */
1446 *handle
= *r
.out
.handle
;
1450 *werror
= r
.out
.result
;
1453 return werror_to_ntstatus(r
.out
.result
);
1456 NTSTATUS
rpccli_spoolss_AddForm(struct rpc_pipe_client
*cli
,
1457 TALLOC_CTX
*mem_ctx
,
1458 struct policy_handle
*handle
/* [in] [ref] */,
1459 uint32_t level
/* [in] */,
1460 union spoolss_AddFormInfo info
/* [in] [switch_is(level)] */,
1463 struct spoolss_AddForm r
;
1467 r
.in
.handle
= handle
;
1471 if (DEBUGLEVEL
>= 10) {
1472 NDR_PRINT_IN_DEBUG(spoolss_AddForm
, &r
);
1475 status
= cli
->dispatch(cli
,
1478 NDR_SPOOLSS_ADDFORM
,
1481 if (!NT_STATUS_IS_OK(status
)) {
1485 if (DEBUGLEVEL
>= 10) {
1486 NDR_PRINT_OUT_DEBUG(spoolss_AddForm
, &r
);
1489 if (NT_STATUS_IS_ERR(status
)) {
1493 /* Return variables */
1497 *werror
= r
.out
.result
;
1500 return werror_to_ntstatus(r
.out
.result
);
1503 NTSTATUS
rpccli_spoolss_DeleteForm(struct rpc_pipe_client
*cli
,
1504 TALLOC_CTX
*mem_ctx
,
1505 struct policy_handle
*handle
/* [in] [ref] */,
1506 const char *form_name
/* [in] [charset(UTF16)] */,
1509 struct spoolss_DeleteForm r
;
1513 r
.in
.handle
= handle
;
1514 r
.in
.form_name
= form_name
;
1516 if (DEBUGLEVEL
>= 10) {
1517 NDR_PRINT_IN_DEBUG(spoolss_DeleteForm
, &r
);
1520 status
= cli
->dispatch(cli
,
1523 NDR_SPOOLSS_DELETEFORM
,
1526 if (!NT_STATUS_IS_OK(status
)) {
1530 if (DEBUGLEVEL
>= 10) {
1531 NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm
, &r
);
1534 if (NT_STATUS_IS_ERR(status
)) {
1538 /* Return variables */
1542 *werror
= r
.out
.result
;
1545 return werror_to_ntstatus(r
.out
.result
);
1548 NTSTATUS
rpccli_spoolss_GetForm(struct rpc_pipe_client
*cli
,
1549 TALLOC_CTX
*mem_ctx
,
1550 struct policy_handle
*handle
/* [in] [ref] */,
1551 const char *form_name
/* [in] [charset(UTF16)] */,
1552 uint32_t level
/* [in] */,
1553 DATA_BLOB
*buffer
/* [in] [unique] */,
1554 uint32_t offered
/* [in] */,
1555 union spoolss_FormInfo
*info
/* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */,
1556 uint32_t *needed
/* [out] [ref] */,
1559 struct spoolss_GetForm r
;
1563 r
.in
.handle
= handle
;
1564 r
.in
.form_name
= form_name
;
1566 r
.in
.buffer
= buffer
;
1567 r
.in
.offered
= offered
;
1569 if (DEBUGLEVEL
>= 10) {
1570 NDR_PRINT_IN_DEBUG(spoolss_GetForm
, &r
);
1573 status
= cli
->dispatch(cli
,
1576 NDR_SPOOLSS_GETFORM
,
1579 if (!NT_STATUS_IS_OK(status
)) {
1583 if (DEBUGLEVEL
>= 10) {
1584 NDR_PRINT_OUT_DEBUG(spoolss_GetForm
, &r
);
1587 if (NT_STATUS_IS_ERR(status
)) {
1591 /* Return variables */
1592 if (info
&& r
.out
.info
) {
1593 *info
= *r
.out
.info
;
1595 *needed
= *r
.out
.needed
;
1599 *werror
= r
.out
.result
;
1602 return werror_to_ntstatus(r
.out
.result
);
1605 NTSTATUS
rpccli_spoolss_SetForm(struct rpc_pipe_client
*cli
,
1606 TALLOC_CTX
*mem_ctx
,
1607 struct policy_handle
*handle
/* [in] [ref] */,
1608 const char *form_name
/* [in] [charset(UTF16)] */,
1609 uint32_t level
/* [in] */,
1610 union spoolss_AddFormInfo info
/* [in] [switch_is(level)] */,
1613 struct spoolss_SetForm r
;
1617 r
.in
.handle
= handle
;
1618 r
.in
.form_name
= form_name
;
1622 if (DEBUGLEVEL
>= 10) {
1623 NDR_PRINT_IN_DEBUG(spoolss_SetForm
, &r
);
1626 status
= cli
->dispatch(cli
,
1629 NDR_SPOOLSS_SETFORM
,
1632 if (!NT_STATUS_IS_OK(status
)) {
1636 if (DEBUGLEVEL
>= 10) {
1637 NDR_PRINT_OUT_DEBUG(spoolss_SetForm
, &r
);
1640 if (NT_STATUS_IS_ERR(status
)) {
1644 /* Return variables */
1648 *werror
= r
.out
.result
;
1651 return werror_to_ntstatus(r
.out
.result
);
1654 NTSTATUS
rpccli_spoolss_EnumForms(struct rpc_pipe_client
*cli
,
1655 TALLOC_CTX
*mem_ctx
,
1656 struct policy_handle
*handle
/* [in] [ref] */,
1657 uint32_t level
/* [in] */,
1658 DATA_BLOB
*buffer
/* [in] [unique] */,
1659 uint32_t offered
/* [in] */,
1660 union spoolss_FormInfo
*info
/* [out] [unique,switch_is(level),size_is(count)] */,
1661 uint32_t *needed
/* [out] [ref] */,
1662 uint32_t count
/* [out] */,
1665 struct spoolss_EnumForms r
;
1669 r
.in
.handle
= handle
;
1671 r
.in
.buffer
= buffer
;
1672 r
.in
.offered
= offered
;
1674 if (DEBUGLEVEL
>= 10) {
1675 NDR_PRINT_IN_DEBUG(spoolss_EnumForms
, &r
);
1678 status
= cli
->dispatch(cli
,
1681 NDR_SPOOLSS_ENUMFORMS
,
1684 if (!NT_STATUS_IS_OK(status
)) {
1688 if (DEBUGLEVEL
>= 10) {
1689 NDR_PRINT_OUT_DEBUG(spoolss_EnumForms
, &r
);
1692 if (NT_STATUS_IS_ERR(status
)) {
1696 /* Return variables */
1697 if (info
&& r
.out
.info
) {
1698 memcpy(info
, r
.out
.info
, count
* sizeof(*info
));
1700 *needed
= *r
.out
.needed
;
1701 return NT_STATUS_NOT_SUPPORTED
;
1705 *werror
= r
.out
.result
;
1708 return werror_to_ntstatus(r
.out
.result
);
1711 NTSTATUS
rpccli_spoolss_EnumPorts(struct rpc_pipe_client
*cli
,
1712 TALLOC_CTX
*mem_ctx
,
1713 const char *servername
/* [in] [unique,charset(UTF16)] */,
1714 uint32_t level
/* [in] */,
1715 DATA_BLOB
*buffer
/* [in] [unique] */,
1716 uint32_t offered
/* [in] */,
1717 union spoolss_PortInfo
*info
/* [out] [unique,switch_is(level),size_is(count)] */,
1718 uint32_t *needed
/* [out] [ref] */,
1719 uint32_t count
/* [out] */,
1722 struct spoolss_EnumPorts r
;
1726 r
.in
.servername
= servername
;
1728 r
.in
.buffer
= buffer
;
1729 r
.in
.offered
= offered
;
1731 if (DEBUGLEVEL
>= 10) {
1732 NDR_PRINT_IN_DEBUG(spoolss_EnumPorts
, &r
);
1735 status
= cli
->dispatch(cli
,
1738 NDR_SPOOLSS_ENUMPORTS
,
1741 if (!NT_STATUS_IS_OK(status
)) {
1745 if (DEBUGLEVEL
>= 10) {
1746 NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts
, &r
);
1749 if (NT_STATUS_IS_ERR(status
)) {
1753 /* Return variables */
1754 if (info
&& r
.out
.info
) {
1755 memcpy(info
, r
.out
.info
, count
* sizeof(*info
));
1757 *needed
= *r
.out
.needed
;
1758 return NT_STATUS_NOT_SUPPORTED
;
1762 *werror
= r
.out
.result
;
1765 return werror_to_ntstatus(r
.out
.result
);
1768 NTSTATUS
rpccli_spoolss_EnumMonitors(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 union spoolss_MonitorInfo
*info
/* [out] [unique,switch_is(level),size_is(count)] */,
1775 uint32_t *needed
/* [out] [ref] */,
1776 uint32_t count
/* [out] */,
1779 struct spoolss_EnumMonitors 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_EnumMonitors
, &r
);
1792 status
= cli
->dispatch(cli
,
1795 NDR_SPOOLSS_ENUMMONITORS
,
1798 if (!NT_STATUS_IS_OK(status
)) {
1802 if (DEBUGLEVEL
>= 10) {
1803 NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors
, &r
);
1806 if (NT_STATUS_IS_ERR(status
)) {
1810 /* Return variables */
1811 if (info
&& r
.out
.info
) {
1812 memcpy(info
, r
.out
.info
, count
* sizeof(*info
));
1814 *needed
= *r
.out
.needed
;
1815 return NT_STATUS_NOT_SUPPORTED
;
1819 *werror
= r
.out
.result
;
1822 return werror_to_ntstatus(r
.out
.result
);
1825 NTSTATUS
rpccli_spoolss_AddPort(struct rpc_pipe_client
*cli
,
1826 TALLOC_CTX
*mem_ctx
,
1827 const char *server_name
/* [in] [unique,charset(UTF16)] */,
1828 uint32_t unknown
/* [in] */,
1829 const char *monitor_name
/* [in] [charset(UTF16)] */,
1832 struct spoolss_AddPort r
;
1836 r
.in
.server_name
= server_name
;
1837 r
.in
.unknown
= unknown
;
1838 r
.in
.monitor_name
= monitor_name
;
1840 if (DEBUGLEVEL
>= 10) {
1841 NDR_PRINT_IN_DEBUG(spoolss_AddPort
, &r
);
1844 status
= cli
->dispatch(cli
,
1847 NDR_SPOOLSS_ADDPORT
,
1850 if (!NT_STATUS_IS_OK(status
)) {
1854 if (DEBUGLEVEL
>= 10) {
1855 NDR_PRINT_OUT_DEBUG(spoolss_AddPort
, &r
);
1858 if (NT_STATUS_IS_ERR(status
)) {
1862 /* Return variables */
1866 *werror
= r
.out
.result
;
1869 return werror_to_ntstatus(r
.out
.result
);
1872 NTSTATUS
rpccli_spoolss_ConfigurePort(struct rpc_pipe_client
*cli
,
1873 TALLOC_CTX
*mem_ctx
,
1876 struct spoolss_ConfigurePort r
;
1881 if (DEBUGLEVEL
>= 10) {
1882 NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort
, &r
);
1885 status
= cli
->dispatch(cli
,
1888 NDR_SPOOLSS_CONFIGUREPORT
,
1891 if (!NT_STATUS_IS_OK(status
)) {
1895 if (DEBUGLEVEL
>= 10) {
1896 NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort
, &r
);
1899 if (NT_STATUS_IS_ERR(status
)) {
1903 /* Return variables */
1907 *werror
= r
.out
.result
;
1910 return werror_to_ntstatus(r
.out
.result
);
1913 NTSTATUS
rpccli_spoolss_DeletePort(struct rpc_pipe_client
*cli
,
1914 TALLOC_CTX
*mem_ctx
,
1917 struct spoolss_DeletePort r
;
1922 if (DEBUGLEVEL
>= 10) {
1923 NDR_PRINT_IN_DEBUG(spoolss_DeletePort
, &r
);
1926 status
= cli
->dispatch(cli
,
1929 NDR_SPOOLSS_DELETEPORT
,
1932 if (!NT_STATUS_IS_OK(status
)) {
1936 if (DEBUGLEVEL
>= 10) {
1937 NDR_PRINT_OUT_DEBUG(spoolss_DeletePort
, &r
);
1940 if (NT_STATUS_IS_ERR(status
)) {
1944 /* Return variables */
1948 *werror
= r
.out
.result
;
1951 return werror_to_ntstatus(r
.out
.result
);
1954 NTSTATUS
rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client
*cli
,
1955 TALLOC_CTX
*mem_ctx
,
1958 struct spoolss_CreatePrinterIC r
;
1963 if (DEBUGLEVEL
>= 10) {
1964 NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC
, &r
);
1967 status
= cli
->dispatch(cli
,
1970 NDR_SPOOLSS_CREATEPRINTERIC
,
1973 if (!NT_STATUS_IS_OK(status
)) {
1977 if (DEBUGLEVEL
>= 10) {
1978 NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC
, &r
);
1981 if (NT_STATUS_IS_ERR(status
)) {
1985 /* Return variables */
1989 *werror
= r
.out
.result
;
1992 return werror_to_ntstatus(r
.out
.result
);
1995 NTSTATUS
rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client
*cli
,
1996 TALLOC_CTX
*mem_ctx
,
1999 struct spoolss_PlayGDIScriptOnPrinterIC r
;
2004 if (DEBUGLEVEL
>= 10) {
2005 NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, &r
);
2008 status
= cli
->dispatch(cli
,
2011 NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC
,
2014 if (!NT_STATUS_IS_OK(status
)) {
2018 if (DEBUGLEVEL
>= 10) {
2019 NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC
, &r
);
2022 if (NT_STATUS_IS_ERR(status
)) {
2026 /* Return variables */
2030 *werror
= r
.out
.result
;
2033 return werror_to_ntstatus(r
.out
.result
);
2036 NTSTATUS
rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client
*cli
,
2037 TALLOC_CTX
*mem_ctx
,
2040 struct spoolss_DeletePrinterIC r
;
2045 if (DEBUGLEVEL
>= 10) {
2046 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC
, &r
);
2049 status
= cli
->dispatch(cli
,
2052 NDR_SPOOLSS_DELETEPRINTERIC
,
2055 if (!NT_STATUS_IS_OK(status
)) {
2059 if (DEBUGLEVEL
>= 10) {
2060 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC
, &r
);
2063 if (NT_STATUS_IS_ERR(status
)) {
2067 /* Return variables */
2071 *werror
= r
.out
.result
;
2074 return werror_to_ntstatus(r
.out
.result
);
2077 NTSTATUS
rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client
*cli
,
2078 TALLOC_CTX
*mem_ctx
,
2081 struct spoolss_AddPrinterConnection r
;
2086 if (DEBUGLEVEL
>= 10) {
2087 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection
, &r
);
2090 status
= cli
->dispatch(cli
,
2093 NDR_SPOOLSS_ADDPRINTERCONNECTION
,
2096 if (!NT_STATUS_IS_OK(status
)) {
2100 if (DEBUGLEVEL
>= 10) {
2101 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection
, &r
);
2104 if (NT_STATUS_IS_ERR(status
)) {
2108 /* Return variables */
2112 *werror
= r
.out
.result
;
2115 return werror_to_ntstatus(r
.out
.result
);
2118 NTSTATUS
rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client
*cli
,
2119 TALLOC_CTX
*mem_ctx
,
2122 struct spoolss_DeletePrinterConnection r
;
2127 if (DEBUGLEVEL
>= 10) {
2128 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection
, &r
);
2131 status
= cli
->dispatch(cli
,
2134 NDR_SPOOLSS_DELETEPRINTERCONNECTION
,
2137 if (!NT_STATUS_IS_OK(status
)) {
2141 if (DEBUGLEVEL
>= 10) {
2142 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection
, &r
);
2145 if (NT_STATUS_IS_ERR(status
)) {
2149 /* Return variables */
2153 *werror
= r
.out
.result
;
2156 return werror_to_ntstatus(r
.out
.result
);
2159 NTSTATUS
rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client
*cli
,
2160 TALLOC_CTX
*mem_ctx
,
2163 struct spoolss_PrinterMessageBox r
;
2168 if (DEBUGLEVEL
>= 10) {
2169 NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox
, &r
);
2172 status
= cli
->dispatch(cli
,
2175 NDR_SPOOLSS_PRINTERMESSAGEBOX
,
2178 if (!NT_STATUS_IS_OK(status
)) {
2182 if (DEBUGLEVEL
>= 10) {
2183 NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox
, &r
);
2186 if (NT_STATUS_IS_ERR(status
)) {
2190 /* Return variables */
2194 *werror
= r
.out
.result
;
2197 return werror_to_ntstatus(r
.out
.result
);
2200 NTSTATUS
rpccli_spoolss_AddMonitor(struct rpc_pipe_client
*cli
,
2201 TALLOC_CTX
*mem_ctx
,
2204 struct spoolss_AddMonitor r
;
2209 if (DEBUGLEVEL
>= 10) {
2210 NDR_PRINT_IN_DEBUG(spoolss_AddMonitor
, &r
);
2213 status
= cli
->dispatch(cli
,
2216 NDR_SPOOLSS_ADDMONITOR
,
2219 if (!NT_STATUS_IS_OK(status
)) {
2223 if (DEBUGLEVEL
>= 10) {
2224 NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor
, &r
);
2227 if (NT_STATUS_IS_ERR(status
)) {
2231 /* Return variables */
2235 *werror
= r
.out
.result
;
2238 return werror_to_ntstatus(r
.out
.result
);
2241 NTSTATUS
rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client
*cli
,
2242 TALLOC_CTX
*mem_ctx
,
2245 struct spoolss_DeleteMonitor r
;
2250 if (DEBUGLEVEL
>= 10) {
2251 NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor
, &r
);
2254 status
= cli
->dispatch(cli
,
2257 NDR_SPOOLSS_DELETEMONITOR
,
2260 if (!NT_STATUS_IS_OK(status
)) {
2264 if (DEBUGLEVEL
>= 10) {
2265 NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor
, &r
);
2268 if (NT_STATUS_IS_ERR(status
)) {
2272 /* Return variables */
2276 *werror
= r
.out
.result
;
2279 return werror_to_ntstatus(r
.out
.result
);
2282 NTSTATUS
rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client
*cli
,
2283 TALLOC_CTX
*mem_ctx
,
2286 struct spoolss_DeletePrintProcessor r
;
2291 if (DEBUGLEVEL
>= 10) {
2292 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor
, &r
);
2295 status
= cli
->dispatch(cli
,
2298 NDR_SPOOLSS_DELETEPRINTPROCESSOR
,
2301 if (!NT_STATUS_IS_OK(status
)) {
2305 if (DEBUGLEVEL
>= 10) {
2306 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor
, &r
);
2309 if (NT_STATUS_IS_ERR(status
)) {
2313 /* Return variables */
2317 *werror
= r
.out
.result
;
2320 return werror_to_ntstatus(r
.out
.result
);
2323 NTSTATUS
rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client
*cli
,
2324 TALLOC_CTX
*mem_ctx
,
2327 struct spoolss_AddPrintProvidor r
;
2332 if (DEBUGLEVEL
>= 10) {
2333 NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor
, &r
);
2336 status
= cli
->dispatch(cli
,
2339 NDR_SPOOLSS_ADDPRINTPROVIDOR
,
2342 if (!NT_STATUS_IS_OK(status
)) {
2346 if (DEBUGLEVEL
>= 10) {
2347 NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor
, &r
);
2350 if (NT_STATUS_IS_ERR(status
)) {
2354 /* Return variables */
2358 *werror
= r
.out
.result
;
2361 return werror_to_ntstatus(r
.out
.result
);
2364 NTSTATUS
rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client
*cli
,
2365 TALLOC_CTX
*mem_ctx
,
2368 struct spoolss_DeletePrintProvidor r
;
2373 if (DEBUGLEVEL
>= 10) {
2374 NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor
, &r
);
2377 status
= cli
->dispatch(cli
,
2380 NDR_SPOOLSS_DELETEPRINTPROVIDOR
,
2383 if (!NT_STATUS_IS_OK(status
)) {
2387 if (DEBUGLEVEL
>= 10) {
2388 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor
, &r
);
2391 if (NT_STATUS_IS_ERR(status
)) {
2395 /* Return variables */
2399 *werror
= r
.out
.result
;
2402 return werror_to_ntstatus(r
.out
.result
);
2405 NTSTATUS
rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client
*cli
,
2406 TALLOC_CTX
*mem_ctx
,
2409 struct spoolss_EnumPrintProcDataTypes r
;
2414 if (DEBUGLEVEL
>= 10) {
2415 NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes
, &r
);
2418 status
= cli
->dispatch(cli
,
2421 NDR_SPOOLSS_ENUMPRINTPROCDATATYPES
,
2424 if (!NT_STATUS_IS_OK(status
)) {
2428 if (DEBUGLEVEL
>= 10) {
2429 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes
, &r
);
2432 if (NT_STATUS_IS_ERR(status
)) {
2436 /* Return variables */
2440 *werror
= r
.out
.result
;
2443 return werror_to_ntstatus(r
.out
.result
);
2446 NTSTATUS
rpccli_spoolss_ResetPrinter(struct rpc_pipe_client
*cli
,
2447 TALLOC_CTX
*mem_ctx
,
2450 struct spoolss_ResetPrinter r
;
2455 if (DEBUGLEVEL
>= 10) {
2456 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter
, &r
);
2459 status
= cli
->dispatch(cli
,
2462 NDR_SPOOLSS_RESETPRINTER
,
2465 if (!NT_STATUS_IS_OK(status
)) {
2469 if (DEBUGLEVEL
>= 10) {
2470 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter
, &r
);
2473 if (NT_STATUS_IS_ERR(status
)) {
2477 /* Return variables */
2481 *werror
= r
.out
.result
;
2484 return werror_to_ntstatus(r
.out
.result
);
2487 NTSTATUS
rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client
*cli
,
2488 TALLOC_CTX
*mem_ctx
,
2489 struct policy_handle
*handle
/* [in] [ref] */,
2490 const char *architecture
/* [in] [unique,charset(UTF16)] */,
2491 uint32_t level
/* [in] */,
2492 DATA_BLOB
*buffer
/* [in] [unique] */,
2493 uint32_t offered
/* [in] */,
2494 uint32_t client_major_version
/* [in] */,
2495 uint32_t client_minor_version
/* [in] */,
2496 DATA_BLOB
*info
/* [out] [unique] */,
2497 uint32_t *needed
/* [out] [ref] */,
2498 uint32_t *server_major_version
/* [out] [ref] */,
2499 uint32_t *server_minor_version
/* [out] [ref] */,
2502 struct spoolss_GetPrinterDriver2 r
;
2506 r
.in
.handle
= handle
;
2507 r
.in
.architecture
= architecture
;
2509 r
.in
.buffer
= buffer
;
2510 r
.in
.offered
= offered
;
2511 r
.in
.client_major_version
= client_major_version
;
2512 r
.in
.client_minor_version
= client_minor_version
;
2514 if (DEBUGLEVEL
>= 10) {
2515 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2
, &r
);
2518 status
= cli
->dispatch(cli
,
2521 NDR_SPOOLSS_GETPRINTERDRIVER2
,
2524 if (!NT_STATUS_IS_OK(status
)) {
2528 if (DEBUGLEVEL
>= 10) {
2529 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2
, &r
);
2532 if (NT_STATUS_IS_ERR(status
)) {
2536 /* Return variables */
2537 if (info
&& r
.out
.info
) {
2538 *info
= *r
.out
.info
;
2540 *needed
= *r
.out
.needed
;
2541 *server_major_version
= *r
.out
.server_major_version
;
2542 *server_minor_version
= *r
.out
.server_minor_version
;
2546 *werror
= r
.out
.result
;
2549 return werror_to_ntstatus(r
.out
.result
);
2552 NTSTATUS
rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2553 TALLOC_CTX
*mem_ctx
,
2556 struct spoolss_FindFirstPrinterChangeNotification r
;
2561 if (DEBUGLEVEL
>= 10) {
2562 NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification
, &r
);
2565 status
= cli
->dispatch(cli
,
2568 NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION
,
2571 if (!NT_STATUS_IS_OK(status
)) {
2575 if (DEBUGLEVEL
>= 10) {
2576 NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification
, &r
);
2579 if (NT_STATUS_IS_ERR(status
)) {
2583 /* Return variables */
2587 *werror
= r
.out
.result
;
2590 return werror_to_ntstatus(r
.out
.result
);
2593 NTSTATUS
rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2594 TALLOC_CTX
*mem_ctx
,
2597 struct spoolss_FindNextPrinterChangeNotification r
;
2602 if (DEBUGLEVEL
>= 10) {
2603 NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification
, &r
);
2606 status
= cli
->dispatch(cli
,
2609 NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION
,
2612 if (!NT_STATUS_IS_OK(status
)) {
2616 if (DEBUGLEVEL
>= 10) {
2617 NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification
, &r
);
2620 if (NT_STATUS_IS_ERR(status
)) {
2624 /* Return variables */
2628 *werror
= r
.out
.result
;
2631 return werror_to_ntstatus(r
.out
.result
);
2634 NTSTATUS
rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client
*cli
,
2635 TALLOC_CTX
*mem_ctx
,
2636 struct policy_handle
*handle
/* [in] [ref] */,
2639 struct spoolss_FindClosePrinterNotify r
;
2643 r
.in
.handle
= handle
;
2645 if (DEBUGLEVEL
>= 10) {
2646 NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify
, &r
);
2649 status
= cli
->dispatch(cli
,
2652 NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY
,
2655 if (!NT_STATUS_IS_OK(status
)) {
2659 if (DEBUGLEVEL
>= 10) {
2660 NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify
, &r
);
2663 if (NT_STATUS_IS_ERR(status
)) {
2667 /* Return variables */
2671 *werror
= r
.out
.result
;
2674 return werror_to_ntstatus(r
.out
.result
);
2677 NTSTATUS
rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client
*cli
,
2678 TALLOC_CTX
*mem_ctx
,
2681 struct spoolss_RouterFindFirstPrinterChangeNotificationOld r
;
2686 if (DEBUGLEVEL
>= 10) {
2687 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, &r
);
2690 status
= cli
->dispatch(cli
,
2693 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD
,
2696 if (!NT_STATUS_IS_OK(status
)) {
2700 if (DEBUGLEVEL
>= 10) {
2701 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld
, &r
);
2704 if (NT_STATUS_IS_ERR(status
)) {
2708 /* Return variables */
2712 *werror
= r
.out
.result
;
2715 return werror_to_ntstatus(r
.out
.result
);
2718 NTSTATUS
rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client
*cli
,
2719 TALLOC_CTX
*mem_ctx
,
2720 const char *server_name
/* [in] [charset(UTF16)] */,
2721 uint32_t printer_local
/* [in] */,
2722 enum winreg_Type type
/* [in] */,
2723 uint32_t unknown1
/* [in] */,
2724 uint32_t unknown2
/* [in] */,
2725 struct policy_handle
*handle
/* [out] [ref] */,
2728 struct spoolss_ReplyOpenPrinter r
;
2732 r
.in
.server_name
= server_name
;
2733 r
.in
.printer_local
= printer_local
;
2735 r
.in
.unknown1
= unknown1
;
2736 r
.in
.unknown2
= unknown2
;
2738 if (DEBUGLEVEL
>= 10) {
2739 NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter
, &r
);
2742 status
= cli
->dispatch(cli
,
2745 NDR_SPOOLSS_REPLYOPENPRINTER
,
2748 if (!NT_STATUS_IS_OK(status
)) {
2752 if (DEBUGLEVEL
>= 10) {
2753 NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter
, &r
);
2756 if (NT_STATUS_IS_ERR(status
)) {
2760 /* Return variables */
2761 *handle
= *r
.out
.handle
;
2765 *werror
= r
.out
.result
;
2768 return werror_to_ntstatus(r
.out
.result
);
2771 NTSTATUS
rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client
*cli
,
2772 TALLOC_CTX
*mem_ctx
,
2775 struct spoolss_RouterReplyPrinter r
;
2780 if (DEBUGLEVEL
>= 10) {
2781 NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter
, &r
);
2784 status
= cli
->dispatch(cli
,
2787 NDR_SPOOLSS_ROUTERREPLYPRINTER
,
2790 if (!NT_STATUS_IS_OK(status
)) {
2794 if (DEBUGLEVEL
>= 10) {
2795 NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter
, &r
);
2798 if (NT_STATUS_IS_ERR(status
)) {
2802 /* Return variables */
2806 *werror
= r
.out
.result
;
2809 return werror_to_ntstatus(r
.out
.result
);
2812 NTSTATUS
rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client
*cli
,
2813 TALLOC_CTX
*mem_ctx
,
2814 struct policy_handle
*handle
/* [in,out] [ref] */,
2817 struct spoolss_ReplyClosePrinter r
;
2821 r
.in
.handle
= handle
;
2823 if (DEBUGLEVEL
>= 10) {
2824 NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter
, &r
);
2827 status
= cli
->dispatch(cli
,
2830 NDR_SPOOLSS_REPLYCLOSEPRINTER
,
2833 if (!NT_STATUS_IS_OK(status
)) {
2837 if (DEBUGLEVEL
>= 10) {
2838 NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter
, &r
);
2841 if (NT_STATUS_IS_ERR(status
)) {
2845 /* Return variables */
2846 *handle
= *r
.out
.handle
;
2850 *werror
= r
.out
.result
;
2853 return werror_to_ntstatus(r
.out
.result
);
2856 NTSTATUS
rpccli_spoolss_AddPortEx(struct rpc_pipe_client
*cli
,
2857 TALLOC_CTX
*mem_ctx
,
2860 struct spoolss_AddPortEx r
;
2865 if (DEBUGLEVEL
>= 10) {
2866 NDR_PRINT_IN_DEBUG(spoolss_AddPortEx
, &r
);
2869 status
= cli
->dispatch(cli
,
2872 NDR_SPOOLSS_ADDPORTEX
,
2875 if (!NT_STATUS_IS_OK(status
)) {
2879 if (DEBUGLEVEL
>= 10) {
2880 NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx
, &r
);
2883 if (NT_STATUS_IS_ERR(status
)) {
2887 /* Return variables */
2891 *werror
= r
.out
.result
;
2894 return werror_to_ntstatus(r
.out
.result
);
2897 NTSTATUS
rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client
*cli
,
2898 TALLOC_CTX
*mem_ctx
,
2901 struct spoolss_RouterFindFirstPrinterChangeNotification r
;
2906 if (DEBUGLEVEL
>= 10) {
2907 NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, &r
);
2910 status
= cli
->dispatch(cli
,
2913 NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION
,
2916 if (!NT_STATUS_IS_OK(status
)) {
2920 if (DEBUGLEVEL
>= 10) {
2921 NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification
, &r
);
2924 if (NT_STATUS_IS_ERR(status
)) {
2928 /* Return variables */
2932 *werror
= r
.out
.result
;
2935 return werror_to_ntstatus(r
.out
.result
);
2938 NTSTATUS
rpccli_spoolss_SpoolerInit(struct rpc_pipe_client
*cli
,
2939 TALLOC_CTX
*mem_ctx
,
2942 struct spoolss_SpoolerInit r
;
2947 if (DEBUGLEVEL
>= 10) {
2948 NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit
, &r
);
2951 status
= cli
->dispatch(cli
,
2954 NDR_SPOOLSS_SPOOLERINIT
,
2957 if (!NT_STATUS_IS_OK(status
)) {
2961 if (DEBUGLEVEL
>= 10) {
2962 NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit
, &r
);
2965 if (NT_STATUS_IS_ERR(status
)) {
2969 /* Return variables */
2973 *werror
= r
.out
.result
;
2976 return werror_to_ntstatus(r
.out
.result
);
2979 NTSTATUS
rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client
*cli
,
2980 TALLOC_CTX
*mem_ctx
,
2983 struct spoolss_ResetPrinterEx r
;
2988 if (DEBUGLEVEL
>= 10) {
2989 NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx
, &r
);
2992 status
= cli
->dispatch(cli
,
2995 NDR_SPOOLSS_RESETPRINTEREX
,
2998 if (!NT_STATUS_IS_OK(status
)) {
3002 if (DEBUGLEVEL
>= 10) {
3003 NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx
, &r
);
3006 if (NT_STATUS_IS_ERR(status
)) {
3010 /* Return variables */
3014 *werror
= r
.out
.result
;
3017 return werror_to_ntstatus(r
.out
.result
);
3020 NTSTATUS
rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client
*cli
,
3021 TALLOC_CTX
*mem_ctx
,
3022 struct policy_handle
*handle
/* [in] [ref] */,
3023 uint32_t flags
/* [in] */,
3024 uint32_t options
/* [in] */,
3025 const char *str
/* [in] [unique,charset(UTF16)] */,
3026 uint32_t printer_local
/* [in] */,
3027 struct spoolss_NotifyOptionsContainer
*t1
/* [in] [unique] */,
3030 struct spoolss_RemoteFindFirstPrinterChangeNotifyEx r
;
3034 r
.in
.handle
= handle
;
3036 r
.in
.options
= options
;
3038 r
.in
.printer_local
= printer_local
;
3041 if (DEBUGLEVEL
>= 10) {
3042 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, &r
);
3045 status
= cli
->dispatch(cli
,
3048 NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX
,
3051 if (!NT_STATUS_IS_OK(status
)) {
3055 if (DEBUGLEVEL
>= 10) {
3056 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx
, &r
);
3059 if (NT_STATUS_IS_ERR(status
)) {
3063 /* Return variables */
3067 *werror
= r
.out
.result
;
3070 return werror_to_ntstatus(r
.out
.result
);
3073 NTSTATUS
rpccli_spoolss_RouterRefreshPrinterChangeNotification(struct rpc_pipe_client
*cli
,
3074 TALLOC_CTX
*mem_ctx
,
3077 struct spoolss_RouterRefreshPrinterChangeNotification r
;
3082 if (DEBUGLEVEL
>= 10) {
3083 NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotification
, &r
);
3086 status
= cli
->dispatch(cli
,
3089 NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION
,
3092 if (!NT_STATUS_IS_OK(status
)) {
3096 if (DEBUGLEVEL
>= 10) {
3097 NDR_PRINT_OUT_DEBUG(spoolss_RouterRefreshPrinterChangeNotification
, &r
);
3100 if (NT_STATUS_IS_ERR(status
)) {
3104 /* Return variables */
3108 *werror
= r
.out
.result
;
3111 return werror_to_ntstatus(r
.out
.result
);
3114 NTSTATUS
rpccli_spoolss_RemoteFindNextPrinterChangeNotifyEx(struct rpc_pipe_client
*cli
,
3115 TALLOC_CTX
*mem_ctx
,
3116 struct policy_handle
*handle
/* [in] [ref] */,
3117 uint32_t change_low
/* [in] */,
3118 struct spoolss_NotifyOptionsContainer
*container
/* [in] [unique] */,
3119 struct spoolss_NotifyInfo
**info
/* [out] [ref] */,
3122 struct spoolss_RemoteFindNextPrinterChangeNotifyEx r
;
3126 r
.in
.handle
= handle
;
3127 r
.in
.change_low
= change_low
;
3128 r
.in
.container
= container
;
3130 if (DEBUGLEVEL
>= 10) {
3131 NDR_PRINT_IN_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx
, &r
);
3134 status
= cli
->dispatch(cli
,
3137 NDR_SPOOLSS_REMOTEFINDNEXTPRINTERCHANGENOTIFYEX
,
3140 if (!NT_STATUS_IS_OK(status
)) {
3144 if (DEBUGLEVEL
>= 10) {
3145 NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindNextPrinterChangeNotifyEx
, &r
);
3148 if (NT_STATUS_IS_ERR(status
)) {
3152 /* Return variables */
3153 *info
= *r
.out
.info
;
3157 *werror
= r
.out
.result
;
3160 return werror_to_ntstatus(r
.out
.result
);
3163 NTSTATUS
rpccli_spoolss_44(struct rpc_pipe_client
*cli
,
3164 TALLOC_CTX
*mem_ctx
,
3167 struct spoolss_44 r
;
3172 if (DEBUGLEVEL
>= 10) {
3173 NDR_PRINT_IN_DEBUG(spoolss_44
, &r
);
3176 status
= cli
->dispatch(cli
,
3182 if (!NT_STATUS_IS_OK(status
)) {
3186 if (DEBUGLEVEL
>= 10) {
3187 NDR_PRINT_OUT_DEBUG(spoolss_44
, &r
);
3190 if (NT_STATUS_IS_ERR(status
)) {
3194 /* Return variables */
3198 *werror
= r
.out
.result
;
3201 return werror_to_ntstatus(r
.out
.result
);
3204 NTSTATUS
rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client
*cli
,
3205 TALLOC_CTX
*mem_ctx
,
3206 const char *printername
/* [in] [unique,charset(UTF16)] */,
3207 const char *datatype
/* [in] [unique,charset(UTF16)] */,
3208 struct spoolss_DevmodeContainer devmode_ctr
/* [in] */,
3209 uint32_t access_mask
/* [in] */,
3210 uint32_t level
/* [in] */,
3211 union spoolss_UserLevel userlevel
/* [in] [switch_is(level)] */,
3212 struct policy_handle
*handle
/* [out] [ref] */,
3215 struct spoolss_OpenPrinterEx r
;
3219 r
.in
.printername
= printername
;
3220 r
.in
.datatype
= datatype
;
3221 r
.in
.devmode_ctr
= devmode_ctr
;
3222 r
.in
.access_mask
= access_mask
;
3224 r
.in
.userlevel
= userlevel
;
3226 if (DEBUGLEVEL
>= 10) {
3227 NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx
, &r
);
3230 status
= cli
->dispatch(cli
,
3233 NDR_SPOOLSS_OPENPRINTEREX
,
3236 if (!NT_STATUS_IS_OK(status
)) {
3240 if (DEBUGLEVEL
>= 10) {
3241 NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx
, &r
);
3244 if (NT_STATUS_IS_ERR(status
)) {
3248 /* Return variables */
3249 *handle
= *r
.out
.handle
;
3253 *werror
= r
.out
.result
;
3256 return werror_to_ntstatus(r
.out
.result
);
3259 NTSTATUS
rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client
*cli
,
3260 TALLOC_CTX
*mem_ctx
,
3261 const char *server
/* [in] [unique,charset(UTF16)] */,
3262 uint32_t level
/* [in] */,
3263 union spoolss_PrinterInfo
*info
/* [in] [unique,switch_is(level)] */,
3264 struct spoolss_DevmodeContainer devmode_ctr
/* [in] */,
3265 struct security_descriptor
*secdesc
/* [in] [unique] */,
3266 uint32_t ulevel
/* [in] */,
3267 union spoolss_UserLevel userlevel
/* [in] [switch_is(ulevel)] */,
3270 struct spoolss_AddPrinterEx r
;
3274 r
.in
.server
= server
;
3277 r
.in
.devmode_ctr
= devmode_ctr
;
3278 r
.in
.secdesc
= secdesc
;
3279 r
.in
.ulevel
= ulevel
;
3280 r
.in
.userlevel
= userlevel
;
3282 if (DEBUGLEVEL
>= 10) {
3283 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx
, &r
);
3286 status
= cli
->dispatch(cli
,
3289 NDR_SPOOLSS_ADDPRINTEREX
,
3292 if (!NT_STATUS_IS_OK(status
)) {
3296 if (DEBUGLEVEL
>= 10) {
3297 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx
, &r
);
3300 if (NT_STATUS_IS_ERR(status
)) {
3304 /* Return variables */
3308 *werror
= r
.out
.result
;
3311 return werror_to_ntstatus(r
.out
.result
);
3314 NTSTATUS
rpccli_spoolss_47(struct rpc_pipe_client
*cli
,
3315 TALLOC_CTX
*mem_ctx
,
3318 struct spoolss_47 r
;
3323 if (DEBUGLEVEL
>= 10) {
3324 NDR_PRINT_IN_DEBUG(spoolss_47
, &r
);
3327 status
= cli
->dispatch(cli
,
3333 if (!NT_STATUS_IS_OK(status
)) {
3337 if (DEBUGLEVEL
>= 10) {
3338 NDR_PRINT_OUT_DEBUG(spoolss_47
, &r
);
3341 if (NT_STATUS_IS_ERR(status
)) {
3345 /* Return variables */
3349 *werror
= r
.out
.result
;
3352 return werror_to_ntstatus(r
.out
.result
);
3355 NTSTATUS
rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client
*cli
,
3356 TALLOC_CTX
*mem_ctx
,
3357 struct policy_handle
*handle
/* [in] [ref] */,
3358 uint32_t enum_index
/* [in] */,
3359 const char *value_name
/* [out] [ref,charset(UTF16),size_is(value_offered/2)] */,
3360 uint32_t value_offered
/* [in] */,
3361 uint32_t *value_needed
/* [out] [ref] */,
3362 uint32_t *printerdata_type
/* [out] [ref] */,
3363 DATA_BLOB
*buffer
/* [out] [ref] */,
3364 uint32_t data_offered
/* [in] */,
3365 uint32_t *data_needed
/* [out] [ref] */,
3368 struct spoolss_EnumPrinterData r
;
3372 r
.in
.handle
= handle
;
3373 r
.in
.enum_index
= enum_index
;
3374 r
.in
.value_offered
= value_offered
;
3375 r
.in
.data_offered
= data_offered
;
3377 if (DEBUGLEVEL
>= 10) {
3378 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData
, &r
);
3381 status
= cli
->dispatch(cli
,
3384 NDR_SPOOLSS_ENUMPRINTERDATA
,
3387 if (!NT_STATUS_IS_OK(status
)) {
3391 if (DEBUGLEVEL
>= 10) {
3392 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData
, &r
);
3395 if (NT_STATUS_IS_ERR(status
)) {
3399 /* Return variables */
3400 memcpy(value_name
, r
.out
.value_name
, r
.in
.value_offered
/ 2 * sizeof(*value_name
));
3401 *value_needed
= *r
.out
.value_needed
;
3402 *printerdata_type
= *r
.out
.printerdata_type
;
3403 *buffer
= *r
.out
.buffer
;
3404 *data_needed
= *r
.out
.data_needed
;
3408 *werror
= r
.out
.result
;
3411 return werror_to_ntstatus(r
.out
.result
);
3414 NTSTATUS
rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client
*cli
,
3415 TALLOC_CTX
*mem_ctx
,
3416 struct policy_handle
*handle
/* [in] [ref] */,
3417 const char *value_name
/* [in] [charset(UTF16)] */,
3420 struct spoolss_DeletePrinterData r
;
3424 r
.in
.handle
= handle
;
3425 r
.in
.value_name
= value_name
;
3427 if (DEBUGLEVEL
>= 10) {
3428 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData
, &r
);
3431 status
= cli
->dispatch(cli
,
3434 NDR_SPOOLSS_DELETEPRINTERDATA
,
3437 if (!NT_STATUS_IS_OK(status
)) {
3441 if (DEBUGLEVEL
>= 10) {
3442 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData
, &r
);
3445 if (NT_STATUS_IS_ERR(status
)) {
3449 /* Return variables */
3453 *werror
= r
.out
.result
;
3456 return werror_to_ntstatus(r
.out
.result
);
3459 NTSTATUS
rpccli_spoolss_4a(struct rpc_pipe_client
*cli
,
3460 TALLOC_CTX
*mem_ctx
,
3463 struct spoolss_4a r
;
3468 if (DEBUGLEVEL
>= 10) {
3469 NDR_PRINT_IN_DEBUG(spoolss_4a
, &r
);
3472 status
= cli
->dispatch(cli
,
3478 if (!NT_STATUS_IS_OK(status
)) {
3482 if (DEBUGLEVEL
>= 10) {
3483 NDR_PRINT_OUT_DEBUG(spoolss_4a
, &r
);
3486 if (NT_STATUS_IS_ERR(status
)) {
3490 /* Return variables */
3494 *werror
= r
.out
.result
;
3497 return werror_to_ntstatus(r
.out
.result
);
3500 NTSTATUS
rpccli_spoolss_4b(struct rpc_pipe_client
*cli
,
3501 TALLOC_CTX
*mem_ctx
,
3504 struct spoolss_4b r
;
3509 if (DEBUGLEVEL
>= 10) {
3510 NDR_PRINT_IN_DEBUG(spoolss_4b
, &r
);
3513 status
= cli
->dispatch(cli
,
3519 if (!NT_STATUS_IS_OK(status
)) {
3523 if (DEBUGLEVEL
>= 10) {
3524 NDR_PRINT_OUT_DEBUG(spoolss_4b
, &r
);
3527 if (NT_STATUS_IS_ERR(status
)) {
3531 /* Return variables */
3535 *werror
= r
.out
.result
;
3538 return werror_to_ntstatus(r
.out
.result
);
3541 NTSTATUS
rpccli_spoolss_4c(struct rpc_pipe_client
*cli
,
3542 TALLOC_CTX
*mem_ctx
,
3545 struct spoolss_4c r
;
3550 if (DEBUGLEVEL
>= 10) {
3551 NDR_PRINT_IN_DEBUG(spoolss_4c
, &r
);
3554 status
= cli
->dispatch(cli
,
3560 if (!NT_STATUS_IS_OK(status
)) {
3564 if (DEBUGLEVEL
>= 10) {
3565 NDR_PRINT_OUT_DEBUG(spoolss_4c
, &r
);
3568 if (NT_STATUS_IS_ERR(status
)) {
3572 /* Return variables */
3576 *werror
= r
.out
.result
;
3579 return werror_to_ntstatus(r
.out
.result
);
3582 NTSTATUS
rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client
*cli
,
3583 TALLOC_CTX
*mem_ctx
,
3584 struct policy_handle
*handle
/* [in] [ref] */,
3585 const char *key_name
/* [in] [charset(UTF16)] */,
3586 const char *value_name
/* [in] [charset(UTF16)] */,
3587 uint32_t type
/* [in] */,
3588 DATA_BLOB buffer
/* [in] */,
3589 uint32_t offered
/* [in] */,
3592 struct spoolss_SetPrinterDataEx r
;
3596 r
.in
.handle
= handle
;
3597 r
.in
.key_name
= key_name
;
3598 r
.in
.value_name
= value_name
;
3600 r
.in
.buffer
= buffer
;
3601 r
.in
.offered
= offered
;
3603 if (DEBUGLEVEL
>= 10) {
3604 NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx
, &r
);
3607 status
= cli
->dispatch(cli
,
3610 NDR_SPOOLSS_SETPRINTERDATAEX
,
3613 if (!NT_STATUS_IS_OK(status
)) {
3617 if (DEBUGLEVEL
>= 10) {
3618 NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx
, &r
);
3621 if (NT_STATUS_IS_ERR(status
)) {
3625 /* Return variables */
3629 *werror
= r
.out
.result
;
3632 return werror_to_ntstatus(r
.out
.result
);
3635 NTSTATUS
rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client
*cli
,
3636 TALLOC_CTX
*mem_ctx
,
3637 struct policy_handle
*handle
/* [in] [ref] */,
3638 const char *key_name
/* [in] [charset(UTF16)] */,
3639 const char *value_name
/* [in] [charset(UTF16)] */,
3640 uint32_t *type
/* [out] [ref] */,
3641 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
3642 uint32_t offered
/* [in] */,
3643 uint32_t *needed
/* [out] [ref] */,
3646 struct spoolss_GetPrinterDataEx r
;
3650 r
.in
.handle
= handle
;
3651 r
.in
.key_name
= key_name
;
3652 r
.in
.value_name
= value_name
;
3653 r
.in
.offered
= offered
;
3655 if (DEBUGLEVEL
>= 10) {
3656 NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx
, &r
);
3659 status
= cli
->dispatch(cli
,
3662 NDR_SPOOLSS_GETPRINTERDATAEX
,
3665 if (!NT_STATUS_IS_OK(status
)) {
3669 if (DEBUGLEVEL
>= 10) {
3670 NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx
, &r
);
3673 if (NT_STATUS_IS_ERR(status
)) {
3677 /* Return variables */
3678 *type
= *r
.out
.type
;
3679 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
3680 *needed
= *r
.out
.needed
;
3684 *werror
= r
.out
.result
;
3687 return werror_to_ntstatus(r
.out
.result
);
3690 NTSTATUS
rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client
*cli
,
3691 TALLOC_CTX
*mem_ctx
,
3692 struct policy_handle
*handle
/* [in] [ref] */,
3693 const char *key_name
/* [in] [charset(UTF16)] */,
3694 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
3695 uint32_t offered
/* [in] */,
3696 uint32_t *needed
/* [out] [ref] */,
3697 uint32_t *count
/* [out] [ref] */,
3700 struct spoolss_EnumPrinterDataEx r
;
3704 r
.in
.handle
= handle
;
3705 r
.in
.key_name
= key_name
;
3706 r
.in
.offered
= offered
;
3708 if (DEBUGLEVEL
>= 10) {
3709 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx
, &r
);
3712 status
= cli
->dispatch(cli
,
3715 NDR_SPOOLSS_ENUMPRINTERDATAEX
,
3718 if (!NT_STATUS_IS_OK(status
)) {
3722 if (DEBUGLEVEL
>= 10) {
3723 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx
, &r
);
3726 if (NT_STATUS_IS_ERR(status
)) {
3730 /* Return variables */
3731 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
3732 *needed
= *r
.out
.needed
;
3733 *count
= *r
.out
.count
;
3737 *werror
= r
.out
.result
;
3740 return werror_to_ntstatus(r
.out
.result
);
3743 NTSTATUS
rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client
*cli
,
3744 TALLOC_CTX
*mem_ctx
,
3745 struct policy_handle
*handle
/* [in] [ref] */,
3746 const char *key_name
/* [in] [charset(UTF16)] */,
3747 uint16_t *key_buffer
/* [out] [ref,size_is(key_buffer_size/2)] */,
3748 uint32_t key_buffer_size
/* [in] */,
3749 uint32_t *needed
/* [out] [ref] */,
3752 struct spoolss_EnumPrinterKey r
;
3756 r
.in
.handle
= handle
;
3757 r
.in
.key_name
= key_name
;
3758 r
.in
.key_buffer_size
= key_buffer_size
;
3760 if (DEBUGLEVEL
>= 10) {
3761 NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey
, &r
);
3764 status
= cli
->dispatch(cli
,
3767 NDR_SPOOLSS_ENUMPRINTERKEY
,
3770 if (!NT_STATUS_IS_OK(status
)) {
3774 if (DEBUGLEVEL
>= 10) {
3775 NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey
, &r
);
3778 if (NT_STATUS_IS_ERR(status
)) {
3782 /* Return variables */
3783 memcpy(key_buffer
, r
.out
.key_buffer
, r
.in
.key_buffer_size
/ 2 * sizeof(*key_buffer
));
3784 *needed
= *r
.out
.needed
;
3788 *werror
= r
.out
.result
;
3791 return werror_to_ntstatus(r
.out
.result
);
3794 NTSTATUS
rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client
*cli
,
3795 TALLOC_CTX
*mem_ctx
,
3796 struct policy_handle
*handle
/* [in] [ref] */,
3797 const char *key_name
/* [in] [charset(UTF16)] */,
3798 const char *value_name
/* [in] [charset(UTF16)] */,
3801 struct spoolss_DeletePrinterDataEx r
;
3805 r
.in
.handle
= handle
;
3806 r
.in
.key_name
= key_name
;
3807 r
.in
.value_name
= value_name
;
3809 if (DEBUGLEVEL
>= 10) {
3810 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx
, &r
);
3813 status
= cli
->dispatch(cli
,
3816 NDR_SPOOLSS_DELETEPRINTERDATAEX
,
3819 if (!NT_STATUS_IS_OK(status
)) {
3823 if (DEBUGLEVEL
>= 10) {
3824 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx
, &r
);
3827 if (NT_STATUS_IS_ERR(status
)) {
3831 /* Return variables */
3835 *werror
= r
.out
.result
;
3838 return werror_to_ntstatus(r
.out
.result
);
3841 NTSTATUS
rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client
*cli
,
3842 TALLOC_CTX
*mem_ctx
,
3845 struct spoolss_DeletePrinterKey r
;
3850 if (DEBUGLEVEL
>= 10) {
3851 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey
, &r
);
3854 status
= cli
->dispatch(cli
,
3857 NDR_SPOOLSS_DELETEPRINTERKEY
,
3860 if (!NT_STATUS_IS_OK(status
)) {
3864 if (DEBUGLEVEL
>= 10) {
3865 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey
, &r
);
3868 if (NT_STATUS_IS_ERR(status
)) {
3872 /* Return variables */
3876 *werror
= r
.out
.result
;
3879 return werror_to_ntstatus(r
.out
.result
);
3882 NTSTATUS
rpccli_spoolss_53(struct rpc_pipe_client
*cli
,
3883 TALLOC_CTX
*mem_ctx
,
3886 struct spoolss_53 r
;
3891 if (DEBUGLEVEL
>= 10) {
3892 NDR_PRINT_IN_DEBUG(spoolss_53
, &r
);
3895 status
= cli
->dispatch(cli
,
3901 if (!NT_STATUS_IS_OK(status
)) {
3905 if (DEBUGLEVEL
>= 10) {
3906 NDR_PRINT_OUT_DEBUG(spoolss_53
, &r
);
3909 if (NT_STATUS_IS_ERR(status
)) {
3913 /* Return variables */
3917 *werror
= r
.out
.result
;
3920 return werror_to_ntstatus(r
.out
.result
);
3923 NTSTATUS
rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client
*cli
,
3924 TALLOC_CTX
*mem_ctx
,
3927 struct spoolss_DeletePrinterDriverEx r
;
3932 if (DEBUGLEVEL
>= 10) {
3933 NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx
, &r
);
3936 status
= cli
->dispatch(cli
,
3939 NDR_SPOOLSS_DELETEPRINTERDRIVEREX
,
3942 if (!NT_STATUS_IS_OK(status
)) {
3946 if (DEBUGLEVEL
>= 10) {
3947 NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx
, &r
);
3950 if (NT_STATUS_IS_ERR(status
)) {
3954 /* Return variables */
3958 *werror
= r
.out
.result
;
3961 return werror_to_ntstatus(r
.out
.result
);
3964 NTSTATUS
rpccli_spoolss_55(struct rpc_pipe_client
*cli
,
3965 TALLOC_CTX
*mem_ctx
,
3968 struct spoolss_55 r
;
3973 if (DEBUGLEVEL
>= 10) {
3974 NDR_PRINT_IN_DEBUG(spoolss_55
, &r
);
3977 status
= cli
->dispatch(cli
,
3983 if (!NT_STATUS_IS_OK(status
)) {
3987 if (DEBUGLEVEL
>= 10) {
3988 NDR_PRINT_OUT_DEBUG(spoolss_55
, &r
);
3991 if (NT_STATUS_IS_ERR(status
)) {
3995 /* Return variables */
3999 *werror
= r
.out
.result
;
4002 return werror_to_ntstatus(r
.out
.result
);
4005 NTSTATUS
rpccli_spoolss_56(struct rpc_pipe_client
*cli
,
4006 TALLOC_CTX
*mem_ctx
,
4009 struct spoolss_56 r
;
4014 if (DEBUGLEVEL
>= 10) {
4015 NDR_PRINT_IN_DEBUG(spoolss_56
, &r
);
4018 status
= cli
->dispatch(cli
,
4024 if (!NT_STATUS_IS_OK(status
)) {
4028 if (DEBUGLEVEL
>= 10) {
4029 NDR_PRINT_OUT_DEBUG(spoolss_56
, &r
);
4032 if (NT_STATUS_IS_ERR(status
)) {
4036 /* Return variables */
4040 *werror
= r
.out
.result
;
4043 return werror_to_ntstatus(r
.out
.result
);
4046 NTSTATUS
rpccli_spoolss_57(struct rpc_pipe_client
*cli
,
4047 TALLOC_CTX
*mem_ctx
,
4050 struct spoolss_57 r
;
4055 if (DEBUGLEVEL
>= 10) {
4056 NDR_PRINT_IN_DEBUG(spoolss_57
, &r
);
4059 status
= cli
->dispatch(cli
,
4065 if (!NT_STATUS_IS_OK(status
)) {
4069 if (DEBUGLEVEL
>= 10) {
4070 NDR_PRINT_OUT_DEBUG(spoolss_57
, &r
);
4073 if (NT_STATUS_IS_ERR(status
)) {
4077 /* Return variables */
4081 *werror
= r
.out
.result
;
4084 return werror_to_ntstatus(r
.out
.result
);
4087 NTSTATUS
rpccli_spoolss_XcvData(struct rpc_pipe_client
*cli
,
4088 TALLOC_CTX
*mem_ctx
,
4089 struct policy_handle
*handle
/* [in] [ref] */,
4090 const char *function_name
/* [in] [charset(UTF16)] */,
4091 DATA_BLOB in_data
/* [in] */,
4092 uint32_t _in_data_length
/* [in] [value(r->in.in_data.length)] */,
4093 uint8_t *out_data
/* [out] [ref,size_is(out_data_size)] */,
4094 uint32_t out_data_size
/* [in] */,
4095 uint32_t *needed
/* [out] [ref] */,
4096 uint32_t *status_code
/* [in,out] [ref] */,
4099 struct spoolss_XcvData r
;
4103 r
.in
.handle
= handle
;
4104 r
.in
.function_name
= function_name
;
4105 r
.in
.in_data
= in_data
;
4106 r
.in
._in_data_length
= _in_data_length
;
4107 r
.in
.out_data_size
= out_data_size
;
4108 r
.in
.status_code
= status_code
;
4110 if (DEBUGLEVEL
>= 10) {
4111 NDR_PRINT_IN_DEBUG(spoolss_XcvData
, &r
);
4114 status
= cli
->dispatch(cli
,
4117 NDR_SPOOLSS_XCVDATA
,
4120 if (!NT_STATUS_IS_OK(status
)) {
4124 if (DEBUGLEVEL
>= 10) {
4125 NDR_PRINT_OUT_DEBUG(spoolss_XcvData
, &r
);
4128 if (NT_STATUS_IS_ERR(status
)) {
4132 /* Return variables */
4133 memcpy(out_data
, r
.out
.out_data
, r
.in
.out_data_size
* sizeof(*out_data
));
4134 *needed
= *r
.out
.needed
;
4135 *status_code
= *r
.out
.status_code
;
4139 *werror
= r
.out
.result
;
4142 return werror_to_ntstatus(r
.out
.result
);
4145 NTSTATUS
rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client
*cli
,
4146 TALLOC_CTX
*mem_ctx
,
4149 struct spoolss_AddPrinterDriverEx r
;
4154 if (DEBUGLEVEL
>= 10) {
4155 NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx
, &r
);
4158 status
= cli
->dispatch(cli
,
4161 NDR_SPOOLSS_ADDPRINTERDRIVEREX
,
4164 if (!NT_STATUS_IS_OK(status
)) {
4168 if (DEBUGLEVEL
>= 10) {
4169 NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx
, &r
);
4172 if (NT_STATUS_IS_ERR(status
)) {
4176 /* Return variables */
4180 *werror
= r
.out
.result
;
4183 return werror_to_ntstatus(r
.out
.result
);
4186 NTSTATUS
rpccli_spoolss_5a(struct rpc_pipe_client
*cli
,
4187 TALLOC_CTX
*mem_ctx
,
4190 struct spoolss_5a r
;
4195 if (DEBUGLEVEL
>= 10) {
4196 NDR_PRINT_IN_DEBUG(spoolss_5a
, &r
);
4199 status
= cli
->dispatch(cli
,
4205 if (!NT_STATUS_IS_OK(status
)) {
4209 if (DEBUGLEVEL
>= 10) {
4210 NDR_PRINT_OUT_DEBUG(spoolss_5a
, &r
);
4213 if (NT_STATUS_IS_ERR(status
)) {
4217 /* Return variables */
4221 *werror
= r
.out
.result
;
4224 return werror_to_ntstatus(r
.out
.result
);
4227 NTSTATUS
rpccli_spoolss_5b(struct rpc_pipe_client
*cli
,
4228 TALLOC_CTX
*mem_ctx
,
4231 struct spoolss_5b r
;
4236 if (DEBUGLEVEL
>= 10) {
4237 NDR_PRINT_IN_DEBUG(spoolss_5b
, &r
);
4240 status
= cli
->dispatch(cli
,
4246 if (!NT_STATUS_IS_OK(status
)) {
4250 if (DEBUGLEVEL
>= 10) {
4251 NDR_PRINT_OUT_DEBUG(spoolss_5b
, &r
);
4254 if (NT_STATUS_IS_ERR(status
)) {
4258 /* Return variables */
4262 *werror
= r
.out
.result
;
4265 return werror_to_ntstatus(r
.out
.result
);
4268 NTSTATUS
rpccli_spoolss_5c(struct rpc_pipe_client
*cli
,
4269 TALLOC_CTX
*mem_ctx
,
4272 struct spoolss_5c r
;
4277 if (DEBUGLEVEL
>= 10) {
4278 NDR_PRINT_IN_DEBUG(spoolss_5c
, &r
);
4281 status
= cli
->dispatch(cli
,
4287 if (!NT_STATUS_IS_OK(status
)) {
4291 if (DEBUGLEVEL
>= 10) {
4292 NDR_PRINT_OUT_DEBUG(spoolss_5c
, &r
);
4295 if (NT_STATUS_IS_ERR(status
)) {
4299 /* Return variables */
4303 *werror
= r
.out
.result
;
4306 return werror_to_ntstatus(r
.out
.result
);
4309 NTSTATUS
rpccli_spoolss_5d(struct rpc_pipe_client
*cli
,
4310 TALLOC_CTX
*mem_ctx
,
4313 struct spoolss_5d r
;
4318 if (DEBUGLEVEL
>= 10) {
4319 NDR_PRINT_IN_DEBUG(spoolss_5d
, &r
);
4322 status
= cli
->dispatch(cli
,
4328 if (!NT_STATUS_IS_OK(status
)) {
4332 if (DEBUGLEVEL
>= 10) {
4333 NDR_PRINT_OUT_DEBUG(spoolss_5d
, &r
);
4336 if (NT_STATUS_IS_ERR(status
)) {
4340 /* Return variables */
4344 *werror
= r
.out
.result
;
4347 return werror_to_ntstatus(r
.out
.result
);
4350 NTSTATUS
rpccli_spoolss_5e(struct rpc_pipe_client
*cli
,
4351 TALLOC_CTX
*mem_ctx
,
4354 struct spoolss_5e r
;
4359 if (DEBUGLEVEL
>= 10) {
4360 NDR_PRINT_IN_DEBUG(spoolss_5e
, &r
);
4363 status
= cli
->dispatch(cli
,
4369 if (!NT_STATUS_IS_OK(status
)) {
4373 if (DEBUGLEVEL
>= 10) {
4374 NDR_PRINT_OUT_DEBUG(spoolss_5e
, &r
);
4377 if (NT_STATUS_IS_ERR(status
)) {
4381 /* Return variables */
4385 *werror
= r
.out
.result
;
4388 return werror_to_ntstatus(r
.out
.result
);
4391 NTSTATUS
rpccli_spoolss_5f(struct rpc_pipe_client
*cli
,
4392 TALLOC_CTX
*mem_ctx
,
4395 struct spoolss_5f r
;
4400 if (DEBUGLEVEL
>= 10) {
4401 NDR_PRINT_IN_DEBUG(spoolss_5f
, &r
);
4404 status
= cli
->dispatch(cli
,
4410 if (!NT_STATUS_IS_OK(status
)) {
4414 if (DEBUGLEVEL
>= 10) {
4415 NDR_PRINT_OUT_DEBUG(spoolss_5f
, &r
);
4418 if (NT_STATUS_IS_ERR(status
)) {
4422 /* Return variables */
4426 *werror
= r
.out
.result
;
4429 return werror_to_ntstatus(r
.out
.result
);