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
->dispatch(cli
,
33 if (!NT_STATUS_IS_OK(status
)) {
37 if (DEBUGLEVEL
>= 10) {
38 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR
, &r
);
41 if (NT_STATUS_IS_ERR(status
)) {
45 /* Return variables */
46 *handle
= *r
.out
.handle
;
50 *werror
= r
.out
.result
;
53 return werror_to_ntstatus(r
.out
.result
);
56 NTSTATUS
rpccli_winreg_OpenHKCU(struct rpc_pipe_client
*cli
,
58 uint16_t *system_name
/* [in] [unique] */,
59 uint32_t access_mask
/* [in] */,
60 struct policy_handle
*handle
/* [out] [ref] */,
63 struct winreg_OpenHKCU r
;
67 r
.in
.system_name
= system_name
;
68 r
.in
.access_mask
= access_mask
;
70 if (DEBUGLEVEL
>= 10) {
71 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU
, &r
);
74 status
= cli
->dispatch(cli
,
80 if (!NT_STATUS_IS_OK(status
)) {
84 if (DEBUGLEVEL
>= 10) {
85 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU
, &r
);
88 if (NT_STATUS_IS_ERR(status
)) {
92 /* Return variables */
93 *handle
= *r
.out
.handle
;
97 *werror
= r
.out
.result
;
100 return werror_to_ntstatus(r
.out
.result
);
103 NTSTATUS
rpccli_winreg_OpenHKLM(struct rpc_pipe_client
*cli
,
105 uint16_t *system_name
/* [in] [unique] */,
106 uint32_t access_mask
/* [in] */,
107 struct policy_handle
*handle
/* [out] [ref] */,
110 struct winreg_OpenHKLM r
;
114 r
.in
.system_name
= system_name
;
115 r
.in
.access_mask
= access_mask
;
117 if (DEBUGLEVEL
>= 10) {
118 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM
, &r
);
121 status
= cli
->dispatch(cli
,
127 if (!NT_STATUS_IS_OK(status
)) {
131 if (DEBUGLEVEL
>= 10) {
132 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM
, &r
);
135 if (NT_STATUS_IS_ERR(status
)) {
139 /* Return variables */
140 *handle
= *r
.out
.handle
;
144 *werror
= r
.out
.result
;
147 return werror_to_ntstatus(r
.out
.result
);
150 NTSTATUS
rpccli_winreg_OpenHKPD(struct rpc_pipe_client
*cli
,
152 uint16_t *system_name
/* [in] [unique] */,
153 uint32_t access_mask
/* [in] */,
154 struct policy_handle
*handle
/* [out] [ref] */,
157 struct winreg_OpenHKPD r
;
161 r
.in
.system_name
= system_name
;
162 r
.in
.access_mask
= access_mask
;
164 if (DEBUGLEVEL
>= 10) {
165 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD
, &r
);
168 status
= cli
->dispatch(cli
,
174 if (!NT_STATUS_IS_OK(status
)) {
178 if (DEBUGLEVEL
>= 10) {
179 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD
, &r
);
182 if (NT_STATUS_IS_ERR(status
)) {
186 /* Return variables */
187 *handle
= *r
.out
.handle
;
191 *werror
= r
.out
.result
;
194 return werror_to_ntstatus(r
.out
.result
);
197 NTSTATUS
rpccli_winreg_OpenHKU(struct rpc_pipe_client
*cli
,
199 uint16_t *system_name
/* [in] [unique] */,
200 uint32_t access_mask
/* [in] */,
201 struct policy_handle
*handle
/* [out] [ref] */,
204 struct winreg_OpenHKU r
;
208 r
.in
.system_name
= system_name
;
209 r
.in
.access_mask
= access_mask
;
211 if (DEBUGLEVEL
>= 10) {
212 NDR_PRINT_IN_DEBUG(winreg_OpenHKU
, &r
);
215 status
= cli
->dispatch(cli
,
221 if (!NT_STATUS_IS_OK(status
)) {
225 if (DEBUGLEVEL
>= 10) {
226 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU
, &r
);
229 if (NT_STATUS_IS_ERR(status
)) {
233 /* Return variables */
234 *handle
= *r
.out
.handle
;
238 *werror
= r
.out
.result
;
241 return werror_to_ntstatus(r
.out
.result
);
244 NTSTATUS
rpccli_winreg_CloseKey(struct rpc_pipe_client
*cli
,
246 struct policy_handle
*handle
/* [in,out] [ref] */,
249 struct winreg_CloseKey r
;
253 r
.in
.handle
= handle
;
255 if (DEBUGLEVEL
>= 10) {
256 NDR_PRINT_IN_DEBUG(winreg_CloseKey
, &r
);
259 status
= cli
->dispatch(cli
,
265 if (!NT_STATUS_IS_OK(status
)) {
269 if (DEBUGLEVEL
>= 10) {
270 NDR_PRINT_OUT_DEBUG(winreg_CloseKey
, &r
);
273 if (NT_STATUS_IS_ERR(status
)) {
277 /* Return variables */
278 *handle
= *r
.out
.handle
;
282 *werror
= r
.out
.result
;
285 return werror_to_ntstatus(r
.out
.result
);
288 NTSTATUS
rpccli_winreg_CreateKey(struct rpc_pipe_client
*cli
,
290 struct policy_handle
*handle
/* [in] [ref] */,
291 struct winreg_String name
/* [in] */,
292 struct winreg_String keyclass
/* [in] */,
293 uint32_t options
/* [in] */,
294 uint32_t access_mask
/* [in] */,
295 struct winreg_SecBuf
*secdesc
/* [in] [unique] */,
296 struct policy_handle
*new_handle
/* [out] [ref] */,
297 enum winreg_CreateAction
*action_taken
/* [in,out] [unique] */,
300 struct winreg_CreateKey r
;
304 r
.in
.handle
= handle
;
306 r
.in
.keyclass
= keyclass
;
307 r
.in
.options
= options
;
308 r
.in
.access_mask
= access_mask
;
309 r
.in
.secdesc
= secdesc
;
310 r
.in
.action_taken
= action_taken
;
312 if (DEBUGLEVEL
>= 10) {
313 NDR_PRINT_IN_DEBUG(winreg_CreateKey
, &r
);
316 status
= cli
->dispatch(cli
,
319 NDR_WINREG_CREATEKEY
,
322 if (!NT_STATUS_IS_OK(status
)) {
326 if (DEBUGLEVEL
>= 10) {
327 NDR_PRINT_OUT_DEBUG(winreg_CreateKey
, &r
);
330 if (NT_STATUS_IS_ERR(status
)) {
334 /* Return variables */
335 *new_handle
= *r
.out
.new_handle
;
336 if (action_taken
&& r
.out
.action_taken
) {
337 *action_taken
= *r
.out
.action_taken
;
342 *werror
= r
.out
.result
;
345 return werror_to_ntstatus(r
.out
.result
);
348 NTSTATUS
rpccli_winreg_DeleteKey(struct rpc_pipe_client
*cli
,
350 struct policy_handle
*handle
/* [in] [ref] */,
351 struct winreg_String key
/* [in] */,
354 struct winreg_DeleteKey r
;
358 r
.in
.handle
= handle
;
361 if (DEBUGLEVEL
>= 10) {
362 NDR_PRINT_IN_DEBUG(winreg_DeleteKey
, &r
);
365 status
= cli
->dispatch(cli
,
368 NDR_WINREG_DELETEKEY
,
371 if (!NT_STATUS_IS_OK(status
)) {
375 if (DEBUGLEVEL
>= 10) {
376 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey
, &r
);
379 if (NT_STATUS_IS_ERR(status
)) {
383 /* Return variables */
387 *werror
= r
.out
.result
;
390 return werror_to_ntstatus(r
.out
.result
);
393 NTSTATUS
rpccli_winreg_DeleteValue(struct rpc_pipe_client
*cli
,
395 struct policy_handle
*handle
/* [in] [ref] */,
396 struct winreg_String value
/* [in] */,
399 struct winreg_DeleteValue r
;
403 r
.in
.handle
= handle
;
406 if (DEBUGLEVEL
>= 10) {
407 NDR_PRINT_IN_DEBUG(winreg_DeleteValue
, &r
);
410 status
= cli
->dispatch(cli
,
413 NDR_WINREG_DELETEVALUE
,
416 if (!NT_STATUS_IS_OK(status
)) {
420 if (DEBUGLEVEL
>= 10) {
421 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue
, &r
);
424 if (NT_STATUS_IS_ERR(status
)) {
428 /* Return variables */
432 *werror
= r
.out
.result
;
435 return werror_to_ntstatus(r
.out
.result
);
438 NTSTATUS
rpccli_winreg_EnumKey(struct rpc_pipe_client
*cli
,
440 struct policy_handle
*handle
/* [in] [ref] */,
441 uint32_t enum_index
/* [in] */,
442 struct winreg_StringBuf
*name
/* [in,out] [ref] */,
443 struct winreg_StringBuf
*keyclass
/* [in,out] [unique] */,
444 NTTIME
*last_changed_time
/* [in,out] [unique] */,
447 struct winreg_EnumKey r
;
451 r
.in
.handle
= handle
;
452 r
.in
.enum_index
= enum_index
;
454 r
.in
.keyclass
= keyclass
;
455 r
.in
.last_changed_time
= last_changed_time
;
457 if (DEBUGLEVEL
>= 10) {
458 NDR_PRINT_IN_DEBUG(winreg_EnumKey
, &r
);
461 status
= cli
->dispatch(cli
,
467 if (!NT_STATUS_IS_OK(status
)) {
471 if (DEBUGLEVEL
>= 10) {
472 NDR_PRINT_OUT_DEBUG(winreg_EnumKey
, &r
);
475 if (NT_STATUS_IS_ERR(status
)) {
479 /* Return variables */
481 if (keyclass
&& r
.out
.keyclass
) {
482 *keyclass
= *r
.out
.keyclass
;
484 if (last_changed_time
&& r
.out
.last_changed_time
) {
485 *last_changed_time
= *r
.out
.last_changed_time
;
490 *werror
= r
.out
.result
;
493 return werror_to_ntstatus(r
.out
.result
);
496 NTSTATUS
rpccli_winreg_EnumValue(struct rpc_pipe_client
*cli
,
498 struct policy_handle
*handle
/* [in] [ref] */,
499 uint32_t enum_index
/* [in] */,
500 struct winreg_ValNameBuf
*name
/* [in,out] [ref] */,
501 enum winreg_Type
*type
/* [in,out] [unique] */,
502 uint8_t *value
/* [in,out] [unique,length_is(*length),size_is(*size)] */,
503 uint32_t *size
/* [in,out] [unique] */,
504 uint32_t *length
/* [in,out] [unique] */,
507 struct winreg_EnumValue r
;
511 r
.in
.handle
= handle
;
512 r
.in
.enum_index
= enum_index
;
517 r
.in
.length
= length
;
519 if (DEBUGLEVEL
>= 10) {
520 NDR_PRINT_IN_DEBUG(winreg_EnumValue
, &r
);
523 status
= cli
->dispatch(cli
,
526 NDR_WINREG_ENUMVALUE
,
529 if (!NT_STATUS_IS_OK(status
)) {
533 if (DEBUGLEVEL
>= 10) {
534 NDR_PRINT_OUT_DEBUG(winreg_EnumValue
, &r
);
537 if (NT_STATUS_IS_ERR(status
)) {
541 /* Return variables */
543 if (type
&& r
.out
.type
) {
546 if (value
&& r
.out
.value
) {
547 memcpy(value
, r
.out
.value
, *r
.in
.size
* sizeof(*value
));
549 if (size
&& r
.out
.size
) {
552 if (length
&& r
.out
.length
) {
553 *length
= *r
.out
.length
;
558 *werror
= r
.out
.result
;
561 return werror_to_ntstatus(r
.out
.result
);
564 NTSTATUS
rpccli_winreg_FlushKey(struct rpc_pipe_client
*cli
,
566 struct policy_handle
*handle
/* [in] [ref] */,
569 struct winreg_FlushKey r
;
573 r
.in
.handle
= handle
;
575 if (DEBUGLEVEL
>= 10) {
576 NDR_PRINT_IN_DEBUG(winreg_FlushKey
, &r
);
579 status
= cli
->dispatch(cli
,
585 if (!NT_STATUS_IS_OK(status
)) {
589 if (DEBUGLEVEL
>= 10) {
590 NDR_PRINT_OUT_DEBUG(winreg_FlushKey
, &r
);
593 if (NT_STATUS_IS_ERR(status
)) {
597 /* Return variables */
601 *werror
= r
.out
.result
;
604 return werror_to_ntstatus(r
.out
.result
);
607 NTSTATUS
rpccli_winreg_GetKeySecurity(struct rpc_pipe_client
*cli
,
609 struct policy_handle
*handle
/* [in] [ref] */,
610 uint32_t sec_info
/* [in] */,
611 struct KeySecurityData
*sd
/* [in,out] [ref] */,
614 struct winreg_GetKeySecurity r
;
618 r
.in
.handle
= handle
;
619 r
.in
.sec_info
= sec_info
;
622 if (DEBUGLEVEL
>= 10) {
623 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity
, &r
);
626 status
= cli
->dispatch(cli
,
629 NDR_WINREG_GETKEYSECURITY
,
632 if (!NT_STATUS_IS_OK(status
)) {
636 if (DEBUGLEVEL
>= 10) {
637 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity
, &r
);
640 if (NT_STATUS_IS_ERR(status
)) {
644 /* Return variables */
649 *werror
= r
.out
.result
;
652 return werror_to_ntstatus(r
.out
.result
);
655 NTSTATUS
rpccli_winreg_LoadKey(struct rpc_pipe_client
*cli
,
657 struct policy_handle
*handle
/* [in] [ref] */,
658 struct winreg_String
*keyname
/* [in] [unique] */,
659 struct winreg_String
*filename
/* [in] [unique] */,
662 struct winreg_LoadKey r
;
666 r
.in
.handle
= handle
;
667 r
.in
.keyname
= keyname
;
668 r
.in
.filename
= filename
;
670 if (DEBUGLEVEL
>= 10) {
671 NDR_PRINT_IN_DEBUG(winreg_LoadKey
, &r
);
674 status
= cli
->dispatch(cli
,
680 if (!NT_STATUS_IS_OK(status
)) {
684 if (DEBUGLEVEL
>= 10) {
685 NDR_PRINT_OUT_DEBUG(winreg_LoadKey
, &r
);
688 if (NT_STATUS_IS_ERR(status
)) {
692 /* Return variables */
696 *werror
= r
.out
.result
;
699 return werror_to_ntstatus(r
.out
.result
);
702 NTSTATUS
rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client
*cli
,
704 struct policy_handle
*handle
/* [in] [ref] */,
705 uint8_t watch_subtree
/* [in] */,
706 uint32_t notify_filter
/* [in] */,
707 uint32_t unknown
/* [in] */,
708 struct winreg_String string1
/* [in] */,
709 struct winreg_String string2
/* [in] */,
710 uint32_t unknown2
/* [in] */,
713 struct winreg_NotifyChangeKeyValue r
;
717 r
.in
.handle
= handle
;
718 r
.in
.watch_subtree
= watch_subtree
;
719 r
.in
.notify_filter
= notify_filter
;
720 r
.in
.unknown
= unknown
;
721 r
.in
.string1
= string1
;
722 r
.in
.string2
= string2
;
723 r
.in
.unknown2
= unknown2
;
725 if (DEBUGLEVEL
>= 10) {
726 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue
, &r
);
729 status
= cli
->dispatch(cli
,
732 NDR_WINREG_NOTIFYCHANGEKEYVALUE
,
735 if (!NT_STATUS_IS_OK(status
)) {
739 if (DEBUGLEVEL
>= 10) {
740 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue
, &r
);
743 if (NT_STATUS_IS_ERR(status
)) {
747 /* Return variables */
751 *werror
= r
.out
.result
;
754 return werror_to_ntstatus(r
.out
.result
);
757 NTSTATUS
rpccli_winreg_OpenKey(struct rpc_pipe_client
*cli
,
759 struct policy_handle
*parent_handle
/* [in] [ref] */,
760 struct winreg_String keyname
/* [in] */,
761 uint32_t unknown
/* [in] */,
762 uint32_t access_mask
/* [in] */,
763 struct policy_handle
*handle
/* [out] [ref] */,
766 struct winreg_OpenKey r
;
770 r
.in
.parent_handle
= parent_handle
;
771 r
.in
.keyname
= keyname
;
772 r
.in
.unknown
= unknown
;
773 r
.in
.access_mask
= access_mask
;
775 if (DEBUGLEVEL
>= 10) {
776 NDR_PRINT_IN_DEBUG(winreg_OpenKey
, &r
);
779 status
= cli
->dispatch(cli
,
785 if (!NT_STATUS_IS_OK(status
)) {
789 if (DEBUGLEVEL
>= 10) {
790 NDR_PRINT_OUT_DEBUG(winreg_OpenKey
, &r
);
793 if (NT_STATUS_IS_ERR(status
)) {
797 /* Return variables */
798 *handle
= *r
.out
.handle
;
802 *werror
= r
.out
.result
;
805 return werror_to_ntstatus(r
.out
.result
);
808 NTSTATUS
rpccli_winreg_QueryInfoKey(struct rpc_pipe_client
*cli
,
810 struct policy_handle
*handle
/* [in] [ref] */,
811 struct winreg_String
*classname
/* [in,out] [ref] */,
812 uint32_t *num_subkeys
/* [out] [ref] */,
813 uint32_t *max_subkeylen
/* [out] [ref] */,
814 uint32_t *max_classlen
/* [out] [ref] */,
815 uint32_t *num_values
/* [out] [ref] */,
816 uint32_t *max_valnamelen
/* [out] [ref] */,
817 uint32_t *max_valbufsize
/* [out] [ref] */,
818 uint32_t *secdescsize
/* [out] [ref] */,
819 NTTIME
*last_changed_time
/* [out] [ref] */,
822 struct winreg_QueryInfoKey r
;
826 r
.in
.handle
= handle
;
827 r
.in
.classname
= classname
;
829 if (DEBUGLEVEL
>= 10) {
830 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey
, &r
);
833 status
= cli
->dispatch(cli
,
836 NDR_WINREG_QUERYINFOKEY
,
839 if (!NT_STATUS_IS_OK(status
)) {
843 if (DEBUGLEVEL
>= 10) {
844 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey
, &r
);
847 if (NT_STATUS_IS_ERR(status
)) {
851 /* Return variables */
852 *classname
= *r
.out
.classname
;
853 *num_subkeys
= *r
.out
.num_subkeys
;
854 *max_subkeylen
= *r
.out
.max_subkeylen
;
855 *max_classlen
= *r
.out
.max_classlen
;
856 *num_values
= *r
.out
.num_values
;
857 *max_valnamelen
= *r
.out
.max_valnamelen
;
858 *max_valbufsize
= *r
.out
.max_valbufsize
;
859 *secdescsize
= *r
.out
.secdescsize
;
860 *last_changed_time
= *r
.out
.last_changed_time
;
864 *werror
= r
.out
.result
;
867 return werror_to_ntstatus(r
.out
.result
);
870 NTSTATUS
rpccli_winreg_QueryValue(struct rpc_pipe_client
*cli
,
872 struct policy_handle
*handle
/* [in] [ref] */,
873 struct winreg_String
*value_name
/* [in] [ref] */,
874 enum winreg_Type
*type
/* [in,out] [unique] */,
875 uint8_t *data
/* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
876 uint32_t *data_size
/* [in,out] [unique] */,
877 uint32_t *data_length
/* [in,out] [unique] */,
880 struct winreg_QueryValue r
;
884 r
.in
.handle
= handle
;
885 r
.in
.value_name
= value_name
;
888 r
.in
.data_size
= data_size
;
889 r
.in
.data_length
= data_length
;
891 if (DEBUGLEVEL
>= 10) {
892 NDR_PRINT_IN_DEBUG(winreg_QueryValue
, &r
);
895 status
= cli
->dispatch(cli
,
898 NDR_WINREG_QUERYVALUE
,
901 if (!NT_STATUS_IS_OK(status
)) {
905 if (DEBUGLEVEL
>= 10) {
906 NDR_PRINT_OUT_DEBUG(winreg_QueryValue
, &r
);
909 if (NT_STATUS_IS_ERR(status
)) {
913 /* Return variables */
914 if (type
&& r
.out
.type
) {
917 if (data
&& r
.out
.data
) {
918 memcpy(data
, r
.out
.data
, *r
.in
.data_size
* sizeof(*data
));
920 if (data_size
&& r
.out
.data_size
) {
921 *data_size
= *r
.out
.data_size
;
923 if (data_length
&& r
.out
.data_length
) {
924 *data_length
= *r
.out
.data_length
;
929 *werror
= r
.out
.result
;
932 return werror_to_ntstatus(r
.out
.result
);
935 NTSTATUS
rpccli_winreg_ReplaceKey(struct rpc_pipe_client
*cli
,
939 struct winreg_ReplaceKey r
;
944 if (DEBUGLEVEL
>= 10) {
945 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey
, &r
);
948 status
= cli
->dispatch(cli
,
951 NDR_WINREG_REPLACEKEY
,
954 if (!NT_STATUS_IS_OK(status
)) {
958 if (DEBUGLEVEL
>= 10) {
959 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey
, &r
);
962 if (NT_STATUS_IS_ERR(status
)) {
966 /* Return variables */
970 *werror
= r
.out
.result
;
973 return werror_to_ntstatus(r
.out
.result
);
976 NTSTATUS
rpccli_winreg_RestoreKey(struct rpc_pipe_client
*cli
,
978 struct policy_handle
*handle
/* [in] [ref] */,
979 struct winreg_String
*filename
/* [in] [ref] */,
980 uint32_t flags
/* [in] */,
983 struct winreg_RestoreKey r
;
987 r
.in
.handle
= handle
;
988 r
.in
.filename
= filename
;
991 if (DEBUGLEVEL
>= 10) {
992 NDR_PRINT_IN_DEBUG(winreg_RestoreKey
, &r
);
995 status
= cli
->dispatch(cli
,
998 NDR_WINREG_RESTOREKEY
,
1001 if (!NT_STATUS_IS_OK(status
)) {
1005 if (DEBUGLEVEL
>= 10) {
1006 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey
, &r
);
1009 if (NT_STATUS_IS_ERR(status
)) {
1013 /* Return variables */
1017 *werror
= r
.out
.result
;
1020 return werror_to_ntstatus(r
.out
.result
);
1023 NTSTATUS
rpccli_winreg_SaveKey(struct rpc_pipe_client
*cli
,
1024 TALLOC_CTX
*mem_ctx
,
1025 struct policy_handle
*handle
/* [in] [ref] */,
1026 struct winreg_String
*filename
/* [in] [ref] */,
1027 struct KeySecurityAttribute
*sec_attrib
/* [in] [unique] */,
1030 struct winreg_SaveKey r
;
1034 r
.in
.handle
= handle
;
1035 r
.in
.filename
= filename
;
1036 r
.in
.sec_attrib
= sec_attrib
;
1038 if (DEBUGLEVEL
>= 10) {
1039 NDR_PRINT_IN_DEBUG(winreg_SaveKey
, &r
);
1042 status
= cli
->dispatch(cli
,
1048 if (!NT_STATUS_IS_OK(status
)) {
1052 if (DEBUGLEVEL
>= 10) {
1053 NDR_PRINT_OUT_DEBUG(winreg_SaveKey
, &r
);
1056 if (NT_STATUS_IS_ERR(status
)) {
1060 /* Return variables */
1064 *werror
= r
.out
.result
;
1067 return werror_to_ntstatus(r
.out
.result
);
1070 NTSTATUS
rpccli_winreg_SetKeySecurity(struct rpc_pipe_client
*cli
,
1071 TALLOC_CTX
*mem_ctx
,
1072 struct policy_handle
*handle
/* [in] [ref] */,
1073 uint32_t sec_info
/* [in] */,
1074 struct KeySecurityData
*sd
/* [in] [ref] */,
1077 struct winreg_SetKeySecurity r
;
1081 r
.in
.handle
= handle
;
1082 r
.in
.sec_info
= sec_info
;
1085 if (DEBUGLEVEL
>= 10) {
1086 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity
, &r
);
1089 status
= cli
->dispatch(cli
,
1092 NDR_WINREG_SETKEYSECURITY
,
1095 if (!NT_STATUS_IS_OK(status
)) {
1099 if (DEBUGLEVEL
>= 10) {
1100 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity
, &r
);
1103 if (NT_STATUS_IS_ERR(status
)) {
1107 /* Return variables */
1111 *werror
= r
.out
.result
;
1114 return werror_to_ntstatus(r
.out
.result
);
1117 NTSTATUS
rpccli_winreg_SetValue(struct rpc_pipe_client
*cli
,
1118 TALLOC_CTX
*mem_ctx
,
1119 struct policy_handle
*handle
/* [in] [ref] */,
1120 struct winreg_String name
/* [in] */,
1121 enum winreg_Type type
/* [in] */,
1122 uint8_t *data
/* [in] [ref,size_is(size)] */,
1123 uint32_t size
/* [in] */,
1126 struct winreg_SetValue r
;
1130 r
.in
.handle
= handle
;
1136 if (DEBUGLEVEL
>= 10) {
1137 NDR_PRINT_IN_DEBUG(winreg_SetValue
, &r
);
1140 status
= cli
->dispatch(cli
,
1143 NDR_WINREG_SETVALUE
,
1146 if (!NT_STATUS_IS_OK(status
)) {
1150 if (DEBUGLEVEL
>= 10) {
1151 NDR_PRINT_OUT_DEBUG(winreg_SetValue
, &r
);
1154 if (NT_STATUS_IS_ERR(status
)) {
1158 /* Return variables */
1162 *werror
= r
.out
.result
;
1165 return werror_to_ntstatus(r
.out
.result
);
1168 NTSTATUS
rpccli_winreg_UnLoadKey(struct rpc_pipe_client
*cli
,
1169 TALLOC_CTX
*mem_ctx
,
1172 struct winreg_UnLoadKey r
;
1177 if (DEBUGLEVEL
>= 10) {
1178 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey
, &r
);
1181 status
= cli
->dispatch(cli
,
1184 NDR_WINREG_UNLOADKEY
,
1187 if (!NT_STATUS_IS_OK(status
)) {
1191 if (DEBUGLEVEL
>= 10) {
1192 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey
, &r
);
1195 if (NT_STATUS_IS_ERR(status
)) {
1199 /* Return variables */
1203 *werror
= r
.out
.result
;
1206 return werror_to_ntstatus(r
.out
.result
);
1209 NTSTATUS
rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client
*cli
,
1210 TALLOC_CTX
*mem_ctx
,
1211 uint16_t *hostname
/* [in] [unique] */,
1212 struct lsa_StringLarge
*message
/* [in] [unique] */,
1213 uint32_t timeout
/* [in] */,
1214 uint8_t force_apps
/* [in] */,
1215 uint8_t do_reboot
/* [in] */,
1218 struct winreg_InitiateSystemShutdown r
;
1222 r
.in
.hostname
= hostname
;
1223 r
.in
.message
= message
;
1224 r
.in
.timeout
= timeout
;
1225 r
.in
.force_apps
= force_apps
;
1226 r
.in
.do_reboot
= do_reboot
;
1228 if (DEBUGLEVEL
>= 10) {
1229 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown
, &r
);
1232 status
= cli
->dispatch(cli
,
1235 NDR_WINREG_INITIATESYSTEMSHUTDOWN
,
1238 if (!NT_STATUS_IS_OK(status
)) {
1242 if (DEBUGLEVEL
>= 10) {
1243 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown
, &r
);
1246 if (NT_STATUS_IS_ERR(status
)) {
1250 /* Return variables */
1254 *werror
= r
.out
.result
;
1257 return werror_to_ntstatus(r
.out
.result
);
1260 NTSTATUS
rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client
*cli
,
1261 TALLOC_CTX
*mem_ctx
,
1262 uint16_t *server
/* [in] [unique] */,
1265 struct winreg_AbortSystemShutdown r
;
1269 r
.in
.server
= server
;
1271 if (DEBUGLEVEL
>= 10) {
1272 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown
, &r
);
1275 status
= cli
->dispatch(cli
,
1278 NDR_WINREG_ABORTSYSTEMSHUTDOWN
,
1281 if (!NT_STATUS_IS_OK(status
)) {
1285 if (DEBUGLEVEL
>= 10) {
1286 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown
, &r
);
1289 if (NT_STATUS_IS_ERR(status
)) {
1293 /* Return variables */
1297 *werror
= r
.out
.result
;
1300 return werror_to_ntstatus(r
.out
.result
);
1303 NTSTATUS
rpccli_winreg_GetVersion(struct rpc_pipe_client
*cli
,
1304 TALLOC_CTX
*mem_ctx
,
1305 struct policy_handle
*handle
/* [in] [ref] */,
1306 uint32_t *version
/* [out] [ref] */,
1309 struct winreg_GetVersion r
;
1313 r
.in
.handle
= handle
;
1315 if (DEBUGLEVEL
>= 10) {
1316 NDR_PRINT_IN_DEBUG(winreg_GetVersion
, &r
);
1319 status
= cli
->dispatch(cli
,
1322 NDR_WINREG_GETVERSION
,
1325 if (!NT_STATUS_IS_OK(status
)) {
1329 if (DEBUGLEVEL
>= 10) {
1330 NDR_PRINT_OUT_DEBUG(winreg_GetVersion
, &r
);
1333 if (NT_STATUS_IS_ERR(status
)) {
1337 /* Return variables */
1338 *version
= *r
.out
.version
;
1342 *werror
= r
.out
.result
;
1345 return werror_to_ntstatus(r
.out
.result
);
1348 NTSTATUS
rpccli_winreg_OpenHKCC(struct rpc_pipe_client
*cli
,
1349 TALLOC_CTX
*mem_ctx
,
1350 uint16_t *system_name
/* [in] [unique] */,
1351 uint32_t access_mask
/* [in] */,
1352 struct policy_handle
*handle
/* [out] [ref] */,
1355 struct winreg_OpenHKCC r
;
1359 r
.in
.system_name
= system_name
;
1360 r
.in
.access_mask
= access_mask
;
1362 if (DEBUGLEVEL
>= 10) {
1363 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC
, &r
);
1366 status
= cli
->dispatch(cli
,
1369 NDR_WINREG_OPENHKCC
,
1372 if (!NT_STATUS_IS_OK(status
)) {
1376 if (DEBUGLEVEL
>= 10) {
1377 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC
, &r
);
1380 if (NT_STATUS_IS_ERR(status
)) {
1384 /* Return variables */
1385 *handle
= *r
.out
.handle
;
1389 *werror
= r
.out
.result
;
1392 return werror_to_ntstatus(r
.out
.result
);
1395 NTSTATUS
rpccli_winreg_OpenHKDD(struct rpc_pipe_client
*cli
,
1396 TALLOC_CTX
*mem_ctx
,
1397 uint16_t *system_name
/* [in] [unique] */,
1398 uint32_t access_mask
/* [in] */,
1399 struct policy_handle
*handle
/* [out] [ref] */,
1402 struct winreg_OpenHKDD r
;
1406 r
.in
.system_name
= system_name
;
1407 r
.in
.access_mask
= access_mask
;
1409 if (DEBUGLEVEL
>= 10) {
1410 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD
, &r
);
1413 status
= cli
->dispatch(cli
,
1416 NDR_WINREG_OPENHKDD
,
1419 if (!NT_STATUS_IS_OK(status
)) {
1423 if (DEBUGLEVEL
>= 10) {
1424 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD
, &r
);
1427 if (NT_STATUS_IS_ERR(status
)) {
1431 /* Return variables */
1432 *handle
= *r
.out
.handle
;
1436 *werror
= r
.out
.result
;
1439 return werror_to_ntstatus(r
.out
.result
);
1442 NTSTATUS
rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client
*cli
,
1443 TALLOC_CTX
*mem_ctx
,
1444 struct policy_handle
*key_handle
/* [in] [ref] */,
1445 struct QueryMultipleValue
*values
/* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
1446 uint32_t num_values
/* [in] */,
1447 uint8_t *buffer
/* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */,
1448 uint32_t *buffer_size
/* [in,out] [ref] */,
1451 struct winreg_QueryMultipleValues r
;
1455 r
.in
.key_handle
= key_handle
;
1456 r
.in
.values
= values
;
1457 r
.in
.num_values
= num_values
;
1458 r
.in
.buffer
= buffer
;
1459 r
.in
.buffer_size
= buffer_size
;
1461 if (DEBUGLEVEL
>= 10) {
1462 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues
, &r
);
1465 status
= cli
->dispatch(cli
,
1468 NDR_WINREG_QUERYMULTIPLEVALUES
,
1471 if (!NT_STATUS_IS_OK(status
)) {
1475 if (DEBUGLEVEL
>= 10) {
1476 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues
, &r
);
1479 if (NT_STATUS_IS_ERR(status
)) {
1483 /* Return variables */
1484 memcpy(values
, r
.out
.values
, r
.in
.num_values
* sizeof(*values
));
1485 if (buffer
&& r
.out
.buffer
) {
1486 memcpy(buffer
, r
.out
.buffer
, *r
.in
.buffer_size
* sizeof(*buffer
));
1488 *buffer_size
= *r
.out
.buffer_size
;
1492 *werror
= r
.out
.result
;
1495 return werror_to_ntstatus(r
.out
.result
);
1498 NTSTATUS
rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client
*cli
,
1499 TALLOC_CTX
*mem_ctx
,
1500 uint16_t *hostname
/* [in] [unique] */,
1501 struct lsa_StringLarge
*message
/* [in] [unique] */,
1502 uint32_t timeout
/* [in] */,
1503 uint8_t force_apps
/* [in] */,
1504 uint8_t do_reboot
/* [in] */,
1505 uint32_t reason
/* [in] */,
1508 struct winreg_InitiateSystemShutdownEx r
;
1512 r
.in
.hostname
= hostname
;
1513 r
.in
.message
= message
;
1514 r
.in
.timeout
= timeout
;
1515 r
.in
.force_apps
= force_apps
;
1516 r
.in
.do_reboot
= do_reboot
;
1517 r
.in
.reason
= reason
;
1519 if (DEBUGLEVEL
>= 10) {
1520 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx
, &r
);
1523 status
= cli
->dispatch(cli
,
1526 NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
,
1529 if (!NT_STATUS_IS_OK(status
)) {
1533 if (DEBUGLEVEL
>= 10) {
1534 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx
, &r
);
1537 if (NT_STATUS_IS_ERR(status
)) {
1541 /* Return variables */
1545 *werror
= r
.out
.result
;
1548 return werror_to_ntstatus(r
.out
.result
);
1551 NTSTATUS
rpccli_winreg_SaveKeyEx(struct rpc_pipe_client
*cli
,
1552 TALLOC_CTX
*mem_ctx
,
1555 struct winreg_SaveKeyEx r
;
1560 if (DEBUGLEVEL
>= 10) {
1561 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx
, &r
);
1564 status
= cli
->dispatch(cli
,
1567 NDR_WINREG_SAVEKEYEX
,
1570 if (!NT_STATUS_IS_OK(status
)) {
1574 if (DEBUGLEVEL
>= 10) {
1575 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx
, &r
);
1578 if (NT_STATUS_IS_ERR(status
)) {
1582 /* Return variables */
1586 *werror
= r
.out
.result
;
1589 return werror_to_ntstatus(r
.out
.result
);
1592 NTSTATUS
rpccli_winreg_OpenHKPT(struct rpc_pipe_client
*cli
,
1593 TALLOC_CTX
*mem_ctx
,
1594 uint16_t *system_name
/* [in] [unique] */,
1595 uint32_t access_mask
/* [in] */,
1596 struct policy_handle
*handle
/* [out] [ref] */,
1599 struct winreg_OpenHKPT r
;
1603 r
.in
.system_name
= system_name
;
1604 r
.in
.access_mask
= access_mask
;
1606 if (DEBUGLEVEL
>= 10) {
1607 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT
, &r
);
1610 status
= cli
->dispatch(cli
,
1613 NDR_WINREG_OPENHKPT
,
1616 if (!NT_STATUS_IS_OK(status
)) {
1620 if (DEBUGLEVEL
>= 10) {
1621 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT
, &r
);
1624 if (NT_STATUS_IS_ERR(status
)) {
1628 /* Return variables */
1629 *handle
= *r
.out
.handle
;
1633 *werror
= r
.out
.result
;
1636 return werror_to_ntstatus(r
.out
.result
);
1639 NTSTATUS
rpccli_winreg_OpenHKPN(struct rpc_pipe_client
*cli
,
1640 TALLOC_CTX
*mem_ctx
,
1641 uint16_t *system_name
/* [in] [unique] */,
1642 uint32_t access_mask
/* [in] */,
1643 struct policy_handle
*handle
/* [out] [ref] */,
1646 struct winreg_OpenHKPN r
;
1650 r
.in
.system_name
= system_name
;
1651 r
.in
.access_mask
= access_mask
;
1653 if (DEBUGLEVEL
>= 10) {
1654 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN
, &r
);
1657 status
= cli
->dispatch(cli
,
1660 NDR_WINREG_OPENHKPN
,
1663 if (!NT_STATUS_IS_OK(status
)) {
1667 if (DEBUGLEVEL
>= 10) {
1668 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN
, &r
);
1671 if (NT_STATUS_IS_ERR(status
)) {
1675 /* Return variables */
1676 *handle
= *r
.out
.handle
;
1680 *werror
= r
.out
.result
;
1683 return werror_to_ntstatus(r
.out
.result
);
1686 NTSTATUS
rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client
*cli
,
1687 TALLOC_CTX
*mem_ctx
,
1690 struct winreg_QueryMultipleValues2 r
;
1695 if (DEBUGLEVEL
>= 10) {
1696 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2
, &r
);
1699 status
= cli
->dispatch(cli
,
1702 NDR_WINREG_QUERYMULTIPLEVALUES2
,
1705 if (!NT_STATUS_IS_OK(status
)) {
1709 if (DEBUGLEVEL
>= 10) {
1710 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2
, &r
);
1713 if (NT_STATUS_IS_ERR(status
)) {
1717 /* Return variables */
1721 *werror
= r
.out
.result
;
1724 return werror_to_ntstatus(r
.out
.result
);