2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "../librpc/gen_ndr/cli_svcctl.h"
9 struct rpccli_svcctl_CloseServiceHandle_state
{
10 struct svcctl_CloseServiceHandle orig
;
11 struct svcctl_CloseServiceHandle tmp
;
12 TALLOC_CTX
*out_mem_ctx
;
13 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
16 static void rpccli_svcctl_CloseServiceHandle_done(struct tevent_req
*subreq
);
18 struct tevent_req
*rpccli_svcctl_CloseServiceHandle_send(TALLOC_CTX
*mem_ctx
,
19 struct tevent_context
*ev
,
20 struct rpc_pipe_client
*cli
,
21 struct policy_handle
*_handle
/* [in,out] [ref] */)
23 struct tevent_req
*req
;
24 struct rpccli_svcctl_CloseServiceHandle_state
*state
;
25 struct tevent_req
*subreq
;
27 req
= tevent_req_create(mem_ctx
, &state
,
28 struct rpccli_svcctl_CloseServiceHandle_state
);
32 state
->out_mem_ctx
= NULL
;
33 state
->dispatch_recv
= cli
->dispatch_recv
;
36 state
->orig
.in
.handle
= _handle
;
39 state
->orig
.out
.handle
= _handle
;
42 ZERO_STRUCT(state
->orig
.out
.result
);
44 state
->out_mem_ctx
= talloc_named_const(state
, 0,
45 "rpccli_svcctl_CloseServiceHandle_out_memory");
46 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
47 return tevent_req_post(req
, ev
);
50 /* make a temporary copy, that we pass to the dispatch function */
51 state
->tmp
= state
->orig
;
53 subreq
= cli
->dispatch_send(state
, ev
, cli
,
55 NDR_SVCCTL_CLOSESERVICEHANDLE
,
57 if (tevent_req_nomem(subreq
, req
)) {
58 return tevent_req_post(req
, ev
);
60 tevent_req_set_callback(subreq
, rpccli_svcctl_CloseServiceHandle_done
, req
);
64 static void rpccli_svcctl_CloseServiceHandle_done(struct tevent_req
*subreq
)
66 struct tevent_req
*req
= tevent_req_callback_data(
67 subreq
, struct tevent_req
);
68 struct rpccli_svcctl_CloseServiceHandle_state
*state
= tevent_req_data(
69 req
, struct rpccli_svcctl_CloseServiceHandle_state
);
73 if (state
->out_mem_ctx
) {
74 mem_ctx
= state
->out_mem_ctx
;
79 status
= state
->dispatch_recv(subreq
, mem_ctx
);
81 if (!NT_STATUS_IS_OK(status
)) {
82 tevent_req_nterror(req
, status
);
86 /* Copy out parameters */
87 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
90 state
->orig
.out
.result
= state
->tmp
.out
.result
;
92 /* Reset temporary structure */
93 ZERO_STRUCT(state
->tmp
);
98 NTSTATUS
rpccli_svcctl_CloseServiceHandle_recv(struct tevent_req
*req
,
102 struct rpccli_svcctl_CloseServiceHandle_state
*state
= tevent_req_data(
103 req
, struct rpccli_svcctl_CloseServiceHandle_state
);
106 if (tevent_req_is_nterror(req
, &status
)) {
107 tevent_req_received(req
);
111 /* Steal possbile out parameters to the callers context */
112 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
115 *result
= state
->orig
.out
.result
;
117 tevent_req_received(req
);
121 NTSTATUS
rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client
*cli
,
123 struct policy_handle
*handle
/* [in,out] [ref] */,
126 struct svcctl_CloseServiceHandle r
;
130 r
.in
.handle
= handle
;
132 status
= cli
->dispatch(cli
,
135 NDR_SVCCTL_CLOSESERVICEHANDLE
,
138 if (!NT_STATUS_IS_OK(status
)) {
142 if (NT_STATUS_IS_ERR(status
)) {
146 /* Return variables */
147 *handle
= *r
.out
.handle
;
151 *werror
= r
.out
.result
;
154 return werror_to_ntstatus(r
.out
.result
);
157 struct rpccli_svcctl_ControlService_state
{
158 struct svcctl_ControlService orig
;
159 struct svcctl_ControlService tmp
;
160 TALLOC_CTX
*out_mem_ctx
;
161 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
164 static void rpccli_svcctl_ControlService_done(struct tevent_req
*subreq
);
166 struct tevent_req
*rpccli_svcctl_ControlService_send(TALLOC_CTX
*mem_ctx
,
167 struct tevent_context
*ev
,
168 struct rpc_pipe_client
*cli
,
169 struct policy_handle
*_handle
/* [in] [ref] */,
170 enum SERVICE_CONTROL _control
/* [in] */,
171 struct SERVICE_STATUS
*_service_status
/* [out] [ref] */)
173 struct tevent_req
*req
;
174 struct rpccli_svcctl_ControlService_state
*state
;
175 struct tevent_req
*subreq
;
177 req
= tevent_req_create(mem_ctx
, &state
,
178 struct rpccli_svcctl_ControlService_state
);
182 state
->out_mem_ctx
= NULL
;
183 state
->dispatch_recv
= cli
->dispatch_recv
;
186 state
->orig
.in
.handle
= _handle
;
187 state
->orig
.in
.control
= _control
;
190 state
->orig
.out
.service_status
= _service_status
;
193 ZERO_STRUCT(state
->orig
.out
.result
);
195 state
->out_mem_ctx
= talloc_named_const(state
, 0,
196 "rpccli_svcctl_ControlService_out_memory");
197 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
198 return tevent_req_post(req
, ev
);
201 /* make a temporary copy, that we pass to the dispatch function */
202 state
->tmp
= state
->orig
;
204 subreq
= cli
->dispatch_send(state
, ev
, cli
,
206 NDR_SVCCTL_CONTROLSERVICE
,
208 if (tevent_req_nomem(subreq
, req
)) {
209 return tevent_req_post(req
, ev
);
211 tevent_req_set_callback(subreq
, rpccli_svcctl_ControlService_done
, req
);
215 static void rpccli_svcctl_ControlService_done(struct tevent_req
*subreq
)
217 struct tevent_req
*req
= tevent_req_callback_data(
218 subreq
, struct tevent_req
);
219 struct rpccli_svcctl_ControlService_state
*state
= tevent_req_data(
220 req
, struct rpccli_svcctl_ControlService_state
);
224 if (state
->out_mem_ctx
) {
225 mem_ctx
= state
->out_mem_ctx
;
230 status
= state
->dispatch_recv(subreq
, mem_ctx
);
232 if (!NT_STATUS_IS_OK(status
)) {
233 tevent_req_nterror(req
, status
);
237 /* Copy out parameters */
238 *state
->orig
.out
.service_status
= *state
->tmp
.out
.service_status
;
241 state
->orig
.out
.result
= state
->tmp
.out
.result
;
243 /* Reset temporary structure */
244 ZERO_STRUCT(state
->tmp
);
246 tevent_req_done(req
);
249 NTSTATUS
rpccli_svcctl_ControlService_recv(struct tevent_req
*req
,
253 struct rpccli_svcctl_ControlService_state
*state
= tevent_req_data(
254 req
, struct rpccli_svcctl_ControlService_state
);
257 if (tevent_req_is_nterror(req
, &status
)) {
258 tevent_req_received(req
);
262 /* Steal possbile out parameters to the callers context */
263 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
266 *result
= state
->orig
.out
.result
;
268 tevent_req_received(req
);
272 NTSTATUS
rpccli_svcctl_ControlService(struct rpc_pipe_client
*cli
,
274 struct policy_handle
*handle
/* [in] [ref] */,
275 enum SERVICE_CONTROL control
/* [in] */,
276 struct SERVICE_STATUS
*service_status
/* [out] [ref] */,
279 struct svcctl_ControlService r
;
283 r
.in
.handle
= handle
;
284 r
.in
.control
= control
;
286 status
= cli
->dispatch(cli
,
289 NDR_SVCCTL_CONTROLSERVICE
,
292 if (!NT_STATUS_IS_OK(status
)) {
296 if (NT_STATUS_IS_ERR(status
)) {
300 /* Return variables */
301 *service_status
= *r
.out
.service_status
;
305 *werror
= r
.out
.result
;
308 return werror_to_ntstatus(r
.out
.result
);
311 struct rpccli_svcctl_DeleteService_state
{
312 struct svcctl_DeleteService orig
;
313 struct svcctl_DeleteService tmp
;
314 TALLOC_CTX
*out_mem_ctx
;
315 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
318 static void rpccli_svcctl_DeleteService_done(struct tevent_req
*subreq
);
320 struct tevent_req
*rpccli_svcctl_DeleteService_send(TALLOC_CTX
*mem_ctx
,
321 struct tevent_context
*ev
,
322 struct rpc_pipe_client
*cli
,
323 struct policy_handle
*_handle
/* [in] [ref] */)
325 struct tevent_req
*req
;
326 struct rpccli_svcctl_DeleteService_state
*state
;
327 struct tevent_req
*subreq
;
329 req
= tevent_req_create(mem_ctx
, &state
,
330 struct rpccli_svcctl_DeleteService_state
);
334 state
->out_mem_ctx
= NULL
;
335 state
->dispatch_recv
= cli
->dispatch_recv
;
338 state
->orig
.in
.handle
= _handle
;
343 ZERO_STRUCT(state
->orig
.out
.result
);
345 /* make a temporary copy, that we pass to the dispatch function */
346 state
->tmp
= state
->orig
;
348 subreq
= cli
->dispatch_send(state
, ev
, cli
,
350 NDR_SVCCTL_DELETESERVICE
,
352 if (tevent_req_nomem(subreq
, req
)) {
353 return tevent_req_post(req
, ev
);
355 tevent_req_set_callback(subreq
, rpccli_svcctl_DeleteService_done
, req
);
359 static void rpccli_svcctl_DeleteService_done(struct tevent_req
*subreq
)
361 struct tevent_req
*req
= tevent_req_callback_data(
362 subreq
, struct tevent_req
);
363 struct rpccli_svcctl_DeleteService_state
*state
= tevent_req_data(
364 req
, struct rpccli_svcctl_DeleteService_state
);
368 if (state
->out_mem_ctx
) {
369 mem_ctx
= state
->out_mem_ctx
;
374 status
= state
->dispatch_recv(subreq
, mem_ctx
);
376 if (!NT_STATUS_IS_OK(status
)) {
377 tevent_req_nterror(req
, status
);
381 /* Copy out parameters */
384 state
->orig
.out
.result
= state
->tmp
.out
.result
;
386 /* Reset temporary structure */
387 ZERO_STRUCT(state
->tmp
);
389 tevent_req_done(req
);
392 NTSTATUS
rpccli_svcctl_DeleteService_recv(struct tevent_req
*req
,
396 struct rpccli_svcctl_DeleteService_state
*state
= tevent_req_data(
397 req
, struct rpccli_svcctl_DeleteService_state
);
400 if (tevent_req_is_nterror(req
, &status
)) {
401 tevent_req_received(req
);
405 /* Steal possbile out parameters to the callers context */
406 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
409 *result
= state
->orig
.out
.result
;
411 tevent_req_received(req
);
415 NTSTATUS
rpccli_svcctl_DeleteService(struct rpc_pipe_client
*cli
,
417 struct policy_handle
*handle
/* [in] [ref] */,
420 struct svcctl_DeleteService r
;
424 r
.in
.handle
= handle
;
426 status
= cli
->dispatch(cli
,
429 NDR_SVCCTL_DELETESERVICE
,
432 if (!NT_STATUS_IS_OK(status
)) {
436 if (NT_STATUS_IS_ERR(status
)) {
440 /* Return variables */
444 *werror
= r
.out
.result
;
447 return werror_to_ntstatus(r
.out
.result
);
450 struct rpccli_svcctl_LockServiceDatabase_state
{
451 struct svcctl_LockServiceDatabase orig
;
452 struct svcctl_LockServiceDatabase tmp
;
453 TALLOC_CTX
*out_mem_ctx
;
454 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
457 static void rpccli_svcctl_LockServiceDatabase_done(struct tevent_req
*subreq
);
459 struct tevent_req
*rpccli_svcctl_LockServiceDatabase_send(TALLOC_CTX
*mem_ctx
,
460 struct tevent_context
*ev
,
461 struct rpc_pipe_client
*cli
,
462 struct policy_handle
*_handle
/* [in] [ref] */,
463 struct policy_handle
*_lock
/* [out] [ref] */)
465 struct tevent_req
*req
;
466 struct rpccli_svcctl_LockServiceDatabase_state
*state
;
467 struct tevent_req
*subreq
;
469 req
= tevent_req_create(mem_ctx
, &state
,
470 struct rpccli_svcctl_LockServiceDatabase_state
);
474 state
->out_mem_ctx
= NULL
;
475 state
->dispatch_recv
= cli
->dispatch_recv
;
478 state
->orig
.in
.handle
= _handle
;
481 state
->orig
.out
.lock
= _lock
;
484 ZERO_STRUCT(state
->orig
.out
.result
);
486 state
->out_mem_ctx
= talloc_named_const(state
, 0,
487 "rpccli_svcctl_LockServiceDatabase_out_memory");
488 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
489 return tevent_req_post(req
, ev
);
492 /* make a temporary copy, that we pass to the dispatch function */
493 state
->tmp
= state
->orig
;
495 subreq
= cli
->dispatch_send(state
, ev
, cli
,
497 NDR_SVCCTL_LOCKSERVICEDATABASE
,
499 if (tevent_req_nomem(subreq
, req
)) {
500 return tevent_req_post(req
, ev
);
502 tevent_req_set_callback(subreq
, rpccli_svcctl_LockServiceDatabase_done
, req
);
506 static void rpccli_svcctl_LockServiceDatabase_done(struct tevent_req
*subreq
)
508 struct tevent_req
*req
= tevent_req_callback_data(
509 subreq
, struct tevent_req
);
510 struct rpccli_svcctl_LockServiceDatabase_state
*state
= tevent_req_data(
511 req
, struct rpccli_svcctl_LockServiceDatabase_state
);
515 if (state
->out_mem_ctx
) {
516 mem_ctx
= state
->out_mem_ctx
;
521 status
= state
->dispatch_recv(subreq
, mem_ctx
);
523 if (!NT_STATUS_IS_OK(status
)) {
524 tevent_req_nterror(req
, status
);
528 /* Copy out parameters */
529 *state
->orig
.out
.lock
= *state
->tmp
.out
.lock
;
532 state
->orig
.out
.result
= state
->tmp
.out
.result
;
534 /* Reset temporary structure */
535 ZERO_STRUCT(state
->tmp
);
537 tevent_req_done(req
);
540 NTSTATUS
rpccli_svcctl_LockServiceDatabase_recv(struct tevent_req
*req
,
544 struct rpccli_svcctl_LockServiceDatabase_state
*state
= tevent_req_data(
545 req
, struct rpccli_svcctl_LockServiceDatabase_state
);
548 if (tevent_req_is_nterror(req
, &status
)) {
549 tevent_req_received(req
);
553 /* Steal possbile out parameters to the callers context */
554 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
557 *result
= state
->orig
.out
.result
;
559 tevent_req_received(req
);
563 NTSTATUS
rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client
*cli
,
565 struct policy_handle
*handle
/* [in] [ref] */,
566 struct policy_handle
*lock
/* [out] [ref] */,
569 struct svcctl_LockServiceDatabase r
;
573 r
.in
.handle
= handle
;
575 status
= cli
->dispatch(cli
,
578 NDR_SVCCTL_LOCKSERVICEDATABASE
,
581 if (!NT_STATUS_IS_OK(status
)) {
585 if (NT_STATUS_IS_ERR(status
)) {
589 /* Return variables */
594 *werror
= r
.out
.result
;
597 return werror_to_ntstatus(r
.out
.result
);
600 struct rpccli_svcctl_QueryServiceObjectSecurity_state
{
601 struct svcctl_QueryServiceObjectSecurity orig
;
602 struct svcctl_QueryServiceObjectSecurity tmp
;
603 TALLOC_CTX
*out_mem_ctx
;
604 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
607 static void rpccli_svcctl_QueryServiceObjectSecurity_done(struct tevent_req
*subreq
);
609 struct tevent_req
*rpccli_svcctl_QueryServiceObjectSecurity_send(TALLOC_CTX
*mem_ctx
,
610 struct tevent_context
*ev
,
611 struct rpc_pipe_client
*cli
,
612 struct policy_handle
*_handle
/* [in] [ref] */,
613 uint32_t _security_flags
/* [in] */,
614 uint8_t *_buffer
/* [out] [ref,size_is(offered)] */,
615 uint32_t _offered
/* [in] [range(0,0x40000)] */,
616 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */)
618 struct tevent_req
*req
;
619 struct rpccli_svcctl_QueryServiceObjectSecurity_state
*state
;
620 struct tevent_req
*subreq
;
622 req
= tevent_req_create(mem_ctx
, &state
,
623 struct rpccli_svcctl_QueryServiceObjectSecurity_state
);
627 state
->out_mem_ctx
= NULL
;
628 state
->dispatch_recv
= cli
->dispatch_recv
;
631 state
->orig
.in
.handle
= _handle
;
632 state
->orig
.in
.security_flags
= _security_flags
;
633 state
->orig
.in
.offered
= _offered
;
636 state
->orig
.out
.buffer
= _buffer
;
637 state
->orig
.out
.needed
= _needed
;
640 ZERO_STRUCT(state
->orig
.out
.result
);
642 state
->out_mem_ctx
= talloc_named_const(state
, 0,
643 "rpccli_svcctl_QueryServiceObjectSecurity_out_memory");
644 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
645 return tevent_req_post(req
, ev
);
648 /* make a temporary copy, that we pass to the dispatch function */
649 state
->tmp
= state
->orig
;
651 subreq
= cli
->dispatch_send(state
, ev
, cli
,
653 NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY
,
655 if (tevent_req_nomem(subreq
, req
)) {
656 return tevent_req_post(req
, ev
);
658 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceObjectSecurity_done
, req
);
662 static void rpccli_svcctl_QueryServiceObjectSecurity_done(struct tevent_req
*subreq
)
664 struct tevent_req
*req
= tevent_req_callback_data(
665 subreq
, struct tevent_req
);
666 struct rpccli_svcctl_QueryServiceObjectSecurity_state
*state
= tevent_req_data(
667 req
, struct rpccli_svcctl_QueryServiceObjectSecurity_state
);
671 if (state
->out_mem_ctx
) {
672 mem_ctx
= state
->out_mem_ctx
;
677 status
= state
->dispatch_recv(subreq
, mem_ctx
);
679 if (!NT_STATUS_IS_OK(status
)) {
680 tevent_req_nterror(req
, status
);
684 /* Copy out parameters */
685 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.buffer
));
686 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
689 state
->orig
.out
.result
= state
->tmp
.out
.result
;
691 /* Reset temporary structure */
692 ZERO_STRUCT(state
->tmp
);
694 tevent_req_done(req
);
697 NTSTATUS
rpccli_svcctl_QueryServiceObjectSecurity_recv(struct tevent_req
*req
,
701 struct rpccli_svcctl_QueryServiceObjectSecurity_state
*state
= tevent_req_data(
702 req
, struct rpccli_svcctl_QueryServiceObjectSecurity_state
);
705 if (tevent_req_is_nterror(req
, &status
)) {
706 tevent_req_received(req
);
710 /* Steal possbile out parameters to the callers context */
711 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
714 *result
= state
->orig
.out
.result
;
716 tevent_req_received(req
);
720 NTSTATUS
rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client
*cli
,
722 struct policy_handle
*handle
/* [in] [ref] */,
723 uint32_t security_flags
/* [in] */,
724 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
725 uint32_t offered
/* [in] [range(0,0x40000)] */,
726 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
729 struct svcctl_QueryServiceObjectSecurity r
;
733 r
.in
.handle
= handle
;
734 r
.in
.security_flags
= security_flags
;
735 r
.in
.offered
= offered
;
737 status
= cli
->dispatch(cli
,
740 NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY
,
743 if (!NT_STATUS_IS_OK(status
)) {
747 if (NT_STATUS_IS_ERR(status
)) {
751 /* Return variables */
752 memcpy(buffer
, r
.out
.buffer
, (r
.in
.offered
) * sizeof(*buffer
));
753 *needed
= *r
.out
.needed
;
757 *werror
= r
.out
.result
;
760 return werror_to_ntstatus(r
.out
.result
);
763 struct rpccli_svcctl_SetServiceObjectSecurity_state
{
764 struct svcctl_SetServiceObjectSecurity orig
;
765 struct svcctl_SetServiceObjectSecurity tmp
;
766 TALLOC_CTX
*out_mem_ctx
;
767 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
770 static void rpccli_svcctl_SetServiceObjectSecurity_done(struct tevent_req
*subreq
);
772 struct tevent_req
*rpccli_svcctl_SetServiceObjectSecurity_send(TALLOC_CTX
*mem_ctx
,
773 struct tevent_context
*ev
,
774 struct rpc_pipe_client
*cli
,
775 struct policy_handle
*_handle
/* [in] [ref] */,
776 uint32_t _security_flags
/* [in] */,
777 uint8_t *_buffer
/* [in] [ref,size_is(offered)] */,
778 uint32_t _offered
/* [in] */)
780 struct tevent_req
*req
;
781 struct rpccli_svcctl_SetServiceObjectSecurity_state
*state
;
782 struct tevent_req
*subreq
;
784 req
= tevent_req_create(mem_ctx
, &state
,
785 struct rpccli_svcctl_SetServiceObjectSecurity_state
);
789 state
->out_mem_ctx
= NULL
;
790 state
->dispatch_recv
= cli
->dispatch_recv
;
793 state
->orig
.in
.handle
= _handle
;
794 state
->orig
.in
.security_flags
= _security_flags
;
795 state
->orig
.in
.buffer
= _buffer
;
796 state
->orig
.in
.offered
= _offered
;
801 ZERO_STRUCT(state
->orig
.out
.result
);
803 /* make a temporary copy, that we pass to the dispatch function */
804 state
->tmp
= state
->orig
;
806 subreq
= cli
->dispatch_send(state
, ev
, cli
,
808 NDR_SVCCTL_SETSERVICEOBJECTSECURITY
,
810 if (tevent_req_nomem(subreq
, req
)) {
811 return tevent_req_post(req
, ev
);
813 tevent_req_set_callback(subreq
, rpccli_svcctl_SetServiceObjectSecurity_done
, req
);
817 static void rpccli_svcctl_SetServiceObjectSecurity_done(struct tevent_req
*subreq
)
819 struct tevent_req
*req
= tevent_req_callback_data(
820 subreq
, struct tevent_req
);
821 struct rpccli_svcctl_SetServiceObjectSecurity_state
*state
= tevent_req_data(
822 req
, struct rpccli_svcctl_SetServiceObjectSecurity_state
);
826 if (state
->out_mem_ctx
) {
827 mem_ctx
= state
->out_mem_ctx
;
832 status
= state
->dispatch_recv(subreq
, mem_ctx
);
834 if (!NT_STATUS_IS_OK(status
)) {
835 tevent_req_nterror(req
, status
);
839 /* Copy out parameters */
842 state
->orig
.out
.result
= state
->tmp
.out
.result
;
844 /* Reset temporary structure */
845 ZERO_STRUCT(state
->tmp
);
847 tevent_req_done(req
);
850 NTSTATUS
rpccli_svcctl_SetServiceObjectSecurity_recv(struct tevent_req
*req
,
854 struct rpccli_svcctl_SetServiceObjectSecurity_state
*state
= tevent_req_data(
855 req
, struct rpccli_svcctl_SetServiceObjectSecurity_state
);
858 if (tevent_req_is_nterror(req
, &status
)) {
859 tevent_req_received(req
);
863 /* Steal possbile out parameters to the callers context */
864 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
867 *result
= state
->orig
.out
.result
;
869 tevent_req_received(req
);
873 NTSTATUS
rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client
*cli
,
875 struct policy_handle
*handle
/* [in] [ref] */,
876 uint32_t security_flags
/* [in] */,
877 uint8_t *buffer
/* [in] [ref,size_is(offered)] */,
878 uint32_t offered
/* [in] */,
881 struct svcctl_SetServiceObjectSecurity r
;
885 r
.in
.handle
= handle
;
886 r
.in
.security_flags
= security_flags
;
887 r
.in
.buffer
= buffer
;
888 r
.in
.offered
= offered
;
890 status
= cli
->dispatch(cli
,
893 NDR_SVCCTL_SETSERVICEOBJECTSECURITY
,
896 if (!NT_STATUS_IS_OK(status
)) {
900 if (NT_STATUS_IS_ERR(status
)) {
904 /* Return variables */
908 *werror
= r
.out
.result
;
911 return werror_to_ntstatus(r
.out
.result
);
914 struct rpccli_svcctl_QueryServiceStatus_state
{
915 struct svcctl_QueryServiceStatus orig
;
916 struct svcctl_QueryServiceStatus tmp
;
917 TALLOC_CTX
*out_mem_ctx
;
918 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
921 static void rpccli_svcctl_QueryServiceStatus_done(struct tevent_req
*subreq
);
923 struct tevent_req
*rpccli_svcctl_QueryServiceStatus_send(TALLOC_CTX
*mem_ctx
,
924 struct tevent_context
*ev
,
925 struct rpc_pipe_client
*cli
,
926 struct policy_handle
*_handle
/* [in] [ref] */,
927 struct SERVICE_STATUS
*_service_status
/* [out] [ref] */)
929 struct tevent_req
*req
;
930 struct rpccli_svcctl_QueryServiceStatus_state
*state
;
931 struct tevent_req
*subreq
;
933 req
= tevent_req_create(mem_ctx
, &state
,
934 struct rpccli_svcctl_QueryServiceStatus_state
);
938 state
->out_mem_ctx
= NULL
;
939 state
->dispatch_recv
= cli
->dispatch_recv
;
942 state
->orig
.in
.handle
= _handle
;
945 state
->orig
.out
.service_status
= _service_status
;
948 ZERO_STRUCT(state
->orig
.out
.result
);
950 state
->out_mem_ctx
= talloc_named_const(state
, 0,
951 "rpccli_svcctl_QueryServiceStatus_out_memory");
952 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
953 return tevent_req_post(req
, ev
);
956 /* make a temporary copy, that we pass to the dispatch function */
957 state
->tmp
= state
->orig
;
959 subreq
= cli
->dispatch_send(state
, ev
, cli
,
961 NDR_SVCCTL_QUERYSERVICESTATUS
,
963 if (tevent_req_nomem(subreq
, req
)) {
964 return tevent_req_post(req
, ev
);
966 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceStatus_done
, req
);
970 static void rpccli_svcctl_QueryServiceStatus_done(struct tevent_req
*subreq
)
972 struct tevent_req
*req
= tevent_req_callback_data(
973 subreq
, struct tevent_req
);
974 struct rpccli_svcctl_QueryServiceStatus_state
*state
= tevent_req_data(
975 req
, struct rpccli_svcctl_QueryServiceStatus_state
);
979 if (state
->out_mem_ctx
) {
980 mem_ctx
= state
->out_mem_ctx
;
985 status
= state
->dispatch_recv(subreq
, mem_ctx
);
987 if (!NT_STATUS_IS_OK(status
)) {
988 tevent_req_nterror(req
, status
);
992 /* Copy out parameters */
993 *state
->orig
.out
.service_status
= *state
->tmp
.out
.service_status
;
996 state
->orig
.out
.result
= state
->tmp
.out
.result
;
998 /* Reset temporary structure */
999 ZERO_STRUCT(state
->tmp
);
1001 tevent_req_done(req
);
1004 NTSTATUS
rpccli_svcctl_QueryServiceStatus_recv(struct tevent_req
*req
,
1005 TALLOC_CTX
*mem_ctx
,
1008 struct rpccli_svcctl_QueryServiceStatus_state
*state
= tevent_req_data(
1009 req
, struct rpccli_svcctl_QueryServiceStatus_state
);
1012 if (tevent_req_is_nterror(req
, &status
)) {
1013 tevent_req_received(req
);
1017 /* Steal possbile out parameters to the callers context */
1018 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1021 *result
= state
->orig
.out
.result
;
1023 tevent_req_received(req
);
1024 return NT_STATUS_OK
;
1027 NTSTATUS
rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client
*cli
,
1028 TALLOC_CTX
*mem_ctx
,
1029 struct policy_handle
*handle
/* [in] [ref] */,
1030 struct SERVICE_STATUS
*service_status
/* [out] [ref] */,
1033 struct svcctl_QueryServiceStatus r
;
1037 r
.in
.handle
= handle
;
1039 status
= cli
->dispatch(cli
,
1042 NDR_SVCCTL_QUERYSERVICESTATUS
,
1045 if (!NT_STATUS_IS_OK(status
)) {
1049 if (NT_STATUS_IS_ERR(status
)) {
1053 /* Return variables */
1054 *service_status
= *r
.out
.service_status
;
1058 *werror
= r
.out
.result
;
1061 return werror_to_ntstatus(r
.out
.result
);
1064 struct rpccli_svcctl_SetServiceStatus_state
{
1065 struct svcctl_SetServiceStatus orig
;
1066 struct svcctl_SetServiceStatus tmp
;
1067 TALLOC_CTX
*out_mem_ctx
;
1068 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1071 static void rpccli_svcctl_SetServiceStatus_done(struct tevent_req
*subreq
);
1073 struct tevent_req
*rpccli_svcctl_SetServiceStatus_send(TALLOC_CTX
*mem_ctx
,
1074 struct tevent_context
*ev
,
1075 struct rpc_pipe_client
*cli
)
1077 struct tevent_req
*req
;
1078 struct rpccli_svcctl_SetServiceStatus_state
*state
;
1079 struct tevent_req
*subreq
;
1081 req
= tevent_req_create(mem_ctx
, &state
,
1082 struct rpccli_svcctl_SetServiceStatus_state
);
1086 state
->out_mem_ctx
= NULL
;
1087 state
->dispatch_recv
= cli
->dispatch_recv
;
1091 /* Out parameters */
1094 ZERO_STRUCT(state
->orig
.out
.result
);
1096 /* make a temporary copy, that we pass to the dispatch function */
1097 state
->tmp
= state
->orig
;
1099 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1101 NDR_SVCCTL_SETSERVICESTATUS
,
1103 if (tevent_req_nomem(subreq
, req
)) {
1104 return tevent_req_post(req
, ev
);
1106 tevent_req_set_callback(subreq
, rpccli_svcctl_SetServiceStatus_done
, req
);
1110 static void rpccli_svcctl_SetServiceStatus_done(struct tevent_req
*subreq
)
1112 struct tevent_req
*req
= tevent_req_callback_data(
1113 subreq
, struct tevent_req
);
1114 struct rpccli_svcctl_SetServiceStatus_state
*state
= tevent_req_data(
1115 req
, struct rpccli_svcctl_SetServiceStatus_state
);
1117 TALLOC_CTX
*mem_ctx
;
1119 if (state
->out_mem_ctx
) {
1120 mem_ctx
= state
->out_mem_ctx
;
1125 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1126 TALLOC_FREE(subreq
);
1127 if (!NT_STATUS_IS_OK(status
)) {
1128 tevent_req_nterror(req
, status
);
1132 /* Copy out parameters */
1135 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1137 /* Reset temporary structure */
1138 ZERO_STRUCT(state
->tmp
);
1140 tevent_req_done(req
);
1143 NTSTATUS
rpccli_svcctl_SetServiceStatus_recv(struct tevent_req
*req
,
1144 TALLOC_CTX
*mem_ctx
,
1147 struct rpccli_svcctl_SetServiceStatus_state
*state
= tevent_req_data(
1148 req
, struct rpccli_svcctl_SetServiceStatus_state
);
1151 if (tevent_req_is_nterror(req
, &status
)) {
1152 tevent_req_received(req
);
1156 /* Steal possbile out parameters to the callers context */
1157 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1160 *result
= state
->orig
.out
.result
;
1162 tevent_req_received(req
);
1163 return NT_STATUS_OK
;
1166 NTSTATUS
rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client
*cli
,
1167 TALLOC_CTX
*mem_ctx
,
1170 struct svcctl_SetServiceStatus r
;
1175 status
= cli
->dispatch(cli
,
1178 NDR_SVCCTL_SETSERVICESTATUS
,
1181 if (!NT_STATUS_IS_OK(status
)) {
1185 if (NT_STATUS_IS_ERR(status
)) {
1189 /* Return variables */
1193 *werror
= r
.out
.result
;
1196 return werror_to_ntstatus(r
.out
.result
);
1199 struct rpccli_svcctl_UnlockServiceDatabase_state
{
1200 struct svcctl_UnlockServiceDatabase orig
;
1201 struct svcctl_UnlockServiceDatabase tmp
;
1202 TALLOC_CTX
*out_mem_ctx
;
1203 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1206 static void rpccli_svcctl_UnlockServiceDatabase_done(struct tevent_req
*subreq
);
1208 struct tevent_req
*rpccli_svcctl_UnlockServiceDatabase_send(TALLOC_CTX
*mem_ctx
,
1209 struct tevent_context
*ev
,
1210 struct rpc_pipe_client
*cli
,
1211 struct policy_handle
*_lock
/* [in,out] [ref] */)
1213 struct tevent_req
*req
;
1214 struct rpccli_svcctl_UnlockServiceDatabase_state
*state
;
1215 struct tevent_req
*subreq
;
1217 req
= tevent_req_create(mem_ctx
, &state
,
1218 struct rpccli_svcctl_UnlockServiceDatabase_state
);
1222 state
->out_mem_ctx
= NULL
;
1223 state
->dispatch_recv
= cli
->dispatch_recv
;
1226 state
->orig
.in
.lock
= _lock
;
1228 /* Out parameters */
1229 state
->orig
.out
.lock
= _lock
;
1232 ZERO_STRUCT(state
->orig
.out
.result
);
1234 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1235 "rpccli_svcctl_UnlockServiceDatabase_out_memory");
1236 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1237 return tevent_req_post(req
, ev
);
1240 /* make a temporary copy, that we pass to the dispatch function */
1241 state
->tmp
= state
->orig
;
1243 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1245 NDR_SVCCTL_UNLOCKSERVICEDATABASE
,
1247 if (tevent_req_nomem(subreq
, req
)) {
1248 return tevent_req_post(req
, ev
);
1250 tevent_req_set_callback(subreq
, rpccli_svcctl_UnlockServiceDatabase_done
, req
);
1254 static void rpccli_svcctl_UnlockServiceDatabase_done(struct tevent_req
*subreq
)
1256 struct tevent_req
*req
= tevent_req_callback_data(
1257 subreq
, struct tevent_req
);
1258 struct rpccli_svcctl_UnlockServiceDatabase_state
*state
= tevent_req_data(
1259 req
, struct rpccli_svcctl_UnlockServiceDatabase_state
);
1261 TALLOC_CTX
*mem_ctx
;
1263 if (state
->out_mem_ctx
) {
1264 mem_ctx
= state
->out_mem_ctx
;
1269 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1270 TALLOC_FREE(subreq
);
1271 if (!NT_STATUS_IS_OK(status
)) {
1272 tevent_req_nterror(req
, status
);
1276 /* Copy out parameters */
1277 *state
->orig
.out
.lock
= *state
->tmp
.out
.lock
;
1280 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1282 /* Reset temporary structure */
1283 ZERO_STRUCT(state
->tmp
);
1285 tevent_req_done(req
);
1288 NTSTATUS
rpccli_svcctl_UnlockServiceDatabase_recv(struct tevent_req
*req
,
1289 TALLOC_CTX
*mem_ctx
,
1292 struct rpccli_svcctl_UnlockServiceDatabase_state
*state
= tevent_req_data(
1293 req
, struct rpccli_svcctl_UnlockServiceDatabase_state
);
1296 if (tevent_req_is_nterror(req
, &status
)) {
1297 tevent_req_received(req
);
1301 /* Steal possbile out parameters to the callers context */
1302 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1305 *result
= state
->orig
.out
.result
;
1307 tevent_req_received(req
);
1308 return NT_STATUS_OK
;
1311 NTSTATUS
rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client
*cli
,
1312 TALLOC_CTX
*mem_ctx
,
1313 struct policy_handle
*lock
/* [in,out] [ref] */,
1316 struct svcctl_UnlockServiceDatabase r
;
1322 status
= cli
->dispatch(cli
,
1325 NDR_SVCCTL_UNLOCKSERVICEDATABASE
,
1328 if (!NT_STATUS_IS_OK(status
)) {
1332 if (NT_STATUS_IS_ERR(status
)) {
1336 /* Return variables */
1337 *lock
= *r
.out
.lock
;
1341 *werror
= r
.out
.result
;
1344 return werror_to_ntstatus(r
.out
.result
);
1347 struct rpccli_svcctl_NotifyBootConfigStatus_state
{
1348 struct svcctl_NotifyBootConfigStatus orig
;
1349 struct svcctl_NotifyBootConfigStatus tmp
;
1350 TALLOC_CTX
*out_mem_ctx
;
1351 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1354 static void rpccli_svcctl_NotifyBootConfigStatus_done(struct tevent_req
*subreq
);
1356 struct tevent_req
*rpccli_svcctl_NotifyBootConfigStatus_send(TALLOC_CTX
*mem_ctx
,
1357 struct tevent_context
*ev
,
1358 struct rpc_pipe_client
*cli
)
1360 struct tevent_req
*req
;
1361 struct rpccli_svcctl_NotifyBootConfigStatus_state
*state
;
1362 struct tevent_req
*subreq
;
1364 req
= tevent_req_create(mem_ctx
, &state
,
1365 struct rpccli_svcctl_NotifyBootConfigStatus_state
);
1369 state
->out_mem_ctx
= NULL
;
1370 state
->dispatch_recv
= cli
->dispatch_recv
;
1374 /* Out parameters */
1377 ZERO_STRUCT(state
->orig
.out
.result
);
1379 /* make a temporary copy, that we pass to the dispatch function */
1380 state
->tmp
= state
->orig
;
1382 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1384 NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS
,
1386 if (tevent_req_nomem(subreq
, req
)) {
1387 return tevent_req_post(req
, ev
);
1389 tevent_req_set_callback(subreq
, rpccli_svcctl_NotifyBootConfigStatus_done
, req
);
1393 static void rpccli_svcctl_NotifyBootConfigStatus_done(struct tevent_req
*subreq
)
1395 struct tevent_req
*req
= tevent_req_callback_data(
1396 subreq
, struct tevent_req
);
1397 struct rpccli_svcctl_NotifyBootConfigStatus_state
*state
= tevent_req_data(
1398 req
, struct rpccli_svcctl_NotifyBootConfigStatus_state
);
1400 TALLOC_CTX
*mem_ctx
;
1402 if (state
->out_mem_ctx
) {
1403 mem_ctx
= state
->out_mem_ctx
;
1408 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1409 TALLOC_FREE(subreq
);
1410 if (!NT_STATUS_IS_OK(status
)) {
1411 tevent_req_nterror(req
, status
);
1415 /* Copy out parameters */
1418 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1420 /* Reset temporary structure */
1421 ZERO_STRUCT(state
->tmp
);
1423 tevent_req_done(req
);
1426 NTSTATUS
rpccli_svcctl_NotifyBootConfigStatus_recv(struct tevent_req
*req
,
1427 TALLOC_CTX
*mem_ctx
,
1430 struct rpccli_svcctl_NotifyBootConfigStatus_state
*state
= tevent_req_data(
1431 req
, struct rpccli_svcctl_NotifyBootConfigStatus_state
);
1434 if (tevent_req_is_nterror(req
, &status
)) {
1435 tevent_req_received(req
);
1439 /* Steal possbile out parameters to the callers context */
1440 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1443 *result
= state
->orig
.out
.result
;
1445 tevent_req_received(req
);
1446 return NT_STATUS_OK
;
1449 NTSTATUS
rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client
*cli
,
1450 TALLOC_CTX
*mem_ctx
,
1453 struct svcctl_NotifyBootConfigStatus r
;
1458 status
= cli
->dispatch(cli
,
1461 NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS
,
1464 if (!NT_STATUS_IS_OK(status
)) {
1468 if (NT_STATUS_IS_ERR(status
)) {
1472 /* Return variables */
1476 *werror
= r
.out
.result
;
1479 return werror_to_ntstatus(r
.out
.result
);
1482 struct rpccli_svcctl_SCSetServiceBitsW_state
{
1483 struct svcctl_SCSetServiceBitsW orig
;
1484 struct svcctl_SCSetServiceBitsW tmp
;
1485 TALLOC_CTX
*out_mem_ctx
;
1486 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1489 static void rpccli_svcctl_SCSetServiceBitsW_done(struct tevent_req
*subreq
);
1491 struct tevent_req
*rpccli_svcctl_SCSetServiceBitsW_send(TALLOC_CTX
*mem_ctx
,
1492 struct tevent_context
*ev
,
1493 struct rpc_pipe_client
*cli
,
1494 struct policy_handle
*_handle
/* [in] [ref] */,
1495 uint32_t _bits
/* [in] */,
1496 uint32_t _bitson
/* [in] */,
1497 uint32_t _immediate
/* [in] */)
1499 struct tevent_req
*req
;
1500 struct rpccli_svcctl_SCSetServiceBitsW_state
*state
;
1501 struct tevent_req
*subreq
;
1503 req
= tevent_req_create(mem_ctx
, &state
,
1504 struct rpccli_svcctl_SCSetServiceBitsW_state
);
1508 state
->out_mem_ctx
= NULL
;
1509 state
->dispatch_recv
= cli
->dispatch_recv
;
1512 state
->orig
.in
.handle
= _handle
;
1513 state
->orig
.in
.bits
= _bits
;
1514 state
->orig
.in
.bitson
= _bitson
;
1515 state
->orig
.in
.immediate
= _immediate
;
1517 /* Out parameters */
1520 ZERO_STRUCT(state
->orig
.out
.result
);
1522 /* make a temporary copy, that we pass to the dispatch function */
1523 state
->tmp
= state
->orig
;
1525 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1527 NDR_SVCCTL_SCSETSERVICEBITSW
,
1529 if (tevent_req_nomem(subreq
, req
)) {
1530 return tevent_req_post(req
, ev
);
1532 tevent_req_set_callback(subreq
, rpccli_svcctl_SCSetServiceBitsW_done
, req
);
1536 static void rpccli_svcctl_SCSetServiceBitsW_done(struct tevent_req
*subreq
)
1538 struct tevent_req
*req
= tevent_req_callback_data(
1539 subreq
, struct tevent_req
);
1540 struct rpccli_svcctl_SCSetServiceBitsW_state
*state
= tevent_req_data(
1541 req
, struct rpccli_svcctl_SCSetServiceBitsW_state
);
1543 TALLOC_CTX
*mem_ctx
;
1545 if (state
->out_mem_ctx
) {
1546 mem_ctx
= state
->out_mem_ctx
;
1551 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1552 TALLOC_FREE(subreq
);
1553 if (!NT_STATUS_IS_OK(status
)) {
1554 tevent_req_nterror(req
, status
);
1558 /* Copy out parameters */
1561 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1563 /* Reset temporary structure */
1564 ZERO_STRUCT(state
->tmp
);
1566 tevent_req_done(req
);
1569 NTSTATUS
rpccli_svcctl_SCSetServiceBitsW_recv(struct tevent_req
*req
,
1570 TALLOC_CTX
*mem_ctx
,
1573 struct rpccli_svcctl_SCSetServiceBitsW_state
*state
= tevent_req_data(
1574 req
, struct rpccli_svcctl_SCSetServiceBitsW_state
);
1577 if (tevent_req_is_nterror(req
, &status
)) {
1578 tevent_req_received(req
);
1582 /* Steal possbile out parameters to the callers context */
1583 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1586 *result
= state
->orig
.out
.result
;
1588 tevent_req_received(req
);
1589 return NT_STATUS_OK
;
1592 NTSTATUS
rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client
*cli
,
1593 TALLOC_CTX
*mem_ctx
,
1594 struct policy_handle
*handle
/* [in] [ref] */,
1595 uint32_t bits
/* [in] */,
1596 uint32_t bitson
/* [in] */,
1597 uint32_t immediate
/* [in] */,
1600 struct svcctl_SCSetServiceBitsW r
;
1604 r
.in
.handle
= handle
;
1606 r
.in
.bitson
= bitson
;
1607 r
.in
.immediate
= immediate
;
1609 status
= cli
->dispatch(cli
,
1612 NDR_SVCCTL_SCSETSERVICEBITSW
,
1615 if (!NT_STATUS_IS_OK(status
)) {
1619 if (NT_STATUS_IS_ERR(status
)) {
1623 /* Return variables */
1627 *werror
= r
.out
.result
;
1630 return werror_to_ntstatus(r
.out
.result
);
1633 struct rpccli_svcctl_ChangeServiceConfigW_state
{
1634 struct svcctl_ChangeServiceConfigW orig
;
1635 struct svcctl_ChangeServiceConfigW tmp
;
1636 TALLOC_CTX
*out_mem_ctx
;
1637 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1640 static void rpccli_svcctl_ChangeServiceConfigW_done(struct tevent_req
*subreq
);
1642 struct tevent_req
*rpccli_svcctl_ChangeServiceConfigW_send(TALLOC_CTX
*mem_ctx
,
1643 struct tevent_context
*ev
,
1644 struct rpc_pipe_client
*cli
,
1645 struct policy_handle
*_handle
/* [in] [ref] */,
1646 uint32_t _type
/* [in] */,
1647 enum svcctl_StartType _start_type
/* [in] */,
1648 enum svcctl_ErrorControl _error_control
/* [in] */,
1649 const char *_binary_path
/* [in] [unique,charset(UTF16)] */,
1650 const char *_load_order_group
/* [in] [unique,charset(UTF16)] */,
1651 uint32_t *_tag_id
/* [out] [ref] */,
1652 const char *_dependencies
/* [in] [unique,charset(UTF16)] */,
1653 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
1654 const char *_password
/* [in] [unique,charset(UTF16)] */,
1655 const char *_display_name
/* [in] [unique,charset(UTF16)] */)
1657 struct tevent_req
*req
;
1658 struct rpccli_svcctl_ChangeServiceConfigW_state
*state
;
1659 struct tevent_req
*subreq
;
1661 req
= tevent_req_create(mem_ctx
, &state
,
1662 struct rpccli_svcctl_ChangeServiceConfigW_state
);
1666 state
->out_mem_ctx
= NULL
;
1667 state
->dispatch_recv
= cli
->dispatch_recv
;
1670 state
->orig
.in
.handle
= _handle
;
1671 state
->orig
.in
.type
= _type
;
1672 state
->orig
.in
.start_type
= _start_type
;
1673 state
->orig
.in
.error_control
= _error_control
;
1674 state
->orig
.in
.binary_path
= _binary_path
;
1675 state
->orig
.in
.load_order_group
= _load_order_group
;
1676 state
->orig
.in
.dependencies
= _dependencies
;
1677 state
->orig
.in
.service_start_name
= _service_start_name
;
1678 state
->orig
.in
.password
= _password
;
1679 state
->orig
.in
.display_name
= _display_name
;
1681 /* Out parameters */
1682 state
->orig
.out
.tag_id
= _tag_id
;
1685 ZERO_STRUCT(state
->orig
.out
.result
);
1687 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1688 "rpccli_svcctl_ChangeServiceConfigW_out_memory");
1689 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1690 return tevent_req_post(req
, ev
);
1693 /* make a temporary copy, that we pass to the dispatch function */
1694 state
->tmp
= state
->orig
;
1696 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1698 NDR_SVCCTL_CHANGESERVICECONFIGW
,
1700 if (tevent_req_nomem(subreq
, req
)) {
1701 return tevent_req_post(req
, ev
);
1703 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfigW_done
, req
);
1707 static void rpccli_svcctl_ChangeServiceConfigW_done(struct tevent_req
*subreq
)
1709 struct tevent_req
*req
= tevent_req_callback_data(
1710 subreq
, struct tevent_req
);
1711 struct rpccli_svcctl_ChangeServiceConfigW_state
*state
= tevent_req_data(
1712 req
, struct rpccli_svcctl_ChangeServiceConfigW_state
);
1714 TALLOC_CTX
*mem_ctx
;
1716 if (state
->out_mem_ctx
) {
1717 mem_ctx
= state
->out_mem_ctx
;
1722 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1723 TALLOC_FREE(subreq
);
1724 if (!NT_STATUS_IS_OK(status
)) {
1725 tevent_req_nterror(req
, status
);
1729 /* Copy out parameters */
1730 *state
->orig
.out
.tag_id
= *state
->tmp
.out
.tag_id
;
1733 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1735 /* Reset temporary structure */
1736 ZERO_STRUCT(state
->tmp
);
1738 tevent_req_done(req
);
1741 NTSTATUS
rpccli_svcctl_ChangeServiceConfigW_recv(struct tevent_req
*req
,
1742 TALLOC_CTX
*mem_ctx
,
1745 struct rpccli_svcctl_ChangeServiceConfigW_state
*state
= tevent_req_data(
1746 req
, struct rpccli_svcctl_ChangeServiceConfigW_state
);
1749 if (tevent_req_is_nterror(req
, &status
)) {
1750 tevent_req_received(req
);
1754 /* Steal possbile out parameters to the callers context */
1755 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1758 *result
= state
->orig
.out
.result
;
1760 tevent_req_received(req
);
1761 return NT_STATUS_OK
;
1764 NTSTATUS
rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client
*cli
,
1765 TALLOC_CTX
*mem_ctx
,
1766 struct policy_handle
*handle
/* [in] [ref] */,
1767 uint32_t type
/* [in] */,
1768 enum svcctl_StartType start_type
/* [in] */,
1769 enum svcctl_ErrorControl error_control
/* [in] */,
1770 const char *binary_path
/* [in] [unique,charset(UTF16)] */,
1771 const char *load_order_group
/* [in] [unique,charset(UTF16)] */,
1772 uint32_t *tag_id
/* [out] [ref] */,
1773 const char *dependencies
/* [in] [unique,charset(UTF16)] */,
1774 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
1775 const char *password
/* [in] [unique,charset(UTF16)] */,
1776 const char *display_name
/* [in] [unique,charset(UTF16)] */,
1779 struct svcctl_ChangeServiceConfigW r
;
1783 r
.in
.handle
= handle
;
1785 r
.in
.start_type
= start_type
;
1786 r
.in
.error_control
= error_control
;
1787 r
.in
.binary_path
= binary_path
;
1788 r
.in
.load_order_group
= load_order_group
;
1789 r
.in
.dependencies
= dependencies
;
1790 r
.in
.service_start_name
= service_start_name
;
1791 r
.in
.password
= password
;
1792 r
.in
.display_name
= display_name
;
1794 status
= cli
->dispatch(cli
,
1797 NDR_SVCCTL_CHANGESERVICECONFIGW
,
1800 if (!NT_STATUS_IS_OK(status
)) {
1804 if (NT_STATUS_IS_ERR(status
)) {
1808 /* Return variables */
1809 *tag_id
= *r
.out
.tag_id
;
1813 *werror
= r
.out
.result
;
1816 return werror_to_ntstatus(r
.out
.result
);
1819 struct rpccli_svcctl_CreateServiceW_state
{
1820 struct svcctl_CreateServiceW orig
;
1821 struct svcctl_CreateServiceW tmp
;
1822 TALLOC_CTX
*out_mem_ctx
;
1823 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1826 static void rpccli_svcctl_CreateServiceW_done(struct tevent_req
*subreq
);
1828 struct tevent_req
*rpccli_svcctl_CreateServiceW_send(TALLOC_CTX
*mem_ctx
,
1829 struct tevent_context
*ev
,
1830 struct rpc_pipe_client
*cli
,
1831 struct policy_handle
*_scmanager_handle
/* [in] [ref] */,
1832 const char *_ServiceName
/* [in] [charset(UTF16)] */,
1833 const char *_DisplayName
/* [in] [unique,charset(UTF16)] */,
1834 uint32_t _desired_access
/* [in] */,
1835 uint32_t _type
/* [in] */,
1836 enum svcctl_StartType _start_type
/* [in] */,
1837 enum svcctl_ErrorControl _error_control
/* [in] */,
1838 const char *_binary_path
/* [in] [charset(UTF16)] */,
1839 const char *_LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
1840 uint32_t *_TagId
/* [in,out] [unique] */,
1841 uint8_t *_dependencies
/* [in] [unique,size_is(dependencies_size)] */,
1842 uint32_t _dependencies_size
/* [in] */,
1843 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
1844 uint8_t *_password
/* [in] [unique,size_is(password_size)] */,
1845 uint32_t _password_size
/* [in] */,
1846 struct policy_handle
*_handle
/* [out] [ref] */)
1848 struct tevent_req
*req
;
1849 struct rpccli_svcctl_CreateServiceW_state
*state
;
1850 struct tevent_req
*subreq
;
1852 req
= tevent_req_create(mem_ctx
, &state
,
1853 struct rpccli_svcctl_CreateServiceW_state
);
1857 state
->out_mem_ctx
= NULL
;
1858 state
->dispatch_recv
= cli
->dispatch_recv
;
1861 state
->orig
.in
.scmanager_handle
= _scmanager_handle
;
1862 state
->orig
.in
.ServiceName
= _ServiceName
;
1863 state
->orig
.in
.DisplayName
= _DisplayName
;
1864 state
->orig
.in
.desired_access
= _desired_access
;
1865 state
->orig
.in
.type
= _type
;
1866 state
->orig
.in
.start_type
= _start_type
;
1867 state
->orig
.in
.error_control
= _error_control
;
1868 state
->orig
.in
.binary_path
= _binary_path
;
1869 state
->orig
.in
.LoadOrderGroupKey
= _LoadOrderGroupKey
;
1870 state
->orig
.in
.TagId
= _TagId
;
1871 state
->orig
.in
.dependencies
= _dependencies
;
1872 state
->orig
.in
.dependencies_size
= _dependencies_size
;
1873 state
->orig
.in
.service_start_name
= _service_start_name
;
1874 state
->orig
.in
.password
= _password
;
1875 state
->orig
.in
.password_size
= _password_size
;
1877 /* Out parameters */
1878 state
->orig
.out
.TagId
= _TagId
;
1879 state
->orig
.out
.handle
= _handle
;
1882 ZERO_STRUCT(state
->orig
.out
.result
);
1884 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1885 "rpccli_svcctl_CreateServiceW_out_memory");
1886 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1887 return tevent_req_post(req
, ev
);
1890 /* make a temporary copy, that we pass to the dispatch function */
1891 state
->tmp
= state
->orig
;
1893 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1895 NDR_SVCCTL_CREATESERVICEW
,
1897 if (tevent_req_nomem(subreq
, req
)) {
1898 return tevent_req_post(req
, ev
);
1900 tevent_req_set_callback(subreq
, rpccli_svcctl_CreateServiceW_done
, req
);
1904 static void rpccli_svcctl_CreateServiceW_done(struct tevent_req
*subreq
)
1906 struct tevent_req
*req
= tevent_req_callback_data(
1907 subreq
, struct tevent_req
);
1908 struct rpccli_svcctl_CreateServiceW_state
*state
= tevent_req_data(
1909 req
, struct rpccli_svcctl_CreateServiceW_state
);
1911 TALLOC_CTX
*mem_ctx
;
1913 if (state
->out_mem_ctx
) {
1914 mem_ctx
= state
->out_mem_ctx
;
1919 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1920 TALLOC_FREE(subreq
);
1921 if (!NT_STATUS_IS_OK(status
)) {
1922 tevent_req_nterror(req
, status
);
1926 /* Copy out parameters */
1927 if (state
->orig
.out
.TagId
&& state
->tmp
.out
.TagId
) {
1928 *state
->orig
.out
.TagId
= *state
->tmp
.out
.TagId
;
1930 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
1933 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1935 /* Reset temporary structure */
1936 ZERO_STRUCT(state
->tmp
);
1938 tevent_req_done(req
);
1941 NTSTATUS
rpccli_svcctl_CreateServiceW_recv(struct tevent_req
*req
,
1942 TALLOC_CTX
*mem_ctx
,
1945 struct rpccli_svcctl_CreateServiceW_state
*state
= tevent_req_data(
1946 req
, struct rpccli_svcctl_CreateServiceW_state
);
1949 if (tevent_req_is_nterror(req
, &status
)) {
1950 tevent_req_received(req
);
1954 /* Steal possbile out parameters to the callers context */
1955 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1958 *result
= state
->orig
.out
.result
;
1960 tevent_req_received(req
);
1961 return NT_STATUS_OK
;
1964 NTSTATUS
rpccli_svcctl_CreateServiceW(struct rpc_pipe_client
*cli
,
1965 TALLOC_CTX
*mem_ctx
,
1966 struct policy_handle
*scmanager_handle
/* [in] [ref] */,
1967 const char *ServiceName
/* [in] [charset(UTF16)] */,
1968 const char *DisplayName
/* [in] [unique,charset(UTF16)] */,
1969 uint32_t desired_access
/* [in] */,
1970 uint32_t type
/* [in] */,
1971 enum svcctl_StartType start_type
/* [in] */,
1972 enum svcctl_ErrorControl error_control
/* [in] */,
1973 const char *binary_path
/* [in] [charset(UTF16)] */,
1974 const char *LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
1975 uint32_t *TagId
/* [in,out] [unique] */,
1976 uint8_t *dependencies
/* [in] [unique,size_is(dependencies_size)] */,
1977 uint32_t dependencies_size
/* [in] */,
1978 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
1979 uint8_t *password
/* [in] [unique,size_is(password_size)] */,
1980 uint32_t password_size
/* [in] */,
1981 struct policy_handle
*handle
/* [out] [ref] */,
1984 struct svcctl_CreateServiceW r
;
1988 r
.in
.scmanager_handle
= scmanager_handle
;
1989 r
.in
.ServiceName
= ServiceName
;
1990 r
.in
.DisplayName
= DisplayName
;
1991 r
.in
.desired_access
= desired_access
;
1993 r
.in
.start_type
= start_type
;
1994 r
.in
.error_control
= error_control
;
1995 r
.in
.binary_path
= binary_path
;
1996 r
.in
.LoadOrderGroupKey
= LoadOrderGroupKey
;
1998 r
.in
.dependencies
= dependencies
;
1999 r
.in
.dependencies_size
= dependencies_size
;
2000 r
.in
.service_start_name
= service_start_name
;
2001 r
.in
.password
= password
;
2002 r
.in
.password_size
= password_size
;
2004 status
= cli
->dispatch(cli
,
2007 NDR_SVCCTL_CREATESERVICEW
,
2010 if (!NT_STATUS_IS_OK(status
)) {
2014 if (NT_STATUS_IS_ERR(status
)) {
2018 /* Return variables */
2019 if (TagId
&& r
.out
.TagId
) {
2020 *TagId
= *r
.out
.TagId
;
2022 *handle
= *r
.out
.handle
;
2026 *werror
= r
.out
.result
;
2029 return werror_to_ntstatus(r
.out
.result
);
2032 struct rpccli_svcctl_EnumDependentServicesW_state
{
2033 struct svcctl_EnumDependentServicesW orig
;
2034 struct svcctl_EnumDependentServicesW tmp
;
2035 TALLOC_CTX
*out_mem_ctx
;
2036 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2039 static void rpccli_svcctl_EnumDependentServicesW_done(struct tevent_req
*subreq
);
2041 struct tevent_req
*rpccli_svcctl_EnumDependentServicesW_send(TALLOC_CTX
*mem_ctx
,
2042 struct tevent_context
*ev
,
2043 struct rpc_pipe_client
*cli
,
2044 struct policy_handle
*_service
/* [in] [ref] */,
2045 enum svcctl_ServiceState _state
/* [in] */,
2046 uint8_t *_service_status
/* [out] [ref,size_is(offered)] */,
2047 uint32_t _offered
/* [in] [range(0,0x40000)] */,
2048 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */,
2049 uint32_t *_services_returned
/* [out] [ref,range(0,0x40000)] */)
2051 struct tevent_req
*req
;
2052 struct rpccli_svcctl_EnumDependentServicesW_state
*state
;
2053 struct tevent_req
*subreq
;
2055 req
= tevent_req_create(mem_ctx
, &state
,
2056 struct rpccli_svcctl_EnumDependentServicesW_state
);
2060 state
->out_mem_ctx
= NULL
;
2061 state
->dispatch_recv
= cli
->dispatch_recv
;
2064 state
->orig
.in
.service
= _service
;
2065 state
->orig
.in
.state
= _state
;
2066 state
->orig
.in
.offered
= _offered
;
2068 /* Out parameters */
2069 state
->orig
.out
.service_status
= _service_status
;
2070 state
->orig
.out
.needed
= _needed
;
2071 state
->orig
.out
.services_returned
= _services_returned
;
2074 ZERO_STRUCT(state
->orig
.out
.result
);
2076 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2077 "rpccli_svcctl_EnumDependentServicesW_out_memory");
2078 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2079 return tevent_req_post(req
, ev
);
2082 /* make a temporary copy, that we pass to the dispatch function */
2083 state
->tmp
= state
->orig
;
2085 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2087 NDR_SVCCTL_ENUMDEPENDENTSERVICESW
,
2089 if (tevent_req_nomem(subreq
, req
)) {
2090 return tevent_req_post(req
, ev
);
2092 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumDependentServicesW_done
, req
);
2096 static void rpccli_svcctl_EnumDependentServicesW_done(struct tevent_req
*subreq
)
2098 struct tevent_req
*req
= tevent_req_callback_data(
2099 subreq
, struct tevent_req
);
2100 struct rpccli_svcctl_EnumDependentServicesW_state
*state
= tevent_req_data(
2101 req
, struct rpccli_svcctl_EnumDependentServicesW_state
);
2103 TALLOC_CTX
*mem_ctx
;
2105 if (state
->out_mem_ctx
) {
2106 mem_ctx
= state
->out_mem_ctx
;
2111 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2112 TALLOC_FREE(subreq
);
2113 if (!NT_STATUS_IS_OK(status
)) {
2114 tevent_req_nterror(req
, status
);
2118 /* Copy out parameters */
2119 memcpy(state
->orig
.out
.service_status
, state
->tmp
.out
.service_status
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.service_status
));
2120 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
2121 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
2124 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2126 /* Reset temporary structure */
2127 ZERO_STRUCT(state
->tmp
);
2129 tevent_req_done(req
);
2132 NTSTATUS
rpccli_svcctl_EnumDependentServicesW_recv(struct tevent_req
*req
,
2133 TALLOC_CTX
*mem_ctx
,
2136 struct rpccli_svcctl_EnumDependentServicesW_state
*state
= tevent_req_data(
2137 req
, struct rpccli_svcctl_EnumDependentServicesW_state
);
2140 if (tevent_req_is_nterror(req
, &status
)) {
2141 tevent_req_received(req
);
2145 /* Steal possbile out parameters to the callers context */
2146 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2149 *result
= state
->orig
.out
.result
;
2151 tevent_req_received(req
);
2152 return NT_STATUS_OK
;
2155 NTSTATUS
rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client
*cli
,
2156 TALLOC_CTX
*mem_ctx
,
2157 struct policy_handle
*service
/* [in] [ref] */,
2158 enum svcctl_ServiceState state
/* [in] */,
2159 uint8_t *service_status
/* [out] [ref,size_is(offered)] */,
2160 uint32_t offered
/* [in] [range(0,0x40000)] */,
2161 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
2162 uint32_t *services_returned
/* [out] [ref,range(0,0x40000)] */,
2165 struct svcctl_EnumDependentServicesW r
;
2169 r
.in
.service
= service
;
2171 r
.in
.offered
= offered
;
2173 status
= cli
->dispatch(cli
,
2176 NDR_SVCCTL_ENUMDEPENDENTSERVICESW
,
2179 if (!NT_STATUS_IS_OK(status
)) {
2183 if (NT_STATUS_IS_ERR(status
)) {
2187 /* Return variables */
2188 memcpy(service_status
, r
.out
.service_status
, (r
.in
.offered
) * sizeof(*service_status
));
2189 *needed
= *r
.out
.needed
;
2190 *services_returned
= *r
.out
.services_returned
;
2194 *werror
= r
.out
.result
;
2197 return werror_to_ntstatus(r
.out
.result
);
2200 struct rpccli_svcctl_EnumServicesStatusW_state
{
2201 struct svcctl_EnumServicesStatusW orig
;
2202 struct svcctl_EnumServicesStatusW tmp
;
2203 TALLOC_CTX
*out_mem_ctx
;
2204 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2207 static void rpccli_svcctl_EnumServicesStatusW_done(struct tevent_req
*subreq
);
2209 struct tevent_req
*rpccli_svcctl_EnumServicesStatusW_send(TALLOC_CTX
*mem_ctx
,
2210 struct tevent_context
*ev
,
2211 struct rpc_pipe_client
*cli
,
2212 struct policy_handle
*_handle
/* [in] [ref] */,
2213 uint32_t _type
/* [in] */,
2214 enum svcctl_ServiceState _state
/* [in] */,
2215 uint8_t *_service
/* [out] [ref,size_is(offered)] */,
2216 uint32_t _offered
/* [in] [range(0,0x40000)] */,
2217 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */,
2218 uint32_t *_services_returned
/* [out] [ref,range(0,0x40000)] */,
2219 uint32_t *_resume_handle
/* [in,out] [unique] */)
2221 struct tevent_req
*req
;
2222 struct rpccli_svcctl_EnumServicesStatusW_state
*state
;
2223 struct tevent_req
*subreq
;
2225 req
= tevent_req_create(mem_ctx
, &state
,
2226 struct rpccli_svcctl_EnumServicesStatusW_state
);
2230 state
->out_mem_ctx
= NULL
;
2231 state
->dispatch_recv
= cli
->dispatch_recv
;
2234 state
->orig
.in
.handle
= _handle
;
2235 state
->orig
.in
.type
= _type
;
2236 state
->orig
.in
.state
= _state
;
2237 state
->orig
.in
.offered
= _offered
;
2238 state
->orig
.in
.resume_handle
= _resume_handle
;
2240 /* Out parameters */
2241 state
->orig
.out
.service
= _service
;
2242 state
->orig
.out
.needed
= _needed
;
2243 state
->orig
.out
.services_returned
= _services_returned
;
2244 state
->orig
.out
.resume_handle
= _resume_handle
;
2247 ZERO_STRUCT(state
->orig
.out
.result
);
2249 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2250 "rpccli_svcctl_EnumServicesStatusW_out_memory");
2251 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2252 return tevent_req_post(req
, ev
);
2255 /* make a temporary copy, that we pass to the dispatch function */
2256 state
->tmp
= state
->orig
;
2258 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2260 NDR_SVCCTL_ENUMSERVICESSTATUSW
,
2262 if (tevent_req_nomem(subreq
, req
)) {
2263 return tevent_req_post(req
, ev
);
2265 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumServicesStatusW_done
, req
);
2269 static void rpccli_svcctl_EnumServicesStatusW_done(struct tevent_req
*subreq
)
2271 struct tevent_req
*req
= tevent_req_callback_data(
2272 subreq
, struct tevent_req
);
2273 struct rpccli_svcctl_EnumServicesStatusW_state
*state
= tevent_req_data(
2274 req
, struct rpccli_svcctl_EnumServicesStatusW_state
);
2276 TALLOC_CTX
*mem_ctx
;
2278 if (state
->out_mem_ctx
) {
2279 mem_ctx
= state
->out_mem_ctx
;
2284 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2285 TALLOC_FREE(subreq
);
2286 if (!NT_STATUS_IS_OK(status
)) {
2287 tevent_req_nterror(req
, status
);
2291 /* Copy out parameters */
2292 memcpy(state
->orig
.out
.service
, state
->tmp
.out
.service
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.service
));
2293 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
2294 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
2295 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
2296 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2300 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2302 /* Reset temporary structure */
2303 ZERO_STRUCT(state
->tmp
);
2305 tevent_req_done(req
);
2308 NTSTATUS
rpccli_svcctl_EnumServicesStatusW_recv(struct tevent_req
*req
,
2309 TALLOC_CTX
*mem_ctx
,
2312 struct rpccli_svcctl_EnumServicesStatusW_state
*state
= tevent_req_data(
2313 req
, struct rpccli_svcctl_EnumServicesStatusW_state
);
2316 if (tevent_req_is_nterror(req
, &status
)) {
2317 tevent_req_received(req
);
2321 /* Steal possbile out parameters to the callers context */
2322 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2325 *result
= state
->orig
.out
.result
;
2327 tevent_req_received(req
);
2328 return NT_STATUS_OK
;
2331 NTSTATUS
rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client
*cli
,
2332 TALLOC_CTX
*mem_ctx
,
2333 struct policy_handle
*handle
/* [in] [ref] */,
2334 uint32_t type
/* [in] */,
2335 enum svcctl_ServiceState state
/* [in] */,
2336 uint8_t *service
/* [out] [ref,size_is(offered)] */,
2337 uint32_t offered
/* [in] [range(0,0x40000)] */,
2338 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
2339 uint32_t *services_returned
/* [out] [ref,range(0,0x40000)] */,
2340 uint32_t *resume_handle
/* [in,out] [unique] */,
2343 struct svcctl_EnumServicesStatusW r
;
2347 r
.in
.handle
= handle
;
2350 r
.in
.offered
= offered
;
2351 r
.in
.resume_handle
= resume_handle
;
2353 status
= cli
->dispatch(cli
,
2356 NDR_SVCCTL_ENUMSERVICESSTATUSW
,
2359 if (!NT_STATUS_IS_OK(status
)) {
2363 if (NT_STATUS_IS_ERR(status
)) {
2367 /* Return variables */
2368 memcpy(service
, r
.out
.service
, (r
.in
.offered
) * sizeof(*service
));
2369 *needed
= *r
.out
.needed
;
2370 *services_returned
= *r
.out
.services_returned
;
2371 if (resume_handle
&& r
.out
.resume_handle
) {
2372 *resume_handle
= *r
.out
.resume_handle
;
2377 *werror
= r
.out
.result
;
2380 return werror_to_ntstatus(r
.out
.result
);
2383 struct rpccli_svcctl_OpenSCManagerW_state
{
2384 struct svcctl_OpenSCManagerW orig
;
2385 struct svcctl_OpenSCManagerW tmp
;
2386 TALLOC_CTX
*out_mem_ctx
;
2387 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2390 static void rpccli_svcctl_OpenSCManagerW_done(struct tevent_req
*subreq
);
2392 struct tevent_req
*rpccli_svcctl_OpenSCManagerW_send(TALLOC_CTX
*mem_ctx
,
2393 struct tevent_context
*ev
,
2394 struct rpc_pipe_client
*cli
,
2395 const char *_MachineName
/* [in] [unique,charset(UTF16)] */,
2396 const char *_DatabaseName
/* [in] [unique,charset(UTF16)] */,
2397 uint32_t _access_mask
/* [in] */,
2398 struct policy_handle
*_handle
/* [out] [ref] */)
2400 struct tevent_req
*req
;
2401 struct rpccli_svcctl_OpenSCManagerW_state
*state
;
2402 struct tevent_req
*subreq
;
2404 req
= tevent_req_create(mem_ctx
, &state
,
2405 struct rpccli_svcctl_OpenSCManagerW_state
);
2409 state
->out_mem_ctx
= NULL
;
2410 state
->dispatch_recv
= cli
->dispatch_recv
;
2413 state
->orig
.in
.MachineName
= _MachineName
;
2414 state
->orig
.in
.DatabaseName
= _DatabaseName
;
2415 state
->orig
.in
.access_mask
= _access_mask
;
2417 /* Out parameters */
2418 state
->orig
.out
.handle
= _handle
;
2421 ZERO_STRUCT(state
->orig
.out
.result
);
2423 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2424 "rpccli_svcctl_OpenSCManagerW_out_memory");
2425 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2426 return tevent_req_post(req
, ev
);
2429 /* make a temporary copy, that we pass to the dispatch function */
2430 state
->tmp
= state
->orig
;
2432 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2434 NDR_SVCCTL_OPENSCMANAGERW
,
2436 if (tevent_req_nomem(subreq
, req
)) {
2437 return tevent_req_post(req
, ev
);
2439 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenSCManagerW_done
, req
);
2443 static void rpccli_svcctl_OpenSCManagerW_done(struct tevent_req
*subreq
)
2445 struct tevent_req
*req
= tevent_req_callback_data(
2446 subreq
, struct tevent_req
);
2447 struct rpccli_svcctl_OpenSCManagerW_state
*state
= tevent_req_data(
2448 req
, struct rpccli_svcctl_OpenSCManagerW_state
);
2450 TALLOC_CTX
*mem_ctx
;
2452 if (state
->out_mem_ctx
) {
2453 mem_ctx
= state
->out_mem_ctx
;
2458 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2459 TALLOC_FREE(subreq
);
2460 if (!NT_STATUS_IS_OK(status
)) {
2461 tevent_req_nterror(req
, status
);
2465 /* Copy out parameters */
2466 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
2469 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2471 /* Reset temporary structure */
2472 ZERO_STRUCT(state
->tmp
);
2474 tevent_req_done(req
);
2477 NTSTATUS
rpccli_svcctl_OpenSCManagerW_recv(struct tevent_req
*req
,
2478 TALLOC_CTX
*mem_ctx
,
2481 struct rpccli_svcctl_OpenSCManagerW_state
*state
= tevent_req_data(
2482 req
, struct rpccli_svcctl_OpenSCManagerW_state
);
2485 if (tevent_req_is_nterror(req
, &status
)) {
2486 tevent_req_received(req
);
2490 /* Steal possbile out parameters to the callers context */
2491 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2494 *result
= state
->orig
.out
.result
;
2496 tevent_req_received(req
);
2497 return NT_STATUS_OK
;
2500 NTSTATUS
rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client
*cli
,
2501 TALLOC_CTX
*mem_ctx
,
2502 const char *MachineName
/* [in] [unique,charset(UTF16)] */,
2503 const char *DatabaseName
/* [in] [unique,charset(UTF16)] */,
2504 uint32_t access_mask
/* [in] */,
2505 struct policy_handle
*handle
/* [out] [ref] */,
2508 struct svcctl_OpenSCManagerW r
;
2512 r
.in
.MachineName
= MachineName
;
2513 r
.in
.DatabaseName
= DatabaseName
;
2514 r
.in
.access_mask
= access_mask
;
2516 status
= cli
->dispatch(cli
,
2519 NDR_SVCCTL_OPENSCMANAGERW
,
2522 if (!NT_STATUS_IS_OK(status
)) {
2526 if (NT_STATUS_IS_ERR(status
)) {
2530 /* Return variables */
2531 *handle
= *r
.out
.handle
;
2535 *werror
= r
.out
.result
;
2538 return werror_to_ntstatus(r
.out
.result
);
2541 struct rpccli_svcctl_OpenServiceW_state
{
2542 struct svcctl_OpenServiceW orig
;
2543 struct svcctl_OpenServiceW tmp
;
2544 TALLOC_CTX
*out_mem_ctx
;
2545 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2548 static void rpccli_svcctl_OpenServiceW_done(struct tevent_req
*subreq
);
2550 struct tevent_req
*rpccli_svcctl_OpenServiceW_send(TALLOC_CTX
*mem_ctx
,
2551 struct tevent_context
*ev
,
2552 struct rpc_pipe_client
*cli
,
2553 struct policy_handle
*_scmanager_handle
/* [in] [ref] */,
2554 const char *_ServiceName
/* [in] [charset(UTF16)] */,
2555 uint32_t _access_mask
/* [in] */,
2556 struct policy_handle
*_handle
/* [out] [ref] */)
2558 struct tevent_req
*req
;
2559 struct rpccli_svcctl_OpenServiceW_state
*state
;
2560 struct tevent_req
*subreq
;
2562 req
= tevent_req_create(mem_ctx
, &state
,
2563 struct rpccli_svcctl_OpenServiceW_state
);
2567 state
->out_mem_ctx
= NULL
;
2568 state
->dispatch_recv
= cli
->dispatch_recv
;
2571 state
->orig
.in
.scmanager_handle
= _scmanager_handle
;
2572 state
->orig
.in
.ServiceName
= _ServiceName
;
2573 state
->orig
.in
.access_mask
= _access_mask
;
2575 /* Out parameters */
2576 state
->orig
.out
.handle
= _handle
;
2579 ZERO_STRUCT(state
->orig
.out
.result
);
2581 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2582 "rpccli_svcctl_OpenServiceW_out_memory");
2583 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2584 return tevent_req_post(req
, ev
);
2587 /* make a temporary copy, that we pass to the dispatch function */
2588 state
->tmp
= state
->orig
;
2590 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2592 NDR_SVCCTL_OPENSERVICEW
,
2594 if (tevent_req_nomem(subreq
, req
)) {
2595 return tevent_req_post(req
, ev
);
2597 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenServiceW_done
, req
);
2601 static void rpccli_svcctl_OpenServiceW_done(struct tevent_req
*subreq
)
2603 struct tevent_req
*req
= tevent_req_callback_data(
2604 subreq
, struct tevent_req
);
2605 struct rpccli_svcctl_OpenServiceW_state
*state
= tevent_req_data(
2606 req
, struct rpccli_svcctl_OpenServiceW_state
);
2608 TALLOC_CTX
*mem_ctx
;
2610 if (state
->out_mem_ctx
) {
2611 mem_ctx
= state
->out_mem_ctx
;
2616 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2617 TALLOC_FREE(subreq
);
2618 if (!NT_STATUS_IS_OK(status
)) {
2619 tevent_req_nterror(req
, status
);
2623 /* Copy out parameters */
2624 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
2627 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2629 /* Reset temporary structure */
2630 ZERO_STRUCT(state
->tmp
);
2632 tevent_req_done(req
);
2635 NTSTATUS
rpccli_svcctl_OpenServiceW_recv(struct tevent_req
*req
,
2636 TALLOC_CTX
*mem_ctx
,
2639 struct rpccli_svcctl_OpenServiceW_state
*state
= tevent_req_data(
2640 req
, struct rpccli_svcctl_OpenServiceW_state
);
2643 if (tevent_req_is_nterror(req
, &status
)) {
2644 tevent_req_received(req
);
2648 /* Steal possbile out parameters to the callers context */
2649 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2652 *result
= state
->orig
.out
.result
;
2654 tevent_req_received(req
);
2655 return NT_STATUS_OK
;
2658 NTSTATUS
rpccli_svcctl_OpenServiceW(struct rpc_pipe_client
*cli
,
2659 TALLOC_CTX
*mem_ctx
,
2660 struct policy_handle
*scmanager_handle
/* [in] [ref] */,
2661 const char *ServiceName
/* [in] [charset(UTF16)] */,
2662 uint32_t access_mask
/* [in] */,
2663 struct policy_handle
*handle
/* [out] [ref] */,
2666 struct svcctl_OpenServiceW r
;
2670 r
.in
.scmanager_handle
= scmanager_handle
;
2671 r
.in
.ServiceName
= ServiceName
;
2672 r
.in
.access_mask
= access_mask
;
2674 status
= cli
->dispatch(cli
,
2677 NDR_SVCCTL_OPENSERVICEW
,
2680 if (!NT_STATUS_IS_OK(status
)) {
2684 if (NT_STATUS_IS_ERR(status
)) {
2688 /* Return variables */
2689 *handle
= *r
.out
.handle
;
2693 *werror
= r
.out
.result
;
2696 return werror_to_ntstatus(r
.out
.result
);
2699 struct rpccli_svcctl_QueryServiceConfigW_state
{
2700 struct svcctl_QueryServiceConfigW orig
;
2701 struct svcctl_QueryServiceConfigW tmp
;
2702 TALLOC_CTX
*out_mem_ctx
;
2703 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2706 static void rpccli_svcctl_QueryServiceConfigW_done(struct tevent_req
*subreq
);
2708 struct tevent_req
*rpccli_svcctl_QueryServiceConfigW_send(TALLOC_CTX
*mem_ctx
,
2709 struct tevent_context
*ev
,
2710 struct rpc_pipe_client
*cli
,
2711 struct policy_handle
*_handle
/* [in] [ref] */,
2712 struct QUERY_SERVICE_CONFIG
*_query
/* [out] [ref] */,
2713 uint32_t _offered
/* [in] [range(0,8192)] */,
2714 uint32_t *_needed
/* [out] [ref,range(0,8192)] */)
2716 struct tevent_req
*req
;
2717 struct rpccli_svcctl_QueryServiceConfigW_state
*state
;
2718 struct tevent_req
*subreq
;
2720 req
= tevent_req_create(mem_ctx
, &state
,
2721 struct rpccli_svcctl_QueryServiceConfigW_state
);
2725 state
->out_mem_ctx
= NULL
;
2726 state
->dispatch_recv
= cli
->dispatch_recv
;
2729 state
->orig
.in
.handle
= _handle
;
2730 state
->orig
.in
.offered
= _offered
;
2732 /* Out parameters */
2733 state
->orig
.out
.query
= _query
;
2734 state
->orig
.out
.needed
= _needed
;
2737 ZERO_STRUCT(state
->orig
.out
.result
);
2739 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2740 "rpccli_svcctl_QueryServiceConfigW_out_memory");
2741 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2742 return tevent_req_post(req
, ev
);
2745 /* make a temporary copy, that we pass to the dispatch function */
2746 state
->tmp
= state
->orig
;
2748 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2750 NDR_SVCCTL_QUERYSERVICECONFIGW
,
2752 if (tevent_req_nomem(subreq
, req
)) {
2753 return tevent_req_post(req
, ev
);
2755 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfigW_done
, req
);
2759 static void rpccli_svcctl_QueryServiceConfigW_done(struct tevent_req
*subreq
)
2761 struct tevent_req
*req
= tevent_req_callback_data(
2762 subreq
, struct tevent_req
);
2763 struct rpccli_svcctl_QueryServiceConfigW_state
*state
= tevent_req_data(
2764 req
, struct rpccli_svcctl_QueryServiceConfigW_state
);
2766 TALLOC_CTX
*mem_ctx
;
2768 if (state
->out_mem_ctx
) {
2769 mem_ctx
= state
->out_mem_ctx
;
2774 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2775 TALLOC_FREE(subreq
);
2776 if (!NT_STATUS_IS_OK(status
)) {
2777 tevent_req_nterror(req
, status
);
2781 /* Copy out parameters */
2782 *state
->orig
.out
.query
= *state
->tmp
.out
.query
;
2783 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
2786 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2788 /* Reset temporary structure */
2789 ZERO_STRUCT(state
->tmp
);
2791 tevent_req_done(req
);
2794 NTSTATUS
rpccli_svcctl_QueryServiceConfigW_recv(struct tevent_req
*req
,
2795 TALLOC_CTX
*mem_ctx
,
2798 struct rpccli_svcctl_QueryServiceConfigW_state
*state
= tevent_req_data(
2799 req
, struct rpccli_svcctl_QueryServiceConfigW_state
);
2802 if (tevent_req_is_nterror(req
, &status
)) {
2803 tevent_req_received(req
);
2807 /* Steal possbile out parameters to the callers context */
2808 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2811 *result
= state
->orig
.out
.result
;
2813 tevent_req_received(req
);
2814 return NT_STATUS_OK
;
2817 NTSTATUS
rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client
*cli
,
2818 TALLOC_CTX
*mem_ctx
,
2819 struct policy_handle
*handle
/* [in] [ref] */,
2820 struct QUERY_SERVICE_CONFIG
*query
/* [out] [ref] */,
2821 uint32_t offered
/* [in] [range(0,8192)] */,
2822 uint32_t *needed
/* [out] [ref,range(0,8192)] */,
2825 struct svcctl_QueryServiceConfigW r
;
2829 r
.in
.handle
= handle
;
2830 r
.in
.offered
= offered
;
2832 status
= cli
->dispatch(cli
,
2835 NDR_SVCCTL_QUERYSERVICECONFIGW
,
2838 if (!NT_STATUS_IS_OK(status
)) {
2842 if (NT_STATUS_IS_ERR(status
)) {
2846 /* Return variables */
2847 *query
= *r
.out
.query
;
2848 *needed
= *r
.out
.needed
;
2852 *werror
= r
.out
.result
;
2855 return werror_to_ntstatus(r
.out
.result
);
2858 struct rpccli_svcctl_QueryServiceLockStatusW_state
{
2859 struct svcctl_QueryServiceLockStatusW orig
;
2860 struct svcctl_QueryServiceLockStatusW tmp
;
2861 TALLOC_CTX
*out_mem_ctx
;
2862 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2865 static void rpccli_svcctl_QueryServiceLockStatusW_done(struct tevent_req
*subreq
);
2867 struct tevent_req
*rpccli_svcctl_QueryServiceLockStatusW_send(TALLOC_CTX
*mem_ctx
,
2868 struct tevent_context
*ev
,
2869 struct rpc_pipe_client
*cli
,
2870 struct policy_handle
*_handle
/* [in] [ref] */,
2871 uint32_t _offered
/* [in] */,
2872 struct SERVICE_LOCK_STATUS
*_lock_status
/* [out] [ref] */,
2873 uint32_t *_needed
/* [out] [ref] */)
2875 struct tevent_req
*req
;
2876 struct rpccli_svcctl_QueryServiceLockStatusW_state
*state
;
2877 struct tevent_req
*subreq
;
2879 req
= tevent_req_create(mem_ctx
, &state
,
2880 struct rpccli_svcctl_QueryServiceLockStatusW_state
);
2884 state
->out_mem_ctx
= NULL
;
2885 state
->dispatch_recv
= cli
->dispatch_recv
;
2888 state
->orig
.in
.handle
= _handle
;
2889 state
->orig
.in
.offered
= _offered
;
2891 /* Out parameters */
2892 state
->orig
.out
.lock_status
= _lock_status
;
2893 state
->orig
.out
.needed
= _needed
;
2896 ZERO_STRUCT(state
->orig
.out
.result
);
2898 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2899 "rpccli_svcctl_QueryServiceLockStatusW_out_memory");
2900 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2901 return tevent_req_post(req
, ev
);
2904 /* make a temporary copy, that we pass to the dispatch function */
2905 state
->tmp
= state
->orig
;
2907 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2909 NDR_SVCCTL_QUERYSERVICELOCKSTATUSW
,
2911 if (tevent_req_nomem(subreq
, req
)) {
2912 return tevent_req_post(req
, ev
);
2914 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceLockStatusW_done
, req
);
2918 static void rpccli_svcctl_QueryServiceLockStatusW_done(struct tevent_req
*subreq
)
2920 struct tevent_req
*req
= tevent_req_callback_data(
2921 subreq
, struct tevent_req
);
2922 struct rpccli_svcctl_QueryServiceLockStatusW_state
*state
= tevent_req_data(
2923 req
, struct rpccli_svcctl_QueryServiceLockStatusW_state
);
2925 TALLOC_CTX
*mem_ctx
;
2927 if (state
->out_mem_ctx
) {
2928 mem_ctx
= state
->out_mem_ctx
;
2933 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2934 TALLOC_FREE(subreq
);
2935 if (!NT_STATUS_IS_OK(status
)) {
2936 tevent_req_nterror(req
, status
);
2940 /* Copy out parameters */
2941 *state
->orig
.out
.lock_status
= *state
->tmp
.out
.lock_status
;
2942 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
2945 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2947 /* Reset temporary structure */
2948 ZERO_STRUCT(state
->tmp
);
2950 tevent_req_done(req
);
2953 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusW_recv(struct tevent_req
*req
,
2954 TALLOC_CTX
*mem_ctx
,
2957 struct rpccli_svcctl_QueryServiceLockStatusW_state
*state
= tevent_req_data(
2958 req
, struct rpccli_svcctl_QueryServiceLockStatusW_state
);
2961 if (tevent_req_is_nterror(req
, &status
)) {
2962 tevent_req_received(req
);
2966 /* Steal possbile out parameters to the callers context */
2967 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2970 *result
= state
->orig
.out
.result
;
2972 tevent_req_received(req
);
2973 return NT_STATUS_OK
;
2976 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client
*cli
,
2977 TALLOC_CTX
*mem_ctx
,
2978 struct policy_handle
*handle
/* [in] [ref] */,
2979 uint32_t offered
/* [in] */,
2980 struct SERVICE_LOCK_STATUS
*lock_status
/* [out] [ref] */,
2981 uint32_t *needed
/* [out] [ref] */,
2984 struct svcctl_QueryServiceLockStatusW r
;
2988 r
.in
.handle
= handle
;
2989 r
.in
.offered
= offered
;
2991 status
= cli
->dispatch(cli
,
2994 NDR_SVCCTL_QUERYSERVICELOCKSTATUSW
,
2997 if (!NT_STATUS_IS_OK(status
)) {
3001 if (NT_STATUS_IS_ERR(status
)) {
3005 /* Return variables */
3006 *lock_status
= *r
.out
.lock_status
;
3007 *needed
= *r
.out
.needed
;
3011 *werror
= r
.out
.result
;
3014 return werror_to_ntstatus(r
.out
.result
);
3017 struct rpccli_svcctl_StartServiceW_state
{
3018 struct svcctl_StartServiceW orig
;
3019 struct svcctl_StartServiceW tmp
;
3020 TALLOC_CTX
*out_mem_ctx
;
3021 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3024 static void rpccli_svcctl_StartServiceW_done(struct tevent_req
*subreq
);
3026 struct tevent_req
*rpccli_svcctl_StartServiceW_send(TALLOC_CTX
*mem_ctx
,
3027 struct tevent_context
*ev
,
3028 struct rpc_pipe_client
*cli
,
3029 struct policy_handle
*_handle
/* [in] [ref] */,
3030 uint32_t _NumArgs
/* [in] [range(0,SC_MAX_ARGUMENTS)] */,
3031 struct svcctl_ArgumentString
*_Arguments
/* [in] [unique,size_is(NumArgs)] */)
3033 struct tevent_req
*req
;
3034 struct rpccli_svcctl_StartServiceW_state
*state
;
3035 struct tevent_req
*subreq
;
3037 req
= tevent_req_create(mem_ctx
, &state
,
3038 struct rpccli_svcctl_StartServiceW_state
);
3042 state
->out_mem_ctx
= NULL
;
3043 state
->dispatch_recv
= cli
->dispatch_recv
;
3046 state
->orig
.in
.handle
= _handle
;
3047 state
->orig
.in
.NumArgs
= _NumArgs
;
3048 state
->orig
.in
.Arguments
= _Arguments
;
3050 /* Out parameters */
3053 ZERO_STRUCT(state
->orig
.out
.result
);
3055 /* make a temporary copy, that we pass to the dispatch function */
3056 state
->tmp
= state
->orig
;
3058 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3060 NDR_SVCCTL_STARTSERVICEW
,
3062 if (tevent_req_nomem(subreq
, req
)) {
3063 return tevent_req_post(req
, ev
);
3065 tevent_req_set_callback(subreq
, rpccli_svcctl_StartServiceW_done
, req
);
3069 static void rpccli_svcctl_StartServiceW_done(struct tevent_req
*subreq
)
3071 struct tevent_req
*req
= tevent_req_callback_data(
3072 subreq
, struct tevent_req
);
3073 struct rpccli_svcctl_StartServiceW_state
*state
= tevent_req_data(
3074 req
, struct rpccli_svcctl_StartServiceW_state
);
3076 TALLOC_CTX
*mem_ctx
;
3078 if (state
->out_mem_ctx
) {
3079 mem_ctx
= state
->out_mem_ctx
;
3084 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3085 TALLOC_FREE(subreq
);
3086 if (!NT_STATUS_IS_OK(status
)) {
3087 tevent_req_nterror(req
, status
);
3091 /* Copy out parameters */
3094 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3096 /* Reset temporary structure */
3097 ZERO_STRUCT(state
->tmp
);
3099 tevent_req_done(req
);
3102 NTSTATUS
rpccli_svcctl_StartServiceW_recv(struct tevent_req
*req
,
3103 TALLOC_CTX
*mem_ctx
,
3106 struct rpccli_svcctl_StartServiceW_state
*state
= tevent_req_data(
3107 req
, struct rpccli_svcctl_StartServiceW_state
);
3110 if (tevent_req_is_nterror(req
, &status
)) {
3111 tevent_req_received(req
);
3115 /* Steal possbile out parameters to the callers context */
3116 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3119 *result
= state
->orig
.out
.result
;
3121 tevent_req_received(req
);
3122 return NT_STATUS_OK
;
3125 NTSTATUS
rpccli_svcctl_StartServiceW(struct rpc_pipe_client
*cli
,
3126 TALLOC_CTX
*mem_ctx
,
3127 struct policy_handle
*handle
/* [in] [ref] */,
3128 uint32_t NumArgs
/* [in] [range(0,SC_MAX_ARGUMENTS)] */,
3129 struct svcctl_ArgumentString
*Arguments
/* [in] [unique,size_is(NumArgs)] */,
3132 struct svcctl_StartServiceW r
;
3136 r
.in
.handle
= handle
;
3137 r
.in
.NumArgs
= NumArgs
;
3138 r
.in
.Arguments
= Arguments
;
3140 status
= cli
->dispatch(cli
,
3143 NDR_SVCCTL_STARTSERVICEW
,
3146 if (!NT_STATUS_IS_OK(status
)) {
3150 if (NT_STATUS_IS_ERR(status
)) {
3154 /* Return variables */
3158 *werror
= r
.out
.result
;
3161 return werror_to_ntstatus(r
.out
.result
);
3164 struct rpccli_svcctl_GetServiceDisplayNameW_state
{
3165 struct svcctl_GetServiceDisplayNameW orig
;
3166 struct svcctl_GetServiceDisplayNameW tmp
;
3167 TALLOC_CTX
*out_mem_ctx
;
3168 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3171 static void rpccli_svcctl_GetServiceDisplayNameW_done(struct tevent_req
*subreq
);
3173 struct tevent_req
*rpccli_svcctl_GetServiceDisplayNameW_send(TALLOC_CTX
*mem_ctx
,
3174 struct tevent_context
*ev
,
3175 struct rpc_pipe_client
*cli
,
3176 struct policy_handle
*_handle
/* [in] [ref] */,
3177 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
3178 const char **_display_name
/* [out] [ref,charset(UTF16)] */,
3179 uint32_t *_display_name_length
/* [in,out] [unique] */)
3181 struct tevent_req
*req
;
3182 struct rpccli_svcctl_GetServiceDisplayNameW_state
*state
;
3183 struct tevent_req
*subreq
;
3185 req
= tevent_req_create(mem_ctx
, &state
,
3186 struct rpccli_svcctl_GetServiceDisplayNameW_state
);
3190 state
->out_mem_ctx
= NULL
;
3191 state
->dispatch_recv
= cli
->dispatch_recv
;
3194 state
->orig
.in
.handle
= _handle
;
3195 state
->orig
.in
.service_name
= _service_name
;
3196 state
->orig
.in
.display_name_length
= _display_name_length
;
3198 /* Out parameters */
3199 state
->orig
.out
.display_name
= _display_name
;
3200 state
->orig
.out
.display_name_length
= _display_name_length
;
3203 ZERO_STRUCT(state
->orig
.out
.result
);
3205 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3206 "rpccli_svcctl_GetServiceDisplayNameW_out_memory");
3207 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3208 return tevent_req_post(req
, ev
);
3211 /* make a temporary copy, that we pass to the dispatch function */
3212 state
->tmp
= state
->orig
;
3214 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3216 NDR_SVCCTL_GETSERVICEDISPLAYNAMEW
,
3218 if (tevent_req_nomem(subreq
, req
)) {
3219 return tevent_req_post(req
, ev
);
3221 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceDisplayNameW_done
, req
);
3225 static void rpccli_svcctl_GetServiceDisplayNameW_done(struct tevent_req
*subreq
)
3227 struct tevent_req
*req
= tevent_req_callback_data(
3228 subreq
, struct tevent_req
);
3229 struct rpccli_svcctl_GetServiceDisplayNameW_state
*state
= tevent_req_data(
3230 req
, struct rpccli_svcctl_GetServiceDisplayNameW_state
);
3232 TALLOC_CTX
*mem_ctx
;
3234 if (state
->out_mem_ctx
) {
3235 mem_ctx
= state
->out_mem_ctx
;
3240 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3241 TALLOC_FREE(subreq
);
3242 if (!NT_STATUS_IS_OK(status
)) {
3243 tevent_req_nterror(req
, status
);
3247 /* Copy out parameters */
3248 *state
->orig
.out
.display_name
= *state
->tmp
.out
.display_name
;
3249 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
3250 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
3254 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3256 /* Reset temporary structure */
3257 ZERO_STRUCT(state
->tmp
);
3259 tevent_req_done(req
);
3262 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameW_recv(struct tevent_req
*req
,
3263 TALLOC_CTX
*mem_ctx
,
3266 struct rpccli_svcctl_GetServiceDisplayNameW_state
*state
= tevent_req_data(
3267 req
, struct rpccli_svcctl_GetServiceDisplayNameW_state
);
3270 if (tevent_req_is_nterror(req
, &status
)) {
3271 tevent_req_received(req
);
3275 /* Steal possbile out parameters to the callers context */
3276 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3279 *result
= state
->orig
.out
.result
;
3281 tevent_req_received(req
);
3282 return NT_STATUS_OK
;
3285 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client
*cli
,
3286 TALLOC_CTX
*mem_ctx
,
3287 struct policy_handle
*handle
/* [in] [ref] */,
3288 const char *service_name
/* [in] [unique,charset(UTF16)] */,
3289 const char **display_name
/* [out] [ref,charset(UTF16)] */,
3290 uint32_t *display_name_length
/* [in,out] [unique] */,
3293 struct svcctl_GetServiceDisplayNameW r
;
3297 r
.in
.handle
= handle
;
3298 r
.in
.service_name
= service_name
;
3299 r
.in
.display_name_length
= display_name_length
;
3301 status
= cli
->dispatch(cli
,
3304 NDR_SVCCTL_GETSERVICEDISPLAYNAMEW
,
3307 if (!NT_STATUS_IS_OK(status
)) {
3311 if (NT_STATUS_IS_ERR(status
)) {
3315 /* Return variables */
3316 *display_name
= *r
.out
.display_name
;
3317 if (display_name_length
&& r
.out
.display_name_length
) {
3318 *display_name_length
= *r
.out
.display_name_length
;
3323 *werror
= r
.out
.result
;
3326 return werror_to_ntstatus(r
.out
.result
);
3329 struct rpccli_svcctl_GetServiceKeyNameW_state
{
3330 struct svcctl_GetServiceKeyNameW orig
;
3331 struct svcctl_GetServiceKeyNameW tmp
;
3332 TALLOC_CTX
*out_mem_ctx
;
3333 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3336 static void rpccli_svcctl_GetServiceKeyNameW_done(struct tevent_req
*subreq
);
3338 struct tevent_req
*rpccli_svcctl_GetServiceKeyNameW_send(TALLOC_CTX
*mem_ctx
,
3339 struct tevent_context
*ev
,
3340 struct rpc_pipe_client
*cli
,
3341 struct policy_handle
*_handle
/* [in] [ref] */,
3342 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
3343 const char **_key_name
/* [out] [ref,charset(UTF16)] */,
3344 uint32_t *_display_name_length
/* [in,out] [unique] */)
3346 struct tevent_req
*req
;
3347 struct rpccli_svcctl_GetServiceKeyNameW_state
*state
;
3348 struct tevent_req
*subreq
;
3350 req
= tevent_req_create(mem_ctx
, &state
,
3351 struct rpccli_svcctl_GetServiceKeyNameW_state
);
3355 state
->out_mem_ctx
= NULL
;
3356 state
->dispatch_recv
= cli
->dispatch_recv
;
3359 state
->orig
.in
.handle
= _handle
;
3360 state
->orig
.in
.service_name
= _service_name
;
3361 state
->orig
.in
.display_name_length
= _display_name_length
;
3363 /* Out parameters */
3364 state
->orig
.out
.key_name
= _key_name
;
3365 state
->orig
.out
.display_name_length
= _display_name_length
;
3368 ZERO_STRUCT(state
->orig
.out
.result
);
3370 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3371 "rpccli_svcctl_GetServiceKeyNameW_out_memory");
3372 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3373 return tevent_req_post(req
, ev
);
3376 /* make a temporary copy, that we pass to the dispatch function */
3377 state
->tmp
= state
->orig
;
3379 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3381 NDR_SVCCTL_GETSERVICEKEYNAMEW
,
3383 if (tevent_req_nomem(subreq
, req
)) {
3384 return tevent_req_post(req
, ev
);
3386 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceKeyNameW_done
, req
);
3390 static void rpccli_svcctl_GetServiceKeyNameW_done(struct tevent_req
*subreq
)
3392 struct tevent_req
*req
= tevent_req_callback_data(
3393 subreq
, struct tevent_req
);
3394 struct rpccli_svcctl_GetServiceKeyNameW_state
*state
= tevent_req_data(
3395 req
, struct rpccli_svcctl_GetServiceKeyNameW_state
);
3397 TALLOC_CTX
*mem_ctx
;
3399 if (state
->out_mem_ctx
) {
3400 mem_ctx
= state
->out_mem_ctx
;
3405 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3406 TALLOC_FREE(subreq
);
3407 if (!NT_STATUS_IS_OK(status
)) {
3408 tevent_req_nterror(req
, status
);
3412 /* Copy out parameters */
3413 *state
->orig
.out
.key_name
= *state
->tmp
.out
.key_name
;
3414 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
3415 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
3419 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3421 /* Reset temporary structure */
3422 ZERO_STRUCT(state
->tmp
);
3424 tevent_req_done(req
);
3427 NTSTATUS
rpccli_svcctl_GetServiceKeyNameW_recv(struct tevent_req
*req
,
3428 TALLOC_CTX
*mem_ctx
,
3431 struct rpccli_svcctl_GetServiceKeyNameW_state
*state
= tevent_req_data(
3432 req
, struct rpccli_svcctl_GetServiceKeyNameW_state
);
3435 if (tevent_req_is_nterror(req
, &status
)) {
3436 tevent_req_received(req
);
3440 /* Steal possbile out parameters to the callers context */
3441 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3444 *result
= state
->orig
.out
.result
;
3446 tevent_req_received(req
);
3447 return NT_STATUS_OK
;
3450 NTSTATUS
rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client
*cli
,
3451 TALLOC_CTX
*mem_ctx
,
3452 struct policy_handle
*handle
/* [in] [ref] */,
3453 const char *service_name
/* [in] [unique,charset(UTF16)] */,
3454 const char **key_name
/* [out] [ref,charset(UTF16)] */,
3455 uint32_t *display_name_length
/* [in,out] [unique] */,
3458 struct svcctl_GetServiceKeyNameW r
;
3462 r
.in
.handle
= handle
;
3463 r
.in
.service_name
= service_name
;
3464 r
.in
.display_name_length
= display_name_length
;
3466 status
= cli
->dispatch(cli
,
3469 NDR_SVCCTL_GETSERVICEKEYNAMEW
,
3472 if (!NT_STATUS_IS_OK(status
)) {
3476 if (NT_STATUS_IS_ERR(status
)) {
3480 /* Return variables */
3481 *key_name
= *r
.out
.key_name
;
3482 if (display_name_length
&& r
.out
.display_name_length
) {
3483 *display_name_length
= *r
.out
.display_name_length
;
3488 *werror
= r
.out
.result
;
3491 return werror_to_ntstatus(r
.out
.result
);
3494 struct rpccli_svcctl_SCSetServiceBitsA_state
{
3495 struct svcctl_SCSetServiceBitsA orig
;
3496 struct svcctl_SCSetServiceBitsA tmp
;
3497 TALLOC_CTX
*out_mem_ctx
;
3498 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3501 static void rpccli_svcctl_SCSetServiceBitsA_done(struct tevent_req
*subreq
);
3503 struct tevent_req
*rpccli_svcctl_SCSetServiceBitsA_send(TALLOC_CTX
*mem_ctx
,
3504 struct tevent_context
*ev
,
3505 struct rpc_pipe_client
*cli
,
3506 struct policy_handle
*_handle
/* [in] [ref] */,
3507 uint32_t _bits
/* [in] */,
3508 uint32_t _bitson
/* [in] */,
3509 uint32_t _immediate
/* [in] */)
3511 struct tevent_req
*req
;
3512 struct rpccli_svcctl_SCSetServiceBitsA_state
*state
;
3513 struct tevent_req
*subreq
;
3515 req
= tevent_req_create(mem_ctx
, &state
,
3516 struct rpccli_svcctl_SCSetServiceBitsA_state
);
3520 state
->out_mem_ctx
= NULL
;
3521 state
->dispatch_recv
= cli
->dispatch_recv
;
3524 state
->orig
.in
.handle
= _handle
;
3525 state
->orig
.in
.bits
= _bits
;
3526 state
->orig
.in
.bitson
= _bitson
;
3527 state
->orig
.in
.immediate
= _immediate
;
3529 /* Out parameters */
3532 ZERO_STRUCT(state
->orig
.out
.result
);
3534 /* make a temporary copy, that we pass to the dispatch function */
3535 state
->tmp
= state
->orig
;
3537 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3539 NDR_SVCCTL_SCSETSERVICEBITSA
,
3541 if (tevent_req_nomem(subreq
, req
)) {
3542 return tevent_req_post(req
, ev
);
3544 tevent_req_set_callback(subreq
, rpccli_svcctl_SCSetServiceBitsA_done
, req
);
3548 static void rpccli_svcctl_SCSetServiceBitsA_done(struct tevent_req
*subreq
)
3550 struct tevent_req
*req
= tevent_req_callback_data(
3551 subreq
, struct tevent_req
);
3552 struct rpccli_svcctl_SCSetServiceBitsA_state
*state
= tevent_req_data(
3553 req
, struct rpccli_svcctl_SCSetServiceBitsA_state
);
3555 TALLOC_CTX
*mem_ctx
;
3557 if (state
->out_mem_ctx
) {
3558 mem_ctx
= state
->out_mem_ctx
;
3563 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3564 TALLOC_FREE(subreq
);
3565 if (!NT_STATUS_IS_OK(status
)) {
3566 tevent_req_nterror(req
, status
);
3570 /* Copy out parameters */
3573 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3575 /* Reset temporary structure */
3576 ZERO_STRUCT(state
->tmp
);
3578 tevent_req_done(req
);
3581 NTSTATUS
rpccli_svcctl_SCSetServiceBitsA_recv(struct tevent_req
*req
,
3582 TALLOC_CTX
*mem_ctx
,
3585 struct rpccli_svcctl_SCSetServiceBitsA_state
*state
= tevent_req_data(
3586 req
, struct rpccli_svcctl_SCSetServiceBitsA_state
);
3589 if (tevent_req_is_nterror(req
, &status
)) {
3590 tevent_req_received(req
);
3594 /* Steal possbile out parameters to the callers context */
3595 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3598 *result
= state
->orig
.out
.result
;
3600 tevent_req_received(req
);
3601 return NT_STATUS_OK
;
3604 NTSTATUS
rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client
*cli
,
3605 TALLOC_CTX
*mem_ctx
,
3606 struct policy_handle
*handle
/* [in] [ref] */,
3607 uint32_t bits
/* [in] */,
3608 uint32_t bitson
/* [in] */,
3609 uint32_t immediate
/* [in] */,
3612 struct svcctl_SCSetServiceBitsA r
;
3616 r
.in
.handle
= handle
;
3618 r
.in
.bitson
= bitson
;
3619 r
.in
.immediate
= immediate
;
3621 status
= cli
->dispatch(cli
,
3624 NDR_SVCCTL_SCSETSERVICEBITSA
,
3627 if (!NT_STATUS_IS_OK(status
)) {
3631 if (NT_STATUS_IS_ERR(status
)) {
3635 /* Return variables */
3639 *werror
= r
.out
.result
;
3642 return werror_to_ntstatus(r
.out
.result
);
3645 struct rpccli_svcctl_ChangeServiceConfigA_state
{
3646 struct svcctl_ChangeServiceConfigA orig
;
3647 struct svcctl_ChangeServiceConfigA tmp
;
3648 TALLOC_CTX
*out_mem_ctx
;
3649 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3652 static void rpccli_svcctl_ChangeServiceConfigA_done(struct tevent_req
*subreq
);
3654 struct tevent_req
*rpccli_svcctl_ChangeServiceConfigA_send(TALLOC_CTX
*mem_ctx
,
3655 struct tevent_context
*ev
,
3656 struct rpc_pipe_client
*cli
,
3657 struct policy_handle
*_handle
/* [in] [ref] */,
3658 uint32_t _type
/* [in] */,
3659 enum svcctl_StartType _start_type
/* [in] */,
3660 enum svcctl_ErrorControl _error_control
/* [in] */,
3661 const char *_binary_path
/* [in] [unique,charset(UTF16)] */,
3662 const char *_load_order_group
/* [in] [unique,charset(UTF16)] */,
3663 uint32_t *_tag_id
/* [out] [ref] */,
3664 const char *_dependencies
/* [in] [unique,charset(UTF16)] */,
3665 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
3666 const char *_password
/* [in] [unique,charset(UTF16)] */,
3667 const char *_display_name
/* [in] [unique,charset(UTF16)] */)
3669 struct tevent_req
*req
;
3670 struct rpccli_svcctl_ChangeServiceConfigA_state
*state
;
3671 struct tevent_req
*subreq
;
3673 req
= tevent_req_create(mem_ctx
, &state
,
3674 struct rpccli_svcctl_ChangeServiceConfigA_state
);
3678 state
->out_mem_ctx
= NULL
;
3679 state
->dispatch_recv
= cli
->dispatch_recv
;
3682 state
->orig
.in
.handle
= _handle
;
3683 state
->orig
.in
.type
= _type
;
3684 state
->orig
.in
.start_type
= _start_type
;
3685 state
->orig
.in
.error_control
= _error_control
;
3686 state
->orig
.in
.binary_path
= _binary_path
;
3687 state
->orig
.in
.load_order_group
= _load_order_group
;
3688 state
->orig
.in
.dependencies
= _dependencies
;
3689 state
->orig
.in
.service_start_name
= _service_start_name
;
3690 state
->orig
.in
.password
= _password
;
3691 state
->orig
.in
.display_name
= _display_name
;
3693 /* Out parameters */
3694 state
->orig
.out
.tag_id
= _tag_id
;
3697 ZERO_STRUCT(state
->orig
.out
.result
);
3699 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3700 "rpccli_svcctl_ChangeServiceConfigA_out_memory");
3701 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3702 return tevent_req_post(req
, ev
);
3705 /* make a temporary copy, that we pass to the dispatch function */
3706 state
->tmp
= state
->orig
;
3708 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3710 NDR_SVCCTL_CHANGESERVICECONFIGA
,
3712 if (tevent_req_nomem(subreq
, req
)) {
3713 return tevent_req_post(req
, ev
);
3715 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfigA_done
, req
);
3719 static void rpccli_svcctl_ChangeServiceConfigA_done(struct tevent_req
*subreq
)
3721 struct tevent_req
*req
= tevent_req_callback_data(
3722 subreq
, struct tevent_req
);
3723 struct rpccli_svcctl_ChangeServiceConfigA_state
*state
= tevent_req_data(
3724 req
, struct rpccli_svcctl_ChangeServiceConfigA_state
);
3726 TALLOC_CTX
*mem_ctx
;
3728 if (state
->out_mem_ctx
) {
3729 mem_ctx
= state
->out_mem_ctx
;
3734 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3735 TALLOC_FREE(subreq
);
3736 if (!NT_STATUS_IS_OK(status
)) {
3737 tevent_req_nterror(req
, status
);
3741 /* Copy out parameters */
3742 *state
->orig
.out
.tag_id
= *state
->tmp
.out
.tag_id
;
3745 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3747 /* Reset temporary structure */
3748 ZERO_STRUCT(state
->tmp
);
3750 tevent_req_done(req
);
3753 NTSTATUS
rpccli_svcctl_ChangeServiceConfigA_recv(struct tevent_req
*req
,
3754 TALLOC_CTX
*mem_ctx
,
3757 struct rpccli_svcctl_ChangeServiceConfigA_state
*state
= tevent_req_data(
3758 req
, struct rpccli_svcctl_ChangeServiceConfigA_state
);
3761 if (tevent_req_is_nterror(req
, &status
)) {
3762 tevent_req_received(req
);
3766 /* Steal possbile out parameters to the callers context */
3767 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3770 *result
= state
->orig
.out
.result
;
3772 tevent_req_received(req
);
3773 return NT_STATUS_OK
;
3776 NTSTATUS
rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client
*cli
,
3777 TALLOC_CTX
*mem_ctx
,
3778 struct policy_handle
*handle
/* [in] [ref] */,
3779 uint32_t type
/* [in] */,
3780 enum svcctl_StartType start_type
/* [in] */,
3781 enum svcctl_ErrorControl error_control
/* [in] */,
3782 const char *binary_path
/* [in] [unique,charset(UTF16)] */,
3783 const char *load_order_group
/* [in] [unique,charset(UTF16)] */,
3784 uint32_t *tag_id
/* [out] [ref] */,
3785 const char *dependencies
/* [in] [unique,charset(UTF16)] */,
3786 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
3787 const char *password
/* [in] [unique,charset(UTF16)] */,
3788 const char *display_name
/* [in] [unique,charset(UTF16)] */,
3791 struct svcctl_ChangeServiceConfigA r
;
3795 r
.in
.handle
= handle
;
3797 r
.in
.start_type
= start_type
;
3798 r
.in
.error_control
= error_control
;
3799 r
.in
.binary_path
= binary_path
;
3800 r
.in
.load_order_group
= load_order_group
;
3801 r
.in
.dependencies
= dependencies
;
3802 r
.in
.service_start_name
= service_start_name
;
3803 r
.in
.password
= password
;
3804 r
.in
.display_name
= display_name
;
3806 status
= cli
->dispatch(cli
,
3809 NDR_SVCCTL_CHANGESERVICECONFIGA
,
3812 if (!NT_STATUS_IS_OK(status
)) {
3816 if (NT_STATUS_IS_ERR(status
)) {
3820 /* Return variables */
3821 *tag_id
= *r
.out
.tag_id
;
3825 *werror
= r
.out
.result
;
3828 return werror_to_ntstatus(r
.out
.result
);
3831 struct rpccli_svcctl_CreateServiceA_state
{
3832 struct svcctl_CreateServiceA orig
;
3833 struct svcctl_CreateServiceA tmp
;
3834 TALLOC_CTX
*out_mem_ctx
;
3835 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3838 static void rpccli_svcctl_CreateServiceA_done(struct tevent_req
*subreq
);
3840 struct tevent_req
*rpccli_svcctl_CreateServiceA_send(TALLOC_CTX
*mem_ctx
,
3841 struct tevent_context
*ev
,
3842 struct rpc_pipe_client
*cli
,
3843 struct policy_handle
*_handle
/* [in] [ref] */,
3844 const char *_ServiceName
/* [in] [unique,charset(UTF16)] */,
3845 const char *_DisplayName
/* [in] [unique,charset(UTF16)] */,
3846 uint32_t _desired_access
/* [in] */,
3847 uint32_t _type
/* [in] */,
3848 enum svcctl_StartType _start_type
/* [in] */,
3849 enum svcctl_ErrorControl _error_control
/* [in] */,
3850 const char *_binary_path
/* [in] [unique,charset(UTF16)] */,
3851 const char *_LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
3852 uint32_t *_TagId
/* [out] [unique] */,
3853 const char *_dependencies
/* [in] [unique,charset(UTF16)] */,
3854 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
3855 const char *_password
/* [in] [unique,charset(UTF16)] */)
3857 struct tevent_req
*req
;
3858 struct rpccli_svcctl_CreateServiceA_state
*state
;
3859 struct tevent_req
*subreq
;
3861 req
= tevent_req_create(mem_ctx
, &state
,
3862 struct rpccli_svcctl_CreateServiceA_state
);
3866 state
->out_mem_ctx
= NULL
;
3867 state
->dispatch_recv
= cli
->dispatch_recv
;
3870 state
->orig
.in
.handle
= _handle
;
3871 state
->orig
.in
.ServiceName
= _ServiceName
;
3872 state
->orig
.in
.DisplayName
= _DisplayName
;
3873 state
->orig
.in
.desired_access
= _desired_access
;
3874 state
->orig
.in
.type
= _type
;
3875 state
->orig
.in
.start_type
= _start_type
;
3876 state
->orig
.in
.error_control
= _error_control
;
3877 state
->orig
.in
.binary_path
= _binary_path
;
3878 state
->orig
.in
.LoadOrderGroupKey
= _LoadOrderGroupKey
;
3879 state
->orig
.in
.dependencies
= _dependencies
;
3880 state
->orig
.in
.service_start_name
= _service_start_name
;
3881 state
->orig
.in
.password
= _password
;
3883 /* Out parameters */
3884 state
->orig
.out
.TagId
= _TagId
;
3887 ZERO_STRUCT(state
->orig
.out
.result
);
3889 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3890 "rpccli_svcctl_CreateServiceA_out_memory");
3891 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3892 return tevent_req_post(req
, ev
);
3895 /* make a temporary copy, that we pass to the dispatch function */
3896 state
->tmp
= state
->orig
;
3898 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3900 NDR_SVCCTL_CREATESERVICEA
,
3902 if (tevent_req_nomem(subreq
, req
)) {
3903 return tevent_req_post(req
, ev
);
3905 tevent_req_set_callback(subreq
, rpccli_svcctl_CreateServiceA_done
, req
);
3909 static void rpccli_svcctl_CreateServiceA_done(struct tevent_req
*subreq
)
3911 struct tevent_req
*req
= tevent_req_callback_data(
3912 subreq
, struct tevent_req
);
3913 struct rpccli_svcctl_CreateServiceA_state
*state
= tevent_req_data(
3914 req
, struct rpccli_svcctl_CreateServiceA_state
);
3916 TALLOC_CTX
*mem_ctx
;
3918 if (state
->out_mem_ctx
) {
3919 mem_ctx
= state
->out_mem_ctx
;
3924 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3925 TALLOC_FREE(subreq
);
3926 if (!NT_STATUS_IS_OK(status
)) {
3927 tevent_req_nterror(req
, status
);
3931 /* Copy out parameters */
3932 if (state
->orig
.out
.TagId
&& state
->tmp
.out
.TagId
) {
3933 *state
->orig
.out
.TagId
= *state
->tmp
.out
.TagId
;
3937 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3939 /* Reset temporary structure */
3940 ZERO_STRUCT(state
->tmp
);
3942 tevent_req_done(req
);
3945 NTSTATUS
rpccli_svcctl_CreateServiceA_recv(struct tevent_req
*req
,
3946 TALLOC_CTX
*mem_ctx
,
3949 struct rpccli_svcctl_CreateServiceA_state
*state
= tevent_req_data(
3950 req
, struct rpccli_svcctl_CreateServiceA_state
);
3953 if (tevent_req_is_nterror(req
, &status
)) {
3954 tevent_req_received(req
);
3958 /* Steal possbile out parameters to the callers context */
3959 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3962 *result
= state
->orig
.out
.result
;
3964 tevent_req_received(req
);
3965 return NT_STATUS_OK
;
3968 NTSTATUS
rpccli_svcctl_CreateServiceA(struct rpc_pipe_client
*cli
,
3969 TALLOC_CTX
*mem_ctx
,
3970 struct policy_handle
*handle
/* [in] [ref] */,
3971 const char *ServiceName
/* [in] [unique,charset(UTF16)] */,
3972 const char *DisplayName
/* [in] [unique,charset(UTF16)] */,
3973 uint32_t desired_access
/* [in] */,
3974 uint32_t type
/* [in] */,
3975 enum svcctl_StartType start_type
/* [in] */,
3976 enum svcctl_ErrorControl error_control
/* [in] */,
3977 const char *binary_path
/* [in] [unique,charset(UTF16)] */,
3978 const char *LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
3979 uint32_t *TagId
/* [out] [unique] */,
3980 const char *dependencies
/* [in] [unique,charset(UTF16)] */,
3981 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
3982 const char *password
/* [in] [unique,charset(UTF16)] */,
3985 struct svcctl_CreateServiceA r
;
3989 r
.in
.handle
= handle
;
3990 r
.in
.ServiceName
= ServiceName
;
3991 r
.in
.DisplayName
= DisplayName
;
3992 r
.in
.desired_access
= desired_access
;
3994 r
.in
.start_type
= start_type
;
3995 r
.in
.error_control
= error_control
;
3996 r
.in
.binary_path
= binary_path
;
3997 r
.in
.LoadOrderGroupKey
= LoadOrderGroupKey
;
3998 r
.in
.dependencies
= dependencies
;
3999 r
.in
.service_start_name
= service_start_name
;
4000 r
.in
.password
= password
;
4002 status
= cli
->dispatch(cli
,
4005 NDR_SVCCTL_CREATESERVICEA
,
4008 if (!NT_STATUS_IS_OK(status
)) {
4012 if (NT_STATUS_IS_ERR(status
)) {
4016 /* Return variables */
4017 if (TagId
&& r
.out
.TagId
) {
4018 *TagId
= *r
.out
.TagId
;
4023 *werror
= r
.out
.result
;
4026 return werror_to_ntstatus(r
.out
.result
);
4029 struct rpccli_svcctl_EnumDependentServicesA_state
{
4030 struct svcctl_EnumDependentServicesA orig
;
4031 struct svcctl_EnumDependentServicesA tmp
;
4032 TALLOC_CTX
*out_mem_ctx
;
4033 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4036 static void rpccli_svcctl_EnumDependentServicesA_done(struct tevent_req
*subreq
);
4038 struct tevent_req
*rpccli_svcctl_EnumDependentServicesA_send(TALLOC_CTX
*mem_ctx
,
4039 struct tevent_context
*ev
,
4040 struct rpc_pipe_client
*cli
,
4041 struct policy_handle
*_service
/* [in] [ref] */,
4042 enum svcctl_ServiceState _state
/* [in] */,
4043 struct ENUM_SERVICE_STATUSA
*_service_status
/* [out] [unique] */,
4044 uint32_t _offered
/* [in] */,
4045 uint32_t *_needed
/* [out] [ref] */,
4046 uint32_t *_services_returned
/* [out] [ref] */)
4048 struct tevent_req
*req
;
4049 struct rpccli_svcctl_EnumDependentServicesA_state
*state
;
4050 struct tevent_req
*subreq
;
4052 req
= tevent_req_create(mem_ctx
, &state
,
4053 struct rpccli_svcctl_EnumDependentServicesA_state
);
4057 state
->out_mem_ctx
= NULL
;
4058 state
->dispatch_recv
= cli
->dispatch_recv
;
4061 state
->orig
.in
.service
= _service
;
4062 state
->orig
.in
.state
= _state
;
4063 state
->orig
.in
.offered
= _offered
;
4065 /* Out parameters */
4066 state
->orig
.out
.service_status
= _service_status
;
4067 state
->orig
.out
.needed
= _needed
;
4068 state
->orig
.out
.services_returned
= _services_returned
;
4071 ZERO_STRUCT(state
->orig
.out
.result
);
4073 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4074 "rpccli_svcctl_EnumDependentServicesA_out_memory");
4075 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4076 return tevent_req_post(req
, ev
);
4079 /* make a temporary copy, that we pass to the dispatch function */
4080 state
->tmp
= state
->orig
;
4082 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4084 NDR_SVCCTL_ENUMDEPENDENTSERVICESA
,
4086 if (tevent_req_nomem(subreq
, req
)) {
4087 return tevent_req_post(req
, ev
);
4089 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumDependentServicesA_done
, req
);
4093 static void rpccli_svcctl_EnumDependentServicesA_done(struct tevent_req
*subreq
)
4095 struct tevent_req
*req
= tevent_req_callback_data(
4096 subreq
, struct tevent_req
);
4097 struct rpccli_svcctl_EnumDependentServicesA_state
*state
= tevent_req_data(
4098 req
, struct rpccli_svcctl_EnumDependentServicesA_state
);
4100 TALLOC_CTX
*mem_ctx
;
4102 if (state
->out_mem_ctx
) {
4103 mem_ctx
= state
->out_mem_ctx
;
4108 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4109 TALLOC_FREE(subreq
);
4110 if (!NT_STATUS_IS_OK(status
)) {
4111 tevent_req_nterror(req
, status
);
4115 /* Copy out parameters */
4116 if (state
->orig
.out
.service_status
&& state
->tmp
.out
.service_status
) {
4117 *state
->orig
.out
.service_status
= *state
->tmp
.out
.service_status
;
4119 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
4120 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
4123 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4125 /* Reset temporary structure */
4126 ZERO_STRUCT(state
->tmp
);
4128 tevent_req_done(req
);
4131 NTSTATUS
rpccli_svcctl_EnumDependentServicesA_recv(struct tevent_req
*req
,
4132 TALLOC_CTX
*mem_ctx
,
4135 struct rpccli_svcctl_EnumDependentServicesA_state
*state
= tevent_req_data(
4136 req
, struct rpccli_svcctl_EnumDependentServicesA_state
);
4139 if (tevent_req_is_nterror(req
, &status
)) {
4140 tevent_req_received(req
);
4144 /* Steal possbile out parameters to the callers context */
4145 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4148 *result
= state
->orig
.out
.result
;
4150 tevent_req_received(req
);
4151 return NT_STATUS_OK
;
4154 NTSTATUS
rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client
*cli
,
4155 TALLOC_CTX
*mem_ctx
,
4156 struct policy_handle
*service
/* [in] [ref] */,
4157 enum svcctl_ServiceState state
/* [in] */,
4158 struct ENUM_SERVICE_STATUSA
*service_status
/* [out] [unique] */,
4159 uint32_t offered
/* [in] */,
4160 uint32_t *needed
/* [out] [ref] */,
4161 uint32_t *services_returned
/* [out] [ref] */,
4164 struct svcctl_EnumDependentServicesA r
;
4168 r
.in
.service
= service
;
4170 r
.in
.offered
= offered
;
4172 status
= cli
->dispatch(cli
,
4175 NDR_SVCCTL_ENUMDEPENDENTSERVICESA
,
4178 if (!NT_STATUS_IS_OK(status
)) {
4182 if (NT_STATUS_IS_ERR(status
)) {
4186 /* Return variables */
4187 if (service_status
&& r
.out
.service_status
) {
4188 *service_status
= *r
.out
.service_status
;
4190 *needed
= *r
.out
.needed
;
4191 *services_returned
= *r
.out
.services_returned
;
4195 *werror
= r
.out
.result
;
4198 return werror_to_ntstatus(r
.out
.result
);
4201 struct rpccli_svcctl_EnumServicesStatusA_state
{
4202 struct svcctl_EnumServicesStatusA orig
;
4203 struct svcctl_EnumServicesStatusA tmp
;
4204 TALLOC_CTX
*out_mem_ctx
;
4205 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4208 static void rpccli_svcctl_EnumServicesStatusA_done(struct tevent_req
*subreq
);
4210 struct tevent_req
*rpccli_svcctl_EnumServicesStatusA_send(TALLOC_CTX
*mem_ctx
,
4211 struct tevent_context
*ev
,
4212 struct rpc_pipe_client
*cli
,
4213 struct policy_handle
*_handle
/* [in] [ref] */,
4214 uint32_t _type
/* [in] */,
4215 enum svcctl_ServiceState _state
/* [in] */,
4216 uint32_t _offered
/* [in] */,
4217 uint8_t *_service
/* [out] [size_is(offered)] */,
4218 uint32_t *_needed
/* [out] [ref] */,
4219 uint32_t *_services_returned
/* [out] [ref] */,
4220 uint32_t *_resume_handle
/* [in,out] [unique] */)
4222 struct tevent_req
*req
;
4223 struct rpccli_svcctl_EnumServicesStatusA_state
*state
;
4224 struct tevent_req
*subreq
;
4226 req
= tevent_req_create(mem_ctx
, &state
,
4227 struct rpccli_svcctl_EnumServicesStatusA_state
);
4231 state
->out_mem_ctx
= NULL
;
4232 state
->dispatch_recv
= cli
->dispatch_recv
;
4235 state
->orig
.in
.handle
= _handle
;
4236 state
->orig
.in
.type
= _type
;
4237 state
->orig
.in
.state
= _state
;
4238 state
->orig
.in
.offered
= _offered
;
4239 state
->orig
.in
.resume_handle
= _resume_handle
;
4241 /* Out parameters */
4242 state
->orig
.out
.service
= _service
;
4243 state
->orig
.out
.needed
= _needed
;
4244 state
->orig
.out
.services_returned
= _services_returned
;
4245 state
->orig
.out
.resume_handle
= _resume_handle
;
4248 ZERO_STRUCT(state
->orig
.out
.result
);
4250 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4251 "rpccli_svcctl_EnumServicesStatusA_out_memory");
4252 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4253 return tevent_req_post(req
, ev
);
4256 /* make a temporary copy, that we pass to the dispatch function */
4257 state
->tmp
= state
->orig
;
4259 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4261 NDR_SVCCTL_ENUMSERVICESSTATUSA
,
4263 if (tevent_req_nomem(subreq
, req
)) {
4264 return tevent_req_post(req
, ev
);
4266 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumServicesStatusA_done
, req
);
4270 static void rpccli_svcctl_EnumServicesStatusA_done(struct tevent_req
*subreq
)
4272 struct tevent_req
*req
= tevent_req_callback_data(
4273 subreq
, struct tevent_req
);
4274 struct rpccli_svcctl_EnumServicesStatusA_state
*state
= tevent_req_data(
4275 req
, struct rpccli_svcctl_EnumServicesStatusA_state
);
4277 TALLOC_CTX
*mem_ctx
;
4279 if (state
->out_mem_ctx
) {
4280 mem_ctx
= state
->out_mem_ctx
;
4285 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4286 TALLOC_FREE(subreq
);
4287 if (!NT_STATUS_IS_OK(status
)) {
4288 tevent_req_nterror(req
, status
);
4292 /* Copy out parameters */
4293 memcpy(state
->orig
.out
.service
, state
->tmp
.out
.service
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.service
));
4294 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
4295 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
4296 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
4297 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
4301 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4303 /* Reset temporary structure */
4304 ZERO_STRUCT(state
->tmp
);
4306 tevent_req_done(req
);
4309 NTSTATUS
rpccli_svcctl_EnumServicesStatusA_recv(struct tevent_req
*req
,
4310 TALLOC_CTX
*mem_ctx
,
4313 struct rpccli_svcctl_EnumServicesStatusA_state
*state
= tevent_req_data(
4314 req
, struct rpccli_svcctl_EnumServicesStatusA_state
);
4317 if (tevent_req_is_nterror(req
, &status
)) {
4318 tevent_req_received(req
);
4322 /* Steal possbile out parameters to the callers context */
4323 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4326 *result
= state
->orig
.out
.result
;
4328 tevent_req_received(req
);
4329 return NT_STATUS_OK
;
4332 NTSTATUS
rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client
*cli
,
4333 TALLOC_CTX
*mem_ctx
,
4334 struct policy_handle
*handle
/* [in] [ref] */,
4335 uint32_t type
/* [in] */,
4336 enum svcctl_ServiceState state
/* [in] */,
4337 uint32_t offered
/* [in] */,
4338 uint8_t *service
/* [out] [size_is(offered)] */,
4339 uint32_t *needed
/* [out] [ref] */,
4340 uint32_t *services_returned
/* [out] [ref] */,
4341 uint32_t *resume_handle
/* [in,out] [unique] */,
4344 struct svcctl_EnumServicesStatusA r
;
4348 r
.in
.handle
= handle
;
4351 r
.in
.offered
= offered
;
4352 r
.in
.resume_handle
= resume_handle
;
4354 status
= cli
->dispatch(cli
,
4357 NDR_SVCCTL_ENUMSERVICESSTATUSA
,
4360 if (!NT_STATUS_IS_OK(status
)) {
4364 if (NT_STATUS_IS_ERR(status
)) {
4368 /* Return variables */
4369 memcpy(service
, r
.out
.service
, (r
.in
.offered
) * sizeof(*service
));
4370 *needed
= *r
.out
.needed
;
4371 *services_returned
= *r
.out
.services_returned
;
4372 if (resume_handle
&& r
.out
.resume_handle
) {
4373 *resume_handle
= *r
.out
.resume_handle
;
4378 *werror
= r
.out
.result
;
4381 return werror_to_ntstatus(r
.out
.result
);
4384 struct rpccli_svcctl_OpenSCManagerA_state
{
4385 struct svcctl_OpenSCManagerA orig
;
4386 struct svcctl_OpenSCManagerA tmp
;
4387 TALLOC_CTX
*out_mem_ctx
;
4388 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4391 static void rpccli_svcctl_OpenSCManagerA_done(struct tevent_req
*subreq
);
4393 struct tevent_req
*rpccli_svcctl_OpenSCManagerA_send(TALLOC_CTX
*mem_ctx
,
4394 struct tevent_context
*ev
,
4395 struct rpc_pipe_client
*cli
,
4396 const char *_MachineName
/* [in] [unique,charset(UTF16)] */,
4397 const char *_DatabaseName
/* [in] [unique,charset(UTF16)] */,
4398 uint32_t _access_mask
/* [in] */,
4399 struct policy_handle
*_handle
/* [out] [ref] */)
4401 struct tevent_req
*req
;
4402 struct rpccli_svcctl_OpenSCManagerA_state
*state
;
4403 struct tevent_req
*subreq
;
4405 req
= tevent_req_create(mem_ctx
, &state
,
4406 struct rpccli_svcctl_OpenSCManagerA_state
);
4410 state
->out_mem_ctx
= NULL
;
4411 state
->dispatch_recv
= cli
->dispatch_recv
;
4414 state
->orig
.in
.MachineName
= _MachineName
;
4415 state
->orig
.in
.DatabaseName
= _DatabaseName
;
4416 state
->orig
.in
.access_mask
= _access_mask
;
4418 /* Out parameters */
4419 state
->orig
.out
.handle
= _handle
;
4422 ZERO_STRUCT(state
->orig
.out
.result
);
4424 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4425 "rpccli_svcctl_OpenSCManagerA_out_memory");
4426 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4427 return tevent_req_post(req
, ev
);
4430 /* make a temporary copy, that we pass to the dispatch function */
4431 state
->tmp
= state
->orig
;
4433 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4435 NDR_SVCCTL_OPENSCMANAGERA
,
4437 if (tevent_req_nomem(subreq
, req
)) {
4438 return tevent_req_post(req
, ev
);
4440 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenSCManagerA_done
, req
);
4444 static void rpccli_svcctl_OpenSCManagerA_done(struct tevent_req
*subreq
)
4446 struct tevent_req
*req
= tevent_req_callback_data(
4447 subreq
, struct tevent_req
);
4448 struct rpccli_svcctl_OpenSCManagerA_state
*state
= tevent_req_data(
4449 req
, struct rpccli_svcctl_OpenSCManagerA_state
);
4451 TALLOC_CTX
*mem_ctx
;
4453 if (state
->out_mem_ctx
) {
4454 mem_ctx
= state
->out_mem_ctx
;
4459 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4460 TALLOC_FREE(subreq
);
4461 if (!NT_STATUS_IS_OK(status
)) {
4462 tevent_req_nterror(req
, status
);
4466 /* Copy out parameters */
4467 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
4470 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4472 /* Reset temporary structure */
4473 ZERO_STRUCT(state
->tmp
);
4475 tevent_req_done(req
);
4478 NTSTATUS
rpccli_svcctl_OpenSCManagerA_recv(struct tevent_req
*req
,
4479 TALLOC_CTX
*mem_ctx
,
4482 struct rpccli_svcctl_OpenSCManagerA_state
*state
= tevent_req_data(
4483 req
, struct rpccli_svcctl_OpenSCManagerA_state
);
4486 if (tevent_req_is_nterror(req
, &status
)) {
4487 tevent_req_received(req
);
4491 /* Steal possbile out parameters to the callers context */
4492 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4495 *result
= state
->orig
.out
.result
;
4497 tevent_req_received(req
);
4498 return NT_STATUS_OK
;
4501 NTSTATUS
rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client
*cli
,
4502 TALLOC_CTX
*mem_ctx
,
4503 const char *MachineName
/* [in] [unique,charset(UTF16)] */,
4504 const char *DatabaseName
/* [in] [unique,charset(UTF16)] */,
4505 uint32_t access_mask
/* [in] */,
4506 struct policy_handle
*handle
/* [out] [ref] */,
4509 struct svcctl_OpenSCManagerA r
;
4513 r
.in
.MachineName
= MachineName
;
4514 r
.in
.DatabaseName
= DatabaseName
;
4515 r
.in
.access_mask
= access_mask
;
4517 status
= cli
->dispatch(cli
,
4520 NDR_SVCCTL_OPENSCMANAGERA
,
4523 if (!NT_STATUS_IS_OK(status
)) {
4527 if (NT_STATUS_IS_ERR(status
)) {
4531 /* Return variables */
4532 *handle
= *r
.out
.handle
;
4536 *werror
= r
.out
.result
;
4539 return werror_to_ntstatus(r
.out
.result
);
4542 struct rpccli_svcctl_OpenServiceA_state
{
4543 struct svcctl_OpenServiceA orig
;
4544 struct svcctl_OpenServiceA tmp
;
4545 TALLOC_CTX
*out_mem_ctx
;
4546 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4549 static void rpccli_svcctl_OpenServiceA_done(struct tevent_req
*subreq
);
4551 struct tevent_req
*rpccli_svcctl_OpenServiceA_send(TALLOC_CTX
*mem_ctx
,
4552 struct tevent_context
*ev
,
4553 struct rpc_pipe_client
*cli
,
4554 struct policy_handle
*_scmanager_handle
/* [in] [ref] */,
4555 const char *_ServiceName
/* [in] [unique,charset(UTF16)] */,
4556 uint32_t _access_mask
/* [in] */)
4558 struct tevent_req
*req
;
4559 struct rpccli_svcctl_OpenServiceA_state
*state
;
4560 struct tevent_req
*subreq
;
4562 req
= tevent_req_create(mem_ctx
, &state
,
4563 struct rpccli_svcctl_OpenServiceA_state
);
4567 state
->out_mem_ctx
= NULL
;
4568 state
->dispatch_recv
= cli
->dispatch_recv
;
4571 state
->orig
.in
.scmanager_handle
= _scmanager_handle
;
4572 state
->orig
.in
.ServiceName
= _ServiceName
;
4573 state
->orig
.in
.access_mask
= _access_mask
;
4575 /* Out parameters */
4578 ZERO_STRUCT(state
->orig
.out
.result
);
4580 /* make a temporary copy, that we pass to the dispatch function */
4581 state
->tmp
= state
->orig
;
4583 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4585 NDR_SVCCTL_OPENSERVICEA
,
4587 if (tevent_req_nomem(subreq
, req
)) {
4588 return tevent_req_post(req
, ev
);
4590 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenServiceA_done
, req
);
4594 static void rpccli_svcctl_OpenServiceA_done(struct tevent_req
*subreq
)
4596 struct tevent_req
*req
= tevent_req_callback_data(
4597 subreq
, struct tevent_req
);
4598 struct rpccli_svcctl_OpenServiceA_state
*state
= tevent_req_data(
4599 req
, struct rpccli_svcctl_OpenServiceA_state
);
4601 TALLOC_CTX
*mem_ctx
;
4603 if (state
->out_mem_ctx
) {
4604 mem_ctx
= state
->out_mem_ctx
;
4609 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4610 TALLOC_FREE(subreq
);
4611 if (!NT_STATUS_IS_OK(status
)) {
4612 tevent_req_nterror(req
, status
);
4616 /* Copy out parameters */
4619 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4621 /* Reset temporary structure */
4622 ZERO_STRUCT(state
->tmp
);
4624 tevent_req_done(req
);
4627 NTSTATUS
rpccli_svcctl_OpenServiceA_recv(struct tevent_req
*req
,
4628 TALLOC_CTX
*mem_ctx
,
4631 struct rpccli_svcctl_OpenServiceA_state
*state
= tevent_req_data(
4632 req
, struct rpccli_svcctl_OpenServiceA_state
);
4635 if (tevent_req_is_nterror(req
, &status
)) {
4636 tevent_req_received(req
);
4640 /* Steal possbile out parameters to the callers context */
4641 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4644 *result
= state
->orig
.out
.result
;
4646 tevent_req_received(req
);
4647 return NT_STATUS_OK
;
4650 NTSTATUS
rpccli_svcctl_OpenServiceA(struct rpc_pipe_client
*cli
,
4651 TALLOC_CTX
*mem_ctx
,
4652 struct policy_handle
*scmanager_handle
/* [in] [ref] */,
4653 const char *ServiceName
/* [in] [unique,charset(UTF16)] */,
4654 uint32_t access_mask
/* [in] */,
4657 struct svcctl_OpenServiceA r
;
4661 r
.in
.scmanager_handle
= scmanager_handle
;
4662 r
.in
.ServiceName
= ServiceName
;
4663 r
.in
.access_mask
= access_mask
;
4665 status
= cli
->dispatch(cli
,
4668 NDR_SVCCTL_OPENSERVICEA
,
4671 if (!NT_STATUS_IS_OK(status
)) {
4675 if (NT_STATUS_IS_ERR(status
)) {
4679 /* Return variables */
4683 *werror
= r
.out
.result
;
4686 return werror_to_ntstatus(r
.out
.result
);
4689 struct rpccli_svcctl_QueryServiceConfigA_state
{
4690 struct svcctl_QueryServiceConfigA orig
;
4691 struct svcctl_QueryServiceConfigA tmp
;
4692 TALLOC_CTX
*out_mem_ctx
;
4693 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4696 static void rpccli_svcctl_QueryServiceConfigA_done(struct tevent_req
*subreq
);
4698 struct tevent_req
*rpccli_svcctl_QueryServiceConfigA_send(TALLOC_CTX
*mem_ctx
,
4699 struct tevent_context
*ev
,
4700 struct rpc_pipe_client
*cli
,
4701 struct policy_handle
*_handle
/* [in] [ref] */,
4702 uint8_t *_query
/* [out] */,
4703 uint32_t _offered
/* [in] */,
4704 uint32_t *_needed
/* [out] [ref] */)
4706 struct tevent_req
*req
;
4707 struct rpccli_svcctl_QueryServiceConfigA_state
*state
;
4708 struct tevent_req
*subreq
;
4710 req
= tevent_req_create(mem_ctx
, &state
,
4711 struct rpccli_svcctl_QueryServiceConfigA_state
);
4715 state
->out_mem_ctx
= NULL
;
4716 state
->dispatch_recv
= cli
->dispatch_recv
;
4719 state
->orig
.in
.handle
= _handle
;
4720 state
->orig
.in
.offered
= _offered
;
4722 /* Out parameters */
4723 state
->orig
.out
.query
= _query
;
4724 state
->orig
.out
.needed
= _needed
;
4727 ZERO_STRUCT(state
->orig
.out
.result
);
4729 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4730 "rpccli_svcctl_QueryServiceConfigA_out_memory");
4731 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4732 return tevent_req_post(req
, ev
);
4735 /* make a temporary copy, that we pass to the dispatch function */
4736 state
->tmp
= state
->orig
;
4738 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4740 NDR_SVCCTL_QUERYSERVICECONFIGA
,
4742 if (tevent_req_nomem(subreq
, req
)) {
4743 return tevent_req_post(req
, ev
);
4745 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfigA_done
, req
);
4749 static void rpccli_svcctl_QueryServiceConfigA_done(struct tevent_req
*subreq
)
4751 struct tevent_req
*req
= tevent_req_callback_data(
4752 subreq
, struct tevent_req
);
4753 struct rpccli_svcctl_QueryServiceConfigA_state
*state
= tevent_req_data(
4754 req
, struct rpccli_svcctl_QueryServiceConfigA_state
);
4756 TALLOC_CTX
*mem_ctx
;
4758 if (state
->out_mem_ctx
) {
4759 mem_ctx
= state
->out_mem_ctx
;
4764 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4765 TALLOC_FREE(subreq
);
4766 if (!NT_STATUS_IS_OK(status
)) {
4767 tevent_req_nterror(req
, status
);
4771 /* Copy out parameters */
4772 memcpy(state
->orig
.out
.query
, state
->tmp
.out
.query
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.query
));
4773 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
4776 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4778 /* Reset temporary structure */
4779 ZERO_STRUCT(state
->tmp
);
4781 tevent_req_done(req
);
4784 NTSTATUS
rpccli_svcctl_QueryServiceConfigA_recv(struct tevent_req
*req
,
4785 TALLOC_CTX
*mem_ctx
,
4788 struct rpccli_svcctl_QueryServiceConfigA_state
*state
= tevent_req_data(
4789 req
, struct rpccli_svcctl_QueryServiceConfigA_state
);
4792 if (tevent_req_is_nterror(req
, &status
)) {
4793 tevent_req_received(req
);
4797 /* Steal possbile out parameters to the callers context */
4798 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4801 *result
= state
->orig
.out
.result
;
4803 tevent_req_received(req
);
4804 return NT_STATUS_OK
;
4807 NTSTATUS
rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client
*cli
,
4808 TALLOC_CTX
*mem_ctx
,
4809 struct policy_handle
*handle
/* [in] [ref] */,
4810 uint8_t *query
/* [out] */,
4811 uint32_t offered
/* [in] */,
4812 uint32_t *needed
/* [out] [ref] */,
4815 struct svcctl_QueryServiceConfigA r
;
4819 r
.in
.handle
= handle
;
4820 r
.in
.offered
= offered
;
4822 status
= cli
->dispatch(cli
,
4825 NDR_SVCCTL_QUERYSERVICECONFIGA
,
4828 if (!NT_STATUS_IS_OK(status
)) {
4832 if (NT_STATUS_IS_ERR(status
)) {
4836 /* Return variables */
4837 memcpy(query
, r
.out
.query
, (r
.in
.offered
) * sizeof(*query
));
4838 *needed
= *r
.out
.needed
;
4842 *werror
= r
.out
.result
;
4845 return werror_to_ntstatus(r
.out
.result
);
4848 struct rpccli_svcctl_QueryServiceLockStatusA_state
{
4849 struct svcctl_QueryServiceLockStatusA orig
;
4850 struct svcctl_QueryServiceLockStatusA tmp
;
4851 TALLOC_CTX
*out_mem_ctx
;
4852 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4855 static void rpccli_svcctl_QueryServiceLockStatusA_done(struct tevent_req
*subreq
);
4857 struct tevent_req
*rpccli_svcctl_QueryServiceLockStatusA_send(TALLOC_CTX
*mem_ctx
,
4858 struct tevent_context
*ev
,
4859 struct rpc_pipe_client
*cli
,
4860 struct policy_handle
*_handle
/* [in] [ref] */,
4861 uint32_t _offered
/* [in] */,
4862 struct SERVICE_LOCK_STATUS
*_lock_status
/* [out] [ref] */,
4863 uint32_t *_needed
/* [out] [ref] */)
4865 struct tevent_req
*req
;
4866 struct rpccli_svcctl_QueryServiceLockStatusA_state
*state
;
4867 struct tevent_req
*subreq
;
4869 req
= tevent_req_create(mem_ctx
, &state
,
4870 struct rpccli_svcctl_QueryServiceLockStatusA_state
);
4874 state
->out_mem_ctx
= NULL
;
4875 state
->dispatch_recv
= cli
->dispatch_recv
;
4878 state
->orig
.in
.handle
= _handle
;
4879 state
->orig
.in
.offered
= _offered
;
4881 /* Out parameters */
4882 state
->orig
.out
.lock_status
= _lock_status
;
4883 state
->orig
.out
.needed
= _needed
;
4886 ZERO_STRUCT(state
->orig
.out
.result
);
4888 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4889 "rpccli_svcctl_QueryServiceLockStatusA_out_memory");
4890 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4891 return tevent_req_post(req
, ev
);
4894 /* make a temporary copy, that we pass to the dispatch function */
4895 state
->tmp
= state
->orig
;
4897 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4899 NDR_SVCCTL_QUERYSERVICELOCKSTATUSA
,
4901 if (tevent_req_nomem(subreq
, req
)) {
4902 return tevent_req_post(req
, ev
);
4904 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceLockStatusA_done
, req
);
4908 static void rpccli_svcctl_QueryServiceLockStatusA_done(struct tevent_req
*subreq
)
4910 struct tevent_req
*req
= tevent_req_callback_data(
4911 subreq
, struct tevent_req
);
4912 struct rpccli_svcctl_QueryServiceLockStatusA_state
*state
= tevent_req_data(
4913 req
, struct rpccli_svcctl_QueryServiceLockStatusA_state
);
4915 TALLOC_CTX
*mem_ctx
;
4917 if (state
->out_mem_ctx
) {
4918 mem_ctx
= state
->out_mem_ctx
;
4923 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4924 TALLOC_FREE(subreq
);
4925 if (!NT_STATUS_IS_OK(status
)) {
4926 tevent_req_nterror(req
, status
);
4930 /* Copy out parameters */
4931 *state
->orig
.out
.lock_status
= *state
->tmp
.out
.lock_status
;
4932 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
4935 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4937 /* Reset temporary structure */
4938 ZERO_STRUCT(state
->tmp
);
4940 tevent_req_done(req
);
4943 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusA_recv(struct tevent_req
*req
,
4944 TALLOC_CTX
*mem_ctx
,
4947 struct rpccli_svcctl_QueryServiceLockStatusA_state
*state
= tevent_req_data(
4948 req
, struct rpccli_svcctl_QueryServiceLockStatusA_state
);
4951 if (tevent_req_is_nterror(req
, &status
)) {
4952 tevent_req_received(req
);
4956 /* Steal possbile out parameters to the callers context */
4957 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4960 *result
= state
->orig
.out
.result
;
4962 tevent_req_received(req
);
4963 return NT_STATUS_OK
;
4966 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client
*cli
,
4967 TALLOC_CTX
*mem_ctx
,
4968 struct policy_handle
*handle
/* [in] [ref] */,
4969 uint32_t offered
/* [in] */,
4970 struct SERVICE_LOCK_STATUS
*lock_status
/* [out] [ref] */,
4971 uint32_t *needed
/* [out] [ref] */,
4974 struct svcctl_QueryServiceLockStatusA r
;
4978 r
.in
.handle
= handle
;
4979 r
.in
.offered
= offered
;
4981 status
= cli
->dispatch(cli
,
4984 NDR_SVCCTL_QUERYSERVICELOCKSTATUSA
,
4987 if (!NT_STATUS_IS_OK(status
)) {
4991 if (NT_STATUS_IS_ERR(status
)) {
4995 /* Return variables */
4996 *lock_status
= *r
.out
.lock_status
;
4997 *needed
= *r
.out
.needed
;
5001 *werror
= r
.out
.result
;
5004 return werror_to_ntstatus(r
.out
.result
);
5007 struct rpccli_svcctl_StartServiceA_state
{
5008 struct svcctl_StartServiceA orig
;
5009 struct svcctl_StartServiceA tmp
;
5010 TALLOC_CTX
*out_mem_ctx
;
5011 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5014 static void rpccli_svcctl_StartServiceA_done(struct tevent_req
*subreq
);
5016 struct tevent_req
*rpccli_svcctl_StartServiceA_send(TALLOC_CTX
*mem_ctx
,
5017 struct tevent_context
*ev
,
5018 struct rpc_pipe_client
*cli
,
5019 struct policy_handle
*_handle
/* [in] [ref] */,
5020 uint32_t _NumArgs
/* [in] */,
5021 const char *_Arguments
/* [in] [unique,charset(UTF16)] */)
5023 struct tevent_req
*req
;
5024 struct rpccli_svcctl_StartServiceA_state
*state
;
5025 struct tevent_req
*subreq
;
5027 req
= tevent_req_create(mem_ctx
, &state
,
5028 struct rpccli_svcctl_StartServiceA_state
);
5032 state
->out_mem_ctx
= NULL
;
5033 state
->dispatch_recv
= cli
->dispatch_recv
;
5036 state
->orig
.in
.handle
= _handle
;
5037 state
->orig
.in
.NumArgs
= _NumArgs
;
5038 state
->orig
.in
.Arguments
= _Arguments
;
5040 /* Out parameters */
5043 ZERO_STRUCT(state
->orig
.out
.result
);
5045 /* make a temporary copy, that we pass to the dispatch function */
5046 state
->tmp
= state
->orig
;
5048 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5050 NDR_SVCCTL_STARTSERVICEA
,
5052 if (tevent_req_nomem(subreq
, req
)) {
5053 return tevent_req_post(req
, ev
);
5055 tevent_req_set_callback(subreq
, rpccli_svcctl_StartServiceA_done
, req
);
5059 static void rpccli_svcctl_StartServiceA_done(struct tevent_req
*subreq
)
5061 struct tevent_req
*req
= tevent_req_callback_data(
5062 subreq
, struct tevent_req
);
5063 struct rpccli_svcctl_StartServiceA_state
*state
= tevent_req_data(
5064 req
, struct rpccli_svcctl_StartServiceA_state
);
5066 TALLOC_CTX
*mem_ctx
;
5068 if (state
->out_mem_ctx
) {
5069 mem_ctx
= state
->out_mem_ctx
;
5074 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5075 TALLOC_FREE(subreq
);
5076 if (!NT_STATUS_IS_OK(status
)) {
5077 tevent_req_nterror(req
, status
);
5081 /* Copy out parameters */
5084 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5086 /* Reset temporary structure */
5087 ZERO_STRUCT(state
->tmp
);
5089 tevent_req_done(req
);
5092 NTSTATUS
rpccli_svcctl_StartServiceA_recv(struct tevent_req
*req
,
5093 TALLOC_CTX
*mem_ctx
,
5096 struct rpccli_svcctl_StartServiceA_state
*state
= tevent_req_data(
5097 req
, struct rpccli_svcctl_StartServiceA_state
);
5100 if (tevent_req_is_nterror(req
, &status
)) {
5101 tevent_req_received(req
);
5105 /* Steal possbile out parameters to the callers context */
5106 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5109 *result
= state
->orig
.out
.result
;
5111 tevent_req_received(req
);
5112 return NT_STATUS_OK
;
5115 NTSTATUS
rpccli_svcctl_StartServiceA(struct rpc_pipe_client
*cli
,
5116 TALLOC_CTX
*mem_ctx
,
5117 struct policy_handle
*handle
/* [in] [ref] */,
5118 uint32_t NumArgs
/* [in] */,
5119 const char *Arguments
/* [in] [unique,charset(UTF16)] */,
5122 struct svcctl_StartServiceA r
;
5126 r
.in
.handle
= handle
;
5127 r
.in
.NumArgs
= NumArgs
;
5128 r
.in
.Arguments
= Arguments
;
5130 status
= cli
->dispatch(cli
,
5133 NDR_SVCCTL_STARTSERVICEA
,
5136 if (!NT_STATUS_IS_OK(status
)) {
5140 if (NT_STATUS_IS_ERR(status
)) {
5144 /* Return variables */
5148 *werror
= r
.out
.result
;
5151 return werror_to_ntstatus(r
.out
.result
);
5154 struct rpccli_svcctl_GetServiceDisplayNameA_state
{
5155 struct svcctl_GetServiceDisplayNameA orig
;
5156 struct svcctl_GetServiceDisplayNameA tmp
;
5157 TALLOC_CTX
*out_mem_ctx
;
5158 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5161 static void rpccli_svcctl_GetServiceDisplayNameA_done(struct tevent_req
*subreq
);
5163 struct tevent_req
*rpccli_svcctl_GetServiceDisplayNameA_send(TALLOC_CTX
*mem_ctx
,
5164 struct tevent_context
*ev
,
5165 struct rpc_pipe_client
*cli
,
5166 struct policy_handle
*_handle
/* [in] [ref] */,
5167 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
5168 const char **_display_name
/* [out] [ref,charset(UTF16)] */,
5169 uint32_t *_display_name_length
/* [in,out] [unique] */)
5171 struct tevent_req
*req
;
5172 struct rpccli_svcctl_GetServiceDisplayNameA_state
*state
;
5173 struct tevent_req
*subreq
;
5175 req
= tevent_req_create(mem_ctx
, &state
,
5176 struct rpccli_svcctl_GetServiceDisplayNameA_state
);
5180 state
->out_mem_ctx
= NULL
;
5181 state
->dispatch_recv
= cli
->dispatch_recv
;
5184 state
->orig
.in
.handle
= _handle
;
5185 state
->orig
.in
.service_name
= _service_name
;
5186 state
->orig
.in
.display_name_length
= _display_name_length
;
5188 /* Out parameters */
5189 state
->orig
.out
.display_name
= _display_name
;
5190 state
->orig
.out
.display_name_length
= _display_name_length
;
5193 ZERO_STRUCT(state
->orig
.out
.result
);
5195 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5196 "rpccli_svcctl_GetServiceDisplayNameA_out_memory");
5197 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5198 return tevent_req_post(req
, ev
);
5201 /* make a temporary copy, that we pass to the dispatch function */
5202 state
->tmp
= state
->orig
;
5204 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5206 NDR_SVCCTL_GETSERVICEDISPLAYNAMEA
,
5208 if (tevent_req_nomem(subreq
, req
)) {
5209 return tevent_req_post(req
, ev
);
5211 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceDisplayNameA_done
, req
);
5215 static void rpccli_svcctl_GetServiceDisplayNameA_done(struct tevent_req
*subreq
)
5217 struct tevent_req
*req
= tevent_req_callback_data(
5218 subreq
, struct tevent_req
);
5219 struct rpccli_svcctl_GetServiceDisplayNameA_state
*state
= tevent_req_data(
5220 req
, struct rpccli_svcctl_GetServiceDisplayNameA_state
);
5222 TALLOC_CTX
*mem_ctx
;
5224 if (state
->out_mem_ctx
) {
5225 mem_ctx
= state
->out_mem_ctx
;
5230 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5231 TALLOC_FREE(subreq
);
5232 if (!NT_STATUS_IS_OK(status
)) {
5233 tevent_req_nterror(req
, status
);
5237 /* Copy out parameters */
5238 *state
->orig
.out
.display_name
= *state
->tmp
.out
.display_name
;
5239 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
5240 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
5244 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5246 /* Reset temporary structure */
5247 ZERO_STRUCT(state
->tmp
);
5249 tevent_req_done(req
);
5252 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameA_recv(struct tevent_req
*req
,
5253 TALLOC_CTX
*mem_ctx
,
5256 struct rpccli_svcctl_GetServiceDisplayNameA_state
*state
= tevent_req_data(
5257 req
, struct rpccli_svcctl_GetServiceDisplayNameA_state
);
5260 if (tevent_req_is_nterror(req
, &status
)) {
5261 tevent_req_received(req
);
5265 /* Steal possbile out parameters to the callers context */
5266 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5269 *result
= state
->orig
.out
.result
;
5271 tevent_req_received(req
);
5272 return NT_STATUS_OK
;
5275 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client
*cli
,
5276 TALLOC_CTX
*mem_ctx
,
5277 struct policy_handle
*handle
/* [in] [ref] */,
5278 const char *service_name
/* [in] [unique,charset(UTF16)] */,
5279 const char **display_name
/* [out] [ref,charset(UTF16)] */,
5280 uint32_t *display_name_length
/* [in,out] [unique] */,
5283 struct svcctl_GetServiceDisplayNameA r
;
5287 r
.in
.handle
= handle
;
5288 r
.in
.service_name
= service_name
;
5289 r
.in
.display_name_length
= display_name_length
;
5291 status
= cli
->dispatch(cli
,
5294 NDR_SVCCTL_GETSERVICEDISPLAYNAMEA
,
5297 if (!NT_STATUS_IS_OK(status
)) {
5301 if (NT_STATUS_IS_ERR(status
)) {
5305 /* Return variables */
5306 *display_name
= *r
.out
.display_name
;
5307 if (display_name_length
&& r
.out
.display_name_length
) {
5308 *display_name_length
= *r
.out
.display_name_length
;
5313 *werror
= r
.out
.result
;
5316 return werror_to_ntstatus(r
.out
.result
);
5319 struct rpccli_svcctl_GetServiceKeyNameA_state
{
5320 struct svcctl_GetServiceKeyNameA orig
;
5321 struct svcctl_GetServiceKeyNameA tmp
;
5322 TALLOC_CTX
*out_mem_ctx
;
5323 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5326 static void rpccli_svcctl_GetServiceKeyNameA_done(struct tevent_req
*subreq
);
5328 struct tevent_req
*rpccli_svcctl_GetServiceKeyNameA_send(TALLOC_CTX
*mem_ctx
,
5329 struct tevent_context
*ev
,
5330 struct rpc_pipe_client
*cli
,
5331 struct policy_handle
*_handle
/* [in] [ref] */,
5332 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
5333 const char **_key_name
/* [out] [ref,charset(UTF16)] */,
5334 uint32_t *_display_name_length
/* [in,out] [unique] */)
5336 struct tevent_req
*req
;
5337 struct rpccli_svcctl_GetServiceKeyNameA_state
*state
;
5338 struct tevent_req
*subreq
;
5340 req
= tevent_req_create(mem_ctx
, &state
,
5341 struct rpccli_svcctl_GetServiceKeyNameA_state
);
5345 state
->out_mem_ctx
= NULL
;
5346 state
->dispatch_recv
= cli
->dispatch_recv
;
5349 state
->orig
.in
.handle
= _handle
;
5350 state
->orig
.in
.service_name
= _service_name
;
5351 state
->orig
.in
.display_name_length
= _display_name_length
;
5353 /* Out parameters */
5354 state
->orig
.out
.key_name
= _key_name
;
5355 state
->orig
.out
.display_name_length
= _display_name_length
;
5358 ZERO_STRUCT(state
->orig
.out
.result
);
5360 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5361 "rpccli_svcctl_GetServiceKeyNameA_out_memory");
5362 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5363 return tevent_req_post(req
, ev
);
5366 /* make a temporary copy, that we pass to the dispatch function */
5367 state
->tmp
= state
->orig
;
5369 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5371 NDR_SVCCTL_GETSERVICEKEYNAMEA
,
5373 if (tevent_req_nomem(subreq
, req
)) {
5374 return tevent_req_post(req
, ev
);
5376 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceKeyNameA_done
, req
);
5380 static void rpccli_svcctl_GetServiceKeyNameA_done(struct tevent_req
*subreq
)
5382 struct tevent_req
*req
= tevent_req_callback_data(
5383 subreq
, struct tevent_req
);
5384 struct rpccli_svcctl_GetServiceKeyNameA_state
*state
= tevent_req_data(
5385 req
, struct rpccli_svcctl_GetServiceKeyNameA_state
);
5387 TALLOC_CTX
*mem_ctx
;
5389 if (state
->out_mem_ctx
) {
5390 mem_ctx
= state
->out_mem_ctx
;
5395 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5396 TALLOC_FREE(subreq
);
5397 if (!NT_STATUS_IS_OK(status
)) {
5398 tevent_req_nterror(req
, status
);
5402 /* Copy out parameters */
5403 *state
->orig
.out
.key_name
= *state
->tmp
.out
.key_name
;
5404 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
5405 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
5409 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5411 /* Reset temporary structure */
5412 ZERO_STRUCT(state
->tmp
);
5414 tevent_req_done(req
);
5417 NTSTATUS
rpccli_svcctl_GetServiceKeyNameA_recv(struct tevent_req
*req
,
5418 TALLOC_CTX
*mem_ctx
,
5421 struct rpccli_svcctl_GetServiceKeyNameA_state
*state
= tevent_req_data(
5422 req
, struct rpccli_svcctl_GetServiceKeyNameA_state
);
5425 if (tevent_req_is_nterror(req
, &status
)) {
5426 tevent_req_received(req
);
5430 /* Steal possbile out parameters to the callers context */
5431 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5434 *result
= state
->orig
.out
.result
;
5436 tevent_req_received(req
);
5437 return NT_STATUS_OK
;
5440 NTSTATUS
rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client
*cli
,
5441 TALLOC_CTX
*mem_ctx
,
5442 struct policy_handle
*handle
/* [in] [ref] */,
5443 const char *service_name
/* [in] [unique,charset(UTF16)] */,
5444 const char **key_name
/* [out] [ref,charset(UTF16)] */,
5445 uint32_t *display_name_length
/* [in,out] [unique] */,
5448 struct svcctl_GetServiceKeyNameA r
;
5452 r
.in
.handle
= handle
;
5453 r
.in
.service_name
= service_name
;
5454 r
.in
.display_name_length
= display_name_length
;
5456 status
= cli
->dispatch(cli
,
5459 NDR_SVCCTL_GETSERVICEKEYNAMEA
,
5462 if (!NT_STATUS_IS_OK(status
)) {
5466 if (NT_STATUS_IS_ERR(status
)) {
5470 /* Return variables */
5471 *key_name
= *r
.out
.key_name
;
5472 if (display_name_length
&& r
.out
.display_name_length
) {
5473 *display_name_length
= *r
.out
.display_name_length
;
5478 *werror
= r
.out
.result
;
5481 return werror_to_ntstatus(r
.out
.result
);
5484 struct rpccli_svcctl_GetCurrentGroupeStateW_state
{
5485 struct svcctl_GetCurrentGroupeStateW orig
;
5486 struct svcctl_GetCurrentGroupeStateW tmp
;
5487 TALLOC_CTX
*out_mem_ctx
;
5488 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5491 static void rpccli_svcctl_GetCurrentGroupeStateW_done(struct tevent_req
*subreq
);
5493 struct tevent_req
*rpccli_svcctl_GetCurrentGroupeStateW_send(TALLOC_CTX
*mem_ctx
,
5494 struct tevent_context
*ev
,
5495 struct rpc_pipe_client
*cli
)
5497 struct tevent_req
*req
;
5498 struct rpccli_svcctl_GetCurrentGroupeStateW_state
*state
;
5499 struct tevent_req
*subreq
;
5501 req
= tevent_req_create(mem_ctx
, &state
,
5502 struct rpccli_svcctl_GetCurrentGroupeStateW_state
);
5506 state
->out_mem_ctx
= NULL
;
5507 state
->dispatch_recv
= cli
->dispatch_recv
;
5511 /* Out parameters */
5514 ZERO_STRUCT(state
->orig
.out
.result
);
5516 /* make a temporary copy, that we pass to the dispatch function */
5517 state
->tmp
= state
->orig
;
5519 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5521 NDR_SVCCTL_GETCURRENTGROUPESTATEW
,
5523 if (tevent_req_nomem(subreq
, req
)) {
5524 return tevent_req_post(req
, ev
);
5526 tevent_req_set_callback(subreq
, rpccli_svcctl_GetCurrentGroupeStateW_done
, req
);
5530 static void rpccli_svcctl_GetCurrentGroupeStateW_done(struct tevent_req
*subreq
)
5532 struct tevent_req
*req
= tevent_req_callback_data(
5533 subreq
, struct tevent_req
);
5534 struct rpccli_svcctl_GetCurrentGroupeStateW_state
*state
= tevent_req_data(
5535 req
, struct rpccli_svcctl_GetCurrentGroupeStateW_state
);
5537 TALLOC_CTX
*mem_ctx
;
5539 if (state
->out_mem_ctx
) {
5540 mem_ctx
= state
->out_mem_ctx
;
5545 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5546 TALLOC_FREE(subreq
);
5547 if (!NT_STATUS_IS_OK(status
)) {
5548 tevent_req_nterror(req
, status
);
5552 /* Copy out parameters */
5555 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5557 /* Reset temporary structure */
5558 ZERO_STRUCT(state
->tmp
);
5560 tevent_req_done(req
);
5563 NTSTATUS
rpccli_svcctl_GetCurrentGroupeStateW_recv(struct tevent_req
*req
,
5564 TALLOC_CTX
*mem_ctx
,
5567 struct rpccli_svcctl_GetCurrentGroupeStateW_state
*state
= tevent_req_data(
5568 req
, struct rpccli_svcctl_GetCurrentGroupeStateW_state
);
5571 if (tevent_req_is_nterror(req
, &status
)) {
5572 tevent_req_received(req
);
5576 /* Steal possbile out parameters to the callers context */
5577 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5580 *result
= state
->orig
.out
.result
;
5582 tevent_req_received(req
);
5583 return NT_STATUS_OK
;
5586 NTSTATUS
rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client
*cli
,
5587 TALLOC_CTX
*mem_ctx
,
5590 struct svcctl_GetCurrentGroupeStateW r
;
5595 status
= cli
->dispatch(cli
,
5598 NDR_SVCCTL_GETCURRENTGROUPESTATEW
,
5601 if (!NT_STATUS_IS_OK(status
)) {
5605 if (NT_STATUS_IS_ERR(status
)) {
5609 /* Return variables */
5613 *werror
= r
.out
.result
;
5616 return werror_to_ntstatus(r
.out
.result
);
5619 struct rpccli_svcctl_EnumServiceGroupW_state
{
5620 struct svcctl_EnumServiceGroupW orig
;
5621 struct svcctl_EnumServiceGroupW tmp
;
5622 TALLOC_CTX
*out_mem_ctx
;
5623 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5626 static void rpccli_svcctl_EnumServiceGroupW_done(struct tevent_req
*subreq
);
5628 struct tevent_req
*rpccli_svcctl_EnumServiceGroupW_send(TALLOC_CTX
*mem_ctx
,
5629 struct tevent_context
*ev
,
5630 struct rpc_pipe_client
*cli
)
5632 struct tevent_req
*req
;
5633 struct rpccli_svcctl_EnumServiceGroupW_state
*state
;
5634 struct tevent_req
*subreq
;
5636 req
= tevent_req_create(mem_ctx
, &state
,
5637 struct rpccli_svcctl_EnumServiceGroupW_state
);
5641 state
->out_mem_ctx
= NULL
;
5642 state
->dispatch_recv
= cli
->dispatch_recv
;
5646 /* Out parameters */
5649 ZERO_STRUCT(state
->orig
.out
.result
);
5651 /* make a temporary copy, that we pass to the dispatch function */
5652 state
->tmp
= state
->orig
;
5654 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5656 NDR_SVCCTL_ENUMSERVICEGROUPW
,
5658 if (tevent_req_nomem(subreq
, req
)) {
5659 return tevent_req_post(req
, ev
);
5661 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumServiceGroupW_done
, req
);
5665 static void rpccli_svcctl_EnumServiceGroupW_done(struct tevent_req
*subreq
)
5667 struct tevent_req
*req
= tevent_req_callback_data(
5668 subreq
, struct tevent_req
);
5669 struct rpccli_svcctl_EnumServiceGroupW_state
*state
= tevent_req_data(
5670 req
, struct rpccli_svcctl_EnumServiceGroupW_state
);
5672 TALLOC_CTX
*mem_ctx
;
5674 if (state
->out_mem_ctx
) {
5675 mem_ctx
= state
->out_mem_ctx
;
5680 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5681 TALLOC_FREE(subreq
);
5682 if (!NT_STATUS_IS_OK(status
)) {
5683 tevent_req_nterror(req
, status
);
5687 /* Copy out parameters */
5690 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5692 /* Reset temporary structure */
5693 ZERO_STRUCT(state
->tmp
);
5695 tevent_req_done(req
);
5698 NTSTATUS
rpccli_svcctl_EnumServiceGroupW_recv(struct tevent_req
*req
,
5699 TALLOC_CTX
*mem_ctx
,
5702 struct rpccli_svcctl_EnumServiceGroupW_state
*state
= tevent_req_data(
5703 req
, struct rpccli_svcctl_EnumServiceGroupW_state
);
5706 if (tevent_req_is_nterror(req
, &status
)) {
5707 tevent_req_received(req
);
5711 /* Steal possbile out parameters to the callers context */
5712 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5715 *result
= state
->orig
.out
.result
;
5717 tevent_req_received(req
);
5718 return NT_STATUS_OK
;
5721 NTSTATUS
rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client
*cli
,
5722 TALLOC_CTX
*mem_ctx
,
5725 struct svcctl_EnumServiceGroupW r
;
5730 status
= cli
->dispatch(cli
,
5733 NDR_SVCCTL_ENUMSERVICEGROUPW
,
5736 if (!NT_STATUS_IS_OK(status
)) {
5740 if (NT_STATUS_IS_ERR(status
)) {
5744 /* Return variables */
5748 *werror
= r
.out
.result
;
5751 return werror_to_ntstatus(r
.out
.result
);
5754 struct rpccli_svcctl_ChangeServiceConfig2A_state
{
5755 struct svcctl_ChangeServiceConfig2A orig
;
5756 struct svcctl_ChangeServiceConfig2A tmp
;
5757 TALLOC_CTX
*out_mem_ctx
;
5758 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5761 static void rpccli_svcctl_ChangeServiceConfig2A_done(struct tevent_req
*subreq
);
5763 struct tevent_req
*rpccli_svcctl_ChangeServiceConfig2A_send(TALLOC_CTX
*mem_ctx
,
5764 struct tevent_context
*ev
,
5765 struct rpc_pipe_client
*cli
,
5766 struct policy_handle
*_handle
/* [in] [ref] */,
5767 uint32_t _info_level
/* [in] */,
5768 uint8_t *_info
/* [in] [unique] */)
5770 struct tevent_req
*req
;
5771 struct rpccli_svcctl_ChangeServiceConfig2A_state
*state
;
5772 struct tevent_req
*subreq
;
5774 req
= tevent_req_create(mem_ctx
, &state
,
5775 struct rpccli_svcctl_ChangeServiceConfig2A_state
);
5779 state
->out_mem_ctx
= NULL
;
5780 state
->dispatch_recv
= cli
->dispatch_recv
;
5783 state
->orig
.in
.handle
= _handle
;
5784 state
->orig
.in
.info_level
= _info_level
;
5785 state
->orig
.in
.info
= _info
;
5787 /* Out parameters */
5790 ZERO_STRUCT(state
->orig
.out
.result
);
5792 /* make a temporary copy, that we pass to the dispatch function */
5793 state
->tmp
= state
->orig
;
5795 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5797 NDR_SVCCTL_CHANGESERVICECONFIG2A
,
5799 if (tevent_req_nomem(subreq
, req
)) {
5800 return tevent_req_post(req
, ev
);
5802 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfig2A_done
, req
);
5806 static void rpccli_svcctl_ChangeServiceConfig2A_done(struct tevent_req
*subreq
)
5808 struct tevent_req
*req
= tevent_req_callback_data(
5809 subreq
, struct tevent_req
);
5810 struct rpccli_svcctl_ChangeServiceConfig2A_state
*state
= tevent_req_data(
5811 req
, struct rpccli_svcctl_ChangeServiceConfig2A_state
);
5813 TALLOC_CTX
*mem_ctx
;
5815 if (state
->out_mem_ctx
) {
5816 mem_ctx
= state
->out_mem_ctx
;
5821 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5822 TALLOC_FREE(subreq
);
5823 if (!NT_STATUS_IS_OK(status
)) {
5824 tevent_req_nterror(req
, status
);
5828 /* Copy out parameters */
5831 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5833 /* Reset temporary structure */
5834 ZERO_STRUCT(state
->tmp
);
5836 tevent_req_done(req
);
5839 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2A_recv(struct tevent_req
*req
,
5840 TALLOC_CTX
*mem_ctx
,
5843 struct rpccli_svcctl_ChangeServiceConfig2A_state
*state
= tevent_req_data(
5844 req
, struct rpccli_svcctl_ChangeServiceConfig2A_state
);
5847 if (tevent_req_is_nterror(req
, &status
)) {
5848 tevent_req_received(req
);
5852 /* Steal possbile out parameters to the callers context */
5853 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5856 *result
= state
->orig
.out
.result
;
5858 tevent_req_received(req
);
5859 return NT_STATUS_OK
;
5862 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client
*cli
,
5863 TALLOC_CTX
*mem_ctx
,
5864 struct policy_handle
*handle
/* [in] [ref] */,
5865 uint32_t info_level
/* [in] */,
5866 uint8_t *info
/* [in] [unique] */,
5869 struct svcctl_ChangeServiceConfig2A r
;
5873 r
.in
.handle
= handle
;
5874 r
.in
.info_level
= info_level
;
5877 status
= cli
->dispatch(cli
,
5880 NDR_SVCCTL_CHANGESERVICECONFIG2A
,
5883 if (!NT_STATUS_IS_OK(status
)) {
5887 if (NT_STATUS_IS_ERR(status
)) {
5891 /* Return variables */
5895 *werror
= r
.out
.result
;
5898 return werror_to_ntstatus(r
.out
.result
);
5901 struct rpccli_svcctl_ChangeServiceConfig2W_state
{
5902 struct svcctl_ChangeServiceConfig2W orig
;
5903 struct svcctl_ChangeServiceConfig2W tmp
;
5904 TALLOC_CTX
*out_mem_ctx
;
5905 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5908 static void rpccli_svcctl_ChangeServiceConfig2W_done(struct tevent_req
*subreq
);
5910 struct tevent_req
*rpccli_svcctl_ChangeServiceConfig2W_send(TALLOC_CTX
*mem_ctx
,
5911 struct tevent_context
*ev
,
5912 struct rpc_pipe_client
*cli
,
5913 struct policy_handle
*_handle
/* [in] [ref] */,
5914 uint32_t _info_level
/* [in] */,
5915 uint8_t *_info
/* [in] [unique] */)
5917 struct tevent_req
*req
;
5918 struct rpccli_svcctl_ChangeServiceConfig2W_state
*state
;
5919 struct tevent_req
*subreq
;
5921 req
= tevent_req_create(mem_ctx
, &state
,
5922 struct rpccli_svcctl_ChangeServiceConfig2W_state
);
5926 state
->out_mem_ctx
= NULL
;
5927 state
->dispatch_recv
= cli
->dispatch_recv
;
5930 state
->orig
.in
.handle
= _handle
;
5931 state
->orig
.in
.info_level
= _info_level
;
5932 state
->orig
.in
.info
= _info
;
5934 /* Out parameters */
5937 ZERO_STRUCT(state
->orig
.out
.result
);
5939 /* make a temporary copy, that we pass to the dispatch function */
5940 state
->tmp
= state
->orig
;
5942 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5944 NDR_SVCCTL_CHANGESERVICECONFIG2W
,
5946 if (tevent_req_nomem(subreq
, req
)) {
5947 return tevent_req_post(req
, ev
);
5949 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfig2W_done
, req
);
5953 static void rpccli_svcctl_ChangeServiceConfig2W_done(struct tevent_req
*subreq
)
5955 struct tevent_req
*req
= tevent_req_callback_data(
5956 subreq
, struct tevent_req
);
5957 struct rpccli_svcctl_ChangeServiceConfig2W_state
*state
= tevent_req_data(
5958 req
, struct rpccli_svcctl_ChangeServiceConfig2W_state
);
5960 TALLOC_CTX
*mem_ctx
;
5962 if (state
->out_mem_ctx
) {
5963 mem_ctx
= state
->out_mem_ctx
;
5968 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5969 TALLOC_FREE(subreq
);
5970 if (!NT_STATUS_IS_OK(status
)) {
5971 tevent_req_nterror(req
, status
);
5975 /* Copy out parameters */
5978 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5980 /* Reset temporary structure */
5981 ZERO_STRUCT(state
->tmp
);
5983 tevent_req_done(req
);
5986 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2W_recv(struct tevent_req
*req
,
5987 TALLOC_CTX
*mem_ctx
,
5990 struct rpccli_svcctl_ChangeServiceConfig2W_state
*state
= tevent_req_data(
5991 req
, struct rpccli_svcctl_ChangeServiceConfig2W_state
);
5994 if (tevent_req_is_nterror(req
, &status
)) {
5995 tevent_req_received(req
);
5999 /* Steal possbile out parameters to the callers context */
6000 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6003 *result
= state
->orig
.out
.result
;
6005 tevent_req_received(req
);
6006 return NT_STATUS_OK
;
6009 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client
*cli
,
6010 TALLOC_CTX
*mem_ctx
,
6011 struct policy_handle
*handle
/* [in] [ref] */,
6012 uint32_t info_level
/* [in] */,
6013 uint8_t *info
/* [in] [unique] */,
6016 struct svcctl_ChangeServiceConfig2W r
;
6020 r
.in
.handle
= handle
;
6021 r
.in
.info_level
= info_level
;
6024 status
= cli
->dispatch(cli
,
6027 NDR_SVCCTL_CHANGESERVICECONFIG2W
,
6030 if (!NT_STATUS_IS_OK(status
)) {
6034 if (NT_STATUS_IS_ERR(status
)) {
6038 /* Return variables */
6042 *werror
= r
.out
.result
;
6045 return werror_to_ntstatus(r
.out
.result
);
6048 struct rpccli_svcctl_QueryServiceConfig2A_state
{
6049 struct svcctl_QueryServiceConfig2A orig
;
6050 struct svcctl_QueryServiceConfig2A tmp
;
6051 TALLOC_CTX
*out_mem_ctx
;
6052 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6055 static void rpccli_svcctl_QueryServiceConfig2A_done(struct tevent_req
*subreq
);
6057 struct tevent_req
*rpccli_svcctl_QueryServiceConfig2A_send(TALLOC_CTX
*mem_ctx
,
6058 struct tevent_context
*ev
,
6059 struct rpc_pipe_client
*cli
,
6060 struct policy_handle
*_handle
/* [in] [ref] */,
6061 enum svcctl_ConfigLevel _info_level
/* [in] */,
6062 uint8_t *_buffer
/* [out] */,
6063 uint32_t _offered
/* [in] */,
6064 uint32_t *_needed
/* [out] [ref] */)
6066 struct tevent_req
*req
;
6067 struct rpccli_svcctl_QueryServiceConfig2A_state
*state
;
6068 struct tevent_req
*subreq
;
6070 req
= tevent_req_create(mem_ctx
, &state
,
6071 struct rpccli_svcctl_QueryServiceConfig2A_state
);
6075 state
->out_mem_ctx
= NULL
;
6076 state
->dispatch_recv
= cli
->dispatch_recv
;
6079 state
->orig
.in
.handle
= _handle
;
6080 state
->orig
.in
.info_level
= _info_level
;
6081 state
->orig
.in
.offered
= _offered
;
6083 /* Out parameters */
6084 state
->orig
.out
.buffer
= _buffer
;
6085 state
->orig
.out
.needed
= _needed
;
6088 ZERO_STRUCT(state
->orig
.out
.result
);
6090 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6091 "rpccli_svcctl_QueryServiceConfig2A_out_memory");
6092 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6093 return tevent_req_post(req
, ev
);
6096 /* make a temporary copy, that we pass to the dispatch function */
6097 state
->tmp
= state
->orig
;
6099 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6101 NDR_SVCCTL_QUERYSERVICECONFIG2A
,
6103 if (tevent_req_nomem(subreq
, req
)) {
6104 return tevent_req_post(req
, ev
);
6106 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfig2A_done
, req
);
6110 static void rpccli_svcctl_QueryServiceConfig2A_done(struct tevent_req
*subreq
)
6112 struct tevent_req
*req
= tevent_req_callback_data(
6113 subreq
, struct tevent_req
);
6114 struct rpccli_svcctl_QueryServiceConfig2A_state
*state
= tevent_req_data(
6115 req
, struct rpccli_svcctl_QueryServiceConfig2A_state
);
6117 TALLOC_CTX
*mem_ctx
;
6119 if (state
->out_mem_ctx
) {
6120 mem_ctx
= state
->out_mem_ctx
;
6125 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6126 TALLOC_FREE(subreq
);
6127 if (!NT_STATUS_IS_OK(status
)) {
6128 tevent_req_nterror(req
, status
);
6132 /* Copy out parameters */
6133 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.buffer
));
6134 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
6137 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6139 /* Reset temporary structure */
6140 ZERO_STRUCT(state
->tmp
);
6142 tevent_req_done(req
);
6145 NTSTATUS
rpccli_svcctl_QueryServiceConfig2A_recv(struct tevent_req
*req
,
6146 TALLOC_CTX
*mem_ctx
,
6149 struct rpccli_svcctl_QueryServiceConfig2A_state
*state
= tevent_req_data(
6150 req
, struct rpccli_svcctl_QueryServiceConfig2A_state
);
6153 if (tevent_req_is_nterror(req
, &status
)) {
6154 tevent_req_received(req
);
6158 /* Steal possbile out parameters to the callers context */
6159 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6162 *result
= state
->orig
.out
.result
;
6164 tevent_req_received(req
);
6165 return NT_STATUS_OK
;
6168 NTSTATUS
rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client
*cli
,
6169 TALLOC_CTX
*mem_ctx
,
6170 struct policy_handle
*handle
/* [in] [ref] */,
6171 enum svcctl_ConfigLevel info_level
/* [in] */,
6172 uint8_t *buffer
/* [out] */,
6173 uint32_t offered
/* [in] */,
6174 uint32_t *needed
/* [out] [ref] */,
6177 struct svcctl_QueryServiceConfig2A r
;
6181 r
.in
.handle
= handle
;
6182 r
.in
.info_level
= info_level
;
6183 r
.in
.offered
= offered
;
6185 status
= cli
->dispatch(cli
,
6188 NDR_SVCCTL_QUERYSERVICECONFIG2A
,
6191 if (!NT_STATUS_IS_OK(status
)) {
6195 if (NT_STATUS_IS_ERR(status
)) {
6199 /* Return variables */
6200 memcpy(buffer
, r
.out
.buffer
, (r
.in
.offered
) * sizeof(*buffer
));
6201 *needed
= *r
.out
.needed
;
6205 *werror
= r
.out
.result
;
6208 return werror_to_ntstatus(r
.out
.result
);
6211 struct rpccli_svcctl_QueryServiceConfig2W_state
{
6212 struct svcctl_QueryServiceConfig2W orig
;
6213 struct svcctl_QueryServiceConfig2W tmp
;
6214 TALLOC_CTX
*out_mem_ctx
;
6215 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6218 static void rpccli_svcctl_QueryServiceConfig2W_done(struct tevent_req
*subreq
);
6220 struct tevent_req
*rpccli_svcctl_QueryServiceConfig2W_send(TALLOC_CTX
*mem_ctx
,
6221 struct tevent_context
*ev
,
6222 struct rpc_pipe_client
*cli
,
6223 struct policy_handle
*_handle
/* [in] [ref] */,
6224 enum svcctl_ConfigLevel _info_level
/* [in] */,
6225 uint8_t *_buffer
/* [out] [ref,size_is(offered)] */,
6226 uint32_t _offered
/* [in] [range(0,8192)] */,
6227 uint32_t *_needed
/* [out] [ref,range(0,8192)] */)
6229 struct tevent_req
*req
;
6230 struct rpccli_svcctl_QueryServiceConfig2W_state
*state
;
6231 struct tevent_req
*subreq
;
6233 req
= tevent_req_create(mem_ctx
, &state
,
6234 struct rpccli_svcctl_QueryServiceConfig2W_state
);
6238 state
->out_mem_ctx
= NULL
;
6239 state
->dispatch_recv
= cli
->dispatch_recv
;
6242 state
->orig
.in
.handle
= _handle
;
6243 state
->orig
.in
.info_level
= _info_level
;
6244 state
->orig
.in
.offered
= _offered
;
6246 /* Out parameters */
6247 state
->orig
.out
.buffer
= _buffer
;
6248 state
->orig
.out
.needed
= _needed
;
6251 ZERO_STRUCT(state
->orig
.out
.result
);
6253 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6254 "rpccli_svcctl_QueryServiceConfig2W_out_memory");
6255 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6256 return tevent_req_post(req
, ev
);
6259 /* make a temporary copy, that we pass to the dispatch function */
6260 state
->tmp
= state
->orig
;
6262 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6264 NDR_SVCCTL_QUERYSERVICECONFIG2W
,
6266 if (tevent_req_nomem(subreq
, req
)) {
6267 return tevent_req_post(req
, ev
);
6269 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfig2W_done
, req
);
6273 static void rpccli_svcctl_QueryServiceConfig2W_done(struct tevent_req
*subreq
)
6275 struct tevent_req
*req
= tevent_req_callback_data(
6276 subreq
, struct tevent_req
);
6277 struct rpccli_svcctl_QueryServiceConfig2W_state
*state
= tevent_req_data(
6278 req
, struct rpccli_svcctl_QueryServiceConfig2W_state
);
6280 TALLOC_CTX
*mem_ctx
;
6282 if (state
->out_mem_ctx
) {
6283 mem_ctx
= state
->out_mem_ctx
;
6288 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6289 TALLOC_FREE(subreq
);
6290 if (!NT_STATUS_IS_OK(status
)) {
6291 tevent_req_nterror(req
, status
);
6295 /* Copy out parameters */
6296 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.buffer
));
6297 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
6300 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6302 /* Reset temporary structure */
6303 ZERO_STRUCT(state
->tmp
);
6305 tevent_req_done(req
);
6308 NTSTATUS
rpccli_svcctl_QueryServiceConfig2W_recv(struct tevent_req
*req
,
6309 TALLOC_CTX
*mem_ctx
,
6312 struct rpccli_svcctl_QueryServiceConfig2W_state
*state
= tevent_req_data(
6313 req
, struct rpccli_svcctl_QueryServiceConfig2W_state
);
6316 if (tevent_req_is_nterror(req
, &status
)) {
6317 tevent_req_received(req
);
6321 /* Steal possbile out parameters to the callers context */
6322 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6325 *result
= state
->orig
.out
.result
;
6327 tevent_req_received(req
);
6328 return NT_STATUS_OK
;
6331 NTSTATUS
rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client
*cli
,
6332 TALLOC_CTX
*mem_ctx
,
6333 struct policy_handle
*handle
/* [in] [ref] */,
6334 enum svcctl_ConfigLevel info_level
/* [in] */,
6335 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
6336 uint32_t offered
/* [in] [range(0,8192)] */,
6337 uint32_t *needed
/* [out] [ref,range(0,8192)] */,
6340 struct svcctl_QueryServiceConfig2W r
;
6344 r
.in
.handle
= handle
;
6345 r
.in
.info_level
= info_level
;
6346 r
.in
.offered
= offered
;
6348 status
= cli
->dispatch(cli
,
6351 NDR_SVCCTL_QUERYSERVICECONFIG2W
,
6354 if (!NT_STATUS_IS_OK(status
)) {
6358 if (NT_STATUS_IS_ERR(status
)) {
6362 /* Return variables */
6363 memcpy(buffer
, r
.out
.buffer
, (r
.in
.offered
) * sizeof(*buffer
));
6364 *needed
= *r
.out
.needed
;
6368 *werror
= r
.out
.result
;
6371 return werror_to_ntstatus(r
.out
.result
);
6374 struct rpccli_svcctl_QueryServiceStatusEx_state
{
6375 struct svcctl_QueryServiceStatusEx orig
;
6376 struct svcctl_QueryServiceStatusEx tmp
;
6377 TALLOC_CTX
*out_mem_ctx
;
6378 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6381 static void rpccli_svcctl_QueryServiceStatusEx_done(struct tevent_req
*subreq
);
6383 struct tevent_req
*rpccli_svcctl_QueryServiceStatusEx_send(TALLOC_CTX
*mem_ctx
,
6384 struct tevent_context
*ev
,
6385 struct rpc_pipe_client
*cli
,
6386 struct policy_handle
*_handle
/* [in] [ref] */,
6387 enum svcctl_StatusLevel _info_level
/* [in] */,
6388 uint8_t *_buffer
/* [out] [ref,size_is(offered)] */,
6389 uint32_t _offered
/* [in] [range(0,8192)] */,
6390 uint32_t *_needed
/* [out] [ref,range(0,8192)] */)
6392 struct tevent_req
*req
;
6393 struct rpccli_svcctl_QueryServiceStatusEx_state
*state
;
6394 struct tevent_req
*subreq
;
6396 req
= tevent_req_create(mem_ctx
, &state
,
6397 struct rpccli_svcctl_QueryServiceStatusEx_state
);
6401 state
->out_mem_ctx
= NULL
;
6402 state
->dispatch_recv
= cli
->dispatch_recv
;
6405 state
->orig
.in
.handle
= _handle
;
6406 state
->orig
.in
.info_level
= _info_level
;
6407 state
->orig
.in
.offered
= _offered
;
6409 /* Out parameters */
6410 state
->orig
.out
.buffer
= _buffer
;
6411 state
->orig
.out
.needed
= _needed
;
6414 ZERO_STRUCT(state
->orig
.out
.result
);
6416 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6417 "rpccli_svcctl_QueryServiceStatusEx_out_memory");
6418 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6419 return tevent_req_post(req
, ev
);
6422 /* make a temporary copy, that we pass to the dispatch function */
6423 state
->tmp
= state
->orig
;
6425 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6427 NDR_SVCCTL_QUERYSERVICESTATUSEX
,
6429 if (tevent_req_nomem(subreq
, req
)) {
6430 return tevent_req_post(req
, ev
);
6432 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceStatusEx_done
, req
);
6436 static void rpccli_svcctl_QueryServiceStatusEx_done(struct tevent_req
*subreq
)
6438 struct tevent_req
*req
= tevent_req_callback_data(
6439 subreq
, struct tevent_req
);
6440 struct rpccli_svcctl_QueryServiceStatusEx_state
*state
= tevent_req_data(
6441 req
, struct rpccli_svcctl_QueryServiceStatusEx_state
);
6443 TALLOC_CTX
*mem_ctx
;
6445 if (state
->out_mem_ctx
) {
6446 mem_ctx
= state
->out_mem_ctx
;
6451 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6452 TALLOC_FREE(subreq
);
6453 if (!NT_STATUS_IS_OK(status
)) {
6454 tevent_req_nterror(req
, status
);
6458 /* Copy out parameters */
6459 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.buffer
));
6460 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
6463 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6465 /* Reset temporary structure */
6466 ZERO_STRUCT(state
->tmp
);
6468 tevent_req_done(req
);
6471 NTSTATUS
rpccli_svcctl_QueryServiceStatusEx_recv(struct tevent_req
*req
,
6472 TALLOC_CTX
*mem_ctx
,
6475 struct rpccli_svcctl_QueryServiceStatusEx_state
*state
= tevent_req_data(
6476 req
, struct rpccli_svcctl_QueryServiceStatusEx_state
);
6479 if (tevent_req_is_nterror(req
, &status
)) {
6480 tevent_req_received(req
);
6484 /* Steal possbile out parameters to the callers context */
6485 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6488 *result
= state
->orig
.out
.result
;
6490 tevent_req_received(req
);
6491 return NT_STATUS_OK
;
6494 NTSTATUS
rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client
*cli
,
6495 TALLOC_CTX
*mem_ctx
,
6496 struct policy_handle
*handle
/* [in] [ref] */,
6497 enum svcctl_StatusLevel info_level
/* [in] */,
6498 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
6499 uint32_t offered
/* [in] [range(0,8192)] */,
6500 uint32_t *needed
/* [out] [ref,range(0,8192)] */,
6503 struct svcctl_QueryServiceStatusEx r
;
6507 r
.in
.handle
= handle
;
6508 r
.in
.info_level
= info_level
;
6509 r
.in
.offered
= offered
;
6511 status
= cli
->dispatch(cli
,
6514 NDR_SVCCTL_QUERYSERVICESTATUSEX
,
6517 if (!NT_STATUS_IS_OK(status
)) {
6521 if (NT_STATUS_IS_ERR(status
)) {
6525 /* Return variables */
6526 memcpy(buffer
, r
.out
.buffer
, (r
.in
.offered
) * sizeof(*buffer
));
6527 *needed
= *r
.out
.needed
;
6531 *werror
= r
.out
.result
;
6534 return werror_to_ntstatus(r
.out
.result
);
6537 struct rpccli_EnumServicesStatusExA_state
{
6538 struct EnumServicesStatusExA orig
;
6539 struct EnumServicesStatusExA tmp
;
6540 TALLOC_CTX
*out_mem_ctx
;
6541 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6544 static void rpccli_EnumServicesStatusExA_done(struct tevent_req
*subreq
);
6546 struct tevent_req
*rpccli_EnumServicesStatusExA_send(TALLOC_CTX
*mem_ctx
,
6547 struct tevent_context
*ev
,
6548 struct rpc_pipe_client
*cli
,
6549 struct policy_handle
*_scmanager
/* [in] [ref] */,
6550 uint32_t _info_level
/* [in] */,
6551 uint32_t _type
/* [in] */,
6552 enum svcctl_ServiceState _state
/* [in] */,
6553 uint8_t *_services
/* [out] */,
6554 uint32_t _offered
/* [in] */,
6555 uint32_t *_needed
/* [out] [ref] */,
6556 uint32_t *_service_returned
/* [out] [ref] */,
6557 uint32_t *_resume_handle
/* [in,out] [unique] */,
6558 const char **_group_name
/* [out] [ref,charset(UTF16)] */)
6560 struct tevent_req
*req
;
6561 struct rpccli_EnumServicesStatusExA_state
*state
;
6562 struct tevent_req
*subreq
;
6564 req
= tevent_req_create(mem_ctx
, &state
,
6565 struct rpccli_EnumServicesStatusExA_state
);
6569 state
->out_mem_ctx
= NULL
;
6570 state
->dispatch_recv
= cli
->dispatch_recv
;
6573 state
->orig
.in
.scmanager
= _scmanager
;
6574 state
->orig
.in
.info_level
= _info_level
;
6575 state
->orig
.in
.type
= _type
;
6576 state
->orig
.in
.state
= _state
;
6577 state
->orig
.in
.offered
= _offered
;
6578 state
->orig
.in
.resume_handle
= _resume_handle
;
6580 /* Out parameters */
6581 state
->orig
.out
.services
= _services
;
6582 state
->orig
.out
.needed
= _needed
;
6583 state
->orig
.out
.service_returned
= _service_returned
;
6584 state
->orig
.out
.resume_handle
= _resume_handle
;
6585 state
->orig
.out
.group_name
= _group_name
;
6588 ZERO_STRUCT(state
->orig
.out
.result
);
6590 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6591 "rpccli_EnumServicesStatusExA_out_memory");
6592 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6593 return tevent_req_post(req
, ev
);
6596 /* make a temporary copy, that we pass to the dispatch function */
6597 state
->tmp
= state
->orig
;
6599 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6601 NDR_ENUMSERVICESSTATUSEXA
,
6603 if (tevent_req_nomem(subreq
, req
)) {
6604 return tevent_req_post(req
, ev
);
6606 tevent_req_set_callback(subreq
, rpccli_EnumServicesStatusExA_done
, req
);
6610 static void rpccli_EnumServicesStatusExA_done(struct tevent_req
*subreq
)
6612 struct tevent_req
*req
= tevent_req_callback_data(
6613 subreq
, struct tevent_req
);
6614 struct rpccli_EnumServicesStatusExA_state
*state
= tevent_req_data(
6615 req
, struct rpccli_EnumServicesStatusExA_state
);
6617 TALLOC_CTX
*mem_ctx
;
6619 if (state
->out_mem_ctx
) {
6620 mem_ctx
= state
->out_mem_ctx
;
6625 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6626 TALLOC_FREE(subreq
);
6627 if (!NT_STATUS_IS_OK(status
)) {
6628 tevent_req_nterror(req
, status
);
6632 /* Copy out parameters */
6633 memcpy(state
->orig
.out
.services
, state
->tmp
.out
.services
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.services
));
6634 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
6635 *state
->orig
.out
.service_returned
= *state
->tmp
.out
.service_returned
;
6636 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
6637 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
6639 *state
->orig
.out
.group_name
= *state
->tmp
.out
.group_name
;
6642 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6644 /* Reset temporary structure */
6645 ZERO_STRUCT(state
->tmp
);
6647 tevent_req_done(req
);
6650 NTSTATUS
rpccli_EnumServicesStatusExA_recv(struct tevent_req
*req
,
6651 TALLOC_CTX
*mem_ctx
,
6654 struct rpccli_EnumServicesStatusExA_state
*state
= tevent_req_data(
6655 req
, struct rpccli_EnumServicesStatusExA_state
);
6658 if (tevent_req_is_nterror(req
, &status
)) {
6659 tevent_req_received(req
);
6663 /* Steal possbile out parameters to the callers context */
6664 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6667 *result
= state
->orig
.out
.result
;
6669 tevent_req_received(req
);
6670 return NT_STATUS_OK
;
6673 NTSTATUS
rpccli_EnumServicesStatusExA(struct rpc_pipe_client
*cli
,
6674 TALLOC_CTX
*mem_ctx
,
6675 struct policy_handle
*scmanager
/* [in] [ref] */,
6676 uint32_t info_level
/* [in] */,
6677 uint32_t type
/* [in] */,
6678 enum svcctl_ServiceState state
/* [in] */,
6679 uint8_t *services
/* [out] */,
6680 uint32_t offered
/* [in] */,
6681 uint32_t *needed
/* [out] [ref] */,
6682 uint32_t *service_returned
/* [out] [ref] */,
6683 uint32_t *resume_handle
/* [in,out] [unique] */,
6684 const char **group_name
/* [out] [ref,charset(UTF16)] */,
6687 struct EnumServicesStatusExA r
;
6691 r
.in
.scmanager
= scmanager
;
6692 r
.in
.info_level
= info_level
;
6695 r
.in
.offered
= offered
;
6696 r
.in
.resume_handle
= resume_handle
;
6698 status
= cli
->dispatch(cli
,
6701 NDR_ENUMSERVICESSTATUSEXA
,
6704 if (!NT_STATUS_IS_OK(status
)) {
6708 if (NT_STATUS_IS_ERR(status
)) {
6712 /* Return variables */
6713 memcpy(services
, r
.out
.services
, (r
.in
.offered
) * sizeof(*services
));
6714 *needed
= *r
.out
.needed
;
6715 *service_returned
= *r
.out
.service_returned
;
6716 if (resume_handle
&& r
.out
.resume_handle
) {
6717 *resume_handle
= *r
.out
.resume_handle
;
6719 *group_name
= *r
.out
.group_name
;
6723 *werror
= r
.out
.result
;
6726 return werror_to_ntstatus(r
.out
.result
);
6729 struct rpccli_EnumServicesStatusExW_state
{
6730 struct EnumServicesStatusExW orig
;
6731 struct EnumServicesStatusExW tmp
;
6732 TALLOC_CTX
*out_mem_ctx
;
6733 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6736 static void rpccli_EnumServicesStatusExW_done(struct tevent_req
*subreq
);
6738 struct tevent_req
*rpccli_EnumServicesStatusExW_send(TALLOC_CTX
*mem_ctx
,
6739 struct tevent_context
*ev
,
6740 struct rpc_pipe_client
*cli
,
6741 struct policy_handle
*_scmanager
/* [in] [ref] */,
6742 uint32_t _info_level
/* [in] */,
6743 uint32_t _type
/* [in] */,
6744 enum svcctl_ServiceState _state
/* [in] */,
6745 uint8_t *_services
/* [out] [ref,size_is(offered)] */,
6746 uint32_t _offered
/* [in] [range(0,0x40000)] */,
6747 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */,
6748 uint32_t *_service_returned
/* [out] [ref,range(0,0x40000)] */,
6749 uint32_t *_resume_handle
/* [in,out] [unique,range(0,0x40000)] */,
6750 const char *_group_name
/* [in] [unique,charset(UTF16)] */)
6752 struct tevent_req
*req
;
6753 struct rpccli_EnumServicesStatusExW_state
*state
;
6754 struct tevent_req
*subreq
;
6756 req
= tevent_req_create(mem_ctx
, &state
,
6757 struct rpccli_EnumServicesStatusExW_state
);
6761 state
->out_mem_ctx
= NULL
;
6762 state
->dispatch_recv
= cli
->dispatch_recv
;
6765 state
->orig
.in
.scmanager
= _scmanager
;
6766 state
->orig
.in
.info_level
= _info_level
;
6767 state
->orig
.in
.type
= _type
;
6768 state
->orig
.in
.state
= _state
;
6769 state
->orig
.in
.offered
= _offered
;
6770 state
->orig
.in
.resume_handle
= _resume_handle
;
6771 state
->orig
.in
.group_name
= _group_name
;
6773 /* Out parameters */
6774 state
->orig
.out
.services
= _services
;
6775 state
->orig
.out
.needed
= _needed
;
6776 state
->orig
.out
.service_returned
= _service_returned
;
6777 state
->orig
.out
.resume_handle
= _resume_handle
;
6780 ZERO_STRUCT(state
->orig
.out
.result
);
6782 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6783 "rpccli_EnumServicesStatusExW_out_memory");
6784 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6785 return tevent_req_post(req
, ev
);
6788 /* make a temporary copy, that we pass to the dispatch function */
6789 state
->tmp
= state
->orig
;
6791 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6793 NDR_ENUMSERVICESSTATUSEXW
,
6795 if (tevent_req_nomem(subreq
, req
)) {
6796 return tevent_req_post(req
, ev
);
6798 tevent_req_set_callback(subreq
, rpccli_EnumServicesStatusExW_done
, req
);
6802 static void rpccli_EnumServicesStatusExW_done(struct tevent_req
*subreq
)
6804 struct tevent_req
*req
= tevent_req_callback_data(
6805 subreq
, struct tevent_req
);
6806 struct rpccli_EnumServicesStatusExW_state
*state
= tevent_req_data(
6807 req
, struct rpccli_EnumServicesStatusExW_state
);
6809 TALLOC_CTX
*mem_ctx
;
6811 if (state
->out_mem_ctx
) {
6812 mem_ctx
= state
->out_mem_ctx
;
6817 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6818 TALLOC_FREE(subreq
);
6819 if (!NT_STATUS_IS_OK(status
)) {
6820 tevent_req_nterror(req
, status
);
6824 /* Copy out parameters */
6825 memcpy(state
->orig
.out
.services
, state
->tmp
.out
.services
, (state
->tmp
.in
.offered
) * sizeof(*state
->orig
.out
.services
));
6826 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
6827 *state
->orig
.out
.service_returned
= *state
->tmp
.out
.service_returned
;
6828 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
6829 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
6833 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6835 /* Reset temporary structure */
6836 ZERO_STRUCT(state
->tmp
);
6838 tevent_req_done(req
);
6841 NTSTATUS
rpccli_EnumServicesStatusExW_recv(struct tevent_req
*req
,
6842 TALLOC_CTX
*mem_ctx
,
6845 struct rpccli_EnumServicesStatusExW_state
*state
= tevent_req_data(
6846 req
, struct rpccli_EnumServicesStatusExW_state
);
6849 if (tevent_req_is_nterror(req
, &status
)) {
6850 tevent_req_received(req
);
6854 /* Steal possbile out parameters to the callers context */
6855 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6858 *result
= state
->orig
.out
.result
;
6860 tevent_req_received(req
);
6861 return NT_STATUS_OK
;
6864 NTSTATUS
rpccli_EnumServicesStatusExW(struct rpc_pipe_client
*cli
,
6865 TALLOC_CTX
*mem_ctx
,
6866 struct policy_handle
*scmanager
/* [in] [ref] */,
6867 uint32_t info_level
/* [in] */,
6868 uint32_t type
/* [in] */,
6869 enum svcctl_ServiceState state
/* [in] */,
6870 uint8_t *services
/* [out] [ref,size_is(offered)] */,
6871 uint32_t offered
/* [in] [range(0,0x40000)] */,
6872 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
6873 uint32_t *service_returned
/* [out] [ref,range(0,0x40000)] */,
6874 uint32_t *resume_handle
/* [in,out] [unique,range(0,0x40000)] */,
6875 const char *group_name
/* [in] [unique,charset(UTF16)] */,
6878 struct EnumServicesStatusExW r
;
6882 r
.in
.scmanager
= scmanager
;
6883 r
.in
.info_level
= info_level
;
6886 r
.in
.offered
= offered
;
6887 r
.in
.resume_handle
= resume_handle
;
6888 r
.in
.group_name
= group_name
;
6890 status
= cli
->dispatch(cli
,
6893 NDR_ENUMSERVICESSTATUSEXW
,
6896 if (!NT_STATUS_IS_OK(status
)) {
6900 if (NT_STATUS_IS_ERR(status
)) {
6904 /* Return variables */
6905 memcpy(services
, r
.out
.services
, (r
.in
.offered
) * sizeof(*services
));
6906 *needed
= *r
.out
.needed
;
6907 *service_returned
= *r
.out
.service_returned
;
6908 if (resume_handle
&& r
.out
.resume_handle
) {
6909 *resume_handle
= *r
.out
.resume_handle
;
6914 *werror
= r
.out
.result
;
6917 return werror_to_ntstatus(r
.out
.result
);
6920 struct rpccli_svcctl_SCSendTSMessage_state
{
6921 struct svcctl_SCSendTSMessage orig
;
6922 struct svcctl_SCSendTSMessage tmp
;
6923 TALLOC_CTX
*out_mem_ctx
;
6924 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6927 static void rpccli_svcctl_SCSendTSMessage_done(struct tevent_req
*subreq
);
6929 struct tevent_req
*rpccli_svcctl_SCSendTSMessage_send(TALLOC_CTX
*mem_ctx
,
6930 struct tevent_context
*ev
,
6931 struct rpc_pipe_client
*cli
)
6933 struct tevent_req
*req
;
6934 struct rpccli_svcctl_SCSendTSMessage_state
*state
;
6935 struct tevent_req
*subreq
;
6937 req
= tevent_req_create(mem_ctx
, &state
,
6938 struct rpccli_svcctl_SCSendTSMessage_state
);
6942 state
->out_mem_ctx
= NULL
;
6943 state
->dispatch_recv
= cli
->dispatch_recv
;
6947 /* Out parameters */
6950 ZERO_STRUCT(state
->orig
.out
.result
);
6952 /* make a temporary copy, that we pass to the dispatch function */
6953 state
->tmp
= state
->orig
;
6955 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6957 NDR_SVCCTL_SCSENDTSMESSAGE
,
6959 if (tevent_req_nomem(subreq
, req
)) {
6960 return tevent_req_post(req
, ev
);
6962 tevent_req_set_callback(subreq
, rpccli_svcctl_SCSendTSMessage_done
, req
);
6966 static void rpccli_svcctl_SCSendTSMessage_done(struct tevent_req
*subreq
)
6968 struct tevent_req
*req
= tevent_req_callback_data(
6969 subreq
, struct tevent_req
);
6970 struct rpccli_svcctl_SCSendTSMessage_state
*state
= tevent_req_data(
6971 req
, struct rpccli_svcctl_SCSendTSMessage_state
);
6973 TALLOC_CTX
*mem_ctx
;
6975 if (state
->out_mem_ctx
) {
6976 mem_ctx
= state
->out_mem_ctx
;
6981 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6982 TALLOC_FREE(subreq
);
6983 if (!NT_STATUS_IS_OK(status
)) {
6984 tevent_req_nterror(req
, status
);
6988 /* Copy out parameters */
6991 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6993 /* Reset temporary structure */
6994 ZERO_STRUCT(state
->tmp
);
6996 tevent_req_done(req
);
6999 NTSTATUS
rpccli_svcctl_SCSendTSMessage_recv(struct tevent_req
*req
,
7000 TALLOC_CTX
*mem_ctx
,
7003 struct rpccli_svcctl_SCSendTSMessage_state
*state
= tevent_req_data(
7004 req
, struct rpccli_svcctl_SCSendTSMessage_state
);
7007 if (tevent_req_is_nterror(req
, &status
)) {
7008 tevent_req_received(req
);
7012 /* Steal possbile out parameters to the callers context */
7013 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7016 *result
= state
->orig
.out
.result
;
7018 tevent_req_received(req
);
7019 return NT_STATUS_OK
;
7022 NTSTATUS
rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client
*cli
,
7023 TALLOC_CTX
*mem_ctx
,
7026 struct svcctl_SCSendTSMessage r
;
7031 status
= cli
->dispatch(cli
,
7034 NDR_SVCCTL_SCSENDTSMESSAGE
,
7037 if (!NT_STATUS_IS_OK(status
)) {
7041 if (NT_STATUS_IS_ERR(status
)) {
7045 /* Return variables */
7049 *werror
= r
.out
.result
;
7052 return werror_to_ntstatus(r
.out
.result
);