2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/cli_winreg.h"
9 NTSTATUS
rpccli_winreg_OpenHKCR(struct rpc_pipe_client
*cli
,
11 uint16_t *system_name
/* [in] [unique] */,
12 uint32_t access_mask
/* [in] */,
13 struct policy_handle
*handle
/* [out] [ref] */,
16 struct winreg_OpenHKCR r
;
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
,
34 if (!NT_STATUS_IS_OK(status
)) {
38 if (DEBUGLEVEL
>= 10) {
39 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR
, &r
);
42 if (NT_STATUS_IS_ERR(status
)) {
46 /* Return variables */
47 *handle
= *r
.out
.handle
;
51 *werror
= r
.out
.result
;
54 return werror_to_ntstatus(r
.out
.result
);
57 NTSTATUS
rpccli_winreg_OpenHKCU(struct rpc_pipe_client
*cli
,
59 uint16_t *system_name
/* [in] [unique] */,
60 uint32_t access_mask
/* [in] */,
61 struct policy_handle
*handle
/* [out] [ref] */,
64 struct winreg_OpenHKCU r
;
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
,
82 if (!NT_STATUS_IS_OK(status
)) {
86 if (DEBUGLEVEL
>= 10) {
87 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU
, &r
);
90 if (NT_STATUS_IS_ERR(status
)) {
94 /* Return variables */
95 *handle
= *r
.out
.handle
;
99 *werror
= r
.out
.result
;
102 return werror_to_ntstatus(r
.out
.result
);
105 NTSTATUS
rpccli_winreg_OpenHKLM(struct rpc_pipe_client
*cli
,
107 uint16_t *system_name
/* [in] [unique] */,
108 uint32_t access_mask
/* [in] */,
109 struct policy_handle
*handle
/* [out] [ref] */,
112 struct winreg_OpenHKLM r
;
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
,
130 if (!NT_STATUS_IS_OK(status
)) {
134 if (DEBUGLEVEL
>= 10) {
135 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM
, &r
);
138 if (NT_STATUS_IS_ERR(status
)) {
142 /* Return variables */
143 *handle
= *r
.out
.handle
;
147 *werror
= r
.out
.result
;
150 return werror_to_ntstatus(r
.out
.result
);
153 NTSTATUS
rpccli_winreg_OpenHKPD(struct rpc_pipe_client
*cli
,
155 uint16_t *system_name
/* [in] [unique] */,
156 uint32_t access_mask
/* [in] */,
157 struct policy_handle
*handle
/* [out] [ref] */,
160 struct winreg_OpenHKPD r
;
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
,
178 if (!NT_STATUS_IS_OK(status
)) {
182 if (DEBUGLEVEL
>= 10) {
183 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD
, &r
);
186 if (NT_STATUS_IS_ERR(status
)) {
190 /* Return variables */
191 *handle
= *r
.out
.handle
;
195 *werror
= r
.out
.result
;
198 return werror_to_ntstatus(r
.out
.result
);
201 NTSTATUS
rpccli_winreg_OpenHKU(struct rpc_pipe_client
*cli
,
203 uint16_t *system_name
/* [in] [unique] */,
204 uint32_t access_mask
/* [in] */,
205 struct policy_handle
*handle
/* [out] [ref] */,
208 struct winreg_OpenHKU r
;
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
,
226 if (!NT_STATUS_IS_OK(status
)) {
230 if (DEBUGLEVEL
>= 10) {
231 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU
, &r
);
234 if (NT_STATUS_IS_ERR(status
)) {
238 /* Return variables */
239 *handle
= *r
.out
.handle
;
243 *werror
= r
.out
.result
;
246 return werror_to_ntstatus(r
.out
.result
);
249 NTSTATUS
rpccli_winreg_CloseKey(struct rpc_pipe_client
*cli
,
251 struct policy_handle
*handle
/* [in,out] [ref] */,
254 struct winreg_CloseKey r
;
258 r
.in
.handle
= handle
;
260 if (DEBUGLEVEL
>= 10) {
261 NDR_PRINT_IN_DEBUG(winreg_CloseKey
, &r
);
264 status
= cli_do_rpc_ndr(cli
,
271 if (!NT_STATUS_IS_OK(status
)) {
275 if (DEBUGLEVEL
>= 10) {
276 NDR_PRINT_OUT_DEBUG(winreg_CloseKey
, &r
);
279 if (NT_STATUS_IS_ERR(status
)) {
283 /* Return variables */
284 *handle
= *r
.out
.handle
;
288 *werror
= r
.out
.result
;
291 return werror_to_ntstatus(r
.out
.result
);
294 NTSTATUS
rpccli_winreg_CreateKey(struct rpc_pipe_client
*cli
,
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] */,
306 struct winreg_CreateKey r
;
310 r
.in
.handle
= handle
;
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
,
326 NDR_WINREG_CREATEKEY
,
329 if (!NT_STATUS_IS_OK(status
)) {
333 if (DEBUGLEVEL
>= 10) {
334 NDR_PRINT_OUT_DEBUG(winreg_CreateKey
, &r
);
337 if (NT_STATUS_IS_ERR(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
;
349 *werror
= r
.out
.result
;
352 return werror_to_ntstatus(r
.out
.result
);
355 NTSTATUS
rpccli_winreg_DeleteKey(struct rpc_pipe_client
*cli
,
357 struct policy_handle
*handle
/* [in] [ref] */,
358 struct winreg_String key
/* [in] */,
361 struct winreg_DeleteKey r
;
365 r
.in
.handle
= handle
;
368 if (DEBUGLEVEL
>= 10) {
369 NDR_PRINT_IN_DEBUG(winreg_DeleteKey
, &r
);
372 status
= cli_do_rpc_ndr(cli
,
376 NDR_WINREG_DELETEKEY
,
379 if (!NT_STATUS_IS_OK(status
)) {
383 if (DEBUGLEVEL
>= 10) {
384 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey
, &r
);
387 if (NT_STATUS_IS_ERR(status
)) {
391 /* Return variables */
395 *werror
= r
.out
.result
;
398 return werror_to_ntstatus(r
.out
.result
);
401 NTSTATUS
rpccli_winreg_DeleteValue(struct rpc_pipe_client
*cli
,
403 struct policy_handle
*handle
/* [in] [ref] */,
404 struct winreg_String value
/* [in] */,
407 struct winreg_DeleteValue r
;
411 r
.in
.handle
= handle
;
414 if (DEBUGLEVEL
>= 10) {
415 NDR_PRINT_IN_DEBUG(winreg_DeleteValue
, &r
);
418 status
= cli_do_rpc_ndr(cli
,
422 NDR_WINREG_DELETEVALUE
,
425 if (!NT_STATUS_IS_OK(status
)) {
429 if (DEBUGLEVEL
>= 10) {
430 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue
, &r
);
433 if (NT_STATUS_IS_ERR(status
)) {
437 /* Return variables */
441 *werror
= r
.out
.result
;
444 return werror_to_ntstatus(r
.out
.result
);
447 NTSTATUS
rpccli_winreg_EnumKey(struct rpc_pipe_client
*cli
,
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] */,
456 struct winreg_EnumKey r
;
460 r
.in
.handle
= handle
;
461 r
.in
.enum_index
= enum_index
;
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
,
477 if (!NT_STATUS_IS_OK(status
)) {
481 if (DEBUGLEVEL
>= 10) {
482 NDR_PRINT_OUT_DEBUG(winreg_EnumKey
, &r
);
485 if (NT_STATUS_IS_ERR(status
)) {
489 /* Return variables */
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
;
500 *werror
= r
.out
.result
;
503 return werror_to_ntstatus(r
.out
.result
);
506 NTSTATUS
rpccli_winreg_EnumValue(struct rpc_pipe_client
*cli
,
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] */,
517 struct winreg_EnumValue r
;
521 r
.in
.handle
= handle
;
522 r
.in
.enum_index
= enum_index
;
527 r
.in
.length
= length
;
529 if (DEBUGLEVEL
>= 10) {
530 NDR_PRINT_IN_DEBUG(winreg_EnumValue
, &r
);
533 status
= cli_do_rpc_ndr(cli
,
537 NDR_WINREG_ENUMVALUE
,
540 if (!NT_STATUS_IS_OK(status
)) {
544 if (DEBUGLEVEL
>= 10) {
545 NDR_PRINT_OUT_DEBUG(winreg_EnumValue
, &r
);
548 if (NT_STATUS_IS_ERR(status
)) {
552 /* Return variables */
554 if (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
) {
563 if (length
&& r
.out
.length
) {
564 *length
= *r
.out
.length
;
569 *werror
= r
.out
.result
;
572 return werror_to_ntstatus(r
.out
.result
);
575 NTSTATUS
rpccli_winreg_FlushKey(struct rpc_pipe_client
*cli
,
577 struct policy_handle
*handle
/* [in] [ref] */,
580 struct winreg_FlushKey r
;
584 r
.in
.handle
= handle
;
586 if (DEBUGLEVEL
>= 10) {
587 NDR_PRINT_IN_DEBUG(winreg_FlushKey
, &r
);
590 status
= cli_do_rpc_ndr(cli
,
597 if (!NT_STATUS_IS_OK(status
)) {
601 if (DEBUGLEVEL
>= 10) {
602 NDR_PRINT_OUT_DEBUG(winreg_FlushKey
, &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_winreg_GetKeySecurity(struct rpc_pipe_client
*cli
,
621 struct policy_handle
*handle
/* [in] [ref] */,
622 uint32_t sec_info
/* [in] */,
623 struct KeySecurityData
*sd
/* [in,out] [ref] */,
626 struct winreg_GetKeySecurity r
;
630 r
.in
.handle
= handle
;
631 r
.in
.sec_info
= sec_info
;
634 if (DEBUGLEVEL
>= 10) {
635 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity
, &r
);
638 status
= cli_do_rpc_ndr(cli
,
642 NDR_WINREG_GETKEYSECURITY
,
645 if (!NT_STATUS_IS_OK(status
)) {
649 if (DEBUGLEVEL
>= 10) {
650 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity
, &r
);
653 if (NT_STATUS_IS_ERR(status
)) {
657 /* Return variables */
662 *werror
= r
.out
.result
;
665 return werror_to_ntstatus(r
.out
.result
);
668 NTSTATUS
rpccli_winreg_LoadKey(struct rpc_pipe_client
*cli
,
670 struct policy_handle
*handle
/* [in] [ref] */,
671 struct winreg_String
*keyname
/* [in] [unique] */,
672 struct winreg_String
*filename
/* [in] [unique] */,
675 struct winreg_LoadKey r
;
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
,
694 if (!NT_STATUS_IS_OK(status
)) {
698 if (DEBUGLEVEL
>= 10) {
699 NDR_PRINT_OUT_DEBUG(winreg_LoadKey
, &r
);
702 if (NT_STATUS_IS_ERR(status
)) {
706 /* Return variables */
710 *werror
= r
.out
.result
;
713 return werror_to_ntstatus(r
.out
.result
);
716 NTSTATUS
rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client
*cli
,
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] */,
727 struct winreg_NotifyChangeKeyValue r
;
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
,
747 NDR_WINREG_NOTIFYCHANGEKEYVALUE
,
750 if (!NT_STATUS_IS_OK(status
)) {
754 if (DEBUGLEVEL
>= 10) {
755 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue
, &r
);
758 if (NT_STATUS_IS_ERR(status
)) {
762 /* Return variables */
766 *werror
= r
.out
.result
;
769 return werror_to_ntstatus(r
.out
.result
);
772 NTSTATUS
rpccli_winreg_OpenKey(struct rpc_pipe_client
*cli
,
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] */,
781 struct winreg_OpenKey r
;
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
,
801 if (!NT_STATUS_IS_OK(status
)) {
805 if (DEBUGLEVEL
>= 10) {
806 NDR_PRINT_OUT_DEBUG(winreg_OpenKey
, &r
);
809 if (NT_STATUS_IS_ERR(status
)) {
813 /* Return variables */
814 *handle
= *r
.out
.handle
;
818 *werror
= r
.out
.result
;
821 return werror_to_ntstatus(r
.out
.result
);
824 NTSTATUS
rpccli_winreg_QueryInfoKey(struct rpc_pipe_client
*cli
,
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] */,
838 struct winreg_QueryInfoKey r
;
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
,
853 NDR_WINREG_QUERYINFOKEY
,
856 if (!NT_STATUS_IS_OK(status
)) {
860 if (DEBUGLEVEL
>= 10) {
861 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey
, &r
);
864 if (NT_STATUS_IS_ERR(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
;
881 *werror
= r
.out
.result
;
884 return werror_to_ntstatus(r
.out
.result
);
887 NTSTATUS
rpccli_winreg_QueryValue(struct rpc_pipe_client
*cli
,
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] */,
897 struct winreg_QueryValue r
;
901 r
.in
.handle
= handle
;
902 r
.in
.value_name
= value_name
;
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
,
916 NDR_WINREG_QUERYVALUE
,
919 if (!NT_STATUS_IS_OK(status
)) {
923 if (DEBUGLEVEL
>= 10) {
924 NDR_PRINT_OUT_DEBUG(winreg_QueryValue
, &r
);
927 if (NT_STATUS_IS_ERR(status
)) {
931 /* Return variables */
932 if (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
;
947 *werror
= r
.out
.result
;
950 return werror_to_ntstatus(r
.out
.result
);
953 NTSTATUS
rpccli_winreg_ReplaceKey(struct rpc_pipe_client
*cli
,
957 struct winreg_ReplaceKey r
;
962 if (DEBUGLEVEL
>= 10) {
963 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey
, &r
);
966 status
= cli_do_rpc_ndr(cli
,
970 NDR_WINREG_REPLACEKEY
,
973 if (!NT_STATUS_IS_OK(status
)) {
977 if (DEBUGLEVEL
>= 10) {
978 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey
, &r
);
981 if (NT_STATUS_IS_ERR(status
)) {
985 /* Return variables */
989 *werror
= r
.out
.result
;
992 return werror_to_ntstatus(r
.out
.result
);
995 NTSTATUS
rpccli_winreg_RestoreKey(struct rpc_pipe_client
*cli
,
997 struct policy_handle
*handle
/* [in] [ref] */,
998 struct winreg_String
*filename
/* [in] [ref] */,
999 uint32_t flags
/* [in] */,
1002 struct winreg_RestoreKey r
;
1006 r
.in
.handle
= handle
;
1007 r
.in
.filename
= filename
;
1010 if (DEBUGLEVEL
>= 10) {
1011 NDR_PRINT_IN_DEBUG(winreg_RestoreKey
, &r
);
1014 status
= cli_do_rpc_ndr(cli
,
1018 NDR_WINREG_RESTOREKEY
,
1021 if (!NT_STATUS_IS_OK(status
)) {
1025 if (DEBUGLEVEL
>= 10) {
1026 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey
, &r
);
1029 if (NT_STATUS_IS_ERR(status
)) {
1033 /* Return variables */
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] */,
1050 struct winreg_SaveKey r
;
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
,
1069 if (!NT_STATUS_IS_OK(status
)) {
1073 if (DEBUGLEVEL
>= 10) {
1074 NDR_PRINT_OUT_DEBUG(winreg_SaveKey
, &r
);
1077 if (NT_STATUS_IS_ERR(status
)) {
1081 /* Return variables */
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] */,
1098 struct winreg_SetKeySecurity r
;
1102 r
.in
.handle
= handle
;
1103 r
.in
.access_mask
= access_mask
;
1106 if (DEBUGLEVEL
>= 10) {
1107 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity
, &r
);
1110 status
= cli_do_rpc_ndr(cli
,
1114 NDR_WINREG_SETKEYSECURITY
,
1117 if (!NT_STATUS_IS_OK(status
)) {
1121 if (DEBUGLEVEL
>= 10) {
1122 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity
, &r
);
1125 if (NT_STATUS_IS_ERR(status
)) {
1129 /* Return variables */
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] */,
1148 struct winreg_SetValue r
;
1152 r
.in
.handle
= handle
;
1158 if (DEBUGLEVEL
>= 10) {
1159 NDR_PRINT_IN_DEBUG(winreg_SetValue
, &r
);
1162 status
= cli_do_rpc_ndr(cli
,
1166 NDR_WINREG_SETVALUE
,
1169 if (!NT_STATUS_IS_OK(status
)) {
1173 if (DEBUGLEVEL
>= 10) {
1174 NDR_PRINT_OUT_DEBUG(winreg_SetValue
, &r
);
1177 if (NT_STATUS_IS_ERR(status
)) {
1181 /* Return variables */
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
,
1195 struct winreg_UnLoadKey r
;
1200 if (DEBUGLEVEL
>= 10) {
1201 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey
, &r
);
1204 status
= cli_do_rpc_ndr(cli
,
1208 NDR_WINREG_UNLOADKEY
,
1211 if (!NT_STATUS_IS_OK(status
)) {
1215 if (DEBUGLEVEL
>= 10) {
1216 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey
, &r
);
1219 if (NT_STATUS_IS_ERR(status
)) {
1223 /* Return variables */
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] */,
1242 struct winreg_InitiateSystemShutdown r
;
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
,
1260 NDR_WINREG_INITIATESYSTEMSHUTDOWN
,
1263 if (!NT_STATUS_IS_OK(status
)) {
1267 if (DEBUGLEVEL
>= 10) {
1268 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown
, &r
);
1271 if (NT_STATUS_IS_ERR(status
)) {
1275 /* Return variables */
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] */,
1290 struct winreg_AbortSystemShutdown r
;
1294 r
.in
.server
= server
;
1296 if (DEBUGLEVEL
>= 10) {
1297 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown
, &r
);
1300 status
= cli_do_rpc_ndr(cli
,
1304 NDR_WINREG_ABORTSYSTEMSHUTDOWN
,
1307 if (!NT_STATUS_IS_OK(status
)) {
1311 if (DEBUGLEVEL
>= 10) {
1312 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown
, &r
);
1315 if (NT_STATUS_IS_ERR(status
)) {
1319 /* Return variables */
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] */,
1335 struct winreg_GetVersion r
;
1339 r
.in
.handle
= handle
;
1341 if (DEBUGLEVEL
>= 10) {
1342 NDR_PRINT_IN_DEBUG(winreg_GetVersion
, &r
);
1345 status
= cli_do_rpc_ndr(cli
,
1349 NDR_WINREG_GETVERSION
,
1352 if (!NT_STATUS_IS_OK(status
)) {
1356 if (DEBUGLEVEL
>= 10) {
1357 NDR_PRINT_OUT_DEBUG(winreg_GetVersion
, &r
);
1360 if (NT_STATUS_IS_ERR(status
)) {
1364 /* Return variables */
1365 *version
= *r
.out
.version
;
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] */,
1382 struct winreg_OpenHKCC r
;
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
,
1397 NDR_WINREG_OPENHKCC
,
1400 if (!NT_STATUS_IS_OK(status
)) {
1404 if (DEBUGLEVEL
>= 10) {
1405 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC
, &r
);
1408 if (NT_STATUS_IS_ERR(status
)) {
1412 /* Return variables */
1413 *handle
= *r
.out
.handle
;
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] */,
1430 struct winreg_OpenHKDD r
;
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
,
1445 NDR_WINREG_OPENHKDD
,
1448 if (!NT_STATUS_IS_OK(status
)) {
1452 if (DEBUGLEVEL
>= 10) {
1453 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD
, &r
);
1456 if (NT_STATUS_IS_ERR(status
)) {
1460 /* Return variables */
1461 *handle
= *r
.out
.handle
;
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] */,
1480 struct winreg_QueryMultipleValues r
;
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
,
1498 NDR_WINREG_QUERYMULTIPLEVALUES
,
1501 if (!NT_STATUS_IS_OK(status
)) {
1505 if (DEBUGLEVEL
>= 10) {
1506 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues
, &r
);
1509 if (NT_STATUS_IS_ERR(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
;
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] */,
1538 struct winreg_InitiateSystemShutdownEx r
;
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
,
1557 NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
,
1560 if (!NT_STATUS_IS_OK(status
)) {
1564 if (DEBUGLEVEL
>= 10) {
1565 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx
, &r
);
1568 if (NT_STATUS_IS_ERR(status
)) {
1572 /* Return variables */
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
,
1586 struct winreg_SaveKeyEx r
;
1591 if (DEBUGLEVEL
>= 10) {
1592 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx
, &r
);
1595 status
= cli_do_rpc_ndr(cli
,
1599 NDR_WINREG_SAVEKEYEX
,
1602 if (!NT_STATUS_IS_OK(status
)) {
1606 if (DEBUGLEVEL
>= 10) {
1607 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx
, &r
);
1610 if (NT_STATUS_IS_ERR(status
)) {
1614 /* Return variables */
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] */,
1631 struct winreg_OpenHKPT r
;
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
,
1646 NDR_WINREG_OPENHKPT
,
1649 if (!NT_STATUS_IS_OK(status
)) {
1653 if (DEBUGLEVEL
>= 10) {
1654 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT
, &r
);
1657 if (NT_STATUS_IS_ERR(status
)) {
1661 /* Return variables */
1662 *handle
= *r
.out
.handle
;
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] */,
1679 struct winreg_OpenHKPN r
;
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
,
1694 NDR_WINREG_OPENHKPN
,
1697 if (!NT_STATUS_IS_OK(status
)) {
1701 if (DEBUGLEVEL
>= 10) {
1702 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN
, &r
);
1705 if (NT_STATUS_IS_ERR(status
)) {
1709 /* Return variables */
1710 *handle
= *r
.out
.handle
;
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
,
1724 struct winreg_QueryMultipleValues2 r
;
1729 if (DEBUGLEVEL
>= 10) {
1730 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2
, &r
);
1733 status
= cli_do_rpc_ndr(cli
,
1737 NDR_WINREG_QUERYMULTIPLEVALUES2
,
1740 if (!NT_STATUS_IS_OK(status
)) {
1744 if (DEBUGLEVEL
>= 10) {
1745 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2
, &r
);
1748 if (NT_STATUS_IS_ERR(status
)) {
1752 /* Return variables */
1756 *werror
= r
.out
.result
;
1759 return werror_to_ntstatus(r
.out
.result
);