2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_winreg.h"
9 struct rpccli_winreg_OpenHKCR_state
{
10 struct winreg_OpenHKCR orig
;
11 struct winreg_OpenHKCR tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_winreg_OpenHKCR_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_winreg_OpenHKCR_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 uint16_t *_system_name
/* [in] [unique] */,
22 uint32_t _access_mask
/* [in] */,
23 struct policy_handle
*_handle
/* [out] [ref] */)
25 struct tevent_req
*req
;
26 struct rpccli_winreg_OpenHKCR_state
*state
;
27 struct tevent_req
*subreq
;
29 req
= tevent_req_create(mem_ctx
, &state
,
30 struct rpccli_winreg_OpenHKCR_state
);
34 state
->out_mem_ctx
= NULL
;
35 state
->dispatch_recv
= cli
->dispatch_recv
;
38 state
->orig
.in
.system_name
= _system_name
;
39 state
->orig
.in
.access_mask
= _access_mask
;
42 state
->orig
.out
.handle
= _handle
;
45 ZERO_STRUCT(state
->orig
.out
.result
);
47 if (DEBUGLEVEL
>= 10) {
48 NDR_PRINT_IN_DEBUG(winreg_OpenHKCR
, &state
->orig
);
51 state
->out_mem_ctx
= talloc_named_const(state
, 0,
52 "rpccli_winreg_OpenHKCR_out_memory");
53 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
54 return tevent_req_post(req
, ev
);
57 /* make a temporary copy, that we pass to the dispatch function */
58 state
->tmp
= state
->orig
;
60 subreq
= cli
->dispatch_send(state
, ev
, cli
,
64 if (tevent_req_nomem(subreq
, req
)) {
65 return tevent_req_post(req
, ev
);
67 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKCR_done
, req
);
71 static void rpccli_winreg_OpenHKCR_done(struct tevent_req
*subreq
)
73 struct tevent_req
*req
= tevent_req_callback_data(
74 subreq
, struct tevent_req
);
75 struct rpccli_winreg_OpenHKCR_state
*state
= tevent_req_data(
76 req
, struct rpccli_winreg_OpenHKCR_state
);
80 if (state
->out_mem_ctx
) {
81 mem_ctx
= state
->out_mem_ctx
;
86 status
= state
->dispatch_recv(subreq
, mem_ctx
);
88 if (!NT_STATUS_IS_OK(status
)) {
89 tevent_req_nterror(req
, status
);
93 /* Copy out parameters */
94 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
97 state
->orig
.out
.result
= state
->tmp
.out
.result
;
99 /* Reset temporary structure */
100 ZERO_STRUCT(state
->tmp
);
102 if (DEBUGLEVEL
>= 10) {
103 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR
, &state
->orig
);
106 tevent_req_done(req
);
109 NTSTATUS
rpccli_winreg_OpenHKCR_recv(struct tevent_req
*req
,
113 struct rpccli_winreg_OpenHKCR_state
*state
= tevent_req_data(
114 req
, struct rpccli_winreg_OpenHKCR_state
);
117 if (tevent_req_is_nterror(req
, &status
)) {
118 tevent_req_received(req
);
122 /* Steal possbile out parameters to the callers context */
123 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
126 *result
= state
->orig
.out
.result
;
128 tevent_req_received(req
);
132 NTSTATUS
rpccli_winreg_OpenHKCR(struct rpc_pipe_client
*cli
,
134 uint16_t *system_name
/* [in] [unique] */,
135 uint32_t access_mask
/* [in] */,
136 struct policy_handle
*handle
/* [out] [ref] */,
139 struct winreg_OpenHKCR 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_OpenHKCR
, &r
);
150 status
= cli
->dispatch(cli
,
156 if (!NT_STATUS_IS_OK(status
)) {
160 if (DEBUGLEVEL
>= 10) {
161 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR
, &r
);
164 if (NT_STATUS_IS_ERR(status
)) {
168 /* Return variables */
169 *handle
= *r
.out
.handle
;
173 *werror
= r
.out
.result
;
176 return werror_to_ntstatus(r
.out
.result
);
179 struct rpccli_winreg_OpenHKCU_state
{
180 struct winreg_OpenHKCU orig
;
181 struct winreg_OpenHKCU tmp
;
182 TALLOC_CTX
*out_mem_ctx
;
183 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
186 static void rpccli_winreg_OpenHKCU_done(struct tevent_req
*subreq
);
188 struct tevent_req
*rpccli_winreg_OpenHKCU_send(TALLOC_CTX
*mem_ctx
,
189 struct tevent_context
*ev
,
190 struct rpc_pipe_client
*cli
,
191 uint16_t *_system_name
/* [in] [unique] */,
192 uint32_t _access_mask
/* [in] */,
193 struct policy_handle
*_handle
/* [out] [ref] */)
195 struct tevent_req
*req
;
196 struct rpccli_winreg_OpenHKCU_state
*state
;
197 struct tevent_req
*subreq
;
199 req
= tevent_req_create(mem_ctx
, &state
,
200 struct rpccli_winreg_OpenHKCU_state
);
204 state
->out_mem_ctx
= NULL
;
205 state
->dispatch_recv
= cli
->dispatch_recv
;
208 state
->orig
.in
.system_name
= _system_name
;
209 state
->orig
.in
.access_mask
= _access_mask
;
212 state
->orig
.out
.handle
= _handle
;
215 ZERO_STRUCT(state
->orig
.out
.result
);
217 if (DEBUGLEVEL
>= 10) {
218 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU
, &state
->orig
);
221 state
->out_mem_ctx
= talloc_named_const(state
, 0,
222 "rpccli_winreg_OpenHKCU_out_memory");
223 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
224 return tevent_req_post(req
, ev
);
227 /* make a temporary copy, that we pass to the dispatch function */
228 state
->tmp
= state
->orig
;
230 subreq
= cli
->dispatch_send(state
, ev
, cli
,
234 if (tevent_req_nomem(subreq
, req
)) {
235 return tevent_req_post(req
, ev
);
237 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKCU_done
, req
);
241 static void rpccli_winreg_OpenHKCU_done(struct tevent_req
*subreq
)
243 struct tevent_req
*req
= tevent_req_callback_data(
244 subreq
, struct tevent_req
);
245 struct rpccli_winreg_OpenHKCU_state
*state
= tevent_req_data(
246 req
, struct rpccli_winreg_OpenHKCU_state
);
250 if (state
->out_mem_ctx
) {
251 mem_ctx
= state
->out_mem_ctx
;
256 status
= state
->dispatch_recv(subreq
, mem_ctx
);
258 if (!NT_STATUS_IS_OK(status
)) {
259 tevent_req_nterror(req
, status
);
263 /* Copy out parameters */
264 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
267 state
->orig
.out
.result
= state
->tmp
.out
.result
;
269 /* Reset temporary structure */
270 ZERO_STRUCT(state
->tmp
);
272 if (DEBUGLEVEL
>= 10) {
273 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU
, &state
->orig
);
276 tevent_req_done(req
);
279 NTSTATUS
rpccli_winreg_OpenHKCU_recv(struct tevent_req
*req
,
283 struct rpccli_winreg_OpenHKCU_state
*state
= tevent_req_data(
284 req
, struct rpccli_winreg_OpenHKCU_state
);
287 if (tevent_req_is_nterror(req
, &status
)) {
288 tevent_req_received(req
);
292 /* Steal possbile out parameters to the callers context */
293 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
296 *result
= state
->orig
.out
.result
;
298 tevent_req_received(req
);
302 NTSTATUS
rpccli_winreg_OpenHKCU(struct rpc_pipe_client
*cli
,
304 uint16_t *system_name
/* [in] [unique] */,
305 uint32_t access_mask
/* [in] */,
306 struct policy_handle
*handle
/* [out] [ref] */,
309 struct winreg_OpenHKCU r
;
313 r
.in
.system_name
= system_name
;
314 r
.in
.access_mask
= access_mask
;
316 if (DEBUGLEVEL
>= 10) {
317 NDR_PRINT_IN_DEBUG(winreg_OpenHKCU
, &r
);
320 status
= cli
->dispatch(cli
,
326 if (!NT_STATUS_IS_OK(status
)) {
330 if (DEBUGLEVEL
>= 10) {
331 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU
, &r
);
334 if (NT_STATUS_IS_ERR(status
)) {
338 /* Return variables */
339 *handle
= *r
.out
.handle
;
343 *werror
= r
.out
.result
;
346 return werror_to_ntstatus(r
.out
.result
);
349 struct rpccli_winreg_OpenHKLM_state
{
350 struct winreg_OpenHKLM orig
;
351 struct winreg_OpenHKLM tmp
;
352 TALLOC_CTX
*out_mem_ctx
;
353 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
356 static void rpccli_winreg_OpenHKLM_done(struct tevent_req
*subreq
);
358 struct tevent_req
*rpccli_winreg_OpenHKLM_send(TALLOC_CTX
*mem_ctx
,
359 struct tevent_context
*ev
,
360 struct rpc_pipe_client
*cli
,
361 uint16_t *_system_name
/* [in] [unique] */,
362 uint32_t _access_mask
/* [in] */,
363 struct policy_handle
*_handle
/* [out] [ref] */)
365 struct tevent_req
*req
;
366 struct rpccli_winreg_OpenHKLM_state
*state
;
367 struct tevent_req
*subreq
;
369 req
= tevent_req_create(mem_ctx
, &state
,
370 struct rpccli_winreg_OpenHKLM_state
);
374 state
->out_mem_ctx
= NULL
;
375 state
->dispatch_recv
= cli
->dispatch_recv
;
378 state
->orig
.in
.system_name
= _system_name
;
379 state
->orig
.in
.access_mask
= _access_mask
;
382 state
->orig
.out
.handle
= _handle
;
385 ZERO_STRUCT(state
->orig
.out
.result
);
387 if (DEBUGLEVEL
>= 10) {
388 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM
, &state
->orig
);
391 state
->out_mem_ctx
= talloc_named_const(state
, 0,
392 "rpccli_winreg_OpenHKLM_out_memory");
393 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
394 return tevent_req_post(req
, ev
);
397 /* make a temporary copy, that we pass to the dispatch function */
398 state
->tmp
= state
->orig
;
400 subreq
= cli
->dispatch_send(state
, ev
, cli
,
404 if (tevent_req_nomem(subreq
, req
)) {
405 return tevent_req_post(req
, ev
);
407 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKLM_done
, req
);
411 static void rpccli_winreg_OpenHKLM_done(struct tevent_req
*subreq
)
413 struct tevent_req
*req
= tevent_req_callback_data(
414 subreq
, struct tevent_req
);
415 struct rpccli_winreg_OpenHKLM_state
*state
= tevent_req_data(
416 req
, struct rpccli_winreg_OpenHKLM_state
);
420 if (state
->out_mem_ctx
) {
421 mem_ctx
= state
->out_mem_ctx
;
426 status
= state
->dispatch_recv(subreq
, mem_ctx
);
428 if (!NT_STATUS_IS_OK(status
)) {
429 tevent_req_nterror(req
, status
);
433 /* Copy out parameters */
434 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
437 state
->orig
.out
.result
= state
->tmp
.out
.result
;
439 /* Reset temporary structure */
440 ZERO_STRUCT(state
->tmp
);
442 if (DEBUGLEVEL
>= 10) {
443 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM
, &state
->orig
);
446 tevent_req_done(req
);
449 NTSTATUS
rpccli_winreg_OpenHKLM_recv(struct tevent_req
*req
,
453 struct rpccli_winreg_OpenHKLM_state
*state
= tevent_req_data(
454 req
, struct rpccli_winreg_OpenHKLM_state
);
457 if (tevent_req_is_nterror(req
, &status
)) {
458 tevent_req_received(req
);
462 /* Steal possbile out parameters to the callers context */
463 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
466 *result
= state
->orig
.out
.result
;
468 tevent_req_received(req
);
472 NTSTATUS
rpccli_winreg_OpenHKLM(struct rpc_pipe_client
*cli
,
474 uint16_t *system_name
/* [in] [unique] */,
475 uint32_t access_mask
/* [in] */,
476 struct policy_handle
*handle
/* [out] [ref] */,
479 struct winreg_OpenHKLM r
;
483 r
.in
.system_name
= system_name
;
484 r
.in
.access_mask
= access_mask
;
486 if (DEBUGLEVEL
>= 10) {
487 NDR_PRINT_IN_DEBUG(winreg_OpenHKLM
, &r
);
490 status
= cli
->dispatch(cli
,
496 if (!NT_STATUS_IS_OK(status
)) {
500 if (DEBUGLEVEL
>= 10) {
501 NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM
, &r
);
504 if (NT_STATUS_IS_ERR(status
)) {
508 /* Return variables */
509 *handle
= *r
.out
.handle
;
513 *werror
= r
.out
.result
;
516 return werror_to_ntstatus(r
.out
.result
);
519 struct rpccli_winreg_OpenHKPD_state
{
520 struct winreg_OpenHKPD orig
;
521 struct winreg_OpenHKPD tmp
;
522 TALLOC_CTX
*out_mem_ctx
;
523 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
526 static void rpccli_winreg_OpenHKPD_done(struct tevent_req
*subreq
);
528 struct tevent_req
*rpccli_winreg_OpenHKPD_send(TALLOC_CTX
*mem_ctx
,
529 struct tevent_context
*ev
,
530 struct rpc_pipe_client
*cli
,
531 uint16_t *_system_name
/* [in] [unique] */,
532 uint32_t _access_mask
/* [in] */,
533 struct policy_handle
*_handle
/* [out] [ref] */)
535 struct tevent_req
*req
;
536 struct rpccli_winreg_OpenHKPD_state
*state
;
537 struct tevent_req
*subreq
;
539 req
= tevent_req_create(mem_ctx
, &state
,
540 struct rpccli_winreg_OpenHKPD_state
);
544 state
->out_mem_ctx
= NULL
;
545 state
->dispatch_recv
= cli
->dispatch_recv
;
548 state
->orig
.in
.system_name
= _system_name
;
549 state
->orig
.in
.access_mask
= _access_mask
;
552 state
->orig
.out
.handle
= _handle
;
555 ZERO_STRUCT(state
->orig
.out
.result
);
557 if (DEBUGLEVEL
>= 10) {
558 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD
, &state
->orig
);
561 state
->out_mem_ctx
= talloc_named_const(state
, 0,
562 "rpccli_winreg_OpenHKPD_out_memory");
563 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
564 return tevent_req_post(req
, ev
);
567 /* make a temporary copy, that we pass to the dispatch function */
568 state
->tmp
= state
->orig
;
570 subreq
= cli
->dispatch_send(state
, ev
, cli
,
574 if (tevent_req_nomem(subreq
, req
)) {
575 return tevent_req_post(req
, ev
);
577 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKPD_done
, req
);
581 static void rpccli_winreg_OpenHKPD_done(struct tevent_req
*subreq
)
583 struct tevent_req
*req
= tevent_req_callback_data(
584 subreq
, struct tevent_req
);
585 struct rpccli_winreg_OpenHKPD_state
*state
= tevent_req_data(
586 req
, struct rpccli_winreg_OpenHKPD_state
);
590 if (state
->out_mem_ctx
) {
591 mem_ctx
= state
->out_mem_ctx
;
596 status
= state
->dispatch_recv(subreq
, mem_ctx
);
598 if (!NT_STATUS_IS_OK(status
)) {
599 tevent_req_nterror(req
, status
);
603 /* Copy out parameters */
604 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
607 state
->orig
.out
.result
= state
->tmp
.out
.result
;
609 /* Reset temporary structure */
610 ZERO_STRUCT(state
->tmp
);
612 if (DEBUGLEVEL
>= 10) {
613 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD
, &state
->orig
);
616 tevent_req_done(req
);
619 NTSTATUS
rpccli_winreg_OpenHKPD_recv(struct tevent_req
*req
,
623 struct rpccli_winreg_OpenHKPD_state
*state
= tevent_req_data(
624 req
, struct rpccli_winreg_OpenHKPD_state
);
627 if (tevent_req_is_nterror(req
, &status
)) {
628 tevent_req_received(req
);
632 /* Steal possbile out parameters to the callers context */
633 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
636 *result
= state
->orig
.out
.result
;
638 tevent_req_received(req
);
642 NTSTATUS
rpccli_winreg_OpenHKPD(struct rpc_pipe_client
*cli
,
644 uint16_t *system_name
/* [in] [unique] */,
645 uint32_t access_mask
/* [in] */,
646 struct policy_handle
*handle
/* [out] [ref] */,
649 struct winreg_OpenHKPD r
;
653 r
.in
.system_name
= system_name
;
654 r
.in
.access_mask
= access_mask
;
656 if (DEBUGLEVEL
>= 10) {
657 NDR_PRINT_IN_DEBUG(winreg_OpenHKPD
, &r
);
660 status
= cli
->dispatch(cli
,
666 if (!NT_STATUS_IS_OK(status
)) {
670 if (DEBUGLEVEL
>= 10) {
671 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD
, &r
);
674 if (NT_STATUS_IS_ERR(status
)) {
678 /* Return variables */
679 *handle
= *r
.out
.handle
;
683 *werror
= r
.out
.result
;
686 return werror_to_ntstatus(r
.out
.result
);
689 struct rpccli_winreg_OpenHKU_state
{
690 struct winreg_OpenHKU orig
;
691 struct winreg_OpenHKU tmp
;
692 TALLOC_CTX
*out_mem_ctx
;
693 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
696 static void rpccli_winreg_OpenHKU_done(struct tevent_req
*subreq
);
698 struct tevent_req
*rpccli_winreg_OpenHKU_send(TALLOC_CTX
*mem_ctx
,
699 struct tevent_context
*ev
,
700 struct rpc_pipe_client
*cli
,
701 uint16_t *_system_name
/* [in] [unique] */,
702 uint32_t _access_mask
/* [in] */,
703 struct policy_handle
*_handle
/* [out] [ref] */)
705 struct tevent_req
*req
;
706 struct rpccli_winreg_OpenHKU_state
*state
;
707 struct tevent_req
*subreq
;
709 req
= tevent_req_create(mem_ctx
, &state
,
710 struct rpccli_winreg_OpenHKU_state
);
714 state
->out_mem_ctx
= NULL
;
715 state
->dispatch_recv
= cli
->dispatch_recv
;
718 state
->orig
.in
.system_name
= _system_name
;
719 state
->orig
.in
.access_mask
= _access_mask
;
722 state
->orig
.out
.handle
= _handle
;
725 ZERO_STRUCT(state
->orig
.out
.result
);
727 if (DEBUGLEVEL
>= 10) {
728 NDR_PRINT_IN_DEBUG(winreg_OpenHKU
, &state
->orig
);
731 state
->out_mem_ctx
= talloc_named_const(state
, 0,
732 "rpccli_winreg_OpenHKU_out_memory");
733 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
734 return tevent_req_post(req
, ev
);
737 /* make a temporary copy, that we pass to the dispatch function */
738 state
->tmp
= state
->orig
;
740 subreq
= cli
->dispatch_send(state
, ev
, cli
,
744 if (tevent_req_nomem(subreq
, req
)) {
745 return tevent_req_post(req
, ev
);
747 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKU_done
, req
);
751 static void rpccli_winreg_OpenHKU_done(struct tevent_req
*subreq
)
753 struct tevent_req
*req
= tevent_req_callback_data(
754 subreq
, struct tevent_req
);
755 struct rpccli_winreg_OpenHKU_state
*state
= tevent_req_data(
756 req
, struct rpccli_winreg_OpenHKU_state
);
760 if (state
->out_mem_ctx
) {
761 mem_ctx
= state
->out_mem_ctx
;
766 status
= state
->dispatch_recv(subreq
, mem_ctx
);
768 if (!NT_STATUS_IS_OK(status
)) {
769 tevent_req_nterror(req
, status
);
773 /* Copy out parameters */
774 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
777 state
->orig
.out
.result
= state
->tmp
.out
.result
;
779 /* Reset temporary structure */
780 ZERO_STRUCT(state
->tmp
);
782 if (DEBUGLEVEL
>= 10) {
783 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU
, &state
->orig
);
786 tevent_req_done(req
);
789 NTSTATUS
rpccli_winreg_OpenHKU_recv(struct tevent_req
*req
,
793 struct rpccli_winreg_OpenHKU_state
*state
= tevent_req_data(
794 req
, struct rpccli_winreg_OpenHKU_state
);
797 if (tevent_req_is_nterror(req
, &status
)) {
798 tevent_req_received(req
);
802 /* Steal possbile out parameters to the callers context */
803 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
806 *result
= state
->orig
.out
.result
;
808 tevent_req_received(req
);
812 NTSTATUS
rpccli_winreg_OpenHKU(struct rpc_pipe_client
*cli
,
814 uint16_t *system_name
/* [in] [unique] */,
815 uint32_t access_mask
/* [in] */,
816 struct policy_handle
*handle
/* [out] [ref] */,
819 struct winreg_OpenHKU r
;
823 r
.in
.system_name
= system_name
;
824 r
.in
.access_mask
= access_mask
;
826 if (DEBUGLEVEL
>= 10) {
827 NDR_PRINT_IN_DEBUG(winreg_OpenHKU
, &r
);
830 status
= cli
->dispatch(cli
,
836 if (!NT_STATUS_IS_OK(status
)) {
840 if (DEBUGLEVEL
>= 10) {
841 NDR_PRINT_OUT_DEBUG(winreg_OpenHKU
, &r
);
844 if (NT_STATUS_IS_ERR(status
)) {
848 /* Return variables */
849 *handle
= *r
.out
.handle
;
853 *werror
= r
.out
.result
;
856 return werror_to_ntstatus(r
.out
.result
);
859 struct rpccli_winreg_CloseKey_state
{
860 struct winreg_CloseKey orig
;
861 struct winreg_CloseKey tmp
;
862 TALLOC_CTX
*out_mem_ctx
;
863 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
866 static void rpccli_winreg_CloseKey_done(struct tevent_req
*subreq
);
868 struct tevent_req
*rpccli_winreg_CloseKey_send(TALLOC_CTX
*mem_ctx
,
869 struct tevent_context
*ev
,
870 struct rpc_pipe_client
*cli
,
871 struct policy_handle
*_handle
/* [in,out] [ref] */)
873 struct tevent_req
*req
;
874 struct rpccli_winreg_CloseKey_state
*state
;
875 struct tevent_req
*subreq
;
877 req
= tevent_req_create(mem_ctx
, &state
,
878 struct rpccli_winreg_CloseKey_state
);
882 state
->out_mem_ctx
= NULL
;
883 state
->dispatch_recv
= cli
->dispatch_recv
;
886 state
->orig
.in
.handle
= _handle
;
889 state
->orig
.out
.handle
= _handle
;
892 ZERO_STRUCT(state
->orig
.out
.result
);
894 if (DEBUGLEVEL
>= 10) {
895 NDR_PRINT_IN_DEBUG(winreg_CloseKey
, &state
->orig
);
898 state
->out_mem_ctx
= talloc_named_const(state
, 0,
899 "rpccli_winreg_CloseKey_out_memory");
900 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
901 return tevent_req_post(req
, ev
);
904 /* make a temporary copy, that we pass to the dispatch function */
905 state
->tmp
= state
->orig
;
907 subreq
= cli
->dispatch_send(state
, ev
, cli
,
911 if (tevent_req_nomem(subreq
, req
)) {
912 return tevent_req_post(req
, ev
);
914 tevent_req_set_callback(subreq
, rpccli_winreg_CloseKey_done
, req
);
918 static void rpccli_winreg_CloseKey_done(struct tevent_req
*subreq
)
920 struct tevent_req
*req
= tevent_req_callback_data(
921 subreq
, struct tevent_req
);
922 struct rpccli_winreg_CloseKey_state
*state
= tevent_req_data(
923 req
, struct rpccli_winreg_CloseKey_state
);
927 if (state
->out_mem_ctx
) {
928 mem_ctx
= state
->out_mem_ctx
;
933 status
= state
->dispatch_recv(subreq
, mem_ctx
);
935 if (!NT_STATUS_IS_OK(status
)) {
936 tevent_req_nterror(req
, status
);
940 /* Copy out parameters */
941 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
944 state
->orig
.out
.result
= state
->tmp
.out
.result
;
946 /* Reset temporary structure */
947 ZERO_STRUCT(state
->tmp
);
949 if (DEBUGLEVEL
>= 10) {
950 NDR_PRINT_OUT_DEBUG(winreg_CloseKey
, &state
->orig
);
953 tevent_req_done(req
);
956 NTSTATUS
rpccli_winreg_CloseKey_recv(struct tevent_req
*req
,
960 struct rpccli_winreg_CloseKey_state
*state
= tevent_req_data(
961 req
, struct rpccli_winreg_CloseKey_state
);
964 if (tevent_req_is_nterror(req
, &status
)) {
965 tevent_req_received(req
);
969 /* Steal possbile out parameters to the callers context */
970 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
973 *result
= state
->orig
.out
.result
;
975 tevent_req_received(req
);
979 NTSTATUS
rpccli_winreg_CloseKey(struct rpc_pipe_client
*cli
,
981 struct policy_handle
*handle
/* [in,out] [ref] */,
984 struct winreg_CloseKey r
;
988 r
.in
.handle
= handle
;
990 if (DEBUGLEVEL
>= 10) {
991 NDR_PRINT_IN_DEBUG(winreg_CloseKey
, &r
);
994 status
= cli
->dispatch(cli
,
1000 if (!NT_STATUS_IS_OK(status
)) {
1004 if (DEBUGLEVEL
>= 10) {
1005 NDR_PRINT_OUT_DEBUG(winreg_CloseKey
, &r
);
1008 if (NT_STATUS_IS_ERR(status
)) {
1012 /* Return variables */
1013 *handle
= *r
.out
.handle
;
1017 *werror
= r
.out
.result
;
1020 return werror_to_ntstatus(r
.out
.result
);
1023 struct rpccli_winreg_CreateKey_state
{
1024 struct winreg_CreateKey orig
;
1025 struct winreg_CreateKey tmp
;
1026 TALLOC_CTX
*out_mem_ctx
;
1027 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1030 static void rpccli_winreg_CreateKey_done(struct tevent_req
*subreq
);
1032 struct tevent_req
*rpccli_winreg_CreateKey_send(TALLOC_CTX
*mem_ctx
,
1033 struct tevent_context
*ev
,
1034 struct rpc_pipe_client
*cli
,
1035 struct policy_handle
*_handle
/* [in] [ref] */,
1036 struct winreg_String _name
/* [in] */,
1037 struct winreg_String _keyclass
/* [in] */,
1038 uint32_t _options
/* [in] */,
1039 uint32_t _access_mask
/* [in] */,
1040 struct winreg_SecBuf
*_secdesc
/* [in] [unique] */,
1041 struct policy_handle
*_new_handle
/* [out] [ref] */,
1042 enum winreg_CreateAction
*_action_taken
/* [in,out] [unique] */)
1044 struct tevent_req
*req
;
1045 struct rpccli_winreg_CreateKey_state
*state
;
1046 struct tevent_req
*subreq
;
1048 req
= tevent_req_create(mem_ctx
, &state
,
1049 struct rpccli_winreg_CreateKey_state
);
1053 state
->out_mem_ctx
= NULL
;
1054 state
->dispatch_recv
= cli
->dispatch_recv
;
1057 state
->orig
.in
.handle
= _handle
;
1058 state
->orig
.in
.name
= _name
;
1059 state
->orig
.in
.keyclass
= _keyclass
;
1060 state
->orig
.in
.options
= _options
;
1061 state
->orig
.in
.access_mask
= _access_mask
;
1062 state
->orig
.in
.secdesc
= _secdesc
;
1063 state
->orig
.in
.action_taken
= _action_taken
;
1065 /* Out parameters */
1066 state
->orig
.out
.new_handle
= _new_handle
;
1067 state
->orig
.out
.action_taken
= _action_taken
;
1070 ZERO_STRUCT(state
->orig
.out
.result
);
1072 if (DEBUGLEVEL
>= 10) {
1073 NDR_PRINT_IN_DEBUG(winreg_CreateKey
, &state
->orig
);
1076 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1077 "rpccli_winreg_CreateKey_out_memory");
1078 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1079 return tevent_req_post(req
, ev
);
1082 /* make a temporary copy, that we pass to the dispatch function */
1083 state
->tmp
= state
->orig
;
1085 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1087 NDR_WINREG_CREATEKEY
,
1089 if (tevent_req_nomem(subreq
, req
)) {
1090 return tevent_req_post(req
, ev
);
1092 tevent_req_set_callback(subreq
, rpccli_winreg_CreateKey_done
, req
);
1096 static void rpccli_winreg_CreateKey_done(struct tevent_req
*subreq
)
1098 struct tevent_req
*req
= tevent_req_callback_data(
1099 subreq
, struct tevent_req
);
1100 struct rpccli_winreg_CreateKey_state
*state
= tevent_req_data(
1101 req
, struct rpccli_winreg_CreateKey_state
);
1103 TALLOC_CTX
*mem_ctx
;
1105 if (state
->out_mem_ctx
) {
1106 mem_ctx
= state
->out_mem_ctx
;
1111 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1112 TALLOC_FREE(subreq
);
1113 if (!NT_STATUS_IS_OK(status
)) {
1114 tevent_req_nterror(req
, status
);
1118 /* Copy out parameters */
1119 *state
->orig
.out
.new_handle
= *state
->tmp
.out
.new_handle
;
1120 if (state
->orig
.out
.action_taken
&& state
->tmp
.out
.action_taken
) {
1121 *state
->orig
.out
.action_taken
= *state
->tmp
.out
.action_taken
;
1125 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1127 /* Reset temporary structure */
1128 ZERO_STRUCT(state
->tmp
);
1130 if (DEBUGLEVEL
>= 10) {
1131 NDR_PRINT_OUT_DEBUG(winreg_CreateKey
, &state
->orig
);
1134 tevent_req_done(req
);
1137 NTSTATUS
rpccli_winreg_CreateKey_recv(struct tevent_req
*req
,
1138 TALLOC_CTX
*mem_ctx
,
1141 struct rpccli_winreg_CreateKey_state
*state
= tevent_req_data(
1142 req
, struct rpccli_winreg_CreateKey_state
);
1145 if (tevent_req_is_nterror(req
, &status
)) {
1146 tevent_req_received(req
);
1150 /* Steal possbile out parameters to the callers context */
1151 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1154 *result
= state
->orig
.out
.result
;
1156 tevent_req_received(req
);
1157 return NT_STATUS_OK
;
1160 NTSTATUS
rpccli_winreg_CreateKey(struct rpc_pipe_client
*cli
,
1161 TALLOC_CTX
*mem_ctx
,
1162 struct policy_handle
*handle
/* [in] [ref] */,
1163 struct winreg_String name
/* [in] */,
1164 struct winreg_String keyclass
/* [in] */,
1165 uint32_t options
/* [in] */,
1166 uint32_t access_mask
/* [in] */,
1167 struct winreg_SecBuf
*secdesc
/* [in] [unique] */,
1168 struct policy_handle
*new_handle
/* [out] [ref] */,
1169 enum winreg_CreateAction
*action_taken
/* [in,out] [unique] */,
1172 struct winreg_CreateKey r
;
1176 r
.in
.handle
= handle
;
1178 r
.in
.keyclass
= keyclass
;
1179 r
.in
.options
= options
;
1180 r
.in
.access_mask
= access_mask
;
1181 r
.in
.secdesc
= secdesc
;
1182 r
.in
.action_taken
= action_taken
;
1184 if (DEBUGLEVEL
>= 10) {
1185 NDR_PRINT_IN_DEBUG(winreg_CreateKey
, &r
);
1188 status
= cli
->dispatch(cli
,
1191 NDR_WINREG_CREATEKEY
,
1194 if (!NT_STATUS_IS_OK(status
)) {
1198 if (DEBUGLEVEL
>= 10) {
1199 NDR_PRINT_OUT_DEBUG(winreg_CreateKey
, &r
);
1202 if (NT_STATUS_IS_ERR(status
)) {
1206 /* Return variables */
1207 *new_handle
= *r
.out
.new_handle
;
1208 if (action_taken
&& r
.out
.action_taken
) {
1209 *action_taken
= *r
.out
.action_taken
;
1214 *werror
= r
.out
.result
;
1217 return werror_to_ntstatus(r
.out
.result
);
1220 struct rpccli_winreg_DeleteKey_state
{
1221 struct winreg_DeleteKey orig
;
1222 struct winreg_DeleteKey tmp
;
1223 TALLOC_CTX
*out_mem_ctx
;
1224 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1227 static void rpccli_winreg_DeleteKey_done(struct tevent_req
*subreq
);
1229 struct tevent_req
*rpccli_winreg_DeleteKey_send(TALLOC_CTX
*mem_ctx
,
1230 struct tevent_context
*ev
,
1231 struct rpc_pipe_client
*cli
,
1232 struct policy_handle
*_handle
/* [in] [ref] */,
1233 struct winreg_String _key
/* [in] */)
1235 struct tevent_req
*req
;
1236 struct rpccli_winreg_DeleteKey_state
*state
;
1237 struct tevent_req
*subreq
;
1239 req
= tevent_req_create(mem_ctx
, &state
,
1240 struct rpccli_winreg_DeleteKey_state
);
1244 state
->out_mem_ctx
= NULL
;
1245 state
->dispatch_recv
= cli
->dispatch_recv
;
1248 state
->orig
.in
.handle
= _handle
;
1249 state
->orig
.in
.key
= _key
;
1251 /* Out parameters */
1254 ZERO_STRUCT(state
->orig
.out
.result
);
1256 if (DEBUGLEVEL
>= 10) {
1257 NDR_PRINT_IN_DEBUG(winreg_DeleteKey
, &state
->orig
);
1260 /* make a temporary copy, that we pass to the dispatch function */
1261 state
->tmp
= state
->orig
;
1263 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1265 NDR_WINREG_DELETEKEY
,
1267 if (tevent_req_nomem(subreq
, req
)) {
1268 return tevent_req_post(req
, ev
);
1270 tevent_req_set_callback(subreq
, rpccli_winreg_DeleteKey_done
, req
);
1274 static void rpccli_winreg_DeleteKey_done(struct tevent_req
*subreq
)
1276 struct tevent_req
*req
= tevent_req_callback_data(
1277 subreq
, struct tevent_req
);
1278 struct rpccli_winreg_DeleteKey_state
*state
= tevent_req_data(
1279 req
, struct rpccli_winreg_DeleteKey_state
);
1281 TALLOC_CTX
*mem_ctx
;
1283 if (state
->out_mem_ctx
) {
1284 mem_ctx
= state
->out_mem_ctx
;
1289 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1290 TALLOC_FREE(subreq
);
1291 if (!NT_STATUS_IS_OK(status
)) {
1292 tevent_req_nterror(req
, status
);
1296 /* Copy out parameters */
1299 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1301 /* Reset temporary structure */
1302 ZERO_STRUCT(state
->tmp
);
1304 if (DEBUGLEVEL
>= 10) {
1305 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey
, &state
->orig
);
1308 tevent_req_done(req
);
1311 NTSTATUS
rpccli_winreg_DeleteKey_recv(struct tevent_req
*req
,
1312 TALLOC_CTX
*mem_ctx
,
1315 struct rpccli_winreg_DeleteKey_state
*state
= tevent_req_data(
1316 req
, struct rpccli_winreg_DeleteKey_state
);
1319 if (tevent_req_is_nterror(req
, &status
)) {
1320 tevent_req_received(req
);
1324 /* Steal possbile out parameters to the callers context */
1325 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1328 *result
= state
->orig
.out
.result
;
1330 tevent_req_received(req
);
1331 return NT_STATUS_OK
;
1334 NTSTATUS
rpccli_winreg_DeleteKey(struct rpc_pipe_client
*cli
,
1335 TALLOC_CTX
*mem_ctx
,
1336 struct policy_handle
*handle
/* [in] [ref] */,
1337 struct winreg_String key
/* [in] */,
1340 struct winreg_DeleteKey r
;
1344 r
.in
.handle
= handle
;
1347 if (DEBUGLEVEL
>= 10) {
1348 NDR_PRINT_IN_DEBUG(winreg_DeleteKey
, &r
);
1351 status
= cli
->dispatch(cli
,
1354 NDR_WINREG_DELETEKEY
,
1357 if (!NT_STATUS_IS_OK(status
)) {
1361 if (DEBUGLEVEL
>= 10) {
1362 NDR_PRINT_OUT_DEBUG(winreg_DeleteKey
, &r
);
1365 if (NT_STATUS_IS_ERR(status
)) {
1369 /* Return variables */
1373 *werror
= r
.out
.result
;
1376 return werror_to_ntstatus(r
.out
.result
);
1379 struct rpccli_winreg_DeleteValue_state
{
1380 struct winreg_DeleteValue orig
;
1381 struct winreg_DeleteValue tmp
;
1382 TALLOC_CTX
*out_mem_ctx
;
1383 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1386 static void rpccli_winreg_DeleteValue_done(struct tevent_req
*subreq
);
1388 struct tevent_req
*rpccli_winreg_DeleteValue_send(TALLOC_CTX
*mem_ctx
,
1389 struct tevent_context
*ev
,
1390 struct rpc_pipe_client
*cli
,
1391 struct policy_handle
*_handle
/* [in] [ref] */,
1392 struct winreg_String _value
/* [in] */)
1394 struct tevent_req
*req
;
1395 struct rpccli_winreg_DeleteValue_state
*state
;
1396 struct tevent_req
*subreq
;
1398 req
= tevent_req_create(mem_ctx
, &state
,
1399 struct rpccli_winreg_DeleteValue_state
);
1403 state
->out_mem_ctx
= NULL
;
1404 state
->dispatch_recv
= cli
->dispatch_recv
;
1407 state
->orig
.in
.handle
= _handle
;
1408 state
->orig
.in
.value
= _value
;
1410 /* Out parameters */
1413 ZERO_STRUCT(state
->orig
.out
.result
);
1415 if (DEBUGLEVEL
>= 10) {
1416 NDR_PRINT_IN_DEBUG(winreg_DeleteValue
, &state
->orig
);
1419 /* make a temporary copy, that we pass to the dispatch function */
1420 state
->tmp
= state
->orig
;
1422 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1424 NDR_WINREG_DELETEVALUE
,
1426 if (tevent_req_nomem(subreq
, req
)) {
1427 return tevent_req_post(req
, ev
);
1429 tevent_req_set_callback(subreq
, rpccli_winreg_DeleteValue_done
, req
);
1433 static void rpccli_winreg_DeleteValue_done(struct tevent_req
*subreq
)
1435 struct tevent_req
*req
= tevent_req_callback_data(
1436 subreq
, struct tevent_req
);
1437 struct rpccli_winreg_DeleteValue_state
*state
= tevent_req_data(
1438 req
, struct rpccli_winreg_DeleteValue_state
);
1440 TALLOC_CTX
*mem_ctx
;
1442 if (state
->out_mem_ctx
) {
1443 mem_ctx
= state
->out_mem_ctx
;
1448 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1449 TALLOC_FREE(subreq
);
1450 if (!NT_STATUS_IS_OK(status
)) {
1451 tevent_req_nterror(req
, status
);
1455 /* Copy out parameters */
1458 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1460 /* Reset temporary structure */
1461 ZERO_STRUCT(state
->tmp
);
1463 if (DEBUGLEVEL
>= 10) {
1464 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue
, &state
->orig
);
1467 tevent_req_done(req
);
1470 NTSTATUS
rpccli_winreg_DeleteValue_recv(struct tevent_req
*req
,
1471 TALLOC_CTX
*mem_ctx
,
1474 struct rpccli_winreg_DeleteValue_state
*state
= tevent_req_data(
1475 req
, struct rpccli_winreg_DeleteValue_state
);
1478 if (tevent_req_is_nterror(req
, &status
)) {
1479 tevent_req_received(req
);
1483 /* Steal possbile out parameters to the callers context */
1484 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1487 *result
= state
->orig
.out
.result
;
1489 tevent_req_received(req
);
1490 return NT_STATUS_OK
;
1493 NTSTATUS
rpccli_winreg_DeleteValue(struct rpc_pipe_client
*cli
,
1494 TALLOC_CTX
*mem_ctx
,
1495 struct policy_handle
*handle
/* [in] [ref] */,
1496 struct winreg_String value
/* [in] */,
1499 struct winreg_DeleteValue r
;
1503 r
.in
.handle
= handle
;
1506 if (DEBUGLEVEL
>= 10) {
1507 NDR_PRINT_IN_DEBUG(winreg_DeleteValue
, &r
);
1510 status
= cli
->dispatch(cli
,
1513 NDR_WINREG_DELETEVALUE
,
1516 if (!NT_STATUS_IS_OK(status
)) {
1520 if (DEBUGLEVEL
>= 10) {
1521 NDR_PRINT_OUT_DEBUG(winreg_DeleteValue
, &r
);
1524 if (NT_STATUS_IS_ERR(status
)) {
1528 /* Return variables */
1532 *werror
= r
.out
.result
;
1535 return werror_to_ntstatus(r
.out
.result
);
1538 struct rpccli_winreg_EnumKey_state
{
1539 struct winreg_EnumKey orig
;
1540 struct winreg_EnumKey tmp
;
1541 TALLOC_CTX
*out_mem_ctx
;
1542 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1545 static void rpccli_winreg_EnumKey_done(struct tevent_req
*subreq
);
1547 struct tevent_req
*rpccli_winreg_EnumKey_send(TALLOC_CTX
*mem_ctx
,
1548 struct tevent_context
*ev
,
1549 struct rpc_pipe_client
*cli
,
1550 struct policy_handle
*_handle
/* [in] [ref] */,
1551 uint32_t _enum_index
/* [in] */,
1552 struct winreg_StringBuf
*_name
/* [in,out] [ref] */,
1553 struct winreg_StringBuf
*_keyclass
/* [in,out] [unique] */,
1554 NTTIME
*_last_changed_time
/* [in,out] [unique] */)
1556 struct tevent_req
*req
;
1557 struct rpccli_winreg_EnumKey_state
*state
;
1558 struct tevent_req
*subreq
;
1560 req
= tevent_req_create(mem_ctx
, &state
,
1561 struct rpccli_winreg_EnumKey_state
);
1565 state
->out_mem_ctx
= NULL
;
1566 state
->dispatch_recv
= cli
->dispatch_recv
;
1569 state
->orig
.in
.handle
= _handle
;
1570 state
->orig
.in
.enum_index
= _enum_index
;
1571 state
->orig
.in
.name
= _name
;
1572 state
->orig
.in
.keyclass
= _keyclass
;
1573 state
->orig
.in
.last_changed_time
= _last_changed_time
;
1575 /* Out parameters */
1576 state
->orig
.out
.name
= _name
;
1577 state
->orig
.out
.keyclass
= _keyclass
;
1578 state
->orig
.out
.last_changed_time
= _last_changed_time
;
1581 ZERO_STRUCT(state
->orig
.out
.result
);
1583 if (DEBUGLEVEL
>= 10) {
1584 NDR_PRINT_IN_DEBUG(winreg_EnumKey
, &state
->orig
);
1587 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1588 "rpccli_winreg_EnumKey_out_memory");
1589 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1590 return tevent_req_post(req
, ev
);
1593 /* make a temporary copy, that we pass to the dispatch function */
1594 state
->tmp
= state
->orig
;
1596 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1600 if (tevent_req_nomem(subreq
, req
)) {
1601 return tevent_req_post(req
, ev
);
1603 tevent_req_set_callback(subreq
, rpccli_winreg_EnumKey_done
, req
);
1607 static void rpccli_winreg_EnumKey_done(struct tevent_req
*subreq
)
1609 struct tevent_req
*req
= tevent_req_callback_data(
1610 subreq
, struct tevent_req
);
1611 struct rpccli_winreg_EnumKey_state
*state
= tevent_req_data(
1612 req
, struct rpccli_winreg_EnumKey_state
);
1614 TALLOC_CTX
*mem_ctx
;
1616 if (state
->out_mem_ctx
) {
1617 mem_ctx
= state
->out_mem_ctx
;
1622 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1623 TALLOC_FREE(subreq
);
1624 if (!NT_STATUS_IS_OK(status
)) {
1625 tevent_req_nterror(req
, status
);
1629 /* Copy out parameters */
1630 *state
->orig
.out
.name
= *state
->tmp
.out
.name
;
1631 if (state
->orig
.out
.keyclass
&& state
->tmp
.out
.keyclass
) {
1632 *state
->orig
.out
.keyclass
= *state
->tmp
.out
.keyclass
;
1634 if (state
->orig
.out
.last_changed_time
&& state
->tmp
.out
.last_changed_time
) {
1635 *state
->orig
.out
.last_changed_time
= *state
->tmp
.out
.last_changed_time
;
1639 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1641 /* Reset temporary structure */
1642 ZERO_STRUCT(state
->tmp
);
1644 if (DEBUGLEVEL
>= 10) {
1645 NDR_PRINT_OUT_DEBUG(winreg_EnumKey
, &state
->orig
);
1648 tevent_req_done(req
);
1651 NTSTATUS
rpccli_winreg_EnumKey_recv(struct tevent_req
*req
,
1652 TALLOC_CTX
*mem_ctx
,
1655 struct rpccli_winreg_EnumKey_state
*state
= tevent_req_data(
1656 req
, struct rpccli_winreg_EnumKey_state
);
1659 if (tevent_req_is_nterror(req
, &status
)) {
1660 tevent_req_received(req
);
1664 /* Steal possbile out parameters to the callers context */
1665 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1668 *result
= state
->orig
.out
.result
;
1670 tevent_req_received(req
);
1671 return NT_STATUS_OK
;
1674 NTSTATUS
rpccli_winreg_EnumKey(struct rpc_pipe_client
*cli
,
1675 TALLOC_CTX
*mem_ctx
,
1676 struct policy_handle
*handle
/* [in] [ref] */,
1677 uint32_t enum_index
/* [in] */,
1678 struct winreg_StringBuf
*name
/* [in,out] [ref] */,
1679 struct winreg_StringBuf
*keyclass
/* [in,out] [unique] */,
1680 NTTIME
*last_changed_time
/* [in,out] [unique] */,
1683 struct winreg_EnumKey r
;
1687 r
.in
.handle
= handle
;
1688 r
.in
.enum_index
= enum_index
;
1690 r
.in
.keyclass
= keyclass
;
1691 r
.in
.last_changed_time
= last_changed_time
;
1693 if (DEBUGLEVEL
>= 10) {
1694 NDR_PRINT_IN_DEBUG(winreg_EnumKey
, &r
);
1697 status
= cli
->dispatch(cli
,
1703 if (!NT_STATUS_IS_OK(status
)) {
1707 if (DEBUGLEVEL
>= 10) {
1708 NDR_PRINT_OUT_DEBUG(winreg_EnumKey
, &r
);
1711 if (NT_STATUS_IS_ERR(status
)) {
1715 /* Return variables */
1716 *name
= *r
.out
.name
;
1717 if (keyclass
&& r
.out
.keyclass
) {
1718 *keyclass
= *r
.out
.keyclass
;
1720 if (last_changed_time
&& r
.out
.last_changed_time
) {
1721 *last_changed_time
= *r
.out
.last_changed_time
;
1726 *werror
= r
.out
.result
;
1729 return werror_to_ntstatus(r
.out
.result
);
1732 struct rpccli_winreg_EnumValue_state
{
1733 struct winreg_EnumValue orig
;
1734 struct winreg_EnumValue tmp
;
1735 TALLOC_CTX
*out_mem_ctx
;
1736 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1739 static void rpccli_winreg_EnumValue_done(struct tevent_req
*subreq
);
1741 struct tevent_req
*rpccli_winreg_EnumValue_send(TALLOC_CTX
*mem_ctx
,
1742 struct tevent_context
*ev
,
1743 struct rpc_pipe_client
*cli
,
1744 struct policy_handle
*_handle
/* [in] [ref] */,
1745 uint32_t _enum_index
/* [in] */,
1746 struct winreg_ValNameBuf
*_name
/* [in,out] [ref] */,
1747 enum winreg_Type
*_type
/* [in,out] [unique] */,
1748 uint8_t *_value
/* [in,out] [unique,length_is(*length),size_is(*size)] */,
1749 uint32_t *_size
/* [in,out] [unique] */,
1750 uint32_t *_length
/* [in,out] [unique] */)
1752 struct tevent_req
*req
;
1753 struct rpccli_winreg_EnumValue_state
*state
;
1754 struct tevent_req
*subreq
;
1756 req
= tevent_req_create(mem_ctx
, &state
,
1757 struct rpccli_winreg_EnumValue_state
);
1761 state
->out_mem_ctx
= NULL
;
1762 state
->dispatch_recv
= cli
->dispatch_recv
;
1765 state
->orig
.in
.handle
= _handle
;
1766 state
->orig
.in
.enum_index
= _enum_index
;
1767 state
->orig
.in
.name
= _name
;
1768 state
->orig
.in
.type
= _type
;
1769 state
->orig
.in
.value
= _value
;
1770 state
->orig
.in
.size
= _size
;
1771 state
->orig
.in
.length
= _length
;
1773 /* Out parameters */
1774 state
->orig
.out
.name
= _name
;
1775 state
->orig
.out
.type
= _type
;
1776 state
->orig
.out
.value
= _value
;
1777 state
->orig
.out
.size
= _size
;
1778 state
->orig
.out
.length
= _length
;
1781 ZERO_STRUCT(state
->orig
.out
.result
);
1783 if (DEBUGLEVEL
>= 10) {
1784 NDR_PRINT_IN_DEBUG(winreg_EnumValue
, &state
->orig
);
1787 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1788 "rpccli_winreg_EnumValue_out_memory");
1789 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1790 return tevent_req_post(req
, ev
);
1793 /* make a temporary copy, that we pass to the dispatch function */
1794 state
->tmp
= state
->orig
;
1796 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1798 NDR_WINREG_ENUMVALUE
,
1800 if (tevent_req_nomem(subreq
, req
)) {
1801 return tevent_req_post(req
, ev
);
1803 tevent_req_set_callback(subreq
, rpccli_winreg_EnumValue_done
, req
);
1807 static void rpccli_winreg_EnumValue_done(struct tevent_req
*subreq
)
1809 struct tevent_req
*req
= tevent_req_callback_data(
1810 subreq
, struct tevent_req
);
1811 struct rpccli_winreg_EnumValue_state
*state
= tevent_req_data(
1812 req
, struct rpccli_winreg_EnumValue_state
);
1814 TALLOC_CTX
*mem_ctx
;
1816 if (state
->out_mem_ctx
) {
1817 mem_ctx
= state
->out_mem_ctx
;
1822 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1823 TALLOC_FREE(subreq
);
1824 if (!NT_STATUS_IS_OK(status
)) {
1825 tevent_req_nterror(req
, status
);
1829 /* Copy out parameters */
1830 *state
->orig
.out
.name
= *state
->tmp
.out
.name
;
1831 if (state
->orig
.out
.type
&& state
->tmp
.out
.type
) {
1832 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
1834 if (state
->orig
.out
.value
&& state
->tmp
.out
.value
) {
1835 memcpy(state
->orig
.out
.value
, state
->tmp
.out
.value
, *state
->tmp
.in
.size
* sizeof(*state
->orig
.out
.value
));
1837 if (state
->orig
.out
.size
&& state
->tmp
.out
.size
) {
1838 *state
->orig
.out
.size
= *state
->tmp
.out
.size
;
1840 if (state
->orig
.out
.length
&& state
->tmp
.out
.length
) {
1841 *state
->orig
.out
.length
= *state
->tmp
.out
.length
;
1845 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1847 /* Reset temporary structure */
1848 ZERO_STRUCT(state
->tmp
);
1850 if (DEBUGLEVEL
>= 10) {
1851 NDR_PRINT_OUT_DEBUG(winreg_EnumValue
, &state
->orig
);
1854 tevent_req_done(req
);
1857 NTSTATUS
rpccli_winreg_EnumValue_recv(struct tevent_req
*req
,
1858 TALLOC_CTX
*mem_ctx
,
1861 struct rpccli_winreg_EnumValue_state
*state
= tevent_req_data(
1862 req
, struct rpccli_winreg_EnumValue_state
);
1865 if (tevent_req_is_nterror(req
, &status
)) {
1866 tevent_req_received(req
);
1870 /* Steal possbile out parameters to the callers context */
1871 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1874 *result
= state
->orig
.out
.result
;
1876 tevent_req_received(req
);
1877 return NT_STATUS_OK
;
1880 NTSTATUS
rpccli_winreg_EnumValue(struct rpc_pipe_client
*cli
,
1881 TALLOC_CTX
*mem_ctx
,
1882 struct policy_handle
*handle
/* [in] [ref] */,
1883 uint32_t enum_index
/* [in] */,
1884 struct winreg_ValNameBuf
*name
/* [in,out] [ref] */,
1885 enum winreg_Type
*type
/* [in,out] [unique] */,
1886 uint8_t *value
/* [in,out] [unique,length_is(*length),size_is(*size)] */,
1887 uint32_t *size
/* [in,out] [unique] */,
1888 uint32_t *length
/* [in,out] [unique] */,
1891 struct winreg_EnumValue r
;
1895 r
.in
.handle
= handle
;
1896 r
.in
.enum_index
= enum_index
;
1901 r
.in
.length
= length
;
1903 if (DEBUGLEVEL
>= 10) {
1904 NDR_PRINT_IN_DEBUG(winreg_EnumValue
, &r
);
1907 status
= cli
->dispatch(cli
,
1910 NDR_WINREG_ENUMVALUE
,
1913 if (!NT_STATUS_IS_OK(status
)) {
1917 if (DEBUGLEVEL
>= 10) {
1918 NDR_PRINT_OUT_DEBUG(winreg_EnumValue
, &r
);
1921 if (NT_STATUS_IS_ERR(status
)) {
1925 /* Return variables */
1926 *name
= *r
.out
.name
;
1927 if (type
&& r
.out
.type
) {
1928 *type
= *r
.out
.type
;
1930 if (value
&& r
.out
.value
) {
1931 memcpy(value
, r
.out
.value
, *r
.in
.size
* sizeof(*value
));
1933 if (size
&& r
.out
.size
) {
1934 *size
= *r
.out
.size
;
1936 if (length
&& r
.out
.length
) {
1937 *length
= *r
.out
.length
;
1942 *werror
= r
.out
.result
;
1945 return werror_to_ntstatus(r
.out
.result
);
1948 struct rpccli_winreg_FlushKey_state
{
1949 struct winreg_FlushKey orig
;
1950 struct winreg_FlushKey tmp
;
1951 TALLOC_CTX
*out_mem_ctx
;
1952 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1955 static void rpccli_winreg_FlushKey_done(struct tevent_req
*subreq
);
1957 struct tevent_req
*rpccli_winreg_FlushKey_send(TALLOC_CTX
*mem_ctx
,
1958 struct tevent_context
*ev
,
1959 struct rpc_pipe_client
*cli
,
1960 struct policy_handle
*_handle
/* [in] [ref] */)
1962 struct tevent_req
*req
;
1963 struct rpccli_winreg_FlushKey_state
*state
;
1964 struct tevent_req
*subreq
;
1966 req
= tevent_req_create(mem_ctx
, &state
,
1967 struct rpccli_winreg_FlushKey_state
);
1971 state
->out_mem_ctx
= NULL
;
1972 state
->dispatch_recv
= cli
->dispatch_recv
;
1975 state
->orig
.in
.handle
= _handle
;
1977 /* Out parameters */
1980 ZERO_STRUCT(state
->orig
.out
.result
);
1982 if (DEBUGLEVEL
>= 10) {
1983 NDR_PRINT_IN_DEBUG(winreg_FlushKey
, &state
->orig
);
1986 /* make a temporary copy, that we pass to the dispatch function */
1987 state
->tmp
= state
->orig
;
1989 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1991 NDR_WINREG_FLUSHKEY
,
1993 if (tevent_req_nomem(subreq
, req
)) {
1994 return tevent_req_post(req
, ev
);
1996 tevent_req_set_callback(subreq
, rpccli_winreg_FlushKey_done
, req
);
2000 static void rpccli_winreg_FlushKey_done(struct tevent_req
*subreq
)
2002 struct tevent_req
*req
= tevent_req_callback_data(
2003 subreq
, struct tevent_req
);
2004 struct rpccli_winreg_FlushKey_state
*state
= tevent_req_data(
2005 req
, struct rpccli_winreg_FlushKey_state
);
2007 TALLOC_CTX
*mem_ctx
;
2009 if (state
->out_mem_ctx
) {
2010 mem_ctx
= state
->out_mem_ctx
;
2015 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2016 TALLOC_FREE(subreq
);
2017 if (!NT_STATUS_IS_OK(status
)) {
2018 tevent_req_nterror(req
, status
);
2022 /* Copy out parameters */
2025 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2027 /* Reset temporary structure */
2028 ZERO_STRUCT(state
->tmp
);
2030 if (DEBUGLEVEL
>= 10) {
2031 NDR_PRINT_OUT_DEBUG(winreg_FlushKey
, &state
->orig
);
2034 tevent_req_done(req
);
2037 NTSTATUS
rpccli_winreg_FlushKey_recv(struct tevent_req
*req
,
2038 TALLOC_CTX
*mem_ctx
,
2041 struct rpccli_winreg_FlushKey_state
*state
= tevent_req_data(
2042 req
, struct rpccli_winreg_FlushKey_state
);
2045 if (tevent_req_is_nterror(req
, &status
)) {
2046 tevent_req_received(req
);
2050 /* Steal possbile out parameters to the callers context */
2051 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2054 *result
= state
->orig
.out
.result
;
2056 tevent_req_received(req
);
2057 return NT_STATUS_OK
;
2060 NTSTATUS
rpccli_winreg_FlushKey(struct rpc_pipe_client
*cli
,
2061 TALLOC_CTX
*mem_ctx
,
2062 struct policy_handle
*handle
/* [in] [ref] */,
2065 struct winreg_FlushKey r
;
2069 r
.in
.handle
= handle
;
2071 if (DEBUGLEVEL
>= 10) {
2072 NDR_PRINT_IN_DEBUG(winreg_FlushKey
, &r
);
2075 status
= cli
->dispatch(cli
,
2078 NDR_WINREG_FLUSHKEY
,
2081 if (!NT_STATUS_IS_OK(status
)) {
2085 if (DEBUGLEVEL
>= 10) {
2086 NDR_PRINT_OUT_DEBUG(winreg_FlushKey
, &r
);
2089 if (NT_STATUS_IS_ERR(status
)) {
2093 /* Return variables */
2097 *werror
= r
.out
.result
;
2100 return werror_to_ntstatus(r
.out
.result
);
2103 struct rpccli_winreg_GetKeySecurity_state
{
2104 struct winreg_GetKeySecurity orig
;
2105 struct winreg_GetKeySecurity tmp
;
2106 TALLOC_CTX
*out_mem_ctx
;
2107 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2110 static void rpccli_winreg_GetKeySecurity_done(struct tevent_req
*subreq
);
2112 struct tevent_req
*rpccli_winreg_GetKeySecurity_send(TALLOC_CTX
*mem_ctx
,
2113 struct tevent_context
*ev
,
2114 struct rpc_pipe_client
*cli
,
2115 struct policy_handle
*_handle
/* [in] [ref] */,
2116 uint32_t _sec_info
/* [in] */,
2117 struct KeySecurityData
*_sd
/* [in,out] [ref] */)
2119 struct tevent_req
*req
;
2120 struct rpccli_winreg_GetKeySecurity_state
*state
;
2121 struct tevent_req
*subreq
;
2123 req
= tevent_req_create(mem_ctx
, &state
,
2124 struct rpccli_winreg_GetKeySecurity_state
);
2128 state
->out_mem_ctx
= NULL
;
2129 state
->dispatch_recv
= cli
->dispatch_recv
;
2132 state
->orig
.in
.handle
= _handle
;
2133 state
->orig
.in
.sec_info
= _sec_info
;
2134 state
->orig
.in
.sd
= _sd
;
2136 /* Out parameters */
2137 state
->orig
.out
.sd
= _sd
;
2140 ZERO_STRUCT(state
->orig
.out
.result
);
2142 if (DEBUGLEVEL
>= 10) {
2143 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity
, &state
->orig
);
2146 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2147 "rpccli_winreg_GetKeySecurity_out_memory");
2148 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2149 return tevent_req_post(req
, ev
);
2152 /* make a temporary copy, that we pass to the dispatch function */
2153 state
->tmp
= state
->orig
;
2155 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2157 NDR_WINREG_GETKEYSECURITY
,
2159 if (tevent_req_nomem(subreq
, req
)) {
2160 return tevent_req_post(req
, ev
);
2162 tevent_req_set_callback(subreq
, rpccli_winreg_GetKeySecurity_done
, req
);
2166 static void rpccli_winreg_GetKeySecurity_done(struct tevent_req
*subreq
)
2168 struct tevent_req
*req
= tevent_req_callback_data(
2169 subreq
, struct tevent_req
);
2170 struct rpccli_winreg_GetKeySecurity_state
*state
= tevent_req_data(
2171 req
, struct rpccli_winreg_GetKeySecurity_state
);
2173 TALLOC_CTX
*mem_ctx
;
2175 if (state
->out_mem_ctx
) {
2176 mem_ctx
= state
->out_mem_ctx
;
2181 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2182 TALLOC_FREE(subreq
);
2183 if (!NT_STATUS_IS_OK(status
)) {
2184 tevent_req_nterror(req
, status
);
2188 /* Copy out parameters */
2189 *state
->orig
.out
.sd
= *state
->tmp
.out
.sd
;
2192 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2194 /* Reset temporary structure */
2195 ZERO_STRUCT(state
->tmp
);
2197 if (DEBUGLEVEL
>= 10) {
2198 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity
, &state
->orig
);
2201 tevent_req_done(req
);
2204 NTSTATUS
rpccli_winreg_GetKeySecurity_recv(struct tevent_req
*req
,
2205 TALLOC_CTX
*mem_ctx
,
2208 struct rpccli_winreg_GetKeySecurity_state
*state
= tevent_req_data(
2209 req
, struct rpccli_winreg_GetKeySecurity_state
);
2212 if (tevent_req_is_nterror(req
, &status
)) {
2213 tevent_req_received(req
);
2217 /* Steal possbile out parameters to the callers context */
2218 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2221 *result
= state
->orig
.out
.result
;
2223 tevent_req_received(req
);
2224 return NT_STATUS_OK
;
2227 NTSTATUS
rpccli_winreg_GetKeySecurity(struct rpc_pipe_client
*cli
,
2228 TALLOC_CTX
*mem_ctx
,
2229 struct policy_handle
*handle
/* [in] [ref] */,
2230 uint32_t sec_info
/* [in] */,
2231 struct KeySecurityData
*sd
/* [in,out] [ref] */,
2234 struct winreg_GetKeySecurity r
;
2238 r
.in
.handle
= handle
;
2239 r
.in
.sec_info
= sec_info
;
2242 if (DEBUGLEVEL
>= 10) {
2243 NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity
, &r
);
2246 status
= cli
->dispatch(cli
,
2249 NDR_WINREG_GETKEYSECURITY
,
2252 if (!NT_STATUS_IS_OK(status
)) {
2256 if (DEBUGLEVEL
>= 10) {
2257 NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity
, &r
);
2260 if (NT_STATUS_IS_ERR(status
)) {
2264 /* Return variables */
2269 *werror
= r
.out
.result
;
2272 return werror_to_ntstatus(r
.out
.result
);
2275 struct rpccli_winreg_LoadKey_state
{
2276 struct winreg_LoadKey orig
;
2277 struct winreg_LoadKey tmp
;
2278 TALLOC_CTX
*out_mem_ctx
;
2279 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2282 static void rpccli_winreg_LoadKey_done(struct tevent_req
*subreq
);
2284 struct tevent_req
*rpccli_winreg_LoadKey_send(TALLOC_CTX
*mem_ctx
,
2285 struct tevent_context
*ev
,
2286 struct rpc_pipe_client
*cli
,
2287 struct policy_handle
*_handle
/* [in] [ref] */,
2288 struct winreg_String
*_keyname
/* [in] [unique] */,
2289 struct winreg_String
*_filename
/* [in] [unique] */)
2291 struct tevent_req
*req
;
2292 struct rpccli_winreg_LoadKey_state
*state
;
2293 struct tevent_req
*subreq
;
2295 req
= tevent_req_create(mem_ctx
, &state
,
2296 struct rpccli_winreg_LoadKey_state
);
2300 state
->out_mem_ctx
= NULL
;
2301 state
->dispatch_recv
= cli
->dispatch_recv
;
2304 state
->orig
.in
.handle
= _handle
;
2305 state
->orig
.in
.keyname
= _keyname
;
2306 state
->orig
.in
.filename
= _filename
;
2308 /* Out parameters */
2311 ZERO_STRUCT(state
->orig
.out
.result
);
2313 if (DEBUGLEVEL
>= 10) {
2314 NDR_PRINT_IN_DEBUG(winreg_LoadKey
, &state
->orig
);
2317 /* make a temporary copy, that we pass to the dispatch function */
2318 state
->tmp
= state
->orig
;
2320 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2324 if (tevent_req_nomem(subreq
, req
)) {
2325 return tevent_req_post(req
, ev
);
2327 tevent_req_set_callback(subreq
, rpccli_winreg_LoadKey_done
, req
);
2331 static void rpccli_winreg_LoadKey_done(struct tevent_req
*subreq
)
2333 struct tevent_req
*req
= tevent_req_callback_data(
2334 subreq
, struct tevent_req
);
2335 struct rpccli_winreg_LoadKey_state
*state
= tevent_req_data(
2336 req
, struct rpccli_winreg_LoadKey_state
);
2338 TALLOC_CTX
*mem_ctx
;
2340 if (state
->out_mem_ctx
) {
2341 mem_ctx
= state
->out_mem_ctx
;
2346 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2347 TALLOC_FREE(subreq
);
2348 if (!NT_STATUS_IS_OK(status
)) {
2349 tevent_req_nterror(req
, status
);
2353 /* Copy out parameters */
2356 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2358 /* Reset temporary structure */
2359 ZERO_STRUCT(state
->tmp
);
2361 if (DEBUGLEVEL
>= 10) {
2362 NDR_PRINT_OUT_DEBUG(winreg_LoadKey
, &state
->orig
);
2365 tevent_req_done(req
);
2368 NTSTATUS
rpccli_winreg_LoadKey_recv(struct tevent_req
*req
,
2369 TALLOC_CTX
*mem_ctx
,
2372 struct rpccli_winreg_LoadKey_state
*state
= tevent_req_data(
2373 req
, struct rpccli_winreg_LoadKey_state
);
2376 if (tevent_req_is_nterror(req
, &status
)) {
2377 tevent_req_received(req
);
2381 /* Steal possbile out parameters to the callers context */
2382 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2385 *result
= state
->orig
.out
.result
;
2387 tevent_req_received(req
);
2388 return NT_STATUS_OK
;
2391 NTSTATUS
rpccli_winreg_LoadKey(struct rpc_pipe_client
*cli
,
2392 TALLOC_CTX
*mem_ctx
,
2393 struct policy_handle
*handle
/* [in] [ref] */,
2394 struct winreg_String
*keyname
/* [in] [unique] */,
2395 struct winreg_String
*filename
/* [in] [unique] */,
2398 struct winreg_LoadKey r
;
2402 r
.in
.handle
= handle
;
2403 r
.in
.keyname
= keyname
;
2404 r
.in
.filename
= filename
;
2406 if (DEBUGLEVEL
>= 10) {
2407 NDR_PRINT_IN_DEBUG(winreg_LoadKey
, &r
);
2410 status
= cli
->dispatch(cli
,
2416 if (!NT_STATUS_IS_OK(status
)) {
2420 if (DEBUGLEVEL
>= 10) {
2421 NDR_PRINT_OUT_DEBUG(winreg_LoadKey
, &r
);
2424 if (NT_STATUS_IS_ERR(status
)) {
2428 /* Return variables */
2432 *werror
= r
.out
.result
;
2435 return werror_to_ntstatus(r
.out
.result
);
2438 struct rpccli_winreg_NotifyChangeKeyValue_state
{
2439 struct winreg_NotifyChangeKeyValue orig
;
2440 struct winreg_NotifyChangeKeyValue tmp
;
2441 TALLOC_CTX
*out_mem_ctx
;
2442 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2445 static void rpccli_winreg_NotifyChangeKeyValue_done(struct tevent_req
*subreq
);
2447 struct tevent_req
*rpccli_winreg_NotifyChangeKeyValue_send(TALLOC_CTX
*mem_ctx
,
2448 struct tevent_context
*ev
,
2449 struct rpc_pipe_client
*cli
,
2450 struct policy_handle
*_handle
/* [in] [ref] */,
2451 uint8_t _watch_subtree
/* [in] */,
2452 uint32_t _notify_filter
/* [in] */,
2453 uint32_t _unknown
/* [in] */,
2454 struct winreg_String _string1
/* [in] */,
2455 struct winreg_String _string2
/* [in] */,
2456 uint32_t _unknown2
/* [in] */)
2458 struct tevent_req
*req
;
2459 struct rpccli_winreg_NotifyChangeKeyValue_state
*state
;
2460 struct tevent_req
*subreq
;
2462 req
= tevent_req_create(mem_ctx
, &state
,
2463 struct rpccli_winreg_NotifyChangeKeyValue_state
);
2467 state
->out_mem_ctx
= NULL
;
2468 state
->dispatch_recv
= cli
->dispatch_recv
;
2471 state
->orig
.in
.handle
= _handle
;
2472 state
->orig
.in
.watch_subtree
= _watch_subtree
;
2473 state
->orig
.in
.notify_filter
= _notify_filter
;
2474 state
->orig
.in
.unknown
= _unknown
;
2475 state
->orig
.in
.string1
= _string1
;
2476 state
->orig
.in
.string2
= _string2
;
2477 state
->orig
.in
.unknown2
= _unknown2
;
2479 /* Out parameters */
2482 ZERO_STRUCT(state
->orig
.out
.result
);
2484 if (DEBUGLEVEL
>= 10) {
2485 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue
, &state
->orig
);
2488 /* make a temporary copy, that we pass to the dispatch function */
2489 state
->tmp
= state
->orig
;
2491 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2493 NDR_WINREG_NOTIFYCHANGEKEYVALUE
,
2495 if (tevent_req_nomem(subreq
, req
)) {
2496 return tevent_req_post(req
, ev
);
2498 tevent_req_set_callback(subreq
, rpccli_winreg_NotifyChangeKeyValue_done
, req
);
2502 static void rpccli_winreg_NotifyChangeKeyValue_done(struct tevent_req
*subreq
)
2504 struct tevent_req
*req
= tevent_req_callback_data(
2505 subreq
, struct tevent_req
);
2506 struct rpccli_winreg_NotifyChangeKeyValue_state
*state
= tevent_req_data(
2507 req
, struct rpccli_winreg_NotifyChangeKeyValue_state
);
2509 TALLOC_CTX
*mem_ctx
;
2511 if (state
->out_mem_ctx
) {
2512 mem_ctx
= state
->out_mem_ctx
;
2517 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2518 TALLOC_FREE(subreq
);
2519 if (!NT_STATUS_IS_OK(status
)) {
2520 tevent_req_nterror(req
, status
);
2524 /* Copy out parameters */
2527 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2529 /* Reset temporary structure */
2530 ZERO_STRUCT(state
->tmp
);
2532 if (DEBUGLEVEL
>= 10) {
2533 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue
, &state
->orig
);
2536 tevent_req_done(req
);
2539 NTSTATUS
rpccli_winreg_NotifyChangeKeyValue_recv(struct tevent_req
*req
,
2540 TALLOC_CTX
*mem_ctx
,
2543 struct rpccli_winreg_NotifyChangeKeyValue_state
*state
= tevent_req_data(
2544 req
, struct rpccli_winreg_NotifyChangeKeyValue_state
);
2547 if (tevent_req_is_nterror(req
, &status
)) {
2548 tevent_req_received(req
);
2552 /* Steal possbile out parameters to the callers context */
2553 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2556 *result
= state
->orig
.out
.result
;
2558 tevent_req_received(req
);
2559 return NT_STATUS_OK
;
2562 NTSTATUS
rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client
*cli
,
2563 TALLOC_CTX
*mem_ctx
,
2564 struct policy_handle
*handle
/* [in] [ref] */,
2565 uint8_t watch_subtree
/* [in] */,
2566 uint32_t notify_filter
/* [in] */,
2567 uint32_t unknown
/* [in] */,
2568 struct winreg_String string1
/* [in] */,
2569 struct winreg_String string2
/* [in] */,
2570 uint32_t unknown2
/* [in] */,
2573 struct winreg_NotifyChangeKeyValue r
;
2577 r
.in
.handle
= handle
;
2578 r
.in
.watch_subtree
= watch_subtree
;
2579 r
.in
.notify_filter
= notify_filter
;
2580 r
.in
.unknown
= unknown
;
2581 r
.in
.string1
= string1
;
2582 r
.in
.string2
= string2
;
2583 r
.in
.unknown2
= unknown2
;
2585 if (DEBUGLEVEL
>= 10) {
2586 NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue
, &r
);
2589 status
= cli
->dispatch(cli
,
2592 NDR_WINREG_NOTIFYCHANGEKEYVALUE
,
2595 if (!NT_STATUS_IS_OK(status
)) {
2599 if (DEBUGLEVEL
>= 10) {
2600 NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue
, &r
);
2603 if (NT_STATUS_IS_ERR(status
)) {
2607 /* Return variables */
2611 *werror
= r
.out
.result
;
2614 return werror_to_ntstatus(r
.out
.result
);
2617 struct rpccli_winreg_OpenKey_state
{
2618 struct winreg_OpenKey orig
;
2619 struct winreg_OpenKey tmp
;
2620 TALLOC_CTX
*out_mem_ctx
;
2621 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2624 static void rpccli_winreg_OpenKey_done(struct tevent_req
*subreq
);
2626 struct tevent_req
*rpccli_winreg_OpenKey_send(TALLOC_CTX
*mem_ctx
,
2627 struct tevent_context
*ev
,
2628 struct rpc_pipe_client
*cli
,
2629 struct policy_handle
*_parent_handle
/* [in] [ref] */,
2630 struct winreg_String _keyname
/* [in] */,
2631 uint32_t _unknown
/* [in] */,
2632 uint32_t _access_mask
/* [in] */,
2633 struct policy_handle
*_handle
/* [out] [ref] */)
2635 struct tevent_req
*req
;
2636 struct rpccli_winreg_OpenKey_state
*state
;
2637 struct tevent_req
*subreq
;
2639 req
= tevent_req_create(mem_ctx
, &state
,
2640 struct rpccli_winreg_OpenKey_state
);
2644 state
->out_mem_ctx
= NULL
;
2645 state
->dispatch_recv
= cli
->dispatch_recv
;
2648 state
->orig
.in
.parent_handle
= _parent_handle
;
2649 state
->orig
.in
.keyname
= _keyname
;
2650 state
->orig
.in
.unknown
= _unknown
;
2651 state
->orig
.in
.access_mask
= _access_mask
;
2653 /* Out parameters */
2654 state
->orig
.out
.handle
= _handle
;
2657 ZERO_STRUCT(state
->orig
.out
.result
);
2659 if (DEBUGLEVEL
>= 10) {
2660 NDR_PRINT_IN_DEBUG(winreg_OpenKey
, &state
->orig
);
2663 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2664 "rpccli_winreg_OpenKey_out_memory");
2665 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2666 return tevent_req_post(req
, ev
);
2669 /* make a temporary copy, that we pass to the dispatch function */
2670 state
->tmp
= state
->orig
;
2672 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2676 if (tevent_req_nomem(subreq
, req
)) {
2677 return tevent_req_post(req
, ev
);
2679 tevent_req_set_callback(subreq
, rpccli_winreg_OpenKey_done
, req
);
2683 static void rpccli_winreg_OpenKey_done(struct tevent_req
*subreq
)
2685 struct tevent_req
*req
= tevent_req_callback_data(
2686 subreq
, struct tevent_req
);
2687 struct rpccli_winreg_OpenKey_state
*state
= tevent_req_data(
2688 req
, struct rpccli_winreg_OpenKey_state
);
2690 TALLOC_CTX
*mem_ctx
;
2692 if (state
->out_mem_ctx
) {
2693 mem_ctx
= state
->out_mem_ctx
;
2698 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2699 TALLOC_FREE(subreq
);
2700 if (!NT_STATUS_IS_OK(status
)) {
2701 tevent_req_nterror(req
, status
);
2705 /* Copy out parameters */
2706 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
2709 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2711 /* Reset temporary structure */
2712 ZERO_STRUCT(state
->tmp
);
2714 if (DEBUGLEVEL
>= 10) {
2715 NDR_PRINT_OUT_DEBUG(winreg_OpenKey
, &state
->orig
);
2718 tevent_req_done(req
);
2721 NTSTATUS
rpccli_winreg_OpenKey_recv(struct tevent_req
*req
,
2722 TALLOC_CTX
*mem_ctx
,
2725 struct rpccli_winreg_OpenKey_state
*state
= tevent_req_data(
2726 req
, struct rpccli_winreg_OpenKey_state
);
2729 if (tevent_req_is_nterror(req
, &status
)) {
2730 tevent_req_received(req
);
2734 /* Steal possbile out parameters to the callers context */
2735 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2738 *result
= state
->orig
.out
.result
;
2740 tevent_req_received(req
);
2741 return NT_STATUS_OK
;
2744 NTSTATUS
rpccli_winreg_OpenKey(struct rpc_pipe_client
*cli
,
2745 TALLOC_CTX
*mem_ctx
,
2746 struct policy_handle
*parent_handle
/* [in] [ref] */,
2747 struct winreg_String keyname
/* [in] */,
2748 uint32_t unknown
/* [in] */,
2749 uint32_t access_mask
/* [in] */,
2750 struct policy_handle
*handle
/* [out] [ref] */,
2753 struct winreg_OpenKey r
;
2757 r
.in
.parent_handle
= parent_handle
;
2758 r
.in
.keyname
= keyname
;
2759 r
.in
.unknown
= unknown
;
2760 r
.in
.access_mask
= access_mask
;
2762 if (DEBUGLEVEL
>= 10) {
2763 NDR_PRINT_IN_DEBUG(winreg_OpenKey
, &r
);
2766 status
= cli
->dispatch(cli
,
2772 if (!NT_STATUS_IS_OK(status
)) {
2776 if (DEBUGLEVEL
>= 10) {
2777 NDR_PRINT_OUT_DEBUG(winreg_OpenKey
, &r
);
2780 if (NT_STATUS_IS_ERR(status
)) {
2784 /* Return variables */
2785 *handle
= *r
.out
.handle
;
2789 *werror
= r
.out
.result
;
2792 return werror_to_ntstatus(r
.out
.result
);
2795 struct rpccli_winreg_QueryInfoKey_state
{
2796 struct winreg_QueryInfoKey orig
;
2797 struct winreg_QueryInfoKey tmp
;
2798 TALLOC_CTX
*out_mem_ctx
;
2799 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2802 static void rpccli_winreg_QueryInfoKey_done(struct tevent_req
*subreq
);
2804 struct tevent_req
*rpccli_winreg_QueryInfoKey_send(TALLOC_CTX
*mem_ctx
,
2805 struct tevent_context
*ev
,
2806 struct rpc_pipe_client
*cli
,
2807 struct policy_handle
*_handle
/* [in] [ref] */,
2808 struct winreg_String
*_classname
/* [in,out] [ref] */,
2809 uint32_t *_num_subkeys
/* [out] [ref] */,
2810 uint32_t *_max_subkeylen
/* [out] [ref] */,
2811 uint32_t *_max_classlen
/* [out] [ref] */,
2812 uint32_t *_num_values
/* [out] [ref] */,
2813 uint32_t *_max_valnamelen
/* [out] [ref] */,
2814 uint32_t *_max_valbufsize
/* [out] [ref] */,
2815 uint32_t *_secdescsize
/* [out] [ref] */,
2816 NTTIME
*_last_changed_time
/* [out] [ref] */)
2818 struct tevent_req
*req
;
2819 struct rpccli_winreg_QueryInfoKey_state
*state
;
2820 struct tevent_req
*subreq
;
2822 req
= tevent_req_create(mem_ctx
, &state
,
2823 struct rpccli_winreg_QueryInfoKey_state
);
2827 state
->out_mem_ctx
= NULL
;
2828 state
->dispatch_recv
= cli
->dispatch_recv
;
2831 state
->orig
.in
.handle
= _handle
;
2832 state
->orig
.in
.classname
= _classname
;
2834 /* Out parameters */
2835 state
->orig
.out
.classname
= _classname
;
2836 state
->orig
.out
.num_subkeys
= _num_subkeys
;
2837 state
->orig
.out
.max_subkeylen
= _max_subkeylen
;
2838 state
->orig
.out
.max_classlen
= _max_classlen
;
2839 state
->orig
.out
.num_values
= _num_values
;
2840 state
->orig
.out
.max_valnamelen
= _max_valnamelen
;
2841 state
->orig
.out
.max_valbufsize
= _max_valbufsize
;
2842 state
->orig
.out
.secdescsize
= _secdescsize
;
2843 state
->orig
.out
.last_changed_time
= _last_changed_time
;
2846 ZERO_STRUCT(state
->orig
.out
.result
);
2848 if (DEBUGLEVEL
>= 10) {
2849 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey
, &state
->orig
);
2852 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2853 "rpccli_winreg_QueryInfoKey_out_memory");
2854 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2855 return tevent_req_post(req
, ev
);
2858 /* make a temporary copy, that we pass to the dispatch function */
2859 state
->tmp
= state
->orig
;
2861 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2863 NDR_WINREG_QUERYINFOKEY
,
2865 if (tevent_req_nomem(subreq
, req
)) {
2866 return tevent_req_post(req
, ev
);
2868 tevent_req_set_callback(subreq
, rpccli_winreg_QueryInfoKey_done
, req
);
2872 static void rpccli_winreg_QueryInfoKey_done(struct tevent_req
*subreq
)
2874 struct tevent_req
*req
= tevent_req_callback_data(
2875 subreq
, struct tevent_req
);
2876 struct rpccli_winreg_QueryInfoKey_state
*state
= tevent_req_data(
2877 req
, struct rpccli_winreg_QueryInfoKey_state
);
2879 TALLOC_CTX
*mem_ctx
;
2881 if (state
->out_mem_ctx
) {
2882 mem_ctx
= state
->out_mem_ctx
;
2887 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2888 TALLOC_FREE(subreq
);
2889 if (!NT_STATUS_IS_OK(status
)) {
2890 tevent_req_nterror(req
, status
);
2894 /* Copy out parameters */
2895 *state
->orig
.out
.classname
= *state
->tmp
.out
.classname
;
2896 *state
->orig
.out
.num_subkeys
= *state
->tmp
.out
.num_subkeys
;
2897 *state
->orig
.out
.max_subkeylen
= *state
->tmp
.out
.max_subkeylen
;
2898 *state
->orig
.out
.max_classlen
= *state
->tmp
.out
.max_classlen
;
2899 *state
->orig
.out
.num_values
= *state
->tmp
.out
.num_values
;
2900 *state
->orig
.out
.max_valnamelen
= *state
->tmp
.out
.max_valnamelen
;
2901 *state
->orig
.out
.max_valbufsize
= *state
->tmp
.out
.max_valbufsize
;
2902 *state
->orig
.out
.secdescsize
= *state
->tmp
.out
.secdescsize
;
2903 *state
->orig
.out
.last_changed_time
= *state
->tmp
.out
.last_changed_time
;
2906 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2908 /* Reset temporary structure */
2909 ZERO_STRUCT(state
->tmp
);
2911 if (DEBUGLEVEL
>= 10) {
2912 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey
, &state
->orig
);
2915 tevent_req_done(req
);
2918 NTSTATUS
rpccli_winreg_QueryInfoKey_recv(struct tevent_req
*req
,
2919 TALLOC_CTX
*mem_ctx
,
2922 struct rpccli_winreg_QueryInfoKey_state
*state
= tevent_req_data(
2923 req
, struct rpccli_winreg_QueryInfoKey_state
);
2926 if (tevent_req_is_nterror(req
, &status
)) {
2927 tevent_req_received(req
);
2931 /* Steal possbile out parameters to the callers context */
2932 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2935 *result
= state
->orig
.out
.result
;
2937 tevent_req_received(req
);
2938 return NT_STATUS_OK
;
2941 NTSTATUS
rpccli_winreg_QueryInfoKey(struct rpc_pipe_client
*cli
,
2942 TALLOC_CTX
*mem_ctx
,
2943 struct policy_handle
*handle
/* [in] [ref] */,
2944 struct winreg_String
*classname
/* [in,out] [ref] */,
2945 uint32_t *num_subkeys
/* [out] [ref] */,
2946 uint32_t *max_subkeylen
/* [out] [ref] */,
2947 uint32_t *max_classlen
/* [out] [ref] */,
2948 uint32_t *num_values
/* [out] [ref] */,
2949 uint32_t *max_valnamelen
/* [out] [ref] */,
2950 uint32_t *max_valbufsize
/* [out] [ref] */,
2951 uint32_t *secdescsize
/* [out] [ref] */,
2952 NTTIME
*last_changed_time
/* [out] [ref] */,
2955 struct winreg_QueryInfoKey r
;
2959 r
.in
.handle
= handle
;
2960 r
.in
.classname
= classname
;
2962 if (DEBUGLEVEL
>= 10) {
2963 NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey
, &r
);
2966 status
= cli
->dispatch(cli
,
2969 NDR_WINREG_QUERYINFOKEY
,
2972 if (!NT_STATUS_IS_OK(status
)) {
2976 if (DEBUGLEVEL
>= 10) {
2977 NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey
, &r
);
2980 if (NT_STATUS_IS_ERR(status
)) {
2984 /* Return variables */
2985 *classname
= *r
.out
.classname
;
2986 *num_subkeys
= *r
.out
.num_subkeys
;
2987 *max_subkeylen
= *r
.out
.max_subkeylen
;
2988 *max_classlen
= *r
.out
.max_classlen
;
2989 *num_values
= *r
.out
.num_values
;
2990 *max_valnamelen
= *r
.out
.max_valnamelen
;
2991 *max_valbufsize
= *r
.out
.max_valbufsize
;
2992 *secdescsize
= *r
.out
.secdescsize
;
2993 *last_changed_time
= *r
.out
.last_changed_time
;
2997 *werror
= r
.out
.result
;
3000 return werror_to_ntstatus(r
.out
.result
);
3003 struct rpccli_winreg_QueryValue_state
{
3004 struct winreg_QueryValue orig
;
3005 struct winreg_QueryValue tmp
;
3006 TALLOC_CTX
*out_mem_ctx
;
3007 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3010 static void rpccli_winreg_QueryValue_done(struct tevent_req
*subreq
);
3012 struct tevent_req
*rpccli_winreg_QueryValue_send(TALLOC_CTX
*mem_ctx
,
3013 struct tevent_context
*ev
,
3014 struct rpc_pipe_client
*cli
,
3015 struct policy_handle
*_handle
/* [in] [ref] */,
3016 struct winreg_String
*_value_name
/* [in] [ref] */,
3017 enum winreg_Type
*_type
/* [in,out] [unique] */,
3018 uint8_t *_data
/* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
3019 uint32_t *_data_size
/* [in,out] [unique] */,
3020 uint32_t *_data_length
/* [in,out] [unique] */)
3022 struct tevent_req
*req
;
3023 struct rpccli_winreg_QueryValue_state
*state
;
3024 struct tevent_req
*subreq
;
3026 req
= tevent_req_create(mem_ctx
, &state
,
3027 struct rpccli_winreg_QueryValue_state
);
3031 state
->out_mem_ctx
= NULL
;
3032 state
->dispatch_recv
= cli
->dispatch_recv
;
3035 state
->orig
.in
.handle
= _handle
;
3036 state
->orig
.in
.value_name
= _value_name
;
3037 state
->orig
.in
.type
= _type
;
3038 state
->orig
.in
.data
= _data
;
3039 state
->orig
.in
.data_size
= _data_size
;
3040 state
->orig
.in
.data_length
= _data_length
;
3042 /* Out parameters */
3043 state
->orig
.out
.type
= _type
;
3044 state
->orig
.out
.data
= _data
;
3045 state
->orig
.out
.data_size
= _data_size
;
3046 state
->orig
.out
.data_length
= _data_length
;
3049 ZERO_STRUCT(state
->orig
.out
.result
);
3051 if (DEBUGLEVEL
>= 10) {
3052 NDR_PRINT_IN_DEBUG(winreg_QueryValue
, &state
->orig
);
3055 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3056 "rpccli_winreg_QueryValue_out_memory");
3057 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3058 return tevent_req_post(req
, ev
);
3061 /* make a temporary copy, that we pass to the dispatch function */
3062 state
->tmp
= state
->orig
;
3064 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3066 NDR_WINREG_QUERYVALUE
,
3068 if (tevent_req_nomem(subreq
, req
)) {
3069 return tevent_req_post(req
, ev
);
3071 tevent_req_set_callback(subreq
, rpccli_winreg_QueryValue_done
, req
);
3075 static void rpccli_winreg_QueryValue_done(struct tevent_req
*subreq
)
3077 struct tevent_req
*req
= tevent_req_callback_data(
3078 subreq
, struct tevent_req
);
3079 struct rpccli_winreg_QueryValue_state
*state
= tevent_req_data(
3080 req
, struct rpccli_winreg_QueryValue_state
);
3082 TALLOC_CTX
*mem_ctx
;
3084 if (state
->out_mem_ctx
) {
3085 mem_ctx
= state
->out_mem_ctx
;
3090 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3091 TALLOC_FREE(subreq
);
3092 if (!NT_STATUS_IS_OK(status
)) {
3093 tevent_req_nterror(req
, status
);
3097 /* Copy out parameters */
3098 if (state
->orig
.out
.type
&& state
->tmp
.out
.type
) {
3099 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
3101 if (state
->orig
.out
.data
&& state
->tmp
.out
.data
) {
3102 memcpy(state
->orig
.out
.data
, state
->tmp
.out
.data
, *state
->tmp
.in
.data_size
* sizeof(*state
->orig
.out
.data
));
3104 if (state
->orig
.out
.data_size
&& state
->tmp
.out
.data_size
) {
3105 *state
->orig
.out
.data_size
= *state
->tmp
.out
.data_size
;
3107 if (state
->orig
.out
.data_length
&& state
->tmp
.out
.data_length
) {
3108 *state
->orig
.out
.data_length
= *state
->tmp
.out
.data_length
;
3112 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3114 /* Reset temporary structure */
3115 ZERO_STRUCT(state
->tmp
);
3117 if (DEBUGLEVEL
>= 10) {
3118 NDR_PRINT_OUT_DEBUG(winreg_QueryValue
, &state
->orig
);
3121 tevent_req_done(req
);
3124 NTSTATUS
rpccli_winreg_QueryValue_recv(struct tevent_req
*req
,
3125 TALLOC_CTX
*mem_ctx
,
3128 struct rpccli_winreg_QueryValue_state
*state
= tevent_req_data(
3129 req
, struct rpccli_winreg_QueryValue_state
);
3132 if (tevent_req_is_nterror(req
, &status
)) {
3133 tevent_req_received(req
);
3137 /* Steal possbile out parameters to the callers context */
3138 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3141 *result
= state
->orig
.out
.result
;
3143 tevent_req_received(req
);
3144 return NT_STATUS_OK
;
3147 NTSTATUS
rpccli_winreg_QueryValue(struct rpc_pipe_client
*cli
,
3148 TALLOC_CTX
*mem_ctx
,
3149 struct policy_handle
*handle
/* [in] [ref] */,
3150 struct winreg_String
*value_name
/* [in] [ref] */,
3151 enum winreg_Type
*type
/* [in,out] [unique] */,
3152 uint8_t *data
/* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
3153 uint32_t *data_size
/* [in,out] [unique] */,
3154 uint32_t *data_length
/* [in,out] [unique] */,
3157 struct winreg_QueryValue r
;
3161 r
.in
.handle
= handle
;
3162 r
.in
.value_name
= value_name
;
3165 r
.in
.data_size
= data_size
;
3166 r
.in
.data_length
= data_length
;
3168 if (DEBUGLEVEL
>= 10) {
3169 NDR_PRINT_IN_DEBUG(winreg_QueryValue
, &r
);
3172 status
= cli
->dispatch(cli
,
3175 NDR_WINREG_QUERYVALUE
,
3178 if (!NT_STATUS_IS_OK(status
)) {
3182 if (DEBUGLEVEL
>= 10) {
3183 NDR_PRINT_OUT_DEBUG(winreg_QueryValue
, &r
);
3186 if (NT_STATUS_IS_ERR(status
)) {
3190 /* Return variables */
3191 if (type
&& r
.out
.type
) {
3192 *type
= *r
.out
.type
;
3194 if (data
&& r
.out
.data
) {
3195 memcpy(data
, r
.out
.data
, *r
.in
.data_size
* sizeof(*data
));
3197 if (data_size
&& r
.out
.data_size
) {
3198 *data_size
= *r
.out
.data_size
;
3200 if (data_length
&& r
.out
.data_length
) {
3201 *data_length
= *r
.out
.data_length
;
3206 *werror
= r
.out
.result
;
3209 return werror_to_ntstatus(r
.out
.result
);
3212 struct rpccli_winreg_ReplaceKey_state
{
3213 struct winreg_ReplaceKey orig
;
3214 struct winreg_ReplaceKey tmp
;
3215 TALLOC_CTX
*out_mem_ctx
;
3216 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3219 static void rpccli_winreg_ReplaceKey_done(struct tevent_req
*subreq
);
3221 struct tevent_req
*rpccli_winreg_ReplaceKey_send(TALLOC_CTX
*mem_ctx
,
3222 struct tevent_context
*ev
,
3223 struct rpc_pipe_client
*cli
)
3225 struct tevent_req
*req
;
3226 struct rpccli_winreg_ReplaceKey_state
*state
;
3227 struct tevent_req
*subreq
;
3229 req
= tevent_req_create(mem_ctx
, &state
,
3230 struct rpccli_winreg_ReplaceKey_state
);
3234 state
->out_mem_ctx
= NULL
;
3235 state
->dispatch_recv
= cli
->dispatch_recv
;
3239 /* Out parameters */
3242 ZERO_STRUCT(state
->orig
.out
.result
);
3244 if (DEBUGLEVEL
>= 10) {
3245 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey
, &state
->orig
);
3248 /* make a temporary copy, that we pass to the dispatch function */
3249 state
->tmp
= state
->orig
;
3251 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3253 NDR_WINREG_REPLACEKEY
,
3255 if (tevent_req_nomem(subreq
, req
)) {
3256 return tevent_req_post(req
, ev
);
3258 tevent_req_set_callback(subreq
, rpccli_winreg_ReplaceKey_done
, req
);
3262 static void rpccli_winreg_ReplaceKey_done(struct tevent_req
*subreq
)
3264 struct tevent_req
*req
= tevent_req_callback_data(
3265 subreq
, struct tevent_req
);
3266 struct rpccli_winreg_ReplaceKey_state
*state
= tevent_req_data(
3267 req
, struct rpccli_winreg_ReplaceKey_state
);
3269 TALLOC_CTX
*mem_ctx
;
3271 if (state
->out_mem_ctx
) {
3272 mem_ctx
= state
->out_mem_ctx
;
3277 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3278 TALLOC_FREE(subreq
);
3279 if (!NT_STATUS_IS_OK(status
)) {
3280 tevent_req_nterror(req
, status
);
3284 /* Copy out parameters */
3287 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3289 /* Reset temporary structure */
3290 ZERO_STRUCT(state
->tmp
);
3292 if (DEBUGLEVEL
>= 10) {
3293 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey
, &state
->orig
);
3296 tevent_req_done(req
);
3299 NTSTATUS
rpccli_winreg_ReplaceKey_recv(struct tevent_req
*req
,
3300 TALLOC_CTX
*mem_ctx
,
3303 struct rpccli_winreg_ReplaceKey_state
*state
= tevent_req_data(
3304 req
, struct rpccli_winreg_ReplaceKey_state
);
3307 if (tevent_req_is_nterror(req
, &status
)) {
3308 tevent_req_received(req
);
3312 /* Steal possbile out parameters to the callers context */
3313 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3316 *result
= state
->orig
.out
.result
;
3318 tevent_req_received(req
);
3319 return NT_STATUS_OK
;
3322 NTSTATUS
rpccli_winreg_ReplaceKey(struct rpc_pipe_client
*cli
,
3323 TALLOC_CTX
*mem_ctx
,
3326 struct winreg_ReplaceKey r
;
3331 if (DEBUGLEVEL
>= 10) {
3332 NDR_PRINT_IN_DEBUG(winreg_ReplaceKey
, &r
);
3335 status
= cli
->dispatch(cli
,
3338 NDR_WINREG_REPLACEKEY
,
3341 if (!NT_STATUS_IS_OK(status
)) {
3345 if (DEBUGLEVEL
>= 10) {
3346 NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey
, &r
);
3349 if (NT_STATUS_IS_ERR(status
)) {
3353 /* Return variables */
3357 *werror
= r
.out
.result
;
3360 return werror_to_ntstatus(r
.out
.result
);
3363 struct rpccli_winreg_RestoreKey_state
{
3364 struct winreg_RestoreKey orig
;
3365 struct winreg_RestoreKey tmp
;
3366 TALLOC_CTX
*out_mem_ctx
;
3367 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3370 static void rpccli_winreg_RestoreKey_done(struct tevent_req
*subreq
);
3372 struct tevent_req
*rpccli_winreg_RestoreKey_send(TALLOC_CTX
*mem_ctx
,
3373 struct tevent_context
*ev
,
3374 struct rpc_pipe_client
*cli
,
3375 struct policy_handle
*_handle
/* [in] [ref] */,
3376 struct winreg_String
*_filename
/* [in] [ref] */,
3377 uint32_t _flags
/* [in] */)
3379 struct tevent_req
*req
;
3380 struct rpccli_winreg_RestoreKey_state
*state
;
3381 struct tevent_req
*subreq
;
3383 req
= tevent_req_create(mem_ctx
, &state
,
3384 struct rpccli_winreg_RestoreKey_state
);
3388 state
->out_mem_ctx
= NULL
;
3389 state
->dispatch_recv
= cli
->dispatch_recv
;
3392 state
->orig
.in
.handle
= _handle
;
3393 state
->orig
.in
.filename
= _filename
;
3394 state
->orig
.in
.flags
= _flags
;
3396 /* Out parameters */
3399 ZERO_STRUCT(state
->orig
.out
.result
);
3401 if (DEBUGLEVEL
>= 10) {
3402 NDR_PRINT_IN_DEBUG(winreg_RestoreKey
, &state
->orig
);
3405 /* make a temporary copy, that we pass to the dispatch function */
3406 state
->tmp
= state
->orig
;
3408 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3410 NDR_WINREG_RESTOREKEY
,
3412 if (tevent_req_nomem(subreq
, req
)) {
3413 return tevent_req_post(req
, ev
);
3415 tevent_req_set_callback(subreq
, rpccli_winreg_RestoreKey_done
, req
);
3419 static void rpccli_winreg_RestoreKey_done(struct tevent_req
*subreq
)
3421 struct tevent_req
*req
= tevent_req_callback_data(
3422 subreq
, struct tevent_req
);
3423 struct rpccli_winreg_RestoreKey_state
*state
= tevent_req_data(
3424 req
, struct rpccli_winreg_RestoreKey_state
);
3426 TALLOC_CTX
*mem_ctx
;
3428 if (state
->out_mem_ctx
) {
3429 mem_ctx
= state
->out_mem_ctx
;
3434 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3435 TALLOC_FREE(subreq
);
3436 if (!NT_STATUS_IS_OK(status
)) {
3437 tevent_req_nterror(req
, status
);
3441 /* Copy out parameters */
3444 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3446 /* Reset temporary structure */
3447 ZERO_STRUCT(state
->tmp
);
3449 if (DEBUGLEVEL
>= 10) {
3450 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey
, &state
->orig
);
3453 tevent_req_done(req
);
3456 NTSTATUS
rpccli_winreg_RestoreKey_recv(struct tevent_req
*req
,
3457 TALLOC_CTX
*mem_ctx
,
3460 struct rpccli_winreg_RestoreKey_state
*state
= tevent_req_data(
3461 req
, struct rpccli_winreg_RestoreKey_state
);
3464 if (tevent_req_is_nterror(req
, &status
)) {
3465 tevent_req_received(req
);
3469 /* Steal possbile out parameters to the callers context */
3470 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3473 *result
= state
->orig
.out
.result
;
3475 tevent_req_received(req
);
3476 return NT_STATUS_OK
;
3479 NTSTATUS
rpccli_winreg_RestoreKey(struct rpc_pipe_client
*cli
,
3480 TALLOC_CTX
*mem_ctx
,
3481 struct policy_handle
*handle
/* [in] [ref] */,
3482 struct winreg_String
*filename
/* [in] [ref] */,
3483 uint32_t flags
/* [in] */,
3486 struct winreg_RestoreKey r
;
3490 r
.in
.handle
= handle
;
3491 r
.in
.filename
= filename
;
3494 if (DEBUGLEVEL
>= 10) {
3495 NDR_PRINT_IN_DEBUG(winreg_RestoreKey
, &r
);
3498 status
= cli
->dispatch(cli
,
3501 NDR_WINREG_RESTOREKEY
,
3504 if (!NT_STATUS_IS_OK(status
)) {
3508 if (DEBUGLEVEL
>= 10) {
3509 NDR_PRINT_OUT_DEBUG(winreg_RestoreKey
, &r
);
3512 if (NT_STATUS_IS_ERR(status
)) {
3516 /* Return variables */
3520 *werror
= r
.out
.result
;
3523 return werror_to_ntstatus(r
.out
.result
);
3526 struct rpccli_winreg_SaveKey_state
{
3527 struct winreg_SaveKey orig
;
3528 struct winreg_SaveKey tmp
;
3529 TALLOC_CTX
*out_mem_ctx
;
3530 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3533 static void rpccli_winreg_SaveKey_done(struct tevent_req
*subreq
);
3535 struct tevent_req
*rpccli_winreg_SaveKey_send(TALLOC_CTX
*mem_ctx
,
3536 struct tevent_context
*ev
,
3537 struct rpc_pipe_client
*cli
,
3538 struct policy_handle
*_handle
/* [in] [ref] */,
3539 struct winreg_String
*_filename
/* [in] [ref] */,
3540 struct KeySecurityAttribute
*_sec_attrib
/* [in] [unique] */)
3542 struct tevent_req
*req
;
3543 struct rpccli_winreg_SaveKey_state
*state
;
3544 struct tevent_req
*subreq
;
3546 req
= tevent_req_create(mem_ctx
, &state
,
3547 struct rpccli_winreg_SaveKey_state
);
3551 state
->out_mem_ctx
= NULL
;
3552 state
->dispatch_recv
= cli
->dispatch_recv
;
3555 state
->orig
.in
.handle
= _handle
;
3556 state
->orig
.in
.filename
= _filename
;
3557 state
->orig
.in
.sec_attrib
= _sec_attrib
;
3559 /* Out parameters */
3562 ZERO_STRUCT(state
->orig
.out
.result
);
3564 if (DEBUGLEVEL
>= 10) {
3565 NDR_PRINT_IN_DEBUG(winreg_SaveKey
, &state
->orig
);
3568 /* make a temporary copy, that we pass to the dispatch function */
3569 state
->tmp
= state
->orig
;
3571 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3575 if (tevent_req_nomem(subreq
, req
)) {
3576 return tevent_req_post(req
, ev
);
3578 tevent_req_set_callback(subreq
, rpccli_winreg_SaveKey_done
, req
);
3582 static void rpccli_winreg_SaveKey_done(struct tevent_req
*subreq
)
3584 struct tevent_req
*req
= tevent_req_callback_data(
3585 subreq
, struct tevent_req
);
3586 struct rpccli_winreg_SaveKey_state
*state
= tevent_req_data(
3587 req
, struct rpccli_winreg_SaveKey_state
);
3589 TALLOC_CTX
*mem_ctx
;
3591 if (state
->out_mem_ctx
) {
3592 mem_ctx
= state
->out_mem_ctx
;
3597 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3598 TALLOC_FREE(subreq
);
3599 if (!NT_STATUS_IS_OK(status
)) {
3600 tevent_req_nterror(req
, status
);
3604 /* Copy out parameters */
3607 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3609 /* Reset temporary structure */
3610 ZERO_STRUCT(state
->tmp
);
3612 if (DEBUGLEVEL
>= 10) {
3613 NDR_PRINT_OUT_DEBUG(winreg_SaveKey
, &state
->orig
);
3616 tevent_req_done(req
);
3619 NTSTATUS
rpccli_winreg_SaveKey_recv(struct tevent_req
*req
,
3620 TALLOC_CTX
*mem_ctx
,
3623 struct rpccli_winreg_SaveKey_state
*state
= tevent_req_data(
3624 req
, struct rpccli_winreg_SaveKey_state
);
3627 if (tevent_req_is_nterror(req
, &status
)) {
3628 tevent_req_received(req
);
3632 /* Steal possbile out parameters to the callers context */
3633 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3636 *result
= state
->orig
.out
.result
;
3638 tevent_req_received(req
);
3639 return NT_STATUS_OK
;
3642 NTSTATUS
rpccli_winreg_SaveKey(struct rpc_pipe_client
*cli
,
3643 TALLOC_CTX
*mem_ctx
,
3644 struct policy_handle
*handle
/* [in] [ref] */,
3645 struct winreg_String
*filename
/* [in] [ref] */,
3646 struct KeySecurityAttribute
*sec_attrib
/* [in] [unique] */,
3649 struct winreg_SaveKey r
;
3653 r
.in
.handle
= handle
;
3654 r
.in
.filename
= filename
;
3655 r
.in
.sec_attrib
= sec_attrib
;
3657 if (DEBUGLEVEL
>= 10) {
3658 NDR_PRINT_IN_DEBUG(winreg_SaveKey
, &r
);
3661 status
= cli
->dispatch(cli
,
3667 if (!NT_STATUS_IS_OK(status
)) {
3671 if (DEBUGLEVEL
>= 10) {
3672 NDR_PRINT_OUT_DEBUG(winreg_SaveKey
, &r
);
3675 if (NT_STATUS_IS_ERR(status
)) {
3679 /* Return variables */
3683 *werror
= r
.out
.result
;
3686 return werror_to_ntstatus(r
.out
.result
);
3689 struct rpccli_winreg_SetKeySecurity_state
{
3690 struct winreg_SetKeySecurity orig
;
3691 struct winreg_SetKeySecurity tmp
;
3692 TALLOC_CTX
*out_mem_ctx
;
3693 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3696 static void rpccli_winreg_SetKeySecurity_done(struct tevent_req
*subreq
);
3698 struct tevent_req
*rpccli_winreg_SetKeySecurity_send(TALLOC_CTX
*mem_ctx
,
3699 struct tevent_context
*ev
,
3700 struct rpc_pipe_client
*cli
,
3701 struct policy_handle
*_handle
/* [in] [ref] */,
3702 uint32_t _sec_info
/* [in] */,
3703 struct KeySecurityData
*_sd
/* [in] [ref] */)
3705 struct tevent_req
*req
;
3706 struct rpccli_winreg_SetKeySecurity_state
*state
;
3707 struct tevent_req
*subreq
;
3709 req
= tevent_req_create(mem_ctx
, &state
,
3710 struct rpccli_winreg_SetKeySecurity_state
);
3714 state
->out_mem_ctx
= NULL
;
3715 state
->dispatch_recv
= cli
->dispatch_recv
;
3718 state
->orig
.in
.handle
= _handle
;
3719 state
->orig
.in
.sec_info
= _sec_info
;
3720 state
->orig
.in
.sd
= _sd
;
3722 /* Out parameters */
3725 ZERO_STRUCT(state
->orig
.out
.result
);
3727 if (DEBUGLEVEL
>= 10) {
3728 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity
, &state
->orig
);
3731 /* make a temporary copy, that we pass to the dispatch function */
3732 state
->tmp
= state
->orig
;
3734 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3736 NDR_WINREG_SETKEYSECURITY
,
3738 if (tevent_req_nomem(subreq
, req
)) {
3739 return tevent_req_post(req
, ev
);
3741 tevent_req_set_callback(subreq
, rpccli_winreg_SetKeySecurity_done
, req
);
3745 static void rpccli_winreg_SetKeySecurity_done(struct tevent_req
*subreq
)
3747 struct tevent_req
*req
= tevent_req_callback_data(
3748 subreq
, struct tevent_req
);
3749 struct rpccli_winreg_SetKeySecurity_state
*state
= tevent_req_data(
3750 req
, struct rpccli_winreg_SetKeySecurity_state
);
3752 TALLOC_CTX
*mem_ctx
;
3754 if (state
->out_mem_ctx
) {
3755 mem_ctx
= state
->out_mem_ctx
;
3760 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3761 TALLOC_FREE(subreq
);
3762 if (!NT_STATUS_IS_OK(status
)) {
3763 tevent_req_nterror(req
, status
);
3767 /* Copy out parameters */
3770 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3772 /* Reset temporary structure */
3773 ZERO_STRUCT(state
->tmp
);
3775 if (DEBUGLEVEL
>= 10) {
3776 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity
, &state
->orig
);
3779 tevent_req_done(req
);
3782 NTSTATUS
rpccli_winreg_SetKeySecurity_recv(struct tevent_req
*req
,
3783 TALLOC_CTX
*mem_ctx
,
3786 struct rpccli_winreg_SetKeySecurity_state
*state
= tevent_req_data(
3787 req
, struct rpccli_winreg_SetKeySecurity_state
);
3790 if (tevent_req_is_nterror(req
, &status
)) {
3791 tevent_req_received(req
);
3795 /* Steal possbile out parameters to the callers context */
3796 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3799 *result
= state
->orig
.out
.result
;
3801 tevent_req_received(req
);
3802 return NT_STATUS_OK
;
3805 NTSTATUS
rpccli_winreg_SetKeySecurity(struct rpc_pipe_client
*cli
,
3806 TALLOC_CTX
*mem_ctx
,
3807 struct policy_handle
*handle
/* [in] [ref] */,
3808 uint32_t sec_info
/* [in] */,
3809 struct KeySecurityData
*sd
/* [in] [ref] */,
3812 struct winreg_SetKeySecurity r
;
3816 r
.in
.handle
= handle
;
3817 r
.in
.sec_info
= sec_info
;
3820 if (DEBUGLEVEL
>= 10) {
3821 NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity
, &r
);
3824 status
= cli
->dispatch(cli
,
3827 NDR_WINREG_SETKEYSECURITY
,
3830 if (!NT_STATUS_IS_OK(status
)) {
3834 if (DEBUGLEVEL
>= 10) {
3835 NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity
, &r
);
3838 if (NT_STATUS_IS_ERR(status
)) {
3842 /* Return variables */
3846 *werror
= r
.out
.result
;
3849 return werror_to_ntstatus(r
.out
.result
);
3852 struct rpccli_winreg_SetValue_state
{
3853 struct winreg_SetValue orig
;
3854 struct winreg_SetValue tmp
;
3855 TALLOC_CTX
*out_mem_ctx
;
3856 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3859 static void rpccli_winreg_SetValue_done(struct tevent_req
*subreq
);
3861 struct tevent_req
*rpccli_winreg_SetValue_send(TALLOC_CTX
*mem_ctx
,
3862 struct tevent_context
*ev
,
3863 struct rpc_pipe_client
*cli
,
3864 struct policy_handle
*_handle
/* [in] [ref] */,
3865 struct winreg_String _name
/* [in] */,
3866 enum winreg_Type _type
/* [in] */,
3867 uint8_t *_data
/* [in] [ref,size_is(size)] */,
3868 uint32_t _size
/* [in] */)
3870 struct tevent_req
*req
;
3871 struct rpccli_winreg_SetValue_state
*state
;
3872 struct tevent_req
*subreq
;
3874 req
= tevent_req_create(mem_ctx
, &state
,
3875 struct rpccli_winreg_SetValue_state
);
3879 state
->out_mem_ctx
= NULL
;
3880 state
->dispatch_recv
= cli
->dispatch_recv
;
3883 state
->orig
.in
.handle
= _handle
;
3884 state
->orig
.in
.name
= _name
;
3885 state
->orig
.in
.type
= _type
;
3886 state
->orig
.in
.data
= _data
;
3887 state
->orig
.in
.size
= _size
;
3889 /* Out parameters */
3892 ZERO_STRUCT(state
->orig
.out
.result
);
3894 if (DEBUGLEVEL
>= 10) {
3895 NDR_PRINT_IN_DEBUG(winreg_SetValue
, &state
->orig
);
3898 /* make a temporary copy, that we pass to the dispatch function */
3899 state
->tmp
= state
->orig
;
3901 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3903 NDR_WINREG_SETVALUE
,
3905 if (tevent_req_nomem(subreq
, req
)) {
3906 return tevent_req_post(req
, ev
);
3908 tevent_req_set_callback(subreq
, rpccli_winreg_SetValue_done
, req
);
3912 static void rpccli_winreg_SetValue_done(struct tevent_req
*subreq
)
3914 struct tevent_req
*req
= tevent_req_callback_data(
3915 subreq
, struct tevent_req
);
3916 struct rpccli_winreg_SetValue_state
*state
= tevent_req_data(
3917 req
, struct rpccli_winreg_SetValue_state
);
3919 TALLOC_CTX
*mem_ctx
;
3921 if (state
->out_mem_ctx
) {
3922 mem_ctx
= state
->out_mem_ctx
;
3927 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3928 TALLOC_FREE(subreq
);
3929 if (!NT_STATUS_IS_OK(status
)) {
3930 tevent_req_nterror(req
, status
);
3934 /* Copy out parameters */
3937 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3939 /* Reset temporary structure */
3940 ZERO_STRUCT(state
->tmp
);
3942 if (DEBUGLEVEL
>= 10) {
3943 NDR_PRINT_OUT_DEBUG(winreg_SetValue
, &state
->orig
);
3946 tevent_req_done(req
);
3949 NTSTATUS
rpccli_winreg_SetValue_recv(struct tevent_req
*req
,
3950 TALLOC_CTX
*mem_ctx
,
3953 struct rpccli_winreg_SetValue_state
*state
= tevent_req_data(
3954 req
, struct rpccli_winreg_SetValue_state
);
3957 if (tevent_req_is_nterror(req
, &status
)) {
3958 tevent_req_received(req
);
3962 /* Steal possbile out parameters to the callers context */
3963 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3966 *result
= state
->orig
.out
.result
;
3968 tevent_req_received(req
);
3969 return NT_STATUS_OK
;
3972 NTSTATUS
rpccli_winreg_SetValue(struct rpc_pipe_client
*cli
,
3973 TALLOC_CTX
*mem_ctx
,
3974 struct policy_handle
*handle
/* [in] [ref] */,
3975 struct winreg_String name
/* [in] */,
3976 enum winreg_Type type
/* [in] */,
3977 uint8_t *data
/* [in] [ref,size_is(size)] */,
3978 uint32_t size
/* [in] */,
3981 struct winreg_SetValue r
;
3985 r
.in
.handle
= handle
;
3991 if (DEBUGLEVEL
>= 10) {
3992 NDR_PRINT_IN_DEBUG(winreg_SetValue
, &r
);
3995 status
= cli
->dispatch(cli
,
3998 NDR_WINREG_SETVALUE
,
4001 if (!NT_STATUS_IS_OK(status
)) {
4005 if (DEBUGLEVEL
>= 10) {
4006 NDR_PRINT_OUT_DEBUG(winreg_SetValue
, &r
);
4009 if (NT_STATUS_IS_ERR(status
)) {
4013 /* Return variables */
4017 *werror
= r
.out
.result
;
4020 return werror_to_ntstatus(r
.out
.result
);
4023 struct rpccli_winreg_UnLoadKey_state
{
4024 struct winreg_UnLoadKey orig
;
4025 struct winreg_UnLoadKey tmp
;
4026 TALLOC_CTX
*out_mem_ctx
;
4027 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4030 static void rpccli_winreg_UnLoadKey_done(struct tevent_req
*subreq
);
4032 struct tevent_req
*rpccli_winreg_UnLoadKey_send(TALLOC_CTX
*mem_ctx
,
4033 struct tevent_context
*ev
,
4034 struct rpc_pipe_client
*cli
)
4036 struct tevent_req
*req
;
4037 struct rpccli_winreg_UnLoadKey_state
*state
;
4038 struct tevent_req
*subreq
;
4040 req
= tevent_req_create(mem_ctx
, &state
,
4041 struct rpccli_winreg_UnLoadKey_state
);
4045 state
->out_mem_ctx
= NULL
;
4046 state
->dispatch_recv
= cli
->dispatch_recv
;
4050 /* Out parameters */
4053 ZERO_STRUCT(state
->orig
.out
.result
);
4055 if (DEBUGLEVEL
>= 10) {
4056 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey
, &state
->orig
);
4059 /* make a temporary copy, that we pass to the dispatch function */
4060 state
->tmp
= state
->orig
;
4062 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4064 NDR_WINREG_UNLOADKEY
,
4066 if (tevent_req_nomem(subreq
, req
)) {
4067 return tevent_req_post(req
, ev
);
4069 tevent_req_set_callback(subreq
, rpccli_winreg_UnLoadKey_done
, req
);
4073 static void rpccli_winreg_UnLoadKey_done(struct tevent_req
*subreq
)
4075 struct tevent_req
*req
= tevent_req_callback_data(
4076 subreq
, struct tevent_req
);
4077 struct rpccli_winreg_UnLoadKey_state
*state
= tevent_req_data(
4078 req
, struct rpccli_winreg_UnLoadKey_state
);
4080 TALLOC_CTX
*mem_ctx
;
4082 if (state
->out_mem_ctx
) {
4083 mem_ctx
= state
->out_mem_ctx
;
4088 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4089 TALLOC_FREE(subreq
);
4090 if (!NT_STATUS_IS_OK(status
)) {
4091 tevent_req_nterror(req
, status
);
4095 /* Copy out parameters */
4098 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4100 /* Reset temporary structure */
4101 ZERO_STRUCT(state
->tmp
);
4103 if (DEBUGLEVEL
>= 10) {
4104 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey
, &state
->orig
);
4107 tevent_req_done(req
);
4110 NTSTATUS
rpccli_winreg_UnLoadKey_recv(struct tevent_req
*req
,
4111 TALLOC_CTX
*mem_ctx
,
4114 struct rpccli_winreg_UnLoadKey_state
*state
= tevent_req_data(
4115 req
, struct rpccli_winreg_UnLoadKey_state
);
4118 if (tevent_req_is_nterror(req
, &status
)) {
4119 tevent_req_received(req
);
4123 /* Steal possbile out parameters to the callers context */
4124 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4127 *result
= state
->orig
.out
.result
;
4129 tevent_req_received(req
);
4130 return NT_STATUS_OK
;
4133 NTSTATUS
rpccli_winreg_UnLoadKey(struct rpc_pipe_client
*cli
,
4134 TALLOC_CTX
*mem_ctx
,
4137 struct winreg_UnLoadKey r
;
4142 if (DEBUGLEVEL
>= 10) {
4143 NDR_PRINT_IN_DEBUG(winreg_UnLoadKey
, &r
);
4146 status
= cli
->dispatch(cli
,
4149 NDR_WINREG_UNLOADKEY
,
4152 if (!NT_STATUS_IS_OK(status
)) {
4156 if (DEBUGLEVEL
>= 10) {
4157 NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey
, &r
);
4160 if (NT_STATUS_IS_ERR(status
)) {
4164 /* Return variables */
4168 *werror
= r
.out
.result
;
4171 return werror_to_ntstatus(r
.out
.result
);
4174 struct rpccli_winreg_InitiateSystemShutdown_state
{
4175 struct winreg_InitiateSystemShutdown orig
;
4176 struct winreg_InitiateSystemShutdown tmp
;
4177 TALLOC_CTX
*out_mem_ctx
;
4178 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4181 static void rpccli_winreg_InitiateSystemShutdown_done(struct tevent_req
*subreq
);
4183 struct tevent_req
*rpccli_winreg_InitiateSystemShutdown_send(TALLOC_CTX
*mem_ctx
,
4184 struct tevent_context
*ev
,
4185 struct rpc_pipe_client
*cli
,
4186 uint16_t *_hostname
/* [in] [unique] */,
4187 struct lsa_StringLarge
*_message
/* [in] [unique] */,
4188 uint32_t _timeout
/* [in] */,
4189 uint8_t _force_apps
/* [in] */,
4190 uint8_t _do_reboot
/* [in] */)
4192 struct tevent_req
*req
;
4193 struct rpccli_winreg_InitiateSystemShutdown_state
*state
;
4194 struct tevent_req
*subreq
;
4196 req
= tevent_req_create(mem_ctx
, &state
,
4197 struct rpccli_winreg_InitiateSystemShutdown_state
);
4201 state
->out_mem_ctx
= NULL
;
4202 state
->dispatch_recv
= cli
->dispatch_recv
;
4205 state
->orig
.in
.hostname
= _hostname
;
4206 state
->orig
.in
.message
= _message
;
4207 state
->orig
.in
.timeout
= _timeout
;
4208 state
->orig
.in
.force_apps
= _force_apps
;
4209 state
->orig
.in
.do_reboot
= _do_reboot
;
4211 /* Out parameters */
4214 ZERO_STRUCT(state
->orig
.out
.result
);
4216 if (DEBUGLEVEL
>= 10) {
4217 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown
, &state
->orig
);
4220 /* make a temporary copy, that we pass to the dispatch function */
4221 state
->tmp
= state
->orig
;
4223 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4225 NDR_WINREG_INITIATESYSTEMSHUTDOWN
,
4227 if (tevent_req_nomem(subreq
, req
)) {
4228 return tevent_req_post(req
, ev
);
4230 tevent_req_set_callback(subreq
, rpccli_winreg_InitiateSystemShutdown_done
, req
);
4234 static void rpccli_winreg_InitiateSystemShutdown_done(struct tevent_req
*subreq
)
4236 struct tevent_req
*req
= tevent_req_callback_data(
4237 subreq
, struct tevent_req
);
4238 struct rpccli_winreg_InitiateSystemShutdown_state
*state
= tevent_req_data(
4239 req
, struct rpccli_winreg_InitiateSystemShutdown_state
);
4241 TALLOC_CTX
*mem_ctx
;
4243 if (state
->out_mem_ctx
) {
4244 mem_ctx
= state
->out_mem_ctx
;
4249 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4250 TALLOC_FREE(subreq
);
4251 if (!NT_STATUS_IS_OK(status
)) {
4252 tevent_req_nterror(req
, status
);
4256 /* Copy out parameters */
4259 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4261 /* Reset temporary structure */
4262 ZERO_STRUCT(state
->tmp
);
4264 if (DEBUGLEVEL
>= 10) {
4265 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown
, &state
->orig
);
4268 tevent_req_done(req
);
4271 NTSTATUS
rpccli_winreg_InitiateSystemShutdown_recv(struct tevent_req
*req
,
4272 TALLOC_CTX
*mem_ctx
,
4275 struct rpccli_winreg_InitiateSystemShutdown_state
*state
= tevent_req_data(
4276 req
, struct rpccli_winreg_InitiateSystemShutdown_state
);
4279 if (tevent_req_is_nterror(req
, &status
)) {
4280 tevent_req_received(req
);
4284 /* Steal possbile out parameters to the callers context */
4285 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4288 *result
= state
->orig
.out
.result
;
4290 tevent_req_received(req
);
4291 return NT_STATUS_OK
;
4294 NTSTATUS
rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client
*cli
,
4295 TALLOC_CTX
*mem_ctx
,
4296 uint16_t *hostname
/* [in] [unique] */,
4297 struct lsa_StringLarge
*message
/* [in] [unique] */,
4298 uint32_t timeout
/* [in] */,
4299 uint8_t force_apps
/* [in] */,
4300 uint8_t do_reboot
/* [in] */,
4303 struct winreg_InitiateSystemShutdown r
;
4307 r
.in
.hostname
= hostname
;
4308 r
.in
.message
= message
;
4309 r
.in
.timeout
= timeout
;
4310 r
.in
.force_apps
= force_apps
;
4311 r
.in
.do_reboot
= do_reboot
;
4313 if (DEBUGLEVEL
>= 10) {
4314 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown
, &r
);
4317 status
= cli
->dispatch(cli
,
4320 NDR_WINREG_INITIATESYSTEMSHUTDOWN
,
4323 if (!NT_STATUS_IS_OK(status
)) {
4327 if (DEBUGLEVEL
>= 10) {
4328 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown
, &r
);
4331 if (NT_STATUS_IS_ERR(status
)) {
4335 /* Return variables */
4339 *werror
= r
.out
.result
;
4342 return werror_to_ntstatus(r
.out
.result
);
4345 struct rpccli_winreg_AbortSystemShutdown_state
{
4346 struct winreg_AbortSystemShutdown orig
;
4347 struct winreg_AbortSystemShutdown tmp
;
4348 TALLOC_CTX
*out_mem_ctx
;
4349 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4352 static void rpccli_winreg_AbortSystemShutdown_done(struct tevent_req
*subreq
);
4354 struct tevent_req
*rpccli_winreg_AbortSystemShutdown_send(TALLOC_CTX
*mem_ctx
,
4355 struct tevent_context
*ev
,
4356 struct rpc_pipe_client
*cli
,
4357 uint16_t *_server
/* [in] [unique] */)
4359 struct tevent_req
*req
;
4360 struct rpccli_winreg_AbortSystemShutdown_state
*state
;
4361 struct tevent_req
*subreq
;
4363 req
= tevent_req_create(mem_ctx
, &state
,
4364 struct rpccli_winreg_AbortSystemShutdown_state
);
4368 state
->out_mem_ctx
= NULL
;
4369 state
->dispatch_recv
= cli
->dispatch_recv
;
4372 state
->orig
.in
.server
= _server
;
4374 /* Out parameters */
4377 ZERO_STRUCT(state
->orig
.out
.result
);
4379 if (DEBUGLEVEL
>= 10) {
4380 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown
, &state
->orig
);
4383 /* make a temporary copy, that we pass to the dispatch function */
4384 state
->tmp
= state
->orig
;
4386 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4388 NDR_WINREG_ABORTSYSTEMSHUTDOWN
,
4390 if (tevent_req_nomem(subreq
, req
)) {
4391 return tevent_req_post(req
, ev
);
4393 tevent_req_set_callback(subreq
, rpccli_winreg_AbortSystemShutdown_done
, req
);
4397 static void rpccli_winreg_AbortSystemShutdown_done(struct tevent_req
*subreq
)
4399 struct tevent_req
*req
= tevent_req_callback_data(
4400 subreq
, struct tevent_req
);
4401 struct rpccli_winreg_AbortSystemShutdown_state
*state
= tevent_req_data(
4402 req
, struct rpccli_winreg_AbortSystemShutdown_state
);
4404 TALLOC_CTX
*mem_ctx
;
4406 if (state
->out_mem_ctx
) {
4407 mem_ctx
= state
->out_mem_ctx
;
4412 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4413 TALLOC_FREE(subreq
);
4414 if (!NT_STATUS_IS_OK(status
)) {
4415 tevent_req_nterror(req
, status
);
4419 /* Copy out parameters */
4422 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4424 /* Reset temporary structure */
4425 ZERO_STRUCT(state
->tmp
);
4427 if (DEBUGLEVEL
>= 10) {
4428 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown
, &state
->orig
);
4431 tevent_req_done(req
);
4434 NTSTATUS
rpccli_winreg_AbortSystemShutdown_recv(struct tevent_req
*req
,
4435 TALLOC_CTX
*mem_ctx
,
4438 struct rpccli_winreg_AbortSystemShutdown_state
*state
= tevent_req_data(
4439 req
, struct rpccli_winreg_AbortSystemShutdown_state
);
4442 if (tevent_req_is_nterror(req
, &status
)) {
4443 tevent_req_received(req
);
4447 /* Steal possbile out parameters to the callers context */
4448 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4451 *result
= state
->orig
.out
.result
;
4453 tevent_req_received(req
);
4454 return NT_STATUS_OK
;
4457 NTSTATUS
rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client
*cli
,
4458 TALLOC_CTX
*mem_ctx
,
4459 uint16_t *server
/* [in] [unique] */,
4462 struct winreg_AbortSystemShutdown r
;
4466 r
.in
.server
= server
;
4468 if (DEBUGLEVEL
>= 10) {
4469 NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown
, &r
);
4472 status
= cli
->dispatch(cli
,
4475 NDR_WINREG_ABORTSYSTEMSHUTDOWN
,
4478 if (!NT_STATUS_IS_OK(status
)) {
4482 if (DEBUGLEVEL
>= 10) {
4483 NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown
, &r
);
4486 if (NT_STATUS_IS_ERR(status
)) {
4490 /* Return variables */
4494 *werror
= r
.out
.result
;
4497 return werror_to_ntstatus(r
.out
.result
);
4500 struct rpccli_winreg_GetVersion_state
{
4501 struct winreg_GetVersion orig
;
4502 struct winreg_GetVersion tmp
;
4503 TALLOC_CTX
*out_mem_ctx
;
4504 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4507 static void rpccli_winreg_GetVersion_done(struct tevent_req
*subreq
);
4509 struct tevent_req
*rpccli_winreg_GetVersion_send(TALLOC_CTX
*mem_ctx
,
4510 struct tevent_context
*ev
,
4511 struct rpc_pipe_client
*cli
,
4512 struct policy_handle
*_handle
/* [in] [ref] */,
4513 uint32_t *_version
/* [out] [ref] */)
4515 struct tevent_req
*req
;
4516 struct rpccli_winreg_GetVersion_state
*state
;
4517 struct tevent_req
*subreq
;
4519 req
= tevent_req_create(mem_ctx
, &state
,
4520 struct rpccli_winreg_GetVersion_state
);
4524 state
->out_mem_ctx
= NULL
;
4525 state
->dispatch_recv
= cli
->dispatch_recv
;
4528 state
->orig
.in
.handle
= _handle
;
4530 /* Out parameters */
4531 state
->orig
.out
.version
= _version
;
4534 ZERO_STRUCT(state
->orig
.out
.result
);
4536 if (DEBUGLEVEL
>= 10) {
4537 NDR_PRINT_IN_DEBUG(winreg_GetVersion
, &state
->orig
);
4540 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4541 "rpccli_winreg_GetVersion_out_memory");
4542 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4543 return tevent_req_post(req
, ev
);
4546 /* make a temporary copy, that we pass to the dispatch function */
4547 state
->tmp
= state
->orig
;
4549 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4551 NDR_WINREG_GETVERSION
,
4553 if (tevent_req_nomem(subreq
, req
)) {
4554 return tevent_req_post(req
, ev
);
4556 tevent_req_set_callback(subreq
, rpccli_winreg_GetVersion_done
, req
);
4560 static void rpccli_winreg_GetVersion_done(struct tevent_req
*subreq
)
4562 struct tevent_req
*req
= tevent_req_callback_data(
4563 subreq
, struct tevent_req
);
4564 struct rpccli_winreg_GetVersion_state
*state
= tevent_req_data(
4565 req
, struct rpccli_winreg_GetVersion_state
);
4567 TALLOC_CTX
*mem_ctx
;
4569 if (state
->out_mem_ctx
) {
4570 mem_ctx
= state
->out_mem_ctx
;
4575 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4576 TALLOC_FREE(subreq
);
4577 if (!NT_STATUS_IS_OK(status
)) {
4578 tevent_req_nterror(req
, status
);
4582 /* Copy out parameters */
4583 *state
->orig
.out
.version
= *state
->tmp
.out
.version
;
4586 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4588 /* Reset temporary structure */
4589 ZERO_STRUCT(state
->tmp
);
4591 if (DEBUGLEVEL
>= 10) {
4592 NDR_PRINT_OUT_DEBUG(winreg_GetVersion
, &state
->orig
);
4595 tevent_req_done(req
);
4598 NTSTATUS
rpccli_winreg_GetVersion_recv(struct tevent_req
*req
,
4599 TALLOC_CTX
*mem_ctx
,
4602 struct rpccli_winreg_GetVersion_state
*state
= tevent_req_data(
4603 req
, struct rpccli_winreg_GetVersion_state
);
4606 if (tevent_req_is_nterror(req
, &status
)) {
4607 tevent_req_received(req
);
4611 /* Steal possbile out parameters to the callers context */
4612 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4615 *result
= state
->orig
.out
.result
;
4617 tevent_req_received(req
);
4618 return NT_STATUS_OK
;
4621 NTSTATUS
rpccli_winreg_GetVersion(struct rpc_pipe_client
*cli
,
4622 TALLOC_CTX
*mem_ctx
,
4623 struct policy_handle
*handle
/* [in] [ref] */,
4624 uint32_t *version
/* [out] [ref] */,
4627 struct winreg_GetVersion r
;
4631 r
.in
.handle
= handle
;
4633 if (DEBUGLEVEL
>= 10) {
4634 NDR_PRINT_IN_DEBUG(winreg_GetVersion
, &r
);
4637 status
= cli
->dispatch(cli
,
4640 NDR_WINREG_GETVERSION
,
4643 if (!NT_STATUS_IS_OK(status
)) {
4647 if (DEBUGLEVEL
>= 10) {
4648 NDR_PRINT_OUT_DEBUG(winreg_GetVersion
, &r
);
4651 if (NT_STATUS_IS_ERR(status
)) {
4655 /* Return variables */
4656 *version
= *r
.out
.version
;
4660 *werror
= r
.out
.result
;
4663 return werror_to_ntstatus(r
.out
.result
);
4666 struct rpccli_winreg_OpenHKCC_state
{
4667 struct winreg_OpenHKCC orig
;
4668 struct winreg_OpenHKCC tmp
;
4669 TALLOC_CTX
*out_mem_ctx
;
4670 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4673 static void rpccli_winreg_OpenHKCC_done(struct tevent_req
*subreq
);
4675 struct tevent_req
*rpccli_winreg_OpenHKCC_send(TALLOC_CTX
*mem_ctx
,
4676 struct tevent_context
*ev
,
4677 struct rpc_pipe_client
*cli
,
4678 uint16_t *_system_name
/* [in] [unique] */,
4679 uint32_t _access_mask
/* [in] */,
4680 struct policy_handle
*_handle
/* [out] [ref] */)
4682 struct tevent_req
*req
;
4683 struct rpccli_winreg_OpenHKCC_state
*state
;
4684 struct tevent_req
*subreq
;
4686 req
= tevent_req_create(mem_ctx
, &state
,
4687 struct rpccli_winreg_OpenHKCC_state
);
4691 state
->out_mem_ctx
= NULL
;
4692 state
->dispatch_recv
= cli
->dispatch_recv
;
4695 state
->orig
.in
.system_name
= _system_name
;
4696 state
->orig
.in
.access_mask
= _access_mask
;
4698 /* Out parameters */
4699 state
->orig
.out
.handle
= _handle
;
4702 ZERO_STRUCT(state
->orig
.out
.result
);
4704 if (DEBUGLEVEL
>= 10) {
4705 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC
, &state
->orig
);
4708 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4709 "rpccli_winreg_OpenHKCC_out_memory");
4710 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4711 return tevent_req_post(req
, ev
);
4714 /* make a temporary copy, that we pass to the dispatch function */
4715 state
->tmp
= state
->orig
;
4717 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4719 NDR_WINREG_OPENHKCC
,
4721 if (tevent_req_nomem(subreq
, req
)) {
4722 return tevent_req_post(req
, ev
);
4724 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKCC_done
, req
);
4728 static void rpccli_winreg_OpenHKCC_done(struct tevent_req
*subreq
)
4730 struct tevent_req
*req
= tevent_req_callback_data(
4731 subreq
, struct tevent_req
);
4732 struct rpccli_winreg_OpenHKCC_state
*state
= tevent_req_data(
4733 req
, struct rpccli_winreg_OpenHKCC_state
);
4735 TALLOC_CTX
*mem_ctx
;
4737 if (state
->out_mem_ctx
) {
4738 mem_ctx
= state
->out_mem_ctx
;
4743 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4744 TALLOC_FREE(subreq
);
4745 if (!NT_STATUS_IS_OK(status
)) {
4746 tevent_req_nterror(req
, status
);
4750 /* Copy out parameters */
4751 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
4754 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4756 /* Reset temporary structure */
4757 ZERO_STRUCT(state
->tmp
);
4759 if (DEBUGLEVEL
>= 10) {
4760 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC
, &state
->orig
);
4763 tevent_req_done(req
);
4766 NTSTATUS
rpccli_winreg_OpenHKCC_recv(struct tevent_req
*req
,
4767 TALLOC_CTX
*mem_ctx
,
4770 struct rpccli_winreg_OpenHKCC_state
*state
= tevent_req_data(
4771 req
, struct rpccli_winreg_OpenHKCC_state
);
4774 if (tevent_req_is_nterror(req
, &status
)) {
4775 tevent_req_received(req
);
4779 /* Steal possbile out parameters to the callers context */
4780 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4783 *result
= state
->orig
.out
.result
;
4785 tevent_req_received(req
);
4786 return NT_STATUS_OK
;
4789 NTSTATUS
rpccli_winreg_OpenHKCC(struct rpc_pipe_client
*cli
,
4790 TALLOC_CTX
*mem_ctx
,
4791 uint16_t *system_name
/* [in] [unique] */,
4792 uint32_t access_mask
/* [in] */,
4793 struct policy_handle
*handle
/* [out] [ref] */,
4796 struct winreg_OpenHKCC r
;
4800 r
.in
.system_name
= system_name
;
4801 r
.in
.access_mask
= access_mask
;
4803 if (DEBUGLEVEL
>= 10) {
4804 NDR_PRINT_IN_DEBUG(winreg_OpenHKCC
, &r
);
4807 status
= cli
->dispatch(cli
,
4810 NDR_WINREG_OPENHKCC
,
4813 if (!NT_STATUS_IS_OK(status
)) {
4817 if (DEBUGLEVEL
>= 10) {
4818 NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC
, &r
);
4821 if (NT_STATUS_IS_ERR(status
)) {
4825 /* Return variables */
4826 *handle
= *r
.out
.handle
;
4830 *werror
= r
.out
.result
;
4833 return werror_to_ntstatus(r
.out
.result
);
4836 struct rpccli_winreg_OpenHKDD_state
{
4837 struct winreg_OpenHKDD orig
;
4838 struct winreg_OpenHKDD tmp
;
4839 TALLOC_CTX
*out_mem_ctx
;
4840 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4843 static void rpccli_winreg_OpenHKDD_done(struct tevent_req
*subreq
);
4845 struct tevent_req
*rpccli_winreg_OpenHKDD_send(TALLOC_CTX
*mem_ctx
,
4846 struct tevent_context
*ev
,
4847 struct rpc_pipe_client
*cli
,
4848 uint16_t *_system_name
/* [in] [unique] */,
4849 uint32_t _access_mask
/* [in] */,
4850 struct policy_handle
*_handle
/* [out] [ref] */)
4852 struct tevent_req
*req
;
4853 struct rpccli_winreg_OpenHKDD_state
*state
;
4854 struct tevent_req
*subreq
;
4856 req
= tevent_req_create(mem_ctx
, &state
,
4857 struct rpccli_winreg_OpenHKDD_state
);
4861 state
->out_mem_ctx
= NULL
;
4862 state
->dispatch_recv
= cli
->dispatch_recv
;
4865 state
->orig
.in
.system_name
= _system_name
;
4866 state
->orig
.in
.access_mask
= _access_mask
;
4868 /* Out parameters */
4869 state
->orig
.out
.handle
= _handle
;
4872 ZERO_STRUCT(state
->orig
.out
.result
);
4874 if (DEBUGLEVEL
>= 10) {
4875 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD
, &state
->orig
);
4878 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4879 "rpccli_winreg_OpenHKDD_out_memory");
4880 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4881 return tevent_req_post(req
, ev
);
4884 /* make a temporary copy, that we pass to the dispatch function */
4885 state
->tmp
= state
->orig
;
4887 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4889 NDR_WINREG_OPENHKDD
,
4891 if (tevent_req_nomem(subreq
, req
)) {
4892 return tevent_req_post(req
, ev
);
4894 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKDD_done
, req
);
4898 static void rpccli_winreg_OpenHKDD_done(struct tevent_req
*subreq
)
4900 struct tevent_req
*req
= tevent_req_callback_data(
4901 subreq
, struct tevent_req
);
4902 struct rpccli_winreg_OpenHKDD_state
*state
= tevent_req_data(
4903 req
, struct rpccli_winreg_OpenHKDD_state
);
4905 TALLOC_CTX
*mem_ctx
;
4907 if (state
->out_mem_ctx
) {
4908 mem_ctx
= state
->out_mem_ctx
;
4913 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4914 TALLOC_FREE(subreq
);
4915 if (!NT_STATUS_IS_OK(status
)) {
4916 tevent_req_nterror(req
, status
);
4920 /* Copy out parameters */
4921 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
4924 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4926 /* Reset temporary structure */
4927 ZERO_STRUCT(state
->tmp
);
4929 if (DEBUGLEVEL
>= 10) {
4930 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD
, &state
->orig
);
4933 tevent_req_done(req
);
4936 NTSTATUS
rpccli_winreg_OpenHKDD_recv(struct tevent_req
*req
,
4937 TALLOC_CTX
*mem_ctx
,
4940 struct rpccli_winreg_OpenHKDD_state
*state
= tevent_req_data(
4941 req
, struct rpccli_winreg_OpenHKDD_state
);
4944 if (tevent_req_is_nterror(req
, &status
)) {
4945 tevent_req_received(req
);
4949 /* Steal possbile out parameters to the callers context */
4950 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4953 *result
= state
->orig
.out
.result
;
4955 tevent_req_received(req
);
4956 return NT_STATUS_OK
;
4959 NTSTATUS
rpccli_winreg_OpenHKDD(struct rpc_pipe_client
*cli
,
4960 TALLOC_CTX
*mem_ctx
,
4961 uint16_t *system_name
/* [in] [unique] */,
4962 uint32_t access_mask
/* [in] */,
4963 struct policy_handle
*handle
/* [out] [ref] */,
4966 struct winreg_OpenHKDD r
;
4970 r
.in
.system_name
= system_name
;
4971 r
.in
.access_mask
= access_mask
;
4973 if (DEBUGLEVEL
>= 10) {
4974 NDR_PRINT_IN_DEBUG(winreg_OpenHKDD
, &r
);
4977 status
= cli
->dispatch(cli
,
4980 NDR_WINREG_OPENHKDD
,
4983 if (!NT_STATUS_IS_OK(status
)) {
4987 if (DEBUGLEVEL
>= 10) {
4988 NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD
, &r
);
4991 if (NT_STATUS_IS_ERR(status
)) {
4995 /* Return variables */
4996 *handle
= *r
.out
.handle
;
5000 *werror
= r
.out
.result
;
5003 return werror_to_ntstatus(r
.out
.result
);
5006 struct rpccli_winreg_QueryMultipleValues_state
{
5007 struct winreg_QueryMultipleValues orig
;
5008 struct winreg_QueryMultipleValues tmp
;
5009 TALLOC_CTX
*out_mem_ctx
;
5010 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5013 static void rpccli_winreg_QueryMultipleValues_done(struct tevent_req
*subreq
);
5015 struct tevent_req
*rpccli_winreg_QueryMultipleValues_send(TALLOC_CTX
*mem_ctx
,
5016 struct tevent_context
*ev
,
5017 struct rpc_pipe_client
*cli
,
5018 struct policy_handle
*_key_handle
/* [in] [ref] */,
5019 struct QueryMultipleValue
*_values
/* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
5020 uint32_t _num_values
/* [in] */,
5021 uint8_t *_buffer
/* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */,
5022 uint32_t *_buffer_size
/* [in,out] [ref] */)
5024 struct tevent_req
*req
;
5025 struct rpccli_winreg_QueryMultipleValues_state
*state
;
5026 struct tevent_req
*subreq
;
5028 req
= tevent_req_create(mem_ctx
, &state
,
5029 struct rpccli_winreg_QueryMultipleValues_state
);
5033 state
->out_mem_ctx
= NULL
;
5034 state
->dispatch_recv
= cli
->dispatch_recv
;
5037 state
->orig
.in
.key_handle
= _key_handle
;
5038 state
->orig
.in
.values
= _values
;
5039 state
->orig
.in
.num_values
= _num_values
;
5040 state
->orig
.in
.buffer
= _buffer
;
5041 state
->orig
.in
.buffer_size
= _buffer_size
;
5043 /* Out parameters */
5044 state
->orig
.out
.values
= _values
;
5045 state
->orig
.out
.buffer
= _buffer
;
5046 state
->orig
.out
.buffer_size
= _buffer_size
;
5049 ZERO_STRUCT(state
->orig
.out
.result
);
5051 if (DEBUGLEVEL
>= 10) {
5052 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues
, &state
->orig
);
5055 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5056 "rpccli_winreg_QueryMultipleValues_out_memory");
5057 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5058 return tevent_req_post(req
, ev
);
5061 /* make a temporary copy, that we pass to the dispatch function */
5062 state
->tmp
= state
->orig
;
5064 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5066 NDR_WINREG_QUERYMULTIPLEVALUES
,
5068 if (tevent_req_nomem(subreq
, req
)) {
5069 return tevent_req_post(req
, ev
);
5071 tevent_req_set_callback(subreq
, rpccli_winreg_QueryMultipleValues_done
, req
);
5075 static void rpccli_winreg_QueryMultipleValues_done(struct tevent_req
*subreq
)
5077 struct tevent_req
*req
= tevent_req_callback_data(
5078 subreq
, struct tevent_req
);
5079 struct rpccli_winreg_QueryMultipleValues_state
*state
= tevent_req_data(
5080 req
, struct rpccli_winreg_QueryMultipleValues_state
);
5082 TALLOC_CTX
*mem_ctx
;
5084 if (state
->out_mem_ctx
) {
5085 mem_ctx
= state
->out_mem_ctx
;
5090 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5091 TALLOC_FREE(subreq
);
5092 if (!NT_STATUS_IS_OK(status
)) {
5093 tevent_req_nterror(req
, status
);
5097 /* Copy out parameters */
5098 memcpy(state
->orig
.out
.values
, state
->tmp
.out
.values
, state
->tmp
.in
.num_values
* sizeof(*state
->orig
.out
.values
));
5099 if (state
->orig
.out
.buffer
&& state
->tmp
.out
.buffer
) {
5100 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, *state
->tmp
.in
.buffer_size
* sizeof(*state
->orig
.out
.buffer
));
5102 *state
->orig
.out
.buffer_size
= *state
->tmp
.out
.buffer_size
;
5105 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5107 /* Reset temporary structure */
5108 ZERO_STRUCT(state
->tmp
);
5110 if (DEBUGLEVEL
>= 10) {
5111 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues
, &state
->orig
);
5114 tevent_req_done(req
);
5117 NTSTATUS
rpccli_winreg_QueryMultipleValues_recv(struct tevent_req
*req
,
5118 TALLOC_CTX
*mem_ctx
,
5121 struct rpccli_winreg_QueryMultipleValues_state
*state
= tevent_req_data(
5122 req
, struct rpccli_winreg_QueryMultipleValues_state
);
5125 if (tevent_req_is_nterror(req
, &status
)) {
5126 tevent_req_received(req
);
5130 /* Steal possbile out parameters to the callers context */
5131 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5134 *result
= state
->orig
.out
.result
;
5136 tevent_req_received(req
);
5137 return NT_STATUS_OK
;
5140 NTSTATUS
rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client
*cli
,
5141 TALLOC_CTX
*mem_ctx
,
5142 struct policy_handle
*key_handle
/* [in] [ref] */,
5143 struct QueryMultipleValue
*values
/* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
5144 uint32_t num_values
/* [in] */,
5145 uint8_t *buffer
/* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */,
5146 uint32_t *buffer_size
/* [in,out] [ref] */,
5149 struct winreg_QueryMultipleValues r
;
5153 r
.in
.key_handle
= key_handle
;
5154 r
.in
.values
= values
;
5155 r
.in
.num_values
= num_values
;
5156 r
.in
.buffer
= buffer
;
5157 r
.in
.buffer_size
= buffer_size
;
5159 if (DEBUGLEVEL
>= 10) {
5160 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues
, &r
);
5163 status
= cli
->dispatch(cli
,
5166 NDR_WINREG_QUERYMULTIPLEVALUES
,
5169 if (!NT_STATUS_IS_OK(status
)) {
5173 if (DEBUGLEVEL
>= 10) {
5174 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues
, &r
);
5177 if (NT_STATUS_IS_ERR(status
)) {
5181 /* Return variables */
5182 memcpy(values
, r
.out
.values
, r
.in
.num_values
* sizeof(*values
));
5183 if (buffer
&& r
.out
.buffer
) {
5184 memcpy(buffer
, r
.out
.buffer
, *r
.in
.buffer_size
* sizeof(*buffer
));
5186 *buffer_size
= *r
.out
.buffer_size
;
5190 *werror
= r
.out
.result
;
5193 return werror_to_ntstatus(r
.out
.result
);
5196 struct rpccli_winreg_InitiateSystemShutdownEx_state
{
5197 struct winreg_InitiateSystemShutdownEx orig
;
5198 struct winreg_InitiateSystemShutdownEx tmp
;
5199 TALLOC_CTX
*out_mem_ctx
;
5200 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5203 static void rpccli_winreg_InitiateSystemShutdownEx_done(struct tevent_req
*subreq
);
5205 struct tevent_req
*rpccli_winreg_InitiateSystemShutdownEx_send(TALLOC_CTX
*mem_ctx
,
5206 struct tevent_context
*ev
,
5207 struct rpc_pipe_client
*cli
,
5208 uint16_t *_hostname
/* [in] [unique] */,
5209 struct lsa_StringLarge
*_message
/* [in] [unique] */,
5210 uint32_t _timeout
/* [in] */,
5211 uint8_t _force_apps
/* [in] */,
5212 uint8_t _do_reboot
/* [in] */,
5213 uint32_t _reason
/* [in] */)
5215 struct tevent_req
*req
;
5216 struct rpccli_winreg_InitiateSystemShutdownEx_state
*state
;
5217 struct tevent_req
*subreq
;
5219 req
= tevent_req_create(mem_ctx
, &state
,
5220 struct rpccli_winreg_InitiateSystemShutdownEx_state
);
5224 state
->out_mem_ctx
= NULL
;
5225 state
->dispatch_recv
= cli
->dispatch_recv
;
5228 state
->orig
.in
.hostname
= _hostname
;
5229 state
->orig
.in
.message
= _message
;
5230 state
->orig
.in
.timeout
= _timeout
;
5231 state
->orig
.in
.force_apps
= _force_apps
;
5232 state
->orig
.in
.do_reboot
= _do_reboot
;
5233 state
->orig
.in
.reason
= _reason
;
5235 /* Out parameters */
5238 ZERO_STRUCT(state
->orig
.out
.result
);
5240 if (DEBUGLEVEL
>= 10) {
5241 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx
, &state
->orig
);
5244 /* make a temporary copy, that we pass to the dispatch function */
5245 state
->tmp
= state
->orig
;
5247 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5249 NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
,
5251 if (tevent_req_nomem(subreq
, req
)) {
5252 return tevent_req_post(req
, ev
);
5254 tevent_req_set_callback(subreq
, rpccli_winreg_InitiateSystemShutdownEx_done
, req
);
5258 static void rpccli_winreg_InitiateSystemShutdownEx_done(struct tevent_req
*subreq
)
5260 struct tevent_req
*req
= tevent_req_callback_data(
5261 subreq
, struct tevent_req
);
5262 struct rpccli_winreg_InitiateSystemShutdownEx_state
*state
= tevent_req_data(
5263 req
, struct rpccli_winreg_InitiateSystemShutdownEx_state
);
5265 TALLOC_CTX
*mem_ctx
;
5267 if (state
->out_mem_ctx
) {
5268 mem_ctx
= state
->out_mem_ctx
;
5273 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5274 TALLOC_FREE(subreq
);
5275 if (!NT_STATUS_IS_OK(status
)) {
5276 tevent_req_nterror(req
, status
);
5280 /* Copy out parameters */
5283 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5285 /* Reset temporary structure */
5286 ZERO_STRUCT(state
->tmp
);
5288 if (DEBUGLEVEL
>= 10) {
5289 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx
, &state
->orig
);
5292 tevent_req_done(req
);
5295 NTSTATUS
rpccli_winreg_InitiateSystemShutdownEx_recv(struct tevent_req
*req
,
5296 TALLOC_CTX
*mem_ctx
,
5299 struct rpccli_winreg_InitiateSystemShutdownEx_state
*state
= tevent_req_data(
5300 req
, struct rpccli_winreg_InitiateSystemShutdownEx_state
);
5303 if (tevent_req_is_nterror(req
, &status
)) {
5304 tevent_req_received(req
);
5308 /* Steal possbile out parameters to the callers context */
5309 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5312 *result
= state
->orig
.out
.result
;
5314 tevent_req_received(req
);
5315 return NT_STATUS_OK
;
5318 NTSTATUS
rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client
*cli
,
5319 TALLOC_CTX
*mem_ctx
,
5320 uint16_t *hostname
/* [in] [unique] */,
5321 struct lsa_StringLarge
*message
/* [in] [unique] */,
5322 uint32_t timeout
/* [in] */,
5323 uint8_t force_apps
/* [in] */,
5324 uint8_t do_reboot
/* [in] */,
5325 uint32_t reason
/* [in] */,
5328 struct winreg_InitiateSystemShutdownEx r
;
5332 r
.in
.hostname
= hostname
;
5333 r
.in
.message
= message
;
5334 r
.in
.timeout
= timeout
;
5335 r
.in
.force_apps
= force_apps
;
5336 r
.in
.do_reboot
= do_reboot
;
5337 r
.in
.reason
= reason
;
5339 if (DEBUGLEVEL
>= 10) {
5340 NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx
, &r
);
5343 status
= cli
->dispatch(cli
,
5346 NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
,
5349 if (!NT_STATUS_IS_OK(status
)) {
5353 if (DEBUGLEVEL
>= 10) {
5354 NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx
, &r
);
5357 if (NT_STATUS_IS_ERR(status
)) {
5361 /* Return variables */
5365 *werror
= r
.out
.result
;
5368 return werror_to_ntstatus(r
.out
.result
);
5371 struct rpccli_winreg_SaveKeyEx_state
{
5372 struct winreg_SaveKeyEx orig
;
5373 struct winreg_SaveKeyEx tmp
;
5374 TALLOC_CTX
*out_mem_ctx
;
5375 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5378 static void rpccli_winreg_SaveKeyEx_done(struct tevent_req
*subreq
);
5380 struct tevent_req
*rpccli_winreg_SaveKeyEx_send(TALLOC_CTX
*mem_ctx
,
5381 struct tevent_context
*ev
,
5382 struct rpc_pipe_client
*cli
)
5384 struct tevent_req
*req
;
5385 struct rpccli_winreg_SaveKeyEx_state
*state
;
5386 struct tevent_req
*subreq
;
5388 req
= tevent_req_create(mem_ctx
, &state
,
5389 struct rpccli_winreg_SaveKeyEx_state
);
5393 state
->out_mem_ctx
= NULL
;
5394 state
->dispatch_recv
= cli
->dispatch_recv
;
5398 /* Out parameters */
5401 ZERO_STRUCT(state
->orig
.out
.result
);
5403 if (DEBUGLEVEL
>= 10) {
5404 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx
, &state
->orig
);
5407 /* make a temporary copy, that we pass to the dispatch function */
5408 state
->tmp
= state
->orig
;
5410 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5412 NDR_WINREG_SAVEKEYEX
,
5414 if (tevent_req_nomem(subreq
, req
)) {
5415 return tevent_req_post(req
, ev
);
5417 tevent_req_set_callback(subreq
, rpccli_winreg_SaveKeyEx_done
, req
);
5421 static void rpccli_winreg_SaveKeyEx_done(struct tevent_req
*subreq
)
5423 struct tevent_req
*req
= tevent_req_callback_data(
5424 subreq
, struct tevent_req
);
5425 struct rpccli_winreg_SaveKeyEx_state
*state
= tevent_req_data(
5426 req
, struct rpccli_winreg_SaveKeyEx_state
);
5428 TALLOC_CTX
*mem_ctx
;
5430 if (state
->out_mem_ctx
) {
5431 mem_ctx
= state
->out_mem_ctx
;
5436 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5437 TALLOC_FREE(subreq
);
5438 if (!NT_STATUS_IS_OK(status
)) {
5439 tevent_req_nterror(req
, status
);
5443 /* Copy out parameters */
5446 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5448 /* Reset temporary structure */
5449 ZERO_STRUCT(state
->tmp
);
5451 if (DEBUGLEVEL
>= 10) {
5452 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx
, &state
->orig
);
5455 tevent_req_done(req
);
5458 NTSTATUS
rpccli_winreg_SaveKeyEx_recv(struct tevent_req
*req
,
5459 TALLOC_CTX
*mem_ctx
,
5462 struct rpccli_winreg_SaveKeyEx_state
*state
= tevent_req_data(
5463 req
, struct rpccli_winreg_SaveKeyEx_state
);
5466 if (tevent_req_is_nterror(req
, &status
)) {
5467 tevent_req_received(req
);
5471 /* Steal possbile out parameters to the callers context */
5472 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5475 *result
= state
->orig
.out
.result
;
5477 tevent_req_received(req
);
5478 return NT_STATUS_OK
;
5481 NTSTATUS
rpccli_winreg_SaveKeyEx(struct rpc_pipe_client
*cli
,
5482 TALLOC_CTX
*mem_ctx
,
5485 struct winreg_SaveKeyEx r
;
5490 if (DEBUGLEVEL
>= 10) {
5491 NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx
, &r
);
5494 status
= cli
->dispatch(cli
,
5497 NDR_WINREG_SAVEKEYEX
,
5500 if (!NT_STATUS_IS_OK(status
)) {
5504 if (DEBUGLEVEL
>= 10) {
5505 NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx
, &r
);
5508 if (NT_STATUS_IS_ERR(status
)) {
5512 /* Return variables */
5516 *werror
= r
.out
.result
;
5519 return werror_to_ntstatus(r
.out
.result
);
5522 struct rpccli_winreg_OpenHKPT_state
{
5523 struct winreg_OpenHKPT orig
;
5524 struct winreg_OpenHKPT tmp
;
5525 TALLOC_CTX
*out_mem_ctx
;
5526 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5529 static void rpccli_winreg_OpenHKPT_done(struct tevent_req
*subreq
);
5531 struct tevent_req
*rpccli_winreg_OpenHKPT_send(TALLOC_CTX
*mem_ctx
,
5532 struct tevent_context
*ev
,
5533 struct rpc_pipe_client
*cli
,
5534 uint16_t *_system_name
/* [in] [unique] */,
5535 uint32_t _access_mask
/* [in] */,
5536 struct policy_handle
*_handle
/* [out] [ref] */)
5538 struct tevent_req
*req
;
5539 struct rpccli_winreg_OpenHKPT_state
*state
;
5540 struct tevent_req
*subreq
;
5542 req
= tevent_req_create(mem_ctx
, &state
,
5543 struct rpccli_winreg_OpenHKPT_state
);
5547 state
->out_mem_ctx
= NULL
;
5548 state
->dispatch_recv
= cli
->dispatch_recv
;
5551 state
->orig
.in
.system_name
= _system_name
;
5552 state
->orig
.in
.access_mask
= _access_mask
;
5554 /* Out parameters */
5555 state
->orig
.out
.handle
= _handle
;
5558 ZERO_STRUCT(state
->orig
.out
.result
);
5560 if (DEBUGLEVEL
>= 10) {
5561 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT
, &state
->orig
);
5564 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5565 "rpccli_winreg_OpenHKPT_out_memory");
5566 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5567 return tevent_req_post(req
, ev
);
5570 /* make a temporary copy, that we pass to the dispatch function */
5571 state
->tmp
= state
->orig
;
5573 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5575 NDR_WINREG_OPENHKPT
,
5577 if (tevent_req_nomem(subreq
, req
)) {
5578 return tevent_req_post(req
, ev
);
5580 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKPT_done
, req
);
5584 static void rpccli_winreg_OpenHKPT_done(struct tevent_req
*subreq
)
5586 struct tevent_req
*req
= tevent_req_callback_data(
5587 subreq
, struct tevent_req
);
5588 struct rpccli_winreg_OpenHKPT_state
*state
= tevent_req_data(
5589 req
, struct rpccli_winreg_OpenHKPT_state
);
5591 TALLOC_CTX
*mem_ctx
;
5593 if (state
->out_mem_ctx
) {
5594 mem_ctx
= state
->out_mem_ctx
;
5599 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5600 TALLOC_FREE(subreq
);
5601 if (!NT_STATUS_IS_OK(status
)) {
5602 tevent_req_nterror(req
, status
);
5606 /* Copy out parameters */
5607 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
5610 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5612 /* Reset temporary structure */
5613 ZERO_STRUCT(state
->tmp
);
5615 if (DEBUGLEVEL
>= 10) {
5616 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT
, &state
->orig
);
5619 tevent_req_done(req
);
5622 NTSTATUS
rpccli_winreg_OpenHKPT_recv(struct tevent_req
*req
,
5623 TALLOC_CTX
*mem_ctx
,
5626 struct rpccli_winreg_OpenHKPT_state
*state
= tevent_req_data(
5627 req
, struct rpccli_winreg_OpenHKPT_state
);
5630 if (tevent_req_is_nterror(req
, &status
)) {
5631 tevent_req_received(req
);
5635 /* Steal possbile out parameters to the callers context */
5636 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5639 *result
= state
->orig
.out
.result
;
5641 tevent_req_received(req
);
5642 return NT_STATUS_OK
;
5645 NTSTATUS
rpccli_winreg_OpenHKPT(struct rpc_pipe_client
*cli
,
5646 TALLOC_CTX
*mem_ctx
,
5647 uint16_t *system_name
/* [in] [unique] */,
5648 uint32_t access_mask
/* [in] */,
5649 struct policy_handle
*handle
/* [out] [ref] */,
5652 struct winreg_OpenHKPT r
;
5656 r
.in
.system_name
= system_name
;
5657 r
.in
.access_mask
= access_mask
;
5659 if (DEBUGLEVEL
>= 10) {
5660 NDR_PRINT_IN_DEBUG(winreg_OpenHKPT
, &r
);
5663 status
= cli
->dispatch(cli
,
5666 NDR_WINREG_OPENHKPT
,
5669 if (!NT_STATUS_IS_OK(status
)) {
5673 if (DEBUGLEVEL
>= 10) {
5674 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT
, &r
);
5677 if (NT_STATUS_IS_ERR(status
)) {
5681 /* Return variables */
5682 *handle
= *r
.out
.handle
;
5686 *werror
= r
.out
.result
;
5689 return werror_to_ntstatus(r
.out
.result
);
5692 struct rpccli_winreg_OpenHKPN_state
{
5693 struct winreg_OpenHKPN orig
;
5694 struct winreg_OpenHKPN tmp
;
5695 TALLOC_CTX
*out_mem_ctx
;
5696 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5699 static void rpccli_winreg_OpenHKPN_done(struct tevent_req
*subreq
);
5701 struct tevent_req
*rpccli_winreg_OpenHKPN_send(TALLOC_CTX
*mem_ctx
,
5702 struct tevent_context
*ev
,
5703 struct rpc_pipe_client
*cli
,
5704 uint16_t *_system_name
/* [in] [unique] */,
5705 uint32_t _access_mask
/* [in] */,
5706 struct policy_handle
*_handle
/* [out] [ref] */)
5708 struct tevent_req
*req
;
5709 struct rpccli_winreg_OpenHKPN_state
*state
;
5710 struct tevent_req
*subreq
;
5712 req
= tevent_req_create(mem_ctx
, &state
,
5713 struct rpccli_winreg_OpenHKPN_state
);
5717 state
->out_mem_ctx
= NULL
;
5718 state
->dispatch_recv
= cli
->dispatch_recv
;
5721 state
->orig
.in
.system_name
= _system_name
;
5722 state
->orig
.in
.access_mask
= _access_mask
;
5724 /* Out parameters */
5725 state
->orig
.out
.handle
= _handle
;
5728 ZERO_STRUCT(state
->orig
.out
.result
);
5730 if (DEBUGLEVEL
>= 10) {
5731 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN
, &state
->orig
);
5734 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5735 "rpccli_winreg_OpenHKPN_out_memory");
5736 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5737 return tevent_req_post(req
, ev
);
5740 /* make a temporary copy, that we pass to the dispatch function */
5741 state
->tmp
= state
->orig
;
5743 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5745 NDR_WINREG_OPENHKPN
,
5747 if (tevent_req_nomem(subreq
, req
)) {
5748 return tevent_req_post(req
, ev
);
5750 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKPN_done
, req
);
5754 static void rpccli_winreg_OpenHKPN_done(struct tevent_req
*subreq
)
5756 struct tevent_req
*req
= tevent_req_callback_data(
5757 subreq
, struct tevent_req
);
5758 struct rpccli_winreg_OpenHKPN_state
*state
= tevent_req_data(
5759 req
, struct rpccli_winreg_OpenHKPN_state
);
5761 TALLOC_CTX
*mem_ctx
;
5763 if (state
->out_mem_ctx
) {
5764 mem_ctx
= state
->out_mem_ctx
;
5769 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5770 TALLOC_FREE(subreq
);
5771 if (!NT_STATUS_IS_OK(status
)) {
5772 tevent_req_nterror(req
, status
);
5776 /* Copy out parameters */
5777 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
5780 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5782 /* Reset temporary structure */
5783 ZERO_STRUCT(state
->tmp
);
5785 if (DEBUGLEVEL
>= 10) {
5786 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN
, &state
->orig
);
5789 tevent_req_done(req
);
5792 NTSTATUS
rpccli_winreg_OpenHKPN_recv(struct tevent_req
*req
,
5793 TALLOC_CTX
*mem_ctx
,
5796 struct rpccli_winreg_OpenHKPN_state
*state
= tevent_req_data(
5797 req
, struct rpccli_winreg_OpenHKPN_state
);
5800 if (tevent_req_is_nterror(req
, &status
)) {
5801 tevent_req_received(req
);
5805 /* Steal possbile out parameters to the callers context */
5806 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5809 *result
= state
->orig
.out
.result
;
5811 tevent_req_received(req
);
5812 return NT_STATUS_OK
;
5815 NTSTATUS
rpccli_winreg_OpenHKPN(struct rpc_pipe_client
*cli
,
5816 TALLOC_CTX
*mem_ctx
,
5817 uint16_t *system_name
/* [in] [unique] */,
5818 uint32_t access_mask
/* [in] */,
5819 struct policy_handle
*handle
/* [out] [ref] */,
5822 struct winreg_OpenHKPN r
;
5826 r
.in
.system_name
= system_name
;
5827 r
.in
.access_mask
= access_mask
;
5829 if (DEBUGLEVEL
>= 10) {
5830 NDR_PRINT_IN_DEBUG(winreg_OpenHKPN
, &r
);
5833 status
= cli
->dispatch(cli
,
5836 NDR_WINREG_OPENHKPN
,
5839 if (!NT_STATUS_IS_OK(status
)) {
5843 if (DEBUGLEVEL
>= 10) {
5844 NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN
, &r
);
5847 if (NT_STATUS_IS_ERR(status
)) {
5851 /* Return variables */
5852 *handle
= *r
.out
.handle
;
5856 *werror
= r
.out
.result
;
5859 return werror_to_ntstatus(r
.out
.result
);
5862 struct rpccli_winreg_QueryMultipleValues2_state
{
5863 struct winreg_QueryMultipleValues2 orig
;
5864 struct winreg_QueryMultipleValues2 tmp
;
5865 TALLOC_CTX
*out_mem_ctx
;
5866 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5869 static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req
*subreq
);
5871 struct tevent_req
*rpccli_winreg_QueryMultipleValues2_send(TALLOC_CTX
*mem_ctx
,
5872 struct tevent_context
*ev
,
5873 struct rpc_pipe_client
*cli
)
5875 struct tevent_req
*req
;
5876 struct rpccli_winreg_QueryMultipleValues2_state
*state
;
5877 struct tevent_req
*subreq
;
5879 req
= tevent_req_create(mem_ctx
, &state
,
5880 struct rpccli_winreg_QueryMultipleValues2_state
);
5884 state
->out_mem_ctx
= NULL
;
5885 state
->dispatch_recv
= cli
->dispatch_recv
;
5889 /* Out parameters */
5892 ZERO_STRUCT(state
->orig
.out
.result
);
5894 if (DEBUGLEVEL
>= 10) {
5895 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2
, &state
->orig
);
5898 /* make a temporary copy, that we pass to the dispatch function */
5899 state
->tmp
= state
->orig
;
5901 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5903 NDR_WINREG_QUERYMULTIPLEVALUES2
,
5905 if (tevent_req_nomem(subreq
, req
)) {
5906 return tevent_req_post(req
, ev
);
5908 tevent_req_set_callback(subreq
, rpccli_winreg_QueryMultipleValues2_done
, req
);
5912 static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req
*subreq
)
5914 struct tevent_req
*req
= tevent_req_callback_data(
5915 subreq
, struct tevent_req
);
5916 struct rpccli_winreg_QueryMultipleValues2_state
*state
= tevent_req_data(
5917 req
, struct rpccli_winreg_QueryMultipleValues2_state
);
5919 TALLOC_CTX
*mem_ctx
;
5921 if (state
->out_mem_ctx
) {
5922 mem_ctx
= state
->out_mem_ctx
;
5927 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5928 TALLOC_FREE(subreq
);
5929 if (!NT_STATUS_IS_OK(status
)) {
5930 tevent_req_nterror(req
, status
);
5934 /* Copy out parameters */
5937 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5939 /* Reset temporary structure */
5940 ZERO_STRUCT(state
->tmp
);
5942 if (DEBUGLEVEL
>= 10) {
5943 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2
, &state
->orig
);
5946 tevent_req_done(req
);
5949 NTSTATUS
rpccli_winreg_QueryMultipleValues2_recv(struct tevent_req
*req
,
5950 TALLOC_CTX
*mem_ctx
,
5953 struct rpccli_winreg_QueryMultipleValues2_state
*state
= tevent_req_data(
5954 req
, struct rpccli_winreg_QueryMultipleValues2_state
);
5957 if (tevent_req_is_nterror(req
, &status
)) {
5958 tevent_req_received(req
);
5962 /* Steal possbile out parameters to the callers context */
5963 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5966 *result
= state
->orig
.out
.result
;
5968 tevent_req_received(req
);
5969 return NT_STATUS_OK
;
5972 NTSTATUS
rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client
*cli
,
5973 TALLOC_CTX
*mem_ctx
,
5976 struct winreg_QueryMultipleValues2 r
;
5981 if (DEBUGLEVEL
>= 10) {
5982 NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2
, &r
);
5985 status
= cli
->dispatch(cli
,
5988 NDR_WINREG_QUERYMULTIPLEVALUES2
,
5991 if (!NT_STATUS_IS_OK(status
)) {
5995 if (DEBUGLEVEL
>= 10) {
5996 NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2
, &r
);
5999 if (NT_STATUS_IS_ERR(status
)) {
6003 /* Return variables */
6007 *werror
= r
.out
.result
;
6010 return werror_to_ntstatus(r
.out
.result
);