Conditional install of the cifs.upcall man page
[Samba.git] / source / librpc / gen_ndr / cli_winreg.c
blobaf0e47d90a8d4ed3eee8c55af6a3ae36e65ce15b
1 /*
2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "librpc/gen_ndr/cli_winreg.h"
9 NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli,
10 TALLOC_CTX *mem_ctx,
11 uint16_t *system_name /* [in] [unique] */,
12 uint32_t access_mask /* [in] */,
13 struct policy_handle *handle /* [out] [ref] */,
14 WERROR *werror)
16 struct winreg_OpenHKCR r;
17 NTSTATUS status;
19 /* In parameters */
20 r.in.system_name = system_name;
21 r.in.access_mask = access_mask;
23 if (DEBUGLEVEL >= 10) {
24 NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, &r);
27 status = cli_do_rpc_ndr(cli,
28 mem_ctx,
29 PI_WINREG,
30 &ndr_table_winreg,
31 NDR_WINREG_OPENHKCR,
32 &r);
34 if (!NT_STATUS_IS_OK(status)) {
35 return status;
38 if (DEBUGLEVEL >= 10) {
39 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, &r);
42 if (NT_STATUS_IS_ERR(status)) {
43 return status;
46 /* Return variables */
47 *handle = *r.out.handle;
49 /* Return result */
50 if (werror) {
51 *werror = r.out.result;
54 return werror_to_ntstatus(r.out.result);
57 NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli,
58 TALLOC_CTX *mem_ctx,
59 uint16_t *system_name /* [in] [unique] */,
60 uint32_t access_mask /* [in] */,
61 struct policy_handle *handle /* [out] [ref] */,
62 WERROR *werror)
64 struct winreg_OpenHKCU r;
65 NTSTATUS status;
67 /* In parameters */
68 r.in.system_name = system_name;
69 r.in.access_mask = access_mask;
71 if (DEBUGLEVEL >= 10) {
72 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, &r);
75 status = cli_do_rpc_ndr(cli,
76 mem_ctx,
77 PI_WINREG,
78 &ndr_table_winreg,
79 NDR_WINREG_OPENHKCU,
80 &r);
82 if (!NT_STATUS_IS_OK(status)) {
83 return status;
86 if (DEBUGLEVEL >= 10) {
87 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, &r);
90 if (NT_STATUS_IS_ERR(status)) {
91 return status;
94 /* Return variables */
95 *handle = *r.out.handle;
97 /* Return result */
98 if (werror) {
99 *werror = r.out.result;
102 return werror_to_ntstatus(r.out.result);
105 NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli,
106 TALLOC_CTX *mem_ctx,
107 uint16_t *system_name /* [in] [unique] */,
108 uint32_t access_mask /* [in] */,
109 struct policy_handle *handle /* [out] [ref] */,
110 WERROR *werror)
112 struct winreg_OpenHKLM r;
113 NTSTATUS status;
115 /* In parameters */
116 r.in.system_name = system_name;
117 r.in.access_mask = access_mask;
119 if (DEBUGLEVEL >= 10) {
120 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, &r);
123 status = cli_do_rpc_ndr(cli,
124 mem_ctx,
125 PI_WINREG,
126 &ndr_table_winreg,
127 NDR_WINREG_OPENHKLM,
128 &r);
130 if (!NT_STATUS_IS_OK(status)) {
131 return status;
134 if (DEBUGLEVEL >= 10) {
135 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, &r);
138 if (NT_STATUS_IS_ERR(status)) {
139 return status;
142 /* Return variables */
143 *handle = *r.out.handle;
145 /* Return result */
146 if (werror) {
147 *werror = r.out.result;
150 return werror_to_ntstatus(r.out.result);
153 NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli,
154 TALLOC_CTX *mem_ctx,
155 uint16_t *system_name /* [in] [unique] */,
156 uint32_t access_mask /* [in] */,
157 struct policy_handle *handle /* [out] [ref] */,
158 WERROR *werror)
160 struct winreg_OpenHKPD r;
161 NTSTATUS status;
163 /* In parameters */
164 r.in.system_name = system_name;
165 r.in.access_mask = access_mask;
167 if (DEBUGLEVEL >= 10) {
168 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, &r);
171 status = cli_do_rpc_ndr(cli,
172 mem_ctx,
173 PI_WINREG,
174 &ndr_table_winreg,
175 NDR_WINREG_OPENHKPD,
176 &r);
178 if (!NT_STATUS_IS_OK(status)) {
179 return status;
182 if (DEBUGLEVEL >= 10) {
183 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, &r);
186 if (NT_STATUS_IS_ERR(status)) {
187 return status;
190 /* Return variables */
191 *handle = *r.out.handle;
193 /* Return result */
194 if (werror) {
195 *werror = r.out.result;
198 return werror_to_ntstatus(r.out.result);
201 NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli,
202 TALLOC_CTX *mem_ctx,
203 uint16_t *system_name /* [in] [unique] */,
204 uint32_t access_mask /* [in] */,
205 struct policy_handle *handle /* [out] [ref] */,
206 WERROR *werror)
208 struct winreg_OpenHKU r;
209 NTSTATUS status;
211 /* In parameters */
212 r.in.system_name = system_name;
213 r.in.access_mask = access_mask;
215 if (DEBUGLEVEL >= 10) {
216 NDR_PRINT_IN_DEBUG(winreg_OpenHKU, &r);
219 status = cli_do_rpc_ndr(cli,
220 mem_ctx,
221 PI_WINREG,
222 &ndr_table_winreg,
223 NDR_WINREG_OPENHKU,
224 &r);
226 if (!NT_STATUS_IS_OK(status)) {
227 return status;
230 if (DEBUGLEVEL >= 10) {
231 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, &r);
234 if (NT_STATUS_IS_ERR(status)) {
235 return status;
238 /* Return variables */
239 *handle = *r.out.handle;
241 /* Return result */
242 if (werror) {
243 *werror = r.out.result;
246 return werror_to_ntstatus(r.out.result);
249 NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli,
250 TALLOC_CTX *mem_ctx,
251 struct policy_handle *handle /* [in,out] [ref] */,
252 WERROR *werror)
254 struct winreg_CloseKey r;
255 NTSTATUS status;
257 /* In parameters */
258 r.in.handle = handle;
260 if (DEBUGLEVEL >= 10) {
261 NDR_PRINT_IN_DEBUG(winreg_CloseKey, &r);
264 status = cli_do_rpc_ndr(cli,
265 mem_ctx,
266 PI_WINREG,
267 &ndr_table_winreg,
268 NDR_WINREG_CLOSEKEY,
269 &r);
271 if (!NT_STATUS_IS_OK(status)) {
272 return status;
275 if (DEBUGLEVEL >= 10) {
276 NDR_PRINT_OUT_DEBUG(winreg_CloseKey, &r);
279 if (NT_STATUS_IS_ERR(status)) {
280 return status;
283 /* Return variables */
284 *handle = *r.out.handle;
286 /* Return result */
287 if (werror) {
288 *werror = r.out.result;
291 return werror_to_ntstatus(r.out.result);
294 NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli,
295 TALLOC_CTX *mem_ctx,
296 struct policy_handle *handle /* [in] [ref] */,
297 struct winreg_String name /* [in] */,
298 struct winreg_String keyclass /* [in] */,
299 uint32_t options /* [in] */,
300 uint32_t access_mask /* [in] */,
301 struct winreg_SecBuf *secdesc /* [in] [unique] */,
302 struct policy_handle *new_handle /* [out] [ref] */,
303 enum winreg_CreateAction *action_taken /* [in,out] [unique] */,
304 WERROR *werror)
306 struct winreg_CreateKey r;
307 NTSTATUS status;
309 /* In parameters */
310 r.in.handle = handle;
311 r.in.name = name;
312 r.in.keyclass = keyclass;
313 r.in.options = options;
314 r.in.access_mask = access_mask;
315 r.in.secdesc = secdesc;
316 r.in.action_taken = action_taken;
318 if (DEBUGLEVEL >= 10) {
319 NDR_PRINT_IN_DEBUG(winreg_CreateKey, &r);
322 status = cli_do_rpc_ndr(cli,
323 mem_ctx,
324 PI_WINREG,
325 &ndr_table_winreg,
326 NDR_WINREG_CREATEKEY,
327 &r);
329 if (!NT_STATUS_IS_OK(status)) {
330 return status;
333 if (DEBUGLEVEL >= 10) {
334 NDR_PRINT_OUT_DEBUG(winreg_CreateKey, &r);
337 if (NT_STATUS_IS_ERR(status)) {
338 return status;
341 /* Return variables */
342 *new_handle = *r.out.new_handle;
343 if (action_taken && r.out.action_taken) {
344 *action_taken = *r.out.action_taken;
347 /* Return result */
348 if (werror) {
349 *werror = r.out.result;
352 return werror_to_ntstatus(r.out.result);
355 NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli,
356 TALLOC_CTX *mem_ctx,
357 struct policy_handle *handle /* [in] [ref] */,
358 struct winreg_String key /* [in] */,
359 WERROR *werror)
361 struct winreg_DeleteKey r;
362 NTSTATUS status;
364 /* In parameters */
365 r.in.handle = handle;
366 r.in.key = key;
368 if (DEBUGLEVEL >= 10) {
369 NDR_PRINT_IN_DEBUG(winreg_DeleteKey, &r);
372 status = cli_do_rpc_ndr(cli,
373 mem_ctx,
374 PI_WINREG,
375 &ndr_table_winreg,
376 NDR_WINREG_DELETEKEY,
377 &r);
379 if (!NT_STATUS_IS_OK(status)) {
380 return status;
383 if (DEBUGLEVEL >= 10) {
384 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, &r);
387 if (NT_STATUS_IS_ERR(status)) {
388 return status;
391 /* Return variables */
393 /* Return result */
394 if (werror) {
395 *werror = r.out.result;
398 return werror_to_ntstatus(r.out.result);
401 NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli,
402 TALLOC_CTX *mem_ctx,
403 struct policy_handle *handle /* [in] [ref] */,
404 struct winreg_String value /* [in] */,
405 WERROR *werror)
407 struct winreg_DeleteValue r;
408 NTSTATUS status;
410 /* In parameters */
411 r.in.handle = handle;
412 r.in.value = value;
414 if (DEBUGLEVEL >= 10) {
415 NDR_PRINT_IN_DEBUG(winreg_DeleteValue, &r);
418 status = cli_do_rpc_ndr(cli,
419 mem_ctx,
420 PI_WINREG,
421 &ndr_table_winreg,
422 NDR_WINREG_DELETEVALUE,
423 &r);
425 if (!NT_STATUS_IS_OK(status)) {
426 return status;
429 if (DEBUGLEVEL >= 10) {
430 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, &r);
433 if (NT_STATUS_IS_ERR(status)) {
434 return status;
437 /* Return variables */
439 /* Return result */
440 if (werror) {
441 *werror = r.out.result;
444 return werror_to_ntstatus(r.out.result);
447 NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli,
448 TALLOC_CTX *mem_ctx,
449 struct policy_handle *handle /* [in] [ref] */,
450 uint32_t enum_index /* [in] */,
451 struct winreg_StringBuf *name /* [in,out] [ref] */,
452 struct winreg_StringBuf *keyclass /* [in,out] [unique] */,
453 NTTIME *last_changed_time /* [in,out] [unique] */,
454 WERROR *werror)
456 struct winreg_EnumKey r;
457 NTSTATUS status;
459 /* In parameters */
460 r.in.handle = handle;
461 r.in.enum_index = enum_index;
462 r.in.name = name;
463 r.in.keyclass = keyclass;
464 r.in.last_changed_time = last_changed_time;
466 if (DEBUGLEVEL >= 10) {
467 NDR_PRINT_IN_DEBUG(winreg_EnumKey, &r);
470 status = cli_do_rpc_ndr(cli,
471 mem_ctx,
472 PI_WINREG,
473 &ndr_table_winreg,
474 NDR_WINREG_ENUMKEY,
475 &r);
477 if (!NT_STATUS_IS_OK(status)) {
478 return status;
481 if (DEBUGLEVEL >= 10) {
482 NDR_PRINT_OUT_DEBUG(winreg_EnumKey, &r);
485 if (NT_STATUS_IS_ERR(status)) {
486 return status;
489 /* Return variables */
490 *name = *r.out.name;
491 if (keyclass && r.out.keyclass) {
492 *keyclass = *r.out.keyclass;
494 if (last_changed_time && r.out.last_changed_time) {
495 *last_changed_time = *r.out.last_changed_time;
498 /* Return result */
499 if (werror) {
500 *werror = r.out.result;
503 return werror_to_ntstatus(r.out.result);
506 NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli,
507 TALLOC_CTX *mem_ctx,
508 struct policy_handle *handle /* [in] [ref] */,
509 uint32_t enum_index /* [in] */,
510 struct winreg_ValNameBuf *name /* [in,out] [ref] */,
511 enum winreg_Type *type /* [in,out] [unique] */,
512 uint8_t *value /* [in,out] [unique,length_is(*length),size_is(*size)] */,
513 uint32_t *size /* [in,out] [unique] */,
514 uint32_t *length /* [in,out] [unique] */,
515 WERROR *werror)
517 struct winreg_EnumValue r;
518 NTSTATUS status;
520 /* In parameters */
521 r.in.handle = handle;
522 r.in.enum_index = enum_index;
523 r.in.name = name;
524 r.in.type = type;
525 r.in.value = value;
526 r.in.size = size;
527 r.in.length = length;
529 if (DEBUGLEVEL >= 10) {
530 NDR_PRINT_IN_DEBUG(winreg_EnumValue, &r);
533 status = cli_do_rpc_ndr(cli,
534 mem_ctx,
535 PI_WINREG,
536 &ndr_table_winreg,
537 NDR_WINREG_ENUMVALUE,
538 &r);
540 if (!NT_STATUS_IS_OK(status)) {
541 return status;
544 if (DEBUGLEVEL >= 10) {
545 NDR_PRINT_OUT_DEBUG(winreg_EnumValue, &r);
548 if (NT_STATUS_IS_ERR(status)) {
549 return status;
552 /* Return variables */
553 *name = *r.out.name;
554 if (type && r.out.type) {
555 *type = *r.out.type;
557 if (value && r.out.value) {
558 memcpy(value, r.out.value, *r.in.size * sizeof(*value));
560 if (size && r.out.size) {
561 *size = *r.out.size;
563 if (length && r.out.length) {
564 *length = *r.out.length;
567 /* Return result */
568 if (werror) {
569 *werror = r.out.result;
572 return werror_to_ntstatus(r.out.result);
575 NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli,
576 TALLOC_CTX *mem_ctx,
577 struct policy_handle *handle /* [in] [ref] */,
578 WERROR *werror)
580 struct winreg_FlushKey r;
581 NTSTATUS status;
583 /* In parameters */
584 r.in.handle = handle;
586 if (DEBUGLEVEL >= 10) {
587 NDR_PRINT_IN_DEBUG(winreg_FlushKey, &r);
590 status = cli_do_rpc_ndr(cli,
591 mem_ctx,
592 PI_WINREG,
593 &ndr_table_winreg,
594 NDR_WINREG_FLUSHKEY,
595 &r);
597 if (!NT_STATUS_IS_OK(status)) {
598 return status;
601 if (DEBUGLEVEL >= 10) {
602 NDR_PRINT_OUT_DEBUG(winreg_FlushKey, &r);
605 if (NT_STATUS_IS_ERR(status)) {
606 return status;
609 /* Return variables */
611 /* Return result */
612 if (werror) {
613 *werror = r.out.result;
616 return werror_to_ntstatus(r.out.result);
619 NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli,
620 TALLOC_CTX *mem_ctx,
621 struct policy_handle *handle /* [in] [ref] */,
622 uint32_t sec_info /* [in] */,
623 struct KeySecurityData *sd /* [in,out] [ref] */,
624 WERROR *werror)
626 struct winreg_GetKeySecurity r;
627 NTSTATUS status;
629 /* In parameters */
630 r.in.handle = handle;
631 r.in.sec_info = sec_info;
632 r.in.sd = sd;
634 if (DEBUGLEVEL >= 10) {
635 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity, &r);
638 status = cli_do_rpc_ndr(cli,
639 mem_ctx,
640 PI_WINREG,
641 &ndr_table_winreg,
642 NDR_WINREG_GETKEYSECURITY,
643 &r);
645 if (!NT_STATUS_IS_OK(status)) {
646 return status;
649 if (DEBUGLEVEL >= 10) {
650 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, &r);
653 if (NT_STATUS_IS_ERR(status)) {
654 return status;
657 /* Return variables */
658 *sd = *r.out.sd;
660 /* Return result */
661 if (werror) {
662 *werror = r.out.result;
665 return werror_to_ntstatus(r.out.result);
668 NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli,
669 TALLOC_CTX *mem_ctx,
670 struct policy_handle *handle /* [in] [ref] */,
671 struct winreg_String *keyname /* [in] [unique] */,
672 struct winreg_String *filename /* [in] [unique] */,
673 WERROR *werror)
675 struct winreg_LoadKey r;
676 NTSTATUS status;
678 /* In parameters */
679 r.in.handle = handle;
680 r.in.keyname = keyname;
681 r.in.filename = filename;
683 if (DEBUGLEVEL >= 10) {
684 NDR_PRINT_IN_DEBUG(winreg_LoadKey, &r);
687 status = cli_do_rpc_ndr(cli,
688 mem_ctx,
689 PI_WINREG,
690 &ndr_table_winreg,
691 NDR_WINREG_LOADKEY,
692 &r);
694 if (!NT_STATUS_IS_OK(status)) {
695 return status;
698 if (DEBUGLEVEL >= 10) {
699 NDR_PRINT_OUT_DEBUG(winreg_LoadKey, &r);
702 if (NT_STATUS_IS_ERR(status)) {
703 return status;
706 /* Return variables */
708 /* Return result */
709 if (werror) {
710 *werror = r.out.result;
713 return werror_to_ntstatus(r.out.result);
716 NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli,
717 TALLOC_CTX *mem_ctx,
718 struct policy_handle *handle /* [in] [ref] */,
719 uint8_t watch_subtree /* [in] */,
720 uint32_t notify_filter /* [in] */,
721 uint32_t unknown /* [in] */,
722 struct winreg_String string1 /* [in] */,
723 struct winreg_String string2 /* [in] */,
724 uint32_t unknown2 /* [in] */,
725 WERROR *werror)
727 struct winreg_NotifyChangeKeyValue r;
728 NTSTATUS status;
730 /* In parameters */
731 r.in.handle = handle;
732 r.in.watch_subtree = watch_subtree;
733 r.in.notify_filter = notify_filter;
734 r.in.unknown = unknown;
735 r.in.string1 = string1;
736 r.in.string2 = string2;
737 r.in.unknown2 = unknown2;
739 if (DEBUGLEVEL >= 10) {
740 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue, &r);
743 status = cli_do_rpc_ndr(cli,
744 mem_ctx,
745 PI_WINREG,
746 &ndr_table_winreg,
747 NDR_WINREG_NOTIFYCHANGEKEYVALUE,
748 &r);
750 if (!NT_STATUS_IS_OK(status)) {
751 return status;
754 if (DEBUGLEVEL >= 10) {
755 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, &r);
758 if (NT_STATUS_IS_ERR(status)) {
759 return status;
762 /* Return variables */
764 /* Return result */
765 if (werror) {
766 *werror = r.out.result;
769 return werror_to_ntstatus(r.out.result);
772 NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli,
773 TALLOC_CTX *mem_ctx,
774 struct policy_handle *parent_handle /* [in] [ref] */,
775 struct winreg_String keyname /* [in] */,
776 uint32_t unknown /* [in] */,
777 uint32_t access_mask /* [in] */,
778 struct policy_handle *handle /* [out] [ref] */,
779 WERROR *werror)
781 struct winreg_OpenKey r;
782 NTSTATUS status;
784 /* In parameters */
785 r.in.parent_handle = parent_handle;
786 r.in.keyname = keyname;
787 r.in.unknown = unknown;
788 r.in.access_mask = access_mask;
790 if (DEBUGLEVEL >= 10) {
791 NDR_PRINT_IN_DEBUG(winreg_OpenKey, &r);
794 status = cli_do_rpc_ndr(cli,
795 mem_ctx,
796 PI_WINREG,
797 &ndr_table_winreg,
798 NDR_WINREG_OPENKEY,
799 &r);
801 if (!NT_STATUS_IS_OK(status)) {
802 return status;
805 if (DEBUGLEVEL >= 10) {
806 NDR_PRINT_OUT_DEBUG(winreg_OpenKey, &r);
809 if (NT_STATUS_IS_ERR(status)) {
810 return status;
813 /* Return variables */
814 *handle = *r.out.handle;
816 /* Return result */
817 if (werror) {
818 *werror = r.out.result;
821 return werror_to_ntstatus(r.out.result);
824 NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli,
825 TALLOC_CTX *mem_ctx,
826 struct policy_handle *handle /* [in] [ref] */,
827 struct winreg_String *classname /* [in,out] [ref] */,
828 uint32_t *num_subkeys /* [out] [ref] */,
829 uint32_t *max_subkeylen /* [out] [ref] */,
830 uint32_t *max_classlen /* [out] [ref] */,
831 uint32_t *num_values /* [out] [ref] */,
832 uint32_t *max_valnamelen /* [out] [ref] */,
833 uint32_t *max_valbufsize /* [out] [ref] */,
834 uint32_t *secdescsize /* [out] [ref] */,
835 NTTIME *last_changed_time /* [out] [ref] */,
836 WERROR *werror)
838 struct winreg_QueryInfoKey r;
839 NTSTATUS status;
841 /* In parameters */
842 r.in.handle = handle;
843 r.in.classname = classname;
845 if (DEBUGLEVEL >= 10) {
846 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, &r);
849 status = cli_do_rpc_ndr(cli,
850 mem_ctx,
851 PI_WINREG,
852 &ndr_table_winreg,
853 NDR_WINREG_QUERYINFOKEY,
854 &r);
856 if (!NT_STATUS_IS_OK(status)) {
857 return status;
860 if (DEBUGLEVEL >= 10) {
861 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &r);
864 if (NT_STATUS_IS_ERR(status)) {
865 return status;
868 /* Return variables */
869 *classname = *r.out.classname;
870 *num_subkeys = *r.out.num_subkeys;
871 *max_subkeylen = *r.out.max_subkeylen;
872 *max_classlen = *r.out.max_classlen;
873 *num_values = *r.out.num_values;
874 *max_valnamelen = *r.out.max_valnamelen;
875 *max_valbufsize = *r.out.max_valbufsize;
876 *secdescsize = *r.out.secdescsize;
877 *last_changed_time = *r.out.last_changed_time;
879 /* Return result */
880 if (werror) {
881 *werror = r.out.result;
884 return werror_to_ntstatus(r.out.result);
887 NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
888 TALLOC_CTX *mem_ctx,
889 struct policy_handle *handle /* [in] [ref] */,
890 struct winreg_String *value_name /* [in] [ref] */,
891 enum winreg_Type *type /* [in,out] [unique] */,
892 uint8_t *data /* [in,out] [unique,length_is(*value_length),size_is(*data_size)] */,
893 uint32_t *data_size /* [in,out] [unique] */,
894 uint32_t *value_length /* [in,out] [unique] */,
895 WERROR *werror)
897 struct winreg_QueryValue r;
898 NTSTATUS status;
900 /* In parameters */
901 r.in.handle = handle;
902 r.in.value_name = value_name;
903 r.in.type = type;
904 r.in.data = data;
905 r.in.data_size = data_size;
906 r.in.value_length = value_length;
908 if (DEBUGLEVEL >= 10) {
909 NDR_PRINT_IN_DEBUG(winreg_QueryValue, &r);
912 status = cli_do_rpc_ndr(cli,
913 mem_ctx,
914 PI_WINREG,
915 &ndr_table_winreg,
916 NDR_WINREG_QUERYVALUE,
917 &r);
919 if (!NT_STATUS_IS_OK(status)) {
920 return status;
923 if (DEBUGLEVEL >= 10) {
924 NDR_PRINT_OUT_DEBUG(winreg_QueryValue, &r);
927 if (NT_STATUS_IS_ERR(status)) {
928 return status;
931 /* Return variables */
932 if (type && r.out.type) {
933 *type = *r.out.type;
935 if (data && r.out.data) {
936 memcpy(data, r.out.data, *r.in.data_size * sizeof(*data));
938 if (data_size && r.out.data_size) {
939 *data_size = *r.out.data_size;
941 if (value_length && r.out.value_length) {
942 *value_length = *r.out.value_length;
945 /* Return result */
946 if (werror) {
947 *werror = r.out.result;
950 return werror_to_ntstatus(r.out.result);
953 NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli,
954 TALLOC_CTX *mem_ctx,
955 WERROR *werror)
957 struct winreg_ReplaceKey r;
958 NTSTATUS status;
960 /* In parameters */
962 if (DEBUGLEVEL >= 10) {
963 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey, &r);
966 status = cli_do_rpc_ndr(cli,
967 mem_ctx,
968 PI_WINREG,
969 &ndr_table_winreg,
970 NDR_WINREG_REPLACEKEY,
971 &r);
973 if (!NT_STATUS_IS_OK(status)) {
974 return status;
977 if (DEBUGLEVEL >= 10) {
978 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, &r);
981 if (NT_STATUS_IS_ERR(status)) {
982 return status;
985 /* Return variables */
987 /* Return result */
988 if (werror) {
989 *werror = r.out.result;
992 return werror_to_ntstatus(r.out.result);
995 NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli,
996 TALLOC_CTX *mem_ctx,
997 struct policy_handle *handle /* [in] [ref] */,
998 struct winreg_String *filename /* [in] [ref] */,
999 uint32_t flags /* [in] */,
1000 WERROR *werror)
1002 struct winreg_RestoreKey r;
1003 NTSTATUS status;
1005 /* In parameters */
1006 r.in.handle = handle;
1007 r.in.filename = filename;
1008 r.in.flags = flags;
1010 if (DEBUGLEVEL >= 10) {
1011 NDR_PRINT_IN_DEBUG(winreg_RestoreKey, &r);
1014 status = cli_do_rpc_ndr(cli,
1015 mem_ctx,
1016 PI_WINREG,
1017 &ndr_table_winreg,
1018 NDR_WINREG_RESTOREKEY,
1019 &r);
1021 if (!NT_STATUS_IS_OK(status)) {
1022 return status;
1025 if (DEBUGLEVEL >= 10) {
1026 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, &r);
1029 if (NT_STATUS_IS_ERR(status)) {
1030 return status;
1033 /* Return variables */
1035 /* Return result */
1036 if (werror) {
1037 *werror = r.out.result;
1040 return werror_to_ntstatus(r.out.result);
1043 NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli,
1044 TALLOC_CTX *mem_ctx,
1045 struct policy_handle *handle /* [in] [ref] */,
1046 struct winreg_String *filename /* [in] [ref] */,
1047 struct KeySecurityAttribute *sec_attrib /* [in] [unique] */,
1048 WERROR *werror)
1050 struct winreg_SaveKey r;
1051 NTSTATUS status;
1053 /* In parameters */
1054 r.in.handle = handle;
1055 r.in.filename = filename;
1056 r.in.sec_attrib = sec_attrib;
1058 if (DEBUGLEVEL >= 10) {
1059 NDR_PRINT_IN_DEBUG(winreg_SaveKey, &r);
1062 status = cli_do_rpc_ndr(cli,
1063 mem_ctx,
1064 PI_WINREG,
1065 &ndr_table_winreg,
1066 NDR_WINREG_SAVEKEY,
1067 &r);
1069 if (!NT_STATUS_IS_OK(status)) {
1070 return status;
1073 if (DEBUGLEVEL >= 10) {
1074 NDR_PRINT_OUT_DEBUG(winreg_SaveKey, &r);
1077 if (NT_STATUS_IS_ERR(status)) {
1078 return status;
1081 /* Return variables */
1083 /* Return result */
1084 if (werror) {
1085 *werror = r.out.result;
1088 return werror_to_ntstatus(r.out.result);
1091 NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli,
1092 TALLOC_CTX *mem_ctx,
1093 struct policy_handle *handle /* [in] [ref] */,
1094 uint32_t access_mask /* [in] */,
1095 struct KeySecurityData *sd /* [in] [ref] */,
1096 WERROR *werror)
1098 struct winreg_SetKeySecurity r;
1099 NTSTATUS status;
1101 /* In parameters */
1102 r.in.handle = handle;
1103 r.in.access_mask = access_mask;
1104 r.in.sd = sd;
1106 if (DEBUGLEVEL >= 10) {
1107 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, &r);
1110 status = cli_do_rpc_ndr(cli,
1111 mem_ctx,
1112 PI_WINREG,
1113 &ndr_table_winreg,
1114 NDR_WINREG_SETKEYSECURITY,
1115 &r);
1117 if (!NT_STATUS_IS_OK(status)) {
1118 return status;
1121 if (DEBUGLEVEL >= 10) {
1122 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, &r);
1125 if (NT_STATUS_IS_ERR(status)) {
1126 return status;
1129 /* Return variables */
1131 /* Return result */
1132 if (werror) {
1133 *werror = r.out.result;
1136 return werror_to_ntstatus(r.out.result);
1139 NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli,
1140 TALLOC_CTX *mem_ctx,
1141 struct policy_handle *handle /* [in] [ref] */,
1142 struct winreg_String name /* [in] */,
1143 enum winreg_Type type /* [in] */,
1144 uint8_t *data /* [in] [ref,size_is(size)] */,
1145 uint32_t size /* [in] */,
1146 WERROR *werror)
1148 struct winreg_SetValue r;
1149 NTSTATUS status;
1151 /* In parameters */
1152 r.in.handle = handle;
1153 r.in.name = name;
1154 r.in.type = type;
1155 r.in.data = data;
1156 r.in.size = size;
1158 if (DEBUGLEVEL >= 10) {
1159 NDR_PRINT_IN_DEBUG(winreg_SetValue, &r);
1162 status = cli_do_rpc_ndr(cli,
1163 mem_ctx,
1164 PI_WINREG,
1165 &ndr_table_winreg,
1166 NDR_WINREG_SETVALUE,
1167 &r);
1169 if (!NT_STATUS_IS_OK(status)) {
1170 return status;
1173 if (DEBUGLEVEL >= 10) {
1174 NDR_PRINT_OUT_DEBUG(winreg_SetValue, &r);
1177 if (NT_STATUS_IS_ERR(status)) {
1178 return status;
1181 /* Return variables */
1183 /* Return result */
1184 if (werror) {
1185 *werror = r.out.result;
1188 return werror_to_ntstatus(r.out.result);
1191 NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli,
1192 TALLOC_CTX *mem_ctx,
1193 WERROR *werror)
1195 struct winreg_UnLoadKey r;
1196 NTSTATUS status;
1198 /* In parameters */
1200 if (DEBUGLEVEL >= 10) {
1201 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey, &r);
1204 status = cli_do_rpc_ndr(cli,
1205 mem_ctx,
1206 PI_WINREG,
1207 &ndr_table_winreg,
1208 NDR_WINREG_UNLOADKEY,
1209 &r);
1211 if (!NT_STATUS_IS_OK(status)) {
1212 return status;
1215 if (DEBUGLEVEL >= 10) {
1216 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, &r);
1219 if (NT_STATUS_IS_ERR(status)) {
1220 return status;
1223 /* Return variables */
1225 /* Return result */
1226 if (werror) {
1227 *werror = r.out.result;
1230 return werror_to_ntstatus(r.out.result);
1233 NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli,
1234 TALLOC_CTX *mem_ctx,
1235 uint16_t *hostname /* [in] [unique] */,
1236 struct initshutdown_String *message /* [in] [unique] */,
1237 uint32_t timeout /* [in] */,
1238 uint8_t force_apps /* [in] */,
1239 uint8_t reboot /* [in] */,
1240 WERROR *werror)
1242 struct winreg_InitiateSystemShutdown r;
1243 NTSTATUS status;
1245 /* In parameters */
1246 r.in.hostname = hostname;
1247 r.in.message = message;
1248 r.in.timeout = timeout;
1249 r.in.force_apps = force_apps;
1250 r.in.reboot = reboot;
1252 if (DEBUGLEVEL >= 10) {
1253 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, &r);
1256 status = cli_do_rpc_ndr(cli,
1257 mem_ctx,
1258 PI_WINREG,
1259 &ndr_table_winreg,
1260 NDR_WINREG_INITIATESYSTEMSHUTDOWN,
1261 &r);
1263 if (!NT_STATUS_IS_OK(status)) {
1264 return status;
1267 if (DEBUGLEVEL >= 10) {
1268 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, &r);
1271 if (NT_STATUS_IS_ERR(status)) {
1272 return status;
1275 /* Return variables */
1277 /* Return result */
1278 if (werror) {
1279 *werror = r.out.result;
1282 return werror_to_ntstatus(r.out.result);
1285 NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli,
1286 TALLOC_CTX *mem_ctx,
1287 uint16_t *server /* [in] [unique] */,
1288 WERROR *werror)
1290 struct winreg_AbortSystemShutdown r;
1291 NTSTATUS status;
1293 /* In parameters */
1294 r.in.server = server;
1296 if (DEBUGLEVEL >= 10) {
1297 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown, &r);
1300 status = cli_do_rpc_ndr(cli,
1301 mem_ctx,
1302 PI_WINREG,
1303 &ndr_table_winreg,
1304 NDR_WINREG_ABORTSYSTEMSHUTDOWN,
1305 &r);
1307 if (!NT_STATUS_IS_OK(status)) {
1308 return status;
1311 if (DEBUGLEVEL >= 10) {
1312 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, &r);
1315 if (NT_STATUS_IS_ERR(status)) {
1316 return status;
1319 /* Return variables */
1321 /* Return result */
1322 if (werror) {
1323 *werror = r.out.result;
1326 return werror_to_ntstatus(r.out.result);
1329 NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli,
1330 TALLOC_CTX *mem_ctx,
1331 struct policy_handle *handle /* [in] [ref] */,
1332 uint32_t *version /* [out] [ref] */,
1333 WERROR *werror)
1335 struct winreg_GetVersion r;
1336 NTSTATUS status;
1338 /* In parameters */
1339 r.in.handle = handle;
1341 if (DEBUGLEVEL >= 10) {
1342 NDR_PRINT_IN_DEBUG(winreg_GetVersion, &r);
1345 status = cli_do_rpc_ndr(cli,
1346 mem_ctx,
1347 PI_WINREG,
1348 &ndr_table_winreg,
1349 NDR_WINREG_GETVERSION,
1350 &r);
1352 if (!NT_STATUS_IS_OK(status)) {
1353 return status;
1356 if (DEBUGLEVEL >= 10) {
1357 NDR_PRINT_OUT_DEBUG(winreg_GetVersion, &r);
1360 if (NT_STATUS_IS_ERR(status)) {
1361 return status;
1364 /* Return variables */
1365 *version = *r.out.version;
1367 /* Return result */
1368 if (werror) {
1369 *werror = r.out.result;
1372 return werror_to_ntstatus(r.out.result);
1375 NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli,
1376 TALLOC_CTX *mem_ctx,
1377 uint16_t *system_name /* [in] [unique] */,
1378 uint32_t access_mask /* [in] */,
1379 struct policy_handle *handle /* [out] [ref] */,
1380 WERROR *werror)
1382 struct winreg_OpenHKCC r;
1383 NTSTATUS status;
1385 /* In parameters */
1386 r.in.system_name = system_name;
1387 r.in.access_mask = access_mask;
1389 if (DEBUGLEVEL >= 10) {
1390 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &r);
1393 status = cli_do_rpc_ndr(cli,
1394 mem_ctx,
1395 PI_WINREG,
1396 &ndr_table_winreg,
1397 NDR_WINREG_OPENHKCC,
1398 &r);
1400 if (!NT_STATUS_IS_OK(status)) {
1401 return status;
1404 if (DEBUGLEVEL >= 10) {
1405 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, &r);
1408 if (NT_STATUS_IS_ERR(status)) {
1409 return status;
1412 /* Return variables */
1413 *handle = *r.out.handle;
1415 /* Return result */
1416 if (werror) {
1417 *werror = r.out.result;
1420 return werror_to_ntstatus(r.out.result);
1423 NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli,
1424 TALLOC_CTX *mem_ctx,
1425 uint16_t *system_name /* [in] [unique] */,
1426 uint32_t access_mask /* [in] */,
1427 struct policy_handle *handle /* [out] [ref] */,
1428 WERROR *werror)
1430 struct winreg_OpenHKDD r;
1431 NTSTATUS status;
1433 /* In parameters */
1434 r.in.system_name = system_name;
1435 r.in.access_mask = access_mask;
1437 if (DEBUGLEVEL >= 10) {
1438 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &r);
1441 status = cli_do_rpc_ndr(cli,
1442 mem_ctx,
1443 PI_WINREG,
1444 &ndr_table_winreg,
1445 NDR_WINREG_OPENHKDD,
1446 &r);
1448 if (!NT_STATUS_IS_OK(status)) {
1449 return status;
1452 if (DEBUGLEVEL >= 10) {
1453 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, &r);
1456 if (NT_STATUS_IS_ERR(status)) {
1457 return status;
1460 /* Return variables */
1461 *handle = *r.out.handle;
1463 /* Return result */
1464 if (werror) {
1465 *werror = r.out.result;
1468 return werror_to_ntstatus(r.out.result);
1471 NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli,
1472 TALLOC_CTX *mem_ctx,
1473 struct policy_handle *key_handle /* [in] [ref] */,
1474 struct QueryMultipleValue *values /* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
1475 uint32_t num_values /* [in] */,
1476 uint8_t *buffer /* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */,
1477 uint32_t *buffer_size /* [in,out] [ref] */,
1478 WERROR *werror)
1480 struct winreg_QueryMultipleValues r;
1481 NTSTATUS status;
1483 /* In parameters */
1484 r.in.key_handle = key_handle;
1485 r.in.values = values;
1486 r.in.num_values = num_values;
1487 r.in.buffer = buffer;
1488 r.in.buffer_size = buffer_size;
1490 if (DEBUGLEVEL >= 10) {
1491 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues, &r);
1494 status = cli_do_rpc_ndr(cli,
1495 mem_ctx,
1496 PI_WINREG,
1497 &ndr_table_winreg,
1498 NDR_WINREG_QUERYMULTIPLEVALUES,
1499 &r);
1501 if (!NT_STATUS_IS_OK(status)) {
1502 return status;
1505 if (DEBUGLEVEL >= 10) {
1506 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, &r);
1509 if (NT_STATUS_IS_ERR(status)) {
1510 return status;
1513 /* Return variables */
1514 memcpy(values, r.out.values, r.in.num_values * sizeof(*values));
1515 if (buffer && r.out.buffer) {
1516 memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
1518 *buffer_size = *r.out.buffer_size;
1520 /* Return result */
1521 if (werror) {
1522 *werror = r.out.result;
1525 return werror_to_ntstatus(r.out.result);
1528 NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli,
1529 TALLOC_CTX *mem_ctx,
1530 uint16_t *hostname /* [in] [unique] */,
1531 struct initshutdown_String *message /* [in] [unique] */,
1532 uint32_t timeout /* [in] */,
1533 uint8_t force_apps /* [in] */,
1534 uint8_t reboot /* [in] */,
1535 uint32_t reason /* [in] */,
1536 WERROR *werror)
1538 struct winreg_InitiateSystemShutdownEx r;
1539 NTSTATUS status;
1541 /* In parameters */
1542 r.in.hostname = hostname;
1543 r.in.message = message;
1544 r.in.timeout = timeout;
1545 r.in.force_apps = force_apps;
1546 r.in.reboot = reboot;
1547 r.in.reason = reason;
1549 if (DEBUGLEVEL >= 10) {
1550 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1553 status = cli_do_rpc_ndr(cli,
1554 mem_ctx,
1555 PI_WINREG,
1556 &ndr_table_winreg,
1557 NDR_WINREG_INITIATESYSTEMSHUTDOWNEX,
1558 &r);
1560 if (!NT_STATUS_IS_OK(status)) {
1561 return status;
1564 if (DEBUGLEVEL >= 10) {
1565 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1568 if (NT_STATUS_IS_ERR(status)) {
1569 return status;
1572 /* Return variables */
1574 /* Return result */
1575 if (werror) {
1576 *werror = r.out.result;
1579 return werror_to_ntstatus(r.out.result);
1582 NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli,
1583 TALLOC_CTX *mem_ctx,
1584 WERROR *werror)
1586 struct winreg_SaveKeyEx r;
1587 NTSTATUS status;
1589 /* In parameters */
1591 if (DEBUGLEVEL >= 10) {
1592 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx, &r);
1595 status = cli_do_rpc_ndr(cli,
1596 mem_ctx,
1597 PI_WINREG,
1598 &ndr_table_winreg,
1599 NDR_WINREG_SAVEKEYEX,
1600 &r);
1602 if (!NT_STATUS_IS_OK(status)) {
1603 return status;
1606 if (DEBUGLEVEL >= 10) {
1607 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, &r);
1610 if (NT_STATUS_IS_ERR(status)) {
1611 return status;
1614 /* Return variables */
1616 /* Return result */
1617 if (werror) {
1618 *werror = r.out.result;
1621 return werror_to_ntstatus(r.out.result);
1624 NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli,
1625 TALLOC_CTX *mem_ctx,
1626 uint16_t *system_name /* [in] [unique] */,
1627 uint32_t access_mask /* [in] */,
1628 struct policy_handle *handle /* [out] [ref] */,
1629 WERROR *werror)
1631 struct winreg_OpenHKPT r;
1632 NTSTATUS status;
1634 /* In parameters */
1635 r.in.system_name = system_name;
1636 r.in.access_mask = access_mask;
1638 if (DEBUGLEVEL >= 10) {
1639 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &r);
1642 status = cli_do_rpc_ndr(cli,
1643 mem_ctx,
1644 PI_WINREG,
1645 &ndr_table_winreg,
1646 NDR_WINREG_OPENHKPT,
1647 &r);
1649 if (!NT_STATUS_IS_OK(status)) {
1650 return status;
1653 if (DEBUGLEVEL >= 10) {
1654 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, &r);
1657 if (NT_STATUS_IS_ERR(status)) {
1658 return status;
1661 /* Return variables */
1662 *handle = *r.out.handle;
1664 /* Return result */
1665 if (werror) {
1666 *werror = r.out.result;
1669 return werror_to_ntstatus(r.out.result);
1672 NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli,
1673 TALLOC_CTX *mem_ctx,
1674 uint16_t *system_name /* [in] [unique] */,
1675 uint32_t access_mask /* [in] */,
1676 struct policy_handle *handle /* [out] [ref] */,
1677 WERROR *werror)
1679 struct winreg_OpenHKPN r;
1680 NTSTATUS status;
1682 /* In parameters */
1683 r.in.system_name = system_name;
1684 r.in.access_mask = access_mask;
1686 if (DEBUGLEVEL >= 10) {
1687 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &r);
1690 status = cli_do_rpc_ndr(cli,
1691 mem_ctx,
1692 PI_WINREG,
1693 &ndr_table_winreg,
1694 NDR_WINREG_OPENHKPN,
1695 &r);
1697 if (!NT_STATUS_IS_OK(status)) {
1698 return status;
1701 if (DEBUGLEVEL >= 10) {
1702 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, &r);
1705 if (NT_STATUS_IS_ERR(status)) {
1706 return status;
1709 /* Return variables */
1710 *handle = *r.out.handle;
1712 /* Return result */
1713 if (werror) {
1714 *werror = r.out.result;
1717 return werror_to_ntstatus(r.out.result);
1720 NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli,
1721 TALLOC_CTX *mem_ctx,
1722 WERROR *werror)
1724 struct winreg_QueryMultipleValues2 r;
1725 NTSTATUS status;
1727 /* In parameters */
1729 if (DEBUGLEVEL >= 10) {
1730 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, &r);
1733 status = cli_do_rpc_ndr(cli,
1734 mem_ctx,
1735 PI_WINREG,
1736 &ndr_table_winreg,
1737 NDR_WINREG_QUERYMULTIPLEVALUES2,
1738 &r);
1740 if (!NT_STATUS_IS_OK(status)) {
1741 return status;
1744 if (DEBUGLEVEL >= 10) {
1745 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, &r);
1748 if (NT_STATUS_IS_ERR(status)) {
1749 return status;
1752 /* Return variables */
1754 /* Return result */
1755 if (werror) {
1756 *werror = r.out.result;
1759 return werror_to_ntstatus(r.out.result);