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, &ndr_table_winreg, NDR_WINREG_OPENHKCR, &r);
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, &ndr_table_winreg, NDR_WINREG_OPENHKCU, &r);
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, &ndr_table_winreg, NDR_WINREG_OPENHKLM, &r);
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, &ndr_table_winreg, NDR_WINREG_OPENHKPD, &r);
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, &ndr_table_winreg, NDR_WINREG_OPENHKU, &r);
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, &ndr_table_winreg, NDR_WINREG_CLOSEKEY, &r);
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, &ndr_table_winreg, NDR_WINREG_CREATEKEY, &r);
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 if (action_taken && r.out.action_taken) {
233 *action_taken = *r.out.action_taken;
237 return werror_to_ntstatus(r.out.result);
240 NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String key)
242 struct winreg_DeleteKey r;
246 r.in.handle = handle;
249 if (DEBUGLEVEL >= 10)
250 NDR_PRINT_IN_DEBUG(winreg_DeleteKey, &r);
252 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_DELETEKEY, &r);
254 if (!NT_STATUS_IS_OK(status)) {
258 if (DEBUGLEVEL >= 10)
259 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, &r);
261 if (NT_STATUS_IS_ERR(status)) {
265 /* Return variables */
268 return werror_to_ntstatus(r.out.result);
271 NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value)
273 struct winreg_DeleteValue r;
277 r.in.handle = handle;
280 if (DEBUGLEVEL >= 10)
281 NDR_PRINT_IN_DEBUG(winreg_DeleteValue, &r);
283 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_DELETEVALUE, &r);
285 if (!NT_STATUS_IS_OK(status)) {
289 if (DEBUGLEVEL >= 10)
290 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, &r);
292 if (NT_STATUS_IS_ERR(status)) {
296 /* Return variables */
299 return werror_to_ntstatus(r.out.result);
302 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)
304 struct winreg_EnumKey r;
308 r.in.handle = handle;
309 r.in.enum_index = enum_index;
311 r.in.keyclass = keyclass;
312 r.in.last_changed_time = last_changed_time;
314 if (DEBUGLEVEL >= 10)
315 NDR_PRINT_IN_DEBUG(winreg_EnumKey, &r);
317 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_ENUMKEY, &r);
319 if (!NT_STATUS_IS_OK(status)) {
323 if (DEBUGLEVEL >= 10)
324 NDR_PRINT_OUT_DEBUG(winreg_EnumKey, &r);
326 if (NT_STATUS_IS_ERR(status)) {
330 /* Return variables */
332 if (keyclass && r.out.keyclass) {
333 *keyclass = *r.out.keyclass;
335 if (last_changed_time && r.out.last_changed_time) {
336 *last_changed_time = *r.out.last_changed_time;
340 return werror_to_ntstatus(r.out.result);
343 NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_ValNameBuf *name, enum winreg_Type *type, uint8_t *value, uint32_t *size, uint32_t *length)
345 struct winreg_EnumValue r;
349 r.in.handle = handle;
350 r.in.enum_index = enum_index;
355 r.in.length = length;
357 if (DEBUGLEVEL >= 10)
358 NDR_PRINT_IN_DEBUG(winreg_EnumValue, &r);
360 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_ENUMVALUE, &r);
362 if (!NT_STATUS_IS_OK(status)) {
366 if (DEBUGLEVEL >= 10)
367 NDR_PRINT_OUT_DEBUG(winreg_EnumValue, &r);
369 if (NT_STATUS_IS_ERR(status)) {
373 /* Return variables */
375 if (type && r.out.type) {
378 if (value && r.out.value) {
379 memcpy(value, r.out.value, *r.in.size);
381 if (size && r.out.size) {
384 if (length && r.out.length) {
385 *length = *r.out.length;
389 return werror_to_ntstatus(r.out.result);
392 NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
394 struct winreg_FlushKey r;
398 r.in.handle = handle;
400 if (DEBUGLEVEL >= 10)
401 NDR_PRINT_IN_DEBUG(winreg_FlushKey, &r);
403 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_FLUSHKEY, &r);
405 if (!NT_STATUS_IS_OK(status)) {
409 if (DEBUGLEVEL >= 10)
410 NDR_PRINT_OUT_DEBUG(winreg_FlushKey, &r);
412 if (NT_STATUS_IS_ERR(status)) {
416 /* Return variables */
419 return werror_to_ntstatus(r.out.result);
422 NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct KeySecurityData *sd)
424 struct winreg_GetKeySecurity r;
428 r.in.handle = handle;
429 r.in.sec_info = sec_info;
432 if (DEBUGLEVEL >= 10)
433 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity, &r);
435 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_GETKEYSECURITY, &r);
437 if (!NT_STATUS_IS_OK(status)) {
441 if (DEBUGLEVEL >= 10)
442 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, &r);
444 if (NT_STATUS_IS_ERR(status)) {
448 /* Return variables */
452 return werror_to_ntstatus(r.out.result);
455 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)
457 struct winreg_LoadKey r;
461 r.in.handle = handle;
462 r.in.keyname = keyname;
463 r.in.filename = filename;
465 if (DEBUGLEVEL >= 10)
466 NDR_PRINT_IN_DEBUG(winreg_LoadKey, &r);
468 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_LOADKEY, &r);
470 if (!NT_STATUS_IS_OK(status)) {
474 if (DEBUGLEVEL >= 10)
475 NDR_PRINT_OUT_DEBUG(winreg_LoadKey, &r);
477 if (NT_STATUS_IS_ERR(status)) {
481 /* Return variables */
484 return werror_to_ntstatus(r.out.result);
487 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)
489 struct winreg_NotifyChangeKeyValue r;
493 r.in.handle = handle;
494 r.in.watch_subtree = watch_subtree;
495 r.in.notify_filter = notify_filter;
496 r.in.unknown = unknown;
497 r.in.string1 = string1;
498 r.in.string2 = string2;
499 r.in.unknown2 = unknown2;
501 if (DEBUGLEVEL >= 10)
502 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue, &r);
504 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_NOTIFYCHANGEKEYVALUE, &r);
506 if (!NT_STATUS_IS_OK(status)) {
510 if (DEBUGLEVEL >= 10)
511 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, &r);
513 if (NT_STATUS_IS_ERR(status)) {
517 /* Return variables */
520 return werror_to_ntstatus(r.out.result);
523 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)
525 struct winreg_OpenKey r;
529 r.in.parent_handle = parent_handle;
530 r.in.keyname = keyname;
531 r.in.unknown = unknown;
532 r.in.access_mask = access_mask;
534 if (DEBUGLEVEL >= 10)
535 NDR_PRINT_IN_DEBUG(winreg_OpenKey, &r);
537 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_OPENKEY, &r);
539 if (!NT_STATUS_IS_OK(status)) {
543 if (DEBUGLEVEL >= 10)
544 NDR_PRINT_OUT_DEBUG(winreg_OpenKey, &r);
546 if (NT_STATUS_IS_ERR(status)) {
550 /* Return variables */
551 *handle = *r.out.handle;
554 return werror_to_ntstatus(r.out.result);
557 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)
559 struct winreg_QueryInfoKey r;
563 r.in.handle = handle;
564 r.in.classname = classname;
566 if (DEBUGLEVEL >= 10)
567 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, &r);
569 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_QUERYINFOKEY, &r);
571 if (!NT_STATUS_IS_OK(status)) {
575 if (DEBUGLEVEL >= 10)
576 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &r);
578 if (NT_STATUS_IS_ERR(status)) {
582 /* Return variables */
583 *classname = *r.out.classname;
584 *num_subkeys = *r.out.num_subkeys;
585 *max_subkeylen = *r.out.max_subkeylen;
586 *max_classlen = *r.out.max_classlen;
587 *num_values = *r.out.num_values;
588 *max_valnamelen = *r.out.max_valnamelen;
589 *max_valbufsize = *r.out.max_valbufsize;
590 *secdescsize = *r.out.secdescsize;
591 *last_changed_time = *r.out.last_changed_time;
594 return werror_to_ntstatus(r.out.result);
597 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)
599 struct winreg_QueryValue r;
603 r.in.handle = handle;
604 r.in.value_name = value_name;
607 r.in.data_size = data_size;
608 r.in.value_length = value_length;
610 if (DEBUGLEVEL >= 10)
611 NDR_PRINT_IN_DEBUG(winreg_QueryValue, &r);
613 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_QUERYVALUE, &r);
615 if (!NT_STATUS_IS_OK(status)) {
619 if (DEBUGLEVEL >= 10)
620 NDR_PRINT_OUT_DEBUG(winreg_QueryValue, &r);
622 if (NT_STATUS_IS_ERR(status)) {
626 /* Return variables */
627 if (type && r.out.type) {
630 if (data && r.out.data) {
631 memcpy(data, r.out.data, *r.in.data_size);
633 if (data_size && r.out.data_size) {
634 *data_size = *r.out.data_size;
636 if (value_length && r.out.value_length) {
637 *value_length = *r.out.value_length;
641 return werror_to_ntstatus(r.out.result);
644 NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
646 struct winreg_ReplaceKey r;
651 if (DEBUGLEVEL >= 10)
652 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey, &r);
654 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_REPLACEKEY, &r);
656 if (!NT_STATUS_IS_OK(status)) {
660 if (DEBUGLEVEL >= 10)
661 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, &r);
663 if (NT_STATUS_IS_ERR(status)) {
667 /* Return variables */
670 return werror_to_ntstatus(r.out.result);
673 NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, uint32_t flags)
675 struct winreg_RestoreKey r;
679 r.in.handle = handle;
680 r.in.filename = filename;
683 if (DEBUGLEVEL >= 10)
684 NDR_PRINT_IN_DEBUG(winreg_RestoreKey, &r);
686 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_RESTOREKEY, &r);
688 if (!NT_STATUS_IS_OK(status)) {
692 if (DEBUGLEVEL >= 10)
693 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, &r);
695 if (NT_STATUS_IS_ERR(status)) {
699 /* Return variables */
702 return werror_to_ntstatus(r.out.result);
705 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)
707 struct winreg_SaveKey r;
711 r.in.handle = handle;
712 r.in.filename = filename;
713 r.in.sec_attrib = sec_attrib;
715 if (DEBUGLEVEL >= 10)
716 NDR_PRINT_IN_DEBUG(winreg_SaveKey, &r);
718 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_SAVEKEY, &r);
720 if (!NT_STATUS_IS_OK(status)) {
724 if (DEBUGLEVEL >= 10)
725 NDR_PRINT_OUT_DEBUG(winreg_SaveKey, &r);
727 if (NT_STATUS_IS_ERR(status)) {
731 /* Return variables */
734 return werror_to_ntstatus(r.out.result);
737 NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t access_mask, struct KeySecurityData *sd)
739 struct winreg_SetKeySecurity r;
743 r.in.handle = handle;
744 r.in.access_mask = access_mask;
747 if (DEBUGLEVEL >= 10)
748 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, &r);
750 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_SETKEYSECURITY, &r);
752 if (!NT_STATUS_IS_OK(status)) {
756 if (DEBUGLEVEL >= 10)
757 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, &r);
759 if (NT_STATUS_IS_ERR(status)) {
763 /* Return variables */
766 return werror_to_ntstatus(r.out.result);
769 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)
771 struct winreg_SetValue r;
775 r.in.handle = handle;
781 if (DEBUGLEVEL >= 10)
782 NDR_PRINT_IN_DEBUG(winreg_SetValue, &r);
784 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_SETVALUE, &r);
786 if (!NT_STATUS_IS_OK(status)) {
790 if (DEBUGLEVEL >= 10)
791 NDR_PRINT_OUT_DEBUG(winreg_SetValue, &r);
793 if (NT_STATUS_IS_ERR(status)) {
797 /* Return variables */
800 return werror_to_ntstatus(r.out.result);
803 NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
805 struct winreg_UnLoadKey r;
810 if (DEBUGLEVEL >= 10)
811 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey, &r);
813 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_UNLOADKEY, &r);
815 if (!NT_STATUS_IS_OK(status)) {
819 if (DEBUGLEVEL >= 10)
820 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, &r);
822 if (NT_STATUS_IS_ERR(status)) {
826 /* Return variables */
829 return werror_to_ntstatus(r.out.result);
832 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)
834 struct winreg_InitiateSystemShutdown r;
838 r.in.hostname = hostname;
839 r.in.message = message;
840 r.in.timeout = timeout;
841 r.in.force_apps = force_apps;
842 r.in.reboot = reboot;
844 if (DEBUGLEVEL >= 10)
845 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, &r);
847 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_INITIATESYSTEMSHUTDOWN, &r);
849 if (!NT_STATUS_IS_OK(status)) {
853 if (DEBUGLEVEL >= 10)
854 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, &r);
856 if (NT_STATUS_IS_ERR(status)) {
860 /* Return variables */
863 return werror_to_ntstatus(r.out.result);
866 NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server)
868 struct winreg_AbortSystemShutdown r;
872 r.in.server = server;
874 if (DEBUGLEVEL >= 10)
875 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown, &r);
877 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_ABORTSYSTEMSHUTDOWN, &r);
879 if (!NT_STATUS_IS_OK(status)) {
883 if (DEBUGLEVEL >= 10)
884 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, &r);
886 if (NT_STATUS_IS_ERR(status)) {
890 /* Return variables */
893 return werror_to_ntstatus(r.out.result);
896 NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *version)
898 struct winreg_GetVersion r;
902 r.in.handle = handle;
904 if (DEBUGLEVEL >= 10)
905 NDR_PRINT_IN_DEBUG(winreg_GetVersion, &r);
907 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_GETVERSION, &r);
909 if (!NT_STATUS_IS_OK(status)) {
913 if (DEBUGLEVEL >= 10)
914 NDR_PRINT_OUT_DEBUG(winreg_GetVersion, &r);
916 if (NT_STATUS_IS_ERR(status)) {
920 /* Return variables */
921 *version = *r.out.version;
924 return werror_to_ntstatus(r.out.result);
927 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)
929 struct winreg_OpenHKCC r;
933 r.in.system_name = system_name;
934 r.in.access_mask = access_mask;
936 if (DEBUGLEVEL >= 10)
937 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &r);
939 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_OPENHKCC, &r);
941 if (!NT_STATUS_IS_OK(status)) {
945 if (DEBUGLEVEL >= 10)
946 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, &r);
948 if (NT_STATUS_IS_ERR(status)) {
952 /* Return variables */
953 *handle = *r.out.handle;
956 return werror_to_ntstatus(r.out.result);
959 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)
961 struct winreg_OpenHKDD r;
965 r.in.system_name = system_name;
966 r.in.access_mask = access_mask;
968 if (DEBUGLEVEL >= 10)
969 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &r);
971 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_OPENHKDD, &r);
973 if (!NT_STATUS_IS_OK(status)) {
977 if (DEBUGLEVEL >= 10)
978 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, &r);
980 if (NT_STATUS_IS_ERR(status)) {
984 /* Return variables */
985 *handle = *r.out.handle;
988 return werror_to_ntstatus(r.out.result);
991 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)
993 struct winreg_QueryMultipleValues r;
997 r.in.key_handle = key_handle;
998 r.in.values = values;
999 r.in.num_values = num_values;
1000 r.in.buffer = buffer;
1001 r.in.buffer_size = buffer_size;
1003 if (DEBUGLEVEL >= 10)
1004 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues, &r);
1006 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_QUERYMULTIPLEVALUES, &r);
1008 if (!NT_STATUS_IS_OK(status)) {
1012 if (DEBUGLEVEL >= 10)
1013 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, &r);
1015 if (NT_STATUS_IS_ERR(status)) {
1019 /* Return variables */
1020 memcpy(values, r.out.values, r.in.num_values);
1021 if (buffer && r.out.buffer) {
1022 memcpy(buffer, r.out.buffer, *r.in.buffer_size);
1024 *buffer_size = *r.out.buffer_size;
1027 return werror_to_ntstatus(r.out.result);
1030 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)
1032 struct winreg_InitiateSystemShutdownEx r;
1036 r.in.hostname = hostname;
1037 r.in.message = message;
1038 r.in.timeout = timeout;
1039 r.in.force_apps = force_apps;
1040 r.in.reboot = reboot;
1041 r.in.reason = reason;
1043 if (DEBUGLEVEL >= 10)
1044 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1046 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_INITIATESYSTEMSHUTDOWNEX, &r);
1048 if (!NT_STATUS_IS_OK(status)) {
1052 if (DEBUGLEVEL >= 10)
1053 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, &r);
1055 if (NT_STATUS_IS_ERR(status)) {
1059 /* Return variables */
1062 return werror_to_ntstatus(r.out.result);
1065 NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1067 struct winreg_SaveKeyEx r;
1072 if (DEBUGLEVEL >= 10)
1073 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx, &r);
1075 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_SAVEKEYEX, &r);
1077 if (!NT_STATUS_IS_OK(status)) {
1081 if (DEBUGLEVEL >= 10)
1082 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, &r);
1084 if (NT_STATUS_IS_ERR(status)) {
1088 /* Return variables */
1091 return werror_to_ntstatus(r.out.result);
1094 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)
1096 struct winreg_OpenHKPT r;
1100 r.in.system_name = system_name;
1101 r.in.access_mask = access_mask;
1103 if (DEBUGLEVEL >= 10)
1104 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &r);
1106 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_OPENHKPT, &r);
1108 if (!NT_STATUS_IS_OK(status)) {
1112 if (DEBUGLEVEL >= 10)
1113 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, &r);
1115 if (NT_STATUS_IS_ERR(status)) {
1119 /* Return variables */
1120 *handle = *r.out.handle;
1123 return werror_to_ntstatus(r.out.result);
1126 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)
1128 struct winreg_OpenHKPN r;
1132 r.in.system_name = system_name;
1133 r.in.access_mask = access_mask;
1135 if (DEBUGLEVEL >= 10)
1136 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &r);
1138 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_OPENHKPN, &r);
1140 if (!NT_STATUS_IS_OK(status)) {
1144 if (DEBUGLEVEL >= 10)
1145 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, &r);
1147 if (NT_STATUS_IS_ERR(status)) {
1151 /* Return variables */
1152 *handle = *r.out.handle;
1155 return werror_to_ntstatus(r.out.result);
1158 NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1160 struct winreg_QueryMultipleValues2 r;
1165 if (DEBUGLEVEL >= 10)
1166 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, &r);
1168 status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, &ndr_table_winreg, NDR_WINREG_QUERYMULTIPLEVALUES2, &r);
1170 if (!NT_STATUS_IS_OK(status)) {
1174 if (DEBUGLEVEL >= 10)
1175 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, &r);
1177 if (NT_STATUS_IS_ERR(status)) {
1181 /* Return variables */
1184 return werror_to_ntstatus(r.out.result);