2 * Unix SMB/CIFS implementation.
3 * client auto-generated by pidl. DO NOT MODIFY!
7 #include "librpc/gen_ndr/cli_svcctl.h"
9 NTSTATUS
rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
)
11 struct svcctl_CloseServiceHandle r
;
18 NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle
, &r
);
20 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CLOSESERVICEHANDLE
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_CloseServiceHandle
, (ndr_push_flags_fn_t
)ndr_push_svcctl_CloseServiceHandle
);
22 if (!NT_STATUS_IS_OK(status
)) {
27 NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle
, &r
);
29 if (NT_STATUS_IS_ERR(status
)) {
33 /* Return variables */
34 *handle
= *r
.out
.handle
;
37 return werror_to_ntstatus(r
.out
.result
);
40 NTSTATUS
rpccli_svcctl_ControlService(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t control
, struct SERVICE_STATUS
*service_status
)
42 struct svcctl_ControlService r
;
47 r
.in
.control
= control
;
50 NDR_PRINT_IN_DEBUG(svcctl_ControlService
, &r
);
52 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CONTROLSERVICE
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_ControlService
, (ndr_push_flags_fn_t
)ndr_push_svcctl_ControlService
);
54 if (!NT_STATUS_IS_OK(status
)) {
59 NDR_PRINT_OUT_DEBUG(svcctl_ControlService
, &r
);
61 if (NT_STATUS_IS_ERR(status
)) {
65 /* Return variables */
66 *service_status
= *r
.out
.service_status
;
69 return werror_to_ntstatus(r
.out
.result
);
72 NTSTATUS
rpccli_svcctl_DeleteService(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
)
74 struct svcctl_DeleteService r
;
81 NDR_PRINT_IN_DEBUG(svcctl_DeleteService
, &r
);
83 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_DELETESERVICE
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_DeleteService
, (ndr_push_flags_fn_t
)ndr_push_svcctl_DeleteService
);
85 if (!NT_STATUS_IS_OK(status
)) {
90 NDR_PRINT_OUT_DEBUG(svcctl_DeleteService
, &r
);
92 if (NT_STATUS_IS_ERR(status
)) {
96 /* Return variables */
99 return werror_to_ntstatus(r
.out
.result
);
102 NTSTATUS
rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, struct policy_handle
*lock
)
104 struct svcctl_LockServiceDatabase r
;
108 r
.in
.handle
= handle
;
110 if (DEBUGLEVEL
>= 10)
111 NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase
, &r
);
113 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_LOCKSERVICEDATABASE
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_LockServiceDatabase
, (ndr_push_flags_fn_t
)ndr_push_svcctl_LockServiceDatabase
);
115 if (!NT_STATUS_IS_OK(status
)) {
119 if (DEBUGLEVEL
>= 10)
120 NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase
, &r
);
122 if (NT_STATUS_IS_ERR(status
)) {
126 /* Return variables */
130 return werror_to_ntstatus(r
.out
.result
);
133 NTSTATUS
rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
)
135 struct svcctl_QueryServiceObjectSecurity r
;
140 if (DEBUGLEVEL
>= 10)
141 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity
, &r
);
143 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceObjectSecurity
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceObjectSecurity
);
145 if (!NT_STATUS_IS_OK(status
)) {
149 if (DEBUGLEVEL
>= 10)
150 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity
, &r
);
152 if (NT_STATUS_IS_ERR(status
)) {
156 /* Return variables */
159 return werror_to_ntstatus(r
.out
.result
);
162 NTSTATUS
rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
)
164 struct svcctl_SetServiceObjectSecurity r
;
169 if (DEBUGLEVEL
>= 10)
170 NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity
, &r
);
172 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_SetServiceObjectSecurity
, (ndr_push_flags_fn_t
)ndr_push_svcctl_SetServiceObjectSecurity
);
174 if (!NT_STATUS_IS_OK(status
)) {
178 if (DEBUGLEVEL
>= 10)
179 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity
, &r
);
181 if (NT_STATUS_IS_ERR(status
)) {
185 /* Return variables */
188 return werror_to_ntstatus(r
.out
.result
);
191 NTSTATUS
rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, struct SERVICE_STATUS
*service_status
)
193 struct svcctl_QueryServiceStatus r
;
197 r
.in
.handle
= handle
;
199 if (DEBUGLEVEL
>= 10)
200 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus
, &r
);
202 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICESTATUS
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceStatus
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceStatus
);
204 if (!NT_STATUS_IS_OK(status
)) {
208 if (DEBUGLEVEL
>= 10)
209 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus
, &r
);
211 if (NT_STATUS_IS_ERR(status
)) {
215 /* Return variables */
216 *service_status
= *r
.out
.service_status
;
219 return werror_to_ntstatus(r
.out
.result
);
222 NTSTATUS
rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
)
224 struct svcctl_SetServiceStatus r
;
229 if (DEBUGLEVEL
>= 10)
230 NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus
, &r
);
232 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_SETSERVICESTATUS
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_SetServiceStatus
, (ndr_push_flags_fn_t
)ndr_push_svcctl_SetServiceStatus
);
234 if (!NT_STATUS_IS_OK(status
)) {
238 if (DEBUGLEVEL
>= 10)
239 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus
, &r
);
241 if (NT_STATUS_IS_ERR(status
)) {
245 /* Return variables */
248 return werror_to_ntstatus(r
.out
.result
);
251 NTSTATUS
rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*lock
)
253 struct svcctl_UnlockServiceDatabase r
;
259 if (DEBUGLEVEL
>= 10)
260 NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase
, &r
);
262 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_UNLOCKSERVICEDATABASE
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_UnlockServiceDatabase
, (ndr_push_flags_fn_t
)ndr_push_svcctl_UnlockServiceDatabase
);
264 if (!NT_STATUS_IS_OK(status
)) {
268 if (DEBUGLEVEL
>= 10)
269 NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase
, &r
);
271 if (NT_STATUS_IS_ERR(status
)) {
275 /* Return variables */
279 return werror_to_ntstatus(r
.out
.result
);
282 NTSTATUS
rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
)
284 struct svcctl_NotifyBootConfigStatus r
;
289 if (DEBUGLEVEL
>= 10)
290 NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus
, &r
);
292 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_NotifyBootConfigStatus
, (ndr_push_flags_fn_t
)ndr_push_svcctl_NotifyBootConfigStatus
);
294 if (!NT_STATUS_IS_OK(status
)) {
298 if (DEBUGLEVEL
>= 10)
299 NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus
, &r
);
301 if (NT_STATUS_IS_ERR(status
)) {
305 /* Return variables */
308 return werror_to_ntstatus(r
.out
.result
);
311 NTSTATUS
rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t bits
, uint32_t bitson
, uint32_t immediate
)
313 struct svcctl_SCSetServiceBitsW r
;
317 r
.in
.handle
= handle
;
319 r
.in
.bitson
= bitson
;
320 r
.in
.immediate
= immediate
;
322 if (DEBUGLEVEL
>= 10)
323 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW
, &r
);
325 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_SCSETSERVICEBITSW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_SCSetServiceBitsW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_SCSetServiceBitsW
);
327 if (!NT_STATUS_IS_OK(status
)) {
331 if (DEBUGLEVEL
>= 10)
332 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW
, &r
);
334 if (NT_STATUS_IS_ERR(status
)) {
338 /* Return variables */
341 return werror_to_ntstatus(r
.out
.result
);
344 NTSTATUS
rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t type
, uint32_t start
, uint32_t error
, const char *binary_path
, const char *load_order_group
, uint32_t *tag_id
, const char *dependencies
, const char *service_start_name
, const char *password
, const char *display_name
)
346 struct svcctl_ChangeServiceConfigW r
;
350 r
.in
.handle
= handle
;
354 r
.in
.binary_path
= binary_path
;
355 r
.in
.load_order_group
= load_order_group
;
356 r
.in
.dependencies
= dependencies
;
357 r
.in
.service_start_name
= service_start_name
;
358 r
.in
.password
= password
;
359 r
.in
.display_name
= display_name
;
361 if (DEBUGLEVEL
>= 10)
362 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW
, &r
);
364 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CHANGESERVICECONFIGW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_ChangeServiceConfigW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_ChangeServiceConfigW
);
366 if (!NT_STATUS_IS_OK(status
)) {
370 if (DEBUGLEVEL
>= 10)
371 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW
, &r
);
373 if (NT_STATUS_IS_ERR(status
)) {
377 /* Return variables */
378 *tag_id
= *r
.out
.tag_id
;
381 return werror_to_ntstatus(r
.out
.result
);
384 NTSTATUS
rpccli_svcctl_CreateServiceW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*scmanager_handle
, const char *ServiceName
, const char *DisplayName
, uint32_t desired_access
, uint32_t type
, uint32_t start_type
, uint32_t error_control
, const char *binary_path
, const char *LoadOrderGroupKey
, uint32_t *TagId
, uint8_t *dependencies
, uint32_t dependencies_size
, const char *service_start_name
, uint8_t *password
, uint32_t password_size
, struct policy_handle
*handle
)
386 struct svcctl_CreateServiceW r
;
390 r
.in
.scmanager_handle
= scmanager_handle
;
391 r
.in
.ServiceName
= ServiceName
;
392 r
.in
.DisplayName
= DisplayName
;
393 r
.in
.desired_access
= desired_access
;
395 r
.in
.start_type
= start_type
;
396 r
.in
.error_control
= error_control
;
397 r
.in
.binary_path
= binary_path
;
398 r
.in
.LoadOrderGroupKey
= LoadOrderGroupKey
;
400 r
.in
.dependencies
= dependencies
;
401 r
.in
.dependencies_size
= dependencies_size
;
402 r
.in
.service_start_name
= service_start_name
;
403 r
.in
.password
= password
;
404 r
.in
.password_size
= password_size
;
406 if (DEBUGLEVEL
>= 10)
407 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW
, &r
);
409 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CREATESERVICEW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_CreateServiceW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_CreateServiceW
);
411 if (!NT_STATUS_IS_OK(status
)) {
415 if (DEBUGLEVEL
>= 10)
416 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW
, &r
);
418 if (NT_STATUS_IS_ERR(status
)) {
422 /* Return variables */
424 *TagId
= *r
.out
.TagId
;
426 *handle
= *r
.out
.handle
;
429 return werror_to_ntstatus(r
.out
.result
);
432 NTSTATUS
rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*service
, uint32_t state
, struct ENUM_SERVICE_STATUS
*service_status
, uint32_t buf_size
, uint32_t *bytes_needed
, uint32_t *services_returned
)
434 struct svcctl_EnumDependentServicesW r
;
438 r
.in
.service
= service
;
440 r
.in
.buf_size
= buf_size
;
442 if (DEBUGLEVEL
>= 10)
443 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW
, &r
);
445 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_EnumDependentServicesW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_EnumDependentServicesW
);
447 if (!NT_STATUS_IS_OK(status
)) {
451 if (DEBUGLEVEL
>= 10)
452 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW
, &r
);
454 if (NT_STATUS_IS_ERR(status
)) {
458 /* Return variables */
459 if ( service_status
) {
460 *service_status
= *r
.out
.service_status
;
462 *bytes_needed
= *r
.out
.bytes_needed
;
463 *services_returned
= *r
.out
.services_returned
;
466 return werror_to_ntstatus(r
.out
.result
);
469 NTSTATUS
rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t type
, uint32_t state
, uint32_t buf_size
, uint8_t *service
, uint32_t *bytes_needed
, uint32_t *services_returned
, uint32_t *resume_handle
)
471 struct svcctl_EnumServicesStatusW r
;
475 r
.in
.handle
= handle
;
478 r
.in
.buf_size
= buf_size
;
479 r
.in
.resume_handle
= resume_handle
;
481 if (DEBUGLEVEL
>= 10)
482 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW
, &r
);
484 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_ENUMSERVICESSTATUSW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_EnumServicesStatusW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_EnumServicesStatusW
);
486 if (!NT_STATUS_IS_OK(status
)) {
490 if (DEBUGLEVEL
>= 10)
491 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW
, &r
);
493 if (NT_STATUS_IS_ERR(status
)) {
497 /* Return variables */
498 memcpy(service
, r
.out
.service
, r
.in
.buf_size
);
499 *bytes_needed
= *r
.out
.bytes_needed
;
500 *services_returned
= *r
.out
.services_returned
;
501 if ( resume_handle
) {
502 *resume_handle
= *r
.out
.resume_handle
;
506 return werror_to_ntstatus(r
.out
.result
);
509 NTSTATUS
rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const char *MachineName
, const char *DatabaseName
, uint32_t access_mask
, struct policy_handle
*handle
)
511 struct svcctl_OpenSCManagerW r
;
515 r
.in
.MachineName
= MachineName
;
516 r
.in
.DatabaseName
= DatabaseName
;
517 r
.in
.access_mask
= access_mask
;
519 if (DEBUGLEVEL
>= 10)
520 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW
, &r
);
522 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_OPENSCMANAGERW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_OpenSCManagerW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_OpenSCManagerW
);
524 if (!NT_STATUS_IS_OK(status
)) {
528 if (DEBUGLEVEL
>= 10)
529 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW
, &r
);
531 if (NT_STATUS_IS_ERR(status
)) {
535 /* Return variables */
536 *handle
= *r
.out
.handle
;
539 return werror_to_ntstatus(r
.out
.result
);
542 NTSTATUS
rpccli_svcctl_OpenServiceW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*scmanager_handle
, const char *ServiceName
, uint32_t access_mask
, struct policy_handle
*handle
)
544 struct svcctl_OpenServiceW r
;
548 r
.in
.scmanager_handle
= scmanager_handle
;
549 r
.in
.ServiceName
= ServiceName
;
550 r
.in
.access_mask
= access_mask
;
552 if (DEBUGLEVEL
>= 10)
553 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW
, &r
);
555 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_OPENSERVICEW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_OpenServiceW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_OpenServiceW
);
557 if (!NT_STATUS_IS_OK(status
)) {
561 if (DEBUGLEVEL
>= 10)
562 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW
, &r
);
564 if (NT_STATUS_IS_ERR(status
)) {
568 /* Return variables */
569 *handle
= *r
.out
.handle
;
572 return werror_to_ntstatus(r
.out
.result
);
575 NTSTATUS
rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint8_t *query
, uint32_t buf_size
, uint32_t *bytes_needed
)
577 struct svcctl_QueryServiceConfigW r
;
581 r
.in
.handle
= handle
;
582 r
.in
.buf_size
= buf_size
;
584 if (DEBUGLEVEL
>= 10)
585 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW
, &r
);
587 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICECONFIGW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceConfigW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceConfigW
);
589 if (!NT_STATUS_IS_OK(status
)) {
593 if (DEBUGLEVEL
>= 10)
594 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW
, &r
);
596 if (NT_STATUS_IS_ERR(status
)) {
600 /* Return variables */
601 memcpy(query
, r
.out
.query
, r
.in
.buf_size
);
602 *bytes_needed
= *r
.out
.bytes_needed
;
605 return werror_to_ntstatus(r
.out
.result
);
608 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t buf_size
, struct SERVICE_LOCK_STATUS
*lock_status
, uint32_t *required_buf_size
)
610 struct svcctl_QueryServiceLockStatusW r
;
614 r
.in
.handle
= handle
;
615 r
.in
.buf_size
= buf_size
;
617 if (DEBUGLEVEL
>= 10)
618 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW
, &r
);
620 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceLockStatusW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceLockStatusW
);
622 if (!NT_STATUS_IS_OK(status
)) {
626 if (DEBUGLEVEL
>= 10)
627 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW
, &r
);
629 if (NT_STATUS_IS_ERR(status
)) {
633 /* Return variables */
634 *lock_status
= *r
.out
.lock_status
;
635 *required_buf_size
= *r
.out
.required_buf_size
;
638 return werror_to_ntstatus(r
.out
.result
);
641 NTSTATUS
rpccli_svcctl_StartServiceW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t NumArgs
, const char *Arguments
)
643 struct svcctl_StartServiceW r
;
647 r
.in
.handle
= handle
;
648 r
.in
.NumArgs
= NumArgs
;
649 r
.in
.Arguments
= Arguments
;
651 if (DEBUGLEVEL
>= 10)
652 NDR_PRINT_IN_DEBUG(svcctl_StartServiceW
, &r
);
654 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_STARTSERVICEW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_StartServiceW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_StartServiceW
);
656 if (!NT_STATUS_IS_OK(status
)) {
660 if (DEBUGLEVEL
>= 10)
661 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW
, &r
);
663 if (NT_STATUS_IS_ERR(status
)) {
667 /* Return variables */
670 return werror_to_ntstatus(r
.out
.result
);
673 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, const char *service_name
, const char **display_name
, uint32_t *display_name_length
)
675 struct svcctl_GetServiceDisplayNameW r
;
679 r
.in
.handle
= handle
;
680 r
.in
.service_name
= service_name
;
681 r
.in
.display_name_length
= display_name_length
;
683 if (DEBUGLEVEL
>= 10)
684 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW
, &r
);
686 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_GetServiceDisplayNameW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_GetServiceDisplayNameW
);
688 if (!NT_STATUS_IS_OK(status
)) {
692 if (DEBUGLEVEL
>= 10)
693 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW
, &r
);
695 if (NT_STATUS_IS_ERR(status
)) {
699 /* Return variables */
700 *display_name
= *r
.out
.display_name
;
701 if ( display_name_length
) {
702 *display_name_length
= *r
.out
.display_name_length
;
706 return werror_to_ntstatus(r
.out
.result
);
709 NTSTATUS
rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, const char *service_name
, const char **key_name
, uint32_t *display_name_length
)
711 struct svcctl_GetServiceKeyNameW r
;
715 r
.in
.handle
= handle
;
716 r
.in
.service_name
= service_name
;
717 r
.in
.display_name_length
= display_name_length
;
719 if (DEBUGLEVEL
>= 10)
720 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW
, &r
);
722 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_GETSERVICEKEYNAMEW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_GetServiceKeyNameW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_GetServiceKeyNameW
);
724 if (!NT_STATUS_IS_OK(status
)) {
728 if (DEBUGLEVEL
>= 10)
729 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW
, &r
);
731 if (NT_STATUS_IS_ERR(status
)) {
735 /* Return variables */
736 *key_name
= *r
.out
.key_name
;
737 if ( display_name_length
) {
738 *display_name_length
= *r
.out
.display_name_length
;
742 return werror_to_ntstatus(r
.out
.result
);
745 NTSTATUS
rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t bits
, uint32_t bitson
, uint32_t immediate
)
747 struct svcctl_SCSetServiceBitsA r
;
751 r
.in
.handle
= handle
;
753 r
.in
.bitson
= bitson
;
754 r
.in
.immediate
= immediate
;
756 if (DEBUGLEVEL
>= 10)
757 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA
, &r
);
759 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_SCSETSERVICEBITSA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_SCSetServiceBitsA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_SCSetServiceBitsA
);
761 if (!NT_STATUS_IS_OK(status
)) {
765 if (DEBUGLEVEL
>= 10)
766 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA
, &r
);
768 if (NT_STATUS_IS_ERR(status
)) {
772 /* Return variables */
775 return werror_to_ntstatus(r
.out
.result
);
778 NTSTATUS
rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t type
, uint32_t start
, uint32_t error
, const char *binary_path
, const char *load_order_group
, uint32_t *tag_id
, const char *dependencies
, const char *service_start_name
, const char *password
, const char *display_name
)
780 struct svcctl_ChangeServiceConfigA r
;
784 r
.in
.handle
= handle
;
788 r
.in
.binary_path
= binary_path
;
789 r
.in
.load_order_group
= load_order_group
;
790 r
.in
.dependencies
= dependencies
;
791 r
.in
.service_start_name
= service_start_name
;
792 r
.in
.password
= password
;
793 r
.in
.display_name
= display_name
;
795 if (DEBUGLEVEL
>= 10)
796 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA
, &r
);
798 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CHANGESERVICECONFIGA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_ChangeServiceConfigA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_ChangeServiceConfigA
);
800 if (!NT_STATUS_IS_OK(status
)) {
804 if (DEBUGLEVEL
>= 10)
805 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA
, &r
);
807 if (NT_STATUS_IS_ERR(status
)) {
811 /* Return variables */
812 *tag_id
= *r
.out
.tag_id
;
815 return werror_to_ntstatus(r
.out
.result
);
818 NTSTATUS
rpccli_svcctl_CreateServiceA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, const char *ServiceName
, const char *DisplayName
, uint32_t desired_access
, uint32_t type
, uint32_t start_type
, uint32_t error_control
, const char *binary_path
, const char *LoadOrderGroupKey
, uint32_t *TagId
, const char *dependencies
, const char *service_start_name
, const char *password
)
820 struct svcctl_CreateServiceA r
;
824 r
.in
.handle
= handle
;
825 r
.in
.ServiceName
= ServiceName
;
826 r
.in
.DisplayName
= DisplayName
;
827 r
.in
.desired_access
= desired_access
;
829 r
.in
.start_type
= start_type
;
830 r
.in
.error_control
= error_control
;
831 r
.in
.binary_path
= binary_path
;
832 r
.in
.LoadOrderGroupKey
= LoadOrderGroupKey
;
833 r
.in
.dependencies
= dependencies
;
834 r
.in
.service_start_name
= service_start_name
;
835 r
.in
.password
= password
;
837 if (DEBUGLEVEL
>= 10)
838 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA
, &r
);
840 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CREATESERVICEA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_CreateServiceA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_CreateServiceA
);
842 if (!NT_STATUS_IS_OK(status
)) {
846 if (DEBUGLEVEL
>= 10)
847 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA
, &r
);
849 if (NT_STATUS_IS_ERR(status
)) {
853 /* Return variables */
855 *TagId
= *r
.out
.TagId
;
859 return werror_to_ntstatus(r
.out
.result
);
862 NTSTATUS
rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*service
, uint32_t state
, struct ENUM_SERVICE_STATUS
*service_status
, uint32_t buf_size
, uint32_t *bytes_needed
, uint32_t *services_returned
)
864 struct svcctl_EnumDependentServicesA r
;
868 r
.in
.service
= service
;
870 r
.in
.buf_size
= buf_size
;
872 if (DEBUGLEVEL
>= 10)
873 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA
, &r
);
875 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_EnumDependentServicesA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_EnumDependentServicesA
);
877 if (!NT_STATUS_IS_OK(status
)) {
881 if (DEBUGLEVEL
>= 10)
882 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA
, &r
);
884 if (NT_STATUS_IS_ERR(status
)) {
888 /* Return variables */
889 if ( service_status
) {
890 *service_status
= *r
.out
.service_status
;
892 *bytes_needed
= *r
.out
.bytes_needed
;
893 *services_returned
= *r
.out
.services_returned
;
896 return werror_to_ntstatus(r
.out
.result
);
899 NTSTATUS
rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t type
, uint32_t state
, uint32_t buf_size
, uint8_t *service
, uint32_t *bytes_needed
, uint32_t *services_returned
, uint32_t *resume_handle
)
901 struct svcctl_EnumServicesStatusA r
;
905 r
.in
.handle
= handle
;
908 r
.in
.buf_size
= buf_size
;
909 r
.in
.resume_handle
= resume_handle
;
911 if (DEBUGLEVEL
>= 10)
912 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA
, &r
);
914 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_ENUMSERVICESSTATUSA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_EnumServicesStatusA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_EnumServicesStatusA
);
916 if (!NT_STATUS_IS_OK(status
)) {
920 if (DEBUGLEVEL
>= 10)
921 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA
, &r
);
923 if (NT_STATUS_IS_ERR(status
)) {
927 /* Return variables */
928 memcpy(service
, r
.out
.service
, r
.in
.buf_size
);
929 *bytes_needed
= *r
.out
.bytes_needed
;
930 *services_returned
= *r
.out
.services_returned
;
931 if ( resume_handle
) {
932 *resume_handle
= *r
.out
.resume_handle
;
936 return werror_to_ntstatus(r
.out
.result
);
939 NTSTATUS
rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, const char *MachineName
, const char *DatabaseName
, uint32_t access_mask
, struct policy_handle
*handle
)
941 struct svcctl_OpenSCManagerA r
;
945 r
.in
.MachineName
= MachineName
;
946 r
.in
.DatabaseName
= DatabaseName
;
947 r
.in
.access_mask
= access_mask
;
949 if (DEBUGLEVEL
>= 10)
950 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA
, &r
);
952 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_OPENSCMANAGERA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_OpenSCManagerA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_OpenSCManagerA
);
954 if (!NT_STATUS_IS_OK(status
)) {
958 if (DEBUGLEVEL
>= 10)
959 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA
, &r
);
961 if (NT_STATUS_IS_ERR(status
)) {
965 /* Return variables */
966 *handle
= *r
.out
.handle
;
969 return werror_to_ntstatus(r
.out
.result
);
972 NTSTATUS
rpccli_svcctl_OpenServiceA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*scmanager_handle
, const char *ServiceName
, uint32_t access_mask
)
974 struct svcctl_OpenServiceA r
;
978 r
.in
.scmanager_handle
= scmanager_handle
;
979 r
.in
.ServiceName
= ServiceName
;
980 r
.in
.access_mask
= access_mask
;
982 if (DEBUGLEVEL
>= 10)
983 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA
, &r
);
985 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_OPENSERVICEA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_OpenServiceA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_OpenServiceA
);
987 if (!NT_STATUS_IS_OK(status
)) {
991 if (DEBUGLEVEL
>= 10)
992 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA
, &r
);
994 if (NT_STATUS_IS_ERR(status
)) {
998 /* Return variables */
1001 return werror_to_ntstatus(r
.out
.result
);
1004 NTSTATUS
rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint8_t *query
, uint32_t buf_size
, uint32_t *bytes_needed
)
1006 struct svcctl_QueryServiceConfigA r
;
1010 r
.in
.handle
= handle
;
1011 r
.in
.buf_size
= buf_size
;
1013 if (DEBUGLEVEL
>= 10)
1014 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA
, &r
);
1016 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICECONFIGA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceConfigA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceConfigA
);
1018 if (!NT_STATUS_IS_OK(status
)) {
1022 if (DEBUGLEVEL
>= 10)
1023 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA
, &r
);
1025 if (NT_STATUS_IS_ERR(status
)) {
1029 /* Return variables */
1030 memcpy(query
, r
.out
.query
, r
.in
.buf_size
);
1031 *bytes_needed
= *r
.out
.bytes_needed
;
1034 return werror_to_ntstatus(r
.out
.result
);
1037 NTSTATUS
rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t buf_size
, struct SERVICE_LOCK_STATUS
*lock_status
, uint32_t *required_buf_size
)
1039 struct svcctl_QueryServiceLockStatusA r
;
1043 r
.in
.handle
= handle
;
1044 r
.in
.buf_size
= buf_size
;
1046 if (DEBUGLEVEL
>= 10)
1047 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA
, &r
);
1049 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceLockStatusA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceLockStatusA
);
1051 if (!NT_STATUS_IS_OK(status
)) {
1055 if (DEBUGLEVEL
>= 10)
1056 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA
, &r
);
1058 if (NT_STATUS_IS_ERR(status
)) {
1062 /* Return variables */
1063 *lock_status
= *r
.out
.lock_status
;
1064 *required_buf_size
= *r
.out
.required_buf_size
;
1067 return werror_to_ntstatus(r
.out
.result
);
1070 NTSTATUS
rpccli_svcctl_StartServiceA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t NumArgs
, const char *Arguments
)
1072 struct svcctl_StartServiceA r
;
1076 r
.in
.handle
= handle
;
1077 r
.in
.NumArgs
= NumArgs
;
1078 r
.in
.Arguments
= Arguments
;
1080 if (DEBUGLEVEL
>= 10)
1081 NDR_PRINT_IN_DEBUG(svcctl_StartServiceA
, &r
);
1083 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_STARTSERVICEA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_StartServiceA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_StartServiceA
);
1085 if (!NT_STATUS_IS_OK(status
)) {
1089 if (DEBUGLEVEL
>= 10)
1090 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA
, &r
);
1092 if (NT_STATUS_IS_ERR(status
)) {
1096 /* Return variables */
1099 return werror_to_ntstatus(r
.out
.result
);
1102 NTSTATUS
rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, const char *service_name
, const char **display_name
, uint32_t *display_name_length
)
1104 struct svcctl_GetServiceDisplayNameA r
;
1108 r
.in
.handle
= handle
;
1109 r
.in
.service_name
= service_name
;
1110 r
.in
.display_name_length
= display_name_length
;
1112 if (DEBUGLEVEL
>= 10)
1113 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA
, &r
);
1115 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_GetServiceDisplayNameA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_GetServiceDisplayNameA
);
1117 if (!NT_STATUS_IS_OK(status
)) {
1121 if (DEBUGLEVEL
>= 10)
1122 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA
, &r
);
1124 if (NT_STATUS_IS_ERR(status
)) {
1128 /* Return variables */
1129 *display_name
= *r
.out
.display_name
;
1130 if ( display_name_length
) {
1131 *display_name_length
= *r
.out
.display_name_length
;
1135 return werror_to_ntstatus(r
.out
.result
);
1138 NTSTATUS
rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, const char *service_name
, const char **key_name
, uint32_t *display_name_length
)
1140 struct svcctl_GetServiceKeyNameA r
;
1144 r
.in
.handle
= handle
;
1145 r
.in
.service_name
= service_name
;
1146 r
.in
.display_name_length
= display_name_length
;
1148 if (DEBUGLEVEL
>= 10)
1149 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA
, &r
);
1151 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_GETSERVICEKEYNAMEA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_GetServiceKeyNameA
, (ndr_push_flags_fn_t
)ndr_push_svcctl_GetServiceKeyNameA
);
1153 if (!NT_STATUS_IS_OK(status
)) {
1157 if (DEBUGLEVEL
>= 10)
1158 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA
, &r
);
1160 if (NT_STATUS_IS_ERR(status
)) {
1164 /* Return variables */
1165 *key_name
= *r
.out
.key_name
;
1166 if ( display_name_length
) {
1167 *display_name_length
= *r
.out
.display_name_length
;
1171 return werror_to_ntstatus(r
.out
.result
);
1174 NTSTATUS
rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
)
1176 struct svcctl_GetCurrentGroupeStateW r
;
1181 if (DEBUGLEVEL
>= 10)
1182 NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW
, &r
);
1184 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_GETCURRENTGROUPESTATEW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_GetCurrentGroupeStateW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_GetCurrentGroupeStateW
);
1186 if (!NT_STATUS_IS_OK(status
)) {
1190 if (DEBUGLEVEL
>= 10)
1191 NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW
, &r
);
1193 if (NT_STATUS_IS_ERR(status
)) {
1197 /* Return variables */
1200 return werror_to_ntstatus(r
.out
.result
);
1203 NTSTATUS
rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
)
1205 struct svcctl_EnumServiceGroupW r
;
1210 if (DEBUGLEVEL
>= 10)
1211 NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW
, &r
);
1213 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_ENUMSERVICEGROUPW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_EnumServiceGroupW
, (ndr_push_flags_fn_t
)ndr_push_svcctl_EnumServiceGroupW
);
1215 if (!NT_STATUS_IS_OK(status
)) {
1219 if (DEBUGLEVEL
>= 10)
1220 NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW
, &r
);
1222 if (NT_STATUS_IS_ERR(status
)) {
1226 /* Return variables */
1229 return werror_to_ntstatus(r
.out
.result
);
1232 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t info_level
, uint8_t *info
)
1234 struct svcctl_ChangeServiceConfig2A r
;
1238 r
.in
.handle
= handle
;
1239 r
.in
.info_level
= info_level
;
1242 if (DEBUGLEVEL
>= 10)
1243 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A
, &r
);
1245 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CHANGESERVICECONFIG2A
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_ChangeServiceConfig2A
, (ndr_push_flags_fn_t
)ndr_push_svcctl_ChangeServiceConfig2A
);
1247 if (!NT_STATUS_IS_OK(status
)) {
1251 if (DEBUGLEVEL
>= 10)
1252 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A
, &r
);
1254 if (NT_STATUS_IS_ERR(status
)) {
1258 /* Return variables */
1261 return werror_to_ntstatus(r
.out
.result
);
1264 NTSTATUS
rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t info_level
, uint8_t *info
)
1266 struct svcctl_ChangeServiceConfig2W r
;
1270 r
.in
.handle
= handle
;
1271 r
.in
.info_level
= info_level
;
1274 if (DEBUGLEVEL
>= 10)
1275 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W
, &r
);
1277 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_CHANGESERVICECONFIG2W
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_ChangeServiceConfig2W
, (ndr_push_flags_fn_t
)ndr_push_svcctl_ChangeServiceConfig2W
);
1279 if (!NT_STATUS_IS_OK(status
)) {
1283 if (DEBUGLEVEL
>= 10)
1284 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W
, &r
);
1286 if (NT_STATUS_IS_ERR(status
)) {
1290 /* Return variables */
1293 return werror_to_ntstatus(r
.out
.result
);
1296 NTSTATUS
rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t info_level
, uint8_t *buffer
, uint32_t buf_size
, uint32_t *bytes_needed
)
1298 struct svcctl_QueryServiceConfig2A r
;
1302 r
.in
.handle
= handle
;
1303 r
.in
.info_level
= info_level
;
1304 r
.in
.buf_size
= buf_size
;
1306 if (DEBUGLEVEL
>= 10)
1307 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A
, &r
);
1309 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICECONFIG2A
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceConfig2A
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceConfig2A
);
1311 if (!NT_STATUS_IS_OK(status
)) {
1315 if (DEBUGLEVEL
>= 10)
1316 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A
, &r
);
1318 if (NT_STATUS_IS_ERR(status
)) {
1322 /* Return variables */
1323 memcpy(buffer
, r
.out
.buffer
, r
.in
.buf_size
);
1324 *bytes_needed
= *r
.out
.bytes_needed
;
1327 return werror_to_ntstatus(r
.out
.result
);
1330 NTSTATUS
rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t info_level
, uint8_t *buffer
, uint32_t buf_size
, uint32_t *bytes_needed
)
1332 struct svcctl_QueryServiceConfig2W r
;
1336 r
.in
.handle
= handle
;
1337 r
.in
.info_level
= info_level
;
1338 r
.in
.buf_size
= buf_size
;
1340 if (DEBUGLEVEL
>= 10)
1341 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W
, &r
);
1343 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICECONFIG2W
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceConfig2W
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceConfig2W
);
1345 if (!NT_STATUS_IS_OK(status
)) {
1349 if (DEBUGLEVEL
>= 10)
1350 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W
, &r
);
1352 if (NT_STATUS_IS_ERR(status
)) {
1356 /* Return variables */
1357 memcpy(buffer
, r
.out
.buffer
, r
.in
.buf_size
);
1358 *bytes_needed
= *r
.out
.bytes_needed
;
1361 return werror_to_ntstatus(r
.out
.result
);
1364 NTSTATUS
rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*handle
, uint32_t info_level
, uint8_t *buffer
, uint32_t buf_size
, uint32_t *bytes_needed
)
1366 struct svcctl_QueryServiceStatusEx r
;
1370 r
.in
.handle
= handle
;
1371 r
.in
.info_level
= info_level
;
1372 r
.in
.buf_size
= buf_size
;
1374 if (DEBUGLEVEL
>= 10)
1375 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx
, &r
);
1377 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_QUERYSERVICESTATUSEX
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_QueryServiceStatusEx
, (ndr_push_flags_fn_t
)ndr_push_svcctl_QueryServiceStatusEx
);
1379 if (!NT_STATUS_IS_OK(status
)) {
1383 if (DEBUGLEVEL
>= 10)
1384 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx
, &r
);
1386 if (NT_STATUS_IS_ERR(status
)) {
1390 /* Return variables */
1391 memcpy(buffer
, r
.out
.buffer
, r
.in
.buf_size
);
1392 *bytes_needed
= *r
.out
.bytes_needed
;
1395 return werror_to_ntstatus(r
.out
.result
);
1398 NTSTATUS
rpccli_EnumServicesStatusExA(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*scmanager
, uint32_t info_level
, uint32_t type
, uint32_t state
, uint8_t *services
, uint32_t buf_size
, uint32_t *bytes_needed
, uint32_t *service_returned
, uint32_t *resume_handle
, const char **group_name
)
1400 struct EnumServicesStatusExA r
;
1404 r
.in
.scmanager
= scmanager
;
1405 r
.in
.info_level
= info_level
;
1408 r
.in
.buf_size
= buf_size
;
1409 r
.in
.resume_handle
= resume_handle
;
1411 if (DEBUGLEVEL
>= 10)
1412 NDR_PRINT_IN_DEBUG(EnumServicesStatusExA
, &r
);
1414 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_ENUMSERVICESSTATUSEXA
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_EnumServicesStatusExA
, (ndr_push_flags_fn_t
)ndr_push_EnumServicesStatusExA
);
1416 if (!NT_STATUS_IS_OK(status
)) {
1420 if (DEBUGLEVEL
>= 10)
1421 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA
, &r
);
1423 if (NT_STATUS_IS_ERR(status
)) {
1427 /* Return variables */
1428 memcpy(services
, r
.out
.services
, r
.in
.buf_size
);
1429 *bytes_needed
= *r
.out
.bytes_needed
;
1430 *service_returned
= *r
.out
.service_returned
;
1431 if ( resume_handle
) {
1432 *resume_handle
= *r
.out
.resume_handle
;
1434 *group_name
= *r
.out
.group_name
;
1437 return werror_to_ntstatus(r
.out
.result
);
1440 NTSTATUS
rpccli_EnumServicesStatusExW(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
, struct policy_handle
*scmanager
, uint32_t info_level
, uint32_t type
, uint32_t state
, uint8_t *services
, uint32_t buf_size
, uint32_t *bytes_needed
, uint32_t *service_returned
, uint32_t *resume_handle
, const char **group_name
)
1442 struct EnumServicesStatusExW r
;
1446 r
.in
.scmanager
= scmanager
;
1447 r
.in
.info_level
= info_level
;
1450 r
.in
.buf_size
= buf_size
;
1451 r
.in
.resume_handle
= resume_handle
;
1453 if (DEBUGLEVEL
>= 10)
1454 NDR_PRINT_IN_DEBUG(EnumServicesStatusExW
, &r
);
1456 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_ENUMSERVICESSTATUSEXW
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_EnumServicesStatusExW
, (ndr_push_flags_fn_t
)ndr_push_EnumServicesStatusExW
);
1458 if (!NT_STATUS_IS_OK(status
)) {
1462 if (DEBUGLEVEL
>= 10)
1463 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW
, &r
);
1465 if (NT_STATUS_IS_ERR(status
)) {
1469 /* Return variables */
1470 memcpy(services
, r
.out
.services
, r
.in
.buf_size
);
1471 *bytes_needed
= *r
.out
.bytes_needed
;
1472 *service_returned
= *r
.out
.service_returned
;
1473 if ( resume_handle
) {
1474 *resume_handle
= *r
.out
.resume_handle
;
1476 *group_name
= *r
.out
.group_name
;
1479 return werror_to_ntstatus(r
.out
.result
);
1482 NTSTATUS
rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client
*cli
, TALLOC_CTX
*mem_ctx
)
1484 struct svcctl_SCSendTSMessage r
;
1489 if (DEBUGLEVEL
>= 10)
1490 NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage
, &r
);
1492 status
= cli_do_rpc_ndr(cli
, mem_ctx
, PI_SVCCTL
, DCERPC_SVCCTL_SCSENDTSMESSAGE
, &r
, (ndr_pull_flags_fn_t
)ndr_pull_svcctl_SCSendTSMessage
, (ndr_push_flags_fn_t
)ndr_push_svcctl_SCSendTSMessage
);
1494 if (!NT_STATUS_IS_OK(status
)) {
1498 if (DEBUGLEVEL
>= 10)
1499 NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage
, &r
);
1501 if (NT_STATUS_IS_ERR(status
)) {
1505 /* Return variables */
1508 return werror_to_ntstatus(r
.out
.result
);