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);
23 NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r);
25 if (NT_STATUS_IS_ERR(status)) {
29 /* Return variables */
30 *handle = *r.out.handle;
33 return werror_to_ntstatus(r.out.result);
36 NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t control, struct SERVICE_STATUS *status)
38 struct svcctl_ControlService r;
43 r.in.control = control;
46 NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r);
48 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);
51 NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r);
53 if (NT_STATUS_IS_ERR(status)) {
57 /* Return variables */
58 *status = *r.out.status;
61 return werror_to_ntstatus(r.out.result);
64 NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
66 struct svcctl_DeleteService r;
73 NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &r);
75 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);
78 NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r);
80 if (NT_STATUS_IS_ERR(status)) {
84 /* Return variables */
87 return werror_to_ntstatus(r.out.result);
90 NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct policy_handle *lock)
92 struct svcctl_LockServiceDatabase r;
99 NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r);
101 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);
103 if (DEBUGLEVEL >= 10)
104 NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r);
106 if (NT_STATUS_IS_ERR(status)) {
110 /* Return variables */
114 return werror_to_ntstatus(r.out.result);
117 NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
119 struct svcctl_QueryServiceObjectSecurity r;
124 if (DEBUGLEVEL >= 10)
125 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
127 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);
129 if (DEBUGLEVEL >= 10)
130 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
132 if (NT_STATUS_IS_ERR(status)) {
136 /* Return variables */
139 return werror_to_ntstatus(r.out.result);
142 NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
144 struct svcctl_SetServiceObjectSecurity r;
149 if (DEBUGLEVEL >= 10)
150 NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r);
152 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);
154 if (DEBUGLEVEL >= 10)
155 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r);
157 if (NT_STATUS_IS_ERR(status)) {
161 /* Return variables */
164 return werror_to_ntstatus(r.out.result);
167 NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct SERVICE_STATUS *status)
169 struct svcctl_QueryServiceStatus r;
173 r.in.handle = handle;
175 if (DEBUGLEVEL >= 10)
176 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r);
178 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);
180 if (DEBUGLEVEL >= 10)
181 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r);
183 if (NT_STATUS_IS_ERR(status)) {
187 /* Return variables */
188 *status = *r.out.status;
191 return werror_to_ntstatus(r.out.result);
194 NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
196 struct svcctl_SetServiceStatus r;
201 if (DEBUGLEVEL >= 10)
202 NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &r);
204 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);
206 if (DEBUGLEVEL >= 10)
207 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r);
209 if (NT_STATUS_IS_ERR(status)) {
213 /* Return variables */
216 return werror_to_ntstatus(r.out.result);
219 NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *lock)
221 struct svcctl_UnlockServiceDatabase r;
227 if (DEBUGLEVEL >= 10)
228 NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, &r);
230 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);
232 if (DEBUGLEVEL >= 10)
233 NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r);
235 if (NT_STATUS_IS_ERR(status)) {
239 /* Return variables */
243 return werror_to_ntstatus(r.out.result);
246 NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
248 struct svcctl_NotifyBootConfigStatus r;
253 if (DEBUGLEVEL >= 10)
254 NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &r);
256 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);
258 if (DEBUGLEVEL >= 10)
259 NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r);
261 if (NT_STATUS_IS_ERR(status)) {
265 /* Return variables */
268 return werror_to_ntstatus(r.out.result);
271 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)
273 struct svcctl_SCSetServiceBitsW r;
277 r.in.handle = handle;
279 r.in.bitson = bitson;
280 r.in.immediate = immediate;
282 if (DEBUGLEVEL >= 10)
283 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &r);
285 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);
287 if (DEBUGLEVEL >= 10)
288 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r);
290 if (NT_STATUS_IS_ERR(status)) {
294 /* Return variables */
297 return werror_to_ntstatus(r.out.result);
300 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)
302 struct svcctl_ChangeServiceConfigW r;
306 r.in.handle = handle;
310 r.in.binary_path = binary_path;
311 r.in.load_order_group = load_order_group;
312 r.in.dependencies = dependencies;
313 r.in.service_start_name = service_start_name;
314 r.in.password = password;
315 r.in.display_name = display_name;
317 if (DEBUGLEVEL >= 10)
318 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r);
320 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);
322 if (DEBUGLEVEL >= 10)
323 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r);
325 if (NT_STATUS_IS_ERR(status)) {
329 /* Return variables */
330 *tag_id = *r.out.tag_id;
333 return werror_to_ntstatus(r.out.result);
336 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)
338 struct svcctl_CreateServiceW r;
342 r.in.scmanager_handle = scmanager_handle;
343 r.in.ServiceName = ServiceName;
344 r.in.DisplayName = DisplayName;
345 r.in.desired_access = desired_access;
347 r.in.start_type = start_type;
348 r.in.error_control = error_control;
349 r.in.binary_path = binary_path;
350 r.in.LoadOrderGroupKey = LoadOrderGroupKey;
352 r.in.dependencies = dependencies;
353 r.in.dependencies_size = dependencies_size;
354 r.in.service_start_name = service_start_name;
355 r.in.password = password;
356 r.in.password_size = password_size;
358 if (DEBUGLEVEL >= 10)
359 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, &r);
361 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);
363 if (DEBUGLEVEL >= 10)
364 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r);
366 if (NT_STATUS_IS_ERR(status)) {
370 /* Return variables */
371 *TagId = *r.out.TagId;
372 *handle = *r.out.handle;
375 return werror_to_ntstatus(r.out.result);
378 NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
380 struct svcctl_EnumDependentServicesW r;
384 r.in.service = service;
386 r.in.buf_size = buf_size;
388 if (DEBUGLEVEL >= 10)
389 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r);
391 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);
393 if (DEBUGLEVEL >= 10)
394 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r);
396 if (NT_STATUS_IS_ERR(status)) {
400 /* Return variables */
401 *status = *r.out.status;
402 *bytes_needed = *r.out.bytes_needed;
403 *services_returned = *r.out.services_returned;
406 return werror_to_ntstatus(r.out.result);
409 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)
411 struct svcctl_EnumServicesStatusW r;
415 r.in.handle = handle;
418 r.in.buf_size = buf_size;
419 r.in.resume_handle = resume_handle;
421 if (DEBUGLEVEL >= 10)
422 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r);
424 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);
426 if (DEBUGLEVEL >= 10)
427 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r);
429 if (NT_STATUS_IS_ERR(status)) {
433 /* Return variables */
434 *service = *r.out.service;
435 *bytes_needed = *r.out.bytes_needed;
436 *services_returned = *r.out.services_returned;
437 *resume_handle = *r.out.resume_handle;
440 return werror_to_ntstatus(r.out.result);
443 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)
445 struct svcctl_OpenSCManagerW r;
449 r.in.MachineName = MachineName;
450 r.in.DatabaseName = DatabaseName;
451 r.in.access_mask = access_mask;
453 if (DEBUGLEVEL >= 10)
454 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r);
456 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);
458 if (DEBUGLEVEL >= 10)
459 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r);
461 if (NT_STATUS_IS_ERR(status)) {
465 /* Return variables */
466 *handle = *r.out.handle;
469 return werror_to_ntstatus(r.out.result);
472 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)
474 struct svcctl_OpenServiceW r;
478 r.in.scmanager_handle = scmanager_handle;
479 r.in.ServiceName = ServiceName;
480 r.in.access_mask = access_mask;
482 if (DEBUGLEVEL >= 10)
483 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r);
485 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);
487 if (DEBUGLEVEL >= 10)
488 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r);
490 if (NT_STATUS_IS_ERR(status)) {
494 /* Return variables */
495 *handle = *r.out.handle;
498 return werror_to_ntstatus(r.out.result);
501 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)
503 struct svcctl_QueryServiceConfigW r;
507 r.in.handle = handle;
508 r.in.buf_size = buf_size;
510 if (DEBUGLEVEL >= 10)
511 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r);
513 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);
515 if (DEBUGLEVEL >= 10)
516 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r);
518 if (NT_STATUS_IS_ERR(status)) {
522 /* Return variables */
523 *query = *r.out.query;
524 *bytes_needed = *r.out.bytes_needed;
527 return werror_to_ntstatus(r.out.result);
530 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 *status, uint32_t *required_buf_size)
532 struct svcctl_QueryServiceLockStatusW r;
536 r.in.handle = handle;
537 r.in.buf_size = buf_size;
539 if (DEBUGLEVEL >= 10)
540 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r);
542 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);
544 if (DEBUGLEVEL >= 10)
545 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r);
547 if (NT_STATUS_IS_ERR(status)) {
551 /* Return variables */
552 *status = *r.out.status;
553 *required_buf_size = *r.out.required_buf_size;
556 return werror_to_ntstatus(r.out.result);
559 NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments)
561 struct svcctl_StartServiceW r;
565 r.in.handle = handle;
566 r.in.NumArgs = NumArgs;
567 r.in.Arguments = Arguments;
569 if (DEBUGLEVEL >= 10)
570 NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &r);
572 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);
574 if (DEBUGLEVEL >= 10)
575 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r);
577 if (NT_STATUS_IS_ERR(status)) {
581 /* Return variables */
584 return werror_to_ntstatus(r.out.result);
587 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)
589 struct svcctl_GetServiceDisplayNameW r;
593 r.in.handle = handle;
594 r.in.service_name = service_name;
595 r.in.display_name_length = display_name_length;
597 if (DEBUGLEVEL >= 10)
598 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r);
600 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);
602 if (DEBUGLEVEL >= 10)
603 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r);
605 if (NT_STATUS_IS_ERR(status)) {
609 /* Return variables */
610 *display_name = *r.out.display_name;
611 *display_name_length = *r.out.display_name_length;
614 return werror_to_ntstatus(r.out.result);
617 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)
619 struct svcctl_GetServiceKeyNameW r;
623 r.in.handle = handle;
624 r.in.service_name = service_name;
625 r.in.display_name_length = display_name_length;
627 if (DEBUGLEVEL >= 10)
628 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r);
630 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);
632 if (DEBUGLEVEL >= 10)
633 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r);
635 if (NT_STATUS_IS_ERR(status)) {
639 /* Return variables */
640 *key_name = *r.out.key_name;
641 *display_name_length = *r.out.display_name_length;
644 return werror_to_ntstatus(r.out.result);
647 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)
649 struct svcctl_SCSetServiceBitsA r;
653 r.in.handle = handle;
655 r.in.bitson = bitson;
656 r.in.immediate = immediate;
658 if (DEBUGLEVEL >= 10)
659 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &r);
661 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);
663 if (DEBUGLEVEL >= 10)
664 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r);
666 if (NT_STATUS_IS_ERR(status)) {
670 /* Return variables */
673 return werror_to_ntstatus(r.out.result);
676 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)
678 struct svcctl_ChangeServiceConfigA r;
682 r.in.handle = handle;
686 r.in.binary_path = binary_path;
687 r.in.load_order_group = load_order_group;
688 r.in.dependencies = dependencies;
689 r.in.service_start_name = service_start_name;
690 r.in.password = password;
691 r.in.display_name = display_name;
693 if (DEBUGLEVEL >= 10)
694 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r);
696 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);
698 if (DEBUGLEVEL >= 10)
699 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r);
701 if (NT_STATUS_IS_ERR(status)) {
705 /* Return variables */
706 *tag_id = *r.out.tag_id;
709 return werror_to_ntstatus(r.out.result);
712 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)
714 struct svcctl_CreateServiceA r;
718 r.in.handle = handle;
719 r.in.ServiceName = ServiceName;
720 r.in.DisplayName = DisplayName;
721 r.in.desired_access = desired_access;
723 r.in.start_type = start_type;
724 r.in.error_control = error_control;
725 r.in.binary_path = binary_path;
726 r.in.LoadOrderGroupKey = LoadOrderGroupKey;
727 r.in.dependencies = dependencies;
728 r.in.service_start_name = service_start_name;
729 r.in.password = password;
731 if (DEBUGLEVEL >= 10)
732 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r);
734 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);
736 if (DEBUGLEVEL >= 10)
737 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r);
739 if (NT_STATUS_IS_ERR(status)) {
743 /* Return variables */
744 *TagId = *r.out.TagId;
747 return werror_to_ntstatus(r.out.result);
750 NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned)
752 struct svcctl_EnumDependentServicesA r;
756 r.in.service = service;
758 r.in.buf_size = buf_size;
760 if (DEBUGLEVEL >= 10)
761 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r);
763 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);
765 if (DEBUGLEVEL >= 10)
766 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r);
768 if (NT_STATUS_IS_ERR(status)) {
772 /* Return variables */
773 *status = *r.out.status;
774 *bytes_needed = *r.out.bytes_needed;
775 *services_returned = *r.out.services_returned;
778 return werror_to_ntstatus(r.out.result);
781 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)
783 struct svcctl_EnumServicesStatusA r;
787 r.in.handle = handle;
790 r.in.buf_size = buf_size;
791 r.in.resume_handle = resume_handle;
793 if (DEBUGLEVEL >= 10)
794 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r);
796 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);
798 if (DEBUGLEVEL >= 10)
799 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r);
801 if (NT_STATUS_IS_ERR(status)) {
805 /* Return variables */
806 *service = *r.out.service;
807 *bytes_needed = *r.out.bytes_needed;
808 *services_returned = *r.out.services_returned;
809 *resume_handle = *r.out.resume_handle;
812 return werror_to_ntstatus(r.out.result);
815 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)
817 struct svcctl_OpenSCManagerA r;
821 r.in.MachineName = MachineName;
822 r.in.DatabaseName = DatabaseName;
823 r.in.access_mask = access_mask;
825 if (DEBUGLEVEL >= 10)
826 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r);
828 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);
830 if (DEBUGLEVEL >= 10)
831 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r);
833 if (NT_STATUS_IS_ERR(status)) {
837 /* Return variables */
838 *handle = *r.out.handle;
841 return werror_to_ntstatus(r.out.result);
844 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)
846 struct svcctl_OpenServiceA r;
850 r.in.scmanager_handle = scmanager_handle;
851 r.in.ServiceName = ServiceName;
852 r.in.access_mask = access_mask;
854 if (DEBUGLEVEL >= 10)
855 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &r);
857 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);
859 if (DEBUGLEVEL >= 10)
860 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r);
862 if (NT_STATUS_IS_ERR(status)) {
866 /* Return variables */
869 return werror_to_ntstatus(r.out.result);
872 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)
874 struct svcctl_QueryServiceConfigA r;
878 r.in.handle = handle;
879 r.in.buf_size = buf_size;
881 if (DEBUGLEVEL >= 10)
882 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r);
884 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);
886 if (DEBUGLEVEL >= 10)
887 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r);
889 if (NT_STATUS_IS_ERR(status)) {
893 /* Return variables */
894 *query = *r.out.query;
895 *bytes_needed = *r.out.bytes_needed;
898 return werror_to_ntstatus(r.out.result);
901 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 *status, uint32_t *required_buf_size)
903 struct svcctl_QueryServiceLockStatusA r;
907 r.in.handle = handle;
908 r.in.buf_size = buf_size;
910 if (DEBUGLEVEL >= 10)
911 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r);
913 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);
915 if (DEBUGLEVEL >= 10)
916 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r);
918 if (NT_STATUS_IS_ERR(status)) {
922 /* Return variables */
923 *status = *r.out.status;
924 *required_buf_size = *r.out.required_buf_size;
927 return werror_to_ntstatus(r.out.result);
930 NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments)
932 struct svcctl_StartServiceA r;
936 r.in.handle = handle;
937 r.in.NumArgs = NumArgs;
938 r.in.Arguments = Arguments;
940 if (DEBUGLEVEL >= 10)
941 NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &r);
943 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);
945 if (DEBUGLEVEL >= 10)
946 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r);
948 if (NT_STATUS_IS_ERR(status)) {
952 /* Return variables */
955 return werror_to_ntstatus(r.out.result);
958 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)
960 struct svcctl_GetServiceDisplayNameA r;
964 r.in.handle = handle;
965 r.in.service_name = service_name;
966 r.in.display_name_length = display_name_length;
968 if (DEBUGLEVEL >= 10)
969 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r);
971 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);
973 if (DEBUGLEVEL >= 10)
974 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r);
976 if (NT_STATUS_IS_ERR(status)) {
980 /* Return variables */
981 *display_name = *r.out.display_name;
982 *display_name_length = *r.out.display_name_length;
985 return werror_to_ntstatus(r.out.result);
988 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)
990 struct svcctl_GetServiceKeyNameA r;
994 r.in.handle = handle;
995 r.in.service_name = service_name;
996 r.in.display_name_length = display_name_length;
998 if (DEBUGLEVEL >= 10)
999 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r);
1001 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);
1003 if (DEBUGLEVEL >= 10)
1004 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r);
1006 if (NT_STATUS_IS_ERR(status)) {
1010 /* Return variables */
1011 *key_name = *r.out.key_name;
1012 *display_name_length = *r.out.display_name_length;
1015 return werror_to_ntstatus(r.out.result);
1018 NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1020 struct svcctl_GetCurrentGroupeStateW r;
1025 if (DEBUGLEVEL >= 10)
1026 NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
1028 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);
1030 if (DEBUGLEVEL >= 10)
1031 NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
1033 if (NT_STATUS_IS_ERR(status)) {
1037 /* Return variables */
1040 return werror_to_ntstatus(r.out.result);
1043 NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1045 struct svcctl_EnumServiceGroupW r;
1050 if (DEBUGLEVEL >= 10)
1051 NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &r);
1053 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);
1055 if (DEBUGLEVEL >= 10)
1056 NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r);
1058 if (NT_STATUS_IS_ERR(status)) {
1062 /* Return variables */
1065 return werror_to_ntstatus(r.out.result);
1068 NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info)
1070 struct svcctl_ChangeServiceConfig2A r;
1074 r.in.handle = handle;
1075 r.in.info_level = info_level;
1078 if (DEBUGLEVEL >= 10)
1079 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &r);
1081 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);
1083 if (DEBUGLEVEL >= 10)
1084 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r);
1086 if (NT_STATUS_IS_ERR(status)) {
1090 /* Return variables */
1093 return werror_to_ntstatus(r.out.result);
1096 NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info)
1098 struct svcctl_ChangeServiceConfig2W r;
1102 r.in.handle = handle;
1103 r.in.info_level = info_level;
1106 if (DEBUGLEVEL >= 10)
1107 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &r);
1109 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);
1111 if (DEBUGLEVEL >= 10)
1112 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r);
1114 if (NT_STATUS_IS_ERR(status)) {
1118 /* Return variables */
1121 return werror_to_ntstatus(r.out.result);
1124 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)
1126 struct svcctl_QueryServiceConfig2A r;
1130 r.in.handle = handle;
1131 r.in.info_level = info_level;
1132 r.in.buf_size = buf_size;
1134 if (DEBUGLEVEL >= 10)
1135 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r);
1137 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);
1139 if (DEBUGLEVEL >= 10)
1140 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r);
1142 if (NT_STATUS_IS_ERR(status)) {
1146 /* Return variables */
1147 *buffer = *r.out.buffer;
1148 *bytes_needed = *r.out.bytes_needed;
1151 return werror_to_ntstatus(r.out.result);
1154 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)
1156 struct svcctl_QueryServiceConfig2W r;
1160 r.in.handle = handle;
1161 r.in.info_level = info_level;
1162 r.in.buf_size = buf_size;
1164 if (DEBUGLEVEL >= 10)
1165 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r);
1167 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);
1169 if (DEBUGLEVEL >= 10)
1170 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r);
1172 if (NT_STATUS_IS_ERR(status)) {
1176 /* Return variables */
1177 *buffer = *r.out.buffer;
1178 *bytes_needed = *r.out.bytes_needed;
1181 return werror_to_ntstatus(r.out.result);
1184 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)
1186 struct svcctl_QueryServiceStatusEx r;
1190 r.in.handle = handle;
1191 r.in.info_level = info_level;
1192 r.in.buf_size = buf_size;
1194 if (DEBUGLEVEL >= 10)
1195 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r);
1197 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);
1199 if (DEBUGLEVEL >= 10)
1200 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r);
1202 if (NT_STATUS_IS_ERR(status)) {
1206 /* Return variables */
1207 *buffer = *r.out.buffer;
1208 *bytes_needed = *r.out.bytes_needed;
1211 return werror_to_ntstatus(r.out.result);
1214 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)
1216 struct EnumServicesStatusExA r;
1220 r.in.scmanager = scmanager;
1221 r.in.info_level = info_level;
1224 r.in.buf_size = buf_size;
1225 r.in.resume_handle = resume_handle;
1227 if (DEBUGLEVEL >= 10)
1228 NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r);
1230 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);
1232 if (DEBUGLEVEL >= 10)
1233 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r);
1235 if (NT_STATUS_IS_ERR(status)) {
1239 /* Return variables */
1240 *services = *r.out.services;
1241 *bytes_needed = *r.out.bytes_needed;
1242 *service_returned = *r.out.service_returned;
1243 *resume_handle = *r.out.resume_handle;
1244 *group_name = *r.out.group_name;
1247 return werror_to_ntstatus(r.out.result);
1250 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)
1252 struct EnumServicesStatusExW r;
1256 r.in.scmanager = scmanager;
1257 r.in.info_level = info_level;
1260 r.in.buf_size = buf_size;
1261 r.in.resume_handle = resume_handle;
1263 if (DEBUGLEVEL >= 10)
1264 NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r);
1266 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);
1268 if (DEBUGLEVEL >= 10)
1269 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r);
1271 if (NT_STATUS_IS_ERR(status)) {
1275 /* Return variables */
1276 *services = *r.out.services;
1277 *bytes_needed = *r.out.bytes_needed;
1278 *service_returned = *r.out.service_returned;
1279 *resume_handle = *r.out.resume_handle;
1280 *group_name = *r.out.group_name;
1283 return werror_to_ntstatus(r.out.result);
1286 NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
1288 struct svcctl_SCSendTSMessage r;
1293 if (DEBUGLEVEL >= 10)
1294 NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &r);
1296 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);
1298 if (DEBUGLEVEL >= 10)
1299 NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r);
1301 if (NT_STATUS_IS_ERR(status)) {
1305 /* Return variables */
1308 return werror_to_ntstatus(r.out.result);