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,
11 struct policy_handle *handle /* [in,out] [ref] */,
14 struct svcctl_CloseServiceHandle r;
20 if (DEBUGLEVEL >= 10) {
21 NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, &r);
24 status = cli_do_rpc_ndr(cli,
27 NDR_SVCCTL_CLOSESERVICEHANDLE,
30 if (!NT_STATUS_IS_OK(status)) {
34 if (DEBUGLEVEL >= 10) {
35 NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r);
38 if (NT_STATUS_IS_ERR(status)) {
42 /* Return variables */
43 *handle = *r.out.handle;
47 *werror = r.out.result;
50 return werror_to_ntstatus(r.out.result);
53 NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli,
55 struct policy_handle *handle /* [in] [ref] */,
56 uint32_t control /* [in] */,
57 struct SERVICE_STATUS *service_status /* [out] [ref] */,
60 struct svcctl_ControlService r;
65 r.in.control = control;
67 if (DEBUGLEVEL >= 10) {
68 NDR_PRINT_IN_DEBUG(svcctl_ControlService, &r);
71 status = cli_do_rpc_ndr(cli,
74 NDR_SVCCTL_CONTROLSERVICE,
77 if (!NT_STATUS_IS_OK(status)) {
81 if (DEBUGLEVEL >= 10) {
82 NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r);
85 if (NT_STATUS_IS_ERR(status)) {
89 /* Return variables */
90 *service_status = *r.out.service_status;
94 *werror = r.out.result;
97 return werror_to_ntstatus(r.out.result);
100 NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli,
102 struct policy_handle *handle /* [in] [ref] */,
105 struct svcctl_DeleteService r;
109 r.in.handle = handle;
111 if (DEBUGLEVEL >= 10) {
112 NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &r);
115 status = cli_do_rpc_ndr(cli,
118 NDR_SVCCTL_DELETESERVICE,
121 if (!NT_STATUS_IS_OK(status)) {
125 if (DEBUGLEVEL >= 10) {
126 NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r);
129 if (NT_STATUS_IS_ERR(status)) {
133 /* Return variables */
137 *werror = r.out.result;
140 return werror_to_ntstatus(r.out.result);
143 NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli,
145 struct policy_handle *handle /* [in] [ref] */,
146 struct policy_handle *lock /* [out] [ref] */,
149 struct svcctl_LockServiceDatabase r;
153 r.in.handle = handle;
155 if (DEBUGLEVEL >= 10) {
156 NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &r);
159 status = cli_do_rpc_ndr(cli,
162 NDR_SVCCTL_LOCKSERVICEDATABASE,
165 if (!NT_STATUS_IS_OK(status)) {
169 if (DEBUGLEVEL >= 10) {
170 NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r);
173 if (NT_STATUS_IS_ERR(status)) {
177 /* Return variables */
182 *werror = r.out.result;
185 return werror_to_ntstatus(r.out.result);
188 NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli,
190 struct policy_handle *handle /* [in] [ref] */,
191 uint32_t security_flags /* [in] */,
192 uint8_t *buffer /* [out] [ref,size_is(buffer_size)] */,
193 uint32_t buffer_size /* [in] [range(0,0x40000)] */,
194 uint32_t *needed /* [out] [ref,range(0,0x40000)] */,
197 struct svcctl_QueryServiceObjectSecurity r;
201 r.in.handle = handle;
202 r.in.security_flags = security_flags;
203 r.in.buffer_size = buffer_size;
205 if (DEBUGLEVEL >= 10) {
206 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
209 status = cli_do_rpc_ndr(cli,
212 NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY,
215 if (!NT_STATUS_IS_OK(status)) {
219 if (DEBUGLEVEL >= 10) {
220 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r);
223 if (NT_STATUS_IS_ERR(status)) {
227 /* Return variables */
228 memcpy(buffer, r.out.buffer, r.in.buffer_size * sizeof(*buffer));
229 *needed = *r.out.needed;
233 *werror = r.out.result;
236 return werror_to_ntstatus(r.out.result);
239 NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli,
241 struct policy_handle *handle /* [in] [ref] */,
242 uint32_t security_flags /* [in] */,
243 uint8_t *buffer /* [in] [ref,size_is(buffer_size)] */,
244 uint32_t buffer_size /* [in] */,
247 struct svcctl_SetServiceObjectSecurity r;
251 r.in.handle = handle;
252 r.in.security_flags = security_flags;
253 r.in.buffer = buffer;
254 r.in.buffer_size = buffer_size;
256 if (DEBUGLEVEL >= 10) {
257 NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &r);
260 status = cli_do_rpc_ndr(cli,
263 NDR_SVCCTL_SETSERVICEOBJECTSECURITY,
266 if (!NT_STATUS_IS_OK(status)) {
270 if (DEBUGLEVEL >= 10) {
271 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r);
274 if (NT_STATUS_IS_ERR(status)) {
278 /* Return variables */
282 *werror = r.out.result;
285 return werror_to_ntstatus(r.out.result);
288 NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli,
290 struct policy_handle *handle /* [in] [ref] */,
291 struct SERVICE_STATUS *service_status /* [out] [ref] */,
294 struct svcctl_QueryServiceStatus r;
298 r.in.handle = handle;
300 if (DEBUGLEVEL >= 10) {
301 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &r);
304 status = cli_do_rpc_ndr(cli,
307 NDR_SVCCTL_QUERYSERVICESTATUS,
310 if (!NT_STATUS_IS_OK(status)) {
314 if (DEBUGLEVEL >= 10) {
315 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r);
318 if (NT_STATUS_IS_ERR(status)) {
322 /* Return variables */
323 *service_status = *r.out.service_status;
327 *werror = r.out.result;
330 return werror_to_ntstatus(r.out.result);
333 NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli,
337 struct svcctl_SetServiceStatus r;
342 if (DEBUGLEVEL >= 10) {
343 NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &r);
346 status = cli_do_rpc_ndr(cli,
349 NDR_SVCCTL_SETSERVICESTATUS,
352 if (!NT_STATUS_IS_OK(status)) {
356 if (DEBUGLEVEL >= 10) {
357 NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r);
360 if (NT_STATUS_IS_ERR(status)) {
364 /* Return variables */
368 *werror = r.out.result;
371 return werror_to_ntstatus(r.out.result);
374 NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli,
376 struct policy_handle *lock /* [in,out] [ref] */,
379 struct svcctl_UnlockServiceDatabase r;
385 if (DEBUGLEVEL >= 10) {
386 NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, &r);
389 status = cli_do_rpc_ndr(cli,
392 NDR_SVCCTL_UNLOCKSERVICEDATABASE,
395 if (!NT_STATUS_IS_OK(status)) {
399 if (DEBUGLEVEL >= 10) {
400 NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r);
403 if (NT_STATUS_IS_ERR(status)) {
407 /* Return variables */
412 *werror = r.out.result;
415 return werror_to_ntstatus(r.out.result);
418 NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli,
422 struct svcctl_NotifyBootConfigStatus r;
427 if (DEBUGLEVEL >= 10) {
428 NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &r);
431 status = cli_do_rpc_ndr(cli,
434 NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS,
437 if (!NT_STATUS_IS_OK(status)) {
441 if (DEBUGLEVEL >= 10) {
442 NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r);
445 if (NT_STATUS_IS_ERR(status)) {
449 /* Return variables */
453 *werror = r.out.result;
456 return werror_to_ntstatus(r.out.result);
459 NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli,
461 struct policy_handle *handle /* [in] [ref] */,
462 uint32_t bits /* [in] */,
463 uint32_t bitson /* [in] */,
464 uint32_t immediate /* [in] */,
467 struct svcctl_SCSetServiceBitsW r;
471 r.in.handle = handle;
473 r.in.bitson = bitson;
474 r.in.immediate = immediate;
476 if (DEBUGLEVEL >= 10) {
477 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &r);
480 status = cli_do_rpc_ndr(cli,
483 NDR_SVCCTL_SCSETSERVICEBITSW,
486 if (!NT_STATUS_IS_OK(status)) {
490 if (DEBUGLEVEL >= 10) {
491 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r);
494 if (NT_STATUS_IS_ERR(status)) {
498 /* Return variables */
502 *werror = r.out.result;
505 return werror_to_ntstatus(r.out.result);
508 NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli,
510 struct policy_handle *handle /* [in] [ref] */,
511 uint32_t type /* [in] */,
512 uint32_t start /* [in] */,
513 uint32_t error /* [in] */,
514 const char *binary_path /* [in] [unique,charset(UTF16)] */,
515 const char *load_order_group /* [in] [unique,charset(UTF16)] */,
516 uint32_t *tag_id /* [out] [ref] */,
517 const char *dependencies /* [in] [unique,charset(UTF16)] */,
518 const char *service_start_name /* [in] [unique,charset(UTF16)] */,
519 const char *password /* [in] [unique,charset(UTF16)] */,
520 const char *display_name /* [in] [unique,charset(UTF16)] */,
523 struct svcctl_ChangeServiceConfigW r;
527 r.in.handle = handle;
531 r.in.binary_path = binary_path;
532 r.in.load_order_group = load_order_group;
533 r.in.dependencies = dependencies;
534 r.in.service_start_name = service_start_name;
535 r.in.password = password;
536 r.in.display_name = display_name;
538 if (DEBUGLEVEL >= 10) {
539 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &r);
542 status = cli_do_rpc_ndr(cli,
545 NDR_SVCCTL_CHANGESERVICECONFIGW,
548 if (!NT_STATUS_IS_OK(status)) {
552 if (DEBUGLEVEL >= 10) {
553 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r);
556 if (NT_STATUS_IS_ERR(status)) {
560 /* Return variables */
561 *tag_id = *r.out.tag_id;
565 *werror = r.out.result;
568 return werror_to_ntstatus(r.out.result);
571 NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli,
573 struct policy_handle *scmanager_handle /* [in] [ref] */,
574 const char *ServiceName /* [in] [charset(UTF16)] */,
575 const char *DisplayName /* [in] [unique,charset(UTF16)] */,
576 uint32_t desired_access /* [in] */,
577 uint32_t type /* [in] */,
578 uint32_t start_type /* [in] */,
579 uint32_t error_control /* [in] */,
580 const char *binary_path /* [in] [charset(UTF16)] */,
581 const char *LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */,
582 uint32_t *TagId /* [in,out] [unique] */,
583 uint8_t *dependencies /* [in] [unique,size_is(dependencies_size)] */,
584 uint32_t dependencies_size /* [in] */,
585 const char *service_start_name /* [in] [unique,charset(UTF16)] */,
586 uint8_t *password /* [in] [unique,size_is(password_size)] */,
587 uint32_t password_size /* [in] */,
588 struct policy_handle *handle /* [out] [ref] */,
591 struct svcctl_CreateServiceW r;
595 r.in.scmanager_handle = scmanager_handle;
596 r.in.ServiceName = ServiceName;
597 r.in.DisplayName = DisplayName;
598 r.in.desired_access = desired_access;
600 r.in.start_type = start_type;
601 r.in.error_control = error_control;
602 r.in.binary_path = binary_path;
603 r.in.LoadOrderGroupKey = LoadOrderGroupKey;
605 r.in.dependencies = dependencies;
606 r.in.dependencies_size = dependencies_size;
607 r.in.service_start_name = service_start_name;
608 r.in.password = password;
609 r.in.password_size = password_size;
611 if (DEBUGLEVEL >= 10) {
612 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, &r);
615 status = cli_do_rpc_ndr(cli,
618 NDR_SVCCTL_CREATESERVICEW,
621 if (!NT_STATUS_IS_OK(status)) {
625 if (DEBUGLEVEL >= 10) {
626 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r);
629 if (NT_STATUS_IS_ERR(status)) {
633 /* Return variables */
634 if (TagId && r.out.TagId) {
635 *TagId = *r.out.TagId;
637 *handle = *r.out.handle;
641 *werror = r.out.result;
644 return werror_to_ntstatus(r.out.result);
647 NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli,
649 struct policy_handle *service /* [in] [ref] */,
650 uint32_t state /* [in] */,
651 uint8_t *service_status /* [out] [ref,size_is(buf_size)] */,
652 uint32_t buf_size /* [in] [range(0,0x40000)] */,
653 uint32_t *bytes_needed /* [out] [ref,range(0,0x40000)] */,
654 uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */,
657 struct svcctl_EnumDependentServicesW r;
661 r.in.service = service;
663 r.in.buf_size = buf_size;
665 if (DEBUGLEVEL >= 10) {
666 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &r);
669 status = cli_do_rpc_ndr(cli,
672 NDR_SVCCTL_ENUMDEPENDENTSERVICESW,
675 if (!NT_STATUS_IS_OK(status)) {
679 if (DEBUGLEVEL >= 10) {
680 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r);
683 if (NT_STATUS_IS_ERR(status)) {
687 /* Return variables */
688 memcpy(service_status, r.out.service_status, r.in.buf_size * sizeof(*service_status));
689 *bytes_needed = *r.out.bytes_needed;
690 *services_returned = *r.out.services_returned;
694 *werror = r.out.result;
697 return werror_to_ntstatus(r.out.result);
700 NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli,
702 struct policy_handle *handle /* [in] [ref] */,
703 uint32_t type /* [in] */,
704 uint32_t state /* [in] */,
705 uint32_t buf_size /* [in] */,
706 uint8_t *service /* [out] [size_is(buf_size)] */,
707 uint32_t *bytes_needed /* [out] [ref] */,
708 uint32_t *services_returned /* [out] [ref] */,
709 uint32_t *resume_handle /* [in,out] [unique] */,
712 struct svcctl_EnumServicesStatusW r;
716 r.in.handle = handle;
719 r.in.buf_size = buf_size;
720 r.in.resume_handle = resume_handle;
722 if (DEBUGLEVEL >= 10) {
723 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &r);
726 status = cli_do_rpc_ndr(cli,
729 NDR_SVCCTL_ENUMSERVICESSTATUSW,
732 if (!NT_STATUS_IS_OK(status)) {
736 if (DEBUGLEVEL >= 10) {
737 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r);
740 if (NT_STATUS_IS_ERR(status)) {
744 /* Return variables */
745 memcpy(service, r.out.service, r.in.buf_size * sizeof(*service));
746 *bytes_needed = *r.out.bytes_needed;
747 *services_returned = *r.out.services_returned;
748 if (resume_handle && r.out.resume_handle) {
749 *resume_handle = *r.out.resume_handle;
754 *werror = r.out.result;
757 return werror_to_ntstatus(r.out.result);
760 NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli,
762 const char *MachineName /* [in] [unique,charset(UTF16)] */,
763 const char *DatabaseName /* [in] [unique,charset(UTF16)] */,
764 uint32_t access_mask /* [in] */,
765 struct policy_handle *handle /* [out] [ref] */,
768 struct svcctl_OpenSCManagerW r;
772 r.in.MachineName = MachineName;
773 r.in.DatabaseName = DatabaseName;
774 r.in.access_mask = access_mask;
776 if (DEBUGLEVEL >= 10) {
777 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &r);
780 status = cli_do_rpc_ndr(cli,
783 NDR_SVCCTL_OPENSCMANAGERW,
786 if (!NT_STATUS_IS_OK(status)) {
790 if (DEBUGLEVEL >= 10) {
791 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r);
794 if (NT_STATUS_IS_ERR(status)) {
798 /* Return variables */
799 *handle = *r.out.handle;
803 *werror = r.out.result;
806 return werror_to_ntstatus(r.out.result);
809 NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli,
811 struct policy_handle *scmanager_handle /* [in] [ref] */,
812 const char *ServiceName /* [in] [charset(UTF16)] */,
813 uint32_t access_mask /* [in] */,
814 struct policy_handle *handle /* [out] [ref] */,
817 struct svcctl_OpenServiceW r;
821 r.in.scmanager_handle = scmanager_handle;
822 r.in.ServiceName = ServiceName;
823 r.in.access_mask = access_mask;
825 if (DEBUGLEVEL >= 10) {
826 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &r);
829 status = cli_do_rpc_ndr(cli,
832 NDR_SVCCTL_OPENSERVICEW,
835 if (!NT_STATUS_IS_OK(status)) {
839 if (DEBUGLEVEL >= 10) {
840 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r);
843 if (NT_STATUS_IS_ERR(status)) {
847 /* Return variables */
848 *handle = *r.out.handle;
852 *werror = r.out.result;
855 return werror_to_ntstatus(r.out.result);
858 NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli,
860 struct policy_handle *handle /* [in] [ref] */,
861 uint8_t *query /* [out] */,
862 uint32_t buf_size /* [in] */,
863 uint32_t *bytes_needed /* [out] [ref] */,
866 struct svcctl_QueryServiceConfigW r;
870 r.in.handle = handle;
871 r.in.buf_size = buf_size;
873 if (DEBUGLEVEL >= 10) {
874 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &r);
877 status = cli_do_rpc_ndr(cli,
880 NDR_SVCCTL_QUERYSERVICECONFIGW,
883 if (!NT_STATUS_IS_OK(status)) {
887 if (DEBUGLEVEL >= 10) {
888 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r);
891 if (NT_STATUS_IS_ERR(status)) {
895 /* Return variables */
896 memcpy(query, r.out.query, r.in.buf_size * sizeof(*query));
897 *bytes_needed = *r.out.bytes_needed;
901 *werror = r.out.result;
904 return werror_to_ntstatus(r.out.result);
907 NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli,
909 struct policy_handle *handle /* [in] [ref] */,
910 uint32_t buf_size /* [in] */,
911 struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */,
912 uint32_t *required_buf_size /* [out] [ref] */,
915 struct svcctl_QueryServiceLockStatusW r;
919 r.in.handle = handle;
920 r.in.buf_size = buf_size;
922 if (DEBUGLEVEL >= 10) {
923 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &r);
926 status = cli_do_rpc_ndr(cli,
929 NDR_SVCCTL_QUERYSERVICELOCKSTATUSW,
932 if (!NT_STATUS_IS_OK(status)) {
936 if (DEBUGLEVEL >= 10) {
937 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r);
940 if (NT_STATUS_IS_ERR(status)) {
944 /* Return variables */
945 *lock_status = *r.out.lock_status;
946 *required_buf_size = *r.out.required_buf_size;
950 *werror = r.out.result;
953 return werror_to_ntstatus(r.out.result);
956 NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli,
958 struct policy_handle *handle /* [in] [ref] */,
959 uint32_t NumArgs /* [in] */,
960 const char *Arguments /* [in] [unique,charset(UTF16)] */,
963 struct svcctl_StartServiceW r;
967 r.in.handle = handle;
968 r.in.NumArgs = NumArgs;
969 r.in.Arguments = Arguments;
971 if (DEBUGLEVEL >= 10) {
972 NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &r);
975 status = cli_do_rpc_ndr(cli,
978 NDR_SVCCTL_STARTSERVICEW,
981 if (!NT_STATUS_IS_OK(status)) {
985 if (DEBUGLEVEL >= 10) {
986 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r);
989 if (NT_STATUS_IS_ERR(status)) {
993 /* Return variables */
997 *werror = r.out.result;
1000 return werror_to_ntstatus(r.out.result);
1003 NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli,
1004 TALLOC_CTX *mem_ctx,
1005 struct policy_handle *handle /* [in] [ref] */,
1006 const char *service_name /* [in] [unique,charset(UTF16)] */,
1007 const char **display_name /* [out] [ref,charset(UTF16)] */,
1008 uint32_t *display_name_length /* [in,out] [unique] */,
1011 struct svcctl_GetServiceDisplayNameW r;
1015 r.in.handle = handle;
1016 r.in.service_name = service_name;
1017 r.in.display_name_length = display_name_length;
1019 if (DEBUGLEVEL >= 10) {
1020 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &r);
1023 status = cli_do_rpc_ndr(cli,
1026 NDR_SVCCTL_GETSERVICEDISPLAYNAMEW,
1029 if (!NT_STATUS_IS_OK(status)) {
1033 if (DEBUGLEVEL >= 10) {
1034 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r);
1037 if (NT_STATUS_IS_ERR(status)) {
1041 /* Return variables */
1042 *display_name = *r.out.display_name;
1043 if (display_name_length && r.out.display_name_length) {
1044 *display_name_length = *r.out.display_name_length;
1049 *werror = r.out.result;
1052 return werror_to_ntstatus(r.out.result);
1055 NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli,
1056 TALLOC_CTX *mem_ctx,
1057 struct policy_handle *handle /* [in] [ref] */,
1058 const char *service_name /* [in] [unique,charset(UTF16)] */,
1059 const char **key_name /* [out] [ref,charset(UTF16)] */,
1060 uint32_t *display_name_length /* [in,out] [unique] */,
1063 struct svcctl_GetServiceKeyNameW r;
1067 r.in.handle = handle;
1068 r.in.service_name = service_name;
1069 r.in.display_name_length = display_name_length;
1071 if (DEBUGLEVEL >= 10) {
1072 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &r);
1075 status = cli_do_rpc_ndr(cli,
1078 NDR_SVCCTL_GETSERVICEKEYNAMEW,
1081 if (!NT_STATUS_IS_OK(status)) {
1085 if (DEBUGLEVEL >= 10) {
1086 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r);
1089 if (NT_STATUS_IS_ERR(status)) {
1093 /* Return variables */
1094 *key_name = *r.out.key_name;
1095 if (display_name_length && r.out.display_name_length) {
1096 *display_name_length = *r.out.display_name_length;
1101 *werror = r.out.result;
1104 return werror_to_ntstatus(r.out.result);
1107 NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli,
1108 TALLOC_CTX *mem_ctx,
1109 struct policy_handle *handle /* [in] [ref] */,
1110 uint32_t bits /* [in] */,
1111 uint32_t bitson /* [in] */,
1112 uint32_t immediate /* [in] */,
1115 struct svcctl_SCSetServiceBitsA r;
1119 r.in.handle = handle;
1121 r.in.bitson = bitson;
1122 r.in.immediate = immediate;
1124 if (DEBUGLEVEL >= 10) {
1125 NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &r);
1128 status = cli_do_rpc_ndr(cli,
1131 NDR_SVCCTL_SCSETSERVICEBITSA,
1134 if (!NT_STATUS_IS_OK(status)) {
1138 if (DEBUGLEVEL >= 10) {
1139 NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r);
1142 if (NT_STATUS_IS_ERR(status)) {
1146 /* Return variables */
1150 *werror = r.out.result;
1153 return werror_to_ntstatus(r.out.result);
1156 NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli,
1157 TALLOC_CTX *mem_ctx,
1158 struct policy_handle *handle /* [in] [ref] */,
1159 uint32_t type /* [in] */,
1160 uint32_t start /* [in] */,
1161 uint32_t error /* [in] */,
1162 const char *binary_path /* [in] [unique,charset(UTF16)] */,
1163 const char *load_order_group /* [in] [unique,charset(UTF16)] */,
1164 uint32_t *tag_id /* [out] [ref] */,
1165 const char *dependencies /* [in] [unique,charset(UTF16)] */,
1166 const char *service_start_name /* [in] [unique,charset(UTF16)] */,
1167 const char *password /* [in] [unique,charset(UTF16)] */,
1168 const char *display_name /* [in] [unique,charset(UTF16)] */,
1171 struct svcctl_ChangeServiceConfigA r;
1175 r.in.handle = handle;
1179 r.in.binary_path = binary_path;
1180 r.in.load_order_group = load_order_group;
1181 r.in.dependencies = dependencies;
1182 r.in.service_start_name = service_start_name;
1183 r.in.password = password;
1184 r.in.display_name = display_name;
1186 if (DEBUGLEVEL >= 10) {
1187 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &r);
1190 status = cli_do_rpc_ndr(cli,
1193 NDR_SVCCTL_CHANGESERVICECONFIGA,
1196 if (!NT_STATUS_IS_OK(status)) {
1200 if (DEBUGLEVEL >= 10) {
1201 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r);
1204 if (NT_STATUS_IS_ERR(status)) {
1208 /* Return variables */
1209 *tag_id = *r.out.tag_id;
1213 *werror = r.out.result;
1216 return werror_to_ntstatus(r.out.result);
1219 NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli,
1220 TALLOC_CTX *mem_ctx,
1221 struct policy_handle *handle /* [in] [ref] */,
1222 const char *ServiceName /* [in] [unique,charset(UTF16)] */,
1223 const char *DisplayName /* [in] [unique,charset(UTF16)] */,
1224 uint32_t desired_access /* [in] */,
1225 uint32_t type /* [in] */,
1226 uint32_t start_type /* [in] */,
1227 uint32_t error_control /* [in] */,
1228 const char *binary_path /* [in] [unique,charset(UTF16)] */,
1229 const char *LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */,
1230 uint32_t *TagId /* [out] [unique] */,
1231 const char *dependencies /* [in] [unique,charset(UTF16)] */,
1232 const char *service_start_name /* [in] [unique,charset(UTF16)] */,
1233 const char *password /* [in] [unique,charset(UTF16)] */,
1236 struct svcctl_CreateServiceA r;
1240 r.in.handle = handle;
1241 r.in.ServiceName = ServiceName;
1242 r.in.DisplayName = DisplayName;
1243 r.in.desired_access = desired_access;
1245 r.in.start_type = start_type;
1246 r.in.error_control = error_control;
1247 r.in.binary_path = binary_path;
1248 r.in.LoadOrderGroupKey = LoadOrderGroupKey;
1249 r.in.dependencies = dependencies;
1250 r.in.service_start_name = service_start_name;
1251 r.in.password = password;
1253 if (DEBUGLEVEL >= 10) {
1254 NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &r);
1257 status = cli_do_rpc_ndr(cli,
1260 NDR_SVCCTL_CREATESERVICEA,
1263 if (!NT_STATUS_IS_OK(status)) {
1267 if (DEBUGLEVEL >= 10) {
1268 NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r);
1271 if (NT_STATUS_IS_ERR(status)) {
1275 /* Return variables */
1276 if (TagId && r.out.TagId) {
1277 *TagId = *r.out.TagId;
1282 *werror = r.out.result;
1285 return werror_to_ntstatus(r.out.result);
1288 NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli,
1289 TALLOC_CTX *mem_ctx,
1290 struct policy_handle *service /* [in] [ref] */,
1291 uint32_t state /* [in] */,
1292 struct ENUM_SERVICE_STATUS *service_status /* [out] [unique] */,
1293 uint32_t buf_size /* [in] */,
1294 uint32_t *bytes_needed /* [out] [ref] */,
1295 uint32_t *services_returned /* [out] [ref] */,
1298 struct svcctl_EnumDependentServicesA r;
1302 r.in.service = service;
1304 r.in.buf_size = buf_size;
1306 if (DEBUGLEVEL >= 10) {
1307 NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &r);
1310 status = cli_do_rpc_ndr(cli,
1313 NDR_SVCCTL_ENUMDEPENDENTSERVICESA,
1316 if (!NT_STATUS_IS_OK(status)) {
1320 if (DEBUGLEVEL >= 10) {
1321 NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r);
1324 if (NT_STATUS_IS_ERR(status)) {
1328 /* Return variables */
1329 if (service_status && r.out.service_status) {
1330 *service_status = *r.out.service_status;
1332 *bytes_needed = *r.out.bytes_needed;
1333 *services_returned = *r.out.services_returned;
1337 *werror = r.out.result;
1340 return werror_to_ntstatus(r.out.result);
1343 NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli,
1344 TALLOC_CTX *mem_ctx,
1345 struct policy_handle *handle /* [in] [ref] */,
1346 uint32_t type /* [in] */,
1347 uint32_t state /* [in] */,
1348 uint32_t buf_size /* [in] */,
1349 uint8_t *service /* [out] [size_is(buf_size)] */,
1350 uint32_t *bytes_needed /* [out] [ref] */,
1351 uint32_t *services_returned /* [out] [ref] */,
1352 uint32_t *resume_handle /* [in,out] [unique] */,
1355 struct svcctl_EnumServicesStatusA r;
1359 r.in.handle = handle;
1362 r.in.buf_size = buf_size;
1363 r.in.resume_handle = resume_handle;
1365 if (DEBUGLEVEL >= 10) {
1366 NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &r);
1369 status = cli_do_rpc_ndr(cli,
1372 NDR_SVCCTL_ENUMSERVICESSTATUSA,
1375 if (!NT_STATUS_IS_OK(status)) {
1379 if (DEBUGLEVEL >= 10) {
1380 NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r);
1383 if (NT_STATUS_IS_ERR(status)) {
1387 /* Return variables */
1388 memcpy(service, r.out.service, r.in.buf_size * sizeof(*service));
1389 *bytes_needed = *r.out.bytes_needed;
1390 *services_returned = *r.out.services_returned;
1391 if (resume_handle && r.out.resume_handle) {
1392 *resume_handle = *r.out.resume_handle;
1397 *werror = r.out.result;
1400 return werror_to_ntstatus(r.out.result);
1403 NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli,
1404 TALLOC_CTX *mem_ctx,
1405 const char *MachineName /* [in] [unique,charset(UTF16)] */,
1406 const char *DatabaseName /* [in] [unique,charset(UTF16)] */,
1407 uint32_t access_mask /* [in] */,
1408 struct policy_handle *handle /* [out] [ref] */,
1411 struct svcctl_OpenSCManagerA r;
1415 r.in.MachineName = MachineName;
1416 r.in.DatabaseName = DatabaseName;
1417 r.in.access_mask = access_mask;
1419 if (DEBUGLEVEL >= 10) {
1420 NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &r);
1423 status = cli_do_rpc_ndr(cli,
1426 NDR_SVCCTL_OPENSCMANAGERA,
1429 if (!NT_STATUS_IS_OK(status)) {
1433 if (DEBUGLEVEL >= 10) {
1434 NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r);
1437 if (NT_STATUS_IS_ERR(status)) {
1441 /* Return variables */
1442 *handle = *r.out.handle;
1446 *werror = r.out.result;
1449 return werror_to_ntstatus(r.out.result);
1452 NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli,
1453 TALLOC_CTX *mem_ctx,
1454 struct policy_handle *scmanager_handle /* [in] [ref] */,
1455 const char *ServiceName /* [in] [unique,charset(UTF16)] */,
1456 uint32_t access_mask /* [in] */,
1459 struct svcctl_OpenServiceA r;
1463 r.in.scmanager_handle = scmanager_handle;
1464 r.in.ServiceName = ServiceName;
1465 r.in.access_mask = access_mask;
1467 if (DEBUGLEVEL >= 10) {
1468 NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &r);
1471 status = cli_do_rpc_ndr(cli,
1474 NDR_SVCCTL_OPENSERVICEA,
1477 if (!NT_STATUS_IS_OK(status)) {
1481 if (DEBUGLEVEL >= 10) {
1482 NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r);
1485 if (NT_STATUS_IS_ERR(status)) {
1489 /* Return variables */
1493 *werror = r.out.result;
1496 return werror_to_ntstatus(r.out.result);
1499 NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli,
1500 TALLOC_CTX *mem_ctx,
1501 struct policy_handle *handle /* [in] [ref] */,
1502 uint8_t *query /* [out] */,
1503 uint32_t buf_size /* [in] */,
1504 uint32_t *bytes_needed /* [out] [ref] */,
1507 struct svcctl_QueryServiceConfigA r;
1511 r.in.handle = handle;
1512 r.in.buf_size = buf_size;
1514 if (DEBUGLEVEL >= 10) {
1515 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &r);
1518 status = cli_do_rpc_ndr(cli,
1521 NDR_SVCCTL_QUERYSERVICECONFIGA,
1524 if (!NT_STATUS_IS_OK(status)) {
1528 if (DEBUGLEVEL >= 10) {
1529 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r);
1532 if (NT_STATUS_IS_ERR(status)) {
1536 /* Return variables */
1537 memcpy(query, r.out.query, r.in.buf_size * sizeof(*query));
1538 *bytes_needed = *r.out.bytes_needed;
1542 *werror = r.out.result;
1545 return werror_to_ntstatus(r.out.result);
1548 NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli,
1549 TALLOC_CTX *mem_ctx,
1550 struct policy_handle *handle /* [in] [ref] */,
1551 uint32_t buf_size /* [in] */,
1552 struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */,
1553 uint32_t *required_buf_size /* [out] [ref] */,
1556 struct svcctl_QueryServiceLockStatusA r;
1560 r.in.handle = handle;
1561 r.in.buf_size = buf_size;
1563 if (DEBUGLEVEL >= 10) {
1564 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &r);
1567 status = cli_do_rpc_ndr(cli,
1570 NDR_SVCCTL_QUERYSERVICELOCKSTATUSA,
1573 if (!NT_STATUS_IS_OK(status)) {
1577 if (DEBUGLEVEL >= 10) {
1578 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r);
1581 if (NT_STATUS_IS_ERR(status)) {
1585 /* Return variables */
1586 *lock_status = *r.out.lock_status;
1587 *required_buf_size = *r.out.required_buf_size;
1591 *werror = r.out.result;
1594 return werror_to_ntstatus(r.out.result);
1597 NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli,
1598 TALLOC_CTX *mem_ctx,
1599 struct policy_handle *handle /* [in] [ref] */,
1600 uint32_t NumArgs /* [in] */,
1601 const char *Arguments /* [in] [unique,charset(UTF16)] */,
1604 struct svcctl_StartServiceA r;
1608 r.in.handle = handle;
1609 r.in.NumArgs = NumArgs;
1610 r.in.Arguments = Arguments;
1612 if (DEBUGLEVEL >= 10) {
1613 NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &r);
1616 status = cli_do_rpc_ndr(cli,
1619 NDR_SVCCTL_STARTSERVICEA,
1622 if (!NT_STATUS_IS_OK(status)) {
1626 if (DEBUGLEVEL >= 10) {
1627 NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r);
1630 if (NT_STATUS_IS_ERR(status)) {
1634 /* Return variables */
1638 *werror = r.out.result;
1641 return werror_to_ntstatus(r.out.result);
1644 NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli,
1645 TALLOC_CTX *mem_ctx,
1646 struct policy_handle *handle /* [in] [ref] */,
1647 const char *service_name /* [in] [unique,charset(UTF16)] */,
1648 const char **display_name /* [out] [ref,charset(UTF16)] */,
1649 uint32_t *display_name_length /* [in,out] [unique] */,
1652 struct svcctl_GetServiceDisplayNameA r;
1656 r.in.handle = handle;
1657 r.in.service_name = service_name;
1658 r.in.display_name_length = display_name_length;
1660 if (DEBUGLEVEL >= 10) {
1661 NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &r);
1664 status = cli_do_rpc_ndr(cli,
1667 NDR_SVCCTL_GETSERVICEDISPLAYNAMEA,
1670 if (!NT_STATUS_IS_OK(status)) {
1674 if (DEBUGLEVEL >= 10) {
1675 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r);
1678 if (NT_STATUS_IS_ERR(status)) {
1682 /* Return variables */
1683 *display_name = *r.out.display_name;
1684 if (display_name_length && r.out.display_name_length) {
1685 *display_name_length = *r.out.display_name_length;
1690 *werror = r.out.result;
1693 return werror_to_ntstatus(r.out.result);
1696 NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli,
1697 TALLOC_CTX *mem_ctx,
1698 struct policy_handle *handle /* [in] [ref] */,
1699 const char *service_name /* [in] [unique,charset(UTF16)] */,
1700 const char **key_name /* [out] [ref,charset(UTF16)] */,
1701 uint32_t *display_name_length /* [in,out] [unique] */,
1704 struct svcctl_GetServiceKeyNameA r;
1708 r.in.handle = handle;
1709 r.in.service_name = service_name;
1710 r.in.display_name_length = display_name_length;
1712 if (DEBUGLEVEL >= 10) {
1713 NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &r);
1716 status = cli_do_rpc_ndr(cli,
1719 NDR_SVCCTL_GETSERVICEKEYNAMEA,
1722 if (!NT_STATUS_IS_OK(status)) {
1726 if (DEBUGLEVEL >= 10) {
1727 NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r);
1730 if (NT_STATUS_IS_ERR(status)) {
1734 /* Return variables */
1735 *key_name = *r.out.key_name;
1736 if (display_name_length && r.out.display_name_length) {
1737 *display_name_length = *r.out.display_name_length;
1742 *werror = r.out.result;
1745 return werror_to_ntstatus(r.out.result);
1748 NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli,
1749 TALLOC_CTX *mem_ctx,
1752 struct svcctl_GetCurrentGroupeStateW r;
1757 if (DEBUGLEVEL >= 10) {
1758 NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
1761 status = cli_do_rpc_ndr(cli,
1764 NDR_SVCCTL_GETCURRENTGROUPESTATEW,
1767 if (!NT_STATUS_IS_OK(status)) {
1771 if (DEBUGLEVEL >= 10) {
1772 NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r);
1775 if (NT_STATUS_IS_ERR(status)) {
1779 /* Return variables */
1783 *werror = r.out.result;
1786 return werror_to_ntstatus(r.out.result);
1789 NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli,
1790 TALLOC_CTX *mem_ctx,
1793 struct svcctl_EnumServiceGroupW r;
1798 if (DEBUGLEVEL >= 10) {
1799 NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &r);
1802 status = cli_do_rpc_ndr(cli,
1805 NDR_SVCCTL_ENUMSERVICEGROUPW,
1808 if (!NT_STATUS_IS_OK(status)) {
1812 if (DEBUGLEVEL >= 10) {
1813 NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r);
1816 if (NT_STATUS_IS_ERR(status)) {
1820 /* Return variables */
1824 *werror = r.out.result;
1827 return werror_to_ntstatus(r.out.result);
1830 NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli,
1831 TALLOC_CTX *mem_ctx,
1832 struct policy_handle *handle /* [in] [ref] */,
1833 uint32_t info_level /* [in] */,
1834 uint8_t *info /* [in] [unique] */,
1837 struct svcctl_ChangeServiceConfig2A r;
1841 r.in.handle = handle;
1842 r.in.info_level = info_level;
1845 if (DEBUGLEVEL >= 10) {
1846 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &r);
1849 status = cli_do_rpc_ndr(cli,
1852 NDR_SVCCTL_CHANGESERVICECONFIG2A,
1855 if (!NT_STATUS_IS_OK(status)) {
1859 if (DEBUGLEVEL >= 10) {
1860 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r);
1863 if (NT_STATUS_IS_ERR(status)) {
1867 /* Return variables */
1871 *werror = r.out.result;
1874 return werror_to_ntstatus(r.out.result);
1877 NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli,
1878 TALLOC_CTX *mem_ctx,
1879 struct policy_handle *handle /* [in] [ref] */,
1880 uint32_t info_level /* [in] */,
1881 uint8_t *info /* [in] [unique] */,
1884 struct svcctl_ChangeServiceConfig2W r;
1888 r.in.handle = handle;
1889 r.in.info_level = info_level;
1892 if (DEBUGLEVEL >= 10) {
1893 NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &r);
1896 status = cli_do_rpc_ndr(cli,
1899 NDR_SVCCTL_CHANGESERVICECONFIG2W,
1902 if (!NT_STATUS_IS_OK(status)) {
1906 if (DEBUGLEVEL >= 10) {
1907 NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r);
1910 if (NT_STATUS_IS_ERR(status)) {
1914 /* Return variables */
1918 *werror = r.out.result;
1921 return werror_to_ntstatus(r.out.result);
1924 NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli,
1925 TALLOC_CTX *mem_ctx,
1926 struct policy_handle *handle /* [in] [ref] */,
1927 uint32_t info_level /* [in] */,
1928 uint8_t *buffer /* [out] */,
1929 uint32_t buf_size /* [in] */,
1930 uint32_t *bytes_needed /* [out] [ref] */,
1933 struct svcctl_QueryServiceConfig2A r;
1937 r.in.handle = handle;
1938 r.in.info_level = info_level;
1939 r.in.buf_size = buf_size;
1941 if (DEBUGLEVEL >= 10) {
1942 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &r);
1945 status = cli_do_rpc_ndr(cli,
1948 NDR_SVCCTL_QUERYSERVICECONFIG2A,
1951 if (!NT_STATUS_IS_OK(status)) {
1955 if (DEBUGLEVEL >= 10) {
1956 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r);
1959 if (NT_STATUS_IS_ERR(status)) {
1963 /* Return variables */
1964 memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
1965 *bytes_needed = *r.out.bytes_needed;
1969 *werror = r.out.result;
1972 return werror_to_ntstatus(r.out.result);
1975 NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli,
1976 TALLOC_CTX *mem_ctx,
1977 struct policy_handle *handle /* [in] [ref] */,
1978 uint32_t info_level /* [in] */,
1979 uint8_t *buffer /* [out] */,
1980 uint32_t buf_size /* [in] */,
1981 uint32_t *bytes_needed /* [out] [ref] */,
1984 struct svcctl_QueryServiceConfig2W r;
1988 r.in.handle = handle;
1989 r.in.info_level = info_level;
1990 r.in.buf_size = buf_size;
1992 if (DEBUGLEVEL >= 10) {
1993 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &r);
1996 status = cli_do_rpc_ndr(cli,
1999 NDR_SVCCTL_QUERYSERVICECONFIG2W,
2002 if (!NT_STATUS_IS_OK(status)) {
2006 if (DEBUGLEVEL >= 10) {
2007 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r);
2010 if (NT_STATUS_IS_ERR(status)) {
2014 /* Return variables */
2015 memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
2016 *bytes_needed = *r.out.bytes_needed;
2020 *werror = r.out.result;
2023 return werror_to_ntstatus(r.out.result);
2026 NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli,
2027 TALLOC_CTX *mem_ctx,
2028 struct policy_handle *handle /* [in] [ref] */,
2029 uint32_t info_level /* [in] */,
2030 uint8_t *buffer /* [out] */,
2031 uint32_t buf_size /* [in] */,
2032 uint32_t *bytes_needed /* [out] [ref] */,
2035 struct svcctl_QueryServiceStatusEx r;
2039 r.in.handle = handle;
2040 r.in.info_level = info_level;
2041 r.in.buf_size = buf_size;
2043 if (DEBUGLEVEL >= 10) {
2044 NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &r);
2047 status = cli_do_rpc_ndr(cli,
2050 NDR_SVCCTL_QUERYSERVICESTATUSEX,
2053 if (!NT_STATUS_IS_OK(status)) {
2057 if (DEBUGLEVEL >= 10) {
2058 NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r);
2061 if (NT_STATUS_IS_ERR(status)) {
2065 /* Return variables */
2066 memcpy(buffer, r.out.buffer, r.in.buf_size * sizeof(*buffer));
2067 *bytes_needed = *r.out.bytes_needed;
2071 *werror = r.out.result;
2074 return werror_to_ntstatus(r.out.result);
2077 NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli,
2078 TALLOC_CTX *mem_ctx,
2079 struct policy_handle *scmanager /* [in] [ref] */,
2080 uint32_t info_level /* [in] */,
2081 uint32_t type /* [in] */,
2082 uint32_t state /* [in] */,
2083 uint8_t *services /* [out] */,
2084 uint32_t buf_size /* [in] */,
2085 uint32_t *bytes_needed /* [out] [ref] */,
2086 uint32_t *service_returned /* [out] [ref] */,
2087 uint32_t *resume_handle /* [in,out] [unique] */,
2088 const char **group_name /* [out] [ref,charset(UTF16)] */,
2091 struct EnumServicesStatusExA r;
2095 r.in.scmanager = scmanager;
2096 r.in.info_level = info_level;
2099 r.in.buf_size = buf_size;
2100 r.in.resume_handle = resume_handle;
2102 if (DEBUGLEVEL >= 10) {
2103 NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &r);
2106 status = cli_do_rpc_ndr(cli,
2109 NDR_ENUMSERVICESSTATUSEXA,
2112 if (!NT_STATUS_IS_OK(status)) {
2116 if (DEBUGLEVEL >= 10) {
2117 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r);
2120 if (NT_STATUS_IS_ERR(status)) {
2124 /* Return variables */
2125 memcpy(services, r.out.services, r.in.buf_size * sizeof(*services));
2126 *bytes_needed = *r.out.bytes_needed;
2127 *service_returned = *r.out.service_returned;
2128 if (resume_handle && r.out.resume_handle) {
2129 *resume_handle = *r.out.resume_handle;
2131 *group_name = *r.out.group_name;
2135 *werror = r.out.result;
2138 return werror_to_ntstatus(r.out.result);
2141 NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli,
2142 TALLOC_CTX *mem_ctx,
2143 struct policy_handle *scmanager /* [in] [ref] */,
2144 uint32_t info_level /* [in] */,
2145 uint32_t type /* [in] */,
2146 uint32_t state /* [in] */,
2147 uint8_t *services /* [out] */,
2148 uint32_t buf_size /* [in] */,
2149 uint32_t *bytes_needed /* [out] [ref] */,
2150 uint32_t *service_returned /* [out] [ref] */,
2151 uint32_t *resume_handle /* [in,out] [unique] */,
2152 const char **group_name /* [out] [ref,charset(UTF16)] */,
2155 struct EnumServicesStatusExW r;
2159 r.in.scmanager = scmanager;
2160 r.in.info_level = info_level;
2163 r.in.buf_size = buf_size;
2164 r.in.resume_handle = resume_handle;
2166 if (DEBUGLEVEL >= 10) {
2167 NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &r);
2170 status = cli_do_rpc_ndr(cli,
2173 NDR_ENUMSERVICESSTATUSEXW,
2176 if (!NT_STATUS_IS_OK(status)) {
2180 if (DEBUGLEVEL >= 10) {
2181 NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r);
2184 if (NT_STATUS_IS_ERR(status)) {
2188 /* Return variables */
2189 memcpy(services, r.out.services, r.in.buf_size * sizeof(*services));
2190 *bytes_needed = *r.out.bytes_needed;
2191 *service_returned = *r.out.service_returned;
2192 if (resume_handle && r.out.resume_handle) {
2193 *resume_handle = *r.out.resume_handle;
2195 *group_name = *r.out.group_name;
2199 *werror = r.out.result;
2202 return werror_to_ntstatus(r.out.result);
2205 NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli,
2206 TALLOC_CTX *mem_ctx,
2209 struct svcctl_SCSendTSMessage r;
2214 if (DEBUGLEVEL >= 10) {
2215 NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &r);
2218 status = cli_do_rpc_ndr(cli,
2221 NDR_SVCCTL_SCSENDTSMESSAGE,
2224 if (!NT_STATUS_IS_OK(status)) {
2228 if (DEBUGLEVEL >= 10) {
2229 NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r);
2232 if (NT_STATUS_IS_ERR(status)) {
2236 /* Return variables */
2240 *werror = r.out.result;
2243 return werror_to_ntstatus(r.out.result);