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 if (DEBUGLEVEL
>= 10) {
45 NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle
, &state
->orig
);
48 state
->out_mem_ctx
= talloc_named_const(state
, 0,
49 "rpccli_svcctl_CloseServiceHandle_out_memory");
50 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
51 return tevent_req_post(req
, ev
);
54 /* make a temporary copy, that we pass to the dispatch function */
55 state
->tmp
= state
->orig
;
57 subreq
= cli
->dispatch_send(state
, ev
, cli
,
59 NDR_SVCCTL_CLOSESERVICEHANDLE
,
61 if (tevent_req_nomem(subreq
, req
)) {
62 return tevent_req_post(req
, ev
);
64 tevent_req_set_callback(subreq
, rpccli_svcctl_CloseServiceHandle_done
, req
);
68 static void rpccli_svcctl_CloseServiceHandle_done(struct tevent_req
*subreq
)
70 struct tevent_req
*req
= tevent_req_callback_data(
71 subreq
, struct tevent_req
);
72 struct rpccli_svcctl_CloseServiceHandle_state
*state
= tevent_req_data(
73 req
, struct rpccli_svcctl_CloseServiceHandle_state
);
77 if (state
->out_mem_ctx
) {
78 mem_ctx
= state
->out_mem_ctx
;
83 status
= state
->dispatch_recv(subreq
, mem_ctx
);
85 if (!NT_STATUS_IS_OK(status
)) {
86 tevent_req_nterror(req
, status
);
90 /* Copy out parameters */
91 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
94 state
->orig
.out
.result
= state
->tmp
.out
.result
;
96 /* Reset temporary structure */
97 ZERO_STRUCT(state
->tmp
);
99 if (DEBUGLEVEL
>= 10) {
100 NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle
, &state
->orig
);
103 tevent_req_done(req
);
106 NTSTATUS
rpccli_svcctl_CloseServiceHandle_recv(struct tevent_req
*req
,
110 struct rpccli_svcctl_CloseServiceHandle_state
*state
= tevent_req_data(
111 req
, struct rpccli_svcctl_CloseServiceHandle_state
);
114 if (tevent_req_is_nterror(req
, &status
)) {
115 tevent_req_received(req
);
119 /* Steal possbile out parameters to the callers context */
120 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
123 *result
= state
->orig
.out
.result
;
125 tevent_req_received(req
);
129 NTSTATUS
rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client
*cli
,
131 struct policy_handle
*handle
/* [in,out] [ref] */,
134 struct svcctl_CloseServiceHandle r
;
138 r
.in
.handle
= handle
;
140 if (DEBUGLEVEL
>= 10) {
141 NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle
, &r
);
144 status
= cli
->dispatch(cli
,
147 NDR_SVCCTL_CLOSESERVICEHANDLE
,
150 if (!NT_STATUS_IS_OK(status
)) {
154 if (DEBUGLEVEL
>= 10) {
155 NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle
, &r
);
158 if (NT_STATUS_IS_ERR(status
)) {
162 /* Return variables */
163 *handle
= *r
.out
.handle
;
167 *werror
= r
.out
.result
;
170 return werror_to_ntstatus(r
.out
.result
);
173 struct rpccli_svcctl_ControlService_state
{
174 struct svcctl_ControlService orig
;
175 struct svcctl_ControlService tmp
;
176 TALLOC_CTX
*out_mem_ctx
;
177 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
180 static void rpccli_svcctl_ControlService_done(struct tevent_req
*subreq
);
182 struct tevent_req
*rpccli_svcctl_ControlService_send(TALLOC_CTX
*mem_ctx
,
183 struct tevent_context
*ev
,
184 struct rpc_pipe_client
*cli
,
185 struct policy_handle
*_handle
/* [in] [ref] */,
186 enum SERVICE_CONTROL _control
/* [in] */,
187 struct SERVICE_STATUS
*_service_status
/* [out] [ref] */)
189 struct tevent_req
*req
;
190 struct rpccli_svcctl_ControlService_state
*state
;
191 struct tevent_req
*subreq
;
193 req
= tevent_req_create(mem_ctx
, &state
,
194 struct rpccli_svcctl_ControlService_state
);
198 state
->out_mem_ctx
= NULL
;
199 state
->dispatch_recv
= cli
->dispatch_recv
;
202 state
->orig
.in
.handle
= _handle
;
203 state
->orig
.in
.control
= _control
;
206 state
->orig
.out
.service_status
= _service_status
;
209 ZERO_STRUCT(state
->orig
.out
.result
);
211 if (DEBUGLEVEL
>= 10) {
212 NDR_PRINT_IN_DEBUG(svcctl_ControlService
, &state
->orig
);
215 state
->out_mem_ctx
= talloc_named_const(state
, 0,
216 "rpccli_svcctl_ControlService_out_memory");
217 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
218 return tevent_req_post(req
, ev
);
221 /* make a temporary copy, that we pass to the dispatch function */
222 state
->tmp
= state
->orig
;
224 subreq
= cli
->dispatch_send(state
, ev
, cli
,
226 NDR_SVCCTL_CONTROLSERVICE
,
228 if (tevent_req_nomem(subreq
, req
)) {
229 return tevent_req_post(req
, ev
);
231 tevent_req_set_callback(subreq
, rpccli_svcctl_ControlService_done
, req
);
235 static void rpccli_svcctl_ControlService_done(struct tevent_req
*subreq
)
237 struct tevent_req
*req
= tevent_req_callback_data(
238 subreq
, struct tevent_req
);
239 struct rpccli_svcctl_ControlService_state
*state
= tevent_req_data(
240 req
, struct rpccli_svcctl_ControlService_state
);
244 if (state
->out_mem_ctx
) {
245 mem_ctx
= state
->out_mem_ctx
;
250 status
= state
->dispatch_recv(subreq
, mem_ctx
);
252 if (!NT_STATUS_IS_OK(status
)) {
253 tevent_req_nterror(req
, status
);
257 /* Copy out parameters */
258 *state
->orig
.out
.service_status
= *state
->tmp
.out
.service_status
;
261 state
->orig
.out
.result
= state
->tmp
.out
.result
;
263 /* Reset temporary structure */
264 ZERO_STRUCT(state
->tmp
);
266 if (DEBUGLEVEL
>= 10) {
267 NDR_PRINT_OUT_DEBUG(svcctl_ControlService
, &state
->orig
);
270 tevent_req_done(req
);
273 NTSTATUS
rpccli_svcctl_ControlService_recv(struct tevent_req
*req
,
277 struct rpccli_svcctl_ControlService_state
*state
= tevent_req_data(
278 req
, struct rpccli_svcctl_ControlService_state
);
281 if (tevent_req_is_nterror(req
, &status
)) {
282 tevent_req_received(req
);
286 /* Steal possbile out parameters to the callers context */
287 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
290 *result
= state
->orig
.out
.result
;
292 tevent_req_received(req
);
296 NTSTATUS
rpccli_svcctl_ControlService(struct rpc_pipe_client
*cli
,
298 struct policy_handle
*handle
/* [in] [ref] */,
299 enum SERVICE_CONTROL control
/* [in] */,
300 struct SERVICE_STATUS
*service_status
/* [out] [ref] */,
303 struct svcctl_ControlService r
;
307 r
.in
.handle
= handle
;
308 r
.in
.control
= control
;
310 if (DEBUGLEVEL
>= 10) {
311 NDR_PRINT_IN_DEBUG(svcctl_ControlService
, &r
);
314 status
= cli
->dispatch(cli
,
317 NDR_SVCCTL_CONTROLSERVICE
,
320 if (!NT_STATUS_IS_OK(status
)) {
324 if (DEBUGLEVEL
>= 10) {
325 NDR_PRINT_OUT_DEBUG(svcctl_ControlService
, &r
);
328 if (NT_STATUS_IS_ERR(status
)) {
332 /* Return variables */
333 *service_status
= *r
.out
.service_status
;
337 *werror
= r
.out
.result
;
340 return werror_to_ntstatus(r
.out
.result
);
343 struct rpccli_svcctl_DeleteService_state
{
344 struct svcctl_DeleteService orig
;
345 struct svcctl_DeleteService tmp
;
346 TALLOC_CTX
*out_mem_ctx
;
347 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
350 static void rpccli_svcctl_DeleteService_done(struct tevent_req
*subreq
);
352 struct tevent_req
*rpccli_svcctl_DeleteService_send(TALLOC_CTX
*mem_ctx
,
353 struct tevent_context
*ev
,
354 struct rpc_pipe_client
*cli
,
355 struct policy_handle
*_handle
/* [in] [ref] */)
357 struct tevent_req
*req
;
358 struct rpccli_svcctl_DeleteService_state
*state
;
359 struct tevent_req
*subreq
;
361 req
= tevent_req_create(mem_ctx
, &state
,
362 struct rpccli_svcctl_DeleteService_state
);
366 state
->out_mem_ctx
= NULL
;
367 state
->dispatch_recv
= cli
->dispatch_recv
;
370 state
->orig
.in
.handle
= _handle
;
375 ZERO_STRUCT(state
->orig
.out
.result
);
377 if (DEBUGLEVEL
>= 10) {
378 NDR_PRINT_IN_DEBUG(svcctl_DeleteService
, &state
->orig
);
381 /* make a temporary copy, that we pass to the dispatch function */
382 state
->tmp
= state
->orig
;
384 subreq
= cli
->dispatch_send(state
, ev
, cli
,
386 NDR_SVCCTL_DELETESERVICE
,
388 if (tevent_req_nomem(subreq
, req
)) {
389 return tevent_req_post(req
, ev
);
391 tevent_req_set_callback(subreq
, rpccli_svcctl_DeleteService_done
, req
);
395 static void rpccli_svcctl_DeleteService_done(struct tevent_req
*subreq
)
397 struct tevent_req
*req
= tevent_req_callback_data(
398 subreq
, struct tevent_req
);
399 struct rpccli_svcctl_DeleteService_state
*state
= tevent_req_data(
400 req
, struct rpccli_svcctl_DeleteService_state
);
404 if (state
->out_mem_ctx
) {
405 mem_ctx
= state
->out_mem_ctx
;
410 status
= state
->dispatch_recv(subreq
, mem_ctx
);
412 if (!NT_STATUS_IS_OK(status
)) {
413 tevent_req_nterror(req
, status
);
417 /* Copy out parameters */
420 state
->orig
.out
.result
= state
->tmp
.out
.result
;
422 /* Reset temporary structure */
423 ZERO_STRUCT(state
->tmp
);
425 if (DEBUGLEVEL
>= 10) {
426 NDR_PRINT_OUT_DEBUG(svcctl_DeleteService
, &state
->orig
);
429 tevent_req_done(req
);
432 NTSTATUS
rpccli_svcctl_DeleteService_recv(struct tevent_req
*req
,
436 struct rpccli_svcctl_DeleteService_state
*state
= tevent_req_data(
437 req
, struct rpccli_svcctl_DeleteService_state
);
440 if (tevent_req_is_nterror(req
, &status
)) {
441 tevent_req_received(req
);
445 /* Steal possbile out parameters to the callers context */
446 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
449 *result
= state
->orig
.out
.result
;
451 tevent_req_received(req
);
455 NTSTATUS
rpccli_svcctl_DeleteService(struct rpc_pipe_client
*cli
,
457 struct policy_handle
*handle
/* [in] [ref] */,
460 struct svcctl_DeleteService r
;
464 r
.in
.handle
= handle
;
466 if (DEBUGLEVEL
>= 10) {
467 NDR_PRINT_IN_DEBUG(svcctl_DeleteService
, &r
);
470 status
= cli
->dispatch(cli
,
473 NDR_SVCCTL_DELETESERVICE
,
476 if (!NT_STATUS_IS_OK(status
)) {
480 if (DEBUGLEVEL
>= 10) {
481 NDR_PRINT_OUT_DEBUG(svcctl_DeleteService
, &r
);
484 if (NT_STATUS_IS_ERR(status
)) {
488 /* Return variables */
492 *werror
= r
.out
.result
;
495 return werror_to_ntstatus(r
.out
.result
);
498 struct rpccli_svcctl_LockServiceDatabase_state
{
499 struct svcctl_LockServiceDatabase orig
;
500 struct svcctl_LockServiceDatabase tmp
;
501 TALLOC_CTX
*out_mem_ctx
;
502 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
505 static void rpccli_svcctl_LockServiceDatabase_done(struct tevent_req
*subreq
);
507 struct tevent_req
*rpccli_svcctl_LockServiceDatabase_send(TALLOC_CTX
*mem_ctx
,
508 struct tevent_context
*ev
,
509 struct rpc_pipe_client
*cli
,
510 struct policy_handle
*_handle
/* [in] [ref] */,
511 struct policy_handle
*_lock
/* [out] [ref] */)
513 struct tevent_req
*req
;
514 struct rpccli_svcctl_LockServiceDatabase_state
*state
;
515 struct tevent_req
*subreq
;
517 req
= tevent_req_create(mem_ctx
, &state
,
518 struct rpccli_svcctl_LockServiceDatabase_state
);
522 state
->out_mem_ctx
= NULL
;
523 state
->dispatch_recv
= cli
->dispatch_recv
;
526 state
->orig
.in
.handle
= _handle
;
529 state
->orig
.out
.lock
= _lock
;
532 ZERO_STRUCT(state
->orig
.out
.result
);
534 if (DEBUGLEVEL
>= 10) {
535 NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase
, &state
->orig
);
538 state
->out_mem_ctx
= talloc_named_const(state
, 0,
539 "rpccli_svcctl_LockServiceDatabase_out_memory");
540 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
541 return tevent_req_post(req
, ev
);
544 /* make a temporary copy, that we pass to the dispatch function */
545 state
->tmp
= state
->orig
;
547 subreq
= cli
->dispatch_send(state
, ev
, cli
,
549 NDR_SVCCTL_LOCKSERVICEDATABASE
,
551 if (tevent_req_nomem(subreq
, req
)) {
552 return tevent_req_post(req
, ev
);
554 tevent_req_set_callback(subreq
, rpccli_svcctl_LockServiceDatabase_done
, req
);
558 static void rpccli_svcctl_LockServiceDatabase_done(struct tevent_req
*subreq
)
560 struct tevent_req
*req
= tevent_req_callback_data(
561 subreq
, struct tevent_req
);
562 struct rpccli_svcctl_LockServiceDatabase_state
*state
= tevent_req_data(
563 req
, struct rpccli_svcctl_LockServiceDatabase_state
);
567 if (state
->out_mem_ctx
) {
568 mem_ctx
= state
->out_mem_ctx
;
573 status
= state
->dispatch_recv(subreq
, mem_ctx
);
575 if (!NT_STATUS_IS_OK(status
)) {
576 tevent_req_nterror(req
, status
);
580 /* Copy out parameters */
581 *state
->orig
.out
.lock
= *state
->tmp
.out
.lock
;
584 state
->orig
.out
.result
= state
->tmp
.out
.result
;
586 /* Reset temporary structure */
587 ZERO_STRUCT(state
->tmp
);
589 if (DEBUGLEVEL
>= 10) {
590 NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase
, &state
->orig
);
593 tevent_req_done(req
);
596 NTSTATUS
rpccli_svcctl_LockServiceDatabase_recv(struct tevent_req
*req
,
600 struct rpccli_svcctl_LockServiceDatabase_state
*state
= tevent_req_data(
601 req
, struct rpccli_svcctl_LockServiceDatabase_state
);
604 if (tevent_req_is_nterror(req
, &status
)) {
605 tevent_req_received(req
);
609 /* Steal possbile out parameters to the callers context */
610 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
613 *result
= state
->orig
.out
.result
;
615 tevent_req_received(req
);
619 NTSTATUS
rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client
*cli
,
621 struct policy_handle
*handle
/* [in] [ref] */,
622 struct policy_handle
*lock
/* [out] [ref] */,
625 struct svcctl_LockServiceDatabase r
;
629 r
.in
.handle
= handle
;
631 if (DEBUGLEVEL
>= 10) {
632 NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase
, &r
);
635 status
= cli
->dispatch(cli
,
638 NDR_SVCCTL_LOCKSERVICEDATABASE
,
641 if (!NT_STATUS_IS_OK(status
)) {
645 if (DEBUGLEVEL
>= 10) {
646 NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase
, &r
);
649 if (NT_STATUS_IS_ERR(status
)) {
653 /* Return variables */
658 *werror
= r
.out
.result
;
661 return werror_to_ntstatus(r
.out
.result
);
664 struct rpccli_svcctl_QueryServiceObjectSecurity_state
{
665 struct svcctl_QueryServiceObjectSecurity orig
;
666 struct svcctl_QueryServiceObjectSecurity tmp
;
667 TALLOC_CTX
*out_mem_ctx
;
668 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
671 static void rpccli_svcctl_QueryServiceObjectSecurity_done(struct tevent_req
*subreq
);
673 struct tevent_req
*rpccli_svcctl_QueryServiceObjectSecurity_send(TALLOC_CTX
*mem_ctx
,
674 struct tevent_context
*ev
,
675 struct rpc_pipe_client
*cli
,
676 struct policy_handle
*_handle
/* [in] [ref] */,
677 uint32_t _security_flags
/* [in] */,
678 uint8_t *_buffer
/* [out] [ref,size_is(offered)] */,
679 uint32_t _offered
/* [in] [range(0,0x40000)] */,
680 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */)
682 struct tevent_req
*req
;
683 struct rpccli_svcctl_QueryServiceObjectSecurity_state
*state
;
684 struct tevent_req
*subreq
;
686 req
= tevent_req_create(mem_ctx
, &state
,
687 struct rpccli_svcctl_QueryServiceObjectSecurity_state
);
691 state
->out_mem_ctx
= NULL
;
692 state
->dispatch_recv
= cli
->dispatch_recv
;
695 state
->orig
.in
.handle
= _handle
;
696 state
->orig
.in
.security_flags
= _security_flags
;
697 state
->orig
.in
.offered
= _offered
;
700 state
->orig
.out
.buffer
= _buffer
;
701 state
->orig
.out
.needed
= _needed
;
704 ZERO_STRUCT(state
->orig
.out
.result
);
706 if (DEBUGLEVEL
>= 10) {
707 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity
, &state
->orig
);
710 state
->out_mem_ctx
= talloc_named_const(state
, 0,
711 "rpccli_svcctl_QueryServiceObjectSecurity_out_memory");
712 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
713 return tevent_req_post(req
, ev
);
716 /* make a temporary copy, that we pass to the dispatch function */
717 state
->tmp
= state
->orig
;
719 subreq
= cli
->dispatch_send(state
, ev
, cli
,
721 NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY
,
723 if (tevent_req_nomem(subreq
, req
)) {
724 return tevent_req_post(req
, ev
);
726 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceObjectSecurity_done
, req
);
730 static void rpccli_svcctl_QueryServiceObjectSecurity_done(struct tevent_req
*subreq
)
732 struct tevent_req
*req
= tevent_req_callback_data(
733 subreq
, struct tevent_req
);
734 struct rpccli_svcctl_QueryServiceObjectSecurity_state
*state
= tevent_req_data(
735 req
, struct rpccli_svcctl_QueryServiceObjectSecurity_state
);
739 if (state
->out_mem_ctx
) {
740 mem_ctx
= state
->out_mem_ctx
;
745 status
= state
->dispatch_recv(subreq
, mem_ctx
);
747 if (!NT_STATUS_IS_OK(status
)) {
748 tevent_req_nterror(req
, status
);
752 /* Copy out parameters */
753 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.buffer
));
754 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
757 state
->orig
.out
.result
= state
->tmp
.out
.result
;
759 /* Reset temporary structure */
760 ZERO_STRUCT(state
->tmp
);
762 if (DEBUGLEVEL
>= 10) {
763 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity
, &state
->orig
);
766 tevent_req_done(req
);
769 NTSTATUS
rpccli_svcctl_QueryServiceObjectSecurity_recv(struct tevent_req
*req
,
773 struct rpccli_svcctl_QueryServiceObjectSecurity_state
*state
= tevent_req_data(
774 req
, struct rpccli_svcctl_QueryServiceObjectSecurity_state
);
777 if (tevent_req_is_nterror(req
, &status
)) {
778 tevent_req_received(req
);
782 /* Steal possbile out parameters to the callers context */
783 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
786 *result
= state
->orig
.out
.result
;
788 tevent_req_received(req
);
792 NTSTATUS
rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client
*cli
,
794 struct policy_handle
*handle
/* [in] [ref] */,
795 uint32_t security_flags
/* [in] */,
796 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
797 uint32_t offered
/* [in] [range(0,0x40000)] */,
798 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
801 struct svcctl_QueryServiceObjectSecurity r
;
805 r
.in
.handle
= handle
;
806 r
.in
.security_flags
= security_flags
;
807 r
.in
.offered
= offered
;
809 if (DEBUGLEVEL
>= 10) {
810 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity
, &r
);
813 status
= cli
->dispatch(cli
,
816 NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY
,
819 if (!NT_STATUS_IS_OK(status
)) {
823 if (DEBUGLEVEL
>= 10) {
824 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity
, &r
);
827 if (NT_STATUS_IS_ERR(status
)) {
831 /* Return variables */
832 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
833 *needed
= *r
.out
.needed
;
837 *werror
= r
.out
.result
;
840 return werror_to_ntstatus(r
.out
.result
);
843 struct rpccli_svcctl_SetServiceObjectSecurity_state
{
844 struct svcctl_SetServiceObjectSecurity orig
;
845 struct svcctl_SetServiceObjectSecurity tmp
;
846 TALLOC_CTX
*out_mem_ctx
;
847 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
850 static void rpccli_svcctl_SetServiceObjectSecurity_done(struct tevent_req
*subreq
);
852 struct tevent_req
*rpccli_svcctl_SetServiceObjectSecurity_send(TALLOC_CTX
*mem_ctx
,
853 struct tevent_context
*ev
,
854 struct rpc_pipe_client
*cli
,
855 struct policy_handle
*_handle
/* [in] [ref] */,
856 uint32_t _security_flags
/* [in] */,
857 uint8_t *_buffer
/* [in] [ref,size_is(offered)] */,
858 uint32_t _offered
/* [in] */)
860 struct tevent_req
*req
;
861 struct rpccli_svcctl_SetServiceObjectSecurity_state
*state
;
862 struct tevent_req
*subreq
;
864 req
= tevent_req_create(mem_ctx
, &state
,
865 struct rpccli_svcctl_SetServiceObjectSecurity_state
);
869 state
->out_mem_ctx
= NULL
;
870 state
->dispatch_recv
= cli
->dispatch_recv
;
873 state
->orig
.in
.handle
= _handle
;
874 state
->orig
.in
.security_flags
= _security_flags
;
875 state
->orig
.in
.buffer
= _buffer
;
876 state
->orig
.in
.offered
= _offered
;
881 ZERO_STRUCT(state
->orig
.out
.result
);
883 if (DEBUGLEVEL
>= 10) {
884 NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity
, &state
->orig
);
887 /* make a temporary copy, that we pass to the dispatch function */
888 state
->tmp
= state
->orig
;
890 subreq
= cli
->dispatch_send(state
, ev
, cli
,
892 NDR_SVCCTL_SETSERVICEOBJECTSECURITY
,
894 if (tevent_req_nomem(subreq
, req
)) {
895 return tevent_req_post(req
, ev
);
897 tevent_req_set_callback(subreq
, rpccli_svcctl_SetServiceObjectSecurity_done
, req
);
901 static void rpccli_svcctl_SetServiceObjectSecurity_done(struct tevent_req
*subreq
)
903 struct tevent_req
*req
= tevent_req_callback_data(
904 subreq
, struct tevent_req
);
905 struct rpccli_svcctl_SetServiceObjectSecurity_state
*state
= tevent_req_data(
906 req
, struct rpccli_svcctl_SetServiceObjectSecurity_state
);
910 if (state
->out_mem_ctx
) {
911 mem_ctx
= state
->out_mem_ctx
;
916 status
= state
->dispatch_recv(subreq
, mem_ctx
);
918 if (!NT_STATUS_IS_OK(status
)) {
919 tevent_req_nterror(req
, status
);
923 /* Copy out parameters */
926 state
->orig
.out
.result
= state
->tmp
.out
.result
;
928 /* Reset temporary structure */
929 ZERO_STRUCT(state
->tmp
);
931 if (DEBUGLEVEL
>= 10) {
932 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity
, &state
->orig
);
935 tevent_req_done(req
);
938 NTSTATUS
rpccli_svcctl_SetServiceObjectSecurity_recv(struct tevent_req
*req
,
942 struct rpccli_svcctl_SetServiceObjectSecurity_state
*state
= tevent_req_data(
943 req
, struct rpccli_svcctl_SetServiceObjectSecurity_state
);
946 if (tevent_req_is_nterror(req
, &status
)) {
947 tevent_req_received(req
);
951 /* Steal possbile out parameters to the callers context */
952 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
955 *result
= state
->orig
.out
.result
;
957 tevent_req_received(req
);
961 NTSTATUS
rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client
*cli
,
963 struct policy_handle
*handle
/* [in] [ref] */,
964 uint32_t security_flags
/* [in] */,
965 uint8_t *buffer
/* [in] [ref,size_is(offered)] */,
966 uint32_t offered
/* [in] */,
969 struct svcctl_SetServiceObjectSecurity r
;
973 r
.in
.handle
= handle
;
974 r
.in
.security_flags
= security_flags
;
975 r
.in
.buffer
= buffer
;
976 r
.in
.offered
= offered
;
978 if (DEBUGLEVEL
>= 10) {
979 NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity
, &r
);
982 status
= cli
->dispatch(cli
,
985 NDR_SVCCTL_SETSERVICEOBJECTSECURITY
,
988 if (!NT_STATUS_IS_OK(status
)) {
992 if (DEBUGLEVEL
>= 10) {
993 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity
, &r
);
996 if (NT_STATUS_IS_ERR(status
)) {
1000 /* Return variables */
1004 *werror
= r
.out
.result
;
1007 return werror_to_ntstatus(r
.out
.result
);
1010 struct rpccli_svcctl_QueryServiceStatus_state
{
1011 struct svcctl_QueryServiceStatus orig
;
1012 struct svcctl_QueryServiceStatus tmp
;
1013 TALLOC_CTX
*out_mem_ctx
;
1014 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1017 static void rpccli_svcctl_QueryServiceStatus_done(struct tevent_req
*subreq
);
1019 struct tevent_req
*rpccli_svcctl_QueryServiceStatus_send(TALLOC_CTX
*mem_ctx
,
1020 struct tevent_context
*ev
,
1021 struct rpc_pipe_client
*cli
,
1022 struct policy_handle
*_handle
/* [in] [ref] */,
1023 struct SERVICE_STATUS
*_service_status
/* [out] [ref] */)
1025 struct tevent_req
*req
;
1026 struct rpccli_svcctl_QueryServiceStatus_state
*state
;
1027 struct tevent_req
*subreq
;
1029 req
= tevent_req_create(mem_ctx
, &state
,
1030 struct rpccli_svcctl_QueryServiceStatus_state
);
1034 state
->out_mem_ctx
= NULL
;
1035 state
->dispatch_recv
= cli
->dispatch_recv
;
1038 state
->orig
.in
.handle
= _handle
;
1040 /* Out parameters */
1041 state
->orig
.out
.service_status
= _service_status
;
1044 ZERO_STRUCT(state
->orig
.out
.result
);
1046 if (DEBUGLEVEL
>= 10) {
1047 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus
, &state
->orig
);
1050 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1051 "rpccli_svcctl_QueryServiceStatus_out_memory");
1052 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1053 return tevent_req_post(req
, ev
);
1056 /* make a temporary copy, that we pass to the dispatch function */
1057 state
->tmp
= state
->orig
;
1059 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1061 NDR_SVCCTL_QUERYSERVICESTATUS
,
1063 if (tevent_req_nomem(subreq
, req
)) {
1064 return tevent_req_post(req
, ev
);
1066 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceStatus_done
, req
);
1070 static void rpccli_svcctl_QueryServiceStatus_done(struct tevent_req
*subreq
)
1072 struct tevent_req
*req
= tevent_req_callback_data(
1073 subreq
, struct tevent_req
);
1074 struct rpccli_svcctl_QueryServiceStatus_state
*state
= tevent_req_data(
1075 req
, struct rpccli_svcctl_QueryServiceStatus_state
);
1077 TALLOC_CTX
*mem_ctx
;
1079 if (state
->out_mem_ctx
) {
1080 mem_ctx
= state
->out_mem_ctx
;
1085 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1086 TALLOC_FREE(subreq
);
1087 if (!NT_STATUS_IS_OK(status
)) {
1088 tevent_req_nterror(req
, status
);
1092 /* Copy out parameters */
1093 *state
->orig
.out
.service_status
= *state
->tmp
.out
.service_status
;
1096 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1098 /* Reset temporary structure */
1099 ZERO_STRUCT(state
->tmp
);
1101 if (DEBUGLEVEL
>= 10) {
1102 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus
, &state
->orig
);
1105 tevent_req_done(req
);
1108 NTSTATUS
rpccli_svcctl_QueryServiceStatus_recv(struct tevent_req
*req
,
1109 TALLOC_CTX
*mem_ctx
,
1112 struct rpccli_svcctl_QueryServiceStatus_state
*state
= tevent_req_data(
1113 req
, struct rpccli_svcctl_QueryServiceStatus_state
);
1116 if (tevent_req_is_nterror(req
, &status
)) {
1117 tevent_req_received(req
);
1121 /* Steal possbile out parameters to the callers context */
1122 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1125 *result
= state
->orig
.out
.result
;
1127 tevent_req_received(req
);
1128 return NT_STATUS_OK
;
1131 NTSTATUS
rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client
*cli
,
1132 TALLOC_CTX
*mem_ctx
,
1133 struct policy_handle
*handle
/* [in] [ref] */,
1134 struct SERVICE_STATUS
*service_status
/* [out] [ref] */,
1137 struct svcctl_QueryServiceStatus r
;
1141 r
.in
.handle
= handle
;
1143 if (DEBUGLEVEL
>= 10) {
1144 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus
, &r
);
1147 status
= cli
->dispatch(cli
,
1150 NDR_SVCCTL_QUERYSERVICESTATUS
,
1153 if (!NT_STATUS_IS_OK(status
)) {
1157 if (DEBUGLEVEL
>= 10) {
1158 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus
, &r
);
1161 if (NT_STATUS_IS_ERR(status
)) {
1165 /* Return variables */
1166 *service_status
= *r
.out
.service_status
;
1170 *werror
= r
.out
.result
;
1173 return werror_to_ntstatus(r
.out
.result
);
1176 struct rpccli_svcctl_SetServiceStatus_state
{
1177 struct svcctl_SetServiceStatus orig
;
1178 struct svcctl_SetServiceStatus tmp
;
1179 TALLOC_CTX
*out_mem_ctx
;
1180 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1183 static void rpccli_svcctl_SetServiceStatus_done(struct tevent_req
*subreq
);
1185 struct tevent_req
*rpccli_svcctl_SetServiceStatus_send(TALLOC_CTX
*mem_ctx
,
1186 struct tevent_context
*ev
,
1187 struct rpc_pipe_client
*cli
)
1189 struct tevent_req
*req
;
1190 struct rpccli_svcctl_SetServiceStatus_state
*state
;
1191 struct tevent_req
*subreq
;
1193 req
= tevent_req_create(mem_ctx
, &state
,
1194 struct rpccli_svcctl_SetServiceStatus_state
);
1198 state
->out_mem_ctx
= NULL
;
1199 state
->dispatch_recv
= cli
->dispatch_recv
;
1203 /* Out parameters */
1206 ZERO_STRUCT(state
->orig
.out
.result
);
1208 if (DEBUGLEVEL
>= 10) {
1209 NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus
, &state
->orig
);
1212 /* make a temporary copy, that we pass to the dispatch function */
1213 state
->tmp
= state
->orig
;
1215 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1217 NDR_SVCCTL_SETSERVICESTATUS
,
1219 if (tevent_req_nomem(subreq
, req
)) {
1220 return tevent_req_post(req
, ev
);
1222 tevent_req_set_callback(subreq
, rpccli_svcctl_SetServiceStatus_done
, req
);
1226 static void rpccli_svcctl_SetServiceStatus_done(struct tevent_req
*subreq
)
1228 struct tevent_req
*req
= tevent_req_callback_data(
1229 subreq
, struct tevent_req
);
1230 struct rpccli_svcctl_SetServiceStatus_state
*state
= tevent_req_data(
1231 req
, struct rpccli_svcctl_SetServiceStatus_state
);
1233 TALLOC_CTX
*mem_ctx
;
1235 if (state
->out_mem_ctx
) {
1236 mem_ctx
= state
->out_mem_ctx
;
1241 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1242 TALLOC_FREE(subreq
);
1243 if (!NT_STATUS_IS_OK(status
)) {
1244 tevent_req_nterror(req
, status
);
1248 /* Copy out parameters */
1251 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1253 /* Reset temporary structure */
1254 ZERO_STRUCT(state
->tmp
);
1256 if (DEBUGLEVEL
>= 10) {
1257 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus
, &state
->orig
);
1260 tevent_req_done(req
);
1263 NTSTATUS
rpccli_svcctl_SetServiceStatus_recv(struct tevent_req
*req
,
1264 TALLOC_CTX
*mem_ctx
,
1267 struct rpccli_svcctl_SetServiceStatus_state
*state
= tevent_req_data(
1268 req
, struct rpccli_svcctl_SetServiceStatus_state
);
1271 if (tevent_req_is_nterror(req
, &status
)) {
1272 tevent_req_received(req
);
1276 /* Steal possbile out parameters to the callers context */
1277 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1280 *result
= state
->orig
.out
.result
;
1282 tevent_req_received(req
);
1283 return NT_STATUS_OK
;
1286 NTSTATUS
rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client
*cli
,
1287 TALLOC_CTX
*mem_ctx
,
1290 struct svcctl_SetServiceStatus r
;
1295 if (DEBUGLEVEL
>= 10) {
1296 NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus
, &r
);
1299 status
= cli
->dispatch(cli
,
1302 NDR_SVCCTL_SETSERVICESTATUS
,
1305 if (!NT_STATUS_IS_OK(status
)) {
1309 if (DEBUGLEVEL
>= 10) {
1310 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus
, &r
);
1313 if (NT_STATUS_IS_ERR(status
)) {
1317 /* Return variables */
1321 *werror
= r
.out
.result
;
1324 return werror_to_ntstatus(r
.out
.result
);
1327 struct rpccli_svcctl_UnlockServiceDatabase_state
{
1328 struct svcctl_UnlockServiceDatabase orig
;
1329 struct svcctl_UnlockServiceDatabase tmp
;
1330 TALLOC_CTX
*out_mem_ctx
;
1331 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1334 static void rpccli_svcctl_UnlockServiceDatabase_done(struct tevent_req
*subreq
);
1336 struct tevent_req
*rpccli_svcctl_UnlockServiceDatabase_send(TALLOC_CTX
*mem_ctx
,
1337 struct tevent_context
*ev
,
1338 struct rpc_pipe_client
*cli
,
1339 struct policy_handle
*_lock
/* [in,out] [ref] */)
1341 struct tevent_req
*req
;
1342 struct rpccli_svcctl_UnlockServiceDatabase_state
*state
;
1343 struct tevent_req
*subreq
;
1345 req
= tevent_req_create(mem_ctx
, &state
,
1346 struct rpccli_svcctl_UnlockServiceDatabase_state
);
1350 state
->out_mem_ctx
= NULL
;
1351 state
->dispatch_recv
= cli
->dispatch_recv
;
1354 state
->orig
.in
.lock
= _lock
;
1356 /* Out parameters */
1357 state
->orig
.out
.lock
= _lock
;
1360 ZERO_STRUCT(state
->orig
.out
.result
);
1362 if (DEBUGLEVEL
>= 10) {
1363 NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase
, &state
->orig
);
1366 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1367 "rpccli_svcctl_UnlockServiceDatabase_out_memory");
1368 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1369 return tevent_req_post(req
, ev
);
1372 /* make a temporary copy, that we pass to the dispatch function */
1373 state
->tmp
= state
->orig
;
1375 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1377 NDR_SVCCTL_UNLOCKSERVICEDATABASE
,
1379 if (tevent_req_nomem(subreq
, req
)) {
1380 return tevent_req_post(req
, ev
);
1382 tevent_req_set_callback(subreq
, rpccli_svcctl_UnlockServiceDatabase_done
, req
);
1386 static void rpccli_svcctl_UnlockServiceDatabase_done(struct tevent_req
*subreq
)
1388 struct tevent_req
*req
= tevent_req_callback_data(
1389 subreq
, struct tevent_req
);
1390 struct rpccli_svcctl_UnlockServiceDatabase_state
*state
= tevent_req_data(
1391 req
, struct rpccli_svcctl_UnlockServiceDatabase_state
);
1393 TALLOC_CTX
*mem_ctx
;
1395 if (state
->out_mem_ctx
) {
1396 mem_ctx
= state
->out_mem_ctx
;
1401 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1402 TALLOC_FREE(subreq
);
1403 if (!NT_STATUS_IS_OK(status
)) {
1404 tevent_req_nterror(req
, status
);
1408 /* Copy out parameters */
1409 *state
->orig
.out
.lock
= *state
->tmp
.out
.lock
;
1412 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1414 /* Reset temporary structure */
1415 ZERO_STRUCT(state
->tmp
);
1417 if (DEBUGLEVEL
>= 10) {
1418 NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase
, &state
->orig
);
1421 tevent_req_done(req
);
1424 NTSTATUS
rpccli_svcctl_UnlockServiceDatabase_recv(struct tevent_req
*req
,
1425 TALLOC_CTX
*mem_ctx
,
1428 struct rpccli_svcctl_UnlockServiceDatabase_state
*state
= tevent_req_data(
1429 req
, struct rpccli_svcctl_UnlockServiceDatabase_state
);
1432 if (tevent_req_is_nterror(req
, &status
)) {
1433 tevent_req_received(req
);
1437 /* Steal possbile out parameters to the callers context */
1438 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1441 *result
= state
->orig
.out
.result
;
1443 tevent_req_received(req
);
1444 return NT_STATUS_OK
;
1447 NTSTATUS
rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client
*cli
,
1448 TALLOC_CTX
*mem_ctx
,
1449 struct policy_handle
*lock
/* [in,out] [ref] */,
1452 struct svcctl_UnlockServiceDatabase r
;
1458 if (DEBUGLEVEL
>= 10) {
1459 NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase
, &r
);
1462 status
= cli
->dispatch(cli
,
1465 NDR_SVCCTL_UNLOCKSERVICEDATABASE
,
1468 if (!NT_STATUS_IS_OK(status
)) {
1472 if (DEBUGLEVEL
>= 10) {
1473 NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase
, &r
);
1476 if (NT_STATUS_IS_ERR(status
)) {
1480 /* Return variables */
1481 *lock
= *r
.out
.lock
;
1485 *werror
= r
.out
.result
;
1488 return werror_to_ntstatus(r
.out
.result
);
1491 struct rpccli_svcctl_NotifyBootConfigStatus_state
{
1492 struct svcctl_NotifyBootConfigStatus orig
;
1493 struct svcctl_NotifyBootConfigStatus tmp
;
1494 TALLOC_CTX
*out_mem_ctx
;
1495 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1498 static void rpccli_svcctl_NotifyBootConfigStatus_done(struct tevent_req
*subreq
);
1500 struct tevent_req
*rpccli_svcctl_NotifyBootConfigStatus_send(TALLOC_CTX
*mem_ctx
,
1501 struct tevent_context
*ev
,
1502 struct rpc_pipe_client
*cli
)
1504 struct tevent_req
*req
;
1505 struct rpccli_svcctl_NotifyBootConfigStatus_state
*state
;
1506 struct tevent_req
*subreq
;
1508 req
= tevent_req_create(mem_ctx
, &state
,
1509 struct rpccli_svcctl_NotifyBootConfigStatus_state
);
1513 state
->out_mem_ctx
= NULL
;
1514 state
->dispatch_recv
= cli
->dispatch_recv
;
1518 /* Out parameters */
1521 ZERO_STRUCT(state
->orig
.out
.result
);
1523 if (DEBUGLEVEL
>= 10) {
1524 NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus
, &state
->orig
);
1527 /* make a temporary copy, that we pass to the dispatch function */
1528 state
->tmp
= state
->orig
;
1530 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1532 NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS
,
1534 if (tevent_req_nomem(subreq
, req
)) {
1535 return tevent_req_post(req
, ev
);
1537 tevent_req_set_callback(subreq
, rpccli_svcctl_NotifyBootConfigStatus_done
, req
);
1541 static void rpccli_svcctl_NotifyBootConfigStatus_done(struct tevent_req
*subreq
)
1543 struct tevent_req
*req
= tevent_req_callback_data(
1544 subreq
, struct tevent_req
);
1545 struct rpccli_svcctl_NotifyBootConfigStatus_state
*state
= tevent_req_data(
1546 req
, struct rpccli_svcctl_NotifyBootConfigStatus_state
);
1548 TALLOC_CTX
*mem_ctx
;
1550 if (state
->out_mem_ctx
) {
1551 mem_ctx
= state
->out_mem_ctx
;
1556 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1557 TALLOC_FREE(subreq
);
1558 if (!NT_STATUS_IS_OK(status
)) {
1559 tevent_req_nterror(req
, status
);
1563 /* Copy out parameters */
1566 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1568 /* Reset temporary structure */
1569 ZERO_STRUCT(state
->tmp
);
1571 if (DEBUGLEVEL
>= 10) {
1572 NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus
, &state
->orig
);
1575 tevent_req_done(req
);
1578 NTSTATUS
rpccli_svcctl_NotifyBootConfigStatus_recv(struct tevent_req
*req
,
1579 TALLOC_CTX
*mem_ctx
,
1582 struct rpccli_svcctl_NotifyBootConfigStatus_state
*state
= tevent_req_data(
1583 req
, struct rpccli_svcctl_NotifyBootConfigStatus_state
);
1586 if (tevent_req_is_nterror(req
, &status
)) {
1587 tevent_req_received(req
);
1591 /* Steal possbile out parameters to the callers context */
1592 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1595 *result
= state
->orig
.out
.result
;
1597 tevent_req_received(req
);
1598 return NT_STATUS_OK
;
1601 NTSTATUS
rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client
*cli
,
1602 TALLOC_CTX
*mem_ctx
,
1605 struct svcctl_NotifyBootConfigStatus r
;
1610 if (DEBUGLEVEL
>= 10) {
1611 NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus
, &r
);
1614 status
= cli
->dispatch(cli
,
1617 NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS
,
1620 if (!NT_STATUS_IS_OK(status
)) {
1624 if (DEBUGLEVEL
>= 10) {
1625 NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus
, &r
);
1628 if (NT_STATUS_IS_ERR(status
)) {
1632 /* Return variables */
1636 *werror
= r
.out
.result
;
1639 return werror_to_ntstatus(r
.out
.result
);
1642 struct rpccli_svcctl_SCSetServiceBitsW_state
{
1643 struct svcctl_SCSetServiceBitsW orig
;
1644 struct svcctl_SCSetServiceBitsW tmp
;
1645 TALLOC_CTX
*out_mem_ctx
;
1646 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1649 static void rpccli_svcctl_SCSetServiceBitsW_done(struct tevent_req
*subreq
);
1651 struct tevent_req
*rpccli_svcctl_SCSetServiceBitsW_send(TALLOC_CTX
*mem_ctx
,
1652 struct tevent_context
*ev
,
1653 struct rpc_pipe_client
*cli
,
1654 struct policy_handle
*_handle
/* [in] [ref] */,
1655 uint32_t _bits
/* [in] */,
1656 uint32_t _bitson
/* [in] */,
1657 uint32_t _immediate
/* [in] */)
1659 struct tevent_req
*req
;
1660 struct rpccli_svcctl_SCSetServiceBitsW_state
*state
;
1661 struct tevent_req
*subreq
;
1663 req
= tevent_req_create(mem_ctx
, &state
,
1664 struct rpccli_svcctl_SCSetServiceBitsW_state
);
1668 state
->out_mem_ctx
= NULL
;
1669 state
->dispatch_recv
= cli
->dispatch_recv
;
1672 state
->orig
.in
.handle
= _handle
;
1673 state
->orig
.in
.bits
= _bits
;
1674 state
->orig
.in
.bitson
= _bitson
;
1675 state
->orig
.in
.immediate
= _immediate
;
1677 /* Out parameters */
1680 ZERO_STRUCT(state
->orig
.out
.result
);
1682 if (DEBUGLEVEL
>= 10) {
1683 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW
, &state
->orig
);
1686 /* make a temporary copy, that we pass to the dispatch function */
1687 state
->tmp
= state
->orig
;
1689 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1691 NDR_SVCCTL_SCSETSERVICEBITSW
,
1693 if (tevent_req_nomem(subreq
, req
)) {
1694 return tevent_req_post(req
, ev
);
1696 tevent_req_set_callback(subreq
, rpccli_svcctl_SCSetServiceBitsW_done
, req
);
1700 static void rpccli_svcctl_SCSetServiceBitsW_done(struct tevent_req
*subreq
)
1702 struct tevent_req
*req
= tevent_req_callback_data(
1703 subreq
, struct tevent_req
);
1704 struct rpccli_svcctl_SCSetServiceBitsW_state
*state
= tevent_req_data(
1705 req
, struct rpccli_svcctl_SCSetServiceBitsW_state
);
1707 TALLOC_CTX
*mem_ctx
;
1709 if (state
->out_mem_ctx
) {
1710 mem_ctx
= state
->out_mem_ctx
;
1715 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1716 TALLOC_FREE(subreq
);
1717 if (!NT_STATUS_IS_OK(status
)) {
1718 tevent_req_nterror(req
, status
);
1722 /* Copy out parameters */
1725 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1727 /* Reset temporary structure */
1728 ZERO_STRUCT(state
->tmp
);
1730 if (DEBUGLEVEL
>= 10) {
1731 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW
, &state
->orig
);
1734 tevent_req_done(req
);
1737 NTSTATUS
rpccli_svcctl_SCSetServiceBitsW_recv(struct tevent_req
*req
,
1738 TALLOC_CTX
*mem_ctx
,
1741 struct rpccli_svcctl_SCSetServiceBitsW_state
*state
= tevent_req_data(
1742 req
, struct rpccli_svcctl_SCSetServiceBitsW_state
);
1745 if (tevent_req_is_nterror(req
, &status
)) {
1746 tevent_req_received(req
);
1750 /* Steal possbile out parameters to the callers context */
1751 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1754 *result
= state
->orig
.out
.result
;
1756 tevent_req_received(req
);
1757 return NT_STATUS_OK
;
1760 NTSTATUS
rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client
*cli
,
1761 TALLOC_CTX
*mem_ctx
,
1762 struct policy_handle
*handle
/* [in] [ref] */,
1763 uint32_t bits
/* [in] */,
1764 uint32_t bitson
/* [in] */,
1765 uint32_t immediate
/* [in] */,
1768 struct svcctl_SCSetServiceBitsW r
;
1772 r
.in
.handle
= handle
;
1774 r
.in
.bitson
= bitson
;
1775 r
.in
.immediate
= immediate
;
1777 if (DEBUGLEVEL
>= 10) {
1778 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW
, &r
);
1781 status
= cli
->dispatch(cli
,
1784 NDR_SVCCTL_SCSETSERVICEBITSW
,
1787 if (!NT_STATUS_IS_OK(status
)) {
1791 if (DEBUGLEVEL
>= 10) {
1792 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW
, &r
);
1795 if (NT_STATUS_IS_ERR(status
)) {
1799 /* Return variables */
1803 *werror
= r
.out
.result
;
1806 return werror_to_ntstatus(r
.out
.result
);
1809 struct rpccli_svcctl_ChangeServiceConfigW_state
{
1810 struct svcctl_ChangeServiceConfigW orig
;
1811 struct svcctl_ChangeServiceConfigW tmp
;
1812 TALLOC_CTX
*out_mem_ctx
;
1813 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
1816 static void rpccli_svcctl_ChangeServiceConfigW_done(struct tevent_req
*subreq
);
1818 struct tevent_req
*rpccli_svcctl_ChangeServiceConfigW_send(TALLOC_CTX
*mem_ctx
,
1819 struct tevent_context
*ev
,
1820 struct rpc_pipe_client
*cli
,
1821 struct policy_handle
*_handle
/* [in] [ref] */,
1822 uint32_t _type
/* [in] */,
1823 enum svcctl_StartType _start_type
/* [in] */,
1824 enum svcctl_ErrorControl _error_control
/* [in] */,
1825 const char *_binary_path
/* [in] [unique,charset(UTF16)] */,
1826 const char *_load_order_group
/* [in] [unique,charset(UTF16)] */,
1827 uint32_t *_tag_id
/* [out] [ref] */,
1828 const char *_dependencies
/* [in] [unique,charset(UTF16)] */,
1829 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
1830 const char *_password
/* [in] [unique,charset(UTF16)] */,
1831 const char *_display_name
/* [in] [unique,charset(UTF16)] */)
1833 struct tevent_req
*req
;
1834 struct rpccli_svcctl_ChangeServiceConfigW_state
*state
;
1835 struct tevent_req
*subreq
;
1837 req
= tevent_req_create(mem_ctx
, &state
,
1838 struct rpccli_svcctl_ChangeServiceConfigW_state
);
1842 state
->out_mem_ctx
= NULL
;
1843 state
->dispatch_recv
= cli
->dispatch_recv
;
1846 state
->orig
.in
.handle
= _handle
;
1847 state
->orig
.in
.type
= _type
;
1848 state
->orig
.in
.start_type
= _start_type
;
1849 state
->orig
.in
.error_control
= _error_control
;
1850 state
->orig
.in
.binary_path
= _binary_path
;
1851 state
->orig
.in
.load_order_group
= _load_order_group
;
1852 state
->orig
.in
.dependencies
= _dependencies
;
1853 state
->orig
.in
.service_start_name
= _service_start_name
;
1854 state
->orig
.in
.password
= _password
;
1855 state
->orig
.in
.display_name
= _display_name
;
1857 /* Out parameters */
1858 state
->orig
.out
.tag_id
= _tag_id
;
1861 ZERO_STRUCT(state
->orig
.out
.result
);
1863 if (DEBUGLEVEL
>= 10) {
1864 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW
, &state
->orig
);
1867 state
->out_mem_ctx
= talloc_named_const(state
, 0,
1868 "rpccli_svcctl_ChangeServiceConfigW_out_memory");
1869 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
1870 return tevent_req_post(req
, ev
);
1873 /* make a temporary copy, that we pass to the dispatch function */
1874 state
->tmp
= state
->orig
;
1876 subreq
= cli
->dispatch_send(state
, ev
, cli
,
1878 NDR_SVCCTL_CHANGESERVICECONFIGW
,
1880 if (tevent_req_nomem(subreq
, req
)) {
1881 return tevent_req_post(req
, ev
);
1883 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfigW_done
, req
);
1887 static void rpccli_svcctl_ChangeServiceConfigW_done(struct tevent_req
*subreq
)
1889 struct tevent_req
*req
= tevent_req_callback_data(
1890 subreq
, struct tevent_req
);
1891 struct rpccli_svcctl_ChangeServiceConfigW_state
*state
= tevent_req_data(
1892 req
, struct rpccli_svcctl_ChangeServiceConfigW_state
);
1894 TALLOC_CTX
*mem_ctx
;
1896 if (state
->out_mem_ctx
) {
1897 mem_ctx
= state
->out_mem_ctx
;
1902 status
= state
->dispatch_recv(subreq
, mem_ctx
);
1903 TALLOC_FREE(subreq
);
1904 if (!NT_STATUS_IS_OK(status
)) {
1905 tevent_req_nterror(req
, status
);
1909 /* Copy out parameters */
1910 *state
->orig
.out
.tag_id
= *state
->tmp
.out
.tag_id
;
1913 state
->orig
.out
.result
= state
->tmp
.out
.result
;
1915 /* Reset temporary structure */
1916 ZERO_STRUCT(state
->tmp
);
1918 if (DEBUGLEVEL
>= 10) {
1919 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW
, &state
->orig
);
1922 tevent_req_done(req
);
1925 NTSTATUS
rpccli_svcctl_ChangeServiceConfigW_recv(struct tevent_req
*req
,
1926 TALLOC_CTX
*mem_ctx
,
1929 struct rpccli_svcctl_ChangeServiceConfigW_state
*state
= tevent_req_data(
1930 req
, struct rpccli_svcctl_ChangeServiceConfigW_state
);
1933 if (tevent_req_is_nterror(req
, &status
)) {
1934 tevent_req_received(req
);
1938 /* Steal possbile out parameters to the callers context */
1939 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
1942 *result
= state
->orig
.out
.result
;
1944 tevent_req_received(req
);
1945 return NT_STATUS_OK
;
1948 NTSTATUS
rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client
*cli
,
1949 TALLOC_CTX
*mem_ctx
,
1950 struct policy_handle
*handle
/* [in] [ref] */,
1951 uint32_t type
/* [in] */,
1952 enum svcctl_StartType start_type
/* [in] */,
1953 enum svcctl_ErrorControl error_control
/* [in] */,
1954 const char *binary_path
/* [in] [unique,charset(UTF16)] */,
1955 const char *load_order_group
/* [in] [unique,charset(UTF16)] */,
1956 uint32_t *tag_id
/* [out] [ref] */,
1957 const char *dependencies
/* [in] [unique,charset(UTF16)] */,
1958 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
1959 const char *password
/* [in] [unique,charset(UTF16)] */,
1960 const char *display_name
/* [in] [unique,charset(UTF16)] */,
1963 struct svcctl_ChangeServiceConfigW r
;
1967 r
.in
.handle
= handle
;
1969 r
.in
.start_type
= start_type
;
1970 r
.in
.error_control
= error_control
;
1971 r
.in
.binary_path
= binary_path
;
1972 r
.in
.load_order_group
= load_order_group
;
1973 r
.in
.dependencies
= dependencies
;
1974 r
.in
.service_start_name
= service_start_name
;
1975 r
.in
.password
= password
;
1976 r
.in
.display_name
= display_name
;
1978 if (DEBUGLEVEL
>= 10) {
1979 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW
, &r
);
1982 status
= cli
->dispatch(cli
,
1985 NDR_SVCCTL_CHANGESERVICECONFIGW
,
1988 if (!NT_STATUS_IS_OK(status
)) {
1992 if (DEBUGLEVEL
>= 10) {
1993 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW
, &r
);
1996 if (NT_STATUS_IS_ERR(status
)) {
2000 /* Return variables */
2001 *tag_id
= *r
.out
.tag_id
;
2005 *werror
= r
.out
.result
;
2008 return werror_to_ntstatus(r
.out
.result
);
2011 struct rpccli_svcctl_CreateServiceW_state
{
2012 struct svcctl_CreateServiceW orig
;
2013 struct svcctl_CreateServiceW tmp
;
2014 TALLOC_CTX
*out_mem_ctx
;
2015 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2018 static void rpccli_svcctl_CreateServiceW_done(struct tevent_req
*subreq
);
2020 struct tevent_req
*rpccli_svcctl_CreateServiceW_send(TALLOC_CTX
*mem_ctx
,
2021 struct tevent_context
*ev
,
2022 struct rpc_pipe_client
*cli
,
2023 struct policy_handle
*_scmanager_handle
/* [in] [ref] */,
2024 const char *_ServiceName
/* [in] [charset(UTF16)] */,
2025 const char *_DisplayName
/* [in] [unique,charset(UTF16)] */,
2026 uint32_t _desired_access
/* [in] */,
2027 uint32_t _type
/* [in] */,
2028 enum svcctl_StartType _start_type
/* [in] */,
2029 enum svcctl_ErrorControl _error_control
/* [in] */,
2030 const char *_binary_path
/* [in] [charset(UTF16)] */,
2031 const char *_LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
2032 uint32_t *_TagId
/* [in,out] [unique] */,
2033 uint8_t *_dependencies
/* [in] [unique,size_is(dependencies_size)] */,
2034 uint32_t _dependencies_size
/* [in] */,
2035 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
2036 uint8_t *_password
/* [in] [unique,size_is(password_size)] */,
2037 uint32_t _password_size
/* [in] */,
2038 struct policy_handle
*_handle
/* [out] [ref] */)
2040 struct tevent_req
*req
;
2041 struct rpccli_svcctl_CreateServiceW_state
*state
;
2042 struct tevent_req
*subreq
;
2044 req
= tevent_req_create(mem_ctx
, &state
,
2045 struct rpccli_svcctl_CreateServiceW_state
);
2049 state
->out_mem_ctx
= NULL
;
2050 state
->dispatch_recv
= cli
->dispatch_recv
;
2053 state
->orig
.in
.scmanager_handle
= _scmanager_handle
;
2054 state
->orig
.in
.ServiceName
= _ServiceName
;
2055 state
->orig
.in
.DisplayName
= _DisplayName
;
2056 state
->orig
.in
.desired_access
= _desired_access
;
2057 state
->orig
.in
.type
= _type
;
2058 state
->orig
.in
.start_type
= _start_type
;
2059 state
->orig
.in
.error_control
= _error_control
;
2060 state
->orig
.in
.binary_path
= _binary_path
;
2061 state
->orig
.in
.LoadOrderGroupKey
= _LoadOrderGroupKey
;
2062 state
->orig
.in
.TagId
= _TagId
;
2063 state
->orig
.in
.dependencies
= _dependencies
;
2064 state
->orig
.in
.dependencies_size
= _dependencies_size
;
2065 state
->orig
.in
.service_start_name
= _service_start_name
;
2066 state
->orig
.in
.password
= _password
;
2067 state
->orig
.in
.password_size
= _password_size
;
2069 /* Out parameters */
2070 state
->orig
.out
.TagId
= _TagId
;
2071 state
->orig
.out
.handle
= _handle
;
2074 ZERO_STRUCT(state
->orig
.out
.result
);
2076 if (DEBUGLEVEL
>= 10) {
2077 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW
, &state
->orig
);
2080 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2081 "rpccli_svcctl_CreateServiceW_out_memory");
2082 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2083 return tevent_req_post(req
, ev
);
2086 /* make a temporary copy, that we pass to the dispatch function */
2087 state
->tmp
= state
->orig
;
2089 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2091 NDR_SVCCTL_CREATESERVICEW
,
2093 if (tevent_req_nomem(subreq
, req
)) {
2094 return tevent_req_post(req
, ev
);
2096 tevent_req_set_callback(subreq
, rpccli_svcctl_CreateServiceW_done
, req
);
2100 static void rpccli_svcctl_CreateServiceW_done(struct tevent_req
*subreq
)
2102 struct tevent_req
*req
= tevent_req_callback_data(
2103 subreq
, struct tevent_req
);
2104 struct rpccli_svcctl_CreateServiceW_state
*state
= tevent_req_data(
2105 req
, struct rpccli_svcctl_CreateServiceW_state
);
2107 TALLOC_CTX
*mem_ctx
;
2109 if (state
->out_mem_ctx
) {
2110 mem_ctx
= state
->out_mem_ctx
;
2115 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2116 TALLOC_FREE(subreq
);
2117 if (!NT_STATUS_IS_OK(status
)) {
2118 tevent_req_nterror(req
, status
);
2122 /* Copy out parameters */
2123 if (state
->orig
.out
.TagId
&& state
->tmp
.out
.TagId
) {
2124 *state
->orig
.out
.TagId
= *state
->tmp
.out
.TagId
;
2126 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
2129 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2131 /* Reset temporary structure */
2132 ZERO_STRUCT(state
->tmp
);
2134 if (DEBUGLEVEL
>= 10) {
2135 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW
, &state
->orig
);
2138 tevent_req_done(req
);
2141 NTSTATUS
rpccli_svcctl_CreateServiceW_recv(struct tevent_req
*req
,
2142 TALLOC_CTX
*mem_ctx
,
2145 struct rpccli_svcctl_CreateServiceW_state
*state
= tevent_req_data(
2146 req
, struct rpccli_svcctl_CreateServiceW_state
);
2149 if (tevent_req_is_nterror(req
, &status
)) {
2150 tevent_req_received(req
);
2154 /* Steal possbile out parameters to the callers context */
2155 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2158 *result
= state
->orig
.out
.result
;
2160 tevent_req_received(req
);
2161 return NT_STATUS_OK
;
2164 NTSTATUS
rpccli_svcctl_CreateServiceW(struct rpc_pipe_client
*cli
,
2165 TALLOC_CTX
*mem_ctx
,
2166 struct policy_handle
*scmanager_handle
/* [in] [ref] */,
2167 const char *ServiceName
/* [in] [charset(UTF16)] */,
2168 const char *DisplayName
/* [in] [unique,charset(UTF16)] */,
2169 uint32_t desired_access
/* [in] */,
2170 uint32_t type
/* [in] */,
2171 enum svcctl_StartType start_type
/* [in] */,
2172 enum svcctl_ErrorControl error_control
/* [in] */,
2173 const char *binary_path
/* [in] [charset(UTF16)] */,
2174 const char *LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
2175 uint32_t *TagId
/* [in,out] [unique] */,
2176 uint8_t *dependencies
/* [in] [unique,size_is(dependencies_size)] */,
2177 uint32_t dependencies_size
/* [in] */,
2178 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
2179 uint8_t *password
/* [in] [unique,size_is(password_size)] */,
2180 uint32_t password_size
/* [in] */,
2181 struct policy_handle
*handle
/* [out] [ref] */,
2184 struct svcctl_CreateServiceW r
;
2188 r
.in
.scmanager_handle
= scmanager_handle
;
2189 r
.in
.ServiceName
= ServiceName
;
2190 r
.in
.DisplayName
= DisplayName
;
2191 r
.in
.desired_access
= desired_access
;
2193 r
.in
.start_type
= start_type
;
2194 r
.in
.error_control
= error_control
;
2195 r
.in
.binary_path
= binary_path
;
2196 r
.in
.LoadOrderGroupKey
= LoadOrderGroupKey
;
2198 r
.in
.dependencies
= dependencies
;
2199 r
.in
.dependencies_size
= dependencies_size
;
2200 r
.in
.service_start_name
= service_start_name
;
2201 r
.in
.password
= password
;
2202 r
.in
.password_size
= password_size
;
2204 if (DEBUGLEVEL
>= 10) {
2205 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW
, &r
);
2208 status
= cli
->dispatch(cli
,
2211 NDR_SVCCTL_CREATESERVICEW
,
2214 if (!NT_STATUS_IS_OK(status
)) {
2218 if (DEBUGLEVEL
>= 10) {
2219 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW
, &r
);
2222 if (NT_STATUS_IS_ERR(status
)) {
2226 /* Return variables */
2227 if (TagId
&& r
.out
.TagId
) {
2228 *TagId
= *r
.out
.TagId
;
2230 *handle
= *r
.out
.handle
;
2234 *werror
= r
.out
.result
;
2237 return werror_to_ntstatus(r
.out
.result
);
2240 struct rpccli_svcctl_EnumDependentServicesW_state
{
2241 struct svcctl_EnumDependentServicesW orig
;
2242 struct svcctl_EnumDependentServicesW tmp
;
2243 TALLOC_CTX
*out_mem_ctx
;
2244 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2247 static void rpccli_svcctl_EnumDependentServicesW_done(struct tevent_req
*subreq
);
2249 struct tevent_req
*rpccli_svcctl_EnumDependentServicesW_send(TALLOC_CTX
*mem_ctx
,
2250 struct tevent_context
*ev
,
2251 struct rpc_pipe_client
*cli
,
2252 struct policy_handle
*_service
/* [in] [ref] */,
2253 enum svcctl_ServiceState _state
/* [in] */,
2254 uint8_t *_service_status
/* [out] [ref,size_is(offered)] */,
2255 uint32_t _offered
/* [in] [range(0,0x40000)] */,
2256 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */,
2257 uint32_t *_services_returned
/* [out] [ref,range(0,0x40000)] */)
2259 struct tevent_req
*req
;
2260 struct rpccli_svcctl_EnumDependentServicesW_state
*state
;
2261 struct tevent_req
*subreq
;
2263 req
= tevent_req_create(mem_ctx
, &state
,
2264 struct rpccli_svcctl_EnumDependentServicesW_state
);
2268 state
->out_mem_ctx
= NULL
;
2269 state
->dispatch_recv
= cli
->dispatch_recv
;
2272 state
->orig
.in
.service
= _service
;
2273 state
->orig
.in
.state
= _state
;
2274 state
->orig
.in
.offered
= _offered
;
2276 /* Out parameters */
2277 state
->orig
.out
.service_status
= _service_status
;
2278 state
->orig
.out
.needed
= _needed
;
2279 state
->orig
.out
.services_returned
= _services_returned
;
2282 ZERO_STRUCT(state
->orig
.out
.result
);
2284 if (DEBUGLEVEL
>= 10) {
2285 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW
, &state
->orig
);
2288 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2289 "rpccli_svcctl_EnumDependentServicesW_out_memory");
2290 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2291 return tevent_req_post(req
, ev
);
2294 /* make a temporary copy, that we pass to the dispatch function */
2295 state
->tmp
= state
->orig
;
2297 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2299 NDR_SVCCTL_ENUMDEPENDENTSERVICESW
,
2301 if (tevent_req_nomem(subreq
, req
)) {
2302 return tevent_req_post(req
, ev
);
2304 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumDependentServicesW_done
, req
);
2308 static void rpccli_svcctl_EnumDependentServicesW_done(struct tevent_req
*subreq
)
2310 struct tevent_req
*req
= tevent_req_callback_data(
2311 subreq
, struct tevent_req
);
2312 struct rpccli_svcctl_EnumDependentServicesW_state
*state
= tevent_req_data(
2313 req
, struct rpccli_svcctl_EnumDependentServicesW_state
);
2315 TALLOC_CTX
*mem_ctx
;
2317 if (state
->out_mem_ctx
) {
2318 mem_ctx
= state
->out_mem_ctx
;
2323 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2324 TALLOC_FREE(subreq
);
2325 if (!NT_STATUS_IS_OK(status
)) {
2326 tevent_req_nterror(req
, status
);
2330 /* Copy out parameters */
2331 memcpy(state
->orig
.out
.service_status
, state
->tmp
.out
.service_status
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.service_status
));
2332 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
2333 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
2336 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2338 /* Reset temporary structure */
2339 ZERO_STRUCT(state
->tmp
);
2341 if (DEBUGLEVEL
>= 10) {
2342 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW
, &state
->orig
);
2345 tevent_req_done(req
);
2348 NTSTATUS
rpccli_svcctl_EnumDependentServicesW_recv(struct tevent_req
*req
,
2349 TALLOC_CTX
*mem_ctx
,
2352 struct rpccli_svcctl_EnumDependentServicesW_state
*state
= tevent_req_data(
2353 req
, struct rpccli_svcctl_EnumDependentServicesW_state
);
2356 if (tevent_req_is_nterror(req
, &status
)) {
2357 tevent_req_received(req
);
2361 /* Steal possbile out parameters to the callers context */
2362 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2365 *result
= state
->orig
.out
.result
;
2367 tevent_req_received(req
);
2368 return NT_STATUS_OK
;
2371 NTSTATUS
rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client
*cli
,
2372 TALLOC_CTX
*mem_ctx
,
2373 struct policy_handle
*service
/* [in] [ref] */,
2374 enum svcctl_ServiceState state
/* [in] */,
2375 uint8_t *service_status
/* [out] [ref,size_is(offered)] */,
2376 uint32_t offered
/* [in] [range(0,0x40000)] */,
2377 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
2378 uint32_t *services_returned
/* [out] [ref,range(0,0x40000)] */,
2381 struct svcctl_EnumDependentServicesW r
;
2385 r
.in
.service
= service
;
2387 r
.in
.offered
= offered
;
2389 if (DEBUGLEVEL
>= 10) {
2390 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW
, &r
);
2393 status
= cli
->dispatch(cli
,
2396 NDR_SVCCTL_ENUMDEPENDENTSERVICESW
,
2399 if (!NT_STATUS_IS_OK(status
)) {
2403 if (DEBUGLEVEL
>= 10) {
2404 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW
, &r
);
2407 if (NT_STATUS_IS_ERR(status
)) {
2411 /* Return variables */
2412 memcpy(service_status
, r
.out
.service_status
, r
.in
.offered
* sizeof(*service_status
));
2413 *needed
= *r
.out
.needed
;
2414 *services_returned
= *r
.out
.services_returned
;
2418 *werror
= r
.out
.result
;
2421 return werror_to_ntstatus(r
.out
.result
);
2424 struct rpccli_svcctl_EnumServicesStatusW_state
{
2425 struct svcctl_EnumServicesStatusW orig
;
2426 struct svcctl_EnumServicesStatusW tmp
;
2427 TALLOC_CTX
*out_mem_ctx
;
2428 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2431 static void rpccli_svcctl_EnumServicesStatusW_done(struct tevent_req
*subreq
);
2433 struct tevent_req
*rpccli_svcctl_EnumServicesStatusW_send(TALLOC_CTX
*mem_ctx
,
2434 struct tevent_context
*ev
,
2435 struct rpc_pipe_client
*cli
,
2436 struct policy_handle
*_handle
/* [in] [ref] */,
2437 uint32_t _type
/* [in] */,
2438 enum svcctl_ServiceState _state
/* [in] */,
2439 uint8_t *_service
/* [out] [ref,size_is(offered)] */,
2440 uint32_t _offered
/* [in] [range(0,0x40000)] */,
2441 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */,
2442 uint32_t *_services_returned
/* [out] [ref,range(0,0x40000)] */,
2443 uint32_t *_resume_handle
/* [in,out] [unique] */)
2445 struct tevent_req
*req
;
2446 struct rpccli_svcctl_EnumServicesStatusW_state
*state
;
2447 struct tevent_req
*subreq
;
2449 req
= tevent_req_create(mem_ctx
, &state
,
2450 struct rpccli_svcctl_EnumServicesStatusW_state
);
2454 state
->out_mem_ctx
= NULL
;
2455 state
->dispatch_recv
= cli
->dispatch_recv
;
2458 state
->orig
.in
.handle
= _handle
;
2459 state
->orig
.in
.type
= _type
;
2460 state
->orig
.in
.state
= _state
;
2461 state
->orig
.in
.offered
= _offered
;
2462 state
->orig
.in
.resume_handle
= _resume_handle
;
2464 /* Out parameters */
2465 state
->orig
.out
.service
= _service
;
2466 state
->orig
.out
.needed
= _needed
;
2467 state
->orig
.out
.services_returned
= _services_returned
;
2468 state
->orig
.out
.resume_handle
= _resume_handle
;
2471 ZERO_STRUCT(state
->orig
.out
.result
);
2473 if (DEBUGLEVEL
>= 10) {
2474 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW
, &state
->orig
);
2477 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2478 "rpccli_svcctl_EnumServicesStatusW_out_memory");
2479 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2480 return tevent_req_post(req
, ev
);
2483 /* make a temporary copy, that we pass to the dispatch function */
2484 state
->tmp
= state
->orig
;
2486 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2488 NDR_SVCCTL_ENUMSERVICESSTATUSW
,
2490 if (tevent_req_nomem(subreq
, req
)) {
2491 return tevent_req_post(req
, ev
);
2493 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumServicesStatusW_done
, req
);
2497 static void rpccli_svcctl_EnumServicesStatusW_done(struct tevent_req
*subreq
)
2499 struct tevent_req
*req
= tevent_req_callback_data(
2500 subreq
, struct tevent_req
);
2501 struct rpccli_svcctl_EnumServicesStatusW_state
*state
= tevent_req_data(
2502 req
, struct rpccli_svcctl_EnumServicesStatusW_state
);
2504 TALLOC_CTX
*mem_ctx
;
2506 if (state
->out_mem_ctx
) {
2507 mem_ctx
= state
->out_mem_ctx
;
2512 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2513 TALLOC_FREE(subreq
);
2514 if (!NT_STATUS_IS_OK(status
)) {
2515 tevent_req_nterror(req
, status
);
2519 /* Copy out parameters */
2520 memcpy(state
->orig
.out
.service
, state
->tmp
.out
.service
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.service
));
2521 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
2522 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
2523 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
2524 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
2528 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2530 /* Reset temporary structure */
2531 ZERO_STRUCT(state
->tmp
);
2533 if (DEBUGLEVEL
>= 10) {
2534 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW
, &state
->orig
);
2537 tevent_req_done(req
);
2540 NTSTATUS
rpccli_svcctl_EnumServicesStatusW_recv(struct tevent_req
*req
,
2541 TALLOC_CTX
*mem_ctx
,
2544 struct rpccli_svcctl_EnumServicesStatusW_state
*state
= tevent_req_data(
2545 req
, struct rpccli_svcctl_EnumServicesStatusW_state
);
2548 if (tevent_req_is_nterror(req
, &status
)) {
2549 tevent_req_received(req
);
2553 /* Steal possbile out parameters to the callers context */
2554 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2557 *result
= state
->orig
.out
.result
;
2559 tevent_req_received(req
);
2560 return NT_STATUS_OK
;
2563 NTSTATUS
rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client
*cli
,
2564 TALLOC_CTX
*mem_ctx
,
2565 struct policy_handle
*handle
/* [in] [ref] */,
2566 uint32_t type
/* [in] */,
2567 enum svcctl_ServiceState state
/* [in] */,
2568 uint8_t *service
/* [out] [ref,size_is(offered)] */,
2569 uint32_t offered
/* [in] [range(0,0x40000)] */,
2570 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
2571 uint32_t *services_returned
/* [out] [ref,range(0,0x40000)] */,
2572 uint32_t *resume_handle
/* [in,out] [unique] */,
2575 struct svcctl_EnumServicesStatusW r
;
2579 r
.in
.handle
= handle
;
2582 r
.in
.offered
= offered
;
2583 r
.in
.resume_handle
= resume_handle
;
2585 if (DEBUGLEVEL
>= 10) {
2586 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW
, &r
);
2589 status
= cli
->dispatch(cli
,
2592 NDR_SVCCTL_ENUMSERVICESSTATUSW
,
2595 if (!NT_STATUS_IS_OK(status
)) {
2599 if (DEBUGLEVEL
>= 10) {
2600 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW
, &r
);
2603 if (NT_STATUS_IS_ERR(status
)) {
2607 /* Return variables */
2608 memcpy(service
, r
.out
.service
, r
.in
.offered
* sizeof(*service
));
2609 *needed
= *r
.out
.needed
;
2610 *services_returned
= *r
.out
.services_returned
;
2611 if (resume_handle
&& r
.out
.resume_handle
) {
2612 *resume_handle
= *r
.out
.resume_handle
;
2617 *werror
= r
.out
.result
;
2620 return werror_to_ntstatus(r
.out
.result
);
2623 struct rpccli_svcctl_OpenSCManagerW_state
{
2624 struct svcctl_OpenSCManagerW orig
;
2625 struct svcctl_OpenSCManagerW tmp
;
2626 TALLOC_CTX
*out_mem_ctx
;
2627 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2630 static void rpccli_svcctl_OpenSCManagerW_done(struct tevent_req
*subreq
);
2632 struct tevent_req
*rpccli_svcctl_OpenSCManagerW_send(TALLOC_CTX
*mem_ctx
,
2633 struct tevent_context
*ev
,
2634 struct rpc_pipe_client
*cli
,
2635 const char *_MachineName
/* [in] [unique,charset(UTF16)] */,
2636 const char *_DatabaseName
/* [in] [unique,charset(UTF16)] */,
2637 uint32_t _access_mask
/* [in] */,
2638 struct policy_handle
*_handle
/* [out] [ref] */)
2640 struct tevent_req
*req
;
2641 struct rpccli_svcctl_OpenSCManagerW_state
*state
;
2642 struct tevent_req
*subreq
;
2644 req
= tevent_req_create(mem_ctx
, &state
,
2645 struct rpccli_svcctl_OpenSCManagerW_state
);
2649 state
->out_mem_ctx
= NULL
;
2650 state
->dispatch_recv
= cli
->dispatch_recv
;
2653 state
->orig
.in
.MachineName
= _MachineName
;
2654 state
->orig
.in
.DatabaseName
= _DatabaseName
;
2655 state
->orig
.in
.access_mask
= _access_mask
;
2657 /* Out parameters */
2658 state
->orig
.out
.handle
= _handle
;
2661 ZERO_STRUCT(state
->orig
.out
.result
);
2663 if (DEBUGLEVEL
>= 10) {
2664 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW
, &state
->orig
);
2667 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2668 "rpccli_svcctl_OpenSCManagerW_out_memory");
2669 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2670 return tevent_req_post(req
, ev
);
2673 /* make a temporary copy, that we pass to the dispatch function */
2674 state
->tmp
= state
->orig
;
2676 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2678 NDR_SVCCTL_OPENSCMANAGERW
,
2680 if (tevent_req_nomem(subreq
, req
)) {
2681 return tevent_req_post(req
, ev
);
2683 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenSCManagerW_done
, req
);
2687 static void rpccli_svcctl_OpenSCManagerW_done(struct tevent_req
*subreq
)
2689 struct tevent_req
*req
= tevent_req_callback_data(
2690 subreq
, struct tevent_req
);
2691 struct rpccli_svcctl_OpenSCManagerW_state
*state
= tevent_req_data(
2692 req
, struct rpccli_svcctl_OpenSCManagerW_state
);
2694 TALLOC_CTX
*mem_ctx
;
2696 if (state
->out_mem_ctx
) {
2697 mem_ctx
= state
->out_mem_ctx
;
2702 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2703 TALLOC_FREE(subreq
);
2704 if (!NT_STATUS_IS_OK(status
)) {
2705 tevent_req_nterror(req
, status
);
2709 /* Copy out parameters */
2710 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
2713 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2715 /* Reset temporary structure */
2716 ZERO_STRUCT(state
->tmp
);
2718 if (DEBUGLEVEL
>= 10) {
2719 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW
, &state
->orig
);
2722 tevent_req_done(req
);
2725 NTSTATUS
rpccli_svcctl_OpenSCManagerW_recv(struct tevent_req
*req
,
2726 TALLOC_CTX
*mem_ctx
,
2729 struct rpccli_svcctl_OpenSCManagerW_state
*state
= tevent_req_data(
2730 req
, struct rpccli_svcctl_OpenSCManagerW_state
);
2733 if (tevent_req_is_nterror(req
, &status
)) {
2734 tevent_req_received(req
);
2738 /* Steal possbile out parameters to the callers context */
2739 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2742 *result
= state
->orig
.out
.result
;
2744 tevent_req_received(req
);
2745 return NT_STATUS_OK
;
2748 NTSTATUS
rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client
*cli
,
2749 TALLOC_CTX
*mem_ctx
,
2750 const char *MachineName
/* [in] [unique,charset(UTF16)] */,
2751 const char *DatabaseName
/* [in] [unique,charset(UTF16)] */,
2752 uint32_t access_mask
/* [in] */,
2753 struct policy_handle
*handle
/* [out] [ref] */,
2756 struct svcctl_OpenSCManagerW r
;
2760 r
.in
.MachineName
= MachineName
;
2761 r
.in
.DatabaseName
= DatabaseName
;
2762 r
.in
.access_mask
= access_mask
;
2764 if (DEBUGLEVEL
>= 10) {
2765 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW
, &r
);
2768 status
= cli
->dispatch(cli
,
2771 NDR_SVCCTL_OPENSCMANAGERW
,
2774 if (!NT_STATUS_IS_OK(status
)) {
2778 if (DEBUGLEVEL
>= 10) {
2779 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW
, &r
);
2782 if (NT_STATUS_IS_ERR(status
)) {
2786 /* Return variables */
2787 *handle
= *r
.out
.handle
;
2791 *werror
= r
.out
.result
;
2794 return werror_to_ntstatus(r
.out
.result
);
2797 struct rpccli_svcctl_OpenServiceW_state
{
2798 struct svcctl_OpenServiceW orig
;
2799 struct svcctl_OpenServiceW tmp
;
2800 TALLOC_CTX
*out_mem_ctx
;
2801 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2804 static void rpccli_svcctl_OpenServiceW_done(struct tevent_req
*subreq
);
2806 struct tevent_req
*rpccli_svcctl_OpenServiceW_send(TALLOC_CTX
*mem_ctx
,
2807 struct tevent_context
*ev
,
2808 struct rpc_pipe_client
*cli
,
2809 struct policy_handle
*_scmanager_handle
/* [in] [ref] */,
2810 const char *_ServiceName
/* [in] [charset(UTF16)] */,
2811 uint32_t _access_mask
/* [in] */,
2812 struct policy_handle
*_handle
/* [out] [ref] */)
2814 struct tevent_req
*req
;
2815 struct rpccli_svcctl_OpenServiceW_state
*state
;
2816 struct tevent_req
*subreq
;
2818 req
= tevent_req_create(mem_ctx
, &state
,
2819 struct rpccli_svcctl_OpenServiceW_state
);
2823 state
->out_mem_ctx
= NULL
;
2824 state
->dispatch_recv
= cli
->dispatch_recv
;
2827 state
->orig
.in
.scmanager_handle
= _scmanager_handle
;
2828 state
->orig
.in
.ServiceName
= _ServiceName
;
2829 state
->orig
.in
.access_mask
= _access_mask
;
2831 /* Out parameters */
2832 state
->orig
.out
.handle
= _handle
;
2835 ZERO_STRUCT(state
->orig
.out
.result
);
2837 if (DEBUGLEVEL
>= 10) {
2838 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW
, &state
->orig
);
2841 state
->out_mem_ctx
= talloc_named_const(state
, 0,
2842 "rpccli_svcctl_OpenServiceW_out_memory");
2843 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
2844 return tevent_req_post(req
, ev
);
2847 /* make a temporary copy, that we pass to the dispatch function */
2848 state
->tmp
= state
->orig
;
2850 subreq
= cli
->dispatch_send(state
, ev
, cli
,
2852 NDR_SVCCTL_OPENSERVICEW
,
2854 if (tevent_req_nomem(subreq
, req
)) {
2855 return tevent_req_post(req
, ev
);
2857 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenServiceW_done
, req
);
2861 static void rpccli_svcctl_OpenServiceW_done(struct tevent_req
*subreq
)
2863 struct tevent_req
*req
= tevent_req_callback_data(
2864 subreq
, struct tevent_req
);
2865 struct rpccli_svcctl_OpenServiceW_state
*state
= tevent_req_data(
2866 req
, struct rpccli_svcctl_OpenServiceW_state
);
2868 TALLOC_CTX
*mem_ctx
;
2870 if (state
->out_mem_ctx
) {
2871 mem_ctx
= state
->out_mem_ctx
;
2876 status
= state
->dispatch_recv(subreq
, mem_ctx
);
2877 TALLOC_FREE(subreq
);
2878 if (!NT_STATUS_IS_OK(status
)) {
2879 tevent_req_nterror(req
, status
);
2883 /* Copy out parameters */
2884 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
2887 state
->orig
.out
.result
= state
->tmp
.out
.result
;
2889 /* Reset temporary structure */
2890 ZERO_STRUCT(state
->tmp
);
2892 if (DEBUGLEVEL
>= 10) {
2893 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW
, &state
->orig
);
2896 tevent_req_done(req
);
2899 NTSTATUS
rpccli_svcctl_OpenServiceW_recv(struct tevent_req
*req
,
2900 TALLOC_CTX
*mem_ctx
,
2903 struct rpccli_svcctl_OpenServiceW_state
*state
= tevent_req_data(
2904 req
, struct rpccli_svcctl_OpenServiceW_state
);
2907 if (tevent_req_is_nterror(req
, &status
)) {
2908 tevent_req_received(req
);
2912 /* Steal possbile out parameters to the callers context */
2913 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
2916 *result
= state
->orig
.out
.result
;
2918 tevent_req_received(req
);
2919 return NT_STATUS_OK
;
2922 NTSTATUS
rpccli_svcctl_OpenServiceW(struct rpc_pipe_client
*cli
,
2923 TALLOC_CTX
*mem_ctx
,
2924 struct policy_handle
*scmanager_handle
/* [in] [ref] */,
2925 const char *ServiceName
/* [in] [charset(UTF16)] */,
2926 uint32_t access_mask
/* [in] */,
2927 struct policy_handle
*handle
/* [out] [ref] */,
2930 struct svcctl_OpenServiceW r
;
2934 r
.in
.scmanager_handle
= scmanager_handle
;
2935 r
.in
.ServiceName
= ServiceName
;
2936 r
.in
.access_mask
= access_mask
;
2938 if (DEBUGLEVEL
>= 10) {
2939 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW
, &r
);
2942 status
= cli
->dispatch(cli
,
2945 NDR_SVCCTL_OPENSERVICEW
,
2948 if (!NT_STATUS_IS_OK(status
)) {
2952 if (DEBUGLEVEL
>= 10) {
2953 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW
, &r
);
2956 if (NT_STATUS_IS_ERR(status
)) {
2960 /* Return variables */
2961 *handle
= *r
.out
.handle
;
2965 *werror
= r
.out
.result
;
2968 return werror_to_ntstatus(r
.out
.result
);
2971 struct rpccli_svcctl_QueryServiceConfigW_state
{
2972 struct svcctl_QueryServiceConfigW orig
;
2973 struct svcctl_QueryServiceConfigW tmp
;
2974 TALLOC_CTX
*out_mem_ctx
;
2975 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
2978 static void rpccli_svcctl_QueryServiceConfigW_done(struct tevent_req
*subreq
);
2980 struct tevent_req
*rpccli_svcctl_QueryServiceConfigW_send(TALLOC_CTX
*mem_ctx
,
2981 struct tevent_context
*ev
,
2982 struct rpc_pipe_client
*cli
,
2983 struct policy_handle
*_handle
/* [in] [ref] */,
2984 struct QUERY_SERVICE_CONFIG
*_query
/* [out] [ref] */,
2985 uint32_t _offered
/* [in] [range(0,8192)] */,
2986 uint32_t *_needed
/* [out] [ref,range(0,8192)] */)
2988 struct tevent_req
*req
;
2989 struct rpccli_svcctl_QueryServiceConfigW_state
*state
;
2990 struct tevent_req
*subreq
;
2992 req
= tevent_req_create(mem_ctx
, &state
,
2993 struct rpccli_svcctl_QueryServiceConfigW_state
);
2997 state
->out_mem_ctx
= NULL
;
2998 state
->dispatch_recv
= cli
->dispatch_recv
;
3001 state
->orig
.in
.handle
= _handle
;
3002 state
->orig
.in
.offered
= _offered
;
3004 /* Out parameters */
3005 state
->orig
.out
.query
= _query
;
3006 state
->orig
.out
.needed
= _needed
;
3009 ZERO_STRUCT(state
->orig
.out
.result
);
3011 if (DEBUGLEVEL
>= 10) {
3012 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW
, &state
->orig
);
3015 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3016 "rpccli_svcctl_QueryServiceConfigW_out_memory");
3017 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3018 return tevent_req_post(req
, ev
);
3021 /* make a temporary copy, that we pass to the dispatch function */
3022 state
->tmp
= state
->orig
;
3024 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3026 NDR_SVCCTL_QUERYSERVICECONFIGW
,
3028 if (tevent_req_nomem(subreq
, req
)) {
3029 return tevent_req_post(req
, ev
);
3031 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfigW_done
, req
);
3035 static void rpccli_svcctl_QueryServiceConfigW_done(struct tevent_req
*subreq
)
3037 struct tevent_req
*req
= tevent_req_callback_data(
3038 subreq
, struct tevent_req
);
3039 struct rpccli_svcctl_QueryServiceConfigW_state
*state
= tevent_req_data(
3040 req
, struct rpccli_svcctl_QueryServiceConfigW_state
);
3042 TALLOC_CTX
*mem_ctx
;
3044 if (state
->out_mem_ctx
) {
3045 mem_ctx
= state
->out_mem_ctx
;
3050 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3051 TALLOC_FREE(subreq
);
3052 if (!NT_STATUS_IS_OK(status
)) {
3053 tevent_req_nterror(req
, status
);
3057 /* Copy out parameters */
3058 *state
->orig
.out
.query
= *state
->tmp
.out
.query
;
3059 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
3062 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3064 /* Reset temporary structure */
3065 ZERO_STRUCT(state
->tmp
);
3067 if (DEBUGLEVEL
>= 10) {
3068 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW
, &state
->orig
);
3071 tevent_req_done(req
);
3074 NTSTATUS
rpccli_svcctl_QueryServiceConfigW_recv(struct tevent_req
*req
,
3075 TALLOC_CTX
*mem_ctx
,
3078 struct rpccli_svcctl_QueryServiceConfigW_state
*state
= tevent_req_data(
3079 req
, struct rpccli_svcctl_QueryServiceConfigW_state
);
3082 if (tevent_req_is_nterror(req
, &status
)) {
3083 tevent_req_received(req
);
3087 /* Steal possbile out parameters to the callers context */
3088 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3091 *result
= state
->orig
.out
.result
;
3093 tevent_req_received(req
);
3094 return NT_STATUS_OK
;
3097 NTSTATUS
rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client
*cli
,
3098 TALLOC_CTX
*mem_ctx
,
3099 struct policy_handle
*handle
/* [in] [ref] */,
3100 struct QUERY_SERVICE_CONFIG
*query
/* [out] [ref] */,
3101 uint32_t offered
/* [in] [range(0,8192)] */,
3102 uint32_t *needed
/* [out] [ref,range(0,8192)] */,
3105 struct svcctl_QueryServiceConfigW r
;
3109 r
.in
.handle
= handle
;
3110 r
.in
.offered
= offered
;
3112 if (DEBUGLEVEL
>= 10) {
3113 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW
, &r
);
3116 status
= cli
->dispatch(cli
,
3119 NDR_SVCCTL_QUERYSERVICECONFIGW
,
3122 if (!NT_STATUS_IS_OK(status
)) {
3126 if (DEBUGLEVEL
>= 10) {
3127 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW
, &r
);
3130 if (NT_STATUS_IS_ERR(status
)) {
3134 /* Return variables */
3135 *query
= *r
.out
.query
;
3136 *needed
= *r
.out
.needed
;
3140 *werror
= r
.out
.result
;
3143 return werror_to_ntstatus(r
.out
.result
);
3146 struct rpccli_svcctl_QueryServiceLockStatusW_state
{
3147 struct svcctl_QueryServiceLockStatusW orig
;
3148 struct svcctl_QueryServiceLockStatusW tmp
;
3149 TALLOC_CTX
*out_mem_ctx
;
3150 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3153 static void rpccli_svcctl_QueryServiceLockStatusW_done(struct tevent_req
*subreq
);
3155 struct tevent_req
*rpccli_svcctl_QueryServiceLockStatusW_send(TALLOC_CTX
*mem_ctx
,
3156 struct tevent_context
*ev
,
3157 struct rpc_pipe_client
*cli
,
3158 struct policy_handle
*_handle
/* [in] [ref] */,
3159 uint32_t _offered
/* [in] */,
3160 struct SERVICE_LOCK_STATUS
*_lock_status
/* [out] [ref] */,
3161 uint32_t *_needed
/* [out] [ref] */)
3163 struct tevent_req
*req
;
3164 struct rpccli_svcctl_QueryServiceLockStatusW_state
*state
;
3165 struct tevent_req
*subreq
;
3167 req
= tevent_req_create(mem_ctx
, &state
,
3168 struct rpccli_svcctl_QueryServiceLockStatusW_state
);
3172 state
->out_mem_ctx
= NULL
;
3173 state
->dispatch_recv
= cli
->dispatch_recv
;
3176 state
->orig
.in
.handle
= _handle
;
3177 state
->orig
.in
.offered
= _offered
;
3179 /* Out parameters */
3180 state
->orig
.out
.lock_status
= _lock_status
;
3181 state
->orig
.out
.needed
= _needed
;
3184 ZERO_STRUCT(state
->orig
.out
.result
);
3186 if (DEBUGLEVEL
>= 10) {
3187 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW
, &state
->orig
);
3190 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3191 "rpccli_svcctl_QueryServiceLockStatusW_out_memory");
3192 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3193 return tevent_req_post(req
, ev
);
3196 /* make a temporary copy, that we pass to the dispatch function */
3197 state
->tmp
= state
->orig
;
3199 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3201 NDR_SVCCTL_QUERYSERVICELOCKSTATUSW
,
3203 if (tevent_req_nomem(subreq
, req
)) {
3204 return tevent_req_post(req
, ev
);
3206 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceLockStatusW_done
, req
);
3210 static void rpccli_svcctl_QueryServiceLockStatusW_done(struct tevent_req
*subreq
)
3212 struct tevent_req
*req
= tevent_req_callback_data(
3213 subreq
, struct tevent_req
);
3214 struct rpccli_svcctl_QueryServiceLockStatusW_state
*state
= tevent_req_data(
3215 req
, struct rpccli_svcctl_QueryServiceLockStatusW_state
);
3217 TALLOC_CTX
*mem_ctx
;
3219 if (state
->out_mem_ctx
) {
3220 mem_ctx
= state
->out_mem_ctx
;
3225 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3226 TALLOC_FREE(subreq
);
3227 if (!NT_STATUS_IS_OK(status
)) {
3228 tevent_req_nterror(req
, status
);
3232 /* Copy out parameters */
3233 *state
->orig
.out
.lock_status
= *state
->tmp
.out
.lock_status
;
3234 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
3237 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3239 /* Reset temporary structure */
3240 ZERO_STRUCT(state
->tmp
);
3242 if (DEBUGLEVEL
>= 10) {
3243 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW
, &state
->orig
);
3246 tevent_req_done(req
);
3249 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusW_recv(struct tevent_req
*req
,
3250 TALLOC_CTX
*mem_ctx
,
3253 struct rpccli_svcctl_QueryServiceLockStatusW_state
*state
= tevent_req_data(
3254 req
, struct rpccli_svcctl_QueryServiceLockStatusW_state
);
3257 if (tevent_req_is_nterror(req
, &status
)) {
3258 tevent_req_received(req
);
3262 /* Steal possbile out parameters to the callers context */
3263 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3266 *result
= state
->orig
.out
.result
;
3268 tevent_req_received(req
);
3269 return NT_STATUS_OK
;
3272 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client
*cli
,
3273 TALLOC_CTX
*mem_ctx
,
3274 struct policy_handle
*handle
/* [in] [ref] */,
3275 uint32_t offered
/* [in] */,
3276 struct SERVICE_LOCK_STATUS
*lock_status
/* [out] [ref] */,
3277 uint32_t *needed
/* [out] [ref] */,
3280 struct svcctl_QueryServiceLockStatusW r
;
3284 r
.in
.handle
= handle
;
3285 r
.in
.offered
= offered
;
3287 if (DEBUGLEVEL
>= 10) {
3288 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW
, &r
);
3291 status
= cli
->dispatch(cli
,
3294 NDR_SVCCTL_QUERYSERVICELOCKSTATUSW
,
3297 if (!NT_STATUS_IS_OK(status
)) {
3301 if (DEBUGLEVEL
>= 10) {
3302 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW
, &r
);
3305 if (NT_STATUS_IS_ERR(status
)) {
3309 /* Return variables */
3310 *lock_status
= *r
.out
.lock_status
;
3311 *needed
= *r
.out
.needed
;
3315 *werror
= r
.out
.result
;
3318 return werror_to_ntstatus(r
.out
.result
);
3321 struct rpccli_svcctl_StartServiceW_state
{
3322 struct svcctl_StartServiceW orig
;
3323 struct svcctl_StartServiceW tmp
;
3324 TALLOC_CTX
*out_mem_ctx
;
3325 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3328 static void rpccli_svcctl_StartServiceW_done(struct tevent_req
*subreq
);
3330 struct tevent_req
*rpccli_svcctl_StartServiceW_send(TALLOC_CTX
*mem_ctx
,
3331 struct tevent_context
*ev
,
3332 struct rpc_pipe_client
*cli
,
3333 struct policy_handle
*_handle
/* [in] [ref] */,
3334 uint32_t _NumArgs
/* [in] [range(0,SC_MAX_ARGUMENTS)] */,
3335 struct svcctl_ArgumentString
*_Arguments
/* [in] [unique,size_is(NumArgs)] */)
3337 struct tevent_req
*req
;
3338 struct rpccli_svcctl_StartServiceW_state
*state
;
3339 struct tevent_req
*subreq
;
3341 req
= tevent_req_create(mem_ctx
, &state
,
3342 struct rpccli_svcctl_StartServiceW_state
);
3346 state
->out_mem_ctx
= NULL
;
3347 state
->dispatch_recv
= cli
->dispatch_recv
;
3350 state
->orig
.in
.handle
= _handle
;
3351 state
->orig
.in
.NumArgs
= _NumArgs
;
3352 state
->orig
.in
.Arguments
= _Arguments
;
3354 /* Out parameters */
3357 ZERO_STRUCT(state
->orig
.out
.result
);
3359 if (DEBUGLEVEL
>= 10) {
3360 NDR_PRINT_IN_DEBUG(svcctl_StartServiceW
, &state
->orig
);
3363 /* make a temporary copy, that we pass to the dispatch function */
3364 state
->tmp
= state
->orig
;
3366 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3368 NDR_SVCCTL_STARTSERVICEW
,
3370 if (tevent_req_nomem(subreq
, req
)) {
3371 return tevent_req_post(req
, ev
);
3373 tevent_req_set_callback(subreq
, rpccli_svcctl_StartServiceW_done
, req
);
3377 static void rpccli_svcctl_StartServiceW_done(struct tevent_req
*subreq
)
3379 struct tevent_req
*req
= tevent_req_callback_data(
3380 subreq
, struct tevent_req
);
3381 struct rpccli_svcctl_StartServiceW_state
*state
= tevent_req_data(
3382 req
, struct rpccli_svcctl_StartServiceW_state
);
3384 TALLOC_CTX
*mem_ctx
;
3386 if (state
->out_mem_ctx
) {
3387 mem_ctx
= state
->out_mem_ctx
;
3392 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3393 TALLOC_FREE(subreq
);
3394 if (!NT_STATUS_IS_OK(status
)) {
3395 tevent_req_nterror(req
, status
);
3399 /* Copy out parameters */
3402 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3404 /* Reset temporary structure */
3405 ZERO_STRUCT(state
->tmp
);
3407 if (DEBUGLEVEL
>= 10) {
3408 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW
, &state
->orig
);
3411 tevent_req_done(req
);
3414 NTSTATUS
rpccli_svcctl_StartServiceW_recv(struct tevent_req
*req
,
3415 TALLOC_CTX
*mem_ctx
,
3418 struct rpccli_svcctl_StartServiceW_state
*state
= tevent_req_data(
3419 req
, struct rpccli_svcctl_StartServiceW_state
);
3422 if (tevent_req_is_nterror(req
, &status
)) {
3423 tevent_req_received(req
);
3427 /* Steal possbile out parameters to the callers context */
3428 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3431 *result
= state
->orig
.out
.result
;
3433 tevent_req_received(req
);
3434 return NT_STATUS_OK
;
3437 NTSTATUS
rpccli_svcctl_StartServiceW(struct rpc_pipe_client
*cli
,
3438 TALLOC_CTX
*mem_ctx
,
3439 struct policy_handle
*handle
/* [in] [ref] */,
3440 uint32_t NumArgs
/* [in] [range(0,SC_MAX_ARGUMENTS)] */,
3441 struct svcctl_ArgumentString
*Arguments
/* [in] [unique,size_is(NumArgs)] */,
3444 struct svcctl_StartServiceW r
;
3448 r
.in
.handle
= handle
;
3449 r
.in
.NumArgs
= NumArgs
;
3450 r
.in
.Arguments
= Arguments
;
3452 if (DEBUGLEVEL
>= 10) {
3453 NDR_PRINT_IN_DEBUG(svcctl_StartServiceW
, &r
);
3456 status
= cli
->dispatch(cli
,
3459 NDR_SVCCTL_STARTSERVICEW
,
3462 if (!NT_STATUS_IS_OK(status
)) {
3466 if (DEBUGLEVEL
>= 10) {
3467 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW
, &r
);
3470 if (NT_STATUS_IS_ERR(status
)) {
3474 /* Return variables */
3478 *werror
= r
.out
.result
;
3481 return werror_to_ntstatus(r
.out
.result
);
3484 struct rpccli_svcctl_GetServiceDisplayNameW_state
{
3485 struct svcctl_GetServiceDisplayNameW orig
;
3486 struct svcctl_GetServiceDisplayNameW tmp
;
3487 TALLOC_CTX
*out_mem_ctx
;
3488 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3491 static void rpccli_svcctl_GetServiceDisplayNameW_done(struct tevent_req
*subreq
);
3493 struct tevent_req
*rpccli_svcctl_GetServiceDisplayNameW_send(TALLOC_CTX
*mem_ctx
,
3494 struct tevent_context
*ev
,
3495 struct rpc_pipe_client
*cli
,
3496 struct policy_handle
*_handle
/* [in] [ref] */,
3497 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
3498 const char **_display_name
/* [out] [ref,charset(UTF16)] */,
3499 uint32_t *_display_name_length
/* [in,out] [unique] */)
3501 struct tevent_req
*req
;
3502 struct rpccli_svcctl_GetServiceDisplayNameW_state
*state
;
3503 struct tevent_req
*subreq
;
3505 req
= tevent_req_create(mem_ctx
, &state
,
3506 struct rpccli_svcctl_GetServiceDisplayNameW_state
);
3510 state
->out_mem_ctx
= NULL
;
3511 state
->dispatch_recv
= cli
->dispatch_recv
;
3514 state
->orig
.in
.handle
= _handle
;
3515 state
->orig
.in
.service_name
= _service_name
;
3516 state
->orig
.in
.display_name_length
= _display_name_length
;
3518 /* Out parameters */
3519 state
->orig
.out
.display_name
= _display_name
;
3520 state
->orig
.out
.display_name_length
= _display_name_length
;
3523 ZERO_STRUCT(state
->orig
.out
.result
);
3525 if (DEBUGLEVEL
>= 10) {
3526 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW
, &state
->orig
);
3529 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3530 "rpccli_svcctl_GetServiceDisplayNameW_out_memory");
3531 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3532 return tevent_req_post(req
, ev
);
3535 /* make a temporary copy, that we pass to the dispatch function */
3536 state
->tmp
= state
->orig
;
3538 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3540 NDR_SVCCTL_GETSERVICEDISPLAYNAMEW
,
3542 if (tevent_req_nomem(subreq
, req
)) {
3543 return tevent_req_post(req
, ev
);
3545 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceDisplayNameW_done
, req
);
3549 static void rpccli_svcctl_GetServiceDisplayNameW_done(struct tevent_req
*subreq
)
3551 struct tevent_req
*req
= tevent_req_callback_data(
3552 subreq
, struct tevent_req
);
3553 struct rpccli_svcctl_GetServiceDisplayNameW_state
*state
= tevent_req_data(
3554 req
, struct rpccli_svcctl_GetServiceDisplayNameW_state
);
3556 TALLOC_CTX
*mem_ctx
;
3558 if (state
->out_mem_ctx
) {
3559 mem_ctx
= state
->out_mem_ctx
;
3564 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3565 TALLOC_FREE(subreq
);
3566 if (!NT_STATUS_IS_OK(status
)) {
3567 tevent_req_nterror(req
, status
);
3571 /* Copy out parameters */
3572 *state
->orig
.out
.display_name
= *state
->tmp
.out
.display_name
;
3573 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
3574 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
3578 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3580 /* Reset temporary structure */
3581 ZERO_STRUCT(state
->tmp
);
3583 if (DEBUGLEVEL
>= 10) {
3584 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW
, &state
->orig
);
3587 tevent_req_done(req
);
3590 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameW_recv(struct tevent_req
*req
,
3591 TALLOC_CTX
*mem_ctx
,
3594 struct rpccli_svcctl_GetServiceDisplayNameW_state
*state
= tevent_req_data(
3595 req
, struct rpccli_svcctl_GetServiceDisplayNameW_state
);
3598 if (tevent_req_is_nterror(req
, &status
)) {
3599 tevent_req_received(req
);
3603 /* Steal possbile out parameters to the callers context */
3604 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3607 *result
= state
->orig
.out
.result
;
3609 tevent_req_received(req
);
3610 return NT_STATUS_OK
;
3613 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client
*cli
,
3614 TALLOC_CTX
*mem_ctx
,
3615 struct policy_handle
*handle
/* [in] [ref] */,
3616 const char *service_name
/* [in] [unique,charset(UTF16)] */,
3617 const char **display_name
/* [out] [ref,charset(UTF16)] */,
3618 uint32_t *display_name_length
/* [in,out] [unique] */,
3621 struct svcctl_GetServiceDisplayNameW r
;
3625 r
.in
.handle
= handle
;
3626 r
.in
.service_name
= service_name
;
3627 r
.in
.display_name_length
= display_name_length
;
3629 if (DEBUGLEVEL
>= 10) {
3630 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW
, &r
);
3633 status
= cli
->dispatch(cli
,
3636 NDR_SVCCTL_GETSERVICEDISPLAYNAMEW
,
3639 if (!NT_STATUS_IS_OK(status
)) {
3643 if (DEBUGLEVEL
>= 10) {
3644 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW
, &r
);
3647 if (NT_STATUS_IS_ERR(status
)) {
3651 /* Return variables */
3652 *display_name
= *r
.out
.display_name
;
3653 if (display_name_length
&& r
.out
.display_name_length
) {
3654 *display_name_length
= *r
.out
.display_name_length
;
3659 *werror
= r
.out
.result
;
3662 return werror_to_ntstatus(r
.out
.result
);
3665 struct rpccli_svcctl_GetServiceKeyNameW_state
{
3666 struct svcctl_GetServiceKeyNameW orig
;
3667 struct svcctl_GetServiceKeyNameW tmp
;
3668 TALLOC_CTX
*out_mem_ctx
;
3669 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3672 static void rpccli_svcctl_GetServiceKeyNameW_done(struct tevent_req
*subreq
);
3674 struct tevent_req
*rpccli_svcctl_GetServiceKeyNameW_send(TALLOC_CTX
*mem_ctx
,
3675 struct tevent_context
*ev
,
3676 struct rpc_pipe_client
*cli
,
3677 struct policy_handle
*_handle
/* [in] [ref] */,
3678 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
3679 const char **_key_name
/* [out] [ref,charset(UTF16)] */,
3680 uint32_t *_display_name_length
/* [in,out] [unique] */)
3682 struct tevent_req
*req
;
3683 struct rpccli_svcctl_GetServiceKeyNameW_state
*state
;
3684 struct tevent_req
*subreq
;
3686 req
= tevent_req_create(mem_ctx
, &state
,
3687 struct rpccli_svcctl_GetServiceKeyNameW_state
);
3691 state
->out_mem_ctx
= NULL
;
3692 state
->dispatch_recv
= cli
->dispatch_recv
;
3695 state
->orig
.in
.handle
= _handle
;
3696 state
->orig
.in
.service_name
= _service_name
;
3697 state
->orig
.in
.display_name_length
= _display_name_length
;
3699 /* Out parameters */
3700 state
->orig
.out
.key_name
= _key_name
;
3701 state
->orig
.out
.display_name_length
= _display_name_length
;
3704 ZERO_STRUCT(state
->orig
.out
.result
);
3706 if (DEBUGLEVEL
>= 10) {
3707 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW
, &state
->orig
);
3710 state
->out_mem_ctx
= talloc_named_const(state
, 0,
3711 "rpccli_svcctl_GetServiceKeyNameW_out_memory");
3712 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
3713 return tevent_req_post(req
, ev
);
3716 /* make a temporary copy, that we pass to the dispatch function */
3717 state
->tmp
= state
->orig
;
3719 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3721 NDR_SVCCTL_GETSERVICEKEYNAMEW
,
3723 if (tevent_req_nomem(subreq
, req
)) {
3724 return tevent_req_post(req
, ev
);
3726 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceKeyNameW_done
, req
);
3730 static void rpccli_svcctl_GetServiceKeyNameW_done(struct tevent_req
*subreq
)
3732 struct tevent_req
*req
= tevent_req_callback_data(
3733 subreq
, struct tevent_req
);
3734 struct rpccli_svcctl_GetServiceKeyNameW_state
*state
= tevent_req_data(
3735 req
, struct rpccli_svcctl_GetServiceKeyNameW_state
);
3737 TALLOC_CTX
*mem_ctx
;
3739 if (state
->out_mem_ctx
) {
3740 mem_ctx
= state
->out_mem_ctx
;
3745 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3746 TALLOC_FREE(subreq
);
3747 if (!NT_STATUS_IS_OK(status
)) {
3748 tevent_req_nterror(req
, status
);
3752 /* Copy out parameters */
3753 *state
->orig
.out
.key_name
= *state
->tmp
.out
.key_name
;
3754 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
3755 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
3759 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3761 /* Reset temporary structure */
3762 ZERO_STRUCT(state
->tmp
);
3764 if (DEBUGLEVEL
>= 10) {
3765 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW
, &state
->orig
);
3768 tevent_req_done(req
);
3771 NTSTATUS
rpccli_svcctl_GetServiceKeyNameW_recv(struct tevent_req
*req
,
3772 TALLOC_CTX
*mem_ctx
,
3775 struct rpccli_svcctl_GetServiceKeyNameW_state
*state
= tevent_req_data(
3776 req
, struct rpccli_svcctl_GetServiceKeyNameW_state
);
3779 if (tevent_req_is_nterror(req
, &status
)) {
3780 tevent_req_received(req
);
3784 /* Steal possbile out parameters to the callers context */
3785 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3788 *result
= state
->orig
.out
.result
;
3790 tevent_req_received(req
);
3791 return NT_STATUS_OK
;
3794 NTSTATUS
rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client
*cli
,
3795 TALLOC_CTX
*mem_ctx
,
3796 struct policy_handle
*handle
/* [in] [ref] */,
3797 const char *service_name
/* [in] [unique,charset(UTF16)] */,
3798 const char **key_name
/* [out] [ref,charset(UTF16)] */,
3799 uint32_t *display_name_length
/* [in,out] [unique] */,
3802 struct svcctl_GetServiceKeyNameW r
;
3806 r
.in
.handle
= handle
;
3807 r
.in
.service_name
= service_name
;
3808 r
.in
.display_name_length
= display_name_length
;
3810 if (DEBUGLEVEL
>= 10) {
3811 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW
, &r
);
3814 status
= cli
->dispatch(cli
,
3817 NDR_SVCCTL_GETSERVICEKEYNAMEW
,
3820 if (!NT_STATUS_IS_OK(status
)) {
3824 if (DEBUGLEVEL
>= 10) {
3825 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW
, &r
);
3828 if (NT_STATUS_IS_ERR(status
)) {
3832 /* Return variables */
3833 *key_name
= *r
.out
.key_name
;
3834 if (display_name_length
&& r
.out
.display_name_length
) {
3835 *display_name_length
= *r
.out
.display_name_length
;
3840 *werror
= r
.out
.result
;
3843 return werror_to_ntstatus(r
.out
.result
);
3846 struct rpccli_svcctl_SCSetServiceBitsA_state
{
3847 struct svcctl_SCSetServiceBitsA orig
;
3848 struct svcctl_SCSetServiceBitsA tmp
;
3849 TALLOC_CTX
*out_mem_ctx
;
3850 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
3853 static void rpccli_svcctl_SCSetServiceBitsA_done(struct tevent_req
*subreq
);
3855 struct tevent_req
*rpccli_svcctl_SCSetServiceBitsA_send(TALLOC_CTX
*mem_ctx
,
3856 struct tevent_context
*ev
,
3857 struct rpc_pipe_client
*cli
,
3858 struct policy_handle
*_handle
/* [in] [ref] */,
3859 uint32_t _bits
/* [in] */,
3860 uint32_t _bitson
/* [in] */,
3861 uint32_t _immediate
/* [in] */)
3863 struct tevent_req
*req
;
3864 struct rpccli_svcctl_SCSetServiceBitsA_state
*state
;
3865 struct tevent_req
*subreq
;
3867 req
= tevent_req_create(mem_ctx
, &state
,
3868 struct rpccli_svcctl_SCSetServiceBitsA_state
);
3872 state
->out_mem_ctx
= NULL
;
3873 state
->dispatch_recv
= cli
->dispatch_recv
;
3876 state
->orig
.in
.handle
= _handle
;
3877 state
->orig
.in
.bits
= _bits
;
3878 state
->orig
.in
.bitson
= _bitson
;
3879 state
->orig
.in
.immediate
= _immediate
;
3881 /* Out parameters */
3884 ZERO_STRUCT(state
->orig
.out
.result
);
3886 if (DEBUGLEVEL
>= 10) {
3887 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA
, &state
->orig
);
3890 /* make a temporary copy, that we pass to the dispatch function */
3891 state
->tmp
= state
->orig
;
3893 subreq
= cli
->dispatch_send(state
, ev
, cli
,
3895 NDR_SVCCTL_SCSETSERVICEBITSA
,
3897 if (tevent_req_nomem(subreq
, req
)) {
3898 return tevent_req_post(req
, ev
);
3900 tevent_req_set_callback(subreq
, rpccli_svcctl_SCSetServiceBitsA_done
, req
);
3904 static void rpccli_svcctl_SCSetServiceBitsA_done(struct tevent_req
*subreq
)
3906 struct tevent_req
*req
= tevent_req_callback_data(
3907 subreq
, struct tevent_req
);
3908 struct rpccli_svcctl_SCSetServiceBitsA_state
*state
= tevent_req_data(
3909 req
, struct rpccli_svcctl_SCSetServiceBitsA_state
);
3911 TALLOC_CTX
*mem_ctx
;
3913 if (state
->out_mem_ctx
) {
3914 mem_ctx
= state
->out_mem_ctx
;
3919 status
= state
->dispatch_recv(subreq
, mem_ctx
);
3920 TALLOC_FREE(subreq
);
3921 if (!NT_STATUS_IS_OK(status
)) {
3922 tevent_req_nterror(req
, status
);
3926 /* Copy out parameters */
3929 state
->orig
.out
.result
= state
->tmp
.out
.result
;
3931 /* Reset temporary structure */
3932 ZERO_STRUCT(state
->tmp
);
3934 if (DEBUGLEVEL
>= 10) {
3935 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA
, &state
->orig
);
3938 tevent_req_done(req
);
3941 NTSTATUS
rpccli_svcctl_SCSetServiceBitsA_recv(struct tevent_req
*req
,
3942 TALLOC_CTX
*mem_ctx
,
3945 struct rpccli_svcctl_SCSetServiceBitsA_state
*state
= tevent_req_data(
3946 req
, struct rpccli_svcctl_SCSetServiceBitsA_state
);
3949 if (tevent_req_is_nterror(req
, &status
)) {
3950 tevent_req_received(req
);
3954 /* Steal possbile out parameters to the callers context */
3955 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
3958 *result
= state
->orig
.out
.result
;
3960 tevent_req_received(req
);
3961 return NT_STATUS_OK
;
3964 NTSTATUS
rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client
*cli
,
3965 TALLOC_CTX
*mem_ctx
,
3966 struct policy_handle
*handle
/* [in] [ref] */,
3967 uint32_t bits
/* [in] */,
3968 uint32_t bitson
/* [in] */,
3969 uint32_t immediate
/* [in] */,
3972 struct svcctl_SCSetServiceBitsA r
;
3976 r
.in
.handle
= handle
;
3978 r
.in
.bitson
= bitson
;
3979 r
.in
.immediate
= immediate
;
3981 if (DEBUGLEVEL
>= 10) {
3982 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA
, &r
);
3985 status
= cli
->dispatch(cli
,
3988 NDR_SVCCTL_SCSETSERVICEBITSA
,
3991 if (!NT_STATUS_IS_OK(status
)) {
3995 if (DEBUGLEVEL
>= 10) {
3996 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA
, &r
);
3999 if (NT_STATUS_IS_ERR(status
)) {
4003 /* Return variables */
4007 *werror
= r
.out
.result
;
4010 return werror_to_ntstatus(r
.out
.result
);
4013 struct rpccli_svcctl_ChangeServiceConfigA_state
{
4014 struct svcctl_ChangeServiceConfigA orig
;
4015 struct svcctl_ChangeServiceConfigA tmp
;
4016 TALLOC_CTX
*out_mem_ctx
;
4017 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4020 static void rpccli_svcctl_ChangeServiceConfigA_done(struct tevent_req
*subreq
);
4022 struct tevent_req
*rpccli_svcctl_ChangeServiceConfigA_send(TALLOC_CTX
*mem_ctx
,
4023 struct tevent_context
*ev
,
4024 struct rpc_pipe_client
*cli
,
4025 struct policy_handle
*_handle
/* [in] [ref] */,
4026 uint32_t _type
/* [in] */,
4027 enum svcctl_StartType _start_type
/* [in] */,
4028 enum svcctl_ErrorControl _error_control
/* [in] */,
4029 const char *_binary_path
/* [in] [unique,charset(UTF16)] */,
4030 const char *_load_order_group
/* [in] [unique,charset(UTF16)] */,
4031 uint32_t *_tag_id
/* [out] [ref] */,
4032 const char *_dependencies
/* [in] [unique,charset(UTF16)] */,
4033 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
4034 const char *_password
/* [in] [unique,charset(UTF16)] */,
4035 const char *_display_name
/* [in] [unique,charset(UTF16)] */)
4037 struct tevent_req
*req
;
4038 struct rpccli_svcctl_ChangeServiceConfigA_state
*state
;
4039 struct tevent_req
*subreq
;
4041 req
= tevent_req_create(mem_ctx
, &state
,
4042 struct rpccli_svcctl_ChangeServiceConfigA_state
);
4046 state
->out_mem_ctx
= NULL
;
4047 state
->dispatch_recv
= cli
->dispatch_recv
;
4050 state
->orig
.in
.handle
= _handle
;
4051 state
->orig
.in
.type
= _type
;
4052 state
->orig
.in
.start_type
= _start_type
;
4053 state
->orig
.in
.error_control
= _error_control
;
4054 state
->orig
.in
.binary_path
= _binary_path
;
4055 state
->orig
.in
.load_order_group
= _load_order_group
;
4056 state
->orig
.in
.dependencies
= _dependencies
;
4057 state
->orig
.in
.service_start_name
= _service_start_name
;
4058 state
->orig
.in
.password
= _password
;
4059 state
->orig
.in
.display_name
= _display_name
;
4061 /* Out parameters */
4062 state
->orig
.out
.tag_id
= _tag_id
;
4065 ZERO_STRUCT(state
->orig
.out
.result
);
4067 if (DEBUGLEVEL
>= 10) {
4068 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA
, &state
->orig
);
4071 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4072 "rpccli_svcctl_ChangeServiceConfigA_out_memory");
4073 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4074 return tevent_req_post(req
, ev
);
4077 /* make a temporary copy, that we pass to the dispatch function */
4078 state
->tmp
= state
->orig
;
4080 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4082 NDR_SVCCTL_CHANGESERVICECONFIGA
,
4084 if (tevent_req_nomem(subreq
, req
)) {
4085 return tevent_req_post(req
, ev
);
4087 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfigA_done
, req
);
4091 static void rpccli_svcctl_ChangeServiceConfigA_done(struct tevent_req
*subreq
)
4093 struct tevent_req
*req
= tevent_req_callback_data(
4094 subreq
, struct tevent_req
);
4095 struct rpccli_svcctl_ChangeServiceConfigA_state
*state
= tevent_req_data(
4096 req
, struct rpccli_svcctl_ChangeServiceConfigA_state
);
4098 TALLOC_CTX
*mem_ctx
;
4100 if (state
->out_mem_ctx
) {
4101 mem_ctx
= state
->out_mem_ctx
;
4106 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4107 TALLOC_FREE(subreq
);
4108 if (!NT_STATUS_IS_OK(status
)) {
4109 tevent_req_nterror(req
, status
);
4113 /* Copy out parameters */
4114 *state
->orig
.out
.tag_id
= *state
->tmp
.out
.tag_id
;
4117 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4119 /* Reset temporary structure */
4120 ZERO_STRUCT(state
->tmp
);
4122 if (DEBUGLEVEL
>= 10) {
4123 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA
, &state
->orig
);
4126 tevent_req_done(req
);
4129 NTSTATUS
rpccli_svcctl_ChangeServiceConfigA_recv(struct tevent_req
*req
,
4130 TALLOC_CTX
*mem_ctx
,
4133 struct rpccli_svcctl_ChangeServiceConfigA_state
*state
= tevent_req_data(
4134 req
, struct rpccli_svcctl_ChangeServiceConfigA_state
);
4137 if (tevent_req_is_nterror(req
, &status
)) {
4138 tevent_req_received(req
);
4142 /* Steal possbile out parameters to the callers context */
4143 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4146 *result
= state
->orig
.out
.result
;
4148 tevent_req_received(req
);
4149 return NT_STATUS_OK
;
4152 NTSTATUS
rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client
*cli
,
4153 TALLOC_CTX
*mem_ctx
,
4154 struct policy_handle
*handle
/* [in] [ref] */,
4155 uint32_t type
/* [in] */,
4156 enum svcctl_StartType start_type
/* [in] */,
4157 enum svcctl_ErrorControl error_control
/* [in] */,
4158 const char *binary_path
/* [in] [unique,charset(UTF16)] */,
4159 const char *load_order_group
/* [in] [unique,charset(UTF16)] */,
4160 uint32_t *tag_id
/* [out] [ref] */,
4161 const char *dependencies
/* [in] [unique,charset(UTF16)] */,
4162 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
4163 const char *password
/* [in] [unique,charset(UTF16)] */,
4164 const char *display_name
/* [in] [unique,charset(UTF16)] */,
4167 struct svcctl_ChangeServiceConfigA r
;
4171 r
.in
.handle
= handle
;
4173 r
.in
.start_type
= start_type
;
4174 r
.in
.error_control
= error_control
;
4175 r
.in
.binary_path
= binary_path
;
4176 r
.in
.load_order_group
= load_order_group
;
4177 r
.in
.dependencies
= dependencies
;
4178 r
.in
.service_start_name
= service_start_name
;
4179 r
.in
.password
= password
;
4180 r
.in
.display_name
= display_name
;
4182 if (DEBUGLEVEL
>= 10) {
4183 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA
, &r
);
4186 status
= cli
->dispatch(cli
,
4189 NDR_SVCCTL_CHANGESERVICECONFIGA
,
4192 if (!NT_STATUS_IS_OK(status
)) {
4196 if (DEBUGLEVEL
>= 10) {
4197 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA
, &r
);
4200 if (NT_STATUS_IS_ERR(status
)) {
4204 /* Return variables */
4205 *tag_id
= *r
.out
.tag_id
;
4209 *werror
= r
.out
.result
;
4212 return werror_to_ntstatus(r
.out
.result
);
4215 struct rpccli_svcctl_CreateServiceA_state
{
4216 struct svcctl_CreateServiceA orig
;
4217 struct svcctl_CreateServiceA tmp
;
4218 TALLOC_CTX
*out_mem_ctx
;
4219 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4222 static void rpccli_svcctl_CreateServiceA_done(struct tevent_req
*subreq
);
4224 struct tevent_req
*rpccli_svcctl_CreateServiceA_send(TALLOC_CTX
*mem_ctx
,
4225 struct tevent_context
*ev
,
4226 struct rpc_pipe_client
*cli
,
4227 struct policy_handle
*_handle
/* [in] [ref] */,
4228 const char *_ServiceName
/* [in] [unique,charset(UTF16)] */,
4229 const char *_DisplayName
/* [in] [unique,charset(UTF16)] */,
4230 uint32_t _desired_access
/* [in] */,
4231 uint32_t _type
/* [in] */,
4232 enum svcctl_StartType _start_type
/* [in] */,
4233 enum svcctl_ErrorControl _error_control
/* [in] */,
4234 const char *_binary_path
/* [in] [unique,charset(UTF16)] */,
4235 const char *_LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
4236 uint32_t *_TagId
/* [out] [unique] */,
4237 const char *_dependencies
/* [in] [unique,charset(UTF16)] */,
4238 const char *_service_start_name
/* [in] [unique,charset(UTF16)] */,
4239 const char *_password
/* [in] [unique,charset(UTF16)] */)
4241 struct tevent_req
*req
;
4242 struct rpccli_svcctl_CreateServiceA_state
*state
;
4243 struct tevent_req
*subreq
;
4245 req
= tevent_req_create(mem_ctx
, &state
,
4246 struct rpccli_svcctl_CreateServiceA_state
);
4250 state
->out_mem_ctx
= NULL
;
4251 state
->dispatch_recv
= cli
->dispatch_recv
;
4254 state
->orig
.in
.handle
= _handle
;
4255 state
->orig
.in
.ServiceName
= _ServiceName
;
4256 state
->orig
.in
.DisplayName
= _DisplayName
;
4257 state
->orig
.in
.desired_access
= _desired_access
;
4258 state
->orig
.in
.type
= _type
;
4259 state
->orig
.in
.start_type
= _start_type
;
4260 state
->orig
.in
.error_control
= _error_control
;
4261 state
->orig
.in
.binary_path
= _binary_path
;
4262 state
->orig
.in
.LoadOrderGroupKey
= _LoadOrderGroupKey
;
4263 state
->orig
.in
.dependencies
= _dependencies
;
4264 state
->orig
.in
.service_start_name
= _service_start_name
;
4265 state
->orig
.in
.password
= _password
;
4267 /* Out parameters */
4268 state
->orig
.out
.TagId
= _TagId
;
4271 ZERO_STRUCT(state
->orig
.out
.result
);
4273 if (DEBUGLEVEL
>= 10) {
4274 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA
, &state
->orig
);
4277 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4278 "rpccli_svcctl_CreateServiceA_out_memory");
4279 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4280 return tevent_req_post(req
, ev
);
4283 /* make a temporary copy, that we pass to the dispatch function */
4284 state
->tmp
= state
->orig
;
4286 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4288 NDR_SVCCTL_CREATESERVICEA
,
4290 if (tevent_req_nomem(subreq
, req
)) {
4291 return tevent_req_post(req
, ev
);
4293 tevent_req_set_callback(subreq
, rpccli_svcctl_CreateServiceA_done
, req
);
4297 static void rpccli_svcctl_CreateServiceA_done(struct tevent_req
*subreq
)
4299 struct tevent_req
*req
= tevent_req_callback_data(
4300 subreq
, struct tevent_req
);
4301 struct rpccli_svcctl_CreateServiceA_state
*state
= tevent_req_data(
4302 req
, struct rpccli_svcctl_CreateServiceA_state
);
4304 TALLOC_CTX
*mem_ctx
;
4306 if (state
->out_mem_ctx
) {
4307 mem_ctx
= state
->out_mem_ctx
;
4312 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4313 TALLOC_FREE(subreq
);
4314 if (!NT_STATUS_IS_OK(status
)) {
4315 tevent_req_nterror(req
, status
);
4319 /* Copy out parameters */
4320 if (state
->orig
.out
.TagId
&& state
->tmp
.out
.TagId
) {
4321 *state
->orig
.out
.TagId
= *state
->tmp
.out
.TagId
;
4325 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4327 /* Reset temporary structure */
4328 ZERO_STRUCT(state
->tmp
);
4330 if (DEBUGLEVEL
>= 10) {
4331 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA
, &state
->orig
);
4334 tevent_req_done(req
);
4337 NTSTATUS
rpccli_svcctl_CreateServiceA_recv(struct tevent_req
*req
,
4338 TALLOC_CTX
*mem_ctx
,
4341 struct rpccli_svcctl_CreateServiceA_state
*state
= tevent_req_data(
4342 req
, struct rpccli_svcctl_CreateServiceA_state
);
4345 if (tevent_req_is_nterror(req
, &status
)) {
4346 tevent_req_received(req
);
4350 /* Steal possbile out parameters to the callers context */
4351 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4354 *result
= state
->orig
.out
.result
;
4356 tevent_req_received(req
);
4357 return NT_STATUS_OK
;
4360 NTSTATUS
rpccli_svcctl_CreateServiceA(struct rpc_pipe_client
*cli
,
4361 TALLOC_CTX
*mem_ctx
,
4362 struct policy_handle
*handle
/* [in] [ref] */,
4363 const char *ServiceName
/* [in] [unique,charset(UTF16)] */,
4364 const char *DisplayName
/* [in] [unique,charset(UTF16)] */,
4365 uint32_t desired_access
/* [in] */,
4366 uint32_t type
/* [in] */,
4367 enum svcctl_StartType start_type
/* [in] */,
4368 enum svcctl_ErrorControl error_control
/* [in] */,
4369 const char *binary_path
/* [in] [unique,charset(UTF16)] */,
4370 const char *LoadOrderGroupKey
/* [in] [unique,charset(UTF16)] */,
4371 uint32_t *TagId
/* [out] [unique] */,
4372 const char *dependencies
/* [in] [unique,charset(UTF16)] */,
4373 const char *service_start_name
/* [in] [unique,charset(UTF16)] */,
4374 const char *password
/* [in] [unique,charset(UTF16)] */,
4377 struct svcctl_CreateServiceA r
;
4381 r
.in
.handle
= handle
;
4382 r
.in
.ServiceName
= ServiceName
;
4383 r
.in
.DisplayName
= DisplayName
;
4384 r
.in
.desired_access
= desired_access
;
4386 r
.in
.start_type
= start_type
;
4387 r
.in
.error_control
= error_control
;
4388 r
.in
.binary_path
= binary_path
;
4389 r
.in
.LoadOrderGroupKey
= LoadOrderGroupKey
;
4390 r
.in
.dependencies
= dependencies
;
4391 r
.in
.service_start_name
= service_start_name
;
4392 r
.in
.password
= password
;
4394 if (DEBUGLEVEL
>= 10) {
4395 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA
, &r
);
4398 status
= cli
->dispatch(cli
,
4401 NDR_SVCCTL_CREATESERVICEA
,
4404 if (!NT_STATUS_IS_OK(status
)) {
4408 if (DEBUGLEVEL
>= 10) {
4409 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA
, &r
);
4412 if (NT_STATUS_IS_ERR(status
)) {
4416 /* Return variables */
4417 if (TagId
&& r
.out
.TagId
) {
4418 *TagId
= *r
.out
.TagId
;
4423 *werror
= r
.out
.result
;
4426 return werror_to_ntstatus(r
.out
.result
);
4429 struct rpccli_svcctl_EnumDependentServicesA_state
{
4430 struct svcctl_EnumDependentServicesA orig
;
4431 struct svcctl_EnumDependentServicesA tmp
;
4432 TALLOC_CTX
*out_mem_ctx
;
4433 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4436 static void rpccli_svcctl_EnumDependentServicesA_done(struct tevent_req
*subreq
);
4438 struct tevent_req
*rpccli_svcctl_EnumDependentServicesA_send(TALLOC_CTX
*mem_ctx
,
4439 struct tevent_context
*ev
,
4440 struct rpc_pipe_client
*cli
,
4441 struct policy_handle
*_service
/* [in] [ref] */,
4442 enum svcctl_ServiceState _state
/* [in] */,
4443 struct ENUM_SERVICE_STATUSA
*_service_status
/* [out] [unique] */,
4444 uint32_t _offered
/* [in] */,
4445 uint32_t *_needed
/* [out] [ref] */,
4446 uint32_t *_services_returned
/* [out] [ref] */)
4448 struct tevent_req
*req
;
4449 struct rpccli_svcctl_EnumDependentServicesA_state
*state
;
4450 struct tevent_req
*subreq
;
4452 req
= tevent_req_create(mem_ctx
, &state
,
4453 struct rpccli_svcctl_EnumDependentServicesA_state
);
4457 state
->out_mem_ctx
= NULL
;
4458 state
->dispatch_recv
= cli
->dispatch_recv
;
4461 state
->orig
.in
.service
= _service
;
4462 state
->orig
.in
.state
= _state
;
4463 state
->orig
.in
.offered
= _offered
;
4465 /* Out parameters */
4466 state
->orig
.out
.service_status
= _service_status
;
4467 state
->orig
.out
.needed
= _needed
;
4468 state
->orig
.out
.services_returned
= _services_returned
;
4471 ZERO_STRUCT(state
->orig
.out
.result
);
4473 if (DEBUGLEVEL
>= 10) {
4474 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA
, &state
->orig
);
4477 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4478 "rpccli_svcctl_EnumDependentServicesA_out_memory");
4479 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4480 return tevent_req_post(req
, ev
);
4483 /* make a temporary copy, that we pass to the dispatch function */
4484 state
->tmp
= state
->orig
;
4486 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4488 NDR_SVCCTL_ENUMDEPENDENTSERVICESA
,
4490 if (tevent_req_nomem(subreq
, req
)) {
4491 return tevent_req_post(req
, ev
);
4493 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumDependentServicesA_done
, req
);
4497 static void rpccli_svcctl_EnumDependentServicesA_done(struct tevent_req
*subreq
)
4499 struct tevent_req
*req
= tevent_req_callback_data(
4500 subreq
, struct tevent_req
);
4501 struct rpccli_svcctl_EnumDependentServicesA_state
*state
= tevent_req_data(
4502 req
, struct rpccli_svcctl_EnumDependentServicesA_state
);
4504 TALLOC_CTX
*mem_ctx
;
4506 if (state
->out_mem_ctx
) {
4507 mem_ctx
= state
->out_mem_ctx
;
4512 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4513 TALLOC_FREE(subreq
);
4514 if (!NT_STATUS_IS_OK(status
)) {
4515 tevent_req_nterror(req
, status
);
4519 /* Copy out parameters */
4520 if (state
->orig
.out
.service_status
&& state
->tmp
.out
.service_status
) {
4521 *state
->orig
.out
.service_status
= *state
->tmp
.out
.service_status
;
4523 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
4524 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
4527 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4529 /* Reset temporary structure */
4530 ZERO_STRUCT(state
->tmp
);
4532 if (DEBUGLEVEL
>= 10) {
4533 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA
, &state
->orig
);
4536 tevent_req_done(req
);
4539 NTSTATUS
rpccli_svcctl_EnumDependentServicesA_recv(struct tevent_req
*req
,
4540 TALLOC_CTX
*mem_ctx
,
4543 struct rpccli_svcctl_EnumDependentServicesA_state
*state
= tevent_req_data(
4544 req
, struct rpccli_svcctl_EnumDependentServicesA_state
);
4547 if (tevent_req_is_nterror(req
, &status
)) {
4548 tevent_req_received(req
);
4552 /* Steal possbile out parameters to the callers context */
4553 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4556 *result
= state
->orig
.out
.result
;
4558 tevent_req_received(req
);
4559 return NT_STATUS_OK
;
4562 NTSTATUS
rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client
*cli
,
4563 TALLOC_CTX
*mem_ctx
,
4564 struct policy_handle
*service
/* [in] [ref] */,
4565 enum svcctl_ServiceState state
/* [in] */,
4566 struct ENUM_SERVICE_STATUSA
*service_status
/* [out] [unique] */,
4567 uint32_t offered
/* [in] */,
4568 uint32_t *needed
/* [out] [ref] */,
4569 uint32_t *services_returned
/* [out] [ref] */,
4572 struct svcctl_EnumDependentServicesA r
;
4576 r
.in
.service
= service
;
4578 r
.in
.offered
= offered
;
4580 if (DEBUGLEVEL
>= 10) {
4581 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA
, &r
);
4584 status
= cli
->dispatch(cli
,
4587 NDR_SVCCTL_ENUMDEPENDENTSERVICESA
,
4590 if (!NT_STATUS_IS_OK(status
)) {
4594 if (DEBUGLEVEL
>= 10) {
4595 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA
, &r
);
4598 if (NT_STATUS_IS_ERR(status
)) {
4602 /* Return variables */
4603 if (service_status
&& r
.out
.service_status
) {
4604 *service_status
= *r
.out
.service_status
;
4606 *needed
= *r
.out
.needed
;
4607 *services_returned
= *r
.out
.services_returned
;
4611 *werror
= r
.out
.result
;
4614 return werror_to_ntstatus(r
.out
.result
);
4617 struct rpccli_svcctl_EnumServicesStatusA_state
{
4618 struct svcctl_EnumServicesStatusA orig
;
4619 struct svcctl_EnumServicesStatusA tmp
;
4620 TALLOC_CTX
*out_mem_ctx
;
4621 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4624 static void rpccli_svcctl_EnumServicesStatusA_done(struct tevent_req
*subreq
);
4626 struct tevent_req
*rpccli_svcctl_EnumServicesStatusA_send(TALLOC_CTX
*mem_ctx
,
4627 struct tevent_context
*ev
,
4628 struct rpc_pipe_client
*cli
,
4629 struct policy_handle
*_handle
/* [in] [ref] */,
4630 uint32_t _type
/* [in] */,
4631 enum svcctl_ServiceState _state
/* [in] */,
4632 uint32_t _offered
/* [in] */,
4633 uint8_t *_service
/* [out] [size_is(offered)] */,
4634 uint32_t *_needed
/* [out] [ref] */,
4635 uint32_t *_services_returned
/* [out] [ref] */,
4636 uint32_t *_resume_handle
/* [in,out] [unique] */)
4638 struct tevent_req
*req
;
4639 struct rpccli_svcctl_EnumServicesStatusA_state
*state
;
4640 struct tevent_req
*subreq
;
4642 req
= tevent_req_create(mem_ctx
, &state
,
4643 struct rpccli_svcctl_EnumServicesStatusA_state
);
4647 state
->out_mem_ctx
= NULL
;
4648 state
->dispatch_recv
= cli
->dispatch_recv
;
4651 state
->orig
.in
.handle
= _handle
;
4652 state
->orig
.in
.type
= _type
;
4653 state
->orig
.in
.state
= _state
;
4654 state
->orig
.in
.offered
= _offered
;
4655 state
->orig
.in
.resume_handle
= _resume_handle
;
4657 /* Out parameters */
4658 state
->orig
.out
.service
= _service
;
4659 state
->orig
.out
.needed
= _needed
;
4660 state
->orig
.out
.services_returned
= _services_returned
;
4661 state
->orig
.out
.resume_handle
= _resume_handle
;
4664 ZERO_STRUCT(state
->orig
.out
.result
);
4666 if (DEBUGLEVEL
>= 10) {
4667 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA
, &state
->orig
);
4670 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4671 "rpccli_svcctl_EnumServicesStatusA_out_memory");
4672 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4673 return tevent_req_post(req
, ev
);
4676 /* make a temporary copy, that we pass to the dispatch function */
4677 state
->tmp
= state
->orig
;
4679 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4681 NDR_SVCCTL_ENUMSERVICESSTATUSA
,
4683 if (tevent_req_nomem(subreq
, req
)) {
4684 return tevent_req_post(req
, ev
);
4686 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumServicesStatusA_done
, req
);
4690 static void rpccli_svcctl_EnumServicesStatusA_done(struct tevent_req
*subreq
)
4692 struct tevent_req
*req
= tevent_req_callback_data(
4693 subreq
, struct tevent_req
);
4694 struct rpccli_svcctl_EnumServicesStatusA_state
*state
= tevent_req_data(
4695 req
, struct rpccli_svcctl_EnumServicesStatusA_state
);
4697 TALLOC_CTX
*mem_ctx
;
4699 if (state
->out_mem_ctx
) {
4700 mem_ctx
= state
->out_mem_ctx
;
4705 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4706 TALLOC_FREE(subreq
);
4707 if (!NT_STATUS_IS_OK(status
)) {
4708 tevent_req_nterror(req
, status
);
4712 /* Copy out parameters */
4713 memcpy(state
->orig
.out
.service
, state
->tmp
.out
.service
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.service
));
4714 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
4715 *state
->orig
.out
.services_returned
= *state
->tmp
.out
.services_returned
;
4716 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
4717 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
4721 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4723 /* Reset temporary structure */
4724 ZERO_STRUCT(state
->tmp
);
4726 if (DEBUGLEVEL
>= 10) {
4727 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA
, &state
->orig
);
4730 tevent_req_done(req
);
4733 NTSTATUS
rpccli_svcctl_EnumServicesStatusA_recv(struct tevent_req
*req
,
4734 TALLOC_CTX
*mem_ctx
,
4737 struct rpccli_svcctl_EnumServicesStatusA_state
*state
= tevent_req_data(
4738 req
, struct rpccli_svcctl_EnumServicesStatusA_state
);
4741 if (tevent_req_is_nterror(req
, &status
)) {
4742 tevent_req_received(req
);
4746 /* Steal possbile out parameters to the callers context */
4747 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4750 *result
= state
->orig
.out
.result
;
4752 tevent_req_received(req
);
4753 return NT_STATUS_OK
;
4756 NTSTATUS
rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client
*cli
,
4757 TALLOC_CTX
*mem_ctx
,
4758 struct policy_handle
*handle
/* [in] [ref] */,
4759 uint32_t type
/* [in] */,
4760 enum svcctl_ServiceState state
/* [in] */,
4761 uint32_t offered
/* [in] */,
4762 uint8_t *service
/* [out] [size_is(offered)] */,
4763 uint32_t *needed
/* [out] [ref] */,
4764 uint32_t *services_returned
/* [out] [ref] */,
4765 uint32_t *resume_handle
/* [in,out] [unique] */,
4768 struct svcctl_EnumServicesStatusA r
;
4772 r
.in
.handle
= handle
;
4775 r
.in
.offered
= offered
;
4776 r
.in
.resume_handle
= resume_handle
;
4778 if (DEBUGLEVEL
>= 10) {
4779 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA
, &r
);
4782 status
= cli
->dispatch(cli
,
4785 NDR_SVCCTL_ENUMSERVICESSTATUSA
,
4788 if (!NT_STATUS_IS_OK(status
)) {
4792 if (DEBUGLEVEL
>= 10) {
4793 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA
, &r
);
4796 if (NT_STATUS_IS_ERR(status
)) {
4800 /* Return variables */
4801 memcpy(service
, r
.out
.service
, r
.in
.offered
* sizeof(*service
));
4802 *needed
= *r
.out
.needed
;
4803 *services_returned
= *r
.out
.services_returned
;
4804 if (resume_handle
&& r
.out
.resume_handle
) {
4805 *resume_handle
= *r
.out
.resume_handle
;
4810 *werror
= r
.out
.result
;
4813 return werror_to_ntstatus(r
.out
.result
);
4816 struct rpccli_svcctl_OpenSCManagerA_state
{
4817 struct svcctl_OpenSCManagerA orig
;
4818 struct svcctl_OpenSCManagerA tmp
;
4819 TALLOC_CTX
*out_mem_ctx
;
4820 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4823 static void rpccli_svcctl_OpenSCManagerA_done(struct tevent_req
*subreq
);
4825 struct tevent_req
*rpccli_svcctl_OpenSCManagerA_send(TALLOC_CTX
*mem_ctx
,
4826 struct tevent_context
*ev
,
4827 struct rpc_pipe_client
*cli
,
4828 const char *_MachineName
/* [in] [unique,charset(UTF16)] */,
4829 const char *_DatabaseName
/* [in] [unique,charset(UTF16)] */,
4830 uint32_t _access_mask
/* [in] */,
4831 struct policy_handle
*_handle
/* [out] [ref] */)
4833 struct tevent_req
*req
;
4834 struct rpccli_svcctl_OpenSCManagerA_state
*state
;
4835 struct tevent_req
*subreq
;
4837 req
= tevent_req_create(mem_ctx
, &state
,
4838 struct rpccli_svcctl_OpenSCManagerA_state
);
4842 state
->out_mem_ctx
= NULL
;
4843 state
->dispatch_recv
= cli
->dispatch_recv
;
4846 state
->orig
.in
.MachineName
= _MachineName
;
4847 state
->orig
.in
.DatabaseName
= _DatabaseName
;
4848 state
->orig
.in
.access_mask
= _access_mask
;
4850 /* Out parameters */
4851 state
->orig
.out
.handle
= _handle
;
4854 ZERO_STRUCT(state
->orig
.out
.result
);
4856 if (DEBUGLEVEL
>= 10) {
4857 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA
, &state
->orig
);
4860 state
->out_mem_ctx
= talloc_named_const(state
, 0,
4861 "rpccli_svcctl_OpenSCManagerA_out_memory");
4862 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
4863 return tevent_req_post(req
, ev
);
4866 /* make a temporary copy, that we pass to the dispatch function */
4867 state
->tmp
= state
->orig
;
4869 subreq
= cli
->dispatch_send(state
, ev
, cli
,
4871 NDR_SVCCTL_OPENSCMANAGERA
,
4873 if (tevent_req_nomem(subreq
, req
)) {
4874 return tevent_req_post(req
, ev
);
4876 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenSCManagerA_done
, req
);
4880 static void rpccli_svcctl_OpenSCManagerA_done(struct tevent_req
*subreq
)
4882 struct tevent_req
*req
= tevent_req_callback_data(
4883 subreq
, struct tevent_req
);
4884 struct rpccli_svcctl_OpenSCManagerA_state
*state
= tevent_req_data(
4885 req
, struct rpccli_svcctl_OpenSCManagerA_state
);
4887 TALLOC_CTX
*mem_ctx
;
4889 if (state
->out_mem_ctx
) {
4890 mem_ctx
= state
->out_mem_ctx
;
4895 status
= state
->dispatch_recv(subreq
, mem_ctx
);
4896 TALLOC_FREE(subreq
);
4897 if (!NT_STATUS_IS_OK(status
)) {
4898 tevent_req_nterror(req
, status
);
4902 /* Copy out parameters */
4903 *state
->orig
.out
.handle
= *state
->tmp
.out
.handle
;
4906 state
->orig
.out
.result
= state
->tmp
.out
.result
;
4908 /* Reset temporary structure */
4909 ZERO_STRUCT(state
->tmp
);
4911 if (DEBUGLEVEL
>= 10) {
4912 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA
, &state
->orig
);
4915 tevent_req_done(req
);
4918 NTSTATUS
rpccli_svcctl_OpenSCManagerA_recv(struct tevent_req
*req
,
4919 TALLOC_CTX
*mem_ctx
,
4922 struct rpccli_svcctl_OpenSCManagerA_state
*state
= tevent_req_data(
4923 req
, struct rpccli_svcctl_OpenSCManagerA_state
);
4926 if (tevent_req_is_nterror(req
, &status
)) {
4927 tevent_req_received(req
);
4931 /* Steal possbile out parameters to the callers context */
4932 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
4935 *result
= state
->orig
.out
.result
;
4937 tevent_req_received(req
);
4938 return NT_STATUS_OK
;
4941 NTSTATUS
rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client
*cli
,
4942 TALLOC_CTX
*mem_ctx
,
4943 const char *MachineName
/* [in] [unique,charset(UTF16)] */,
4944 const char *DatabaseName
/* [in] [unique,charset(UTF16)] */,
4945 uint32_t access_mask
/* [in] */,
4946 struct policy_handle
*handle
/* [out] [ref] */,
4949 struct svcctl_OpenSCManagerA r
;
4953 r
.in
.MachineName
= MachineName
;
4954 r
.in
.DatabaseName
= DatabaseName
;
4955 r
.in
.access_mask
= access_mask
;
4957 if (DEBUGLEVEL
>= 10) {
4958 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA
, &r
);
4961 status
= cli
->dispatch(cli
,
4964 NDR_SVCCTL_OPENSCMANAGERA
,
4967 if (!NT_STATUS_IS_OK(status
)) {
4971 if (DEBUGLEVEL
>= 10) {
4972 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA
, &r
);
4975 if (NT_STATUS_IS_ERR(status
)) {
4979 /* Return variables */
4980 *handle
= *r
.out
.handle
;
4984 *werror
= r
.out
.result
;
4987 return werror_to_ntstatus(r
.out
.result
);
4990 struct rpccli_svcctl_OpenServiceA_state
{
4991 struct svcctl_OpenServiceA orig
;
4992 struct svcctl_OpenServiceA tmp
;
4993 TALLOC_CTX
*out_mem_ctx
;
4994 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
4997 static void rpccli_svcctl_OpenServiceA_done(struct tevent_req
*subreq
);
4999 struct tevent_req
*rpccli_svcctl_OpenServiceA_send(TALLOC_CTX
*mem_ctx
,
5000 struct tevent_context
*ev
,
5001 struct rpc_pipe_client
*cli
,
5002 struct policy_handle
*_scmanager_handle
/* [in] [ref] */,
5003 const char *_ServiceName
/* [in] [unique,charset(UTF16)] */,
5004 uint32_t _access_mask
/* [in] */)
5006 struct tevent_req
*req
;
5007 struct rpccli_svcctl_OpenServiceA_state
*state
;
5008 struct tevent_req
*subreq
;
5010 req
= tevent_req_create(mem_ctx
, &state
,
5011 struct rpccli_svcctl_OpenServiceA_state
);
5015 state
->out_mem_ctx
= NULL
;
5016 state
->dispatch_recv
= cli
->dispatch_recv
;
5019 state
->orig
.in
.scmanager_handle
= _scmanager_handle
;
5020 state
->orig
.in
.ServiceName
= _ServiceName
;
5021 state
->orig
.in
.access_mask
= _access_mask
;
5023 /* Out parameters */
5026 ZERO_STRUCT(state
->orig
.out
.result
);
5028 if (DEBUGLEVEL
>= 10) {
5029 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA
, &state
->orig
);
5032 /* make a temporary copy, that we pass to the dispatch function */
5033 state
->tmp
= state
->orig
;
5035 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5037 NDR_SVCCTL_OPENSERVICEA
,
5039 if (tevent_req_nomem(subreq
, req
)) {
5040 return tevent_req_post(req
, ev
);
5042 tevent_req_set_callback(subreq
, rpccli_svcctl_OpenServiceA_done
, req
);
5046 static void rpccli_svcctl_OpenServiceA_done(struct tevent_req
*subreq
)
5048 struct tevent_req
*req
= tevent_req_callback_data(
5049 subreq
, struct tevent_req
);
5050 struct rpccli_svcctl_OpenServiceA_state
*state
= tevent_req_data(
5051 req
, struct rpccli_svcctl_OpenServiceA_state
);
5053 TALLOC_CTX
*mem_ctx
;
5055 if (state
->out_mem_ctx
) {
5056 mem_ctx
= state
->out_mem_ctx
;
5061 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5062 TALLOC_FREE(subreq
);
5063 if (!NT_STATUS_IS_OK(status
)) {
5064 tevent_req_nterror(req
, status
);
5068 /* Copy out parameters */
5071 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5073 /* Reset temporary structure */
5074 ZERO_STRUCT(state
->tmp
);
5076 if (DEBUGLEVEL
>= 10) {
5077 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA
, &state
->orig
);
5080 tevent_req_done(req
);
5083 NTSTATUS
rpccli_svcctl_OpenServiceA_recv(struct tevent_req
*req
,
5084 TALLOC_CTX
*mem_ctx
,
5087 struct rpccli_svcctl_OpenServiceA_state
*state
= tevent_req_data(
5088 req
, struct rpccli_svcctl_OpenServiceA_state
);
5091 if (tevent_req_is_nterror(req
, &status
)) {
5092 tevent_req_received(req
);
5096 /* Steal possbile out parameters to the callers context */
5097 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5100 *result
= state
->orig
.out
.result
;
5102 tevent_req_received(req
);
5103 return NT_STATUS_OK
;
5106 NTSTATUS
rpccli_svcctl_OpenServiceA(struct rpc_pipe_client
*cli
,
5107 TALLOC_CTX
*mem_ctx
,
5108 struct policy_handle
*scmanager_handle
/* [in] [ref] */,
5109 const char *ServiceName
/* [in] [unique,charset(UTF16)] */,
5110 uint32_t access_mask
/* [in] */,
5113 struct svcctl_OpenServiceA r
;
5117 r
.in
.scmanager_handle
= scmanager_handle
;
5118 r
.in
.ServiceName
= ServiceName
;
5119 r
.in
.access_mask
= access_mask
;
5121 if (DEBUGLEVEL
>= 10) {
5122 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA
, &r
);
5125 status
= cli
->dispatch(cli
,
5128 NDR_SVCCTL_OPENSERVICEA
,
5131 if (!NT_STATUS_IS_OK(status
)) {
5135 if (DEBUGLEVEL
>= 10) {
5136 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA
, &r
);
5139 if (NT_STATUS_IS_ERR(status
)) {
5143 /* Return variables */
5147 *werror
= r
.out
.result
;
5150 return werror_to_ntstatus(r
.out
.result
);
5153 struct rpccli_svcctl_QueryServiceConfigA_state
{
5154 struct svcctl_QueryServiceConfigA orig
;
5155 struct svcctl_QueryServiceConfigA tmp
;
5156 TALLOC_CTX
*out_mem_ctx
;
5157 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5160 static void rpccli_svcctl_QueryServiceConfigA_done(struct tevent_req
*subreq
);
5162 struct tevent_req
*rpccli_svcctl_QueryServiceConfigA_send(TALLOC_CTX
*mem_ctx
,
5163 struct tevent_context
*ev
,
5164 struct rpc_pipe_client
*cli
,
5165 struct policy_handle
*_handle
/* [in] [ref] */,
5166 uint8_t *_query
/* [out] */,
5167 uint32_t _offered
/* [in] */,
5168 uint32_t *_needed
/* [out] [ref] */)
5170 struct tevent_req
*req
;
5171 struct rpccli_svcctl_QueryServiceConfigA_state
*state
;
5172 struct tevent_req
*subreq
;
5174 req
= tevent_req_create(mem_ctx
, &state
,
5175 struct rpccli_svcctl_QueryServiceConfigA_state
);
5179 state
->out_mem_ctx
= NULL
;
5180 state
->dispatch_recv
= cli
->dispatch_recv
;
5183 state
->orig
.in
.handle
= _handle
;
5184 state
->orig
.in
.offered
= _offered
;
5186 /* Out parameters */
5187 state
->orig
.out
.query
= _query
;
5188 state
->orig
.out
.needed
= _needed
;
5191 ZERO_STRUCT(state
->orig
.out
.result
);
5193 if (DEBUGLEVEL
>= 10) {
5194 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA
, &state
->orig
);
5197 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5198 "rpccli_svcctl_QueryServiceConfigA_out_memory");
5199 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5200 return tevent_req_post(req
, ev
);
5203 /* make a temporary copy, that we pass to the dispatch function */
5204 state
->tmp
= state
->orig
;
5206 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5208 NDR_SVCCTL_QUERYSERVICECONFIGA
,
5210 if (tevent_req_nomem(subreq
, req
)) {
5211 return tevent_req_post(req
, ev
);
5213 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfigA_done
, req
);
5217 static void rpccli_svcctl_QueryServiceConfigA_done(struct tevent_req
*subreq
)
5219 struct tevent_req
*req
= tevent_req_callback_data(
5220 subreq
, struct tevent_req
);
5221 struct rpccli_svcctl_QueryServiceConfigA_state
*state
= tevent_req_data(
5222 req
, struct rpccli_svcctl_QueryServiceConfigA_state
);
5224 TALLOC_CTX
*mem_ctx
;
5226 if (state
->out_mem_ctx
) {
5227 mem_ctx
= state
->out_mem_ctx
;
5232 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5233 TALLOC_FREE(subreq
);
5234 if (!NT_STATUS_IS_OK(status
)) {
5235 tevent_req_nterror(req
, status
);
5239 /* Copy out parameters */
5240 memcpy(state
->orig
.out
.query
, state
->tmp
.out
.query
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.query
));
5241 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
5244 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5246 /* Reset temporary structure */
5247 ZERO_STRUCT(state
->tmp
);
5249 if (DEBUGLEVEL
>= 10) {
5250 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA
, &state
->orig
);
5253 tevent_req_done(req
);
5256 NTSTATUS
rpccli_svcctl_QueryServiceConfigA_recv(struct tevent_req
*req
,
5257 TALLOC_CTX
*mem_ctx
,
5260 struct rpccli_svcctl_QueryServiceConfigA_state
*state
= tevent_req_data(
5261 req
, struct rpccli_svcctl_QueryServiceConfigA_state
);
5264 if (tevent_req_is_nterror(req
, &status
)) {
5265 tevent_req_received(req
);
5269 /* Steal possbile out parameters to the callers context */
5270 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5273 *result
= state
->orig
.out
.result
;
5275 tevent_req_received(req
);
5276 return NT_STATUS_OK
;
5279 NTSTATUS
rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client
*cli
,
5280 TALLOC_CTX
*mem_ctx
,
5281 struct policy_handle
*handle
/* [in] [ref] */,
5282 uint8_t *query
/* [out] */,
5283 uint32_t offered
/* [in] */,
5284 uint32_t *needed
/* [out] [ref] */,
5287 struct svcctl_QueryServiceConfigA r
;
5291 r
.in
.handle
= handle
;
5292 r
.in
.offered
= offered
;
5294 if (DEBUGLEVEL
>= 10) {
5295 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA
, &r
);
5298 status
= cli
->dispatch(cli
,
5301 NDR_SVCCTL_QUERYSERVICECONFIGA
,
5304 if (!NT_STATUS_IS_OK(status
)) {
5308 if (DEBUGLEVEL
>= 10) {
5309 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA
, &r
);
5312 if (NT_STATUS_IS_ERR(status
)) {
5316 /* Return variables */
5317 memcpy(query
, r
.out
.query
, r
.in
.offered
* sizeof(*query
));
5318 *needed
= *r
.out
.needed
;
5322 *werror
= r
.out
.result
;
5325 return werror_to_ntstatus(r
.out
.result
);
5328 struct rpccli_svcctl_QueryServiceLockStatusA_state
{
5329 struct svcctl_QueryServiceLockStatusA orig
;
5330 struct svcctl_QueryServiceLockStatusA tmp
;
5331 TALLOC_CTX
*out_mem_ctx
;
5332 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5335 static void rpccli_svcctl_QueryServiceLockStatusA_done(struct tevent_req
*subreq
);
5337 struct tevent_req
*rpccli_svcctl_QueryServiceLockStatusA_send(TALLOC_CTX
*mem_ctx
,
5338 struct tevent_context
*ev
,
5339 struct rpc_pipe_client
*cli
,
5340 struct policy_handle
*_handle
/* [in] [ref] */,
5341 uint32_t _offered
/* [in] */,
5342 struct SERVICE_LOCK_STATUS
*_lock_status
/* [out] [ref] */,
5343 uint32_t *_needed
/* [out] [ref] */)
5345 struct tevent_req
*req
;
5346 struct rpccli_svcctl_QueryServiceLockStatusA_state
*state
;
5347 struct tevent_req
*subreq
;
5349 req
= tevent_req_create(mem_ctx
, &state
,
5350 struct rpccli_svcctl_QueryServiceLockStatusA_state
);
5354 state
->out_mem_ctx
= NULL
;
5355 state
->dispatch_recv
= cli
->dispatch_recv
;
5358 state
->orig
.in
.handle
= _handle
;
5359 state
->orig
.in
.offered
= _offered
;
5361 /* Out parameters */
5362 state
->orig
.out
.lock_status
= _lock_status
;
5363 state
->orig
.out
.needed
= _needed
;
5366 ZERO_STRUCT(state
->orig
.out
.result
);
5368 if (DEBUGLEVEL
>= 10) {
5369 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA
, &state
->orig
);
5372 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5373 "rpccli_svcctl_QueryServiceLockStatusA_out_memory");
5374 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5375 return tevent_req_post(req
, ev
);
5378 /* make a temporary copy, that we pass to the dispatch function */
5379 state
->tmp
= state
->orig
;
5381 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5383 NDR_SVCCTL_QUERYSERVICELOCKSTATUSA
,
5385 if (tevent_req_nomem(subreq
, req
)) {
5386 return tevent_req_post(req
, ev
);
5388 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceLockStatusA_done
, req
);
5392 static void rpccli_svcctl_QueryServiceLockStatusA_done(struct tevent_req
*subreq
)
5394 struct tevent_req
*req
= tevent_req_callback_data(
5395 subreq
, struct tevent_req
);
5396 struct rpccli_svcctl_QueryServiceLockStatusA_state
*state
= tevent_req_data(
5397 req
, struct rpccli_svcctl_QueryServiceLockStatusA_state
);
5399 TALLOC_CTX
*mem_ctx
;
5401 if (state
->out_mem_ctx
) {
5402 mem_ctx
= state
->out_mem_ctx
;
5407 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5408 TALLOC_FREE(subreq
);
5409 if (!NT_STATUS_IS_OK(status
)) {
5410 tevent_req_nterror(req
, status
);
5414 /* Copy out parameters */
5415 *state
->orig
.out
.lock_status
= *state
->tmp
.out
.lock_status
;
5416 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
5419 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5421 /* Reset temporary structure */
5422 ZERO_STRUCT(state
->tmp
);
5424 if (DEBUGLEVEL
>= 10) {
5425 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA
, &state
->orig
);
5428 tevent_req_done(req
);
5431 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusA_recv(struct tevent_req
*req
,
5432 TALLOC_CTX
*mem_ctx
,
5435 struct rpccli_svcctl_QueryServiceLockStatusA_state
*state
= tevent_req_data(
5436 req
, struct rpccli_svcctl_QueryServiceLockStatusA_state
);
5439 if (tevent_req_is_nterror(req
, &status
)) {
5440 tevent_req_received(req
);
5444 /* Steal possbile out parameters to the callers context */
5445 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5448 *result
= state
->orig
.out
.result
;
5450 tevent_req_received(req
);
5451 return NT_STATUS_OK
;
5454 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client
*cli
,
5455 TALLOC_CTX
*mem_ctx
,
5456 struct policy_handle
*handle
/* [in] [ref] */,
5457 uint32_t offered
/* [in] */,
5458 struct SERVICE_LOCK_STATUS
*lock_status
/* [out] [ref] */,
5459 uint32_t *needed
/* [out] [ref] */,
5462 struct svcctl_QueryServiceLockStatusA r
;
5466 r
.in
.handle
= handle
;
5467 r
.in
.offered
= offered
;
5469 if (DEBUGLEVEL
>= 10) {
5470 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA
, &r
);
5473 status
= cli
->dispatch(cli
,
5476 NDR_SVCCTL_QUERYSERVICELOCKSTATUSA
,
5479 if (!NT_STATUS_IS_OK(status
)) {
5483 if (DEBUGLEVEL
>= 10) {
5484 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA
, &r
);
5487 if (NT_STATUS_IS_ERR(status
)) {
5491 /* Return variables */
5492 *lock_status
= *r
.out
.lock_status
;
5493 *needed
= *r
.out
.needed
;
5497 *werror
= r
.out
.result
;
5500 return werror_to_ntstatus(r
.out
.result
);
5503 struct rpccli_svcctl_StartServiceA_state
{
5504 struct svcctl_StartServiceA orig
;
5505 struct svcctl_StartServiceA tmp
;
5506 TALLOC_CTX
*out_mem_ctx
;
5507 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5510 static void rpccli_svcctl_StartServiceA_done(struct tevent_req
*subreq
);
5512 struct tevent_req
*rpccli_svcctl_StartServiceA_send(TALLOC_CTX
*mem_ctx
,
5513 struct tevent_context
*ev
,
5514 struct rpc_pipe_client
*cli
,
5515 struct policy_handle
*_handle
/* [in] [ref] */,
5516 uint32_t _NumArgs
/* [in] */,
5517 const char *_Arguments
/* [in] [unique,charset(UTF16)] */)
5519 struct tevent_req
*req
;
5520 struct rpccli_svcctl_StartServiceA_state
*state
;
5521 struct tevent_req
*subreq
;
5523 req
= tevent_req_create(mem_ctx
, &state
,
5524 struct rpccli_svcctl_StartServiceA_state
);
5528 state
->out_mem_ctx
= NULL
;
5529 state
->dispatch_recv
= cli
->dispatch_recv
;
5532 state
->orig
.in
.handle
= _handle
;
5533 state
->orig
.in
.NumArgs
= _NumArgs
;
5534 state
->orig
.in
.Arguments
= _Arguments
;
5536 /* Out parameters */
5539 ZERO_STRUCT(state
->orig
.out
.result
);
5541 if (DEBUGLEVEL
>= 10) {
5542 NDR_PRINT_IN_DEBUG(svcctl_StartServiceA
, &state
->orig
);
5545 /* make a temporary copy, that we pass to the dispatch function */
5546 state
->tmp
= state
->orig
;
5548 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5550 NDR_SVCCTL_STARTSERVICEA
,
5552 if (tevent_req_nomem(subreq
, req
)) {
5553 return tevent_req_post(req
, ev
);
5555 tevent_req_set_callback(subreq
, rpccli_svcctl_StartServiceA_done
, req
);
5559 static void rpccli_svcctl_StartServiceA_done(struct tevent_req
*subreq
)
5561 struct tevent_req
*req
= tevent_req_callback_data(
5562 subreq
, struct tevent_req
);
5563 struct rpccli_svcctl_StartServiceA_state
*state
= tevent_req_data(
5564 req
, struct rpccli_svcctl_StartServiceA_state
);
5566 TALLOC_CTX
*mem_ctx
;
5568 if (state
->out_mem_ctx
) {
5569 mem_ctx
= state
->out_mem_ctx
;
5574 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5575 TALLOC_FREE(subreq
);
5576 if (!NT_STATUS_IS_OK(status
)) {
5577 tevent_req_nterror(req
, status
);
5581 /* Copy out parameters */
5584 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5586 /* Reset temporary structure */
5587 ZERO_STRUCT(state
->tmp
);
5589 if (DEBUGLEVEL
>= 10) {
5590 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA
, &state
->orig
);
5593 tevent_req_done(req
);
5596 NTSTATUS
rpccli_svcctl_StartServiceA_recv(struct tevent_req
*req
,
5597 TALLOC_CTX
*mem_ctx
,
5600 struct rpccli_svcctl_StartServiceA_state
*state
= tevent_req_data(
5601 req
, struct rpccli_svcctl_StartServiceA_state
);
5604 if (tevent_req_is_nterror(req
, &status
)) {
5605 tevent_req_received(req
);
5609 /* Steal possbile out parameters to the callers context */
5610 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5613 *result
= state
->orig
.out
.result
;
5615 tevent_req_received(req
);
5616 return NT_STATUS_OK
;
5619 NTSTATUS
rpccli_svcctl_StartServiceA(struct rpc_pipe_client
*cli
,
5620 TALLOC_CTX
*mem_ctx
,
5621 struct policy_handle
*handle
/* [in] [ref] */,
5622 uint32_t NumArgs
/* [in] */,
5623 const char *Arguments
/* [in] [unique,charset(UTF16)] */,
5626 struct svcctl_StartServiceA r
;
5630 r
.in
.handle
= handle
;
5631 r
.in
.NumArgs
= NumArgs
;
5632 r
.in
.Arguments
= Arguments
;
5634 if (DEBUGLEVEL
>= 10) {
5635 NDR_PRINT_IN_DEBUG(svcctl_StartServiceA
, &r
);
5638 status
= cli
->dispatch(cli
,
5641 NDR_SVCCTL_STARTSERVICEA
,
5644 if (!NT_STATUS_IS_OK(status
)) {
5648 if (DEBUGLEVEL
>= 10) {
5649 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA
, &r
);
5652 if (NT_STATUS_IS_ERR(status
)) {
5656 /* Return variables */
5660 *werror
= r
.out
.result
;
5663 return werror_to_ntstatus(r
.out
.result
);
5666 struct rpccli_svcctl_GetServiceDisplayNameA_state
{
5667 struct svcctl_GetServiceDisplayNameA orig
;
5668 struct svcctl_GetServiceDisplayNameA tmp
;
5669 TALLOC_CTX
*out_mem_ctx
;
5670 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5673 static void rpccli_svcctl_GetServiceDisplayNameA_done(struct tevent_req
*subreq
);
5675 struct tevent_req
*rpccli_svcctl_GetServiceDisplayNameA_send(TALLOC_CTX
*mem_ctx
,
5676 struct tevent_context
*ev
,
5677 struct rpc_pipe_client
*cli
,
5678 struct policy_handle
*_handle
/* [in] [ref] */,
5679 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
5680 const char **_display_name
/* [out] [ref,charset(UTF16)] */,
5681 uint32_t *_display_name_length
/* [in,out] [unique] */)
5683 struct tevent_req
*req
;
5684 struct rpccli_svcctl_GetServiceDisplayNameA_state
*state
;
5685 struct tevent_req
*subreq
;
5687 req
= tevent_req_create(mem_ctx
, &state
,
5688 struct rpccli_svcctl_GetServiceDisplayNameA_state
);
5692 state
->out_mem_ctx
= NULL
;
5693 state
->dispatch_recv
= cli
->dispatch_recv
;
5696 state
->orig
.in
.handle
= _handle
;
5697 state
->orig
.in
.service_name
= _service_name
;
5698 state
->orig
.in
.display_name_length
= _display_name_length
;
5700 /* Out parameters */
5701 state
->orig
.out
.display_name
= _display_name
;
5702 state
->orig
.out
.display_name_length
= _display_name_length
;
5705 ZERO_STRUCT(state
->orig
.out
.result
);
5707 if (DEBUGLEVEL
>= 10) {
5708 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA
, &state
->orig
);
5711 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5712 "rpccli_svcctl_GetServiceDisplayNameA_out_memory");
5713 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5714 return tevent_req_post(req
, ev
);
5717 /* make a temporary copy, that we pass to the dispatch function */
5718 state
->tmp
= state
->orig
;
5720 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5722 NDR_SVCCTL_GETSERVICEDISPLAYNAMEA
,
5724 if (tevent_req_nomem(subreq
, req
)) {
5725 return tevent_req_post(req
, ev
);
5727 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceDisplayNameA_done
, req
);
5731 static void rpccli_svcctl_GetServiceDisplayNameA_done(struct tevent_req
*subreq
)
5733 struct tevent_req
*req
= tevent_req_callback_data(
5734 subreq
, struct tevent_req
);
5735 struct rpccli_svcctl_GetServiceDisplayNameA_state
*state
= tevent_req_data(
5736 req
, struct rpccli_svcctl_GetServiceDisplayNameA_state
);
5738 TALLOC_CTX
*mem_ctx
;
5740 if (state
->out_mem_ctx
) {
5741 mem_ctx
= state
->out_mem_ctx
;
5746 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5747 TALLOC_FREE(subreq
);
5748 if (!NT_STATUS_IS_OK(status
)) {
5749 tevent_req_nterror(req
, status
);
5753 /* Copy out parameters */
5754 *state
->orig
.out
.display_name
= *state
->tmp
.out
.display_name
;
5755 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
5756 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
5760 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5762 /* Reset temporary structure */
5763 ZERO_STRUCT(state
->tmp
);
5765 if (DEBUGLEVEL
>= 10) {
5766 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA
, &state
->orig
);
5769 tevent_req_done(req
);
5772 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameA_recv(struct tevent_req
*req
,
5773 TALLOC_CTX
*mem_ctx
,
5776 struct rpccli_svcctl_GetServiceDisplayNameA_state
*state
= tevent_req_data(
5777 req
, struct rpccli_svcctl_GetServiceDisplayNameA_state
);
5780 if (tevent_req_is_nterror(req
, &status
)) {
5781 tevent_req_received(req
);
5785 /* Steal possbile out parameters to the callers context */
5786 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5789 *result
= state
->orig
.out
.result
;
5791 tevent_req_received(req
);
5792 return NT_STATUS_OK
;
5795 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client
*cli
,
5796 TALLOC_CTX
*mem_ctx
,
5797 struct policy_handle
*handle
/* [in] [ref] */,
5798 const char *service_name
/* [in] [unique,charset(UTF16)] */,
5799 const char **display_name
/* [out] [ref,charset(UTF16)] */,
5800 uint32_t *display_name_length
/* [in,out] [unique] */,
5803 struct svcctl_GetServiceDisplayNameA r
;
5807 r
.in
.handle
= handle
;
5808 r
.in
.service_name
= service_name
;
5809 r
.in
.display_name_length
= display_name_length
;
5811 if (DEBUGLEVEL
>= 10) {
5812 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA
, &r
);
5815 status
= cli
->dispatch(cli
,
5818 NDR_SVCCTL_GETSERVICEDISPLAYNAMEA
,
5821 if (!NT_STATUS_IS_OK(status
)) {
5825 if (DEBUGLEVEL
>= 10) {
5826 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA
, &r
);
5829 if (NT_STATUS_IS_ERR(status
)) {
5833 /* Return variables */
5834 *display_name
= *r
.out
.display_name
;
5835 if (display_name_length
&& r
.out
.display_name_length
) {
5836 *display_name_length
= *r
.out
.display_name_length
;
5841 *werror
= r
.out
.result
;
5844 return werror_to_ntstatus(r
.out
.result
);
5847 struct rpccli_svcctl_GetServiceKeyNameA_state
{
5848 struct svcctl_GetServiceKeyNameA orig
;
5849 struct svcctl_GetServiceKeyNameA tmp
;
5850 TALLOC_CTX
*out_mem_ctx
;
5851 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
5854 static void rpccli_svcctl_GetServiceKeyNameA_done(struct tevent_req
*subreq
);
5856 struct tevent_req
*rpccli_svcctl_GetServiceKeyNameA_send(TALLOC_CTX
*mem_ctx
,
5857 struct tevent_context
*ev
,
5858 struct rpc_pipe_client
*cli
,
5859 struct policy_handle
*_handle
/* [in] [ref] */,
5860 const char *_service_name
/* [in] [unique,charset(UTF16)] */,
5861 const char **_key_name
/* [out] [ref,charset(UTF16)] */,
5862 uint32_t *_display_name_length
/* [in,out] [unique] */)
5864 struct tevent_req
*req
;
5865 struct rpccli_svcctl_GetServiceKeyNameA_state
*state
;
5866 struct tevent_req
*subreq
;
5868 req
= tevent_req_create(mem_ctx
, &state
,
5869 struct rpccli_svcctl_GetServiceKeyNameA_state
);
5873 state
->out_mem_ctx
= NULL
;
5874 state
->dispatch_recv
= cli
->dispatch_recv
;
5877 state
->orig
.in
.handle
= _handle
;
5878 state
->orig
.in
.service_name
= _service_name
;
5879 state
->orig
.in
.display_name_length
= _display_name_length
;
5881 /* Out parameters */
5882 state
->orig
.out
.key_name
= _key_name
;
5883 state
->orig
.out
.display_name_length
= _display_name_length
;
5886 ZERO_STRUCT(state
->orig
.out
.result
);
5888 if (DEBUGLEVEL
>= 10) {
5889 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA
, &state
->orig
);
5892 state
->out_mem_ctx
= talloc_named_const(state
, 0,
5893 "rpccli_svcctl_GetServiceKeyNameA_out_memory");
5894 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
5895 return tevent_req_post(req
, ev
);
5898 /* make a temporary copy, that we pass to the dispatch function */
5899 state
->tmp
= state
->orig
;
5901 subreq
= cli
->dispatch_send(state
, ev
, cli
,
5903 NDR_SVCCTL_GETSERVICEKEYNAMEA
,
5905 if (tevent_req_nomem(subreq
, req
)) {
5906 return tevent_req_post(req
, ev
);
5908 tevent_req_set_callback(subreq
, rpccli_svcctl_GetServiceKeyNameA_done
, req
);
5912 static void rpccli_svcctl_GetServiceKeyNameA_done(struct tevent_req
*subreq
)
5914 struct tevent_req
*req
= tevent_req_callback_data(
5915 subreq
, struct tevent_req
);
5916 struct rpccli_svcctl_GetServiceKeyNameA_state
*state
= tevent_req_data(
5917 req
, struct rpccli_svcctl_GetServiceKeyNameA_state
);
5919 TALLOC_CTX
*mem_ctx
;
5921 if (state
->out_mem_ctx
) {
5922 mem_ctx
= state
->out_mem_ctx
;
5927 status
= state
->dispatch_recv(subreq
, mem_ctx
);
5928 TALLOC_FREE(subreq
);
5929 if (!NT_STATUS_IS_OK(status
)) {
5930 tevent_req_nterror(req
, status
);
5934 /* Copy out parameters */
5935 *state
->orig
.out
.key_name
= *state
->tmp
.out
.key_name
;
5936 if (state
->orig
.out
.display_name_length
&& state
->tmp
.out
.display_name_length
) {
5937 *state
->orig
.out
.display_name_length
= *state
->tmp
.out
.display_name_length
;
5941 state
->orig
.out
.result
= state
->tmp
.out
.result
;
5943 /* Reset temporary structure */
5944 ZERO_STRUCT(state
->tmp
);
5946 if (DEBUGLEVEL
>= 10) {
5947 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA
, &state
->orig
);
5950 tevent_req_done(req
);
5953 NTSTATUS
rpccli_svcctl_GetServiceKeyNameA_recv(struct tevent_req
*req
,
5954 TALLOC_CTX
*mem_ctx
,
5957 struct rpccli_svcctl_GetServiceKeyNameA_state
*state
= tevent_req_data(
5958 req
, struct rpccli_svcctl_GetServiceKeyNameA_state
);
5961 if (tevent_req_is_nterror(req
, &status
)) {
5962 tevent_req_received(req
);
5966 /* Steal possbile out parameters to the callers context */
5967 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
5970 *result
= state
->orig
.out
.result
;
5972 tevent_req_received(req
);
5973 return NT_STATUS_OK
;
5976 NTSTATUS
rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client
*cli
,
5977 TALLOC_CTX
*mem_ctx
,
5978 struct policy_handle
*handle
/* [in] [ref] */,
5979 const char *service_name
/* [in] [unique,charset(UTF16)] */,
5980 const char **key_name
/* [out] [ref,charset(UTF16)] */,
5981 uint32_t *display_name_length
/* [in,out] [unique] */,
5984 struct svcctl_GetServiceKeyNameA r
;
5988 r
.in
.handle
= handle
;
5989 r
.in
.service_name
= service_name
;
5990 r
.in
.display_name_length
= display_name_length
;
5992 if (DEBUGLEVEL
>= 10) {
5993 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA
, &r
);
5996 status
= cli
->dispatch(cli
,
5999 NDR_SVCCTL_GETSERVICEKEYNAMEA
,
6002 if (!NT_STATUS_IS_OK(status
)) {
6006 if (DEBUGLEVEL
>= 10) {
6007 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA
, &r
);
6010 if (NT_STATUS_IS_ERR(status
)) {
6014 /* Return variables */
6015 *key_name
= *r
.out
.key_name
;
6016 if (display_name_length
&& r
.out
.display_name_length
) {
6017 *display_name_length
= *r
.out
.display_name_length
;
6022 *werror
= r
.out
.result
;
6025 return werror_to_ntstatus(r
.out
.result
);
6028 struct rpccli_svcctl_GetCurrentGroupeStateW_state
{
6029 struct svcctl_GetCurrentGroupeStateW orig
;
6030 struct svcctl_GetCurrentGroupeStateW tmp
;
6031 TALLOC_CTX
*out_mem_ctx
;
6032 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6035 static void rpccli_svcctl_GetCurrentGroupeStateW_done(struct tevent_req
*subreq
);
6037 struct tevent_req
*rpccli_svcctl_GetCurrentGroupeStateW_send(TALLOC_CTX
*mem_ctx
,
6038 struct tevent_context
*ev
,
6039 struct rpc_pipe_client
*cli
)
6041 struct tevent_req
*req
;
6042 struct rpccli_svcctl_GetCurrentGroupeStateW_state
*state
;
6043 struct tevent_req
*subreq
;
6045 req
= tevent_req_create(mem_ctx
, &state
,
6046 struct rpccli_svcctl_GetCurrentGroupeStateW_state
);
6050 state
->out_mem_ctx
= NULL
;
6051 state
->dispatch_recv
= cli
->dispatch_recv
;
6055 /* Out parameters */
6058 ZERO_STRUCT(state
->orig
.out
.result
);
6060 if (DEBUGLEVEL
>= 10) {
6061 NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW
, &state
->orig
);
6064 /* make a temporary copy, that we pass to the dispatch function */
6065 state
->tmp
= state
->orig
;
6067 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6069 NDR_SVCCTL_GETCURRENTGROUPESTATEW
,
6071 if (tevent_req_nomem(subreq
, req
)) {
6072 return tevent_req_post(req
, ev
);
6074 tevent_req_set_callback(subreq
, rpccli_svcctl_GetCurrentGroupeStateW_done
, req
);
6078 static void rpccli_svcctl_GetCurrentGroupeStateW_done(struct tevent_req
*subreq
)
6080 struct tevent_req
*req
= tevent_req_callback_data(
6081 subreq
, struct tevent_req
);
6082 struct rpccli_svcctl_GetCurrentGroupeStateW_state
*state
= tevent_req_data(
6083 req
, struct rpccli_svcctl_GetCurrentGroupeStateW_state
);
6085 TALLOC_CTX
*mem_ctx
;
6087 if (state
->out_mem_ctx
) {
6088 mem_ctx
= state
->out_mem_ctx
;
6093 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6094 TALLOC_FREE(subreq
);
6095 if (!NT_STATUS_IS_OK(status
)) {
6096 tevent_req_nterror(req
, status
);
6100 /* Copy out parameters */
6103 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6105 /* Reset temporary structure */
6106 ZERO_STRUCT(state
->tmp
);
6108 if (DEBUGLEVEL
>= 10) {
6109 NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW
, &state
->orig
);
6112 tevent_req_done(req
);
6115 NTSTATUS
rpccli_svcctl_GetCurrentGroupeStateW_recv(struct tevent_req
*req
,
6116 TALLOC_CTX
*mem_ctx
,
6119 struct rpccli_svcctl_GetCurrentGroupeStateW_state
*state
= tevent_req_data(
6120 req
, struct rpccli_svcctl_GetCurrentGroupeStateW_state
);
6123 if (tevent_req_is_nterror(req
, &status
)) {
6124 tevent_req_received(req
);
6128 /* Steal possbile out parameters to the callers context */
6129 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6132 *result
= state
->orig
.out
.result
;
6134 tevent_req_received(req
);
6135 return NT_STATUS_OK
;
6138 NTSTATUS
rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client
*cli
,
6139 TALLOC_CTX
*mem_ctx
,
6142 struct svcctl_GetCurrentGroupeStateW r
;
6147 if (DEBUGLEVEL
>= 10) {
6148 NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW
, &r
);
6151 status
= cli
->dispatch(cli
,
6154 NDR_SVCCTL_GETCURRENTGROUPESTATEW
,
6157 if (!NT_STATUS_IS_OK(status
)) {
6161 if (DEBUGLEVEL
>= 10) {
6162 NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW
, &r
);
6165 if (NT_STATUS_IS_ERR(status
)) {
6169 /* Return variables */
6173 *werror
= r
.out
.result
;
6176 return werror_to_ntstatus(r
.out
.result
);
6179 struct rpccli_svcctl_EnumServiceGroupW_state
{
6180 struct svcctl_EnumServiceGroupW orig
;
6181 struct svcctl_EnumServiceGroupW tmp
;
6182 TALLOC_CTX
*out_mem_ctx
;
6183 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6186 static void rpccli_svcctl_EnumServiceGroupW_done(struct tevent_req
*subreq
);
6188 struct tevent_req
*rpccli_svcctl_EnumServiceGroupW_send(TALLOC_CTX
*mem_ctx
,
6189 struct tevent_context
*ev
,
6190 struct rpc_pipe_client
*cli
)
6192 struct tevent_req
*req
;
6193 struct rpccli_svcctl_EnumServiceGroupW_state
*state
;
6194 struct tevent_req
*subreq
;
6196 req
= tevent_req_create(mem_ctx
, &state
,
6197 struct rpccli_svcctl_EnumServiceGroupW_state
);
6201 state
->out_mem_ctx
= NULL
;
6202 state
->dispatch_recv
= cli
->dispatch_recv
;
6206 /* Out parameters */
6209 ZERO_STRUCT(state
->orig
.out
.result
);
6211 if (DEBUGLEVEL
>= 10) {
6212 NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW
, &state
->orig
);
6215 /* make a temporary copy, that we pass to the dispatch function */
6216 state
->tmp
= state
->orig
;
6218 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6220 NDR_SVCCTL_ENUMSERVICEGROUPW
,
6222 if (tevent_req_nomem(subreq
, req
)) {
6223 return tevent_req_post(req
, ev
);
6225 tevent_req_set_callback(subreq
, rpccli_svcctl_EnumServiceGroupW_done
, req
);
6229 static void rpccli_svcctl_EnumServiceGroupW_done(struct tevent_req
*subreq
)
6231 struct tevent_req
*req
= tevent_req_callback_data(
6232 subreq
, struct tevent_req
);
6233 struct rpccli_svcctl_EnumServiceGroupW_state
*state
= tevent_req_data(
6234 req
, struct rpccli_svcctl_EnumServiceGroupW_state
);
6236 TALLOC_CTX
*mem_ctx
;
6238 if (state
->out_mem_ctx
) {
6239 mem_ctx
= state
->out_mem_ctx
;
6244 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6245 TALLOC_FREE(subreq
);
6246 if (!NT_STATUS_IS_OK(status
)) {
6247 tevent_req_nterror(req
, status
);
6251 /* Copy out parameters */
6254 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6256 /* Reset temporary structure */
6257 ZERO_STRUCT(state
->tmp
);
6259 if (DEBUGLEVEL
>= 10) {
6260 NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW
, &state
->orig
);
6263 tevent_req_done(req
);
6266 NTSTATUS
rpccli_svcctl_EnumServiceGroupW_recv(struct tevent_req
*req
,
6267 TALLOC_CTX
*mem_ctx
,
6270 struct rpccli_svcctl_EnumServiceGroupW_state
*state
= tevent_req_data(
6271 req
, struct rpccli_svcctl_EnumServiceGroupW_state
);
6274 if (tevent_req_is_nterror(req
, &status
)) {
6275 tevent_req_received(req
);
6279 /* Steal possbile out parameters to the callers context */
6280 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6283 *result
= state
->orig
.out
.result
;
6285 tevent_req_received(req
);
6286 return NT_STATUS_OK
;
6289 NTSTATUS
rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client
*cli
,
6290 TALLOC_CTX
*mem_ctx
,
6293 struct svcctl_EnumServiceGroupW r
;
6298 if (DEBUGLEVEL
>= 10) {
6299 NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW
, &r
);
6302 status
= cli
->dispatch(cli
,
6305 NDR_SVCCTL_ENUMSERVICEGROUPW
,
6308 if (!NT_STATUS_IS_OK(status
)) {
6312 if (DEBUGLEVEL
>= 10) {
6313 NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW
, &r
);
6316 if (NT_STATUS_IS_ERR(status
)) {
6320 /* Return variables */
6324 *werror
= r
.out
.result
;
6327 return werror_to_ntstatus(r
.out
.result
);
6330 struct rpccli_svcctl_ChangeServiceConfig2A_state
{
6331 struct svcctl_ChangeServiceConfig2A orig
;
6332 struct svcctl_ChangeServiceConfig2A tmp
;
6333 TALLOC_CTX
*out_mem_ctx
;
6334 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6337 static void rpccli_svcctl_ChangeServiceConfig2A_done(struct tevent_req
*subreq
);
6339 struct tevent_req
*rpccli_svcctl_ChangeServiceConfig2A_send(TALLOC_CTX
*mem_ctx
,
6340 struct tevent_context
*ev
,
6341 struct rpc_pipe_client
*cli
,
6342 struct policy_handle
*_handle
/* [in] [ref] */,
6343 uint32_t _info_level
/* [in] */,
6344 uint8_t *_info
/* [in] [unique] */)
6346 struct tevent_req
*req
;
6347 struct rpccli_svcctl_ChangeServiceConfig2A_state
*state
;
6348 struct tevent_req
*subreq
;
6350 req
= tevent_req_create(mem_ctx
, &state
,
6351 struct rpccli_svcctl_ChangeServiceConfig2A_state
);
6355 state
->out_mem_ctx
= NULL
;
6356 state
->dispatch_recv
= cli
->dispatch_recv
;
6359 state
->orig
.in
.handle
= _handle
;
6360 state
->orig
.in
.info_level
= _info_level
;
6361 state
->orig
.in
.info
= _info
;
6363 /* Out parameters */
6366 ZERO_STRUCT(state
->orig
.out
.result
);
6368 if (DEBUGLEVEL
>= 10) {
6369 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A
, &state
->orig
);
6372 /* make a temporary copy, that we pass to the dispatch function */
6373 state
->tmp
= state
->orig
;
6375 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6377 NDR_SVCCTL_CHANGESERVICECONFIG2A
,
6379 if (tevent_req_nomem(subreq
, req
)) {
6380 return tevent_req_post(req
, ev
);
6382 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfig2A_done
, req
);
6386 static void rpccli_svcctl_ChangeServiceConfig2A_done(struct tevent_req
*subreq
)
6388 struct tevent_req
*req
= tevent_req_callback_data(
6389 subreq
, struct tevent_req
);
6390 struct rpccli_svcctl_ChangeServiceConfig2A_state
*state
= tevent_req_data(
6391 req
, struct rpccli_svcctl_ChangeServiceConfig2A_state
);
6393 TALLOC_CTX
*mem_ctx
;
6395 if (state
->out_mem_ctx
) {
6396 mem_ctx
= state
->out_mem_ctx
;
6401 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6402 TALLOC_FREE(subreq
);
6403 if (!NT_STATUS_IS_OK(status
)) {
6404 tevent_req_nterror(req
, status
);
6408 /* Copy out parameters */
6411 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6413 /* Reset temporary structure */
6414 ZERO_STRUCT(state
->tmp
);
6416 if (DEBUGLEVEL
>= 10) {
6417 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A
, &state
->orig
);
6420 tevent_req_done(req
);
6423 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2A_recv(struct tevent_req
*req
,
6424 TALLOC_CTX
*mem_ctx
,
6427 struct rpccli_svcctl_ChangeServiceConfig2A_state
*state
= tevent_req_data(
6428 req
, struct rpccli_svcctl_ChangeServiceConfig2A_state
);
6431 if (tevent_req_is_nterror(req
, &status
)) {
6432 tevent_req_received(req
);
6436 /* Steal possbile out parameters to the callers context */
6437 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6440 *result
= state
->orig
.out
.result
;
6442 tevent_req_received(req
);
6443 return NT_STATUS_OK
;
6446 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client
*cli
,
6447 TALLOC_CTX
*mem_ctx
,
6448 struct policy_handle
*handle
/* [in] [ref] */,
6449 uint32_t info_level
/* [in] */,
6450 uint8_t *info
/* [in] [unique] */,
6453 struct svcctl_ChangeServiceConfig2A r
;
6457 r
.in
.handle
= handle
;
6458 r
.in
.info_level
= info_level
;
6461 if (DEBUGLEVEL
>= 10) {
6462 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A
, &r
);
6465 status
= cli
->dispatch(cli
,
6468 NDR_SVCCTL_CHANGESERVICECONFIG2A
,
6471 if (!NT_STATUS_IS_OK(status
)) {
6475 if (DEBUGLEVEL
>= 10) {
6476 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A
, &r
);
6479 if (NT_STATUS_IS_ERR(status
)) {
6483 /* Return variables */
6487 *werror
= r
.out
.result
;
6490 return werror_to_ntstatus(r
.out
.result
);
6493 struct rpccli_svcctl_ChangeServiceConfig2W_state
{
6494 struct svcctl_ChangeServiceConfig2W orig
;
6495 struct svcctl_ChangeServiceConfig2W tmp
;
6496 TALLOC_CTX
*out_mem_ctx
;
6497 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6500 static void rpccli_svcctl_ChangeServiceConfig2W_done(struct tevent_req
*subreq
);
6502 struct tevent_req
*rpccli_svcctl_ChangeServiceConfig2W_send(TALLOC_CTX
*mem_ctx
,
6503 struct tevent_context
*ev
,
6504 struct rpc_pipe_client
*cli
,
6505 struct policy_handle
*_handle
/* [in] [ref] */,
6506 uint32_t _info_level
/* [in] */,
6507 uint8_t *_info
/* [in] [unique] */)
6509 struct tevent_req
*req
;
6510 struct rpccli_svcctl_ChangeServiceConfig2W_state
*state
;
6511 struct tevent_req
*subreq
;
6513 req
= tevent_req_create(mem_ctx
, &state
,
6514 struct rpccli_svcctl_ChangeServiceConfig2W_state
);
6518 state
->out_mem_ctx
= NULL
;
6519 state
->dispatch_recv
= cli
->dispatch_recv
;
6522 state
->orig
.in
.handle
= _handle
;
6523 state
->orig
.in
.info_level
= _info_level
;
6524 state
->orig
.in
.info
= _info
;
6526 /* Out parameters */
6529 ZERO_STRUCT(state
->orig
.out
.result
);
6531 if (DEBUGLEVEL
>= 10) {
6532 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W
, &state
->orig
);
6535 /* make a temporary copy, that we pass to the dispatch function */
6536 state
->tmp
= state
->orig
;
6538 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6540 NDR_SVCCTL_CHANGESERVICECONFIG2W
,
6542 if (tevent_req_nomem(subreq
, req
)) {
6543 return tevent_req_post(req
, ev
);
6545 tevent_req_set_callback(subreq
, rpccli_svcctl_ChangeServiceConfig2W_done
, req
);
6549 static void rpccli_svcctl_ChangeServiceConfig2W_done(struct tevent_req
*subreq
)
6551 struct tevent_req
*req
= tevent_req_callback_data(
6552 subreq
, struct tevent_req
);
6553 struct rpccli_svcctl_ChangeServiceConfig2W_state
*state
= tevent_req_data(
6554 req
, struct rpccli_svcctl_ChangeServiceConfig2W_state
);
6556 TALLOC_CTX
*mem_ctx
;
6558 if (state
->out_mem_ctx
) {
6559 mem_ctx
= state
->out_mem_ctx
;
6564 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6565 TALLOC_FREE(subreq
);
6566 if (!NT_STATUS_IS_OK(status
)) {
6567 tevent_req_nterror(req
, status
);
6571 /* Copy out parameters */
6574 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6576 /* Reset temporary structure */
6577 ZERO_STRUCT(state
->tmp
);
6579 if (DEBUGLEVEL
>= 10) {
6580 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W
, &state
->orig
);
6583 tevent_req_done(req
);
6586 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2W_recv(struct tevent_req
*req
,
6587 TALLOC_CTX
*mem_ctx
,
6590 struct rpccli_svcctl_ChangeServiceConfig2W_state
*state
= tevent_req_data(
6591 req
, struct rpccli_svcctl_ChangeServiceConfig2W_state
);
6594 if (tevent_req_is_nterror(req
, &status
)) {
6595 tevent_req_received(req
);
6599 /* Steal possbile out parameters to the callers context */
6600 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6603 *result
= state
->orig
.out
.result
;
6605 tevent_req_received(req
);
6606 return NT_STATUS_OK
;
6609 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client
*cli
,
6610 TALLOC_CTX
*mem_ctx
,
6611 struct policy_handle
*handle
/* [in] [ref] */,
6612 uint32_t info_level
/* [in] */,
6613 uint8_t *info
/* [in] [unique] */,
6616 struct svcctl_ChangeServiceConfig2W r
;
6620 r
.in
.handle
= handle
;
6621 r
.in
.info_level
= info_level
;
6624 if (DEBUGLEVEL
>= 10) {
6625 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W
, &r
);
6628 status
= cli
->dispatch(cli
,
6631 NDR_SVCCTL_CHANGESERVICECONFIG2W
,
6634 if (!NT_STATUS_IS_OK(status
)) {
6638 if (DEBUGLEVEL
>= 10) {
6639 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W
, &r
);
6642 if (NT_STATUS_IS_ERR(status
)) {
6646 /* Return variables */
6650 *werror
= r
.out
.result
;
6653 return werror_to_ntstatus(r
.out
.result
);
6656 struct rpccli_svcctl_QueryServiceConfig2A_state
{
6657 struct svcctl_QueryServiceConfig2A orig
;
6658 struct svcctl_QueryServiceConfig2A tmp
;
6659 TALLOC_CTX
*out_mem_ctx
;
6660 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6663 static void rpccli_svcctl_QueryServiceConfig2A_done(struct tevent_req
*subreq
);
6665 struct tevent_req
*rpccli_svcctl_QueryServiceConfig2A_send(TALLOC_CTX
*mem_ctx
,
6666 struct tevent_context
*ev
,
6667 struct rpc_pipe_client
*cli
,
6668 struct policy_handle
*_handle
/* [in] [ref] */,
6669 enum svcctl_ConfigLevel _info_level
/* [in] */,
6670 uint8_t *_buffer
/* [out] */,
6671 uint32_t _offered
/* [in] */,
6672 uint32_t *_needed
/* [out] [ref] */)
6674 struct tevent_req
*req
;
6675 struct rpccli_svcctl_QueryServiceConfig2A_state
*state
;
6676 struct tevent_req
*subreq
;
6678 req
= tevent_req_create(mem_ctx
, &state
,
6679 struct rpccli_svcctl_QueryServiceConfig2A_state
);
6683 state
->out_mem_ctx
= NULL
;
6684 state
->dispatch_recv
= cli
->dispatch_recv
;
6687 state
->orig
.in
.handle
= _handle
;
6688 state
->orig
.in
.info_level
= _info_level
;
6689 state
->orig
.in
.offered
= _offered
;
6691 /* Out parameters */
6692 state
->orig
.out
.buffer
= _buffer
;
6693 state
->orig
.out
.needed
= _needed
;
6696 ZERO_STRUCT(state
->orig
.out
.result
);
6698 if (DEBUGLEVEL
>= 10) {
6699 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A
, &state
->orig
);
6702 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6703 "rpccli_svcctl_QueryServiceConfig2A_out_memory");
6704 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6705 return tevent_req_post(req
, ev
);
6708 /* make a temporary copy, that we pass to the dispatch function */
6709 state
->tmp
= state
->orig
;
6711 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6713 NDR_SVCCTL_QUERYSERVICECONFIG2A
,
6715 if (tevent_req_nomem(subreq
, req
)) {
6716 return tevent_req_post(req
, ev
);
6718 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfig2A_done
, req
);
6722 static void rpccli_svcctl_QueryServiceConfig2A_done(struct tevent_req
*subreq
)
6724 struct tevent_req
*req
= tevent_req_callback_data(
6725 subreq
, struct tevent_req
);
6726 struct rpccli_svcctl_QueryServiceConfig2A_state
*state
= tevent_req_data(
6727 req
, struct rpccli_svcctl_QueryServiceConfig2A_state
);
6729 TALLOC_CTX
*mem_ctx
;
6731 if (state
->out_mem_ctx
) {
6732 mem_ctx
= state
->out_mem_ctx
;
6737 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6738 TALLOC_FREE(subreq
);
6739 if (!NT_STATUS_IS_OK(status
)) {
6740 tevent_req_nterror(req
, status
);
6744 /* Copy out parameters */
6745 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.buffer
));
6746 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
6749 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6751 /* Reset temporary structure */
6752 ZERO_STRUCT(state
->tmp
);
6754 if (DEBUGLEVEL
>= 10) {
6755 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A
, &state
->orig
);
6758 tevent_req_done(req
);
6761 NTSTATUS
rpccli_svcctl_QueryServiceConfig2A_recv(struct tevent_req
*req
,
6762 TALLOC_CTX
*mem_ctx
,
6765 struct rpccli_svcctl_QueryServiceConfig2A_state
*state
= tevent_req_data(
6766 req
, struct rpccli_svcctl_QueryServiceConfig2A_state
);
6769 if (tevent_req_is_nterror(req
, &status
)) {
6770 tevent_req_received(req
);
6774 /* Steal possbile out parameters to the callers context */
6775 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6778 *result
= state
->orig
.out
.result
;
6780 tevent_req_received(req
);
6781 return NT_STATUS_OK
;
6784 NTSTATUS
rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client
*cli
,
6785 TALLOC_CTX
*mem_ctx
,
6786 struct policy_handle
*handle
/* [in] [ref] */,
6787 enum svcctl_ConfigLevel info_level
/* [in] */,
6788 uint8_t *buffer
/* [out] */,
6789 uint32_t offered
/* [in] */,
6790 uint32_t *needed
/* [out] [ref] */,
6793 struct svcctl_QueryServiceConfig2A r
;
6797 r
.in
.handle
= handle
;
6798 r
.in
.info_level
= info_level
;
6799 r
.in
.offered
= offered
;
6801 if (DEBUGLEVEL
>= 10) {
6802 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A
, &r
);
6805 status
= cli
->dispatch(cli
,
6808 NDR_SVCCTL_QUERYSERVICECONFIG2A
,
6811 if (!NT_STATUS_IS_OK(status
)) {
6815 if (DEBUGLEVEL
>= 10) {
6816 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A
, &r
);
6819 if (NT_STATUS_IS_ERR(status
)) {
6823 /* Return variables */
6824 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
6825 *needed
= *r
.out
.needed
;
6829 *werror
= r
.out
.result
;
6832 return werror_to_ntstatus(r
.out
.result
);
6835 struct rpccli_svcctl_QueryServiceConfig2W_state
{
6836 struct svcctl_QueryServiceConfig2W orig
;
6837 struct svcctl_QueryServiceConfig2W tmp
;
6838 TALLOC_CTX
*out_mem_ctx
;
6839 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
6842 static void rpccli_svcctl_QueryServiceConfig2W_done(struct tevent_req
*subreq
);
6844 struct tevent_req
*rpccli_svcctl_QueryServiceConfig2W_send(TALLOC_CTX
*mem_ctx
,
6845 struct tevent_context
*ev
,
6846 struct rpc_pipe_client
*cli
,
6847 struct policy_handle
*_handle
/* [in] [ref] */,
6848 enum svcctl_ConfigLevel _info_level
/* [in] */,
6849 uint8_t *_buffer
/* [out] [ref,size_is(offered)] */,
6850 uint32_t _offered
/* [in] [range(0,8192)] */,
6851 uint32_t *_needed
/* [out] [ref,range(0,8192)] */)
6853 struct tevent_req
*req
;
6854 struct rpccli_svcctl_QueryServiceConfig2W_state
*state
;
6855 struct tevent_req
*subreq
;
6857 req
= tevent_req_create(mem_ctx
, &state
,
6858 struct rpccli_svcctl_QueryServiceConfig2W_state
);
6862 state
->out_mem_ctx
= NULL
;
6863 state
->dispatch_recv
= cli
->dispatch_recv
;
6866 state
->orig
.in
.handle
= _handle
;
6867 state
->orig
.in
.info_level
= _info_level
;
6868 state
->orig
.in
.offered
= _offered
;
6870 /* Out parameters */
6871 state
->orig
.out
.buffer
= _buffer
;
6872 state
->orig
.out
.needed
= _needed
;
6875 ZERO_STRUCT(state
->orig
.out
.result
);
6877 if (DEBUGLEVEL
>= 10) {
6878 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W
, &state
->orig
);
6881 state
->out_mem_ctx
= talloc_named_const(state
, 0,
6882 "rpccli_svcctl_QueryServiceConfig2W_out_memory");
6883 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
6884 return tevent_req_post(req
, ev
);
6887 /* make a temporary copy, that we pass to the dispatch function */
6888 state
->tmp
= state
->orig
;
6890 subreq
= cli
->dispatch_send(state
, ev
, cli
,
6892 NDR_SVCCTL_QUERYSERVICECONFIG2W
,
6894 if (tevent_req_nomem(subreq
, req
)) {
6895 return tevent_req_post(req
, ev
);
6897 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceConfig2W_done
, req
);
6901 static void rpccli_svcctl_QueryServiceConfig2W_done(struct tevent_req
*subreq
)
6903 struct tevent_req
*req
= tevent_req_callback_data(
6904 subreq
, struct tevent_req
);
6905 struct rpccli_svcctl_QueryServiceConfig2W_state
*state
= tevent_req_data(
6906 req
, struct rpccli_svcctl_QueryServiceConfig2W_state
);
6908 TALLOC_CTX
*mem_ctx
;
6910 if (state
->out_mem_ctx
) {
6911 mem_ctx
= state
->out_mem_ctx
;
6916 status
= state
->dispatch_recv(subreq
, mem_ctx
);
6917 TALLOC_FREE(subreq
);
6918 if (!NT_STATUS_IS_OK(status
)) {
6919 tevent_req_nterror(req
, status
);
6923 /* Copy out parameters */
6924 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.buffer
));
6925 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
6928 state
->orig
.out
.result
= state
->tmp
.out
.result
;
6930 /* Reset temporary structure */
6931 ZERO_STRUCT(state
->tmp
);
6933 if (DEBUGLEVEL
>= 10) {
6934 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W
, &state
->orig
);
6937 tevent_req_done(req
);
6940 NTSTATUS
rpccli_svcctl_QueryServiceConfig2W_recv(struct tevent_req
*req
,
6941 TALLOC_CTX
*mem_ctx
,
6944 struct rpccli_svcctl_QueryServiceConfig2W_state
*state
= tevent_req_data(
6945 req
, struct rpccli_svcctl_QueryServiceConfig2W_state
);
6948 if (tevent_req_is_nterror(req
, &status
)) {
6949 tevent_req_received(req
);
6953 /* Steal possbile out parameters to the callers context */
6954 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
6957 *result
= state
->orig
.out
.result
;
6959 tevent_req_received(req
);
6960 return NT_STATUS_OK
;
6963 NTSTATUS
rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client
*cli
,
6964 TALLOC_CTX
*mem_ctx
,
6965 struct policy_handle
*handle
/* [in] [ref] */,
6966 enum svcctl_ConfigLevel info_level
/* [in] */,
6967 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
6968 uint32_t offered
/* [in] [range(0,8192)] */,
6969 uint32_t *needed
/* [out] [ref,range(0,8192)] */,
6972 struct svcctl_QueryServiceConfig2W r
;
6976 r
.in
.handle
= handle
;
6977 r
.in
.info_level
= info_level
;
6978 r
.in
.offered
= offered
;
6980 if (DEBUGLEVEL
>= 10) {
6981 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W
, &r
);
6984 status
= cli
->dispatch(cli
,
6987 NDR_SVCCTL_QUERYSERVICECONFIG2W
,
6990 if (!NT_STATUS_IS_OK(status
)) {
6994 if (DEBUGLEVEL
>= 10) {
6995 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W
, &r
);
6998 if (NT_STATUS_IS_ERR(status
)) {
7002 /* Return variables */
7003 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
7004 *needed
= *r
.out
.needed
;
7008 *werror
= r
.out
.result
;
7011 return werror_to_ntstatus(r
.out
.result
);
7014 struct rpccli_svcctl_QueryServiceStatusEx_state
{
7015 struct svcctl_QueryServiceStatusEx orig
;
7016 struct svcctl_QueryServiceStatusEx tmp
;
7017 TALLOC_CTX
*out_mem_ctx
;
7018 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7021 static void rpccli_svcctl_QueryServiceStatusEx_done(struct tevent_req
*subreq
);
7023 struct tevent_req
*rpccli_svcctl_QueryServiceStatusEx_send(TALLOC_CTX
*mem_ctx
,
7024 struct tevent_context
*ev
,
7025 struct rpc_pipe_client
*cli
,
7026 struct policy_handle
*_handle
/* [in] [ref] */,
7027 enum svcctl_StatusLevel _info_level
/* [in] */,
7028 uint8_t *_buffer
/* [out] [ref,size_is(offered)] */,
7029 uint32_t _offered
/* [in] [range(0,8192)] */,
7030 uint32_t *_needed
/* [out] [ref,range(0,8192)] */)
7032 struct tevent_req
*req
;
7033 struct rpccli_svcctl_QueryServiceStatusEx_state
*state
;
7034 struct tevent_req
*subreq
;
7036 req
= tevent_req_create(mem_ctx
, &state
,
7037 struct rpccli_svcctl_QueryServiceStatusEx_state
);
7041 state
->out_mem_ctx
= NULL
;
7042 state
->dispatch_recv
= cli
->dispatch_recv
;
7045 state
->orig
.in
.handle
= _handle
;
7046 state
->orig
.in
.info_level
= _info_level
;
7047 state
->orig
.in
.offered
= _offered
;
7049 /* Out parameters */
7050 state
->orig
.out
.buffer
= _buffer
;
7051 state
->orig
.out
.needed
= _needed
;
7054 ZERO_STRUCT(state
->orig
.out
.result
);
7056 if (DEBUGLEVEL
>= 10) {
7057 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx
, &state
->orig
);
7060 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7061 "rpccli_svcctl_QueryServiceStatusEx_out_memory");
7062 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7063 return tevent_req_post(req
, ev
);
7066 /* make a temporary copy, that we pass to the dispatch function */
7067 state
->tmp
= state
->orig
;
7069 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7071 NDR_SVCCTL_QUERYSERVICESTATUSEX
,
7073 if (tevent_req_nomem(subreq
, req
)) {
7074 return tevent_req_post(req
, ev
);
7076 tevent_req_set_callback(subreq
, rpccli_svcctl_QueryServiceStatusEx_done
, req
);
7080 static void rpccli_svcctl_QueryServiceStatusEx_done(struct tevent_req
*subreq
)
7082 struct tevent_req
*req
= tevent_req_callback_data(
7083 subreq
, struct tevent_req
);
7084 struct rpccli_svcctl_QueryServiceStatusEx_state
*state
= tevent_req_data(
7085 req
, struct rpccli_svcctl_QueryServiceStatusEx_state
);
7087 TALLOC_CTX
*mem_ctx
;
7089 if (state
->out_mem_ctx
) {
7090 mem_ctx
= state
->out_mem_ctx
;
7095 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7096 TALLOC_FREE(subreq
);
7097 if (!NT_STATUS_IS_OK(status
)) {
7098 tevent_req_nterror(req
, status
);
7102 /* Copy out parameters */
7103 memcpy(state
->orig
.out
.buffer
, state
->tmp
.out
.buffer
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.buffer
));
7104 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
7107 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7109 /* Reset temporary structure */
7110 ZERO_STRUCT(state
->tmp
);
7112 if (DEBUGLEVEL
>= 10) {
7113 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx
, &state
->orig
);
7116 tevent_req_done(req
);
7119 NTSTATUS
rpccli_svcctl_QueryServiceStatusEx_recv(struct tevent_req
*req
,
7120 TALLOC_CTX
*mem_ctx
,
7123 struct rpccli_svcctl_QueryServiceStatusEx_state
*state
= tevent_req_data(
7124 req
, struct rpccli_svcctl_QueryServiceStatusEx_state
);
7127 if (tevent_req_is_nterror(req
, &status
)) {
7128 tevent_req_received(req
);
7132 /* Steal possbile out parameters to the callers context */
7133 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7136 *result
= state
->orig
.out
.result
;
7138 tevent_req_received(req
);
7139 return NT_STATUS_OK
;
7142 NTSTATUS
rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client
*cli
,
7143 TALLOC_CTX
*mem_ctx
,
7144 struct policy_handle
*handle
/* [in] [ref] */,
7145 enum svcctl_StatusLevel info_level
/* [in] */,
7146 uint8_t *buffer
/* [out] [ref,size_is(offered)] */,
7147 uint32_t offered
/* [in] [range(0,8192)] */,
7148 uint32_t *needed
/* [out] [ref,range(0,8192)] */,
7151 struct svcctl_QueryServiceStatusEx r
;
7155 r
.in
.handle
= handle
;
7156 r
.in
.info_level
= info_level
;
7157 r
.in
.offered
= offered
;
7159 if (DEBUGLEVEL
>= 10) {
7160 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx
, &r
);
7163 status
= cli
->dispatch(cli
,
7166 NDR_SVCCTL_QUERYSERVICESTATUSEX
,
7169 if (!NT_STATUS_IS_OK(status
)) {
7173 if (DEBUGLEVEL
>= 10) {
7174 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx
, &r
);
7177 if (NT_STATUS_IS_ERR(status
)) {
7181 /* Return variables */
7182 memcpy(buffer
, r
.out
.buffer
, r
.in
.offered
* sizeof(*buffer
));
7183 *needed
= *r
.out
.needed
;
7187 *werror
= r
.out
.result
;
7190 return werror_to_ntstatus(r
.out
.result
);
7193 struct rpccli_EnumServicesStatusExA_state
{
7194 struct EnumServicesStatusExA orig
;
7195 struct EnumServicesStatusExA tmp
;
7196 TALLOC_CTX
*out_mem_ctx
;
7197 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7200 static void rpccli_EnumServicesStatusExA_done(struct tevent_req
*subreq
);
7202 struct tevent_req
*rpccli_EnumServicesStatusExA_send(TALLOC_CTX
*mem_ctx
,
7203 struct tevent_context
*ev
,
7204 struct rpc_pipe_client
*cli
,
7205 struct policy_handle
*_scmanager
/* [in] [ref] */,
7206 uint32_t _info_level
/* [in] */,
7207 uint32_t _type
/* [in] */,
7208 enum svcctl_ServiceState _state
/* [in] */,
7209 uint8_t *_services
/* [out] */,
7210 uint32_t _offered
/* [in] */,
7211 uint32_t *_needed
/* [out] [ref] */,
7212 uint32_t *_service_returned
/* [out] [ref] */,
7213 uint32_t *_resume_handle
/* [in,out] [unique] */,
7214 const char **_group_name
/* [out] [ref,charset(UTF16)] */)
7216 struct tevent_req
*req
;
7217 struct rpccli_EnumServicesStatusExA_state
*state
;
7218 struct tevent_req
*subreq
;
7220 req
= tevent_req_create(mem_ctx
, &state
,
7221 struct rpccli_EnumServicesStatusExA_state
);
7225 state
->out_mem_ctx
= NULL
;
7226 state
->dispatch_recv
= cli
->dispatch_recv
;
7229 state
->orig
.in
.scmanager
= _scmanager
;
7230 state
->orig
.in
.info_level
= _info_level
;
7231 state
->orig
.in
.type
= _type
;
7232 state
->orig
.in
.state
= _state
;
7233 state
->orig
.in
.offered
= _offered
;
7234 state
->orig
.in
.resume_handle
= _resume_handle
;
7236 /* Out parameters */
7237 state
->orig
.out
.services
= _services
;
7238 state
->orig
.out
.needed
= _needed
;
7239 state
->orig
.out
.service_returned
= _service_returned
;
7240 state
->orig
.out
.resume_handle
= _resume_handle
;
7241 state
->orig
.out
.group_name
= _group_name
;
7244 ZERO_STRUCT(state
->orig
.out
.result
);
7246 if (DEBUGLEVEL
>= 10) {
7247 NDR_PRINT_IN_DEBUG(EnumServicesStatusExA
, &state
->orig
);
7250 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7251 "rpccli_EnumServicesStatusExA_out_memory");
7252 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7253 return tevent_req_post(req
, ev
);
7256 /* make a temporary copy, that we pass to the dispatch function */
7257 state
->tmp
= state
->orig
;
7259 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7261 NDR_ENUMSERVICESSTATUSEXA
,
7263 if (tevent_req_nomem(subreq
, req
)) {
7264 return tevent_req_post(req
, ev
);
7266 tevent_req_set_callback(subreq
, rpccli_EnumServicesStatusExA_done
, req
);
7270 static void rpccli_EnumServicesStatusExA_done(struct tevent_req
*subreq
)
7272 struct tevent_req
*req
= tevent_req_callback_data(
7273 subreq
, struct tevent_req
);
7274 struct rpccli_EnumServicesStatusExA_state
*state
= tevent_req_data(
7275 req
, struct rpccli_EnumServicesStatusExA_state
);
7277 TALLOC_CTX
*mem_ctx
;
7279 if (state
->out_mem_ctx
) {
7280 mem_ctx
= state
->out_mem_ctx
;
7285 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7286 TALLOC_FREE(subreq
);
7287 if (!NT_STATUS_IS_OK(status
)) {
7288 tevent_req_nterror(req
, status
);
7292 /* Copy out parameters */
7293 memcpy(state
->orig
.out
.services
, state
->tmp
.out
.services
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.services
));
7294 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
7295 *state
->orig
.out
.service_returned
= *state
->tmp
.out
.service_returned
;
7296 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
7297 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
7299 *state
->orig
.out
.group_name
= *state
->tmp
.out
.group_name
;
7302 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7304 /* Reset temporary structure */
7305 ZERO_STRUCT(state
->tmp
);
7307 if (DEBUGLEVEL
>= 10) {
7308 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA
, &state
->orig
);
7311 tevent_req_done(req
);
7314 NTSTATUS
rpccli_EnumServicesStatusExA_recv(struct tevent_req
*req
,
7315 TALLOC_CTX
*mem_ctx
,
7318 struct rpccli_EnumServicesStatusExA_state
*state
= tevent_req_data(
7319 req
, struct rpccli_EnumServicesStatusExA_state
);
7322 if (tevent_req_is_nterror(req
, &status
)) {
7323 tevent_req_received(req
);
7327 /* Steal possbile out parameters to the callers context */
7328 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7331 *result
= state
->orig
.out
.result
;
7333 tevent_req_received(req
);
7334 return NT_STATUS_OK
;
7337 NTSTATUS
rpccli_EnumServicesStatusExA(struct rpc_pipe_client
*cli
,
7338 TALLOC_CTX
*mem_ctx
,
7339 struct policy_handle
*scmanager
/* [in] [ref] */,
7340 uint32_t info_level
/* [in] */,
7341 uint32_t type
/* [in] */,
7342 enum svcctl_ServiceState state
/* [in] */,
7343 uint8_t *services
/* [out] */,
7344 uint32_t offered
/* [in] */,
7345 uint32_t *needed
/* [out] [ref] */,
7346 uint32_t *service_returned
/* [out] [ref] */,
7347 uint32_t *resume_handle
/* [in,out] [unique] */,
7348 const char **group_name
/* [out] [ref,charset(UTF16)] */,
7351 struct EnumServicesStatusExA r
;
7355 r
.in
.scmanager
= scmanager
;
7356 r
.in
.info_level
= info_level
;
7359 r
.in
.offered
= offered
;
7360 r
.in
.resume_handle
= resume_handle
;
7362 if (DEBUGLEVEL
>= 10) {
7363 NDR_PRINT_IN_DEBUG(EnumServicesStatusExA
, &r
);
7366 status
= cli
->dispatch(cli
,
7369 NDR_ENUMSERVICESSTATUSEXA
,
7372 if (!NT_STATUS_IS_OK(status
)) {
7376 if (DEBUGLEVEL
>= 10) {
7377 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA
, &r
);
7380 if (NT_STATUS_IS_ERR(status
)) {
7384 /* Return variables */
7385 memcpy(services
, r
.out
.services
, r
.in
.offered
* sizeof(*services
));
7386 *needed
= *r
.out
.needed
;
7387 *service_returned
= *r
.out
.service_returned
;
7388 if (resume_handle
&& r
.out
.resume_handle
) {
7389 *resume_handle
= *r
.out
.resume_handle
;
7391 *group_name
= *r
.out
.group_name
;
7395 *werror
= r
.out
.result
;
7398 return werror_to_ntstatus(r
.out
.result
);
7401 struct rpccli_EnumServicesStatusExW_state
{
7402 struct EnumServicesStatusExW orig
;
7403 struct EnumServicesStatusExW tmp
;
7404 TALLOC_CTX
*out_mem_ctx
;
7405 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7408 static void rpccli_EnumServicesStatusExW_done(struct tevent_req
*subreq
);
7410 struct tevent_req
*rpccli_EnumServicesStatusExW_send(TALLOC_CTX
*mem_ctx
,
7411 struct tevent_context
*ev
,
7412 struct rpc_pipe_client
*cli
,
7413 struct policy_handle
*_scmanager
/* [in] [ref] */,
7414 uint32_t _info_level
/* [in] */,
7415 uint32_t _type
/* [in] */,
7416 enum svcctl_ServiceState _state
/* [in] */,
7417 uint8_t *_services
/* [out] [ref,size_is(offered)] */,
7418 uint32_t _offered
/* [in] [range(0,0x40000)] */,
7419 uint32_t *_needed
/* [out] [ref,range(0,0x40000)] */,
7420 uint32_t *_service_returned
/* [out] [ref,range(0,0x40000)] */,
7421 uint32_t *_resume_handle
/* [in,out] [unique,range(0,0x40000)] */,
7422 const char *_group_name
/* [in] [unique,charset(UTF16)] */)
7424 struct tevent_req
*req
;
7425 struct rpccli_EnumServicesStatusExW_state
*state
;
7426 struct tevent_req
*subreq
;
7428 req
= tevent_req_create(mem_ctx
, &state
,
7429 struct rpccli_EnumServicesStatusExW_state
);
7433 state
->out_mem_ctx
= NULL
;
7434 state
->dispatch_recv
= cli
->dispatch_recv
;
7437 state
->orig
.in
.scmanager
= _scmanager
;
7438 state
->orig
.in
.info_level
= _info_level
;
7439 state
->orig
.in
.type
= _type
;
7440 state
->orig
.in
.state
= _state
;
7441 state
->orig
.in
.offered
= _offered
;
7442 state
->orig
.in
.resume_handle
= _resume_handle
;
7443 state
->orig
.in
.group_name
= _group_name
;
7445 /* Out parameters */
7446 state
->orig
.out
.services
= _services
;
7447 state
->orig
.out
.needed
= _needed
;
7448 state
->orig
.out
.service_returned
= _service_returned
;
7449 state
->orig
.out
.resume_handle
= _resume_handle
;
7452 ZERO_STRUCT(state
->orig
.out
.result
);
7454 if (DEBUGLEVEL
>= 10) {
7455 NDR_PRINT_IN_DEBUG(EnumServicesStatusExW
, &state
->orig
);
7458 state
->out_mem_ctx
= talloc_named_const(state
, 0,
7459 "rpccli_EnumServicesStatusExW_out_memory");
7460 if (tevent_req_nomem(state
->out_mem_ctx
, req
)) {
7461 return tevent_req_post(req
, ev
);
7464 /* make a temporary copy, that we pass to the dispatch function */
7465 state
->tmp
= state
->orig
;
7467 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7469 NDR_ENUMSERVICESSTATUSEXW
,
7471 if (tevent_req_nomem(subreq
, req
)) {
7472 return tevent_req_post(req
, ev
);
7474 tevent_req_set_callback(subreq
, rpccli_EnumServicesStatusExW_done
, req
);
7478 static void rpccli_EnumServicesStatusExW_done(struct tevent_req
*subreq
)
7480 struct tevent_req
*req
= tevent_req_callback_data(
7481 subreq
, struct tevent_req
);
7482 struct rpccli_EnumServicesStatusExW_state
*state
= tevent_req_data(
7483 req
, struct rpccli_EnumServicesStatusExW_state
);
7485 TALLOC_CTX
*mem_ctx
;
7487 if (state
->out_mem_ctx
) {
7488 mem_ctx
= state
->out_mem_ctx
;
7493 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7494 TALLOC_FREE(subreq
);
7495 if (!NT_STATUS_IS_OK(status
)) {
7496 tevent_req_nterror(req
, status
);
7500 /* Copy out parameters */
7501 memcpy(state
->orig
.out
.services
, state
->tmp
.out
.services
, state
->tmp
.in
.offered
* sizeof(*state
->orig
.out
.services
));
7502 *state
->orig
.out
.needed
= *state
->tmp
.out
.needed
;
7503 *state
->orig
.out
.service_returned
= *state
->tmp
.out
.service_returned
;
7504 if (state
->orig
.out
.resume_handle
&& state
->tmp
.out
.resume_handle
) {
7505 *state
->orig
.out
.resume_handle
= *state
->tmp
.out
.resume_handle
;
7509 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7511 /* Reset temporary structure */
7512 ZERO_STRUCT(state
->tmp
);
7514 if (DEBUGLEVEL
>= 10) {
7515 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW
, &state
->orig
);
7518 tevent_req_done(req
);
7521 NTSTATUS
rpccli_EnumServicesStatusExW_recv(struct tevent_req
*req
,
7522 TALLOC_CTX
*mem_ctx
,
7525 struct rpccli_EnumServicesStatusExW_state
*state
= tevent_req_data(
7526 req
, struct rpccli_EnumServicesStatusExW_state
);
7529 if (tevent_req_is_nterror(req
, &status
)) {
7530 tevent_req_received(req
);
7534 /* Steal possbile out parameters to the callers context */
7535 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7538 *result
= state
->orig
.out
.result
;
7540 tevent_req_received(req
);
7541 return NT_STATUS_OK
;
7544 NTSTATUS
rpccli_EnumServicesStatusExW(struct rpc_pipe_client
*cli
,
7545 TALLOC_CTX
*mem_ctx
,
7546 struct policy_handle
*scmanager
/* [in] [ref] */,
7547 uint32_t info_level
/* [in] */,
7548 uint32_t type
/* [in] */,
7549 enum svcctl_ServiceState state
/* [in] */,
7550 uint8_t *services
/* [out] [ref,size_is(offered)] */,
7551 uint32_t offered
/* [in] [range(0,0x40000)] */,
7552 uint32_t *needed
/* [out] [ref,range(0,0x40000)] */,
7553 uint32_t *service_returned
/* [out] [ref,range(0,0x40000)] */,
7554 uint32_t *resume_handle
/* [in,out] [unique,range(0,0x40000)] */,
7555 const char *group_name
/* [in] [unique,charset(UTF16)] */,
7558 struct EnumServicesStatusExW r
;
7562 r
.in
.scmanager
= scmanager
;
7563 r
.in
.info_level
= info_level
;
7566 r
.in
.offered
= offered
;
7567 r
.in
.resume_handle
= resume_handle
;
7568 r
.in
.group_name
= group_name
;
7570 if (DEBUGLEVEL
>= 10) {
7571 NDR_PRINT_IN_DEBUG(EnumServicesStatusExW
, &r
);
7574 status
= cli
->dispatch(cli
,
7577 NDR_ENUMSERVICESSTATUSEXW
,
7580 if (!NT_STATUS_IS_OK(status
)) {
7584 if (DEBUGLEVEL
>= 10) {
7585 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW
, &r
);
7588 if (NT_STATUS_IS_ERR(status
)) {
7592 /* Return variables */
7593 memcpy(services
, r
.out
.services
, r
.in
.offered
* sizeof(*services
));
7594 *needed
= *r
.out
.needed
;
7595 *service_returned
= *r
.out
.service_returned
;
7596 if (resume_handle
&& r
.out
.resume_handle
) {
7597 *resume_handle
= *r
.out
.resume_handle
;
7602 *werror
= r
.out
.result
;
7605 return werror_to_ntstatus(r
.out
.result
);
7608 struct rpccli_svcctl_SCSendTSMessage_state
{
7609 struct svcctl_SCSendTSMessage orig
;
7610 struct svcctl_SCSendTSMessage tmp
;
7611 TALLOC_CTX
*out_mem_ctx
;
7612 NTSTATUS (*dispatch_recv
)(struct tevent_req
*req
, TALLOC_CTX
*mem_ctx
);
7615 static void rpccli_svcctl_SCSendTSMessage_done(struct tevent_req
*subreq
);
7617 struct tevent_req
*rpccli_svcctl_SCSendTSMessage_send(TALLOC_CTX
*mem_ctx
,
7618 struct tevent_context
*ev
,
7619 struct rpc_pipe_client
*cli
)
7621 struct tevent_req
*req
;
7622 struct rpccli_svcctl_SCSendTSMessage_state
*state
;
7623 struct tevent_req
*subreq
;
7625 req
= tevent_req_create(mem_ctx
, &state
,
7626 struct rpccli_svcctl_SCSendTSMessage_state
);
7630 state
->out_mem_ctx
= NULL
;
7631 state
->dispatch_recv
= cli
->dispatch_recv
;
7635 /* Out parameters */
7638 ZERO_STRUCT(state
->orig
.out
.result
);
7640 if (DEBUGLEVEL
>= 10) {
7641 NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage
, &state
->orig
);
7644 /* make a temporary copy, that we pass to the dispatch function */
7645 state
->tmp
= state
->orig
;
7647 subreq
= cli
->dispatch_send(state
, ev
, cli
,
7649 NDR_SVCCTL_SCSENDTSMESSAGE
,
7651 if (tevent_req_nomem(subreq
, req
)) {
7652 return tevent_req_post(req
, ev
);
7654 tevent_req_set_callback(subreq
, rpccli_svcctl_SCSendTSMessage_done
, req
);
7658 static void rpccli_svcctl_SCSendTSMessage_done(struct tevent_req
*subreq
)
7660 struct tevent_req
*req
= tevent_req_callback_data(
7661 subreq
, struct tevent_req
);
7662 struct rpccli_svcctl_SCSendTSMessage_state
*state
= tevent_req_data(
7663 req
, struct rpccli_svcctl_SCSendTSMessage_state
);
7665 TALLOC_CTX
*mem_ctx
;
7667 if (state
->out_mem_ctx
) {
7668 mem_ctx
= state
->out_mem_ctx
;
7673 status
= state
->dispatch_recv(subreq
, mem_ctx
);
7674 TALLOC_FREE(subreq
);
7675 if (!NT_STATUS_IS_OK(status
)) {
7676 tevent_req_nterror(req
, status
);
7680 /* Copy out parameters */
7683 state
->orig
.out
.result
= state
->tmp
.out
.result
;
7685 /* Reset temporary structure */
7686 ZERO_STRUCT(state
->tmp
);
7688 if (DEBUGLEVEL
>= 10) {
7689 NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage
, &state
->orig
);
7692 tevent_req_done(req
);
7695 NTSTATUS
rpccli_svcctl_SCSendTSMessage_recv(struct tevent_req
*req
,
7696 TALLOC_CTX
*mem_ctx
,
7699 struct rpccli_svcctl_SCSendTSMessage_state
*state
= tevent_req_data(
7700 req
, struct rpccli_svcctl_SCSendTSMessage_state
);
7703 if (tevent_req_is_nterror(req
, &status
)) {
7704 tevent_req_received(req
);
7708 /* Steal possbile out parameters to the callers context */
7709 talloc_steal(mem_ctx
, state
->out_mem_ctx
);
7712 *result
= state
->orig
.out
.result
;
7714 tevent_req_received(req
);
7715 return NT_STATUS_OK
;
7718 NTSTATUS
rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client
*cli
,
7719 TALLOC_CTX
*mem_ctx
,
7722 struct svcctl_SCSendTSMessage r
;
7727 if (DEBUGLEVEL
>= 10) {
7728 NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage
, &r
);
7731 status
= cli
->dispatch(cli
,
7734 NDR_SVCCTL_SCSENDTSMESSAGE
,
7737 if (!NT_STATUS_IS_OK(status
)) {
7741 if (DEBUGLEVEL
>= 10) {
7742 NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage
, &r
);
7745 if (NT_STATUS_IS_ERR(status
)) {
7749 /* Return variables */
7753 *werror
= r
.out
.result
;
7756 return werror_to_ntstatus(r
.out
.result
);