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 state
->out_mem_ctx
= talloc_named_const(state
, 0,
48 "rpccli_winreg_OpenHKCR_out_memory");
49 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
50 return tevent_req_post(req
, ev
);
53 /* make a temporary copy, that we pass to the dispatch function */
54 state
->tmp
= state
->orig
;
56 subreq
= cli
->dispatch_send(state
, ev
, cli
,
60 if (tevent_req_nomem(subreq
, req
)) {
61 return tevent_req_post(req
, ev
);
63 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKCR_done
, req
);
67 static void rpccli_winreg_OpenHKCR_done(struct tevent_req
*subreq
)
69 struct tevent_req
*req
= tevent_req_callback_data(
70 subreq
, struct tevent_req
);
71 struct rpccli_winreg_OpenHKCR_state
*state
= tevent_req_data(
72 req
, struct rpccli_winreg_OpenHKCR_state
);
76 if (state
->out_mem_ctx
) {
77 mem_ctx
= state
->out_mem_ctx
;
82 status
= state
->dispatch_recv(subreq
, mem_ctx
);
84 if (!NT_STATUS_IS_OK(status
)) {
85 tevent_req_nterror(req
, status
);
89 /* Copy out parameters */
90 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
93 state
->orig
.out
.result
= state
->tmp
.out
.result
;
95 /* Reset temporary structure */
96 ZERO_STRUCT(state
->tmp
);
101 NTSTATUS
rpccli_winreg_OpenHKCR_recv(struct tevent_req
*req
,
105 struct rpccli_winreg_OpenHKCR_state
*state
= tevent_req_data(
106 req
, struct rpccli_winreg_OpenHKCR_state
);
109 if (tevent_req_is_nterror(req
, &status
)) {
110 tevent_req_received(req
);
114 /* Steal possbile out parameters to the callers context */
115 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
118 *result
= state
->orig
.out
.result
;
120 tevent_req_received(req
);
124 NTSTATUS
rpccli_winreg_OpenHKCR(struct rpc_pipe_client
*cli
,
126 uint16_t *system_name
/* [in] [unique] */,
127 uint32_t access_mask
/* [in] */,
128 struct policy_handle
*handle
/* [out] [ref] */,
131 struct winreg_OpenHKCR r
;
135 r
.in
.system_name
= system_name
;
136 r
.in
.access_mask
= access_mask
;
138 status
= cli
->dispatch(cli
,
144 if (!NT_STATUS_IS_OK(status
)) {
148 if (NT_STATUS_IS_ERR(status
)) {
152 /* Return variables */
153 *handle
= *r
.out
.handle
;
157 *werror
= r
.out
.result
;
160 return werror_to_ntstatus(r
.out
.result
);
163 struct rpccli_winreg_OpenHKCU_state
{
164 struct winreg_OpenHKCU orig
;
165 struct winreg_OpenHKCU tmp
;
166 TALLOC_CTX
*out_mem_ctx
;
167 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
170 static void rpccli_winreg_OpenHKCU_done(struct tevent_req
*subreq
);
172 struct tevent_req
*rpccli_winreg_OpenHKCU_send(TALLOC_CTX
*mem_ctx
,
173 struct tevent_context
*ev
,
174 struct rpc_pipe_client
*cli
,
175 uint16_t *_system_name
/* [in] [unique] */,
176 uint32_t _access_mask
/* [in] */,
177 struct policy_handle
*_handle
/* [out] [ref] */)
179 struct tevent_req
*req
;
180 struct rpccli_winreg_OpenHKCU_state
*state
;
181 struct tevent_req
*subreq
;
183 req
= tevent_req_create(mem_ctx
, &state
,
184 struct rpccli_winreg_OpenHKCU_state
);
188 state
->out_mem_ctx
= NULL
;
189 state
->dispatch_recv
= cli
->dispatch_recv
;
192 state
->orig
.in
.system_name
= _system_name
;
193 state
->orig
.in
.access_mask
= _access_mask
;
196 state
->orig
.out
.handle
= _handle
;
199 ZERO_STRUCT(state
->orig
.out
.result
);
201 state
->out_mem_ctx
= talloc_named_const(state
, 0,
202 "rpccli_winreg_OpenHKCU_out_memory");
203 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
204 return tevent_req_post(req
, ev
);
207 /* make a temporary copy, that we pass to the dispatch function */
208 state
->tmp
= state
->orig
;
210 subreq
= cli
->dispatch_send(state
, ev
, cli
,
214 if (tevent_req_nomem(subreq
, req
)) {
215 return tevent_req_post(req
, ev
);
217 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKCU_done
, req
);
221 static void rpccli_winreg_OpenHKCU_done(struct tevent_req
*subreq
)
223 struct tevent_req
*req
= tevent_req_callback_data(
224 subreq
, struct tevent_req
);
225 struct rpccli_winreg_OpenHKCU_state
*state
= tevent_req_data(
226 req
, struct rpccli_winreg_OpenHKCU_state
);
230 if (state
->out_mem_ctx
) {
231 mem_ctx
= state
->out_mem_ctx
;
236 status
= state
->dispatch_recv(subreq
, mem_ctx
);
238 if (!NT_STATUS_IS_OK(status
)) {
239 tevent_req_nterror(req
, status
);
243 /* Copy out parameters */
244 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
247 state
->orig
.out
.result
= state
->tmp
.out
.result
;
249 /* Reset temporary structure */
250 ZERO_STRUCT(state
->tmp
);
252 tevent_req_done(req
);
255 NTSTATUS
rpccli_winreg_OpenHKCU_recv(struct tevent_req
*req
,
259 struct rpccli_winreg_OpenHKCU_state
*state
= tevent_req_data(
260 req
, struct rpccli_winreg_OpenHKCU_state
);
263 if (tevent_req_is_nterror(req
, &status
)) {
264 tevent_req_received(req
);
268 /* Steal possbile out parameters to the callers context */
269 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
272 *result
= state
->orig
.out
.result
;
274 tevent_req_received(req
);
278 NTSTATUS
rpccli_winreg_OpenHKCU(struct rpc_pipe_client
*cli
,
280 uint16_t *system_name
/* [in] [unique] */,
281 uint32_t access_mask
/* [in] */,
282 struct policy_handle
*handle
/* [out] [ref] */,
285 struct winreg_OpenHKCU r
;
289 r
.in
.system_name
= system_name
;
290 r
.in
.access_mask
= access_mask
;
292 status
= cli
->dispatch(cli
,
298 if (!NT_STATUS_IS_OK(status
)) {
302 if (NT_STATUS_IS_ERR(status
)) {
306 /* Return variables */
307 *handle
= *r
.out
.handle
;
311 *werror
= r
.out
.result
;
314 return werror_to_ntstatus(r
.out
.result
);
317 struct rpccli_winreg_OpenHKLM_state
{
318 struct winreg_OpenHKLM orig
;
319 struct winreg_OpenHKLM tmp
;
320 TALLOC_CTX
*out_mem_ctx
;
321 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
324 static void rpccli_winreg_OpenHKLM_done(struct tevent_req
*subreq
);
326 struct tevent_req
*rpccli_winreg_OpenHKLM_send(TALLOC_CTX
*mem_ctx
,
327 struct tevent_context
*ev
,
328 struct rpc_pipe_client
*cli
,
329 uint16_t *_system_name
/* [in] [unique] */,
330 uint32_t _access_mask
/* [in] */,
331 struct policy_handle
*_handle
/* [out] [ref] */)
333 struct tevent_req
*req
;
334 struct rpccli_winreg_OpenHKLM_state
*state
;
335 struct tevent_req
*subreq
;
337 req
= tevent_req_create(mem_ctx
, &state
,
338 struct rpccli_winreg_OpenHKLM_state
);
342 state
->out_mem_ctx
= NULL
;
343 state
->dispatch_recv
= cli
->dispatch_recv
;
346 state
->orig
.in
.system_name
= _system_name
;
347 state
->orig
.in
.access_mask
= _access_mask
;
350 state
->orig
.out
.handle
= _handle
;
353 ZERO_STRUCT(state
->orig
.out
.result
);
355 state
->out_mem_ctx
= talloc_named_const(state
, 0,
356 "rpccli_winreg_OpenHKLM_out_memory");
357 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
358 return tevent_req_post(req
, ev
);
361 /* make a temporary copy, that we pass to the dispatch function */
362 state
->tmp
= state
->orig
;
364 subreq
= cli
->dispatch_send(state
, ev
, cli
,
368 if (tevent_req_nomem(subreq
, req
)) {
369 return tevent_req_post(req
, ev
);
371 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKLM_done
, req
);
375 static void rpccli_winreg_OpenHKLM_done(struct tevent_req
*subreq
)
377 struct tevent_req
*req
= tevent_req_callback_data(
378 subreq
, struct tevent_req
);
379 struct rpccli_winreg_OpenHKLM_state
*state
= tevent_req_data(
380 req
, struct rpccli_winreg_OpenHKLM_state
);
384 if (state
->out_mem_ctx
) {
385 mem_ctx
= state
->out_mem_ctx
;
390 status
= state
->dispatch_recv(subreq
, mem_ctx
);
392 if (!NT_STATUS_IS_OK(status
)) {
393 tevent_req_nterror(req
, status
);
397 /* Copy out parameters */
398 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
401 state
->orig
.out
.result
= state
->tmp
.out
.result
;
403 /* Reset temporary structure */
404 ZERO_STRUCT(state
->tmp
);
406 tevent_req_done(req
);
409 NTSTATUS
rpccli_winreg_OpenHKLM_recv(struct tevent_req
*req
,
413 struct rpccli_winreg_OpenHKLM_state
*state
= tevent_req_data(
414 req
, struct rpccli_winreg_OpenHKLM_state
);
417 if (tevent_req_is_nterror(req
, &status
)) {
418 tevent_req_received(req
);
422 /* Steal possbile out parameters to the callers context */
423 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
426 *result
= state
->orig
.out
.result
;
428 tevent_req_received(req
);
432 NTSTATUS
rpccli_winreg_OpenHKLM(struct rpc_pipe_client
*cli
,
434 uint16_t *system_name
/* [in] [unique] */,
435 uint32_t access_mask
/* [in] */,
436 struct policy_handle
*handle
/* [out] [ref] */,
439 struct winreg_OpenHKLM r
;
443 r
.in
.system_name
= system_name
;
444 r
.in
.access_mask
= access_mask
;
446 status
= cli
->dispatch(cli
,
452 if (!NT_STATUS_IS_OK(status
)) {
456 if (NT_STATUS_IS_ERR(status
)) {
460 /* Return variables */
461 *handle
= *r
.out
.handle
;
465 *werror
= r
.out
.result
;
468 return werror_to_ntstatus(r
.out
.result
);
471 struct rpccli_winreg_OpenHKPD_state
{
472 struct winreg_OpenHKPD orig
;
473 struct winreg_OpenHKPD tmp
;
474 TALLOC_CTX
*out_mem_ctx
;
475 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
478 static void rpccli_winreg_OpenHKPD_done(struct tevent_req
*subreq
);
480 struct tevent_req
*rpccli_winreg_OpenHKPD_send(TALLOC_CTX
*mem_ctx
,
481 struct tevent_context
*ev
,
482 struct rpc_pipe_client
*cli
,
483 uint16_t *_system_name
/* [in] [unique] */,
484 uint32_t _access_mask
/* [in] */,
485 struct policy_handle
*_handle
/* [out] [ref] */)
487 struct tevent_req
*req
;
488 struct rpccli_winreg_OpenHKPD_state
*state
;
489 struct tevent_req
*subreq
;
491 req
= tevent_req_create(mem_ctx
, &state
,
492 struct rpccli_winreg_OpenHKPD_state
);
496 state
->out_mem_ctx
= NULL
;
497 state
->dispatch_recv
= cli
->dispatch_recv
;
500 state
->orig
.in
.system_name
= _system_name
;
501 state
->orig
.in
.access_mask
= _access_mask
;
504 state
->orig
.out
.handle
= _handle
;
507 ZERO_STRUCT(state
->orig
.out
.result
);
509 state
->out_mem_ctx
= talloc_named_const(state
, 0,
510 "rpccli_winreg_OpenHKPD_out_memory");
511 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
512 return tevent_req_post(req
, ev
);
515 /* make a temporary copy, that we pass to the dispatch function */
516 state
->tmp
= state
->orig
;
518 subreq
= cli
->dispatch_send(state
, ev
, cli
,
522 if (tevent_req_nomem(subreq
, req
)) {
523 return tevent_req_post(req
, ev
);
525 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKPD_done
, req
);
529 static void rpccli_winreg_OpenHKPD_done(struct tevent_req
*subreq
)
531 struct tevent_req
*req
= tevent_req_callback_data(
532 subreq
, struct tevent_req
);
533 struct rpccli_winreg_OpenHKPD_state
*state
= tevent_req_data(
534 req
, struct rpccli_winreg_OpenHKPD_state
);
538 if (state
->out_mem_ctx
) {
539 mem_ctx
= state
->out_mem_ctx
;
544 status
= state
->dispatch_recv(subreq
, mem_ctx
);
546 if (!NT_STATUS_IS_OK(status
)) {
547 tevent_req_nterror(req
, status
);
551 /* Copy out parameters */
552 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
555 state
->orig
.out
.result
= state
->tmp
.out
.result
;
557 /* Reset temporary structure */
558 ZERO_STRUCT(state
->tmp
);
560 tevent_req_done(req
);
563 NTSTATUS
rpccli_winreg_OpenHKPD_recv(struct tevent_req
*req
,
567 struct rpccli_winreg_OpenHKPD_state
*state
= tevent_req_data(
568 req
, struct rpccli_winreg_OpenHKPD_state
);
571 if (tevent_req_is_nterror(req
, &status
)) {
572 tevent_req_received(req
);
576 /* Steal possbile out parameters to the callers context */
577 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
580 *result
= state
->orig
.out
.result
;
582 tevent_req_received(req
);
586 NTSTATUS
rpccli_winreg_OpenHKPD(struct rpc_pipe_client
*cli
,
588 uint16_t *system_name
/* [in] [unique] */,
589 uint32_t access_mask
/* [in] */,
590 struct policy_handle
*handle
/* [out] [ref] */,
593 struct winreg_OpenHKPD r
;
597 r
.in
.system_name
= system_name
;
598 r
.in
.access_mask
= access_mask
;
600 status
= cli
->dispatch(cli
,
606 if (!NT_STATUS_IS_OK(status
)) {
610 if (NT_STATUS_IS_ERR(status
)) {
614 /* Return variables */
615 *handle
= *r
.out
.handle
;
619 *werror
= r
.out
.result
;
622 return werror_to_ntstatus(r
.out
.result
);
625 struct rpccli_winreg_OpenHKU_state
{
626 struct winreg_OpenHKU orig
;
627 struct winreg_OpenHKU tmp
;
628 TALLOC_CTX
*out_mem_ctx
;
629 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
632 static void rpccli_winreg_OpenHKU_done(struct tevent_req
*subreq
);
634 struct tevent_req
*rpccli_winreg_OpenHKU_send(TALLOC_CTX
*mem_ctx
,
635 struct tevent_context
*ev
,
636 struct rpc_pipe_client
*cli
,
637 uint16_t *_system_name
/* [in] [unique] */,
638 uint32_t _access_mask
/* [in] */,
639 struct policy_handle
*_handle
/* [out] [ref] */)
641 struct tevent_req
*req
;
642 struct rpccli_winreg_OpenHKU_state
*state
;
643 struct tevent_req
*subreq
;
645 req
= tevent_req_create(mem_ctx
, &state
,
646 struct rpccli_winreg_OpenHKU_state
);
650 state
->out_mem_ctx
= NULL
;
651 state
->dispatch_recv
= cli
->dispatch_recv
;
654 state
->orig
.in
.system_name
= _system_name
;
655 state
->orig
.in
.access_mask
= _access_mask
;
658 state
->orig
.out
.handle
= _handle
;
661 ZERO_STRUCT(state
->orig
.out
.result
);
663 state
->out_mem_ctx
= talloc_named_const(state
, 0,
664 "rpccli_winreg_OpenHKU_out_memory");
665 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
666 return tevent_req_post(req
, ev
);
669 /* make a temporary copy, that we pass to the dispatch function */
670 state
->tmp
= state
->orig
;
672 subreq
= cli
->dispatch_send(state
, ev
, cli
,
676 if (tevent_req_nomem(subreq
, req
)) {
677 return tevent_req_post(req
, ev
);
679 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKU_done
, req
);
683 static void rpccli_winreg_OpenHKU_done(struct tevent_req
*subreq
)
685 struct tevent_req
*req
= tevent_req_callback_data(
686 subreq
, struct tevent_req
);
687 struct rpccli_winreg_OpenHKU_state
*state
= tevent_req_data(
688 req
, struct rpccli_winreg_OpenHKU_state
);
692 if (state
->out_mem_ctx
) {
693 mem_ctx
= state
->out_mem_ctx
;
698 status
= state
->dispatch_recv(subreq
, mem_ctx
);
700 if (!NT_STATUS_IS_OK(status
)) {
701 tevent_req_nterror(req
, status
);
705 /* Copy out parameters */
706 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
709 state
->orig
.out
.result
= state
->tmp
.out
.result
;
711 /* Reset temporary structure */
712 ZERO_STRUCT(state
->tmp
);
714 tevent_req_done(req
);
717 NTSTATUS
rpccli_winreg_OpenHKU_recv(struct tevent_req
*req
,
721 struct rpccli_winreg_OpenHKU_state
*state
= tevent_req_data(
722 req
, struct rpccli_winreg_OpenHKU_state
);
725 if (tevent_req_is_nterror(req
, &status
)) {
726 tevent_req_received(req
);
730 /* Steal possbile out parameters to the callers context */
731 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
734 *result
= state
->orig
.out
.result
;
736 tevent_req_received(req
);
740 NTSTATUS
rpccli_winreg_OpenHKU(struct rpc_pipe_client
*cli
,
742 uint16_t *system_name
/* [in] [unique] */,
743 uint32_t access_mask
/* [in] */,
744 struct policy_handle
*handle
/* [out] [ref] */,
747 struct winreg_OpenHKU r
;
751 r
.in
.system_name
= system_name
;
752 r
.in
.access_mask
= access_mask
;
754 status
= cli
->dispatch(cli
,
760 if (!NT_STATUS_IS_OK(status
)) {
764 if (NT_STATUS_IS_ERR(status
)) {
768 /* Return variables */
769 *handle
= *r
.out
.handle
;
773 *werror
= r
.out
.result
;
776 return werror_to_ntstatus(r
.out
.result
);
779 struct rpccli_winreg_CloseKey_state
{
780 struct winreg_CloseKey orig
;
781 struct winreg_CloseKey tmp
;
782 TALLOC_CTX
*out_mem_ctx
;
783 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
786 static void rpccli_winreg_CloseKey_done(struct tevent_req
*subreq
);
788 struct tevent_req
*rpccli_winreg_CloseKey_send(TALLOC_CTX
*mem_ctx
,
789 struct tevent_context
*ev
,
790 struct rpc_pipe_client
*cli
,
791 struct policy_handle
*_handle
/* [in,out] [ref] */)
793 struct tevent_req
*req
;
794 struct rpccli_winreg_CloseKey_state
*state
;
795 struct tevent_req
*subreq
;
797 req
= tevent_req_create(mem_ctx
, &state
,
798 struct rpccli_winreg_CloseKey_state
);
802 state
->out_mem_ctx
= NULL
;
803 state
->dispatch_recv
= cli
->dispatch_recv
;
806 state
->orig
.in
.handle
= _handle
;
809 state
->orig
.out
.handle
= _handle
;
812 ZERO_STRUCT(state
->orig
.out
.result
);
814 state
->out_mem_ctx
= talloc_named_const(state
, 0,
815 "rpccli_winreg_CloseKey_out_memory");
816 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
817 return tevent_req_post(req
, ev
);
820 /* make a temporary copy, that we pass to the dispatch function */
821 state
->tmp
= state
->orig
;
823 subreq
= cli
->dispatch_send(state
, ev
, cli
,
827 if (tevent_req_nomem(subreq
, req
)) {
828 return tevent_req_post(req
, ev
);
830 tevent_req_set_callback(subreq
, rpccli_winreg_CloseKey_done
, req
);
834 static void rpccli_winreg_CloseKey_done(struct tevent_req
*subreq
)
836 struct tevent_req
*req
= tevent_req_callback_data(
837 subreq
, struct tevent_req
);
838 struct rpccli_winreg_CloseKey_state
*state
= tevent_req_data(
839 req
, struct rpccli_winreg_CloseKey_state
);
843 if (state
->out_mem_ctx
) {
844 mem_ctx
= state
->out_mem_ctx
;
849 status
= state
->dispatch_recv(subreq
, mem_ctx
);
851 if (!NT_STATUS_IS_OK(status
)) {
852 tevent_req_nterror(req
, status
);
856 /* Copy out parameters */
857 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
860 state
->orig
.out
.result
= state
->tmp
.out
.result
;
862 /* Reset temporary structure */
863 ZERO_STRUCT(state
->tmp
);
865 tevent_req_done(req
);
868 NTSTATUS
rpccli_winreg_CloseKey_recv(struct tevent_req
*req
,
872 struct rpccli_winreg_CloseKey_state
*state
= tevent_req_data(
873 req
, struct rpccli_winreg_CloseKey_state
);
876 if (tevent_req_is_nterror(req
, &status
)) {
877 tevent_req_received(req
);
881 /* Steal possbile out parameters to the callers context */
882 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
885 *result
= state
->orig
.out
.result
;
887 tevent_req_received(req
);
891 NTSTATUS
rpccli_winreg_CloseKey(struct rpc_pipe_client
*cli
,
893 struct policy_handle
*handle
/* [in,out] [ref] */,
896 struct winreg_CloseKey r
;
900 r
.in
.handle
= handle
;
902 status
= cli
->dispatch(cli
,
908 if (!NT_STATUS_IS_OK(status
)) {
912 if (NT_STATUS_IS_ERR(status
)) {
916 /* Return variables */
917 *handle
= *r
.out
.handle
;
921 *werror
= r
.out
.result
;
924 return werror_to_ntstatus(r
.out
.result
);
927 struct rpccli_winreg_CreateKey_state
{
928 struct winreg_CreateKey orig
;
929 struct winreg_CreateKey tmp
;
930 TALLOC_CTX
*out_mem_ctx
;
931 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
934 static void rpccli_winreg_CreateKey_done(struct tevent_req
*subreq
);
936 struct tevent_req
*rpccli_winreg_CreateKey_send(TALLOC_CTX
*mem_ctx
,
937 struct tevent_context
*ev
,
938 struct rpc_pipe_client
*cli
,
939 struct policy_handle
*_handle
/* [in] [ref] */,
940 struct winreg_String _name
/* [in] */,
941 struct winreg_String _keyclass
/* [in] */,
942 uint32_t _options
/* [in] */,
943 uint32_t _access_mask
/* [in] */,
944 struct winreg_SecBuf
*_secdesc
/* [in] [unique] */,
945 struct policy_handle
*_new_handle
/* [out] [ref] */,
946 enum winreg_CreateAction
*_action_taken
/* [in,out] [unique] */)
948 struct tevent_req
*req
;
949 struct rpccli_winreg_CreateKey_state
*state
;
950 struct tevent_req
*subreq
;
952 req
= tevent_req_create(mem_ctx
, &state
,
953 struct rpccli_winreg_CreateKey_state
);
957 state
->out_mem_ctx
= NULL
;
958 state
->dispatch_recv
= cli
->dispatch_recv
;
961 state
->orig
.in
.handle
= _handle
;
962 state
->orig
.in
.name
= _name
;
963 state
->orig
.in
.keyclass
= _keyclass
;
964 state
->orig
.in
.options
= _options
;
965 state
->orig
.in
.access_mask
= _access_mask
;
966 state
->orig
.in
.secdesc
= _secdesc
;
967 state
->orig
.in
.action_taken
= _action_taken
;
970 state
->orig
.out
.new_handle
= _new_handle
;
971 state
->orig
.out
.action_taken
= _action_taken
;
974 ZERO_STRUCT(state
->orig
.out
.result
);
976 state
->out_mem_ctx
= talloc_named_const(state
, 0,
977 "rpccli_winreg_CreateKey_out_memory");
978 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
979 return tevent_req_post(req
, ev
);
982 /* make a temporary copy, that we pass to the dispatch function */
983 state
->tmp
= state
->orig
;
985 subreq
= cli
->dispatch_send(state
, ev
, cli
,
987 NDR_WINREG_CREATEKEY
,
989 if (tevent_req_nomem(subreq
, req
)) {
990 return tevent_req_post(req
, ev
);
992 tevent_req_set_callback(subreq
, rpccli_winreg_CreateKey_done
, req
);
996 static void rpccli_winreg_CreateKey_done(struct tevent_req
*subreq
)
998 struct tevent_req
*req
= tevent_req_callback_data(
999 subreq
, struct tevent_req
);
1000 struct rpccli_winreg_CreateKey_state
*state
= tevent_req_data(
1001 req
, struct rpccli_winreg_CreateKey_state
);
1003 TALLOC_CTX
*mem_ctx
;
1005 if (state
->out_mem_ctx
) {
1006 mem_ctx
= state
->out_mem_ctx
;
1011 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1012 TALLOC_FREE(subreq
);
1013 if (!NT_STATUS_IS_OK(status
)) {
1014 tevent_req_nterror(req
, status
);
1018 /* Copy out parameters */
1019 *state
->orig
.out
.new_handle
= *state
->tmp
.out
.new_handle
;
1020 if (state
->orig
.out
.action_taken
&& state
->tmp
.out
.action_taken
) {
1021 *state
->orig
.out
.action_taken
= *state
->tmp
.out
.action_taken
;
1025 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1027 /* Reset temporary structure */
1028 ZERO_STRUCT(state
->tmp
);
1030 tevent_req_done(req
);
1033 NTSTATUS
rpccli_winreg_CreateKey_recv(struct tevent_req
*req
,
1034 TALLOC_CTX
*mem_ctx
,
1037 struct rpccli_winreg_CreateKey_state
*state
= tevent_req_data(
1038 req
, struct rpccli_winreg_CreateKey_state
);
1041 if (tevent_req_is_nterror(req
, &status
)) {
1042 tevent_req_received(req
);
1046 /* Steal possbile out parameters to the callers context */
1047 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1050 *result
= state
->orig
.out
.result
;
1052 tevent_req_received(req
);
1053 return NT_STATUS_OK
;
1056 NTSTATUS
rpccli_winreg_CreateKey(struct rpc_pipe_client
*cli
,
1057 TALLOC_CTX
*mem_ctx
,
1058 struct policy_handle
*handle
/* [in] [ref] */,
1059 struct winreg_String name
/* [in] */,
1060 struct winreg_String keyclass
/* [in] */,
1061 uint32_t options
/* [in] */,
1062 uint32_t access_mask
/* [in] */,
1063 struct winreg_SecBuf
*secdesc
/* [in] [unique] */,
1064 struct policy_handle
*new_handle
/* [out] [ref] */,
1065 enum winreg_CreateAction
*action_taken
/* [in,out] [unique] */,
1068 struct winreg_CreateKey r
;
1072 r
.in
.handle
= handle
;
1074 r
.in
.keyclass
= keyclass
;
1075 r
.in
.options
= options
;
1076 r
.in
.access_mask
= access_mask
;
1077 r
.in
.secdesc
= secdesc
;
1078 r
.in
.action_taken
= action_taken
;
1080 status
= cli
->dispatch(cli
,
1083 NDR_WINREG_CREATEKEY
,
1086 if (!NT_STATUS_IS_OK(status
)) {
1090 if (NT_STATUS_IS_ERR(status
)) {
1094 /* Return variables */
1095 *new_handle
= *r
.out
.new_handle
;
1096 if (action_taken
&& r
.out
.action_taken
) {
1097 *action_taken
= *r
.out
.action_taken
;
1102 *werror
= r
.out
.result
;
1105 return werror_to_ntstatus(r
.out
.result
);
1108 struct rpccli_winreg_DeleteKey_state
{
1109 struct winreg_DeleteKey orig
;
1110 struct winreg_DeleteKey tmp
;
1111 TALLOC_CTX
*out_mem_ctx
;
1112 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1115 static void rpccli_winreg_DeleteKey_done(struct tevent_req
*subreq
);
1117 struct tevent_req
*rpccli_winreg_DeleteKey_send(TALLOC_CTX
*mem_ctx
,
1118 struct tevent_context
*ev
,
1119 struct rpc_pipe_client
*cli
,
1120 struct policy_handle
*_handle
/* [in] [ref] */,
1121 struct winreg_String _key
/* [in] */)
1123 struct tevent_req
*req
;
1124 struct rpccli_winreg_DeleteKey_state
*state
;
1125 struct tevent_req
*subreq
;
1127 req
= tevent_req_create(mem_ctx
, &state
,
1128 struct rpccli_winreg_DeleteKey_state
);
1132 state
->out_mem_ctx
= NULL
;
1133 state
->dispatch_recv
= cli
->dispatch_recv
;
1136 state
->orig
.in
.handle
= _handle
;
1137 state
->orig
.in
.key
= _key
;
1139 /* Out parameters */
1142 ZERO_STRUCT(state
->orig
.out
.result
);
1144 /* make a temporary copy, that we pass to the dispatch function */
1145 state
->tmp
= state
->orig
;
1147 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1149 NDR_WINREG_DELETEKEY
,
1151 if (tevent_req_nomem(subreq
, req
)) {
1152 return tevent_req_post(req
, ev
);
1154 tevent_req_set_callback(subreq
, rpccli_winreg_DeleteKey_done
, req
);
1158 static void rpccli_winreg_DeleteKey_done(struct tevent_req
*subreq
)
1160 struct tevent_req
*req
= tevent_req_callback_data(
1161 subreq
, struct tevent_req
);
1162 struct rpccli_winreg_DeleteKey_state
*state
= tevent_req_data(
1163 req
, struct rpccli_winreg_DeleteKey_state
);
1165 TALLOC_CTX
*mem_ctx
;
1167 if (state
->out_mem_ctx
) {
1168 mem_ctx
= state
->out_mem_ctx
;
1173 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1174 TALLOC_FREE(subreq
);
1175 if (!NT_STATUS_IS_OK(status
)) {
1176 tevent_req_nterror(req
, status
);
1180 /* Copy out parameters */
1183 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1185 /* Reset temporary structure */
1186 ZERO_STRUCT(state
->tmp
);
1188 tevent_req_done(req
);
1191 NTSTATUS
rpccli_winreg_DeleteKey_recv(struct tevent_req
*req
,
1192 TALLOC_CTX
*mem_ctx
,
1195 struct rpccli_winreg_DeleteKey_state
*state
= tevent_req_data(
1196 req
, struct rpccli_winreg_DeleteKey_state
);
1199 if (tevent_req_is_nterror(req
, &status
)) {
1200 tevent_req_received(req
);
1204 /* Steal possbile out parameters to the callers context */
1205 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1208 *result
= state
->orig
.out
.result
;
1210 tevent_req_received(req
);
1211 return NT_STATUS_OK
;
1214 NTSTATUS
rpccli_winreg_DeleteKey(struct rpc_pipe_client
*cli
,
1215 TALLOC_CTX
*mem_ctx
,
1216 struct policy_handle
*handle
/* [in] [ref] */,
1217 struct winreg_String key
/* [in] */,
1220 struct winreg_DeleteKey r
;
1224 r
.in
.handle
= handle
;
1227 status
= cli
->dispatch(cli
,
1230 NDR_WINREG_DELETEKEY
,
1233 if (!NT_STATUS_IS_OK(status
)) {
1237 if (NT_STATUS_IS_ERR(status
)) {
1241 /* Return variables */
1245 *werror
= r
.out
.result
;
1248 return werror_to_ntstatus(r
.out
.result
);
1251 struct rpccli_winreg_DeleteValue_state
{
1252 struct winreg_DeleteValue orig
;
1253 struct winreg_DeleteValue tmp
;
1254 TALLOC_CTX
*out_mem_ctx
;
1255 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1258 static void rpccli_winreg_DeleteValue_done(struct tevent_req
*subreq
);
1260 struct tevent_req
*rpccli_winreg_DeleteValue_send(TALLOC_CTX
*mem_ctx
,
1261 struct tevent_context
*ev
,
1262 struct rpc_pipe_client
*cli
,
1263 struct policy_handle
*_handle
/* [in] [ref] */,
1264 struct winreg_String _value
/* [in] */)
1266 struct tevent_req
*req
;
1267 struct rpccli_winreg_DeleteValue_state
*state
;
1268 struct tevent_req
*subreq
;
1270 req
= tevent_req_create(mem_ctx
, &state
,
1271 struct rpccli_winreg_DeleteValue_state
);
1275 state
->out_mem_ctx
= NULL
;
1276 state
->dispatch_recv
= cli
->dispatch_recv
;
1279 state
->orig
.in
.handle
= _handle
;
1280 state
->orig
.in
.value
= _value
;
1282 /* Out parameters */
1285 ZERO_STRUCT(state
->orig
.out
.result
);
1287 /* make a temporary copy, that we pass to the dispatch function */
1288 state
->tmp
= state
->orig
;
1290 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1292 NDR_WINREG_DELETEVALUE
,
1294 if (tevent_req_nomem(subreq
, req
)) {
1295 return tevent_req_post(req
, ev
);
1297 tevent_req_set_callback(subreq
, rpccli_winreg_DeleteValue_done
, req
);
1301 static void rpccli_winreg_DeleteValue_done(struct tevent_req
*subreq
)
1303 struct tevent_req
*req
= tevent_req_callback_data(
1304 subreq
, struct tevent_req
);
1305 struct rpccli_winreg_DeleteValue_state
*state
= tevent_req_data(
1306 req
, struct rpccli_winreg_DeleteValue_state
);
1308 TALLOC_CTX
*mem_ctx
;
1310 if (state
->out_mem_ctx
) {
1311 mem_ctx
= state
->out_mem_ctx
;
1316 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1317 TALLOC_FREE(subreq
);
1318 if (!NT_STATUS_IS_OK(status
)) {
1319 tevent_req_nterror(req
, status
);
1323 /* Copy out parameters */
1326 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1328 /* Reset temporary structure */
1329 ZERO_STRUCT(state
->tmp
);
1331 tevent_req_done(req
);
1334 NTSTATUS
rpccli_winreg_DeleteValue_recv(struct tevent_req
*req
,
1335 TALLOC_CTX
*mem_ctx
,
1338 struct rpccli_winreg_DeleteValue_state
*state
= tevent_req_data(
1339 req
, struct rpccli_winreg_DeleteValue_state
);
1342 if (tevent_req_is_nterror(req
, &status
)) {
1343 tevent_req_received(req
);
1347 /* Steal possbile out parameters to the callers context */
1348 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1351 *result
= state
->orig
.out
.result
;
1353 tevent_req_received(req
);
1354 return NT_STATUS_OK
;
1357 NTSTATUS
rpccli_winreg_DeleteValue(struct rpc_pipe_client
*cli
,
1358 TALLOC_CTX
*mem_ctx
,
1359 struct policy_handle
*handle
/* [in] [ref] */,
1360 struct winreg_String value
/* [in] */,
1363 struct winreg_DeleteValue r
;
1367 r
.in
.handle
= handle
;
1370 status
= cli
->dispatch(cli
,
1373 NDR_WINREG_DELETEVALUE
,
1376 if (!NT_STATUS_IS_OK(status
)) {
1380 if (NT_STATUS_IS_ERR(status
)) {
1384 /* Return variables */
1388 *werror
= r
.out
.result
;
1391 return werror_to_ntstatus(r
.out
.result
);
1394 struct rpccli_winreg_EnumKey_state
{
1395 struct winreg_EnumKey orig
;
1396 struct winreg_EnumKey tmp
;
1397 TALLOC_CTX
*out_mem_ctx
;
1398 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1401 static void rpccli_winreg_EnumKey_done(struct tevent_req
*subreq
);
1403 struct tevent_req
*rpccli_winreg_EnumKey_send(TALLOC_CTX
*mem_ctx
,
1404 struct tevent_context
*ev
,
1405 struct rpc_pipe_client
*cli
,
1406 struct policy_handle
*_handle
/* [in] [ref] */,
1407 uint32_t _enum_index
/* [in] */,
1408 struct winreg_StringBuf
*_name
/* [in,out] [ref] */,
1409 struct winreg_StringBuf
*_keyclass
/* [in,out] [unique] */,
1410 NTTIME
*_last_changed_time
/* [in,out] [unique] */)
1412 struct tevent_req
*req
;
1413 struct rpccli_winreg_EnumKey_state
*state
;
1414 struct tevent_req
*subreq
;
1416 req
= tevent_req_create(mem_ctx
, &state
,
1417 struct rpccli_winreg_EnumKey_state
);
1421 state
->out_mem_ctx
= NULL
;
1422 state
->dispatch_recv
= cli
->dispatch_recv
;
1425 state
->orig
.in
.handle
= _handle
;
1426 state
->orig
.in
.enum_index
= _enum_index
;
1427 state
->orig
.in
.name
= _name
;
1428 state
->orig
.in
.keyclass
= _keyclass
;
1429 state
->orig
.in
.last_changed_time
= _last_changed_time
;
1431 /* Out parameters */
1432 state
->orig
.out
.name
= _name
;
1433 state
->orig
.out
.keyclass
= _keyclass
;
1434 state
->orig
.out
.last_changed_time
= _last_changed_time
;
1437 ZERO_STRUCT(state
->orig
.out
.result
);
1439 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1440 "rpccli_winreg_EnumKey_out_memory");
1441 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1442 return tevent_req_post(req
, ev
);
1445 /* make a temporary copy, that we pass to the dispatch function */
1446 state
->tmp
= state
->orig
;
1448 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1452 if (tevent_req_nomem(subreq
, req
)) {
1453 return tevent_req_post(req
, ev
);
1455 tevent_req_set_callback(subreq
, rpccli_winreg_EnumKey_done
, req
);
1459 static void rpccli_winreg_EnumKey_done(struct tevent_req
*subreq
)
1461 struct tevent_req
*req
= tevent_req_callback_data(
1462 subreq
, struct tevent_req
);
1463 struct rpccli_winreg_EnumKey_state
*state
= tevent_req_data(
1464 req
, struct rpccli_winreg_EnumKey_state
);
1466 TALLOC_CTX
*mem_ctx
;
1468 if (state
->out_mem_ctx
) {
1469 mem_ctx
= state
->out_mem_ctx
;
1474 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1475 TALLOC_FREE(subreq
);
1476 if (!NT_STATUS_IS_OK(status
)) {
1477 tevent_req_nterror(req
, status
);
1481 /* Copy out parameters */
1482 *state
->orig
.out
.name
= *state
->tmp
.out
.name
;
1483 if (state
->orig
.out
.keyclass
&& state
->tmp
.out
.keyclass
) {
1484 *state
->orig
.out
.keyclass
= *state
->tmp
.out
.keyclass
;
1486 if (state
->orig
.out
.last_changed_time
&& state
->tmp
.out
.last_changed_time
) {
1487 *state
->orig
.out
.last_changed_time
= *state
->tmp
.out
.last_changed_time
;
1491 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1493 /* Reset temporary structure */
1494 ZERO_STRUCT(state
->tmp
);
1496 tevent_req_done(req
);
1499 NTSTATUS
rpccli_winreg_EnumKey_recv(struct tevent_req
*req
,
1500 TALLOC_CTX
*mem_ctx
,
1503 struct rpccli_winreg_EnumKey_state
*state
= tevent_req_data(
1504 req
, struct rpccli_winreg_EnumKey_state
);
1507 if (tevent_req_is_nterror(req
, &status
)) {
1508 tevent_req_received(req
);
1512 /* Steal possbile out parameters to the callers context */
1513 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1516 *result
= state
->orig
.out
.result
;
1518 tevent_req_received(req
);
1519 return NT_STATUS_OK
;
1522 NTSTATUS
rpccli_winreg_EnumKey(struct rpc_pipe_client
*cli
,
1523 TALLOC_CTX
*mem_ctx
,
1524 struct policy_handle
*handle
/* [in] [ref] */,
1525 uint32_t enum_index
/* [in] */,
1526 struct winreg_StringBuf
*name
/* [in,out] [ref] */,
1527 struct winreg_StringBuf
*keyclass
/* [in,out] [unique] */,
1528 NTTIME
*last_changed_time
/* [in,out] [unique] */,
1531 struct winreg_EnumKey r
;
1535 r
.in
.handle
= handle
;
1536 r
.in
.enum_index
= enum_index
;
1538 r
.in
.keyclass
= keyclass
;
1539 r
.in
.last_changed_time
= last_changed_time
;
1541 status
= cli
->dispatch(cli
,
1547 if (!NT_STATUS_IS_OK(status
)) {
1551 if (NT_STATUS_IS_ERR(status
)) {
1555 /* Return variables */
1556 *name
= *r
.out
.name
;
1557 if (keyclass
&& r
.out
.keyclass
) {
1558 *keyclass
= *r
.out
.keyclass
;
1560 if (last_changed_time
&& r
.out
.last_changed_time
) {
1561 *last_changed_time
= *r
.out
.last_changed_time
;
1566 *werror
= r
.out
.result
;
1569 return werror_to_ntstatus(r
.out
.result
);
1572 struct rpccli_winreg_EnumValue_state
{
1573 struct winreg_EnumValue orig
;
1574 struct winreg_EnumValue tmp
;
1575 TALLOC_CTX
*out_mem_ctx
;
1576 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1579 static void rpccli_winreg_EnumValue_done(struct tevent_req
*subreq
);
1581 struct tevent_req
*rpccli_winreg_EnumValue_send(TALLOC_CTX
*mem_ctx
,
1582 struct tevent_context
*ev
,
1583 struct rpc_pipe_client
*cli
,
1584 struct policy_handle
*_handle
/* [in] [ref] */,
1585 uint32_t _enum_index
/* [in] */,
1586 struct winreg_ValNameBuf
*_name
/* [in,out] [ref] */,
1587 enum winreg_Type
*_type
/* [in,out] [unique] */,
1588 uint8_t *_value
/* [in,out] [unique,length_is(*length),size_is(*size)] */,
1589 uint32_t *_size
/* [in,out] [unique] */,
1590 uint32_t *_length
/* [in,out] [unique] */)
1592 struct tevent_req
*req
;
1593 struct rpccli_winreg_EnumValue_state
*state
;
1594 struct tevent_req
*subreq
;
1596 req
= tevent_req_create(mem_ctx
, &state
,
1597 struct rpccli_winreg_EnumValue_state
);
1601 state
->out_mem_ctx
= NULL
;
1602 state
->dispatch_recv
= cli
->dispatch_recv
;
1605 state
->orig
.in
.handle
= _handle
;
1606 state
->orig
.in
.enum_index
= _enum_index
;
1607 state
->orig
.in
.name
= _name
;
1608 state
->orig
.in
.type
= _type
;
1609 state
->orig
.in
.value
= _value
;
1610 state
->orig
.in
.size
= _size
;
1611 state
->orig
.in
.length
= _length
;
1613 /* Out parameters */
1614 state
->orig
.out
.name
= _name
;
1615 state
->orig
.out
.type
= _type
;
1616 state
->orig
.out
.value
= _value
;
1617 state
->orig
.out
.size
= _size
;
1618 state
->orig
.out
.length
= _length
;
1621 ZERO_STRUCT(state
->orig
.out
.result
);
1623 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1624 "rpccli_winreg_EnumValue_out_memory");
1625 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1626 return tevent_req_post(req
, ev
);
1629 /* make a temporary copy, that we pass to the dispatch function */
1630 state
->tmp
= state
->orig
;
1632 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1634 NDR_WINREG_ENUMVALUE
,
1636 if (tevent_req_nomem(subreq
, req
)) {
1637 return tevent_req_post(req
, ev
);
1639 tevent_req_set_callback(subreq
, rpccli_winreg_EnumValue_done
, req
);
1643 static void rpccli_winreg_EnumValue_done(struct tevent_req
*subreq
)
1645 struct tevent_req
*req
= tevent_req_callback_data(
1646 subreq
, struct tevent_req
);
1647 struct rpccli_winreg_EnumValue_state
*state
= tevent_req_data(
1648 req
, struct rpccli_winreg_EnumValue_state
);
1650 TALLOC_CTX
*mem_ctx
;
1652 if (state
->out_mem_ctx
) {
1653 mem_ctx
= state
->out_mem_ctx
;
1658 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1659 TALLOC_FREE(subreq
);
1660 if (!NT_STATUS_IS_OK(status
)) {
1661 tevent_req_nterror(req
, status
);
1665 /* Copy out parameters */
1666 *state
->orig
.out
.name
= *state
->tmp
.out
.name
;
1667 if (state
->orig
.out
.type
&& state
->tmp
.out
.type
) {
1668 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
1670 if (state
->orig
.out
.value
&& state
->tmp
.out
.value
) {
1671 if ((*state
->tmp
.out
.size
) > (*state
->tmp
.in
.size
)) {
1672 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
1675 if ((*state
->tmp
.out
.length
) > (*state
->tmp
.out
.size
)) {
1676 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
1679 memcpy(state
->orig
.out
.value
, state
->tmp
.out
.value
, (*state
->tmp
.out
.length
) * sizeof(*state
->orig
.out
.value
));
1681 if (state
->orig
.out
.size
&& state
->tmp
.out
.size
) {
1682 *state
->orig
.out
.size
= *state
->tmp
.out
.size
;
1684 if (state
->orig
.out
.length
&& state
->tmp
.out
.length
) {
1685 *state
->orig
.out
.length
= *state
->tmp
.out
.length
;
1689 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1691 /* Reset temporary structure */
1692 ZERO_STRUCT(state
->tmp
);
1694 tevent_req_done(req
);
1697 NTSTATUS
rpccli_winreg_EnumValue_recv(struct tevent_req
*req
,
1698 TALLOC_CTX
*mem_ctx
,
1701 struct rpccli_winreg_EnumValue_state
*state
= tevent_req_data(
1702 req
, struct rpccli_winreg_EnumValue_state
);
1705 if (tevent_req_is_nterror(req
, &status
)) {
1706 tevent_req_received(req
);
1710 /* Steal possbile out parameters to the callers context */
1711 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1714 *result
= state
->orig
.out
.result
;
1716 tevent_req_received(req
);
1717 return NT_STATUS_OK
;
1720 NTSTATUS
rpccli_winreg_EnumValue(struct rpc_pipe_client
*cli
,
1721 TALLOC_CTX
*mem_ctx
,
1722 struct policy_handle
*handle
/* [in] [ref] */,
1723 uint32_t enum_index
/* [in] */,
1724 struct winreg_ValNameBuf
*name
/* [in,out] [ref] */,
1725 enum winreg_Type
*type
/* [in,out] [unique] */,
1726 uint8_t *value
/* [in,out] [unique,length_is(*length),size_is(*size)] */,
1727 uint32_t *size
/* [in,out] [unique] */,
1728 uint32_t *length
/* [in,out] [unique] */,
1731 struct winreg_EnumValue r
;
1735 r
.in
.handle
= handle
;
1736 r
.in
.enum_index
= enum_index
;
1741 r
.in
.length
= length
;
1743 status
= cli
->dispatch(cli
,
1746 NDR_WINREG_ENUMVALUE
,
1749 if (!NT_STATUS_IS_OK(status
)) {
1753 if (NT_STATUS_IS_ERR(status
)) {
1757 /* Return variables */
1758 *name
= *r
.out
.name
;
1759 if (type
&& r
.out
.type
) {
1760 *type
= *r
.out
.type
;
1762 if (value
&& r
.out
.value
) {
1763 if ((*r
.out
.size
) > (*r
.in
.size
)) {
1764 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
1766 if ((*r
.out
.length
) > (*r
.out
.size
)) {
1767 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
1769 memcpy(value
, r
.out
.value
, (*r
.out
.length
) * sizeof(*value
));
1771 if (size
&& r
.out
.size
) {
1772 *size
= *r
.out
.size
;
1774 if (length
&& r
.out
.length
) {
1775 *length
= *r
.out
.length
;
1780 *werror
= r
.out
.result
;
1783 return werror_to_ntstatus(r
.out
.result
);
1786 struct rpccli_winreg_FlushKey_state
{
1787 struct winreg_FlushKey orig
;
1788 struct winreg_FlushKey tmp
;
1789 TALLOC_CTX
*out_mem_ctx
;
1790 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1793 static void rpccli_winreg_FlushKey_done(struct tevent_req
*subreq
);
1795 struct tevent_req
*rpccli_winreg_FlushKey_send(TALLOC_CTX
*mem_ctx
,
1796 struct tevent_context
*ev
,
1797 struct rpc_pipe_client
*cli
,
1798 struct policy_handle
*_handle
/* [in] [ref] */)
1800 struct tevent_req
*req
;
1801 struct rpccli_winreg_FlushKey_state
*state
;
1802 struct tevent_req
*subreq
;
1804 req
= tevent_req_create(mem_ctx
, &state
,
1805 struct rpccli_winreg_FlushKey_state
);
1809 state
->out_mem_ctx
= NULL
;
1810 state
->dispatch_recv
= cli
->dispatch_recv
;
1813 state
->orig
.in
.handle
= _handle
;
1815 /* Out parameters */
1818 ZERO_STRUCT(state
->orig
.out
.result
);
1820 /* make a temporary copy, that we pass to the dispatch function */
1821 state
->tmp
= state
->orig
;
1823 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1825 NDR_WINREG_FLUSHKEY
,
1827 if (tevent_req_nomem(subreq
, req
)) {
1828 return tevent_req_post(req
, ev
);
1830 tevent_req_set_callback(subreq
, rpccli_winreg_FlushKey_done
, req
);
1834 static void rpccli_winreg_FlushKey_done(struct tevent_req
*subreq
)
1836 struct tevent_req
*req
= tevent_req_callback_data(
1837 subreq
, struct tevent_req
);
1838 struct rpccli_winreg_FlushKey_state
*state
= tevent_req_data(
1839 req
, struct rpccli_winreg_FlushKey_state
);
1841 TALLOC_CTX
*mem_ctx
;
1843 if (state
->out_mem_ctx
) {
1844 mem_ctx
= state
->out_mem_ctx
;
1849 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1850 TALLOC_FREE(subreq
);
1851 if (!NT_STATUS_IS_OK(status
)) {
1852 tevent_req_nterror(req
, status
);
1856 /* Copy out parameters */
1859 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1861 /* Reset temporary structure */
1862 ZERO_STRUCT(state
->tmp
);
1864 tevent_req_done(req
);
1867 NTSTATUS
rpccli_winreg_FlushKey_recv(struct tevent_req
*req
,
1868 TALLOC_CTX
*mem_ctx
,
1871 struct rpccli_winreg_FlushKey_state
*state
= tevent_req_data(
1872 req
, struct rpccli_winreg_FlushKey_state
);
1875 if (tevent_req_is_nterror(req
, &status
)) {
1876 tevent_req_received(req
);
1880 /* Steal possbile out parameters to the callers context */
1881 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1884 *result
= state
->orig
.out
.result
;
1886 tevent_req_received(req
);
1887 return NT_STATUS_OK
;
1890 NTSTATUS
rpccli_winreg_FlushKey(struct rpc_pipe_client
*cli
,
1891 TALLOC_CTX
*mem_ctx
,
1892 struct policy_handle
*handle
/* [in] [ref] */,
1895 struct winreg_FlushKey r
;
1899 r
.in
.handle
= handle
;
1901 status
= cli
->dispatch(cli
,
1904 NDR_WINREG_FLUSHKEY
,
1907 if (!NT_STATUS_IS_OK(status
)) {
1911 if (NT_STATUS_IS_ERR(status
)) {
1915 /* Return variables */
1919 *werror
= r
.out
.result
;
1922 return werror_to_ntstatus(r
.out
.result
);
1925 struct rpccli_winreg_GetKeySecurity_state
{
1926 struct winreg_GetKeySecurity orig
;
1927 struct winreg_GetKeySecurity tmp
;
1928 TALLOC_CTX
*out_mem_ctx
;
1929 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1932 static void rpccli_winreg_GetKeySecurity_done(struct tevent_req
*subreq
);
1934 struct tevent_req
*rpccli_winreg_GetKeySecurity_send(TALLOC_CTX
*mem_ctx
,
1935 struct tevent_context
*ev
,
1936 struct rpc_pipe_client
*cli
,
1937 struct policy_handle
*_handle
/* [in] [ref] */,
1938 uint32_t _sec_info
/* [in] */,
1939 struct KeySecurityData
*_sd
/* [in,out] [ref] */)
1941 struct tevent_req
*req
;
1942 struct rpccli_winreg_GetKeySecurity_state
*state
;
1943 struct tevent_req
*subreq
;
1945 req
= tevent_req_create(mem_ctx
, &state
,
1946 struct rpccli_winreg_GetKeySecurity_state
);
1950 state
->out_mem_ctx
= NULL
;
1951 state
->dispatch_recv
= cli
->dispatch_recv
;
1954 state
->orig
.in
.handle
= _handle
;
1955 state
->orig
.in
.sec_info
= _sec_info
;
1956 state
->orig
.in
.sd
= _sd
;
1958 /* Out parameters */
1959 state
->orig
.out
.sd
= _sd
;
1962 ZERO_STRUCT(state
->orig
.out
.result
);
1964 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1965 "rpccli_winreg_GetKeySecurity_out_memory");
1966 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1967 return tevent_req_post(req
, ev
);
1970 /* make a temporary copy, that we pass to the dispatch function */
1971 state
->tmp
= state
->orig
;
1973 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1975 NDR_WINREG_GETKEYSECURITY
,
1977 if (tevent_req_nomem(subreq
, req
)) {
1978 return tevent_req_post(req
, ev
);
1980 tevent_req_set_callback(subreq
, rpccli_winreg_GetKeySecurity_done
, req
);
1984 static void rpccli_winreg_GetKeySecurity_done(struct tevent_req
*subreq
)
1986 struct tevent_req
*req
= tevent_req_callback_data(
1987 subreq
, struct tevent_req
);
1988 struct rpccli_winreg_GetKeySecurity_state
*state
= tevent_req_data(
1989 req
, struct rpccli_winreg_GetKeySecurity_state
);
1991 TALLOC_CTX
*mem_ctx
;
1993 if (state
->out_mem_ctx
) {
1994 mem_ctx
= state
->out_mem_ctx
;
1999 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2000 TALLOC_FREE(subreq
);
2001 if (!NT_STATUS_IS_OK(status
)) {
2002 tevent_req_nterror(req
, status
);
2006 /* Copy out parameters */
2007 *state
->orig
.out
.sd
= *state
->tmp
.out
.sd
;
2010 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2012 /* Reset temporary structure */
2013 ZERO_STRUCT(state
->tmp
);
2015 tevent_req_done(req
);
2018 NTSTATUS
rpccli_winreg_GetKeySecurity_recv(struct tevent_req
*req
,
2019 TALLOC_CTX
*mem_ctx
,
2022 struct rpccli_winreg_GetKeySecurity_state
*state
= tevent_req_data(
2023 req
, struct rpccli_winreg_GetKeySecurity_state
);
2026 if (tevent_req_is_nterror(req
, &status
)) {
2027 tevent_req_received(req
);
2031 /* Steal possbile out parameters to the callers context */
2032 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2035 *result
= state
->orig
.out
.result
;
2037 tevent_req_received(req
);
2038 return NT_STATUS_OK
;
2041 NTSTATUS
rpccli_winreg_GetKeySecurity(struct rpc_pipe_client
*cli
,
2042 TALLOC_CTX
*mem_ctx
,
2043 struct policy_handle
*handle
/* [in] [ref] */,
2044 uint32_t sec_info
/* [in] */,
2045 struct KeySecurityData
*sd
/* [in,out] [ref] */,
2048 struct winreg_GetKeySecurity r
;
2052 r
.in
.handle
= handle
;
2053 r
.in
.sec_info
= sec_info
;
2056 status
= cli
->dispatch(cli
,
2059 NDR_WINREG_GETKEYSECURITY
,
2062 if (!NT_STATUS_IS_OK(status
)) {
2066 if (NT_STATUS_IS_ERR(status
)) {
2070 /* Return variables */
2075 *werror
= r
.out
.result
;
2078 return werror_to_ntstatus(r
.out
.result
);
2081 struct rpccli_winreg_LoadKey_state
{
2082 struct winreg_LoadKey orig
;
2083 struct winreg_LoadKey tmp
;
2084 TALLOC_CTX
*out_mem_ctx
;
2085 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2088 static void rpccli_winreg_LoadKey_done(struct tevent_req
*subreq
);
2090 struct tevent_req
*rpccli_winreg_LoadKey_send(TALLOC_CTX
*mem_ctx
,
2091 struct tevent_context
*ev
,
2092 struct rpc_pipe_client
*cli
,
2093 struct policy_handle
*_handle
/* [in] [ref] */,
2094 struct winreg_String
*_keyname
/* [in] [unique] */,
2095 struct winreg_String
*_filename
/* [in] [unique] */)
2097 struct tevent_req
*req
;
2098 struct rpccli_winreg_LoadKey_state
*state
;
2099 struct tevent_req
*subreq
;
2101 req
= tevent_req_create(mem_ctx
, &state
,
2102 struct rpccli_winreg_LoadKey_state
);
2106 state
->out_mem_ctx
= NULL
;
2107 state
->dispatch_recv
= cli
->dispatch_recv
;
2110 state
->orig
.in
.handle
= _handle
;
2111 state
->orig
.in
.keyname
= _keyname
;
2112 state
->orig
.in
.filename
= _filename
;
2114 /* Out parameters */
2117 ZERO_STRUCT(state
->orig
.out
.result
);
2119 /* make a temporary copy, that we pass to the dispatch function */
2120 state
->tmp
= state
->orig
;
2122 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2126 if (tevent_req_nomem(subreq
, req
)) {
2127 return tevent_req_post(req
, ev
);
2129 tevent_req_set_callback(subreq
, rpccli_winreg_LoadKey_done
, req
);
2133 static void rpccli_winreg_LoadKey_done(struct tevent_req
*subreq
)
2135 struct tevent_req
*req
= tevent_req_callback_data(
2136 subreq
, struct tevent_req
);
2137 struct rpccli_winreg_LoadKey_state
*state
= tevent_req_data(
2138 req
, struct rpccli_winreg_LoadKey_state
);
2140 TALLOC_CTX
*mem_ctx
;
2142 if (state
->out_mem_ctx
) {
2143 mem_ctx
= state
->out_mem_ctx
;
2148 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2149 TALLOC_FREE(subreq
);
2150 if (!NT_STATUS_IS_OK(status
)) {
2151 tevent_req_nterror(req
, status
);
2155 /* Copy out parameters */
2158 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2160 /* Reset temporary structure */
2161 ZERO_STRUCT(state
->tmp
);
2163 tevent_req_done(req
);
2166 NTSTATUS
rpccli_winreg_LoadKey_recv(struct tevent_req
*req
,
2167 TALLOC_CTX
*mem_ctx
,
2170 struct rpccli_winreg_LoadKey_state
*state
= tevent_req_data(
2171 req
, struct rpccli_winreg_LoadKey_state
);
2174 if (tevent_req_is_nterror(req
, &status
)) {
2175 tevent_req_received(req
);
2179 /* Steal possbile out parameters to the callers context */
2180 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2183 *result
= state
->orig
.out
.result
;
2185 tevent_req_received(req
);
2186 return NT_STATUS_OK
;
2189 NTSTATUS
rpccli_winreg_LoadKey(struct rpc_pipe_client
*cli
,
2190 TALLOC_CTX
*mem_ctx
,
2191 struct policy_handle
*handle
/* [in] [ref] */,
2192 struct winreg_String
*keyname
/* [in] [unique] */,
2193 struct winreg_String
*filename
/* [in] [unique] */,
2196 struct winreg_LoadKey r
;
2200 r
.in
.handle
= handle
;
2201 r
.in
.keyname
= keyname
;
2202 r
.in
.filename
= filename
;
2204 status
= cli
->dispatch(cli
,
2210 if (!NT_STATUS_IS_OK(status
)) {
2214 if (NT_STATUS_IS_ERR(status
)) {
2218 /* Return variables */
2222 *werror
= r
.out
.result
;
2225 return werror_to_ntstatus(r
.out
.result
);
2228 struct rpccli_winreg_NotifyChangeKeyValue_state
{
2229 struct winreg_NotifyChangeKeyValue orig
;
2230 struct winreg_NotifyChangeKeyValue tmp
;
2231 TALLOC_CTX
*out_mem_ctx
;
2232 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2235 static void rpccli_winreg_NotifyChangeKeyValue_done(struct tevent_req
*subreq
);
2237 struct tevent_req
*rpccli_winreg_NotifyChangeKeyValue_send(TALLOC_CTX
*mem_ctx
,
2238 struct tevent_context
*ev
,
2239 struct rpc_pipe_client
*cli
,
2240 struct policy_handle
*_handle
/* [in] [ref] */,
2241 uint8_t _watch_subtree
/* [in] */,
2242 uint32_t _notify_filter
/* [in] */,
2243 uint32_t _unknown
/* [in] */,
2244 struct winreg_String _string1
/* [in] */,
2245 struct winreg_String _string2
/* [in] */,
2246 uint32_t _unknown2
/* [in] */)
2248 struct tevent_req
*req
;
2249 struct rpccli_winreg_NotifyChangeKeyValue_state
*state
;
2250 struct tevent_req
*subreq
;
2252 req
= tevent_req_create(mem_ctx
, &state
,
2253 struct rpccli_winreg_NotifyChangeKeyValue_state
);
2257 state
->out_mem_ctx
= NULL
;
2258 state
->dispatch_recv
= cli
->dispatch_recv
;
2261 state
->orig
.in
.handle
= _handle
;
2262 state
->orig
.in
.watch_subtree
= _watch_subtree
;
2263 state
->orig
.in
.notify_filter
= _notify_filter
;
2264 state
->orig
.in
.unknown
= _unknown
;
2265 state
->orig
.in
.string1
= _string1
;
2266 state
->orig
.in
.string2
= _string2
;
2267 state
->orig
.in
.unknown2
= _unknown2
;
2269 /* Out parameters */
2272 ZERO_STRUCT(state
->orig
.out
.result
);
2274 /* make a temporary copy, that we pass to the dispatch function */
2275 state
->tmp
= state
->orig
;
2277 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2279 NDR_WINREG_NOTIFYCHANGEKEYVALUE
,
2281 if (tevent_req_nomem(subreq
, req
)) {
2282 return tevent_req_post(req
, ev
);
2284 tevent_req_set_callback(subreq
, rpccli_winreg_NotifyChangeKeyValue_done
, req
);
2288 static void rpccli_winreg_NotifyChangeKeyValue_done(struct tevent_req
*subreq
)
2290 struct tevent_req
*req
= tevent_req_callback_data(
2291 subreq
, struct tevent_req
);
2292 struct rpccli_winreg_NotifyChangeKeyValue_state
*state
= tevent_req_data(
2293 req
, struct rpccli_winreg_NotifyChangeKeyValue_state
);
2295 TALLOC_CTX
*mem_ctx
;
2297 if (state
->out_mem_ctx
) {
2298 mem_ctx
= state
->out_mem_ctx
;
2303 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2304 TALLOC_FREE(subreq
);
2305 if (!NT_STATUS_IS_OK(status
)) {
2306 tevent_req_nterror(req
, status
);
2310 /* Copy out parameters */
2313 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2315 /* Reset temporary structure */
2316 ZERO_STRUCT(state
->tmp
);
2318 tevent_req_done(req
);
2321 NTSTATUS
rpccli_winreg_NotifyChangeKeyValue_recv(struct tevent_req
*req
,
2322 TALLOC_CTX
*mem_ctx
,
2325 struct rpccli_winreg_NotifyChangeKeyValue_state
*state
= tevent_req_data(
2326 req
, struct rpccli_winreg_NotifyChangeKeyValue_state
);
2329 if (tevent_req_is_nterror(req
, &status
)) {
2330 tevent_req_received(req
);
2334 /* Steal possbile out parameters to the callers context */
2335 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2338 *result
= state
->orig
.out
.result
;
2340 tevent_req_received(req
);
2341 return NT_STATUS_OK
;
2344 NTSTATUS
rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client
*cli
,
2345 TALLOC_CTX
*mem_ctx
,
2346 struct policy_handle
*handle
/* [in] [ref] */,
2347 uint8_t watch_subtree
/* [in] */,
2348 uint32_t notify_filter
/* [in] */,
2349 uint32_t unknown
/* [in] */,
2350 struct winreg_String string1
/* [in] */,
2351 struct winreg_String string2
/* [in] */,
2352 uint32_t unknown2
/* [in] */,
2355 struct winreg_NotifyChangeKeyValue r
;
2359 r
.in
.handle
= handle
;
2360 r
.in
.watch_subtree
= watch_subtree
;
2361 r
.in
.notify_filter
= notify_filter
;
2362 r
.in
.unknown
= unknown
;
2363 r
.in
.string1
= string1
;
2364 r
.in
.string2
= string2
;
2365 r
.in
.unknown2
= unknown2
;
2367 status
= cli
->dispatch(cli
,
2370 NDR_WINREG_NOTIFYCHANGEKEYVALUE
,
2373 if (!NT_STATUS_IS_OK(status
)) {
2377 if (NT_STATUS_IS_ERR(status
)) {
2381 /* Return variables */
2385 *werror
= r
.out
.result
;
2388 return werror_to_ntstatus(r
.out
.result
);
2391 struct rpccli_winreg_OpenKey_state
{
2392 struct winreg_OpenKey orig
;
2393 struct winreg_OpenKey tmp
;
2394 TALLOC_CTX
*out_mem_ctx
;
2395 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2398 static void rpccli_winreg_OpenKey_done(struct tevent_req
*subreq
);
2400 struct tevent_req
*rpccli_winreg_OpenKey_send(TALLOC_CTX
*mem_ctx
,
2401 struct tevent_context
*ev
,
2402 struct rpc_pipe_client
*cli
,
2403 struct policy_handle
*_parent_handle
/* [in] [ref] */,
2404 struct winreg_String _keyname
/* [in] */,
2405 uint32_t _unknown
/* [in] */,
2406 uint32_t _access_mask
/* [in] */,
2407 struct policy_handle
*_handle
/* [out] [ref] */)
2409 struct tevent_req
*req
;
2410 struct rpccli_winreg_OpenKey_state
*state
;
2411 struct tevent_req
*subreq
;
2413 req
= tevent_req_create(mem_ctx
, &state
,
2414 struct rpccli_winreg_OpenKey_state
);
2418 state
->out_mem_ctx
= NULL
;
2419 state
->dispatch_recv
= cli
->dispatch_recv
;
2422 state
->orig
.in
.parent_handle
= _parent_handle
;
2423 state
->orig
.in
.keyname
= _keyname
;
2424 state
->orig
.in
.unknown
= _unknown
;
2425 state
->orig
.in
.access_mask
= _access_mask
;
2427 /* Out parameters */
2428 state
->orig
.out
.handle
= _handle
;
2431 ZERO_STRUCT(state
->orig
.out
.result
);
2433 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2434 "rpccli_winreg_OpenKey_out_memory");
2435 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2436 return tevent_req_post(req
, ev
);
2439 /* make a temporary copy, that we pass to the dispatch function */
2440 state
->tmp
= state
->orig
;
2442 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2446 if (tevent_req_nomem(subreq
, req
)) {
2447 return tevent_req_post(req
, ev
);
2449 tevent_req_set_callback(subreq
, rpccli_winreg_OpenKey_done
, req
);
2453 static void rpccli_winreg_OpenKey_done(struct tevent_req
*subreq
)
2455 struct tevent_req
*req
= tevent_req_callback_data(
2456 subreq
, struct tevent_req
);
2457 struct rpccli_winreg_OpenKey_state
*state
= tevent_req_data(
2458 req
, struct rpccli_winreg_OpenKey_state
);
2460 TALLOC_CTX
*mem_ctx
;
2462 if (state
->out_mem_ctx
) {
2463 mem_ctx
= state
->out_mem_ctx
;
2468 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2469 TALLOC_FREE(subreq
);
2470 if (!NT_STATUS_IS_OK(status
)) {
2471 tevent_req_nterror(req
, status
);
2475 /* Copy out parameters */
2476 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
2479 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2481 /* Reset temporary structure */
2482 ZERO_STRUCT(state
->tmp
);
2484 tevent_req_done(req
);
2487 NTSTATUS
rpccli_winreg_OpenKey_recv(struct tevent_req
*req
,
2488 TALLOC_CTX
*mem_ctx
,
2491 struct rpccli_winreg_OpenKey_state
*state
= tevent_req_data(
2492 req
, struct rpccli_winreg_OpenKey_state
);
2495 if (tevent_req_is_nterror(req
, &status
)) {
2496 tevent_req_received(req
);
2500 /* Steal possbile out parameters to the callers context */
2501 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2504 *result
= state
->orig
.out
.result
;
2506 tevent_req_received(req
);
2507 return NT_STATUS_OK
;
2510 NTSTATUS
rpccli_winreg_OpenKey(struct rpc_pipe_client
*cli
,
2511 TALLOC_CTX
*mem_ctx
,
2512 struct policy_handle
*parent_handle
/* [in] [ref] */,
2513 struct winreg_String keyname
/* [in] */,
2514 uint32_t unknown
/* [in] */,
2515 uint32_t access_mask
/* [in] */,
2516 struct policy_handle
*handle
/* [out] [ref] */,
2519 struct winreg_OpenKey r
;
2523 r
.in
.parent_handle
= parent_handle
;
2524 r
.in
.keyname
= keyname
;
2525 r
.in
.unknown
= unknown
;
2526 r
.in
.access_mask
= access_mask
;
2528 status
= cli
->dispatch(cli
,
2534 if (!NT_STATUS_IS_OK(status
)) {
2538 if (NT_STATUS_IS_ERR(status
)) {
2542 /* Return variables */
2543 *handle
= *r
.out
.handle
;
2547 *werror
= r
.out
.result
;
2550 return werror_to_ntstatus(r
.out
.result
);
2553 struct rpccli_winreg_QueryInfoKey_state
{
2554 struct winreg_QueryInfoKey orig
;
2555 struct winreg_QueryInfoKey tmp
;
2556 TALLOC_CTX
*out_mem_ctx
;
2557 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2560 static void rpccli_winreg_QueryInfoKey_done(struct tevent_req
*subreq
);
2562 struct tevent_req
*rpccli_winreg_QueryInfoKey_send(TALLOC_CTX
*mem_ctx
,
2563 struct tevent_context
*ev
,
2564 struct rpc_pipe_client
*cli
,
2565 struct policy_handle
*_handle
/* [in] [ref] */,
2566 struct winreg_String
*_classname
/* [in,out] [ref] */,
2567 uint32_t *_num_subkeys
/* [out] [ref] */,
2568 uint32_t *_max_subkeylen
/* [out] [ref] */,
2569 uint32_t *_max_classlen
/* [out] [ref] */,
2570 uint32_t *_num_values
/* [out] [ref] */,
2571 uint32_t *_max_valnamelen
/* [out] [ref] */,
2572 uint32_t *_max_valbufsize
/* [out] [ref] */,
2573 uint32_t *_secdescsize
/* [out] [ref] */,
2574 NTTIME
*_last_changed_time
/* [out] [ref] */)
2576 struct tevent_req
*req
;
2577 struct rpccli_winreg_QueryInfoKey_state
*state
;
2578 struct tevent_req
*subreq
;
2580 req
= tevent_req_create(mem_ctx
, &state
,
2581 struct rpccli_winreg_QueryInfoKey_state
);
2585 state
->out_mem_ctx
= NULL
;
2586 state
->dispatch_recv
= cli
->dispatch_recv
;
2589 state
->orig
.in
.handle
= _handle
;
2590 state
->orig
.in
.classname
= _classname
;
2592 /* Out parameters */
2593 state
->orig
.out
.classname
= _classname
;
2594 state
->orig
.out
.num_subkeys
= _num_subkeys
;
2595 state
->orig
.out
.max_subkeylen
= _max_subkeylen
;
2596 state
->orig
.out
.max_classlen
= _max_classlen
;
2597 state
->orig
.out
.num_values
= _num_values
;
2598 state
->orig
.out
.max_valnamelen
= _max_valnamelen
;
2599 state
->orig
.out
.max_valbufsize
= _max_valbufsize
;
2600 state
->orig
.out
.secdescsize
= _secdescsize
;
2601 state
->orig
.out
.last_changed_time
= _last_changed_time
;
2604 ZERO_STRUCT(state
->orig
.out
.result
);
2606 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2607 "rpccli_winreg_QueryInfoKey_out_memory");
2608 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2609 return tevent_req_post(req
, ev
);
2612 /* make a temporary copy, that we pass to the dispatch function */
2613 state
->tmp
= state
->orig
;
2615 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2617 NDR_WINREG_QUERYINFOKEY
,
2619 if (tevent_req_nomem(subreq
, req
)) {
2620 return tevent_req_post(req
, ev
);
2622 tevent_req_set_callback(subreq
, rpccli_winreg_QueryInfoKey_done
, req
);
2626 static void rpccli_winreg_QueryInfoKey_done(struct tevent_req
*subreq
)
2628 struct tevent_req
*req
= tevent_req_callback_data(
2629 subreq
, struct tevent_req
);
2630 struct rpccli_winreg_QueryInfoKey_state
*state
= tevent_req_data(
2631 req
, struct rpccli_winreg_QueryInfoKey_state
);
2633 TALLOC_CTX
*mem_ctx
;
2635 if (state
->out_mem_ctx
) {
2636 mem_ctx
= state
->out_mem_ctx
;
2641 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2642 TALLOC_FREE(subreq
);
2643 if (!NT_STATUS_IS_OK(status
)) {
2644 tevent_req_nterror(req
, status
);
2648 /* Copy out parameters */
2649 *state
->orig
.out
.classname
= *state
->tmp
.out
.classname
;
2650 *state
->orig
.out
.num_subkeys
= *state
->tmp
.out
.num_subkeys
;
2651 *state
->orig
.out
.max_subkeylen
= *state
->tmp
.out
.max_subkeylen
;
2652 *state
->orig
.out
.max_classlen
= *state
->tmp
.out
.max_classlen
;
2653 *state
->orig
.out
.num_values
= *state
->tmp
.out
.num_values
;
2654 *state
->orig
.out
.max_valnamelen
= *state
->tmp
.out
.max_valnamelen
;
2655 *state
->orig
.out
.max_valbufsize
= *state
->tmp
.out
.max_valbufsize
;
2656 *state
->orig
.out
.secdescsize
= *state
->tmp
.out
.secdescsize
;
2657 *state
->orig
.out
.last_changed_time
= *state
->tmp
.out
.last_changed_time
;
2660 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2662 /* Reset temporary structure */
2663 ZERO_STRUCT(state
->tmp
);
2665 tevent_req_done(req
);
2668 NTSTATUS
rpccli_winreg_QueryInfoKey_recv(struct tevent_req
*req
,
2669 TALLOC_CTX
*mem_ctx
,
2672 struct rpccli_winreg_QueryInfoKey_state
*state
= tevent_req_data(
2673 req
, struct rpccli_winreg_QueryInfoKey_state
);
2676 if (tevent_req_is_nterror(req
, &status
)) {
2677 tevent_req_received(req
);
2681 /* Steal possbile out parameters to the callers context */
2682 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2685 *result
= state
->orig
.out
.result
;
2687 tevent_req_received(req
);
2688 return NT_STATUS_OK
;
2691 NTSTATUS
rpccli_winreg_QueryInfoKey(struct rpc_pipe_client
*cli
,
2692 TALLOC_CTX
*mem_ctx
,
2693 struct policy_handle
*handle
/* [in] [ref] */,
2694 struct winreg_String
*classname
/* [in,out] [ref] */,
2695 uint32_t *num_subkeys
/* [out] [ref] */,
2696 uint32_t *max_subkeylen
/* [out] [ref] */,
2697 uint32_t *max_classlen
/* [out] [ref] */,
2698 uint32_t *num_values
/* [out] [ref] */,
2699 uint32_t *max_valnamelen
/* [out] [ref] */,
2700 uint32_t *max_valbufsize
/* [out] [ref] */,
2701 uint32_t *secdescsize
/* [out] [ref] */,
2702 NTTIME
*last_changed_time
/* [out] [ref] */,
2705 struct winreg_QueryInfoKey r
;
2709 r
.in
.handle
= handle
;
2710 r
.in
.classname
= classname
;
2712 status
= cli
->dispatch(cli
,
2715 NDR_WINREG_QUERYINFOKEY
,
2718 if (!NT_STATUS_IS_OK(status
)) {
2722 if (NT_STATUS_IS_ERR(status
)) {
2726 /* Return variables */
2727 *classname
= *r
.out
.classname
;
2728 *num_subkeys
= *r
.out
.num_subkeys
;
2729 *max_subkeylen
= *r
.out
.max_subkeylen
;
2730 *max_classlen
= *r
.out
.max_classlen
;
2731 *num_values
= *r
.out
.num_values
;
2732 *max_valnamelen
= *r
.out
.max_valnamelen
;
2733 *max_valbufsize
= *r
.out
.max_valbufsize
;
2734 *secdescsize
= *r
.out
.secdescsize
;
2735 *last_changed_time
= *r
.out
.last_changed_time
;
2739 *werror
= r
.out
.result
;
2742 return werror_to_ntstatus(r
.out
.result
);
2745 struct rpccli_winreg_QueryValue_state
{
2746 struct winreg_QueryValue orig
;
2747 struct winreg_QueryValue tmp
;
2748 TALLOC_CTX
*out_mem_ctx
;
2749 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2752 static void rpccli_winreg_QueryValue_done(struct tevent_req
*subreq
);
2754 struct tevent_req
*rpccli_winreg_QueryValue_send(TALLOC_CTX
*mem_ctx
,
2755 struct tevent_context
*ev
,
2756 struct rpc_pipe_client
*cli
,
2757 struct policy_handle
*_handle
/* [in] [ref] */,
2758 struct winreg_String
*_value_name
/* [in] [ref] */,
2759 enum winreg_Type
*_type
/* [in,out] [unique] */,
2760 uint8_t *_data
/* [in,out] [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */,
2761 uint32_t *_data_size
/* [in,out] [unique] */,
2762 uint32_t *_data_length
/* [in,out] [unique] */)
2764 struct tevent_req
*req
;
2765 struct rpccli_winreg_QueryValue_state
*state
;
2766 struct tevent_req
*subreq
;
2768 req
= tevent_req_create(mem_ctx
, &state
,
2769 struct rpccli_winreg_QueryValue_state
);
2773 state
->out_mem_ctx
= NULL
;
2774 state
->dispatch_recv
= cli
->dispatch_recv
;
2777 state
->orig
.in
.handle
= _handle
;
2778 state
->orig
.in
.value_name
= _value_name
;
2779 state
->orig
.in
.type
= _type
;
2780 state
->orig
.in
.data
= _data
;
2781 state
->orig
.in
.data_size
= _data_size
;
2782 state
->orig
.in
.data_length
= _data_length
;
2784 /* Out parameters */
2785 state
->orig
.out
.type
= _type
;
2786 state
->orig
.out
.data
= _data
;
2787 state
->orig
.out
.data_size
= _data_size
;
2788 state
->orig
.out
.data_length
= _data_length
;
2791 ZERO_STRUCT(state
->orig
.out
.result
);
2793 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2794 "rpccli_winreg_QueryValue_out_memory");
2795 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2796 return tevent_req_post(req
, ev
);
2799 /* make a temporary copy, that we pass to the dispatch function */
2800 state
->tmp
= state
->orig
;
2802 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2804 NDR_WINREG_QUERYVALUE
,
2806 if (tevent_req_nomem(subreq
, req
)) {
2807 return tevent_req_post(req
, ev
);
2809 tevent_req_set_callback(subreq
, rpccli_winreg_QueryValue_done
, req
);
2813 static void rpccli_winreg_QueryValue_done(struct tevent_req
*subreq
)
2815 struct tevent_req
*req
= tevent_req_callback_data(
2816 subreq
, struct tevent_req
);
2817 struct rpccli_winreg_QueryValue_state
*state
= tevent_req_data(
2818 req
, struct rpccli_winreg_QueryValue_state
);
2820 TALLOC_CTX
*mem_ctx
;
2822 if (state
->out_mem_ctx
) {
2823 mem_ctx
= state
->out_mem_ctx
;
2828 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2829 TALLOC_FREE(subreq
);
2830 if (!NT_STATUS_IS_OK(status
)) {
2831 tevent_req_nterror(req
, status
);
2835 /* Copy out parameters */
2836 if (state
->orig
.out
.type
&& state
->tmp
.out
.type
) {
2837 *state
->orig
.out
.type
= *state
->tmp
.out
.type
;
2839 if (state
->orig
.out
.data
&& state
->tmp
.out
.data
) {
2840 if ((state
->tmp
.out
.data_size
?*state
->tmp
.out
.data_size
:0) > (state
->tmp
.in
.data_size
?*state
->tmp
.in
.data_size
:0)) {
2841 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
2844 if ((state
->tmp
.out
.data_length
?*state
->tmp
.out
.data_length
:0) > (state
->tmp
.out
.data_size
?*state
->tmp
.out
.data_size
:0)) {
2845 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
2848 memcpy(state
->orig
.out
.data
, state
->tmp
.out
.data
, (state
->tmp
.out
.data_length
?*state
->tmp
.out
.data_length
:0) * sizeof(*state
->orig
.out
.data
));
2850 if (state
->orig
.out
.data_size
&& state
->tmp
.out
.data_size
) {
2851 *state
->orig
.out
.data_size
= *state
->tmp
.out
.data_size
;
2853 if (state
->orig
.out
.data_length
&& state
->tmp
.out
.data_length
) {
2854 *state
->orig
.out
.data_length
= *state
->tmp
.out
.data_length
;
2858 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2860 /* Reset temporary structure */
2861 ZERO_STRUCT(state
->tmp
);
2863 tevent_req_done(req
);
2866 NTSTATUS
rpccli_winreg_QueryValue_recv(struct tevent_req
*req
,
2867 TALLOC_CTX
*mem_ctx
,
2870 struct rpccli_winreg_QueryValue_state
*state
= tevent_req_data(
2871 req
, struct rpccli_winreg_QueryValue_state
);
2874 if (tevent_req_is_nterror(req
, &status
)) {
2875 tevent_req_received(req
);
2879 /* Steal possbile out parameters to the callers context */
2880 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2883 *result
= state
->orig
.out
.result
;
2885 tevent_req_received(req
);
2886 return NT_STATUS_OK
;
2889 NTSTATUS
rpccli_winreg_QueryValue(struct rpc_pipe_client
*cli
,
2890 TALLOC_CTX
*mem_ctx
,
2891 struct policy_handle
*handle
/* [in] [ref] */,
2892 struct winreg_String
*value_name
/* [in] [ref] */,
2893 enum winreg_Type
*type
/* [in,out] [unique] */,
2894 uint8_t *data
/* [in,out] [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */,
2895 uint32_t *data_size
/* [in,out] [unique] */,
2896 uint32_t *data_length
/* [in,out] [unique] */,
2899 struct winreg_QueryValue r
;
2903 r
.in
.handle
= handle
;
2904 r
.in
.value_name
= value_name
;
2907 r
.in
.data_size
= data_size
;
2908 r
.in
.data_length
= data_length
;
2910 status
= cli
->dispatch(cli
,
2913 NDR_WINREG_QUERYVALUE
,
2916 if (!NT_STATUS_IS_OK(status
)) {
2920 if (NT_STATUS_IS_ERR(status
)) {
2924 /* Return variables */
2925 if (type
&& r
.out
.type
) {
2926 *type
= *r
.out
.type
;
2928 if (data
&& r
.out
.data
) {
2929 if ((r
.out
.data_size
?*r
.out
.data_size
:0) > (r
.in
.data_size
?*r
.in
.data_size
:0)) {
2930 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
2932 if ((r
.out
.data_length
?*r
.out
.data_length
:0) > (r
.out
.data_size
?*r
.out
.data_size
:0)) {
2933 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
2935 memcpy(data
, r
.out
.data
, (r
.out
.data_length
?*r
.out
.data_length
:0) * sizeof(*data
));
2937 if (data_size
&& r
.out
.data_size
) {
2938 *data_size
= *r
.out
.data_size
;
2940 if (data_length
&& r
.out
.data_length
) {
2941 *data_length
= *r
.out
.data_length
;
2946 *werror
= r
.out
.result
;
2949 return werror_to_ntstatus(r
.out
.result
);
2952 struct rpccli_winreg_ReplaceKey_state
{
2953 struct winreg_ReplaceKey orig
;
2954 struct winreg_ReplaceKey tmp
;
2955 TALLOC_CTX
*out_mem_ctx
;
2956 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2959 static void rpccli_winreg_ReplaceKey_done(struct tevent_req
*subreq
);
2961 struct tevent_req
*rpccli_winreg_ReplaceKey_send(TALLOC_CTX
*mem_ctx
,
2962 struct tevent_context
*ev
,
2963 struct rpc_pipe_client
*cli
)
2965 struct tevent_req
*req
;
2966 struct rpccli_winreg_ReplaceKey_state
*state
;
2967 struct tevent_req
*subreq
;
2969 req
= tevent_req_create(mem_ctx
, &state
,
2970 struct rpccli_winreg_ReplaceKey_state
);
2974 state
->out_mem_ctx
= NULL
;
2975 state
->dispatch_recv
= cli
->dispatch_recv
;
2979 /* Out parameters */
2982 ZERO_STRUCT(state
->orig
.out
.result
);
2984 /* make a temporary copy, that we pass to the dispatch function */
2985 state
->tmp
= state
->orig
;
2987 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2989 NDR_WINREG_REPLACEKEY
,
2991 if (tevent_req_nomem(subreq
, req
)) {
2992 return tevent_req_post(req
, ev
);
2994 tevent_req_set_callback(subreq
, rpccli_winreg_ReplaceKey_done
, req
);
2998 static void rpccli_winreg_ReplaceKey_done(struct tevent_req
*subreq
)
3000 struct tevent_req
*req
= tevent_req_callback_data(
3001 subreq
, struct tevent_req
);
3002 struct rpccli_winreg_ReplaceKey_state
*state
= tevent_req_data(
3003 req
, struct rpccli_winreg_ReplaceKey_state
);
3005 TALLOC_CTX
*mem_ctx
;
3007 if (state
->out_mem_ctx
) {
3008 mem_ctx
= state
->out_mem_ctx
;
3013 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3014 TALLOC_FREE(subreq
);
3015 if (!NT_STATUS_IS_OK(status
)) {
3016 tevent_req_nterror(req
, status
);
3020 /* Copy out parameters */
3023 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3025 /* Reset temporary structure */
3026 ZERO_STRUCT(state
->tmp
);
3028 tevent_req_done(req
);
3031 NTSTATUS
rpccli_winreg_ReplaceKey_recv(struct tevent_req
*req
,
3032 TALLOC_CTX
*mem_ctx
,
3035 struct rpccli_winreg_ReplaceKey_state
*state
= tevent_req_data(
3036 req
, struct rpccli_winreg_ReplaceKey_state
);
3039 if (tevent_req_is_nterror(req
, &status
)) {
3040 tevent_req_received(req
);
3044 /* Steal possbile out parameters to the callers context */
3045 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3048 *result
= state
->orig
.out
.result
;
3050 tevent_req_received(req
);
3051 return NT_STATUS_OK
;
3054 NTSTATUS
rpccli_winreg_ReplaceKey(struct rpc_pipe_client
*cli
,
3055 TALLOC_CTX
*mem_ctx
,
3058 struct winreg_ReplaceKey r
;
3063 status
= cli
->dispatch(cli
,
3066 NDR_WINREG_REPLACEKEY
,
3069 if (!NT_STATUS_IS_OK(status
)) {
3073 if (NT_STATUS_IS_ERR(status
)) {
3077 /* Return variables */
3081 *werror
= r
.out
.result
;
3084 return werror_to_ntstatus(r
.out
.result
);
3087 struct rpccli_winreg_RestoreKey_state
{
3088 struct winreg_RestoreKey orig
;
3089 struct winreg_RestoreKey tmp
;
3090 TALLOC_CTX
*out_mem_ctx
;
3091 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3094 static void rpccli_winreg_RestoreKey_done(struct tevent_req
*subreq
);
3096 struct tevent_req
*rpccli_winreg_RestoreKey_send(TALLOC_CTX
*mem_ctx
,
3097 struct tevent_context
*ev
,
3098 struct rpc_pipe_client
*cli
,
3099 struct policy_handle
*_handle
/* [in] [ref] */,
3100 struct winreg_String
*_filename
/* [in] [ref] */,
3101 uint32_t _flags
/* [in] */)
3103 struct tevent_req
*req
;
3104 struct rpccli_winreg_RestoreKey_state
*state
;
3105 struct tevent_req
*subreq
;
3107 req
= tevent_req_create(mem_ctx
, &state
,
3108 struct rpccli_winreg_RestoreKey_state
);
3112 state
->out_mem_ctx
= NULL
;
3113 state
->dispatch_recv
= cli
->dispatch_recv
;
3116 state
->orig
.in
.handle
= _handle
;
3117 state
->orig
.in
.filename
= _filename
;
3118 state
->orig
.in
.flags
= _flags
;
3120 /* Out parameters */
3123 ZERO_STRUCT(state
->orig
.out
.result
);
3125 /* make a temporary copy, that we pass to the dispatch function */
3126 state
->tmp
= state
->orig
;
3128 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3130 NDR_WINREG_RESTOREKEY
,
3132 if (tevent_req_nomem(subreq
, req
)) {
3133 return tevent_req_post(req
, ev
);
3135 tevent_req_set_callback(subreq
, rpccli_winreg_RestoreKey_done
, req
);
3139 static void rpccli_winreg_RestoreKey_done(struct tevent_req
*subreq
)
3141 struct tevent_req
*req
= tevent_req_callback_data(
3142 subreq
, struct tevent_req
);
3143 struct rpccli_winreg_RestoreKey_state
*state
= tevent_req_data(
3144 req
, struct rpccli_winreg_RestoreKey_state
);
3146 TALLOC_CTX
*mem_ctx
;
3148 if (state
->out_mem_ctx
) {
3149 mem_ctx
= state
->out_mem_ctx
;
3154 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3155 TALLOC_FREE(subreq
);
3156 if (!NT_STATUS_IS_OK(status
)) {
3157 tevent_req_nterror(req
, status
);
3161 /* Copy out parameters */
3164 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3166 /* Reset temporary structure */
3167 ZERO_STRUCT(state
->tmp
);
3169 tevent_req_done(req
);
3172 NTSTATUS
rpccli_winreg_RestoreKey_recv(struct tevent_req
*req
,
3173 TALLOC_CTX
*mem_ctx
,
3176 struct rpccli_winreg_RestoreKey_state
*state
= tevent_req_data(
3177 req
, struct rpccli_winreg_RestoreKey_state
);
3180 if (tevent_req_is_nterror(req
, &status
)) {
3181 tevent_req_received(req
);
3185 /* Steal possbile out parameters to the callers context */
3186 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3189 *result
= state
->orig
.out
.result
;
3191 tevent_req_received(req
);
3192 return NT_STATUS_OK
;
3195 NTSTATUS
rpccli_winreg_RestoreKey(struct rpc_pipe_client
*cli
,
3196 TALLOC_CTX
*mem_ctx
,
3197 struct policy_handle
*handle
/* [in] [ref] */,
3198 struct winreg_String
*filename
/* [in] [ref] */,
3199 uint32_t flags
/* [in] */,
3202 struct winreg_RestoreKey r
;
3206 r
.in
.handle
= handle
;
3207 r
.in
.filename
= filename
;
3210 status
= cli
->dispatch(cli
,
3213 NDR_WINREG_RESTOREKEY
,
3216 if (!NT_STATUS_IS_OK(status
)) {
3220 if (NT_STATUS_IS_ERR(status
)) {
3224 /* Return variables */
3228 *werror
= r
.out
.result
;
3231 return werror_to_ntstatus(r
.out
.result
);
3234 struct rpccli_winreg_SaveKey_state
{
3235 struct winreg_SaveKey orig
;
3236 struct winreg_SaveKey tmp
;
3237 TALLOC_CTX
*out_mem_ctx
;
3238 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3241 static void rpccli_winreg_SaveKey_done(struct tevent_req
*subreq
);
3243 struct tevent_req
*rpccli_winreg_SaveKey_send(TALLOC_CTX
*mem_ctx
,
3244 struct tevent_context
*ev
,
3245 struct rpc_pipe_client
*cli
,
3246 struct policy_handle
*_handle
/* [in] [ref] */,
3247 struct winreg_String
*_filename
/* [in] [ref] */,
3248 struct KeySecurityAttribute
*_sec_attrib
/* [in] [unique] */)
3250 struct tevent_req
*req
;
3251 struct rpccli_winreg_SaveKey_state
*state
;
3252 struct tevent_req
*subreq
;
3254 req
= tevent_req_create(mem_ctx
, &state
,
3255 struct rpccli_winreg_SaveKey_state
);
3259 state
->out_mem_ctx
= NULL
;
3260 state
->dispatch_recv
= cli
->dispatch_recv
;
3263 state
->orig
.in
.handle
= _handle
;
3264 state
->orig
.in
.filename
= _filename
;
3265 state
->orig
.in
.sec_attrib
= _sec_attrib
;
3267 /* Out parameters */
3270 ZERO_STRUCT(state
->orig
.out
.result
);
3272 /* make a temporary copy, that we pass to the dispatch function */
3273 state
->tmp
= state
->orig
;
3275 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3279 if (tevent_req_nomem(subreq
, req
)) {
3280 return tevent_req_post(req
, ev
);
3282 tevent_req_set_callback(subreq
, rpccli_winreg_SaveKey_done
, req
);
3286 static void rpccli_winreg_SaveKey_done(struct tevent_req
*subreq
)
3288 struct tevent_req
*req
= tevent_req_callback_data(
3289 subreq
, struct tevent_req
);
3290 struct rpccli_winreg_SaveKey_state
*state
= tevent_req_data(
3291 req
, struct rpccli_winreg_SaveKey_state
);
3293 TALLOC_CTX
*mem_ctx
;
3295 if (state
->out_mem_ctx
) {
3296 mem_ctx
= state
->out_mem_ctx
;
3301 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3302 TALLOC_FREE(subreq
);
3303 if (!NT_STATUS_IS_OK(status
)) {
3304 tevent_req_nterror(req
, status
);
3308 /* Copy out parameters */
3311 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3313 /* Reset temporary structure */
3314 ZERO_STRUCT(state
->tmp
);
3316 tevent_req_done(req
);
3319 NTSTATUS
rpccli_winreg_SaveKey_recv(struct tevent_req
*req
,
3320 TALLOC_CTX
*mem_ctx
,
3323 struct rpccli_winreg_SaveKey_state
*state
= tevent_req_data(
3324 req
, struct rpccli_winreg_SaveKey_state
);
3327 if (tevent_req_is_nterror(req
, &status
)) {
3328 tevent_req_received(req
);
3332 /* Steal possbile out parameters to the callers context */
3333 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3336 *result
= state
->orig
.out
.result
;
3338 tevent_req_received(req
);
3339 return NT_STATUS_OK
;
3342 NTSTATUS
rpccli_winreg_SaveKey(struct rpc_pipe_client
*cli
,
3343 TALLOC_CTX
*mem_ctx
,
3344 struct policy_handle
*handle
/* [in] [ref] */,
3345 struct winreg_String
*filename
/* [in] [ref] */,
3346 struct KeySecurityAttribute
*sec_attrib
/* [in] [unique] */,
3349 struct winreg_SaveKey r
;
3353 r
.in
.handle
= handle
;
3354 r
.in
.filename
= filename
;
3355 r
.in
.sec_attrib
= sec_attrib
;
3357 status
= cli
->dispatch(cli
,
3363 if (!NT_STATUS_IS_OK(status
)) {
3367 if (NT_STATUS_IS_ERR(status
)) {
3371 /* Return variables */
3375 *werror
= r
.out
.result
;
3378 return werror_to_ntstatus(r
.out
.result
);
3381 struct rpccli_winreg_SetKeySecurity_state
{
3382 struct winreg_SetKeySecurity orig
;
3383 struct winreg_SetKeySecurity tmp
;
3384 TALLOC_CTX
*out_mem_ctx
;
3385 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3388 static void rpccli_winreg_SetKeySecurity_done(struct tevent_req
*subreq
);
3390 struct tevent_req
*rpccli_winreg_SetKeySecurity_send(TALLOC_CTX
*mem_ctx
,
3391 struct tevent_context
*ev
,
3392 struct rpc_pipe_client
*cli
,
3393 struct policy_handle
*_handle
/* [in] [ref] */,
3394 uint32_t _sec_info
/* [in] */,
3395 struct KeySecurityData
*_sd
/* [in] [ref] */)
3397 struct tevent_req
*req
;
3398 struct rpccli_winreg_SetKeySecurity_state
*state
;
3399 struct tevent_req
*subreq
;
3401 req
= tevent_req_create(mem_ctx
, &state
,
3402 struct rpccli_winreg_SetKeySecurity_state
);
3406 state
->out_mem_ctx
= NULL
;
3407 state
->dispatch_recv
= cli
->dispatch_recv
;
3410 state
->orig
.in
.handle
= _handle
;
3411 state
->orig
.in
.sec_info
= _sec_info
;
3412 state
->orig
.in
.sd
= _sd
;
3414 /* Out parameters */
3417 ZERO_STRUCT(state
->orig
.out
.result
);
3419 /* make a temporary copy, that we pass to the dispatch function */
3420 state
->tmp
= state
->orig
;
3422 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3424 NDR_WINREG_SETKEYSECURITY
,
3426 if (tevent_req_nomem(subreq
, req
)) {
3427 return tevent_req_post(req
, ev
);
3429 tevent_req_set_callback(subreq
, rpccli_winreg_SetKeySecurity_done
, req
);
3433 static void rpccli_winreg_SetKeySecurity_done(struct tevent_req
*subreq
)
3435 struct tevent_req
*req
= tevent_req_callback_data(
3436 subreq
, struct tevent_req
);
3437 struct rpccli_winreg_SetKeySecurity_state
*state
= tevent_req_data(
3438 req
, struct rpccli_winreg_SetKeySecurity_state
);
3440 TALLOC_CTX
*mem_ctx
;
3442 if (state
->out_mem_ctx
) {
3443 mem_ctx
= state
->out_mem_ctx
;
3448 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3449 TALLOC_FREE(subreq
);
3450 if (!NT_STATUS_IS_OK(status
)) {
3451 tevent_req_nterror(req
, status
);
3455 /* Copy out parameters */
3458 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3460 /* Reset temporary structure */
3461 ZERO_STRUCT(state
->tmp
);
3463 tevent_req_done(req
);
3466 NTSTATUS
rpccli_winreg_SetKeySecurity_recv(struct tevent_req
*req
,
3467 TALLOC_CTX
*mem_ctx
,
3470 struct rpccli_winreg_SetKeySecurity_state
*state
= tevent_req_data(
3471 req
, struct rpccli_winreg_SetKeySecurity_state
);
3474 if (tevent_req_is_nterror(req
, &status
)) {
3475 tevent_req_received(req
);
3479 /* Steal possbile out parameters to the callers context */
3480 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3483 *result
= state
->orig
.out
.result
;
3485 tevent_req_received(req
);
3486 return NT_STATUS_OK
;
3489 NTSTATUS
rpccli_winreg_SetKeySecurity(struct rpc_pipe_client
*cli
,
3490 TALLOC_CTX
*mem_ctx
,
3491 struct policy_handle
*handle
/* [in] [ref] */,
3492 uint32_t sec_info
/* [in] */,
3493 struct KeySecurityData
*sd
/* [in] [ref] */,
3496 struct winreg_SetKeySecurity r
;
3500 r
.in
.handle
= handle
;
3501 r
.in
.sec_info
= sec_info
;
3504 status
= cli
->dispatch(cli
,
3507 NDR_WINREG_SETKEYSECURITY
,
3510 if (!NT_STATUS_IS_OK(status
)) {
3514 if (NT_STATUS_IS_ERR(status
)) {
3518 /* Return variables */
3522 *werror
= r
.out
.result
;
3525 return werror_to_ntstatus(r
.out
.result
);
3528 struct rpccli_winreg_SetValue_state
{
3529 struct winreg_SetValue orig
;
3530 struct winreg_SetValue tmp
;
3531 TALLOC_CTX
*out_mem_ctx
;
3532 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3535 static void rpccli_winreg_SetValue_done(struct tevent_req
*subreq
);
3537 struct tevent_req
*rpccli_winreg_SetValue_send(TALLOC_CTX
*mem_ctx
,
3538 struct tevent_context
*ev
,
3539 struct rpc_pipe_client
*cli
,
3540 struct policy_handle
*_handle
/* [in] [ref] */,
3541 struct winreg_String _name
/* [in] */,
3542 enum winreg_Type _type
/* [in] */,
3543 uint8_t *_data
/* [in] [ref,size_is(size)] */,
3544 uint32_t _size
/* [in] */)
3546 struct tevent_req
*req
;
3547 struct rpccli_winreg_SetValue_state
*state
;
3548 struct tevent_req
*subreq
;
3550 req
= tevent_req_create(mem_ctx
, &state
,
3551 struct rpccli_winreg_SetValue_state
);
3555 state
->out_mem_ctx
= NULL
;
3556 state
->dispatch_recv
= cli
->dispatch_recv
;
3559 state
->orig
.in
.handle
= _handle
;
3560 state
->orig
.in
.name
= _name
;
3561 state
->orig
.in
.type
= _type
;
3562 state
->orig
.in
.data
= _data
;
3563 state
->orig
.in
.size
= _size
;
3565 /* Out parameters */
3568 ZERO_STRUCT(state
->orig
.out
.result
);
3570 /* make a temporary copy, that we pass to the dispatch function */
3571 state
->tmp
= state
->orig
;
3573 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3575 NDR_WINREG_SETVALUE
,
3577 if (tevent_req_nomem(subreq
, req
)) {
3578 return tevent_req_post(req
, ev
);
3580 tevent_req_set_callback(subreq
, rpccli_winreg_SetValue_done
, req
);
3584 static void rpccli_winreg_SetValue_done(struct tevent_req
*subreq
)
3586 struct tevent_req
*req
= tevent_req_callback_data(
3587 subreq
, struct tevent_req
);
3588 struct rpccli_winreg_SetValue_state
*state
= tevent_req_data(
3589 req
, struct rpccli_winreg_SetValue_state
);
3591 TALLOC_CTX
*mem_ctx
;
3593 if (state
->out_mem_ctx
) {
3594 mem_ctx
= state
->out_mem_ctx
;
3599 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3600 TALLOC_FREE(subreq
);
3601 if (!NT_STATUS_IS_OK(status
)) {
3602 tevent_req_nterror(req
, status
);
3606 /* Copy out parameters */
3609 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3611 /* Reset temporary structure */
3612 ZERO_STRUCT(state
->tmp
);
3614 tevent_req_done(req
);
3617 NTSTATUS
rpccli_winreg_SetValue_recv(struct tevent_req
*req
,
3618 TALLOC_CTX
*mem_ctx
,
3621 struct rpccli_winreg_SetValue_state
*state
= tevent_req_data(
3622 req
, struct rpccli_winreg_SetValue_state
);
3625 if (tevent_req_is_nterror(req
, &status
)) {
3626 tevent_req_received(req
);
3630 /* Steal possbile out parameters to the callers context */
3631 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3634 *result
= state
->orig
.out
.result
;
3636 tevent_req_received(req
);
3637 return NT_STATUS_OK
;
3640 NTSTATUS
rpccli_winreg_SetValue(struct rpc_pipe_client
*cli
,
3641 TALLOC_CTX
*mem_ctx
,
3642 struct policy_handle
*handle
/* [in] [ref] */,
3643 struct winreg_String name
/* [in] */,
3644 enum winreg_Type type
/* [in] */,
3645 uint8_t *data
/* [in] [ref,size_is(size)] */,
3646 uint32_t size
/* [in] */,
3649 struct winreg_SetValue r
;
3653 r
.in
.handle
= handle
;
3659 status
= cli
->dispatch(cli
,
3662 NDR_WINREG_SETVALUE
,
3665 if (!NT_STATUS_IS_OK(status
)) {
3669 if (NT_STATUS_IS_ERR(status
)) {
3673 /* Return variables */
3677 *werror
= r
.out
.result
;
3680 return werror_to_ntstatus(r
.out
.result
);
3683 struct rpccli_winreg_UnLoadKey_state
{
3684 struct winreg_UnLoadKey orig
;
3685 struct winreg_UnLoadKey tmp
;
3686 TALLOC_CTX
*out_mem_ctx
;
3687 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3690 static void rpccli_winreg_UnLoadKey_done(struct tevent_req
*subreq
);
3692 struct tevent_req
*rpccli_winreg_UnLoadKey_send(TALLOC_CTX
*mem_ctx
,
3693 struct tevent_context
*ev
,
3694 struct rpc_pipe_client
*cli
)
3696 struct tevent_req
*req
;
3697 struct rpccli_winreg_UnLoadKey_state
*state
;
3698 struct tevent_req
*subreq
;
3700 req
= tevent_req_create(mem_ctx
, &state
,
3701 struct rpccli_winreg_UnLoadKey_state
);
3705 state
->out_mem_ctx
= NULL
;
3706 state
->dispatch_recv
= cli
->dispatch_recv
;
3710 /* Out parameters */
3713 ZERO_STRUCT(state
->orig
.out
.result
);
3715 /* make a temporary copy, that we pass to the dispatch function */
3716 state
->tmp
= state
->orig
;
3718 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3720 NDR_WINREG_UNLOADKEY
,
3722 if (tevent_req_nomem(subreq
, req
)) {
3723 return tevent_req_post(req
, ev
);
3725 tevent_req_set_callback(subreq
, rpccli_winreg_UnLoadKey_done
, req
);
3729 static void rpccli_winreg_UnLoadKey_done(struct tevent_req
*subreq
)
3731 struct tevent_req
*req
= tevent_req_callback_data(
3732 subreq
, struct tevent_req
);
3733 struct rpccli_winreg_UnLoadKey_state
*state
= tevent_req_data(
3734 req
, struct rpccli_winreg_UnLoadKey_state
);
3736 TALLOC_CTX
*mem_ctx
;
3738 if (state
->out_mem_ctx
) {
3739 mem_ctx
= state
->out_mem_ctx
;
3744 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3745 TALLOC_FREE(subreq
);
3746 if (!NT_STATUS_IS_OK(status
)) {
3747 tevent_req_nterror(req
, status
);
3751 /* Copy out parameters */
3754 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3756 /* Reset temporary structure */
3757 ZERO_STRUCT(state
->tmp
);
3759 tevent_req_done(req
);
3762 NTSTATUS
rpccli_winreg_UnLoadKey_recv(struct tevent_req
*req
,
3763 TALLOC_CTX
*mem_ctx
,
3766 struct rpccli_winreg_UnLoadKey_state
*state
= tevent_req_data(
3767 req
, struct rpccli_winreg_UnLoadKey_state
);
3770 if (tevent_req_is_nterror(req
, &status
)) {
3771 tevent_req_received(req
);
3775 /* Steal possbile out parameters to the callers context */
3776 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3779 *result
= state
->orig
.out
.result
;
3781 tevent_req_received(req
);
3782 return NT_STATUS_OK
;
3785 NTSTATUS
rpccli_winreg_UnLoadKey(struct rpc_pipe_client
*cli
,
3786 TALLOC_CTX
*mem_ctx
,
3789 struct winreg_UnLoadKey r
;
3794 status
= cli
->dispatch(cli
,
3797 NDR_WINREG_UNLOADKEY
,
3800 if (!NT_STATUS_IS_OK(status
)) {
3804 if (NT_STATUS_IS_ERR(status
)) {
3808 /* Return variables */
3812 *werror
= r
.out
.result
;
3815 return werror_to_ntstatus(r
.out
.result
);
3818 struct rpccli_winreg_InitiateSystemShutdown_state
{
3819 struct winreg_InitiateSystemShutdown orig
;
3820 struct winreg_InitiateSystemShutdown tmp
;
3821 TALLOC_CTX
*out_mem_ctx
;
3822 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3825 static void rpccli_winreg_InitiateSystemShutdown_done(struct tevent_req
*subreq
);
3827 struct tevent_req
*rpccli_winreg_InitiateSystemShutdown_send(TALLOC_CTX
*mem_ctx
,
3828 struct tevent_context
*ev
,
3829 struct rpc_pipe_client
*cli
,
3830 uint16_t *_hostname
/* [in] [unique] */,
3831 struct lsa_StringLarge
*_message
/* [in] [unique] */,
3832 uint32_t _timeout
/* [in] */,
3833 uint8_t _force_apps
/* [in] */,
3834 uint8_t _do_reboot
/* [in] */)
3836 struct tevent_req
*req
;
3837 struct rpccli_winreg_InitiateSystemShutdown_state
*state
;
3838 struct tevent_req
*subreq
;
3840 req
= tevent_req_create(mem_ctx
, &state
,
3841 struct rpccli_winreg_InitiateSystemShutdown_state
);
3845 state
->out_mem_ctx
= NULL
;
3846 state
->dispatch_recv
= cli
->dispatch_recv
;
3849 state
->orig
.in
.hostname
= _hostname
;
3850 state
->orig
.in
.message
= _message
;
3851 state
->orig
.in
.timeout
= _timeout
;
3852 state
->orig
.in
.force_apps
= _force_apps
;
3853 state
->orig
.in
.do_reboot
= _do_reboot
;
3855 /* Out parameters */
3858 ZERO_STRUCT(state
->orig
.out
.result
);
3860 /* make a temporary copy, that we pass to the dispatch function */
3861 state
->tmp
= state
->orig
;
3863 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3865 NDR_WINREG_INITIATESYSTEMSHUTDOWN
,
3867 if (tevent_req_nomem(subreq
, req
)) {
3868 return tevent_req_post(req
, ev
);
3870 tevent_req_set_callback(subreq
, rpccli_winreg_InitiateSystemShutdown_done
, req
);
3874 static void rpccli_winreg_InitiateSystemShutdown_done(struct tevent_req
*subreq
)
3876 struct tevent_req
*req
= tevent_req_callback_data(
3877 subreq
, struct tevent_req
);
3878 struct rpccli_winreg_InitiateSystemShutdown_state
*state
= tevent_req_data(
3879 req
, struct rpccli_winreg_InitiateSystemShutdown_state
);
3881 TALLOC_CTX
*mem_ctx
;
3883 if (state
->out_mem_ctx
) {
3884 mem_ctx
= state
->out_mem_ctx
;
3889 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3890 TALLOC_FREE(subreq
);
3891 if (!NT_STATUS_IS_OK(status
)) {
3892 tevent_req_nterror(req
, status
);
3896 /* Copy out parameters */
3899 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3901 /* Reset temporary structure */
3902 ZERO_STRUCT(state
->tmp
);
3904 tevent_req_done(req
);
3907 NTSTATUS
rpccli_winreg_InitiateSystemShutdown_recv(struct tevent_req
*req
,
3908 TALLOC_CTX
*mem_ctx
,
3911 struct rpccli_winreg_InitiateSystemShutdown_state
*state
= tevent_req_data(
3912 req
, struct rpccli_winreg_InitiateSystemShutdown_state
);
3915 if (tevent_req_is_nterror(req
, &status
)) {
3916 tevent_req_received(req
);
3920 /* Steal possbile out parameters to the callers context */
3921 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3924 *result
= state
->orig
.out
.result
;
3926 tevent_req_received(req
);
3927 return NT_STATUS_OK
;
3930 NTSTATUS
rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client
*cli
,
3931 TALLOC_CTX
*mem_ctx
,
3932 uint16_t *hostname
/* [in] [unique] */,
3933 struct lsa_StringLarge
*message
/* [in] [unique] */,
3934 uint32_t timeout
/* [in] */,
3935 uint8_t force_apps
/* [in] */,
3936 uint8_t do_reboot
/* [in] */,
3939 struct winreg_InitiateSystemShutdown r
;
3943 r
.in
.hostname
= hostname
;
3944 r
.in
.message
= message
;
3945 r
.in
.timeout
= timeout
;
3946 r
.in
.force_apps
= force_apps
;
3947 r
.in
.do_reboot
= do_reboot
;
3949 status
= cli
->dispatch(cli
,
3952 NDR_WINREG_INITIATESYSTEMSHUTDOWN
,
3955 if (!NT_STATUS_IS_OK(status
)) {
3959 if (NT_STATUS_IS_ERR(status
)) {
3963 /* Return variables */
3967 *werror
= r
.out
.result
;
3970 return werror_to_ntstatus(r
.out
.result
);
3973 struct rpccli_winreg_AbortSystemShutdown_state
{
3974 struct winreg_AbortSystemShutdown orig
;
3975 struct winreg_AbortSystemShutdown tmp
;
3976 TALLOC_CTX
*out_mem_ctx
;
3977 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3980 static void rpccli_winreg_AbortSystemShutdown_done(struct tevent_req
*subreq
);
3982 struct tevent_req
*rpccli_winreg_AbortSystemShutdown_send(TALLOC_CTX
*mem_ctx
,
3983 struct tevent_context
*ev
,
3984 struct rpc_pipe_client
*cli
,
3985 uint16_t *_server
/* [in] [unique] */)
3987 struct tevent_req
*req
;
3988 struct rpccli_winreg_AbortSystemShutdown_state
*state
;
3989 struct tevent_req
*subreq
;
3991 req
= tevent_req_create(mem_ctx
, &state
,
3992 struct rpccli_winreg_AbortSystemShutdown_state
);
3996 state
->out_mem_ctx
= NULL
;
3997 state
->dispatch_recv
= cli
->dispatch_recv
;
4000 state
->orig
.in
.server
= _server
;
4002 /* Out parameters */
4005 ZERO_STRUCT(state
->orig
.out
.result
);
4007 /* make a temporary copy, that we pass to the dispatch function */
4008 state
->tmp
= state
->orig
;
4010 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4012 NDR_WINREG_ABORTSYSTEMSHUTDOWN
,
4014 if (tevent_req_nomem(subreq
, req
)) {
4015 return tevent_req_post(req
, ev
);
4017 tevent_req_set_callback(subreq
, rpccli_winreg_AbortSystemShutdown_done
, req
);
4021 static void rpccli_winreg_AbortSystemShutdown_done(struct tevent_req
*subreq
)
4023 struct tevent_req
*req
= tevent_req_callback_data(
4024 subreq
, struct tevent_req
);
4025 struct rpccli_winreg_AbortSystemShutdown_state
*state
= tevent_req_data(
4026 req
, struct rpccli_winreg_AbortSystemShutdown_state
);
4028 TALLOC_CTX
*mem_ctx
;
4030 if (state
->out_mem_ctx
) {
4031 mem_ctx
= state
->out_mem_ctx
;
4036 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4037 TALLOC_FREE(subreq
);
4038 if (!NT_STATUS_IS_OK(status
)) {
4039 tevent_req_nterror(req
, status
);
4043 /* Copy out parameters */
4046 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4048 /* Reset temporary structure */
4049 ZERO_STRUCT(state
->tmp
);
4051 tevent_req_done(req
);
4054 NTSTATUS
rpccli_winreg_AbortSystemShutdown_recv(struct tevent_req
*req
,
4055 TALLOC_CTX
*mem_ctx
,
4058 struct rpccli_winreg_AbortSystemShutdown_state
*state
= tevent_req_data(
4059 req
, struct rpccli_winreg_AbortSystemShutdown_state
);
4062 if (tevent_req_is_nterror(req
, &status
)) {
4063 tevent_req_received(req
);
4067 /* Steal possbile out parameters to the callers context */
4068 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4071 *result
= state
->orig
.out
.result
;
4073 tevent_req_received(req
);
4074 return NT_STATUS_OK
;
4077 NTSTATUS
rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client
*cli
,
4078 TALLOC_CTX
*mem_ctx
,
4079 uint16_t *server
/* [in] [unique] */,
4082 struct winreg_AbortSystemShutdown r
;
4086 r
.in
.server
= server
;
4088 status
= cli
->dispatch(cli
,
4091 NDR_WINREG_ABORTSYSTEMSHUTDOWN
,
4094 if (!NT_STATUS_IS_OK(status
)) {
4098 if (NT_STATUS_IS_ERR(status
)) {
4102 /* Return variables */
4106 *werror
= r
.out
.result
;
4109 return werror_to_ntstatus(r
.out
.result
);
4112 struct rpccli_winreg_GetVersion_state
{
4113 struct winreg_GetVersion orig
;
4114 struct winreg_GetVersion tmp
;
4115 TALLOC_CTX
*out_mem_ctx
;
4116 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4119 static void rpccli_winreg_GetVersion_done(struct tevent_req
*subreq
);
4121 struct tevent_req
*rpccli_winreg_GetVersion_send(TALLOC_CTX
*mem_ctx
,
4122 struct tevent_context
*ev
,
4123 struct rpc_pipe_client
*cli
,
4124 struct policy_handle
*_handle
/* [in] [ref] */,
4125 uint32_t *_version
/* [out] [ref] */)
4127 struct tevent_req
*req
;
4128 struct rpccli_winreg_GetVersion_state
*state
;
4129 struct tevent_req
*subreq
;
4131 req
= tevent_req_create(mem_ctx
, &state
,
4132 struct rpccli_winreg_GetVersion_state
);
4136 state
->out_mem_ctx
= NULL
;
4137 state
->dispatch_recv
= cli
->dispatch_recv
;
4140 state
->orig
.in
.handle
= _handle
;
4142 /* Out parameters */
4143 state
->orig
.out
.version
= _version
;
4146 ZERO_STRUCT(state
->orig
.out
.result
);
4148 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4149 "rpccli_winreg_GetVersion_out_memory");
4150 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4151 return tevent_req_post(req
, ev
);
4154 /* make a temporary copy, that we pass to the dispatch function */
4155 state
->tmp
= state
->orig
;
4157 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4159 NDR_WINREG_GETVERSION
,
4161 if (tevent_req_nomem(subreq
, req
)) {
4162 return tevent_req_post(req
, ev
);
4164 tevent_req_set_callback(subreq
, rpccli_winreg_GetVersion_done
, req
);
4168 static void rpccli_winreg_GetVersion_done(struct tevent_req
*subreq
)
4170 struct tevent_req
*req
= tevent_req_callback_data(
4171 subreq
, struct tevent_req
);
4172 struct rpccli_winreg_GetVersion_state
*state
= tevent_req_data(
4173 req
, struct rpccli_winreg_GetVersion_state
);
4175 TALLOC_CTX
*mem_ctx
;
4177 if (state
->out_mem_ctx
) {
4178 mem_ctx
= state
->out_mem_ctx
;
4183 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4184 TALLOC_FREE(subreq
);
4185 if (!NT_STATUS_IS_OK(status
)) {
4186 tevent_req_nterror(req
, status
);
4190 /* Copy out parameters */
4191 *state
->orig
.out
.version
= *state
->tmp
.out
.version
;
4194 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4196 /* Reset temporary structure */
4197 ZERO_STRUCT(state
->tmp
);
4199 tevent_req_done(req
);
4202 NTSTATUS
rpccli_winreg_GetVersion_recv(struct tevent_req
*req
,
4203 TALLOC_CTX
*mem_ctx
,
4206 struct rpccli_winreg_GetVersion_state
*state
= tevent_req_data(
4207 req
, struct rpccli_winreg_GetVersion_state
);
4210 if (tevent_req_is_nterror(req
, &status
)) {
4211 tevent_req_received(req
);
4215 /* Steal possbile out parameters to the callers context */
4216 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4219 *result
= state
->orig
.out
.result
;
4221 tevent_req_received(req
);
4222 return NT_STATUS_OK
;
4225 NTSTATUS
rpccli_winreg_GetVersion(struct rpc_pipe_client
*cli
,
4226 TALLOC_CTX
*mem_ctx
,
4227 struct policy_handle
*handle
/* [in] [ref] */,
4228 uint32_t *version
/* [out] [ref] */,
4231 struct winreg_GetVersion r
;
4235 r
.in
.handle
= handle
;
4237 status
= cli
->dispatch(cli
,
4240 NDR_WINREG_GETVERSION
,
4243 if (!NT_STATUS_IS_OK(status
)) {
4247 if (NT_STATUS_IS_ERR(status
)) {
4251 /* Return variables */
4252 *version
= *r
.out
.version
;
4256 *werror
= r
.out
.result
;
4259 return werror_to_ntstatus(r
.out
.result
);
4262 struct rpccli_winreg_OpenHKCC_state
{
4263 struct winreg_OpenHKCC orig
;
4264 struct winreg_OpenHKCC tmp
;
4265 TALLOC_CTX
*out_mem_ctx
;
4266 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4269 static void rpccli_winreg_OpenHKCC_done(struct tevent_req
*subreq
);
4271 struct tevent_req
*rpccli_winreg_OpenHKCC_send(TALLOC_CTX
*mem_ctx
,
4272 struct tevent_context
*ev
,
4273 struct rpc_pipe_client
*cli
,
4274 uint16_t *_system_name
/* [in] [unique] */,
4275 uint32_t _access_mask
/* [in] */,
4276 struct policy_handle
*_handle
/* [out] [ref] */)
4278 struct tevent_req
*req
;
4279 struct rpccli_winreg_OpenHKCC_state
*state
;
4280 struct tevent_req
*subreq
;
4282 req
= tevent_req_create(mem_ctx
, &state
,
4283 struct rpccli_winreg_OpenHKCC_state
);
4287 state
->out_mem_ctx
= NULL
;
4288 state
->dispatch_recv
= cli
->dispatch_recv
;
4291 state
->orig
.in
.system_name
= _system_name
;
4292 state
->orig
.in
.access_mask
= _access_mask
;
4294 /* Out parameters */
4295 state
->orig
.out
.handle
= _handle
;
4298 ZERO_STRUCT(state
->orig
.out
.result
);
4300 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4301 "rpccli_winreg_OpenHKCC_out_memory");
4302 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4303 return tevent_req_post(req
, ev
);
4306 /* make a temporary copy, that we pass to the dispatch function */
4307 state
->tmp
= state
->orig
;
4309 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4311 NDR_WINREG_OPENHKCC
,
4313 if (tevent_req_nomem(subreq
, req
)) {
4314 return tevent_req_post(req
, ev
);
4316 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKCC_done
, req
);
4320 static void rpccli_winreg_OpenHKCC_done(struct tevent_req
*subreq
)
4322 struct tevent_req
*req
= tevent_req_callback_data(
4323 subreq
, struct tevent_req
);
4324 struct rpccli_winreg_OpenHKCC_state
*state
= tevent_req_data(
4325 req
, struct rpccli_winreg_OpenHKCC_state
);
4327 TALLOC_CTX
*mem_ctx
;
4329 if (state
->out_mem_ctx
) {
4330 mem_ctx
= state
->out_mem_ctx
;
4335 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4336 TALLOC_FREE(subreq
);
4337 if (!NT_STATUS_IS_OK(status
)) {
4338 tevent_req_nterror(req
, status
);
4342 /* Copy out parameters */
4343 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
4346 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4348 /* Reset temporary structure */
4349 ZERO_STRUCT(state
->tmp
);
4351 tevent_req_done(req
);
4354 NTSTATUS
rpccli_winreg_OpenHKCC_recv(struct tevent_req
*req
,
4355 TALLOC_CTX
*mem_ctx
,
4358 struct rpccli_winreg_OpenHKCC_state
*state
= tevent_req_data(
4359 req
, struct rpccli_winreg_OpenHKCC_state
);
4362 if (tevent_req_is_nterror(req
, &status
)) {
4363 tevent_req_received(req
);
4367 /* Steal possbile out parameters to the callers context */
4368 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4371 *result
= state
->orig
.out
.result
;
4373 tevent_req_received(req
);
4374 return NT_STATUS_OK
;
4377 NTSTATUS
rpccli_winreg_OpenHKCC(struct rpc_pipe_client
*cli
,
4378 TALLOC_CTX
*mem_ctx
,
4379 uint16_t *system_name
/* [in] [unique] */,
4380 uint32_t access_mask
/* [in] */,
4381 struct policy_handle
*handle
/* [out] [ref] */,
4384 struct winreg_OpenHKCC r
;
4388 r
.in
.system_name
= system_name
;
4389 r
.in
.access_mask
= access_mask
;
4391 status
= cli
->dispatch(cli
,
4394 NDR_WINREG_OPENHKCC
,
4397 if (!NT_STATUS_IS_OK(status
)) {
4401 if (NT_STATUS_IS_ERR(status
)) {
4405 /* Return variables */
4406 *handle
= *r
.out
.handle
;
4410 *werror
= r
.out
.result
;
4413 return werror_to_ntstatus(r
.out
.result
);
4416 struct rpccli_winreg_OpenHKDD_state
{
4417 struct winreg_OpenHKDD orig
;
4418 struct winreg_OpenHKDD tmp
;
4419 TALLOC_CTX
*out_mem_ctx
;
4420 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4423 static void rpccli_winreg_OpenHKDD_done(struct tevent_req
*subreq
);
4425 struct tevent_req
*rpccli_winreg_OpenHKDD_send(TALLOC_CTX
*mem_ctx
,
4426 struct tevent_context
*ev
,
4427 struct rpc_pipe_client
*cli
,
4428 uint16_t *_system_name
/* [in] [unique] */,
4429 uint32_t _access_mask
/* [in] */,
4430 struct policy_handle
*_handle
/* [out] [ref] */)
4432 struct tevent_req
*req
;
4433 struct rpccli_winreg_OpenHKDD_state
*state
;
4434 struct tevent_req
*subreq
;
4436 req
= tevent_req_create(mem_ctx
, &state
,
4437 struct rpccli_winreg_OpenHKDD_state
);
4441 state
->out_mem_ctx
= NULL
;
4442 state
->dispatch_recv
= cli
->dispatch_recv
;
4445 state
->orig
.in
.system_name
= _system_name
;
4446 state
->orig
.in
.access_mask
= _access_mask
;
4448 /* Out parameters */
4449 state
->orig
.out
.handle
= _handle
;
4452 ZERO_STRUCT(state
->orig
.out
.result
);
4454 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4455 "rpccli_winreg_OpenHKDD_out_memory");
4456 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4457 return tevent_req_post(req
, ev
);
4460 /* make a temporary copy, that we pass to the dispatch function */
4461 state
->tmp
= state
->orig
;
4463 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4465 NDR_WINREG_OPENHKDD
,
4467 if (tevent_req_nomem(subreq
, req
)) {
4468 return tevent_req_post(req
, ev
);
4470 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKDD_done
, req
);
4474 static void rpccli_winreg_OpenHKDD_done(struct tevent_req
*subreq
)
4476 struct tevent_req
*req
= tevent_req_callback_data(
4477 subreq
, struct tevent_req
);
4478 struct rpccli_winreg_OpenHKDD_state
*state
= tevent_req_data(
4479 req
, struct rpccli_winreg_OpenHKDD_state
);
4481 TALLOC_CTX
*mem_ctx
;
4483 if (state
->out_mem_ctx
) {
4484 mem_ctx
= state
->out_mem_ctx
;
4489 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4490 TALLOC_FREE(subreq
);
4491 if (!NT_STATUS_IS_OK(status
)) {
4492 tevent_req_nterror(req
, status
);
4496 /* Copy out parameters */
4497 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
4500 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4502 /* Reset temporary structure */
4503 ZERO_STRUCT(state
->tmp
);
4505 tevent_req_done(req
);
4508 NTSTATUS
rpccli_winreg_OpenHKDD_recv(struct tevent_req
*req
,
4509 TALLOC_CTX
*mem_ctx
,
4512 struct rpccli_winreg_OpenHKDD_state
*state
= tevent_req_data(
4513 req
, struct rpccli_winreg_OpenHKDD_state
);
4516 if (tevent_req_is_nterror(req
, &status
)) {
4517 tevent_req_received(req
);
4521 /* Steal possbile out parameters to the callers context */
4522 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4525 *result
= state
->orig
.out
.result
;
4527 tevent_req_received(req
);
4528 return NT_STATUS_OK
;
4531 NTSTATUS
rpccli_winreg_OpenHKDD(struct rpc_pipe_client
*cli
,
4532 TALLOC_CTX
*mem_ctx
,
4533 uint16_t *system_name
/* [in] [unique] */,
4534 uint32_t access_mask
/* [in] */,
4535 struct policy_handle
*handle
/* [out] [ref] */,
4538 struct winreg_OpenHKDD r
;
4542 r
.in
.system_name
= system_name
;
4543 r
.in
.access_mask
= access_mask
;
4545 status
= cli
->dispatch(cli
,
4548 NDR_WINREG_OPENHKDD
,
4551 if (!NT_STATUS_IS_OK(status
)) {
4555 if (NT_STATUS_IS_ERR(status
)) {
4559 /* Return variables */
4560 *handle
= *r
.out
.handle
;
4564 *werror
= r
.out
.result
;
4567 return werror_to_ntstatus(r
.out
.result
);
4570 struct rpccli_winreg_QueryMultipleValues_state
{
4571 struct winreg_QueryMultipleValues orig
;
4572 struct winreg_QueryMultipleValues tmp
;
4573 TALLOC_CTX
*out_mem_ctx
;
4574 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4577 static void rpccli_winreg_QueryMultipleValues_done(struct tevent_req
*subreq
);
4579 struct tevent_req
*rpccli_winreg_QueryMultipleValues_send(TALLOC_CTX
*mem_ctx
,
4580 struct tevent_context
*ev
,
4581 struct rpc_pipe_client
*cli
,
4582 struct policy_handle
*_key_handle
/* [in] [ref] */,
4583 struct QueryMultipleValue
*_values
/* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
4584 uint32_t _num_values
/* [in] */,
4585 uint8_t *_buffer
/* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */,
4586 uint32_t *_buffer_size
/* [in,out] [ref] */)
4588 struct tevent_req
*req
;
4589 struct rpccli_winreg_QueryMultipleValues_state
*state
;
4590 struct tevent_req
*subreq
;
4592 req
= tevent_req_create(mem_ctx
, &state
,
4593 struct rpccli_winreg_QueryMultipleValues_state
);
4597 state
->out_mem_ctx
= NULL
;
4598 state
->dispatch_recv
= cli
->dispatch_recv
;
4601 state
->orig
.in
.key_handle
= _key_handle
;
4602 state
->orig
.in
.values
= _values
;
4603 state
->orig
.in
.num_values
= _num_values
;
4604 state
->orig
.in
.buffer
= _buffer
;
4605 state
->orig
.in
.buffer_size
= _buffer_size
;
4607 /* Out parameters */
4608 state
->orig
.out
.values
= _values
;
4609 state
->orig
.out
.buffer
= _buffer
;
4610 state
->orig
.out
.buffer_size
= _buffer_size
;
4613 ZERO_STRUCT(state
->orig
.out
.result
);
4615 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4616 "rpccli_winreg_QueryMultipleValues_out_memory");
4617 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4618 return tevent_req_post(req
, ev
);
4621 /* make a temporary copy, that we pass to the dispatch function */
4622 state
->tmp
= state
->orig
;
4624 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4626 NDR_WINREG_QUERYMULTIPLEVALUES
,
4628 if (tevent_req_nomem(subreq
, req
)) {
4629 return tevent_req_post(req
, ev
);
4631 tevent_req_set_callback(subreq
, rpccli_winreg_QueryMultipleValues_done
, req
);
4635 static void rpccli_winreg_QueryMultipleValues_done(struct tevent_req
*subreq
)
4637 struct tevent_req
*req
= tevent_req_callback_data(
4638 subreq
, struct tevent_req
);
4639 struct rpccli_winreg_QueryMultipleValues_state
*state
= tevent_req_data(
4640 req
, struct rpccli_winreg_QueryMultipleValues_state
);
4642 TALLOC_CTX
*mem_ctx
;
4644 if (state
->out_mem_ctx
) {
4645 mem_ctx
= state
->out_mem_ctx
;
4650 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4651 TALLOC_FREE(subreq
);
4652 if (!NT_STATUS_IS_OK(status
)) {
4653 tevent_req_nterror(req
, status
);
4657 /* Copy out parameters */
4658 memcpy(state
->orig
.out
.values
, state
->tmp
.out
.values
, (state
->tmp
.in
.num_values
) * sizeof(*state
->orig
.out
.values
));
4659 if (state
->orig
.out
.buffer
&& state
->tmp
.out
.buffer
) {
4660 if ((*state
->tmp
.out
.buffer_size
) > (*state
->tmp
.in
.buffer_size
)) {
4661 tevent_req_nterror(req
, NT_STATUS_INVALID_NETWORK_RESPONSE
);
4664 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, (*state
->tmp
.out
.buffer_size
) * sizeof(*state
->orig
.out
.buffer
));
4666 *state
->orig
.out
.buffer_size
= *state
->tmp
.out
.buffer_size
;
4669 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4671 /* Reset temporary structure */
4672 ZERO_STRUCT(state
->tmp
);
4674 tevent_req_done(req
);
4677 NTSTATUS
rpccli_winreg_QueryMultipleValues_recv(struct tevent_req
*req
,
4678 TALLOC_CTX
*mem_ctx
,
4681 struct rpccli_winreg_QueryMultipleValues_state
*state
= tevent_req_data(
4682 req
, struct rpccli_winreg_QueryMultipleValues_state
);
4685 if (tevent_req_is_nterror(req
, &status
)) {
4686 tevent_req_received(req
);
4690 /* Steal possbile out parameters to the callers context */
4691 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4694 *result
= state
->orig
.out
.result
;
4696 tevent_req_received(req
);
4697 return NT_STATUS_OK
;
4700 NTSTATUS
rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client
*cli
,
4701 TALLOC_CTX
*mem_ctx
,
4702 struct policy_handle
*key_handle
/* [in] [ref] */,
4703 struct QueryMultipleValue
*values
/* [in,out] [ref,length_is(num_values),size_is(num_values)] */,
4704 uint32_t num_values
/* [in] */,
4705 uint8_t *buffer
/* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */,
4706 uint32_t *buffer_size
/* [in,out] [ref] */,
4709 struct winreg_QueryMultipleValues r
;
4713 r
.in
.key_handle
= key_handle
;
4714 r
.in
.values
= values
;
4715 r
.in
.num_values
= num_values
;
4716 r
.in
.buffer
= buffer
;
4717 r
.in
.buffer_size
= buffer_size
;
4719 status
= cli
->dispatch(cli
,
4722 NDR_WINREG_QUERYMULTIPLEVALUES
,
4725 if (!NT_STATUS_IS_OK(status
)) {
4729 if (NT_STATUS_IS_ERR(status
)) {
4733 /* Return variables */
4734 memcpy(values
, r
.out
.values
, (r
.in
.num_values
) * sizeof(*values
));
4735 if (buffer
&& r
.out
.buffer
) {
4736 if ((*r
.out
.buffer_size
) > (*r
.in
.buffer_size
)) {
4737 return NT_STATUS_INVALID_NETWORK_RESPONSE
;
4739 memcpy(buffer
, r
.out
.buffer
, (*r
.out
.buffer_size
) * sizeof(*buffer
));
4741 *buffer_size
= *r
.out
.buffer_size
;
4745 *werror
= r
.out
.result
;
4748 return werror_to_ntstatus(r
.out
.result
);
4751 struct rpccli_winreg_InitiateSystemShutdownEx_state
{
4752 struct winreg_InitiateSystemShutdownEx orig
;
4753 struct winreg_InitiateSystemShutdownEx tmp
;
4754 TALLOC_CTX
*out_mem_ctx
;
4755 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4758 static void rpccli_winreg_InitiateSystemShutdownEx_done(struct tevent_req
*subreq
);
4760 struct tevent_req
*rpccli_winreg_InitiateSystemShutdownEx_send(TALLOC_CTX
*mem_ctx
,
4761 struct tevent_context
*ev
,
4762 struct rpc_pipe_client
*cli
,
4763 uint16_t *_hostname
/* [in] [unique] */,
4764 struct lsa_StringLarge
*_message
/* [in] [unique] */,
4765 uint32_t _timeout
/* [in] */,
4766 uint8_t _force_apps
/* [in] */,
4767 uint8_t _do_reboot
/* [in] */,
4768 uint32_t _reason
/* [in] */)
4770 struct tevent_req
*req
;
4771 struct rpccli_winreg_InitiateSystemShutdownEx_state
*state
;
4772 struct tevent_req
*subreq
;
4774 req
= tevent_req_create(mem_ctx
, &state
,
4775 struct rpccli_winreg_InitiateSystemShutdownEx_state
);
4779 state
->out_mem_ctx
= NULL
;
4780 state
->dispatch_recv
= cli
->dispatch_recv
;
4783 state
->orig
.in
.hostname
= _hostname
;
4784 state
->orig
.in
.message
= _message
;
4785 state
->orig
.in
.timeout
= _timeout
;
4786 state
->orig
.in
.force_apps
= _force_apps
;
4787 state
->orig
.in
.do_reboot
= _do_reboot
;
4788 state
->orig
.in
.reason
= _reason
;
4790 /* Out parameters */
4793 ZERO_STRUCT(state
->orig
.out
.result
);
4795 /* make a temporary copy, that we pass to the dispatch function */
4796 state
->tmp
= state
->orig
;
4798 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4800 NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
,
4802 if (tevent_req_nomem(subreq
, req
)) {
4803 return tevent_req_post(req
, ev
);
4805 tevent_req_set_callback(subreq
, rpccli_winreg_InitiateSystemShutdownEx_done
, req
);
4809 static void rpccli_winreg_InitiateSystemShutdownEx_done(struct tevent_req
*subreq
)
4811 struct tevent_req
*req
= tevent_req_callback_data(
4812 subreq
, struct tevent_req
);
4813 struct rpccli_winreg_InitiateSystemShutdownEx_state
*state
= tevent_req_data(
4814 req
, struct rpccli_winreg_InitiateSystemShutdownEx_state
);
4816 TALLOC_CTX
*mem_ctx
;
4818 if (state
->out_mem_ctx
) {
4819 mem_ctx
= state
->out_mem_ctx
;
4824 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4825 TALLOC_FREE(subreq
);
4826 if (!NT_STATUS_IS_OK(status
)) {
4827 tevent_req_nterror(req
, status
);
4831 /* Copy out parameters */
4834 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4836 /* Reset temporary structure */
4837 ZERO_STRUCT(state
->tmp
);
4839 tevent_req_done(req
);
4842 NTSTATUS
rpccli_winreg_InitiateSystemShutdownEx_recv(struct tevent_req
*req
,
4843 TALLOC_CTX
*mem_ctx
,
4846 struct rpccli_winreg_InitiateSystemShutdownEx_state
*state
= tevent_req_data(
4847 req
, struct rpccli_winreg_InitiateSystemShutdownEx_state
);
4850 if (tevent_req_is_nterror(req
, &status
)) {
4851 tevent_req_received(req
);
4855 /* Steal possbile out parameters to the callers context */
4856 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4859 *result
= state
->orig
.out
.result
;
4861 tevent_req_received(req
);
4862 return NT_STATUS_OK
;
4865 NTSTATUS
rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client
*cli
,
4866 TALLOC_CTX
*mem_ctx
,
4867 uint16_t *hostname
/* [in] [unique] */,
4868 struct lsa_StringLarge
*message
/* [in] [unique] */,
4869 uint32_t timeout
/* [in] */,
4870 uint8_t force_apps
/* [in] */,
4871 uint8_t do_reboot
/* [in] */,
4872 uint32_t reason
/* [in] */,
4875 struct winreg_InitiateSystemShutdownEx r
;
4879 r
.in
.hostname
= hostname
;
4880 r
.in
.message
= message
;
4881 r
.in
.timeout
= timeout
;
4882 r
.in
.force_apps
= force_apps
;
4883 r
.in
.do_reboot
= do_reboot
;
4884 r
.in
.reason
= reason
;
4886 status
= cli
->dispatch(cli
,
4889 NDR_WINREG_INITIATESYSTEMSHUTDOWNEX
,
4892 if (!NT_STATUS_IS_OK(status
)) {
4896 if (NT_STATUS_IS_ERR(status
)) {
4900 /* Return variables */
4904 *werror
= r
.out
.result
;
4907 return werror_to_ntstatus(r
.out
.result
);
4910 struct rpccli_winreg_SaveKeyEx_state
{
4911 struct winreg_SaveKeyEx orig
;
4912 struct winreg_SaveKeyEx tmp
;
4913 TALLOC_CTX
*out_mem_ctx
;
4914 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4917 static void rpccli_winreg_SaveKeyEx_done(struct tevent_req
*subreq
);
4919 struct tevent_req
*rpccli_winreg_SaveKeyEx_send(TALLOC_CTX
*mem_ctx
,
4920 struct tevent_context
*ev
,
4921 struct rpc_pipe_client
*cli
)
4923 struct tevent_req
*req
;
4924 struct rpccli_winreg_SaveKeyEx_state
*state
;
4925 struct tevent_req
*subreq
;
4927 req
= tevent_req_create(mem_ctx
, &state
,
4928 struct rpccli_winreg_SaveKeyEx_state
);
4932 state
->out_mem_ctx
= NULL
;
4933 state
->dispatch_recv
= cli
->dispatch_recv
;
4937 /* Out parameters */
4940 ZERO_STRUCT(state
->orig
.out
.result
);
4942 /* make a temporary copy, that we pass to the dispatch function */
4943 state
->tmp
= state
->orig
;
4945 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4947 NDR_WINREG_SAVEKEYEX
,
4949 if (tevent_req_nomem(subreq
, req
)) {
4950 return tevent_req_post(req
, ev
);
4952 tevent_req_set_callback(subreq
, rpccli_winreg_SaveKeyEx_done
, req
);
4956 static void rpccli_winreg_SaveKeyEx_done(struct tevent_req
*subreq
)
4958 struct tevent_req
*req
= tevent_req_callback_data(
4959 subreq
, struct tevent_req
);
4960 struct rpccli_winreg_SaveKeyEx_state
*state
= tevent_req_data(
4961 req
, struct rpccli_winreg_SaveKeyEx_state
);
4963 TALLOC_CTX
*mem_ctx
;
4965 if (state
->out_mem_ctx
) {
4966 mem_ctx
= state
->out_mem_ctx
;
4971 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4972 TALLOC_FREE(subreq
);
4973 if (!NT_STATUS_IS_OK(status
)) {
4974 tevent_req_nterror(req
, status
);
4978 /* Copy out parameters */
4981 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4983 /* Reset temporary structure */
4984 ZERO_STRUCT(state
->tmp
);
4986 tevent_req_done(req
);
4989 NTSTATUS
rpccli_winreg_SaveKeyEx_recv(struct tevent_req
*req
,
4990 TALLOC_CTX
*mem_ctx
,
4993 struct rpccli_winreg_SaveKeyEx_state
*state
= tevent_req_data(
4994 req
, struct rpccli_winreg_SaveKeyEx_state
);
4997 if (tevent_req_is_nterror(req
, &status
)) {
4998 tevent_req_received(req
);
5002 /* Steal possbile out parameters to the callers context */
5003 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5006 *result
= state
->orig
.out
.result
;
5008 tevent_req_received(req
);
5009 return NT_STATUS_OK
;
5012 NTSTATUS
rpccli_winreg_SaveKeyEx(struct rpc_pipe_client
*cli
,
5013 TALLOC_CTX
*mem_ctx
,
5016 struct winreg_SaveKeyEx r
;
5021 status
= cli
->dispatch(cli
,
5024 NDR_WINREG_SAVEKEYEX
,
5027 if (!NT_STATUS_IS_OK(status
)) {
5031 if (NT_STATUS_IS_ERR(status
)) {
5035 /* Return variables */
5039 *werror
= r
.out
.result
;
5042 return werror_to_ntstatus(r
.out
.result
);
5045 struct rpccli_winreg_OpenHKPT_state
{
5046 struct winreg_OpenHKPT orig
;
5047 struct winreg_OpenHKPT tmp
;
5048 TALLOC_CTX
*out_mem_ctx
;
5049 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5052 static void rpccli_winreg_OpenHKPT_done(struct tevent_req
*subreq
);
5054 struct tevent_req
*rpccli_winreg_OpenHKPT_send(TALLOC_CTX
*mem_ctx
,
5055 struct tevent_context
*ev
,
5056 struct rpc_pipe_client
*cli
,
5057 uint16_t *_system_name
/* [in] [unique] */,
5058 uint32_t _access_mask
/* [in] */,
5059 struct policy_handle
*_handle
/* [out] [ref] */)
5061 struct tevent_req
*req
;
5062 struct rpccli_winreg_OpenHKPT_state
*state
;
5063 struct tevent_req
*subreq
;
5065 req
= tevent_req_create(mem_ctx
, &state
,
5066 struct rpccli_winreg_OpenHKPT_state
);
5070 state
->out_mem_ctx
= NULL
;
5071 state
->dispatch_recv
= cli
->dispatch_recv
;
5074 state
->orig
.in
.system_name
= _system_name
;
5075 state
->orig
.in
.access_mask
= _access_mask
;
5077 /* Out parameters */
5078 state
->orig
.out
.handle
= _handle
;
5081 ZERO_STRUCT(state
->orig
.out
.result
);
5083 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5084 "rpccli_winreg_OpenHKPT_out_memory");
5085 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5086 return tevent_req_post(req
, ev
);
5089 /* make a temporary copy, that we pass to the dispatch function */
5090 state
->tmp
= state
->orig
;
5092 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5094 NDR_WINREG_OPENHKPT
,
5096 if (tevent_req_nomem(subreq
, req
)) {
5097 return tevent_req_post(req
, ev
);
5099 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKPT_done
, req
);
5103 static void rpccli_winreg_OpenHKPT_done(struct tevent_req
*subreq
)
5105 struct tevent_req
*req
= tevent_req_callback_data(
5106 subreq
, struct tevent_req
);
5107 struct rpccli_winreg_OpenHKPT_state
*state
= tevent_req_data(
5108 req
, struct rpccli_winreg_OpenHKPT_state
);
5110 TALLOC_CTX
*mem_ctx
;
5112 if (state
->out_mem_ctx
) {
5113 mem_ctx
= state
->out_mem_ctx
;
5118 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5119 TALLOC_FREE(subreq
);
5120 if (!NT_STATUS_IS_OK(status
)) {
5121 tevent_req_nterror(req
, status
);
5125 /* Copy out parameters */
5126 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
5129 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5131 /* Reset temporary structure */
5132 ZERO_STRUCT(state
->tmp
);
5134 tevent_req_done(req
);
5137 NTSTATUS
rpccli_winreg_OpenHKPT_recv(struct tevent_req
*req
,
5138 TALLOC_CTX
*mem_ctx
,
5141 struct rpccli_winreg_OpenHKPT_state
*state
= tevent_req_data(
5142 req
, struct rpccli_winreg_OpenHKPT_state
);
5145 if (tevent_req_is_nterror(req
, &status
)) {
5146 tevent_req_received(req
);
5150 /* Steal possbile out parameters to the callers context */
5151 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5154 *result
= state
->orig
.out
.result
;
5156 tevent_req_received(req
);
5157 return NT_STATUS_OK
;
5160 NTSTATUS
rpccli_winreg_OpenHKPT(struct rpc_pipe_client
*cli
,
5161 TALLOC_CTX
*mem_ctx
,
5162 uint16_t *system_name
/* [in] [unique] */,
5163 uint32_t access_mask
/* [in] */,
5164 struct policy_handle
*handle
/* [out] [ref] */,
5167 struct winreg_OpenHKPT r
;
5171 r
.in
.system_name
= system_name
;
5172 r
.in
.access_mask
= access_mask
;
5174 status
= cli
->dispatch(cli
,
5177 NDR_WINREG_OPENHKPT
,
5180 if (!NT_STATUS_IS_OK(status
)) {
5184 if (NT_STATUS_IS_ERR(status
)) {
5188 /* Return variables */
5189 *handle
= *r
.out
.handle
;
5193 *werror
= r
.out
.result
;
5196 return werror_to_ntstatus(r
.out
.result
);
5199 struct rpccli_winreg_OpenHKPN_state
{
5200 struct winreg_OpenHKPN orig
;
5201 struct winreg_OpenHKPN tmp
;
5202 TALLOC_CTX
*out_mem_ctx
;
5203 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5206 static void rpccli_winreg_OpenHKPN_done(struct tevent_req
*subreq
);
5208 struct tevent_req
*rpccli_winreg_OpenHKPN_send(TALLOC_CTX
*mem_ctx
,
5209 struct tevent_context
*ev
,
5210 struct rpc_pipe_client
*cli
,
5211 uint16_t *_system_name
/* [in] [unique] */,
5212 uint32_t _access_mask
/* [in] */,
5213 struct policy_handle
*_handle
/* [out] [ref] */)
5215 struct tevent_req
*req
;
5216 struct rpccli_winreg_OpenHKPN_state
*state
;
5217 struct tevent_req
*subreq
;
5219 req
= tevent_req_create(mem_ctx
, &state
,
5220 struct rpccli_winreg_OpenHKPN_state
);
5224 state
->out_mem_ctx
= NULL
;
5225 state
->dispatch_recv
= cli
->dispatch_recv
;
5228 state
->orig
.in
.system_name
= _system_name
;
5229 state
->orig
.in
.access_mask
= _access_mask
;
5231 /* Out parameters */
5232 state
->orig
.out
.handle
= _handle
;
5235 ZERO_STRUCT(state
->orig
.out
.result
);
5237 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5238 "rpccli_winreg_OpenHKPN_out_memory");
5239 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5240 return tevent_req_post(req
, ev
);
5243 /* make a temporary copy, that we pass to the dispatch function */
5244 state
->tmp
= state
->orig
;
5246 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5248 NDR_WINREG_OPENHKPN
,
5250 if (tevent_req_nomem(subreq
, req
)) {
5251 return tevent_req_post(req
, ev
);
5253 tevent_req_set_callback(subreq
, rpccli_winreg_OpenHKPN_done
, req
);
5257 static void rpccli_winreg_OpenHKPN_done(struct tevent_req
*subreq
)
5259 struct tevent_req
*req
= tevent_req_callback_data(
5260 subreq
, struct tevent_req
);
5261 struct rpccli_winreg_OpenHKPN_state
*state
= tevent_req_data(
5262 req
, struct rpccli_winreg_OpenHKPN_state
);
5264 TALLOC_CTX
*mem_ctx
;
5266 if (state
->out_mem_ctx
) {
5267 mem_ctx
= state
->out_mem_ctx
;
5272 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5273 TALLOC_FREE(subreq
);
5274 if (!NT_STATUS_IS_OK(status
)) {
5275 tevent_req_nterror(req
, status
);
5279 /* Copy out parameters */
5280 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
5283 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5285 /* Reset temporary structure */
5286 ZERO_STRUCT(state
->tmp
);
5288 tevent_req_done(req
);
5291 NTSTATUS
rpccli_winreg_OpenHKPN_recv(struct tevent_req
*req
,
5292 TALLOC_CTX
*mem_ctx
,
5295 struct rpccli_winreg_OpenHKPN_state
*state
= tevent_req_data(
5296 req
, struct rpccli_winreg_OpenHKPN_state
);
5299 if (tevent_req_is_nterror(req
, &status
)) {
5300 tevent_req_received(req
);
5304 /* Steal possbile out parameters to the callers context */
5305 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5308 *result
= state
->orig
.out
.result
;
5310 tevent_req_received(req
);
5311 return NT_STATUS_OK
;
5314 NTSTATUS
rpccli_winreg_OpenHKPN(struct rpc_pipe_client
*cli
,
5315 TALLOC_CTX
*mem_ctx
,
5316 uint16_t *system_name
/* [in] [unique] */,
5317 uint32_t access_mask
/* [in] */,
5318 struct policy_handle
*handle
/* [out] [ref] */,
5321 struct winreg_OpenHKPN r
;
5325 r
.in
.system_name
= system_name
;
5326 r
.in
.access_mask
= access_mask
;
5328 status
= cli
->dispatch(cli
,
5331 NDR_WINREG_OPENHKPN
,
5334 if (!NT_STATUS_IS_OK(status
)) {
5338 if (NT_STATUS_IS_ERR(status
)) {
5342 /* Return variables */
5343 *handle
= *r
.out
.handle
;
5347 *werror
= r
.out
.result
;
5350 return werror_to_ntstatus(r
.out
.result
);
5353 struct rpccli_winreg_QueryMultipleValues2_state
{
5354 struct winreg_QueryMultipleValues2 orig
;
5355 struct winreg_QueryMultipleValues2 tmp
;
5356 TALLOC_CTX
*out_mem_ctx
;
5357 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5360 static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req
*subreq
);
5362 struct tevent_req
*rpccli_winreg_QueryMultipleValues2_send(TALLOC_CTX
*mem_ctx
,
5363 struct tevent_context
*ev
,
5364 struct rpc_pipe_client
*cli
)
5366 struct tevent_req
*req
;
5367 struct rpccli_winreg_QueryMultipleValues2_state
*state
;
5368 struct tevent_req
*subreq
;
5370 req
= tevent_req_create(mem_ctx
, &state
,
5371 struct rpccli_winreg_QueryMultipleValues2_state
);
5375 state
->out_mem_ctx
= NULL
;
5376 state
->dispatch_recv
= cli
->dispatch_recv
;
5380 /* Out parameters */
5383 ZERO_STRUCT(state
->orig
.out
.result
);
5385 /* make a temporary copy, that we pass to the dispatch function */
5386 state
->tmp
= state
->orig
;
5388 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5390 NDR_WINREG_QUERYMULTIPLEVALUES2
,
5392 if (tevent_req_nomem(subreq
, req
)) {
5393 return tevent_req_post(req
, ev
);
5395 tevent_req_set_callback(subreq
, rpccli_winreg_QueryMultipleValues2_done
, req
);
5399 static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req
*subreq
)
5401 struct tevent_req
*req
= tevent_req_callback_data(
5402 subreq
, struct tevent_req
);
5403 struct rpccli_winreg_QueryMultipleValues2_state
*state
= tevent_req_data(
5404 req
, struct rpccli_winreg_QueryMultipleValues2_state
);
5406 TALLOC_CTX
*mem_ctx
;
5408 if (state
->out_mem_ctx
) {
5409 mem_ctx
= state
->out_mem_ctx
;
5414 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5415 TALLOC_FREE(subreq
);
5416 if (!NT_STATUS_IS_OK(status
)) {
5417 tevent_req_nterror(req
, status
);
5421 /* Copy out parameters */
5424 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5426 /* Reset temporary structure */
5427 ZERO_STRUCT(state
->tmp
);
5429 tevent_req_done(req
);
5432 NTSTATUS
rpccli_winreg_QueryMultipleValues2_recv(struct tevent_req
*req
,
5433 TALLOC_CTX
*mem_ctx
,
5436 struct rpccli_winreg_QueryMultipleValues2_state
*state
= tevent_req_data(
5437 req
, struct rpccli_winreg_QueryMultipleValues2_state
);
5440 if (tevent_req_is_nterror(req
, &status
)) {
5441 tevent_req_received(req
);
5445 /* Steal possbile out parameters to the callers context */
5446 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5449 *result
= state
->orig
.out
.result
;
5451 tevent_req_received(req
);
5452 return NT_STATUS_OK
;
5455 NTSTATUS
rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client
*cli
,
5456 TALLOC_CTX
*mem_ctx
,
5459 struct winreg_QueryMultipleValues2 r
;
5464 status
= cli
->dispatch(cli
,
5467 NDR_WINREG_QUERYMULTIPLEVALUES2
,
5470 if (!NT_STATUS_IS_OK(status
)) {
5474 if (NT_STATUS_IS_ERR(status
)) {
5478 /* Return variables */
5482 *werror
= r
.out
.result
;
5485 return werror_to_ntstatus(r
.out
.result
);