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, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
11 struct winreg_OpenHKCR r;
15 r.in.system_name = system_name;
16 r.in.access_mask = access_mask;
19 NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, &r);
21 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCR, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCR, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCR);
23 if ( !NT_STATUS_IS_OK(status) ) {
28 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, &r);
30 if (NT_STATUS_IS_ERR(status)) {
34 /* Return variables */
35 *handle = *r.out.handle;
38 return werror_to_ntstatus(r.out.result);
41 NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
43 struct winreg_OpenHKCU r;
47 r.in.system_name = system_name;
48 r.in.access_mask = access_mask;
51 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, &r);
53 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCU, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCU, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCU);
55 if ( !NT_STATUS_IS_OK(status) ) {
60 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, &r);
62 if (NT_STATUS_IS_ERR(status)) {
66 /* Return variables */
67 *handle = *r.out.handle;
70 return werror_to_ntstatus(r.out.result);
73 NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
75 struct winreg_OpenHKLM r;
79 r.in.system_name = system_name;
80 r.in.access_mask = access_mask;
83 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, &r);
85 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKLM, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKLM, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKLM);
87 if ( !NT_STATUS_IS_OK(status) ) {
92 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, &r);
94 if (NT_STATUS_IS_ERR(status)) {
98 /* Return variables */
99 *handle = *r.out.handle;
102 return werror_to_ntstatus(r.out.result);
105 NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
107 struct winreg_OpenHKPD r;
111 r.in.system_name = system_name;
112 r.in.access_mask = access_mask;
114 if (DEBUGLEVEL >= 10)
115 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, &r);
117 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPD, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPD, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPD);
119 if ( !NT_STATUS_IS_OK(status) ) {
123 if (DEBUGLEVEL >= 10)
124 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, &r);
126 if (NT_STATUS_IS_ERR(status)) {
130 /* Return variables */
131 *handle = *r.out.handle;
134 return werror_to_ntstatus(r.out.result);
137 NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
139 struct winreg_OpenHKU r;
143 r.in.system_name = system_name;
144 r.in.access_mask = access_mask;
146 if (DEBUGLEVEL >= 10)
147 NDR_PRINT_IN_DEBUG(winreg_OpenHKU, &r);
149 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKU, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKU, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKU);
151 if ( !NT_STATUS_IS_OK(status) ) {
155 if (DEBUGLEVEL >= 10)
156 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, &r);
158 if (NT_STATUS_IS_ERR(status)) {
162 /* Return variables */
163 *handle = *r.out.handle;
166 return werror_to_ntstatus(r.out.result);
169 NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
171 struct winreg_CloseKey r;
175 r.in.handle = handle;
177 if (DEBUGLEVEL >= 10)
178 NDR_PRINT_IN_DEBUG(winreg_CloseKey, &r);
180 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_CLOSEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_CloseKey, (ndr_push_flags_fn_t)ndr_push_winreg_CloseKey);
182 if ( !NT_STATUS_IS_OK(status) ) {
186 if (DEBUGLEVEL >= 10)
187 NDR_PRINT_OUT_DEBUG(winreg_CloseKey, &r);
189 if (NT_STATUS_IS_ERR(status)) {
193 /* Return variables */
194 *handle = *r.out.handle;
197 return werror_to_ntstatus(r.out.result);
200 NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, struct winreg_String keyclass, uint32_t options, uint32_t access_mask, struct winreg_SecBuf *secdesc, struct policy_handle *new_handle, enum winreg_CreateAction **action_taken)
202 struct winreg_CreateKey r;
206 r.in.handle = handle;
208 r.in.keyclass = keyclass;
209 r.in.options = options;
210 r.in.access_mask = access_mask;
211 r.in.secdesc = secdesc;
212 r.in.action_taken = *action_taken;
214 if (DEBUGLEVEL >= 10)
215 NDR_PRINT_IN_DEBUG(winreg_CreateKey, &r);
217 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_CREATEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_CreateKey, (ndr_push_flags_fn_t)ndr_push_winreg_CreateKey);
219 if ( !NT_STATUS_IS_OK(status) ) {
223 if (DEBUGLEVEL >= 10)
224 NDR_PRINT_OUT_DEBUG(winreg_CreateKey, &r);
226 if (NT_STATUS_IS_ERR(status)) {
230 /* Return variables */
231 *new_handle = *r.out.new_handle;
232 *action_taken = r.out.action_taken;
235 return werror_to_ntstatus(r.out.result);
238 NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String key)
240 struct winreg_DeleteKey r;
244 r.in.handle = handle;
247 if (DEBUGLEVEL >= 10)
248 NDR_PRINT_IN_DEBUG(winreg_DeleteKey, &r);
250 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_DELETEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_DeleteKey, (ndr_push_flags_fn_t)ndr_push_winreg_DeleteKey);
252 if ( !NT_STATUS_IS_OK(status) ) {
256 if (DEBUGLEVEL >= 10)
257 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, &r);
259 if (NT_STATUS_IS_ERR(status)) {
263 /* Return variables */
266 return werror_to_ntstatus(r.out.result);
269 NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value)
271 struct winreg_DeleteValue r;
275 r.in.handle = handle;
278 if (DEBUGLEVEL >= 10)
279 NDR_PRINT_IN_DEBUG(winreg_DeleteValue, &r);
281 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_DELETEVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_DeleteValue, (ndr_push_flags_fn_t)ndr_push_winreg_DeleteValue);
283 if ( !NT_STATUS_IS_OK(status) ) {
287 if (DEBUGLEVEL >= 10)
288 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, &r);
290 if (NT_STATUS_IS_ERR(status)) {
294 /* Return variables */
297 return werror_to_ntstatus(r.out.result);
300 NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_StringBuf *name, struct winreg_StringBuf **keyclass, NTTIME **last_changed_time)
302 struct winreg_EnumKey r;
306 r.in.handle = handle;
307 r.in.enum_index = enum_index;
309 r.in.keyclass = *keyclass;
310 r.in.last_changed_time = *last_changed_time;
312 if (DEBUGLEVEL >= 10)
313 NDR_PRINT_IN_DEBUG(winreg_EnumKey, &r);
315 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ENUMKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_EnumKey, (ndr_push_flags_fn_t)ndr_push_winreg_EnumKey);
317 if ( !NT_STATUS_IS_OK(status) ) {
321 if (DEBUGLEVEL >= 10)
322 NDR_PRINT_OUT_DEBUG(winreg_EnumKey, &r);
324 if (NT_STATUS_IS_ERR(status)) {
328 /* Return variables */
330 *keyclass = r.out.keyclass;
331 *last_changed_time = r.out.last_changed_time;
334 return werror_to_ntstatus(r.out.result);
337 NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_StringBuf *name, enum winreg_Type **type, uint8_t **data, uint32_t **data_size, uint32_t **value_length)
339 struct winreg_EnumValue r;
343 r.in.handle = handle;
344 r.in.enum_index = enum_index;
348 r.in.data_size = *data_size;
349 r.in.value_length = *value_length;
351 if (DEBUGLEVEL >= 10)
352 NDR_PRINT_IN_DEBUG(winreg_EnumValue, &r);
354 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ENUMVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_EnumValue, (ndr_push_flags_fn_t)ndr_push_winreg_EnumValue);
356 if ( !NT_STATUS_IS_OK(status) ) {
360 if (DEBUGLEVEL >= 10)
361 NDR_PRINT_OUT_DEBUG(winreg_EnumValue, &r);
363 if (NT_STATUS_IS_ERR(status)) {
367 /* Return variables */
371 *data_size = r.out.data_size;
372 *value_length = r.out.value_length;
375 return werror_to_ntstatus(r.out.result);
378 NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
380 struct winreg_FlushKey r;
384 r.in.handle = handle;
386 if (DEBUGLEVEL >= 10)
387 NDR_PRINT_IN_DEBUG(winreg_FlushKey, &r);
389 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_FLUSHKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_FlushKey, (ndr_push_flags_fn_t)ndr_push_winreg_FlushKey);
391 if ( !NT_STATUS_IS_OK(status) ) {
395 if (DEBUGLEVEL >= 10)
396 NDR_PRINT_OUT_DEBUG(winreg_FlushKey, &r);
398 if (NT_STATUS_IS_ERR(status)) {
402 /* Return variables */
405 return werror_to_ntstatus(r.out.result);
408 NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct KeySecurityData *sd)
410 struct winreg_GetKeySecurity r;
414 r.in.handle = handle;
415 r.in.sec_info = sec_info;
418 if (DEBUGLEVEL >= 10)
419 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity, &r);
421 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_GETKEYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_GetKeySecurity, (ndr_push_flags_fn_t)ndr_push_winreg_GetKeySecurity);
423 if ( !NT_STATUS_IS_OK(status) ) {
427 if (DEBUGLEVEL >= 10)
428 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, &r);
430 if (NT_STATUS_IS_ERR(status)) {
434 /* Return variables */
438 return werror_to_ntstatus(r.out.result);
441 NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *keyname, struct winreg_String *filename)
443 struct winreg_LoadKey r;
447 r.in.handle = handle;
448 r.in.keyname = keyname;
449 r.in.filename = filename;
451 if (DEBUGLEVEL >= 10)
452 NDR_PRINT_IN_DEBUG(winreg_LoadKey, &r);
454 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_LOADKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_LoadKey, (ndr_push_flags_fn_t)ndr_push_winreg_LoadKey);
456 if ( !NT_STATUS_IS_OK(status) ) {
460 if (DEBUGLEVEL >= 10)
461 NDR_PRINT_OUT_DEBUG(winreg_LoadKey, &r);
463 if (NT_STATUS_IS_ERR(status)) {
467 /* Return variables */
470 return werror_to_ntstatus(r.out.result);
473 NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t watch_subtree, uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct winreg_String string2, uint32_t unknown2)
475 struct winreg_NotifyChangeKeyValue r;
479 r.in.handle = handle;
480 r.in.watch_subtree = watch_subtree;
481 r.in.notify_filter = notify_filter;
482 r.in.unknown = unknown;
483 r.in.string1 = string1;
484 r.in.string2 = string2;
485 r.in.unknown2 = unknown2;
487 if (DEBUGLEVEL >= 10)
488 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue, &r);
490 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_NOTIFYCHANGEKEYVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_NotifyChangeKeyValue, (ndr_push_flags_fn_t)ndr_push_winreg_NotifyChangeKeyValue);
492 if ( !NT_STATUS_IS_OK(status) ) {
496 if (DEBUGLEVEL >= 10)
497 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, &r);
499 if (NT_STATUS_IS_ERR(status)) {
503 /* Return variables */
506 return werror_to_ntstatus(r.out.result);
509 NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *parent_handle, struct winreg_String keyname, uint32_t unknown, uint32_t access_mask, struct policy_handle *handle)
511 struct winreg_OpenKey r;
515 r.in.parent_handle = parent_handle;
516 r.in.keyname = keyname;
517 r.in.unknown = unknown;
518 r.in.access_mask = access_mask;
520 if (DEBUGLEVEL >= 10)
521 NDR_PRINT_IN_DEBUG(winreg_OpenKey, &r);
523 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenKey, (ndr_push_flags_fn_t)ndr_push_winreg_OpenKey);
525 if ( !NT_STATUS_IS_OK(status) ) {
529 if (DEBUGLEVEL >= 10)
530 NDR_PRINT_OUT_DEBUG(winreg_OpenKey, &r);
532 if (NT_STATUS_IS_ERR(status)) {
536 /* Return variables */
537 *handle = *r.out.handle;
540 return werror_to_ntstatus(r.out.result);
543 NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *classname, uint32_t *num_subkeys, uint32_t *max_subkeylen, uint32_t *max_classlen, uint32_t *num_values, uint32_t *max_valnamelen, uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time)
545 struct winreg_QueryInfoKey r;
549 r.in.handle = handle;
550 r.in.classname = classname;
552 if (DEBUGLEVEL >= 10)
553 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, &r);
555 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYINFOKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryInfoKey, (ndr_push_flags_fn_t)ndr_push_winreg_QueryInfoKey);
557 if ( !NT_STATUS_IS_OK(status) ) {
561 if (DEBUGLEVEL >= 10)
562 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &r);
564 if (NT_STATUS_IS_ERR(status)) {
568 /* Return variables */
569 *classname = *r.out.classname;
570 *num_subkeys = *r.out.num_subkeys;
571 *max_subkeylen = *r.out.max_subkeylen;
572 *max_classlen = *r.out.max_classlen;
573 *num_values = *r.out.num_values;
574 *max_valnamelen = *r.out.max_valnamelen;
575 *max_valbufsize = *r.out.max_valbufsize;
576 *secdescsize = *r.out.secdescsize;
577 *last_changed_time = *r.out.last_changed_time;
580 return werror_to_ntstatus(r.out.result);
583 NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type **type, uint8_t **data, uint32_t **data_size, uint32_t **value_length)
585 struct winreg_QueryValue r;
589 r.in.handle = handle;
590 r.in.value_name = value_name;
593 r.in.data_size = *data_size;
594 r.in.value_length = *value_length;
596 if (DEBUGLEVEL >= 10)
597 NDR_PRINT_IN_DEBUG(winreg_QueryValue, &r);
599 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryValue, (ndr_push_flags_fn_t)ndr_push_winreg_QueryValue);
601 if ( !NT_STATUS_IS_OK(status) ) {
605 if (DEBUGLEVEL >= 10)
606 NDR_PRINT_OUT_DEBUG(winreg_QueryValue, &r);
608 if (NT_STATUS_IS_ERR(status)) {
612 /* Return variables */
615 *data_size = r.out.data_size;
616 *value_length = r.out.value_length;
619 return werror_to_ntstatus(r.out.result);
622 NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
624 struct winreg_ReplaceKey r;
629 if (DEBUGLEVEL >= 10)
630 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey, &r);
632 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_REPLACEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_ReplaceKey, (ndr_push_flags_fn_t)ndr_push_winreg_ReplaceKey);
634 if ( !NT_STATUS_IS_OK(status) ) {
638 if (DEBUGLEVEL >= 10)
639 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, &r);
641 if (NT_STATUS_IS_ERR(status)) {
645 /* Return variables */
648 return werror_to_ntstatus(r.out.result);
651 NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, uint32_t flags)
653 struct winreg_RestoreKey r;
657 r.in.handle = handle;
658 r.in.filename = filename;
661 if (DEBUGLEVEL >= 10)
662 NDR_PRINT_IN_DEBUG(winreg_RestoreKey, &r);
664 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_RESTOREKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_RestoreKey, (ndr_push_flags_fn_t)ndr_push_winreg_RestoreKey);
666 if ( !NT_STATUS_IS_OK(status) ) {
670 if (DEBUGLEVEL >= 10)
671 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, &r);
673 if (NT_STATUS_IS_ERR(status)) {
677 /* Return variables */
680 return werror_to_ntstatus(r.out.result);
683 NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, struct KeySecurityAttribute *sec_attrib)
685 struct winreg_SaveKey r;
689 r.in.handle = handle;
690 r.in.filename = filename;
691 r.in.sec_attrib = sec_attrib;
693 if (DEBUGLEVEL >= 10)
694 NDR_PRINT_IN_DEBUG(winreg_SaveKey, &r);
696 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SAVEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SaveKey, (ndr_push_flags_fn_t)ndr_push_winreg_SaveKey);
698 if ( !NT_STATUS_IS_OK(status) ) {
702 if (DEBUGLEVEL >= 10)
703 NDR_PRINT_OUT_DEBUG(winreg_SaveKey, &r);
705 if (NT_STATUS_IS_ERR(status)) {
709 /* Return variables */
712 return werror_to_ntstatus(r.out.result);
715 NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t access_mask, struct KeySecurityData *sd)
717 struct winreg_SetKeySecurity r;
721 r.in.handle = handle;
722 r.in.access_mask = access_mask;
725 if (DEBUGLEVEL >= 10)
726 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, &r);
728 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SETKEYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SetKeySecurity, (ndr_push_flags_fn_t)ndr_push_winreg_SetKeySecurity);
730 if ( !NT_STATUS_IS_OK(status) ) {
734 if (DEBUGLEVEL >= 10)
735 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, &r);
737 if (NT_STATUS_IS_ERR(status)) {
741 /* Return variables */
745 return werror_to_ntstatus(r.out.result);
748 NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, enum winreg_Type type, uint8_t *data, uint32_t size)
750 struct winreg_SetValue r;
754 r.in.handle = handle;
760 if (DEBUGLEVEL >= 10)
761 NDR_PRINT_IN_DEBUG(winreg_SetValue, &r);
763 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SETVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SetValue, (ndr_push_flags_fn_t)ndr_push_winreg_SetValue);
765 if ( !NT_STATUS_IS_OK(status) ) {
769 if (DEBUGLEVEL >= 10)
770 NDR_PRINT_OUT_DEBUG(winreg_SetValue, &r);
772 if (NT_STATUS_IS_ERR(status)) {
776 /* Return variables */
779 return werror_to_ntstatus(r.out.result);
782 NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
784 struct winreg_UnLoadKey r;
789 if (DEBUGLEVEL >= 10)
790 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey, &r);
792 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_UNLOADKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_UnLoadKey, (ndr_push_flags_fn_t)ndr_push_winreg_UnLoadKey);
794 if ( !NT_STATUS_IS_OK(status) ) {
798 if (DEBUGLEVEL >= 10)
799 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, &r);
801 if (NT_STATUS_IS_ERR(status)) {
805 /* Return variables */
808 return werror_to_ntstatus(r.out.result);
811 NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot)
813 struct winreg_InitiateSystemShutdown r;
817 r.in.hostname = hostname;
818 r.in.message = message;
819 r.in.timeout = timeout;
820 r.in.force_apps = force_apps;
821 r.in.reboot = reboot;
823 if (DEBUGLEVEL >= 10)
824 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, &r);
826 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_INITIATESYSTEMSHUTDOWN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_InitiateSystemShutdown, (ndr_push_flags_fn_t)ndr_push_winreg_InitiateSystemShutdown);
828 if ( !NT_STATUS_IS_OK(status) ) {
832 if (DEBUGLEVEL >= 10)
833 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, &r);
835 if (NT_STATUS_IS_ERR(status)) {
839 /* Return variables */
842 return werror_to_ntstatus(r.out.result);
845 NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server)
847 struct winreg_AbortSystemShutdown r;
851 r.in.server = server;
853 if (DEBUGLEVEL >= 10)
854 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown, &r);
856 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ABORTSYSTEMSHUTDOWN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_AbortSystemShutdown, (ndr_push_flags_fn_t)ndr_push_winreg_AbortSystemShutdown);
858 if ( !NT_STATUS_IS_OK(status) ) {
862 if (DEBUGLEVEL >= 10)
863 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, &r);
865 if (NT_STATUS_IS_ERR(status)) {
869 /* Return variables */
872 return werror_to_ntstatus(r.out.result);
875 NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *version)
877 struct winreg_GetVersion r;
881 r.in.handle = handle;
883 if (DEBUGLEVEL >= 10)
884 NDR_PRINT_IN_DEBUG(winreg_GetVersion, &r);
886 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_GETVERSION, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_GetVersion, (ndr_push_flags_fn_t)ndr_push_winreg_GetVersion);
888 if ( !NT_STATUS_IS_OK(status) ) {
892 if (DEBUGLEVEL >= 10)
893 NDR_PRINT_OUT_DEBUG(winreg_GetVersion, &r);
895 if (NT_STATUS_IS_ERR(status)) {
899 /* Return variables */
900 *version = *r.out.version;
903 return werror_to_ntstatus(r.out.result);
906 NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
908 struct winreg_OpenHKCC r;
912 r.in.system_name = system_name;
913 r.in.access_mask = access_mask;
915 if (DEBUGLEVEL >= 10)
916 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &r);
918 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCC, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCC, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCC);
920 if ( !NT_STATUS_IS_OK(status) ) {
924 if (DEBUGLEVEL >= 10)
925 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, &r);
927 if (NT_STATUS_IS_ERR(status)) {
931 /* Return variables */
932 *handle = *r.out.handle;
935 return werror_to_ntstatus(r.out.result);
938 NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
940 struct winreg_OpenHKDD r;
944 r.in.system_name = system_name;
945 r.in.access_mask = access_mask;
947 if (DEBUGLEVEL >= 10)
948 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &r);
950 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKDD, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKDD, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKDD);
952 if ( !NT_STATUS_IS_OK(status) ) {
956 if (DEBUGLEVEL >= 10)
957 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, &r);
959 if (NT_STATUS_IS_ERR(status)) {
963 /* Return variables */
964 *handle = *r.out.handle;
967 return werror_to_ntstatus(r.out.result);
970 NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *key_handle, struct QueryMultipleValue *values, uint32_t num_values, uint8_t **buffer, uint32_t *buffer_size)
972 struct winreg_QueryMultipleValues r;
976 r.in.key_handle = key_handle;
977 r.in.values = values;
978 r.in.num_values = num_values;
979 r.in.buffer = *buffer;
980 r.in.buffer_size = buffer_size;
982 if (DEBUGLEVEL >= 10)
983 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues, &r);
985 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYMULTIPLEVALUES, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryMultipleValues, (ndr_push_flags_fn_t)ndr_push_winreg_QueryMultipleValues);
987 if ( !NT_STATUS_IS_OK(status) ) {
991 if (DEBUGLEVEL >= 10)
992 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, &r);
994 if (NT_STATUS_IS_ERR(status)) {
998 /* Return variables */
999 *values = *r.out.values;
1000 *buffer = r.out.buffer;
1001 *buffer_size = *r.out.buffer_size;
1004 return werror_to_ntstatus(r.out.result);
1007 NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, uint32_t reason)
1009 struct winreg_InitiateSystemShutdownEx r;
1013 r.in.hostname = hostname;
1014 r.in.message = message;
1015 r.in.timeout = timeout;
1016 r.in.force_apps = force_apps;
1017 r.in.reboot = reboot;
1018 r.in.reason = reason;
1020 if (DEBUGLEVEL >= 10)
1021 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1023 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_INITIATESYSTEMSHUTDOWNEX, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_InitiateSystemShutdownEx, (ndr_push_flags_fn_t)ndr_push_winreg_InitiateSystemShutdownEx);
1025 if ( !NT_STATUS_IS_OK(status) ) {
1029 if (DEBUGLEVEL >= 10)
1030 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1032 if (NT_STATUS_IS_ERR(status)) {
1036 /* Return variables */
1039 return werror_to_ntstatus(r.out.result);
1042 NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1044 struct winreg_SaveKeyEx r;
1049 if (DEBUGLEVEL >= 10)
1050 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx, &r);
1052 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SAVEKEYEX, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SaveKeyEx, (ndr_push_flags_fn_t)ndr_push_winreg_SaveKeyEx);
1054 if ( !NT_STATUS_IS_OK(status) ) {
1058 if (DEBUGLEVEL >= 10)
1059 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, &r);
1061 if (NT_STATUS_IS_ERR(status)) {
1065 /* Return variables */
1068 return werror_to_ntstatus(r.out.result);
1071 NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
1073 struct winreg_OpenHKPT r;
1077 r.in.system_name = system_name;
1078 r.in.access_mask = access_mask;
1080 if (DEBUGLEVEL >= 10)
1081 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &r);
1083 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPT, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPT, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPT);
1085 if ( !NT_STATUS_IS_OK(status) ) {
1089 if (DEBUGLEVEL >= 10)
1090 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, &r);
1092 if (NT_STATUS_IS_ERR(status)) {
1096 /* Return variables */
1097 *handle = *r.out.handle;
1100 return werror_to_ntstatus(r.out.result);
1103 NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle)
1105 struct winreg_OpenHKPN r;
1109 r.in.system_name = system_name;
1110 r.in.access_mask = access_mask;
1112 if (DEBUGLEVEL >= 10)
1113 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &r);
1115 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPN, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPN);
1117 if ( !NT_STATUS_IS_OK(status) ) {
1121 if (DEBUGLEVEL >= 10)
1122 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, &r);
1124 if (NT_STATUS_IS_ERR(status)) {
1128 /* Return variables */
1129 *handle = *r.out.handle;
1132 return werror_to_ntstatus(r.out.result);
1135 NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1137 struct winreg_QueryMultipleValues2 r;
1142 if (DEBUGLEVEL >= 10)
1143 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, &r);
1145 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYMULTIPLEVALUES2, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryMultipleValues2, (ndr_push_flags_fn_t)ndr_push_winreg_QueryMultipleValues2);
1147 if ( !NT_STATUS_IS_OK(status) ) {
1151 if (DEBUGLEVEL >= 10)
1152 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, &r);
1154 if (NT_STATUS_IS_ERR(status)) {
1158 /* Return variables */
1161 return werror_to_ntstatus(r.out.result);