helpstring("Service Control")
] interface svcctl
{
+ const int MAX_SERVICE_NAME_LENGTH = 256;
+ const short SC_MAX_DEPEND_SIZE = 4 * 1024;
+ const short SC_MAX_NAME_LENGTH = MAX_SERVICE_NAME_LENGTH + 1;
+ const short SC_MAX_PATH_LENGTH = 32 * 1024;
+ const short SC_MAX_PWD_SIZE = 514;
+ const short SC_MAX_COMPUTER_NAME_LENGTH = 1024;
+ const short SC_MAX_ACCOUNT_NAME_LENGTH = 2 * 1024;
+ const short SC_MAX_COMMENT_LENGTH = 128;
+ const short SC_MAX_ARGUMENT_LENGTH = 1024;
+ const short SC_MAX_ARGUMENTS = 1024;
+
typedef struct {
uint32 is_locked;
[string,charset(UTF16)] uint16 *lock_owner;
[in] svcctl_ErrorControl error_control,
[in,unique] [string,charset(UTF16)] uint16 *binary_path,
[in,unique] [string,charset(UTF16)] uint16 *load_order_group,
- [out,ref] uint32 *tag_id,
- [in,unique] [string,charset(UTF16)] uint16 *dependencies,
- [in,unique] [string,charset(UTF16)] uint16 *service_start_name,
- [in,unique] [string,charset(UTF16)] uint16 *password,
- [in,unique] [string,charset(UTF16)] uint16 *display_name
+ [in,out,unique] uint32 *tag_id,
+ [in,unique,size_is(dwDependSize)] [string,charset(UTF16)] uint16 *dependencies,
+ [in,range(0, SC_MAX_DEPEND_SIZE)] uint32 dwDependSize,
+ [in,unique,range(0, SC_MAX_ACCOUNT_NAME_LENGTH)] [string,charset(UTF16)] uint16 *service_start_name,
+ [in,unique,size_is(dwPwSize)] [string,charset(UTF16)] uint16 *password,
+ [in,range(0, SC_MAX_PWD_SIZE)] uint32 dwPwSize,
+ [in,unique,range(0, SC_MAX_NAME_LENGTH)] [string,charset(UTF16)] uint16 *display_name
);
/*****************/
torture_assert_u32_equal(tctx, r->in.error_control, SVCCTL_SVC_ERROR_NORMAL, "error_control");
torture_assert_str_equal(tctx, r->in.binary_path, NULL, "binary_path");
torture_assert_str_equal(tctx, r->in.load_order_group, NULL, "load_order_group");
+ torture_assert(tctx, r->in.tag_id == NULL, "tag_id");
torture_assert_str_equal(tctx, r->in.dependencies, NULL, "dependencies");
+ torture_assert_u32_equal(tctx, r->in.dwDependSize, 0, "dwDependSize");
torture_assert_str_equal(tctx, r->in.service_start_name, NULL, "service_start_name");
torture_assert_str_equal(tctx, r->in.password, NULL, "password");
+ torture_assert_u32_equal(tctx, r->in.dwPwSize, 0, "dwPwSize");
torture_assert_str_equal(tctx, r->in.display_name, NULL, "display_name");
return true;