WHATSNEW: Remove rpcclient subcommands.
[Samba/bb.git] / librpc / gen_ndr / ndr_svcctl.c
blob4a81cc683ccaeda185aef93a005d13204bb0d57c
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_svcctl.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 static enum ndr_err_code ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_LOCK_STATUS *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 5));
12 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_locked));
13 NDR_CHECK(ndr_push_unique_ptr(ndr, r->lock_owner));
14 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_duration));
15 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
17 if (ndr_flags & NDR_BUFFERS) {
18 if (r->lock_owner) {
19 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
20 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
21 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
22 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lock_owner, ndr_charset_length(r->lock_owner, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25 return NDR_ERR_SUCCESS;
28 static enum ndr_err_code ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_LOCK_STATUS *r)
30 uint32_t _ptr_lock_owner;
31 TALLOC_CTX *_mem_save_lock_owner_0;
32 if (ndr_flags & NDR_SCALARS) {
33 NDR_CHECK(ndr_pull_align(ndr, 5));
34 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_locked));
35 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lock_owner));
36 if (_ptr_lock_owner) {
37 NDR_PULL_ALLOC(ndr, r->lock_owner);
38 } else {
39 r->lock_owner = NULL;
41 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_duration));
42 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
44 if (ndr_flags & NDR_BUFFERS) {
45 if (r->lock_owner) {
46 _mem_save_lock_owner_0 = NDR_PULL_GET_MEM_CTX(ndr);
47 NDR_PULL_SET_MEM_CTX(ndr, r->lock_owner, 0);
48 NDR_CHECK(ndr_pull_array_size(ndr, &r->lock_owner));
49 NDR_CHECK(ndr_pull_array_length(ndr, &r->lock_owner));
50 if (ndr_get_array_length(ndr, &r->lock_owner) > ndr_get_array_size(ndr, &r->lock_owner)) {
51 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->lock_owner), ndr_get_array_length(ndr, &r->lock_owner));
53 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t)));
54 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lock_owner, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t), CH_UTF16));
55 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_owner_0, 0);
58 return NDR_ERR_SUCCESS;
61 _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r)
63 ndr_print_struct(ndr, name, "SERVICE_LOCK_STATUS");
64 ndr->depth++;
65 ndr_print_uint32(ndr, "is_locked", r->is_locked);
66 ndr_print_ptr(ndr, "lock_owner", r->lock_owner);
67 ndr->depth++;
68 if (r->lock_owner) {
69 ndr_print_string(ndr, "lock_owner", r->lock_owner);
71 ndr->depth--;
72 ndr_print_uint32(ndr, "lock_duration", r->lock_duration);
73 ndr->depth--;
76 static enum ndr_err_code ndr_push_svcctl_ServiceStatus(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceStatus r)
78 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
79 return NDR_ERR_SUCCESS;
82 static enum ndr_err_code ndr_pull_svcctl_ServiceStatus(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceStatus *r)
84 uint32_t v;
85 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
86 *r = v;
87 return NDR_ERR_SUCCESS;
90 _PUBLIC_ void ndr_print_svcctl_ServiceStatus(struct ndr_print *ndr, const char *name, enum svcctl_ServiceStatus r)
92 const char *val = NULL;
94 switch (r) {
95 case SVCCTL_STATE_UNKNOWN: val = "SVCCTL_STATE_UNKNOWN"; break;
96 case SVCCTL_STOPPED: val = "SVCCTL_STOPPED"; break;
97 case SVCCTL_START_PENDING: val = "SVCCTL_START_PENDING"; break;
98 case SVCCTL_STOP_PENDING: val = "SVCCTL_STOP_PENDING"; break;
99 case SVCCTL_RUNNING: val = "SVCCTL_RUNNING"; break;
100 case SVCCTL_CONTINUE_PENDING: val = "SVCCTL_CONTINUE_PENDING"; break;
101 case SVCCTL_PAUSE_PENDING: val = "SVCCTL_PAUSE_PENDING"; break;
102 case SVCCTL_PAUSED: val = "SVCCTL_PAUSED"; break;
104 ndr_print_enum(ndr, name, "ENUM", val, r);
107 static enum ndr_err_code ndr_push_svcctl_ControlsAccepted(struct ndr_push *ndr, int ndr_flags, uint32_t r)
109 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
110 return NDR_ERR_SUCCESS;
113 static enum ndr_err_code ndr_pull_svcctl_ControlsAccepted(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
115 uint32_t v;
116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
117 *r = v;
118 return NDR_ERR_SUCCESS;
121 _PUBLIC_ void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const char *name, uint32_t r)
123 ndr_print_uint32(ndr, name, r);
124 ndr->depth++;
125 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_STOP", SVCCTL_ACCEPT_STOP, r);
126 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PAUSE_CONTINUE", SVCCTL_ACCEPT_PAUSE_CONTINUE, r);
127 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_SHUTDOWN", SVCCTL_ACCEPT_SHUTDOWN, r);
128 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PARAMCHANGE", SVCCTL_ACCEPT_PARAMCHANGE, r);
129 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NETBINDCHANGE", SVCCTL_ACCEPT_NETBINDCHANGE, r);
130 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_HARDWAREPROFILECHANGE", SVCCTL_ACCEPT_HARDWAREPROFILECHANGE, r);
131 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_POWEREVENT", SVCCTL_ACCEPT_POWEREVENT, r);
132 ndr->depth--;
135 static enum ndr_err_code ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r)
137 if (ndr_flags & NDR_SCALARS) {
138 NDR_CHECK(ndr_push_align(ndr, 4));
139 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
140 NDR_CHECK(ndr_push_svcctl_ServiceStatus(ndr, NDR_SCALARS, r->state));
141 NDR_CHECK(ndr_push_svcctl_ControlsAccepted(ndr, NDR_SCALARS, r->controls_accepted));
142 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->win32_exit_code));
143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code));
144 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point));
145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wait_hint));
146 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
148 if (ndr_flags & NDR_BUFFERS) {
150 return NDR_ERR_SUCCESS;
153 static enum ndr_err_code ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS *r)
155 if (ndr_flags & NDR_SCALARS) {
156 NDR_CHECK(ndr_pull_align(ndr, 4));
157 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
158 NDR_CHECK(ndr_pull_svcctl_ServiceStatus(ndr, NDR_SCALARS, &r->state));
159 NDR_CHECK(ndr_pull_svcctl_ControlsAccepted(ndr, NDR_SCALARS, &r->controls_accepted));
160 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->win32_exit_code));
161 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code));
162 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point));
163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wait_hint));
164 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
166 if (ndr_flags & NDR_BUFFERS) {
168 return NDR_ERR_SUCCESS;
171 _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r)
173 ndr_print_struct(ndr, name, "SERVICE_STATUS");
174 ndr->depth++;
175 ndr_print_uint32(ndr, "type", r->type);
176 ndr_print_svcctl_ServiceStatus(ndr, "state", r->state);
177 ndr_print_svcctl_ControlsAccepted(ndr, "controls_accepted", r->controls_accepted);
178 ndr_print_WERROR(ndr, "win32_exit_code", r->win32_exit_code);
179 ndr_print_uint32(ndr, "service_exit_code", r->service_exit_code);
180 ndr_print_uint32(ndr, "check_point", r->check_point);
181 ndr_print_uint32(ndr, "wait_hint", r->wait_hint);
182 ndr->depth--;
185 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS_PROCESS *r)
187 if (ndr_flags & NDR_SCALARS) {
188 NDR_CHECK(ndr_push_align(ndr, 4));
189 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->process_id));
191 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_flags));
192 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
194 if (ndr_flags & NDR_BUFFERS) {
196 return NDR_ERR_SUCCESS;
199 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS_PROCESS *r)
201 if (ndr_flags & NDR_SCALARS) {
202 NDR_CHECK(ndr_pull_align(ndr, 4));
203 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
204 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->process_id));
205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_flags));
206 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
208 if (ndr_flags & NDR_BUFFERS) {
210 return NDR_ERR_SUCCESS;
213 _PUBLIC_ void ndr_print_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS_PROCESS *r)
215 ndr_print_struct(ndr, name, "SERVICE_STATUS_PROCESS");
216 ndr->depth++;
217 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
218 ndr_print_uint32(ndr, "process_id", r->process_id);
219 ndr_print_uint32(ndr, "service_flags", r->service_flags);
220 ndr->depth--;
223 _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSW *r)
225 if (ndr_flags & NDR_SCALARS) {
226 NDR_CHECK(ndr_push_align(ndr, 5));
228 uint32_t _flags_save_string = ndr->flags;
229 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
230 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
231 ndr->flags = _flags_save_string;
234 uint32_t _flags_save_string = ndr->flags;
235 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
236 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
237 ndr->flags = _flags_save_string;
239 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
240 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
242 if (ndr_flags & NDR_BUFFERS) {
244 uint32_t _flags_save_string = ndr->flags;
245 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
246 if (r->service_name) {
247 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->service_name));
248 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
250 ndr->flags = _flags_save_string;
253 uint32_t _flags_save_string = ndr->flags;
254 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
255 if (r->display_name) {
256 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->display_name));
257 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
259 ndr->flags = _flags_save_string;
262 return NDR_ERR_SUCCESS;
265 _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSW *r)
267 uint32_t _ptr_service_name;
268 TALLOC_CTX *_mem_save_service_name_0;
269 uint32_t _ptr_display_name;
270 TALLOC_CTX *_mem_save_display_name_0;
271 if (ndr_flags & NDR_SCALARS) {
272 NDR_CHECK(ndr_pull_align(ndr, 5));
274 uint32_t _flags_save_string = ndr->flags;
275 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
276 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
277 if (_ptr_service_name) {
278 NDR_PULL_ALLOC(ndr, r->service_name);
279 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
280 } else {
281 r->service_name = NULL;
283 ndr->flags = _flags_save_string;
286 uint32_t _flags_save_string = ndr->flags;
287 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
288 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
289 if (_ptr_display_name) {
290 NDR_PULL_ALLOC(ndr, r->display_name);
291 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
292 } else {
293 r->display_name = NULL;
295 ndr->flags = _flags_save_string;
297 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
298 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
300 if (ndr_flags & NDR_BUFFERS) {
302 uint32_t _flags_save_string = ndr->flags;
303 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
304 if (r->service_name) {
305 uint32_t _relative_save_offset;
306 _relative_save_offset = ndr->offset;
307 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
308 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
309 NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
310 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
311 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
312 ndr->offset = _relative_save_offset;
314 ndr->flags = _flags_save_string;
317 uint32_t _flags_save_string = ndr->flags;
318 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
319 if (r->display_name) {
320 uint32_t _relative_save_offset;
321 _relative_save_offset = ndr->offset;
322 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
323 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
324 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
325 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
326 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
327 ndr->offset = _relative_save_offset;
329 ndr->flags = _flags_save_string;
332 return NDR_ERR_SUCCESS;
335 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSW *r)
337 ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSW");
338 ndr->depth++;
339 ndr_print_ptr(ndr, "service_name", r->service_name);
340 ndr->depth++;
341 if (r->service_name) {
342 ndr_print_string(ndr, "service_name", r->service_name);
344 ndr->depth--;
345 ndr_print_ptr(ndr, "display_name", r->display_name);
346 ndr->depth++;
347 if (r->display_name) {
348 ndr_print_string(ndr, "display_name", r->display_name);
350 ndr->depth--;
351 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
352 ndr->depth--;
355 _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, struct smb_iconv_convenience *ic, int flags)
357 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSW, ic);
360 _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSA *r)
362 if (ndr_flags & NDR_SCALARS) {
363 NDR_CHECK(ndr_push_align(ndr, 5));
365 uint32_t _flags_save_string = ndr->flags;
366 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
367 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
368 ndr->flags = _flags_save_string;
371 uint32_t _flags_save_string = ndr->flags;
372 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
373 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
374 ndr->flags = _flags_save_string;
376 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
377 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
379 if (ndr_flags & NDR_BUFFERS) {
381 uint32_t _flags_save_string = ndr->flags;
382 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
383 if (r->service_name) {
384 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->service_name));
385 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
387 ndr->flags = _flags_save_string;
390 uint32_t _flags_save_string = ndr->flags;
391 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
392 if (r->display_name) {
393 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->display_name));
394 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
396 ndr->flags = _flags_save_string;
399 return NDR_ERR_SUCCESS;
402 _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSA *r)
404 uint32_t _ptr_service_name;
405 TALLOC_CTX *_mem_save_service_name_0;
406 uint32_t _ptr_display_name;
407 TALLOC_CTX *_mem_save_display_name_0;
408 if (ndr_flags & NDR_SCALARS) {
409 NDR_CHECK(ndr_pull_align(ndr, 5));
411 uint32_t _flags_save_string = ndr->flags;
412 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
413 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
414 if (_ptr_service_name) {
415 NDR_PULL_ALLOC(ndr, r->service_name);
416 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
417 } else {
418 r->service_name = NULL;
420 ndr->flags = _flags_save_string;
423 uint32_t _flags_save_string = ndr->flags;
424 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
426 if (_ptr_display_name) {
427 NDR_PULL_ALLOC(ndr, r->display_name);
428 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
429 } else {
430 r->display_name = NULL;
432 ndr->flags = _flags_save_string;
434 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
435 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
437 if (ndr_flags & NDR_BUFFERS) {
439 uint32_t _flags_save_string = ndr->flags;
440 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
441 if (r->service_name) {
442 uint32_t _relative_save_offset;
443 _relative_save_offset = ndr->offset;
444 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
445 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
446 NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
447 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
449 ndr->offset = _relative_save_offset;
451 ndr->flags = _flags_save_string;
454 uint32_t _flags_save_string = ndr->flags;
455 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
456 if (r->display_name) {
457 uint32_t _relative_save_offset;
458 _relative_save_offset = ndr->offset;
459 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
460 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
461 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
462 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
463 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
464 ndr->offset = _relative_save_offset;
466 ndr->flags = _flags_save_string;
469 return NDR_ERR_SUCCESS;
472 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSA *r)
474 ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSA");
475 ndr->depth++;
476 ndr_print_ptr(ndr, "service_name", r->service_name);
477 ndr->depth++;
478 if (r->service_name) {
479 ndr_print_string(ndr, "service_name", r->service_name);
481 ndr->depth--;
482 ndr_print_ptr(ndr, "display_name", r->display_name);
483 ndr->depth++;
484 if (r->display_name) {
485 ndr_print_string(ndr, "display_name", r->display_name);
487 ndr->depth--;
488 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
489 ndr->depth--;
492 _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA *r, struct smb_iconv_convenience *ic, int flags)
494 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSA, ic);
497 _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
500 return NDR_ERR_SUCCESS;
503 _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
505 uint32_t v;
506 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
507 *r = v;
508 return NDR_ERR_SUCCESS;
511 _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r)
513 ndr_print_uint32(ndr, name, r);
514 ndr->depth++;
515 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WORKSTATION", SV_TYPE_WORKSTATION, r);
516 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER", SV_TYPE_SERVER, r);
517 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SQLSERVER", SV_TYPE_SQLSERVER, r);
518 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_CTRL", SV_TYPE_DOMAIN_CTRL, r);
519 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_BAKCTRL", SV_TYPE_DOMAIN_BAKCTRL, r);
520 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_TIME_SOURCE", SV_TYPE_TIME_SOURCE, r);
521 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_AFP", SV_TYPE_AFP, r);
522 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NOVELL", SV_TYPE_NOVELL, r);
523 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MEMBER", SV_TYPE_DOMAIN_MEMBER, r);
524 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_PRINTQ_SERVER", SV_TYPE_PRINTQ_SERVER, r);
525 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DIALIN_SERVER", SV_TYPE_DIALIN_SERVER, r);
526 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_UNIX", SV_TYPE_SERVER_UNIX, r);
527 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NT", SV_TYPE_NT, r);
528 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WFW", SV_TYPE_WFW, r);
529 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_MFPN", SV_TYPE_SERVER_MFPN, r);
530 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_NT", SV_TYPE_SERVER_NT, r);
531 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_POTENTIAL_BROWSER", SV_TYPE_POTENTIAL_BROWSER, r);
532 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_BACKUP_BROWSER", SV_TYPE_BACKUP_BROWSER, r);
533 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_MASTER_BROWSER", SV_TYPE_MASTER_BROWSER, r);
534 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MASTER", SV_TYPE_DOMAIN_MASTER, r);
535 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_OSF", SV_TYPE_SERVER_OSF, r);
536 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_VMS", SV_TYPE_SERVER_VMS, r);
537 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WIN95_PLUS", SV_TYPE_WIN95_PLUS, r);
538 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DFS_SERVER", SV_TYPE_DFS_SERVER, r);
539 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_ALTERNATE_XPORT", SV_TYPE_ALTERNATE_XPORT, r);
540 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_LOCAL_LIST_ONLY", SV_TYPE_LOCAL_LIST_ONLY, r);
541 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_ENUM", SV_TYPE_DOMAIN_ENUM, r);
542 ndr->depth--;
545 static enum ndr_err_code ndr_push_SERVICE_CONTROL(struct ndr_push *ndr, int ndr_flags, enum SERVICE_CONTROL r)
547 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
548 return NDR_ERR_SUCCESS;
551 static enum ndr_err_code ndr_pull_SERVICE_CONTROL(struct ndr_pull *ndr, int ndr_flags, enum SERVICE_CONTROL *r)
553 uint32_t v;
554 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
555 *r = v;
556 return NDR_ERR_SUCCESS;
559 _PUBLIC_ void ndr_print_SERVICE_CONTROL(struct ndr_print *ndr, const char *name, enum SERVICE_CONTROL r)
561 const char *val = NULL;
563 switch (r) {
564 case SVCCTL_CONTROL_STOP: val = "SVCCTL_CONTROL_STOP"; break;
565 case SVCCTL_CONTROL_PAUSE: val = "SVCCTL_CONTROL_PAUSE"; break;
566 case SVCCTL_CONTROL_CONTINUE: val = "SVCCTL_CONTROL_CONTINUE"; break;
567 case SVCCTL_CONTROL_INTERROGATE: val = "SVCCTL_CONTROL_INTERROGATE"; break;
568 case SVCCTL_CONTROL_SHUTDOWN: val = "SVCCTL_CONTROL_SHUTDOWN"; break;
570 ndr_print_enum(ndr, name, "ENUM", val, r);
573 static enum ndr_err_code ndr_push_svcctl_ErrorControl(struct ndr_push *ndr, int ndr_flags, enum svcctl_ErrorControl r)
575 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
576 return NDR_ERR_SUCCESS;
579 static enum ndr_err_code ndr_pull_svcctl_ErrorControl(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ErrorControl *r)
581 uint32_t v;
582 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
583 *r = v;
584 return NDR_ERR_SUCCESS;
587 _PUBLIC_ void ndr_print_svcctl_ErrorControl(struct ndr_print *ndr, const char *name, enum svcctl_ErrorControl r)
589 const char *val = NULL;
591 switch (r) {
592 case SVCCTL_SVC_ERROR_IGNORE: val = "SVCCTL_SVC_ERROR_IGNORE"; break;
593 case SVCCTL_SVC_ERROR_NORMAL: val = "SVCCTL_SVC_ERROR_NORMAL"; break;
594 case SVCCTL_SVC_ERROR_CRITICAL: val = "SVCCTL_SVC_ERROR_CRITICAL"; break;
595 case SVCCTL_SVC_ERROR_SEVERE: val = "SVCCTL_SVC_ERROR_SEVERE"; break;
597 ndr_print_enum(ndr, name, "ENUM", val, r);
600 static enum ndr_err_code ndr_push_svcctl_StartType(struct ndr_push *ndr, int ndr_flags, enum svcctl_StartType r)
602 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
603 return NDR_ERR_SUCCESS;
606 static enum ndr_err_code ndr_pull_svcctl_StartType(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StartType *r)
608 uint32_t v;
609 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
610 *r = v;
611 return NDR_ERR_SUCCESS;
614 _PUBLIC_ void ndr_print_svcctl_StartType(struct ndr_print *ndr, const char *name, enum svcctl_StartType r)
616 const char *val = NULL;
618 switch (r) {
619 case SVCCTL_BOOT_START: val = "SVCCTL_BOOT_START"; break;
620 case SVCCTL_SYSTEM_START: val = "SVCCTL_SYSTEM_START"; break;
621 case SVCCTL_AUTO_START: val = "SVCCTL_AUTO_START"; break;
622 case SVCCTL_DEMAND_START: val = "SVCCTL_DEMAND_START"; break;
623 case SVCCTL_DISABLED: val = "SVCCTL_DISABLED"; break;
625 ndr_print_enum(ndr, name, "ENUM", val, r);
628 static enum ndr_err_code ndr_push_svcctl_ServiceState(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceState r)
630 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
631 return NDR_ERR_SUCCESS;
634 static enum ndr_err_code ndr_pull_svcctl_ServiceState(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceState *r)
636 uint32_t v;
637 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
638 *r = v;
639 return NDR_ERR_SUCCESS;
642 _PUBLIC_ void ndr_print_svcctl_ServiceState(struct ndr_print *ndr, const char *name, enum svcctl_ServiceState r)
644 const char *val = NULL;
646 switch (r) {
647 case SERVICE_STATE_ACTIVE: val = "SERVICE_STATE_ACTIVE"; break;
648 case SERVICE_STATE_INACTIVE: val = "SERVICE_STATE_INACTIVE"; break;
649 case SERVICE_STATE_ALL: val = "SERVICE_STATE_ALL"; break;
651 ndr_print_enum(ndr, name, "ENUM", val, r);
654 static enum ndr_err_code ndr_push_svcctl_MgrAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
656 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
657 return NDR_ERR_SUCCESS;
660 static enum ndr_err_code ndr_pull_svcctl_MgrAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
662 uint32_t v;
663 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
664 *r = v;
665 return NDR_ERR_SUCCESS;
668 _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
670 ndr_print_uint32(ndr, name, r);
671 ndr->depth++;
672 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CONNECT", SC_RIGHT_MGR_CONNECT, r);
673 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CREATE_SERVICE", SC_RIGHT_MGR_CREATE_SERVICE, r);
674 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_ENUMERATE_SERVICE", SC_RIGHT_MGR_ENUMERATE_SERVICE, r);
675 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_LOCK", SC_RIGHT_MGR_LOCK, r);
676 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_QUERY_LOCK_STATUS", SC_RIGHT_MGR_QUERY_LOCK_STATUS, r);
677 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_MODIFY_BOOT_CONFIG", SC_RIGHT_MGR_MODIFY_BOOT_CONFIG, r);
678 ndr->depth--;
681 static enum ndr_err_code ndr_push_svcctl_ServiceAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
683 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
684 return NDR_ERR_SUCCESS;
687 static enum ndr_err_code ndr_pull_svcctl_ServiceAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
689 uint32_t v;
690 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
691 *r = v;
692 return NDR_ERR_SUCCESS;
695 _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
697 ndr_print_uint32(ndr, name, r);
698 ndr->depth++;
699 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_CONFIG", SC_RIGHT_SVC_QUERY_CONFIG, r);
700 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_CHANGE_CONFIG", SC_RIGHT_SVC_CHANGE_CONFIG, r);
701 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_STATUS", SC_RIGHT_SVC_QUERY_STATUS, r);
702 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_ENUMERATE_DEPENDENTS", SC_RIGHT_SVC_ENUMERATE_DEPENDENTS, r);
703 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_START", SC_RIGHT_SVC_START, r);
704 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_STOP", SC_RIGHT_SVC_STOP, r);
705 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_PAUSE_CONTINUE", SC_RIGHT_SVC_PAUSE_CONTINUE, r);
706 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_INTERROGATE", SC_RIGHT_SVC_INTERROGATE, r);
707 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_USER_DEFINED_CONTROL", SC_RIGHT_SVC_USER_DEFINED_CONTROL, r);
708 ndr->depth--;
711 _PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r)
713 if (ndr_flags & NDR_SCALARS) {
714 NDR_CHECK(ndr_push_align(ndr, 5));
715 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_type));
716 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->start_type));
717 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->error_control));
718 NDR_CHECK(ndr_push_unique_ptr(ndr, r->executablepath));
719 NDR_CHECK(ndr_push_unique_ptr(ndr, r->loadordergroup));
720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tag_id));
721 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies));
722 NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname));
723 NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname));
724 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
726 if (ndr_flags & NDR_BUFFERS) {
727 if (r->executablepath) {
728 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
729 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
730 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
731 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->executablepath, ndr_charset_length(r->executablepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
733 if (r->loadordergroup) {
734 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
735 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
736 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
737 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->loadordergroup, ndr_charset_length(r->loadordergroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
739 if (r->dependencies) {
740 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
741 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
742 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
743 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dependencies, ndr_charset_length(r->dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
745 if (r->startname) {
746 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
747 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
748 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
749 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->startname, ndr_charset_length(r->startname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
751 if (r->displayname) {
752 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
753 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
754 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
755 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->displayname, ndr_charset_length(r->displayname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
758 return NDR_ERR_SUCCESS;
761 _PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r)
763 uint32_t _ptr_executablepath;
764 TALLOC_CTX *_mem_save_executablepath_0;
765 uint32_t _ptr_loadordergroup;
766 TALLOC_CTX *_mem_save_loadordergroup_0;
767 uint32_t _ptr_dependencies;
768 TALLOC_CTX *_mem_save_dependencies_0;
769 uint32_t _ptr_startname;
770 TALLOC_CTX *_mem_save_startname_0;
771 uint32_t _ptr_displayname;
772 TALLOC_CTX *_mem_save_displayname_0;
773 if (ndr_flags & NDR_SCALARS) {
774 NDR_CHECK(ndr_pull_align(ndr, 5));
775 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_type));
776 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->start_type));
777 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->error_control));
778 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_executablepath));
779 if (_ptr_executablepath) {
780 NDR_PULL_ALLOC(ndr, r->executablepath);
781 } else {
782 r->executablepath = NULL;
784 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_loadordergroup));
785 if (_ptr_loadordergroup) {
786 NDR_PULL_ALLOC(ndr, r->loadordergroup);
787 } else {
788 r->loadordergroup = NULL;
790 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tag_id));
791 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
792 if (_ptr_dependencies) {
793 NDR_PULL_ALLOC(ndr, r->dependencies);
794 } else {
795 r->dependencies = NULL;
797 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_startname));
798 if (_ptr_startname) {
799 NDR_PULL_ALLOC(ndr, r->startname);
800 } else {
801 r->startname = NULL;
803 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayname));
804 if (_ptr_displayname) {
805 NDR_PULL_ALLOC(ndr, r->displayname);
806 } else {
807 r->displayname = NULL;
809 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
811 if (ndr_flags & NDR_BUFFERS) {
812 if (r->executablepath) {
813 _mem_save_executablepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
814 NDR_PULL_SET_MEM_CTX(ndr, r->executablepath, 0);
815 NDR_CHECK(ndr_pull_array_size(ndr, &r->executablepath));
816 NDR_CHECK(ndr_pull_array_length(ndr, &r->executablepath));
817 if (ndr_get_array_length(ndr, &r->executablepath) > ndr_get_array_size(ndr, &r->executablepath)) {
818 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->executablepath), ndr_get_array_length(ndr, &r->executablepath));
820 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t)));
821 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->executablepath, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t), CH_UTF16));
822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_executablepath_0, 0);
824 if (r->loadordergroup) {
825 _mem_save_loadordergroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
826 NDR_PULL_SET_MEM_CTX(ndr, r->loadordergroup, 0);
827 NDR_CHECK(ndr_pull_array_size(ndr, &r->loadordergroup));
828 NDR_CHECK(ndr_pull_array_length(ndr, &r->loadordergroup));
829 if (ndr_get_array_length(ndr, &r->loadordergroup) > ndr_get_array_size(ndr, &r->loadordergroup)) {
830 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->loadordergroup), ndr_get_array_length(ndr, &r->loadordergroup));
832 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t)));
833 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->loadordergroup, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t), CH_UTF16));
834 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_loadordergroup_0, 0);
836 if (r->dependencies) {
837 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
838 NDR_PULL_SET_MEM_CTX(ndr, r->dependencies, 0);
839 NDR_CHECK(ndr_pull_array_size(ndr, &r->dependencies));
840 NDR_CHECK(ndr_pull_array_length(ndr, &r->dependencies));
841 if (ndr_get_array_length(ndr, &r->dependencies) > ndr_get_array_size(ndr, &r->dependencies)) {
842 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dependencies), ndr_get_array_length(ndr, &r->dependencies));
844 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t)));
845 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dependencies, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t), CH_UTF16));
846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
848 if (r->startname) {
849 _mem_save_startname_0 = NDR_PULL_GET_MEM_CTX(ndr);
850 NDR_PULL_SET_MEM_CTX(ndr, r->startname, 0);
851 NDR_CHECK(ndr_pull_array_size(ndr, &r->startname));
852 NDR_CHECK(ndr_pull_array_length(ndr, &r->startname));
853 if (ndr_get_array_length(ndr, &r->startname) > ndr_get_array_size(ndr, &r->startname)) {
854 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->startname), ndr_get_array_length(ndr, &r->startname));
856 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t)));
857 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->startname, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t), CH_UTF16));
858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_startname_0, 0);
860 if (r->displayname) {
861 _mem_save_displayname_0 = NDR_PULL_GET_MEM_CTX(ndr);
862 NDR_PULL_SET_MEM_CTX(ndr, r->displayname, 0);
863 NDR_CHECK(ndr_pull_array_size(ndr, &r->displayname));
864 NDR_CHECK(ndr_pull_array_length(ndr, &r->displayname));
865 if (ndr_get_array_length(ndr, &r->displayname) > ndr_get_array_size(ndr, &r->displayname)) {
866 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->displayname), ndr_get_array_length(ndr, &r->displayname));
868 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t)));
869 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->displayname, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t), CH_UTF16));
870 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayname_0, 0);
873 return NDR_ERR_SUCCESS;
876 _PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r)
878 ndr_print_struct(ndr, name, "QUERY_SERVICE_CONFIG");
879 ndr->depth++;
880 ndr_print_uint32(ndr, "service_type", r->service_type);
881 ndr_print_svcctl_StartType(ndr, "start_type", r->start_type);
882 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->error_control);
883 ndr_print_ptr(ndr, "executablepath", r->executablepath);
884 ndr->depth++;
885 if (r->executablepath) {
886 ndr_print_string(ndr, "executablepath", r->executablepath);
888 ndr->depth--;
889 ndr_print_ptr(ndr, "loadordergroup", r->loadordergroup);
890 ndr->depth++;
891 if (r->loadordergroup) {
892 ndr_print_string(ndr, "loadordergroup", r->loadordergroup);
894 ndr->depth--;
895 ndr_print_uint32(ndr, "tag_id", r->tag_id);
896 ndr_print_ptr(ndr, "dependencies", r->dependencies);
897 ndr->depth++;
898 if (r->dependencies) {
899 ndr_print_string(ndr, "dependencies", r->dependencies);
901 ndr->depth--;
902 ndr_print_ptr(ndr, "startname", r->startname);
903 ndr->depth++;
904 if (r->startname) {
905 ndr_print_string(ndr, "startname", r->startname);
907 ndr->depth--;
908 ndr_print_ptr(ndr, "displayname", r->displayname);
909 ndr->depth++;
910 if (r->displayname) {
911 ndr_print_string(ndr, "displayname", r->displayname);
913 ndr->depth--;
914 ndr->depth--;
917 _PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, struct smb_iconv_convenience *ic, int flags)
919 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG, ic);
922 static enum ndr_err_code ndr_push_svcctl_ArgumentString(struct ndr_push *ndr, int ndr_flags, const struct svcctl_ArgumentString *r)
924 if (ndr_flags & NDR_SCALARS) {
925 NDR_CHECK(ndr_push_align(ndr, 5));
926 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
927 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
929 if (ndr_flags & NDR_BUFFERS) {
930 if (r->string) {
931 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
932 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
933 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
934 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, ndr_charset_length(r->string, CH_UTF16), sizeof(uint16_t), CH_UTF16));
937 return NDR_ERR_SUCCESS;
940 static enum ndr_err_code ndr_pull_svcctl_ArgumentString(struct ndr_pull *ndr, int ndr_flags, struct svcctl_ArgumentString *r)
942 uint32_t _ptr_string;
943 TALLOC_CTX *_mem_save_string_0;
944 if (ndr_flags & NDR_SCALARS) {
945 NDR_CHECK(ndr_pull_align(ndr, 5));
946 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
947 if (_ptr_string) {
948 NDR_PULL_ALLOC(ndr, r->string);
949 } else {
950 r->string = NULL;
952 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
954 if (ndr_flags & NDR_BUFFERS) {
955 if (r->string) {
956 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
957 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
958 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
959 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
960 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
961 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
963 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t)));
964 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
968 return NDR_ERR_SUCCESS;
971 _PUBLIC_ void ndr_print_svcctl_ArgumentString(struct ndr_print *ndr, const char *name, const struct svcctl_ArgumentString *r)
973 ndr_print_struct(ndr, name, "svcctl_ArgumentString");
974 ndr->depth++;
975 ndr_print_ptr(ndr, "string", r->string);
976 ndr->depth++;
977 if (r->string) {
978 ndr_print_string(ndr, "string", r->string);
980 ndr->depth--;
981 ndr->depth--;
984 static enum ndr_err_code ndr_push_svcctl_ConfigLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_ConfigLevel r)
986 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
987 return NDR_ERR_SUCCESS;
990 static enum ndr_err_code ndr_pull_svcctl_ConfigLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ConfigLevel *r)
992 uint32_t v;
993 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
994 *r = v;
995 return NDR_ERR_SUCCESS;
998 _PUBLIC_ void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r)
1000 const char *val = NULL;
1002 switch (r) {
1003 case SERVICE_CONFIG_DESCRIPTION: val = "SERVICE_CONFIG_DESCRIPTION"; break;
1004 case SERVICE_CONFIG_FAILURE_ACTIONS: val = "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
1006 ndr_print_enum(ndr, name, "ENUM", val, r);
1009 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_DESCRIPTION *r)
1011 if (ndr_flags & NDR_SCALARS) {
1012 NDR_CHECK(ndr_push_align(ndr, 5));
1014 uint32_t _flags_save_string = ndr->flags;
1015 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1016 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
1017 ndr->flags = _flags_save_string;
1019 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1021 if (ndr_flags & NDR_BUFFERS) {
1023 uint32_t _flags_save_string = ndr->flags;
1024 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1025 if (r->description) {
1026 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->description));
1027 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
1029 ndr->flags = _flags_save_string;
1032 return NDR_ERR_SUCCESS;
1035 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_DESCRIPTION *r)
1037 uint32_t _ptr_description;
1038 TALLOC_CTX *_mem_save_description_0;
1039 if (ndr_flags & NDR_SCALARS) {
1040 NDR_CHECK(ndr_pull_align(ndr, 5));
1042 uint32_t _flags_save_string = ndr->flags;
1043 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1044 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
1045 if (_ptr_description) {
1046 NDR_PULL_ALLOC(ndr, r->description);
1047 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
1048 } else {
1049 r->description = NULL;
1051 ndr->flags = _flags_save_string;
1053 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1055 if (ndr_flags & NDR_BUFFERS) {
1057 uint32_t _flags_save_string = ndr->flags;
1058 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1059 if (r->description) {
1060 uint32_t _relative_save_offset;
1061 _relative_save_offset = ndr->offset;
1062 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
1063 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
1064 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
1065 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
1066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
1067 ndr->offset = _relative_save_offset;
1069 ndr->flags = _flags_save_string;
1072 return NDR_ERR_SUCCESS;
1075 _PUBLIC_ void ndr_print_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTION *r)
1077 ndr_print_struct(ndr, name, "SERVICE_DESCRIPTION");
1078 ndr->depth++;
1079 ndr_print_ptr(ndr, "description", r->description);
1080 ndr->depth++;
1081 if (r->description) {
1082 ndr_print_string(ndr, "description", r->description);
1084 ndr->depth--;
1085 ndr->depth--;
1088 _PUBLIC_ size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION *r, struct smb_iconv_convenience *ic, int flags)
1090 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION, ic);
1093 static enum ndr_err_code ndr_push_SC_ACTION_TYPE(struct ndr_push *ndr, int ndr_flags, enum SC_ACTION_TYPE r)
1095 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1096 return NDR_ERR_SUCCESS;
1099 static enum ndr_err_code ndr_pull_SC_ACTION_TYPE(struct ndr_pull *ndr, int ndr_flags, enum SC_ACTION_TYPE *r)
1101 uint32_t v;
1102 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1103 *r = v;
1104 return NDR_ERR_SUCCESS;
1107 _PUBLIC_ void ndr_print_SC_ACTION_TYPE(struct ndr_print *ndr, const char *name, enum SC_ACTION_TYPE r)
1109 const char *val = NULL;
1111 switch (r) {
1112 case SC_ACTION_NONE: val = "SC_ACTION_NONE"; break;
1113 case SC_ACTION_RESTART: val = "SC_ACTION_RESTART"; break;
1114 case SC_ACTION_REBOOT: val = "SC_ACTION_REBOOT"; break;
1115 case SC_ACTION_RUN_COMMAND: val = "SC_ACTION_RUN_COMMAND"; break;
1117 ndr_print_enum(ndr, name, "ENUM", val, r);
1120 static enum ndr_err_code ndr_push_SC_ACTION(struct ndr_push *ndr, int ndr_flags, const struct SC_ACTION *r)
1122 if (ndr_flags & NDR_SCALARS) {
1123 NDR_CHECK(ndr_push_align(ndr, 4));
1124 NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr, NDR_SCALARS, r->type));
1125 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->delay));
1126 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1128 if (ndr_flags & NDR_BUFFERS) {
1130 return NDR_ERR_SUCCESS;
1133 static enum ndr_err_code ndr_pull_SC_ACTION(struct ndr_pull *ndr, int ndr_flags, struct SC_ACTION *r)
1135 if (ndr_flags & NDR_SCALARS) {
1136 NDR_CHECK(ndr_pull_align(ndr, 4));
1137 NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr, NDR_SCALARS, &r->type));
1138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->delay));
1139 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1141 if (ndr_flags & NDR_BUFFERS) {
1143 return NDR_ERR_SUCCESS;
1146 _PUBLIC_ void ndr_print_SC_ACTION(struct ndr_print *ndr, const char *name, const struct SC_ACTION *r)
1148 ndr_print_struct(ndr, name, "SC_ACTION");
1149 ndr->depth++;
1150 ndr_print_SC_ACTION_TYPE(ndr, "type", r->type);
1151 ndr_print_uint32(ndr, "delay", r->delay);
1152 ndr->depth--;
1155 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_FAILURE_ACTIONS *r)
1157 uint32_t cntr_actions_1;
1158 if (ndr_flags & NDR_SCALARS) {
1159 NDR_CHECK(ndr_push_align(ndr, 5));
1160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reset_period));
1162 uint32_t _flags_save_string = ndr->flags;
1163 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1164 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->rebootmsg));
1165 ndr->flags = _flags_save_string;
1168 uint32_t _flags_save_string = ndr->flags;
1169 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1170 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->command));
1171 ndr->flags = _flags_save_string;
1173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions));
1174 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->actions));
1175 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1177 if (ndr_flags & NDR_BUFFERS) {
1179 uint32_t _flags_save_string = ndr->flags;
1180 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1181 if (r->rebootmsg) {
1182 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->rebootmsg));
1183 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->rebootmsg));
1185 ndr->flags = _flags_save_string;
1188 uint32_t _flags_save_string = ndr->flags;
1189 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1190 if (r->command) {
1191 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->command));
1192 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->command));
1194 ndr->flags = _flags_save_string;
1196 if (r->actions) {
1197 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->actions));
1198 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_actions));
1199 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1200 NDR_CHECK(ndr_push_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1204 return NDR_ERR_SUCCESS;
1207 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_FAILURE_ACTIONS *r)
1209 uint32_t _ptr_rebootmsg;
1210 TALLOC_CTX *_mem_save_rebootmsg_0;
1211 uint32_t _ptr_command;
1212 TALLOC_CTX *_mem_save_command_0;
1213 uint32_t _ptr_actions;
1214 uint32_t cntr_actions_1;
1215 TALLOC_CTX *_mem_save_actions_0;
1216 TALLOC_CTX *_mem_save_actions_1;
1217 if (ndr_flags & NDR_SCALARS) {
1218 NDR_CHECK(ndr_pull_align(ndr, 5));
1219 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reset_period));
1221 uint32_t _flags_save_string = ndr->flags;
1222 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1223 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rebootmsg));
1224 if (_ptr_rebootmsg) {
1225 NDR_PULL_ALLOC(ndr, r->rebootmsg);
1226 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->rebootmsg, _ptr_rebootmsg));
1227 } else {
1228 r->rebootmsg = NULL;
1230 ndr->flags = _flags_save_string;
1233 uint32_t _flags_save_string = ndr->flags;
1234 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
1236 if (_ptr_command) {
1237 NDR_PULL_ALLOC(ndr, r->command);
1238 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->command, _ptr_command));
1239 } else {
1240 r->command = NULL;
1242 ndr->flags = _flags_save_string;
1244 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_actions));
1245 if (r->num_actions > 1024) {
1246 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1248 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_actions));
1249 if (_ptr_actions) {
1250 NDR_PULL_ALLOC(ndr, r->actions);
1251 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->actions, _ptr_actions));
1252 } else {
1253 r->actions = NULL;
1255 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1257 if (ndr_flags & NDR_BUFFERS) {
1259 uint32_t _flags_save_string = ndr->flags;
1260 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1261 if (r->rebootmsg) {
1262 uint32_t _relative_save_offset;
1263 _relative_save_offset = ndr->offset;
1264 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->rebootmsg));
1265 _mem_save_rebootmsg_0 = NDR_PULL_GET_MEM_CTX(ndr);
1266 NDR_PULL_SET_MEM_CTX(ndr, r->rebootmsg, 0);
1267 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->rebootmsg));
1268 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rebootmsg_0, 0);
1269 ndr->offset = _relative_save_offset;
1271 ndr->flags = _flags_save_string;
1274 uint32_t _flags_save_string = ndr->flags;
1275 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1276 if (r->command) {
1277 uint32_t _relative_save_offset;
1278 _relative_save_offset = ndr->offset;
1279 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->command));
1280 _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
1281 NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
1282 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->command));
1283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
1284 ndr->offset = _relative_save_offset;
1286 ndr->flags = _flags_save_string;
1288 if (r->actions) {
1289 uint32_t _relative_save_offset;
1290 _relative_save_offset = ndr->offset;
1291 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->actions));
1292 _mem_save_actions_0 = NDR_PULL_GET_MEM_CTX(ndr);
1293 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1294 NDR_CHECK(ndr_pull_array_size(ndr, &r->actions));
1295 NDR_PULL_ALLOC_N(ndr, r->actions, ndr_get_array_size(ndr, &r->actions));
1296 _mem_save_actions_1 = NDR_PULL_GET_MEM_CTX(ndr);
1297 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1298 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1299 NDR_CHECK(ndr_pull_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_1, 0);
1302 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_0, 0);
1303 ndr->offset = _relative_save_offset;
1305 if (r->actions) {
1306 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->actions, r->num_actions));
1309 return NDR_ERR_SUCCESS;
1312 _PUBLIC_ void ndr_print_SERVICE_FAILURE_ACTIONS(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONS *r)
1314 uint32_t cntr_actions_1;
1315 ndr_print_struct(ndr, name, "SERVICE_FAILURE_ACTIONS");
1316 ndr->depth++;
1317 ndr_print_uint32(ndr, "reset_period", r->reset_period);
1318 ndr_print_ptr(ndr, "rebootmsg", r->rebootmsg);
1319 ndr->depth++;
1320 if (r->rebootmsg) {
1321 ndr_print_string(ndr, "rebootmsg", r->rebootmsg);
1323 ndr->depth--;
1324 ndr_print_ptr(ndr, "command", r->command);
1325 ndr->depth++;
1326 if (r->command) {
1327 ndr_print_string(ndr, "command", r->command);
1329 ndr->depth--;
1330 ndr_print_uint32(ndr, "num_actions", r->num_actions);
1331 ndr_print_ptr(ndr, "actions", r->actions);
1332 ndr->depth++;
1333 if (r->actions) {
1334 ndr->print(ndr, "%s: ARRAY(%d)", "actions", (int)r->num_actions);
1335 ndr->depth++;
1336 for (cntr_actions_1=0;cntr_actions_1<r->num_actions;cntr_actions_1++) {
1337 char *idx_1=NULL;
1338 if (asprintf(&idx_1, "[%d]", cntr_actions_1) != -1) {
1339 ndr_print_SC_ACTION(ndr, "actions", &r->actions[cntr_actions_1]);
1340 free(idx_1);
1343 ndr->depth--;
1345 ndr->depth--;
1346 ndr->depth--;
1349 _PUBLIC_ size_t ndr_size_SERVICE_FAILURE_ACTIONS(const struct SERVICE_FAILURE_ACTIONS *r, struct smb_iconv_convenience *ic, int flags)
1351 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONS, ic);
1354 static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_StatusLevel r)
1356 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1357 return NDR_ERR_SUCCESS;
1360 static enum ndr_err_code ndr_pull_svcctl_StatusLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StatusLevel *r)
1362 uint32_t v;
1363 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1364 *r = v;
1365 return NDR_ERR_SUCCESS;
1368 _PUBLIC_ void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r)
1370 const char *val = NULL;
1372 switch (r) {
1373 case SVC_STATUS_PROCESS_INFO: val = "SVC_STATUS_PROCESS_INFO"; break;
1375 ndr_print_enum(ndr, name, "ENUM", val, r);
1378 static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
1380 if (flags & NDR_IN) {
1381 if (r->in.handle == NULL) {
1382 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1384 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1386 if (flags & NDR_OUT) {
1387 if (r->out.handle == NULL) {
1388 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1390 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1391 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1393 return NDR_ERR_SUCCESS;
1396 static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
1398 TALLOC_CTX *_mem_save_handle_0;
1399 if (flags & NDR_IN) {
1400 ZERO_STRUCT(r->out);
1402 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1403 NDR_PULL_ALLOC(ndr, r->in.handle);
1405 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1406 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1407 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1408 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1409 NDR_PULL_ALLOC(ndr, r->out.handle);
1410 *r->out.handle = *r->in.handle;
1412 if (flags & NDR_OUT) {
1413 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1414 NDR_PULL_ALLOC(ndr, r->out.handle);
1416 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1417 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1418 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1419 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1420 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1422 return NDR_ERR_SUCCESS;
1425 _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r)
1427 ndr_print_struct(ndr, name, "svcctl_CloseServiceHandle");
1428 ndr->depth++;
1429 if (flags & NDR_SET_VALUES) {
1430 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1432 if (flags & NDR_IN) {
1433 ndr_print_struct(ndr, "in", "svcctl_CloseServiceHandle");
1434 ndr->depth++;
1435 ndr_print_ptr(ndr, "handle", r->in.handle);
1436 ndr->depth++;
1437 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1438 ndr->depth--;
1439 ndr->depth--;
1441 if (flags & NDR_OUT) {
1442 ndr_print_struct(ndr, "out", "svcctl_CloseServiceHandle");
1443 ndr->depth++;
1444 ndr_print_ptr(ndr, "handle", r->out.handle);
1445 ndr->depth++;
1446 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1447 ndr->depth--;
1448 ndr_print_WERROR(ndr, "result", r->out.result);
1449 ndr->depth--;
1451 ndr->depth--;
1454 static enum ndr_err_code ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
1456 if (flags & NDR_IN) {
1457 if (r->in.handle == NULL) {
1458 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1460 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1461 NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.control));
1463 if (flags & NDR_OUT) {
1464 if (r->out.service_status == NULL) {
1465 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1467 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1468 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1470 return NDR_ERR_SUCCESS;
1473 static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
1475 TALLOC_CTX *_mem_save_handle_0;
1476 TALLOC_CTX *_mem_save_service_status_0;
1477 if (flags & NDR_IN) {
1478 ZERO_STRUCT(r->out);
1480 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1481 NDR_PULL_ALLOC(ndr, r->in.handle);
1483 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1484 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1485 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1487 NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.control));
1488 NDR_PULL_ALLOC(ndr, r->out.service_status);
1489 ZERO_STRUCTP(r->out.service_status);
1491 if (flags & NDR_OUT) {
1492 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1493 NDR_PULL_ALLOC(ndr, r->out.service_status);
1495 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1496 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1497 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1498 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1499 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1501 return NDR_ERR_SUCCESS;
1504 _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r)
1506 ndr_print_struct(ndr, name, "svcctl_ControlService");
1507 ndr->depth++;
1508 if (flags & NDR_SET_VALUES) {
1509 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1511 if (flags & NDR_IN) {
1512 ndr_print_struct(ndr, "in", "svcctl_ControlService");
1513 ndr->depth++;
1514 ndr_print_ptr(ndr, "handle", r->in.handle);
1515 ndr->depth++;
1516 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1517 ndr->depth--;
1518 ndr_print_SERVICE_CONTROL(ndr, "control", r->in.control);
1519 ndr->depth--;
1521 if (flags & NDR_OUT) {
1522 ndr_print_struct(ndr, "out", "svcctl_ControlService");
1523 ndr->depth++;
1524 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1525 ndr->depth++;
1526 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1527 ndr->depth--;
1528 ndr_print_WERROR(ndr, "result", r->out.result);
1529 ndr->depth--;
1531 ndr->depth--;
1534 static enum ndr_err_code ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *r)
1536 if (flags & NDR_IN) {
1537 if (r->in.handle == NULL) {
1538 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1540 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1542 if (flags & NDR_OUT) {
1543 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1545 return NDR_ERR_SUCCESS;
1548 static enum ndr_err_code ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
1550 TALLOC_CTX *_mem_save_handle_0;
1551 if (flags & NDR_IN) {
1552 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1553 NDR_PULL_ALLOC(ndr, r->in.handle);
1555 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1556 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1557 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1558 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1560 if (flags & NDR_OUT) {
1561 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1563 return NDR_ERR_SUCCESS;
1566 _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r)
1568 ndr_print_struct(ndr, name, "svcctl_DeleteService");
1569 ndr->depth++;
1570 if (flags & NDR_SET_VALUES) {
1571 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1573 if (flags & NDR_IN) {
1574 ndr_print_struct(ndr, "in", "svcctl_DeleteService");
1575 ndr->depth++;
1576 ndr_print_ptr(ndr, "handle", r->in.handle);
1577 ndr->depth++;
1578 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1579 ndr->depth--;
1580 ndr->depth--;
1582 if (flags & NDR_OUT) {
1583 ndr_print_struct(ndr, "out", "svcctl_DeleteService");
1584 ndr->depth++;
1585 ndr_print_WERROR(ndr, "result", r->out.result);
1586 ndr->depth--;
1588 ndr->depth--;
1591 static enum ndr_err_code ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
1593 if (flags & NDR_IN) {
1594 if (r->in.handle == NULL) {
1595 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1597 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1599 if (flags & NDR_OUT) {
1600 if (r->out.lock == NULL) {
1601 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1603 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1604 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1606 return NDR_ERR_SUCCESS;
1609 static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
1611 TALLOC_CTX *_mem_save_handle_0;
1612 TALLOC_CTX *_mem_save_lock_0;
1613 if (flags & NDR_IN) {
1614 ZERO_STRUCT(r->out);
1616 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1617 NDR_PULL_ALLOC(ndr, r->in.handle);
1619 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1620 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1621 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1622 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1623 NDR_PULL_ALLOC(ndr, r->out.lock);
1624 ZERO_STRUCTP(r->out.lock);
1626 if (flags & NDR_OUT) {
1627 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1628 NDR_PULL_ALLOC(ndr, r->out.lock);
1630 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1631 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
1632 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1634 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1636 return NDR_ERR_SUCCESS;
1639 _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r)
1641 ndr_print_struct(ndr, name, "svcctl_LockServiceDatabase");
1642 ndr->depth++;
1643 if (flags & NDR_SET_VALUES) {
1644 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1646 if (flags & NDR_IN) {
1647 ndr_print_struct(ndr, "in", "svcctl_LockServiceDatabase");
1648 ndr->depth++;
1649 ndr_print_ptr(ndr, "handle", r->in.handle);
1650 ndr->depth++;
1651 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1652 ndr->depth--;
1653 ndr->depth--;
1655 if (flags & NDR_OUT) {
1656 ndr_print_struct(ndr, "out", "svcctl_LockServiceDatabase");
1657 ndr->depth++;
1658 ndr_print_ptr(ndr, "lock", r->out.lock);
1659 ndr->depth++;
1660 ndr_print_policy_handle(ndr, "lock", r->out.lock);
1661 ndr->depth--;
1662 ndr_print_WERROR(ndr, "result", r->out.result);
1663 ndr->depth--;
1665 ndr->depth--;
1668 static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1670 if (flags & NDR_IN) {
1671 if (r->in.handle == NULL) {
1672 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1674 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1675 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1678 if (flags & NDR_OUT) {
1679 if (r->out.buffer == NULL) {
1680 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1682 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1683 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
1684 if (r->out.needed == NULL) {
1685 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
1688 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1690 return NDR_ERR_SUCCESS;
1693 static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
1695 TALLOC_CTX *_mem_save_handle_0;
1696 TALLOC_CTX *_mem_save_needed_0;
1697 if (flags & NDR_IN) {
1698 ZERO_STRUCT(r->out);
1700 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1701 NDR_PULL_ALLOC(ndr, r->in.handle);
1703 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1704 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1705 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1707 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1708 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1709 if (r->in.offered > 0x40000) {
1710 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1712 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
1713 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
1714 NDR_PULL_ALLOC(ndr, r->out.needed);
1715 ZERO_STRUCTP(r->out.needed);
1717 if (flags & NDR_OUT) {
1718 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
1719 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1720 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
1722 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
1723 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1724 NDR_PULL_ALLOC(ndr, r->out.needed);
1726 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
1727 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
1728 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
1729 if (*r->out.needed > 0x40000) {
1730 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
1733 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1734 if (r->out.buffer) {
1735 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
1738 return NDR_ERR_SUCCESS;
1741 _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1743 ndr_print_struct(ndr, name, "svcctl_QueryServiceObjectSecurity");
1744 ndr->depth++;
1745 if (flags & NDR_SET_VALUES) {
1746 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1748 if (flags & NDR_IN) {
1749 ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
1750 ndr->depth++;
1751 ndr_print_ptr(ndr, "handle", r->in.handle);
1752 ndr->depth++;
1753 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1754 ndr->depth--;
1755 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1756 ndr_print_uint32(ndr, "offered", r->in.offered);
1757 ndr->depth--;
1759 if (flags & NDR_OUT) {
1760 ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
1761 ndr->depth++;
1762 ndr_print_ptr(ndr, "buffer", r->out.buffer);
1763 ndr->depth++;
1764 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
1765 ndr->depth--;
1766 ndr_print_ptr(ndr, "needed", r->out.needed);
1767 ndr->depth++;
1768 ndr_print_uint32(ndr, "needed", *r->out.needed);
1769 ndr->depth--;
1770 ndr_print_WERROR(ndr, "result", r->out.result);
1771 ndr->depth--;
1773 ndr->depth--;
1776 static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1778 if (flags & NDR_IN) {
1779 if (r->in.handle == NULL) {
1780 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1782 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1783 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1784 if (r->in.buffer == NULL) {
1785 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1787 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1788 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
1789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1791 if (flags & NDR_OUT) {
1792 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1794 return NDR_ERR_SUCCESS;
1797 static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
1799 TALLOC_CTX *_mem_save_handle_0;
1800 if (flags & NDR_IN) {
1801 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1802 NDR_PULL_ALLOC(ndr, r->in.handle);
1804 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1805 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1806 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1807 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1808 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1809 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
1810 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1811 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
1813 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
1814 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1815 if (r->in.buffer) {
1816 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
1819 if (flags & NDR_OUT) {
1820 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1822 return NDR_ERR_SUCCESS;
1825 _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1827 ndr_print_struct(ndr, name, "svcctl_SetServiceObjectSecurity");
1828 ndr->depth++;
1829 if (flags & NDR_SET_VALUES) {
1830 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1832 if (flags & NDR_IN) {
1833 ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
1834 ndr->depth++;
1835 ndr_print_ptr(ndr, "handle", r->in.handle);
1836 ndr->depth++;
1837 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1838 ndr->depth--;
1839 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1840 ndr_print_ptr(ndr, "buffer", r->in.buffer);
1841 ndr->depth++;
1842 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
1843 ndr->depth--;
1844 ndr_print_uint32(ndr, "offered", r->in.offered);
1845 ndr->depth--;
1847 if (flags & NDR_OUT) {
1848 ndr_print_struct(ndr, "out", "svcctl_SetServiceObjectSecurity");
1849 ndr->depth++;
1850 ndr_print_WERROR(ndr, "result", r->out.result);
1851 ndr->depth--;
1853 ndr->depth--;
1856 static enum ndr_err_code ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *r)
1858 if (flags & NDR_IN) {
1859 if (r->in.handle == NULL) {
1860 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1862 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1864 if (flags & NDR_OUT) {
1865 if (r->out.service_status == NULL) {
1866 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1868 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1869 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1871 return NDR_ERR_SUCCESS;
1874 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
1876 TALLOC_CTX *_mem_save_handle_0;
1877 TALLOC_CTX *_mem_save_service_status_0;
1878 if (flags & NDR_IN) {
1879 ZERO_STRUCT(r->out);
1881 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1882 NDR_PULL_ALLOC(ndr, r->in.handle);
1884 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1885 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1886 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1888 NDR_PULL_ALLOC(ndr, r->out.service_status);
1889 ZERO_STRUCTP(r->out.service_status);
1891 if (flags & NDR_OUT) {
1892 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1893 NDR_PULL_ALLOC(ndr, r->out.service_status);
1895 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1896 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1897 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1898 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1899 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1901 return NDR_ERR_SUCCESS;
1904 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r)
1906 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatus");
1907 ndr->depth++;
1908 if (flags & NDR_SET_VALUES) {
1909 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1911 if (flags & NDR_IN) {
1912 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatus");
1913 ndr->depth++;
1914 ndr_print_ptr(ndr, "handle", r->in.handle);
1915 ndr->depth++;
1916 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1917 ndr->depth--;
1918 ndr->depth--;
1920 if (flags & NDR_OUT) {
1921 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatus");
1922 ndr->depth++;
1923 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1924 ndr->depth++;
1925 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1926 ndr->depth--;
1927 ndr_print_WERROR(ndr, "result", r->out.result);
1928 ndr->depth--;
1930 ndr->depth--;
1933 static enum ndr_err_code ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
1935 if (flags & NDR_IN) {
1937 if (flags & NDR_OUT) {
1938 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1940 return NDR_ERR_SUCCESS;
1943 static enum ndr_err_code ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
1945 if (flags & NDR_IN) {
1947 if (flags & NDR_OUT) {
1948 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1950 return NDR_ERR_SUCCESS;
1953 _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r)
1955 ndr_print_struct(ndr, name, "svcctl_SetServiceStatus");
1956 ndr->depth++;
1957 if (flags & NDR_SET_VALUES) {
1958 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1960 if (flags & NDR_IN) {
1961 ndr_print_struct(ndr, "in", "svcctl_SetServiceStatus");
1962 ndr->depth++;
1963 ndr->depth--;
1965 if (flags & NDR_OUT) {
1966 ndr_print_struct(ndr, "out", "svcctl_SetServiceStatus");
1967 ndr->depth++;
1968 ndr_print_WERROR(ndr, "result", r->out.result);
1969 ndr->depth--;
1971 ndr->depth--;
1974 static enum ndr_err_code ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
1976 if (flags & NDR_IN) {
1977 if (r->in.lock == NULL) {
1978 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1980 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.lock));
1982 if (flags & NDR_OUT) {
1983 if (r->out.lock == NULL) {
1984 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1986 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1987 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1989 return NDR_ERR_SUCCESS;
1992 static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
1994 TALLOC_CTX *_mem_save_lock_0;
1995 if (flags & NDR_IN) {
1996 ZERO_STRUCT(r->out);
1998 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1999 NDR_PULL_ALLOC(ndr, r->in.lock);
2001 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
2002 NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC);
2003 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.lock));
2004 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
2005 NDR_PULL_ALLOC(ndr, r->out.lock);
2006 *r->out.lock = *r->in.lock;
2008 if (flags & NDR_OUT) {
2009 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2010 NDR_PULL_ALLOC(ndr, r->out.lock);
2012 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
2013 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
2014 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
2015 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
2016 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2018 return NDR_ERR_SUCCESS;
2021 _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r)
2023 ndr_print_struct(ndr, name, "svcctl_UnlockServiceDatabase");
2024 ndr->depth++;
2025 if (flags & NDR_SET_VALUES) {
2026 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2028 if (flags & NDR_IN) {
2029 ndr_print_struct(ndr, "in", "svcctl_UnlockServiceDatabase");
2030 ndr->depth++;
2031 ndr_print_ptr(ndr, "lock", r->in.lock);
2032 ndr->depth++;
2033 ndr_print_policy_handle(ndr, "lock", r->in.lock);
2034 ndr->depth--;
2035 ndr->depth--;
2037 if (flags & NDR_OUT) {
2038 ndr_print_struct(ndr, "out", "svcctl_UnlockServiceDatabase");
2039 ndr->depth++;
2040 ndr_print_ptr(ndr, "lock", r->out.lock);
2041 ndr->depth++;
2042 ndr_print_policy_handle(ndr, "lock", r->out.lock);
2043 ndr->depth--;
2044 ndr_print_WERROR(ndr, "result", r->out.result);
2045 ndr->depth--;
2047 ndr->depth--;
2050 static enum ndr_err_code ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2052 if (flags & NDR_IN) {
2054 if (flags & NDR_OUT) {
2055 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2057 return NDR_ERR_SUCCESS;
2060 static enum ndr_err_code ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
2062 if (flags & NDR_IN) {
2064 if (flags & NDR_OUT) {
2065 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2067 return NDR_ERR_SUCCESS;
2070 _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2072 ndr_print_struct(ndr, name, "svcctl_NotifyBootConfigStatus");
2073 ndr->depth++;
2074 if (flags & NDR_SET_VALUES) {
2075 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2077 if (flags & NDR_IN) {
2078 ndr_print_struct(ndr, "in", "svcctl_NotifyBootConfigStatus");
2079 ndr->depth++;
2080 ndr->depth--;
2082 if (flags & NDR_OUT) {
2083 ndr_print_struct(ndr, "out", "svcctl_NotifyBootConfigStatus");
2084 ndr->depth++;
2085 ndr_print_WERROR(ndr, "result", r->out.result);
2086 ndr->depth--;
2088 ndr->depth--;
2091 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
2093 if (flags & NDR_IN) {
2094 if (r->in.handle == NULL) {
2095 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2097 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
2099 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
2100 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
2102 if (flags & NDR_OUT) {
2103 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2105 return NDR_ERR_SUCCESS;
2108 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
2110 TALLOC_CTX *_mem_save_handle_0;
2111 if (flags & NDR_IN) {
2112 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2113 NDR_PULL_ALLOC(ndr, r->in.handle);
2115 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2116 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2117 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2119 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
2120 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
2121 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
2123 if (flags & NDR_OUT) {
2124 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2126 return NDR_ERR_SUCCESS;
2129 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r)
2131 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsW");
2132 ndr->depth++;
2133 if (flags & NDR_SET_VALUES) {
2134 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2136 if (flags & NDR_IN) {
2137 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsW");
2138 ndr->depth++;
2139 ndr_print_ptr(ndr, "handle", r->in.handle);
2140 ndr->depth++;
2141 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2142 ndr->depth--;
2143 ndr_print_uint32(ndr, "bits", r->in.bits);
2144 ndr_print_uint32(ndr, "bitson", r->in.bitson);
2145 ndr_print_uint32(ndr, "immediate", r->in.immediate);
2146 ndr->depth--;
2148 if (flags & NDR_OUT) {
2149 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsW");
2150 ndr->depth++;
2151 ndr_print_WERROR(ndr, "result", r->out.result);
2152 ndr->depth--;
2154 ndr->depth--;
2157 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
2159 if (flags & NDR_IN) {
2160 if (r->in.handle == NULL) {
2161 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2163 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2165 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2166 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2167 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
2168 if (r->in.binary_path) {
2169 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2171 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2172 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2174 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
2175 if (r->in.load_order_group) {
2176 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2178 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2179 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.load_order_group, ndr_charset_length(r->in.load_order_group, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2181 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2182 if (r->in.dependencies) {
2183 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2184 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2185 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2186 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2188 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2189 if (r->in.service_start_name) {
2190 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2191 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2192 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2193 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2195 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2196 if (r->in.password) {
2197 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2198 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2199 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2200 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2202 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
2203 if (r->in.display_name) {
2204 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2205 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2206 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2207 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.display_name, ndr_charset_length(r->in.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2210 if (flags & NDR_OUT) {
2211 if (r->out.tag_id == NULL) {
2212 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2214 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
2215 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2217 return NDR_ERR_SUCCESS;
2220 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
2222 uint32_t _ptr_binary_path;
2223 uint32_t _ptr_load_order_group;
2224 uint32_t _ptr_dependencies;
2225 uint32_t _ptr_service_start_name;
2226 uint32_t _ptr_password;
2227 uint32_t _ptr_display_name;
2228 TALLOC_CTX *_mem_save_handle_0;
2229 TALLOC_CTX *_mem_save_binary_path_0;
2230 TALLOC_CTX *_mem_save_load_order_group_0;
2231 TALLOC_CTX *_mem_save_tag_id_0;
2232 TALLOC_CTX *_mem_save_dependencies_0;
2233 TALLOC_CTX *_mem_save_service_start_name_0;
2234 TALLOC_CTX *_mem_save_password_0;
2235 TALLOC_CTX *_mem_save_display_name_0;
2236 if (flags & NDR_IN) {
2237 ZERO_STRUCT(r->out);
2239 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2240 NDR_PULL_ALLOC(ndr, r->in.handle);
2242 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2243 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2244 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2245 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2246 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2247 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2248 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2249 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
2250 if (_ptr_binary_path) {
2251 NDR_PULL_ALLOC(ndr, r->in.binary_path);
2252 } else {
2253 r->in.binary_path = NULL;
2255 if (r->in.binary_path) {
2256 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
2257 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
2258 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2259 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2260 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2261 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
2263 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2264 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
2265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
2267 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
2268 if (_ptr_load_order_group) {
2269 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
2270 } else {
2271 r->in.load_order_group = NULL;
2273 if (r->in.load_order_group) {
2274 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
2275 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
2276 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
2277 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
2278 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
2279 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.load_order_group), ndr_get_array_length(ndr, &r->in.load_order_group));
2281 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
2282 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t), CH_UTF16));
2283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
2285 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2286 if (_ptr_dependencies) {
2287 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2288 } else {
2289 r->in.dependencies = NULL;
2291 if (r->in.dependencies) {
2292 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2293 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2294 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2295 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
2296 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
2297 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dependencies), ndr_get_array_length(ndr, &r->in.dependencies));
2299 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
2300 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
2301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2303 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2304 if (_ptr_service_start_name) {
2305 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2306 } else {
2307 r->in.service_start_name = NULL;
2309 if (r->in.service_start_name) {
2310 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2311 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2312 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2313 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2314 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2315 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
2317 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2318 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
2319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2321 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2322 if (_ptr_password) {
2323 NDR_PULL_ALLOC(ndr, r->in.password);
2324 } else {
2325 r->in.password = NULL;
2327 if (r->in.password) {
2328 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2329 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2330 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2331 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
2332 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
2333 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.password), ndr_get_array_length(ndr, &r->in.password));
2335 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
2336 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
2337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2339 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
2340 if (_ptr_display_name) {
2341 NDR_PULL_ALLOC(ndr, r->in.display_name);
2342 } else {
2343 r->in.display_name = NULL;
2345 if (r->in.display_name) {
2346 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2347 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
2348 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
2349 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
2350 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
2351 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.display_name), ndr_get_array_length(ndr, &r->in.display_name));
2353 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
2354 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t), CH_UTF16));
2355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
2357 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2358 ZERO_STRUCTP(r->out.tag_id);
2360 if (flags & NDR_OUT) {
2361 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2362 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2364 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
2365 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
2366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
2367 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
2368 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2370 return NDR_ERR_SUCCESS;
2373 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r)
2375 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigW");
2376 ndr->depth++;
2377 if (flags & NDR_SET_VALUES) {
2378 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2380 if (flags & NDR_IN) {
2381 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigW");
2382 ndr->depth++;
2383 ndr_print_ptr(ndr, "handle", r->in.handle);
2384 ndr->depth++;
2385 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2386 ndr->depth--;
2387 ndr_print_uint32(ndr, "type", r->in.type);
2388 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2389 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2390 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
2391 ndr->depth++;
2392 if (r->in.binary_path) {
2393 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2395 ndr->depth--;
2396 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
2397 ndr->depth++;
2398 if (r->in.load_order_group) {
2399 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
2401 ndr->depth--;
2402 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2403 ndr->depth++;
2404 if (r->in.dependencies) {
2405 ndr_print_string(ndr, "dependencies", r->in.dependencies);
2407 ndr->depth--;
2408 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2409 ndr->depth++;
2410 if (r->in.service_start_name) {
2411 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2413 ndr->depth--;
2414 ndr_print_ptr(ndr, "password", r->in.password);
2415 ndr->depth++;
2416 if (r->in.password) {
2417 ndr_print_string(ndr, "password", r->in.password);
2419 ndr->depth--;
2420 ndr_print_ptr(ndr, "display_name", r->in.display_name);
2421 ndr->depth++;
2422 if (r->in.display_name) {
2423 ndr_print_string(ndr, "display_name", r->in.display_name);
2425 ndr->depth--;
2426 ndr->depth--;
2428 if (flags & NDR_OUT) {
2429 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigW");
2430 ndr->depth++;
2431 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
2432 ndr->depth++;
2433 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
2434 ndr->depth--;
2435 ndr_print_WERROR(ndr, "result", r->out.result);
2436 ndr->depth--;
2438 ndr->depth--;
2441 static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
2443 if (flags & NDR_IN) {
2444 if (r->in.scmanager_handle == NULL) {
2445 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2447 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2448 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2449 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2450 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2451 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2452 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
2453 if (r->in.DisplayName) {
2454 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2455 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2456 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2457 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
2460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2461 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2462 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2463 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2464 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2465 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2466 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2467 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
2468 if (r->in.LoadOrderGroupKey) {
2469 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2470 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2471 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2472 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2474 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.TagId));
2475 if (r->in.TagId) {
2476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.TagId));
2478 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2479 if (r->in.dependencies) {
2480 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dependencies_size));
2481 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, r->in.dependencies_size));
2483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
2484 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2485 if (r->in.service_start_name) {
2486 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2487 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2488 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2489 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2491 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2492 if (r->in.password) {
2493 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.password_size));
2494 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.password, r->in.password_size));
2496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
2498 if (flags & NDR_OUT) {
2499 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
2500 if (r->out.TagId) {
2501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
2503 if (r->out.handle == NULL) {
2504 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2506 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2507 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2509 return NDR_ERR_SUCCESS;
2512 static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
2514 uint32_t _ptr_DisplayName;
2515 uint32_t _ptr_LoadOrderGroupKey;
2516 uint32_t _ptr_TagId;
2517 uint32_t _ptr_dependencies;
2518 uint32_t _ptr_service_start_name;
2519 uint32_t _ptr_password;
2520 TALLOC_CTX *_mem_save_scmanager_handle_0;
2521 TALLOC_CTX *_mem_save_DisplayName_0;
2522 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
2523 TALLOC_CTX *_mem_save_TagId_0;
2524 TALLOC_CTX *_mem_save_dependencies_0;
2525 TALLOC_CTX *_mem_save_service_start_name_0;
2526 TALLOC_CTX *_mem_save_password_0;
2527 TALLOC_CTX *_mem_save_handle_0;
2528 if (flags & NDR_IN) {
2529 ZERO_STRUCT(r->out);
2531 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2532 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
2534 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2535 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
2536 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2537 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
2538 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
2539 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
2540 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
2541 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
2543 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
2544 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
2545 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
2546 if (_ptr_DisplayName) {
2547 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
2548 } else {
2549 r->in.DisplayName = NULL;
2551 if (r->in.DisplayName) {
2552 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2553 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
2554 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
2555 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
2556 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
2557 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DisplayName), ndr_get_array_length(ndr, &r->in.DisplayName));
2559 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
2560 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
2561 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
2563 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
2564 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2565 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2566 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2567 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2568 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2569 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2570 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
2572 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2573 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
2574 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
2575 if (_ptr_LoadOrderGroupKey) {
2576 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
2577 } else {
2578 r->in.LoadOrderGroupKey = NULL;
2580 if (r->in.LoadOrderGroupKey) {
2581 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
2582 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
2583 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
2584 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
2585 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
2586 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey), ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey));
2588 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
2589 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
2590 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
2592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2593 if (_ptr_TagId) {
2594 NDR_PULL_ALLOC(ndr, r->in.TagId);
2595 } else {
2596 r->in.TagId = NULL;
2598 if (r->in.TagId) {
2599 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2600 NDR_PULL_SET_MEM_CTX(ndr, r->in.TagId, 0);
2601 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.TagId));
2602 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2604 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2605 if (_ptr_dependencies) {
2606 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2607 } else {
2608 r->in.dependencies = NULL;
2610 if (r->in.dependencies) {
2611 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2612 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2613 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2614 NDR_PULL_ALLOC_N(ndr, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies));
2615 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies)));
2616 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2618 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dependencies_size));
2619 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2620 if (_ptr_service_start_name) {
2621 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2622 } else {
2623 r->in.service_start_name = NULL;
2625 if (r->in.service_start_name) {
2626 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2627 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2628 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2629 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2630 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2631 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
2633 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2634 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
2635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2637 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2638 if (_ptr_password) {
2639 NDR_PULL_ALLOC(ndr, r->in.password);
2640 } else {
2641 r->in.password = NULL;
2643 if (r->in.password) {
2644 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2645 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2646 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2647 NDR_PULL_ALLOC_N(ndr, r->in.password, ndr_get_array_size(ndr, &r->in.password));
2648 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.password, ndr_get_array_size(ndr, &r->in.password)));
2649 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2651 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.password_size));
2652 NDR_PULL_ALLOC(ndr, r->out.handle);
2653 ZERO_STRUCTP(r->out.handle);
2654 if (r->in.dependencies) {
2655 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.dependencies, r->in.dependencies_size));
2657 if (r->in.password) {
2658 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.password, r->in.password_size));
2661 if (flags & NDR_OUT) {
2662 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2663 if (_ptr_TagId) {
2664 NDR_PULL_ALLOC(ndr, r->out.TagId);
2665 } else {
2666 r->out.TagId = NULL;
2668 if (r->out.TagId) {
2669 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2670 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
2671 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
2672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2674 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2675 NDR_PULL_ALLOC(ndr, r->out.handle);
2677 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2678 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2679 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2681 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2683 return NDR_ERR_SUCCESS;
2686 _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r)
2688 ndr_print_struct(ndr, name, "svcctl_CreateServiceW");
2689 ndr->depth++;
2690 if (flags & NDR_SET_VALUES) {
2691 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2693 if (flags & NDR_IN) {
2694 ndr_print_struct(ndr, "in", "svcctl_CreateServiceW");
2695 ndr->depth++;
2696 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
2697 ndr->depth++;
2698 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
2699 ndr->depth--;
2700 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
2701 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
2702 ndr->depth++;
2703 if (r->in.DisplayName) {
2704 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
2706 ndr->depth--;
2707 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
2708 ndr_print_uint32(ndr, "type", r->in.type);
2709 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2710 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2711 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2712 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2713 ndr->depth++;
2714 if (r->in.LoadOrderGroupKey) {
2715 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2717 ndr->depth--;
2718 ndr_print_ptr(ndr, "TagId", r->in.TagId);
2719 ndr->depth++;
2720 if (r->in.TagId) {
2721 ndr_print_uint32(ndr, "TagId", *r->in.TagId);
2723 ndr->depth--;
2724 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2725 ndr->depth++;
2726 if (r->in.dependencies) {
2727 ndr_print_array_uint8(ndr, "dependencies", r->in.dependencies, r->in.dependencies_size);
2729 ndr->depth--;
2730 ndr_print_uint32(ndr, "dependencies_size", r->in.dependencies_size);
2731 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2732 ndr->depth++;
2733 if (r->in.service_start_name) {
2734 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2736 ndr->depth--;
2737 ndr_print_ptr(ndr, "password", r->in.password);
2738 ndr->depth++;
2739 if (r->in.password) {
2740 ndr_print_array_uint8(ndr, "password", r->in.password, r->in.password_size);
2742 ndr->depth--;
2743 ndr_print_uint32(ndr, "password_size", r->in.password_size);
2744 ndr->depth--;
2746 if (flags & NDR_OUT) {
2747 ndr_print_struct(ndr, "out", "svcctl_CreateServiceW");
2748 ndr->depth++;
2749 ndr_print_ptr(ndr, "TagId", r->out.TagId);
2750 ndr->depth++;
2751 if (r->out.TagId) {
2752 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
2754 ndr->depth--;
2755 ndr_print_ptr(ndr, "handle", r->out.handle);
2756 ndr->depth++;
2757 ndr_print_policy_handle(ndr, "handle", r->out.handle);
2758 ndr->depth--;
2759 ndr_print_WERROR(ndr, "result", r->out.result);
2760 ndr->depth--;
2762 ndr->depth--;
2765 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
2767 if (flags & NDR_IN) {
2768 if (r->in.service == NULL) {
2769 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2771 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
2772 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
2773 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2775 if (flags & NDR_OUT) {
2776 if (r->out.service_status == NULL) {
2777 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2779 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
2780 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.offered));
2781 if (r->out.needed == NULL) {
2782 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2785 if (r->out.services_returned == NULL) {
2786 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2788 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2789 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2791 return NDR_ERR_SUCCESS;
2794 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
2796 TALLOC_CTX *_mem_save_service_0;
2797 TALLOC_CTX *_mem_save_needed_0;
2798 TALLOC_CTX *_mem_save_services_returned_0;
2799 if (flags & NDR_IN) {
2800 ZERO_STRUCT(r->out);
2802 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2803 NDR_PULL_ALLOC(ndr, r->in.service);
2805 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
2806 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
2807 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
2808 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
2809 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
2810 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2811 if (r->in.offered > 0x40000) {
2812 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2814 NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.offered);
2815 memset(r->out.service_status, 0, (r->in.offered) * sizeof(*r->out.service_status));
2816 NDR_PULL_ALLOC(ndr, r->out.needed);
2817 ZERO_STRUCTP(r->out.needed);
2818 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2819 ZERO_STRUCTP(r->out.services_returned);
2821 if (flags & NDR_OUT) {
2822 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service_status));
2823 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2824 NDR_PULL_ALLOC_N(ndr, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status));
2826 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status)));
2827 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2828 NDR_PULL_ALLOC(ndr, r->out.needed);
2830 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2831 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2832 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2833 if (*r->out.needed > 0x40000) {
2834 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2837 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2838 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2840 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
2841 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
2842 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
2843 if (*r->out.services_returned > 0x40000) {
2844 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
2847 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2848 if (r->out.service_status) {
2849 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service_status, r->in.offered));
2852 return NDR_ERR_SUCCESS;
2855 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r)
2857 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesW");
2858 ndr->depth++;
2859 if (flags & NDR_SET_VALUES) {
2860 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2862 if (flags & NDR_IN) {
2863 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesW");
2864 ndr->depth++;
2865 ndr_print_ptr(ndr, "service", r->in.service);
2866 ndr->depth++;
2867 ndr_print_policy_handle(ndr, "service", r->in.service);
2868 ndr->depth--;
2869 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
2870 ndr_print_uint32(ndr, "offered", r->in.offered);
2871 ndr->depth--;
2873 if (flags & NDR_OUT) {
2874 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesW");
2875 ndr->depth++;
2876 ndr_print_ptr(ndr, "service_status", r->out.service_status);
2877 ndr->depth++;
2878 ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.offered);
2879 ndr->depth--;
2880 ndr_print_ptr(ndr, "needed", r->out.needed);
2881 ndr->depth++;
2882 ndr_print_uint32(ndr, "needed", *r->out.needed);
2883 ndr->depth--;
2884 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
2885 ndr->depth++;
2886 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
2887 ndr->depth--;
2888 ndr_print_WERROR(ndr, "result", r->out.result);
2889 ndr->depth--;
2891 ndr->depth--;
2894 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
2896 if (flags & NDR_IN) {
2897 if (r->in.handle == NULL) {
2898 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2900 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2902 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
2903 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2904 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
2905 if (r->in.resume_handle) {
2906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
2909 if (flags & NDR_OUT) {
2910 if (r->out.service == NULL) {
2911 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2913 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
2914 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
2915 if (r->out.needed == NULL) {
2916 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2918 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2919 if (r->out.services_returned == NULL) {
2920 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2923 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
2924 if (r->out.resume_handle) {
2925 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
2927 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2929 return NDR_ERR_SUCCESS;
2932 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
2934 uint32_t _ptr_resume_handle;
2935 TALLOC_CTX *_mem_save_handle_0;
2936 TALLOC_CTX *_mem_save_needed_0;
2937 TALLOC_CTX *_mem_save_services_returned_0;
2938 TALLOC_CTX *_mem_save_resume_handle_0;
2939 if (flags & NDR_IN) {
2940 ZERO_STRUCT(r->out);
2942 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2943 NDR_PULL_ALLOC(ndr, r->in.handle);
2945 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2946 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2947 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2948 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2949 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2950 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
2951 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2952 if (r->in.offered > 0x40000) {
2953 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2955 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
2956 if (_ptr_resume_handle) {
2957 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
2958 } else {
2959 r->in.resume_handle = NULL;
2961 if (r->in.resume_handle) {
2962 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2963 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
2964 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
2965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
2967 NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.offered);
2968 memset(r->out.service, 0, (r->in.offered) * sizeof(*r->out.service));
2969 NDR_PULL_ALLOC(ndr, r->out.needed);
2970 ZERO_STRUCTP(r->out.needed);
2971 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2972 ZERO_STRUCTP(r->out.services_returned);
2974 if (flags & NDR_OUT) {
2975 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
2976 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2977 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
2979 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
2980 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2981 NDR_PULL_ALLOC(ndr, r->out.needed);
2983 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2984 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2985 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2986 if (*r->out.needed > 0x40000) {
2987 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2990 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2991 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2993 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
2994 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
2995 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
2996 if (*r->out.services_returned > 0x40000) {
2997 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2999 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
3000 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
3001 if (_ptr_resume_handle) {
3002 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
3003 } else {
3004 r->out.resume_handle = NULL;
3006 if (r->out.resume_handle) {
3007 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3008 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
3009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
3010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
3012 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3013 if (r->out.service) {
3014 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
3017 return NDR_ERR_SUCCESS;
3020 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r)
3022 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusW");
3023 ndr->depth++;
3024 if (flags & NDR_SET_VALUES) {
3025 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3027 if (flags & NDR_IN) {
3028 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusW");
3029 ndr->depth++;
3030 ndr_print_ptr(ndr, "handle", r->in.handle);
3031 ndr->depth++;
3032 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3033 ndr->depth--;
3034 ndr_print_uint32(ndr, "type", r->in.type);
3035 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
3036 ndr_print_uint32(ndr, "offered", r->in.offered);
3037 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
3038 ndr->depth++;
3039 if (r->in.resume_handle) {
3040 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
3042 ndr->depth--;
3043 ndr->depth--;
3045 if (flags & NDR_OUT) {
3046 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
3047 ndr->depth++;
3048 ndr_print_ptr(ndr, "service", r->out.service);
3049 ndr->depth++;
3050 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
3051 ndr->depth--;
3052 ndr_print_ptr(ndr, "needed", r->out.needed);
3053 ndr->depth++;
3054 ndr_print_uint32(ndr, "needed", *r->out.needed);
3055 ndr->depth--;
3056 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
3057 ndr->depth++;
3058 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
3059 ndr->depth--;
3060 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
3061 ndr->depth++;
3062 if (r->out.resume_handle) {
3063 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
3065 ndr->depth--;
3066 ndr_print_WERROR(ndr, "result", r->out.result);
3067 ndr->depth--;
3069 ndr->depth--;
3072 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
3074 if (flags & NDR_IN) {
3075 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
3076 if (r->in.MachineName) {
3077 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3078 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3079 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3080 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3082 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
3083 if (r->in.DatabaseName) {
3084 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3085 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3087 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3089 NDR_CHECK(ndr_push_svcctl_MgrAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3091 if (flags & NDR_OUT) {
3092 if (r->out.handle == NULL) {
3093 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3095 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3096 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3098 return NDR_ERR_SUCCESS;
3101 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
3103 uint32_t _ptr_MachineName;
3104 uint32_t _ptr_DatabaseName;
3105 TALLOC_CTX *_mem_save_MachineName_0;
3106 TALLOC_CTX *_mem_save_DatabaseName_0;
3107 TALLOC_CTX *_mem_save_handle_0;
3108 if (flags & NDR_IN) {
3109 ZERO_STRUCT(r->out);
3111 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
3112 if (_ptr_MachineName) {
3113 NDR_PULL_ALLOC(ndr, r->in.MachineName);
3114 } else {
3115 r->in.MachineName = NULL;
3117 if (r->in.MachineName) {
3118 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3119 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
3120 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
3121 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
3122 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
3123 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.MachineName), ndr_get_array_length(ndr, &r->in.MachineName));
3125 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
3126 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
3127 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
3129 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
3130 if (_ptr_DatabaseName) {
3131 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
3132 } else {
3133 r->in.DatabaseName = NULL;
3135 if (r->in.DatabaseName) {
3136 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3137 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
3138 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
3139 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
3140 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
3141 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DatabaseName), ndr_get_array_length(ndr, &r->in.DatabaseName));
3143 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
3144 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
3145 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
3147 NDR_CHECK(ndr_pull_svcctl_MgrAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3148 NDR_PULL_ALLOC(ndr, r->out.handle);
3149 ZERO_STRUCTP(r->out.handle);
3151 if (flags & NDR_OUT) {
3152 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3153 NDR_PULL_ALLOC(ndr, r->out.handle);
3155 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3156 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3157 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3159 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3161 return NDR_ERR_SUCCESS;
3164 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r)
3166 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerW");
3167 ndr->depth++;
3168 if (flags & NDR_SET_VALUES) {
3169 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3171 if (flags & NDR_IN) {
3172 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerW");
3173 ndr->depth++;
3174 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
3175 ndr->depth++;
3176 if (r->in.MachineName) {
3177 ndr_print_string(ndr, "MachineName", r->in.MachineName);
3179 ndr->depth--;
3180 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
3181 ndr->depth++;
3182 if (r->in.DatabaseName) {
3183 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
3185 ndr->depth--;
3186 ndr_print_svcctl_MgrAccessMask(ndr, "access_mask", r->in.access_mask);
3187 ndr->depth--;
3189 if (flags & NDR_OUT) {
3190 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerW");
3191 ndr->depth++;
3192 ndr_print_ptr(ndr, "handle", r->out.handle);
3193 ndr->depth++;
3194 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3195 ndr->depth--;
3196 ndr_print_WERROR(ndr, "result", r->out.result);
3197 ndr->depth--;
3199 ndr->depth--;
3202 static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
3204 if (flags & NDR_IN) {
3205 if (r->in.scmanager_handle == NULL) {
3206 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3208 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3209 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3210 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3211 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3212 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3213 NDR_CHECK(ndr_push_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3215 if (flags & NDR_OUT) {
3216 if (r->out.handle == NULL) {
3217 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3219 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3220 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3222 return NDR_ERR_SUCCESS;
3225 static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
3227 TALLOC_CTX *_mem_save_scmanager_handle_0;
3228 TALLOC_CTX *_mem_save_handle_0;
3229 if (flags & NDR_IN) {
3230 ZERO_STRUCT(r->out);
3232 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3233 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
3235 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3236 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
3237 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
3239 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
3240 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
3241 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
3242 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
3244 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
3245 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
3246 NDR_CHECK(ndr_pull_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3247 NDR_PULL_ALLOC(ndr, r->out.handle);
3248 ZERO_STRUCTP(r->out.handle);
3250 if (flags & NDR_OUT) {
3251 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3252 NDR_PULL_ALLOC(ndr, r->out.handle);
3254 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3255 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3256 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3257 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3258 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3260 return NDR_ERR_SUCCESS;
3263 _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r)
3265 ndr_print_struct(ndr, name, "svcctl_OpenServiceW");
3266 ndr->depth++;
3267 if (flags & NDR_SET_VALUES) {
3268 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3270 if (flags & NDR_IN) {
3271 ndr_print_struct(ndr, "in", "svcctl_OpenServiceW");
3272 ndr->depth++;
3273 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
3274 ndr->depth++;
3275 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
3276 ndr->depth--;
3277 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
3278 ndr_print_svcctl_ServiceAccessMask(ndr, "access_mask", r->in.access_mask);
3279 ndr->depth--;
3281 if (flags & NDR_OUT) {
3282 ndr_print_struct(ndr, "out", "svcctl_OpenServiceW");
3283 ndr->depth++;
3284 ndr_print_ptr(ndr, "handle", r->out.handle);
3285 ndr->depth++;
3286 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3287 ndr->depth--;
3288 ndr_print_WERROR(ndr, "result", r->out.result);
3289 ndr->depth--;
3291 ndr->depth--;
3294 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
3296 if (flags & NDR_IN) {
3297 if (r->in.handle == NULL) {
3298 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3300 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3301 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3303 if (flags & NDR_OUT) {
3304 if (r->out.query == NULL) {
3305 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3307 NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3308 if (r->out.needed == NULL) {
3309 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3312 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3314 return NDR_ERR_SUCCESS;
3317 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
3319 TALLOC_CTX *_mem_save_handle_0;
3320 TALLOC_CTX *_mem_save_query_0;
3321 TALLOC_CTX *_mem_save_needed_0;
3322 if (flags & NDR_IN) {
3323 ZERO_STRUCT(r->out);
3325 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3326 NDR_PULL_ALLOC(ndr, r->in.handle);
3328 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3329 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3330 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3331 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3333 if (r->in.offered > 8192) {
3334 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3336 NDR_PULL_ALLOC(ndr, r->out.query);
3337 ZERO_STRUCTP(r->out.query);
3338 NDR_PULL_ALLOC(ndr, r->out.needed);
3339 ZERO_STRUCTP(r->out.needed);
3341 if (flags & NDR_OUT) {
3342 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3343 NDR_PULL_ALLOC(ndr, r->out.query);
3345 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
3346 NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
3347 NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3348 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
3349 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3350 NDR_PULL_ALLOC(ndr, r->out.needed);
3352 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3353 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3354 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3355 if (*r->out.needed > 8192) {
3356 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3358 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3359 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3361 return NDR_ERR_SUCCESS;
3364 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r)
3366 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigW");
3367 ndr->depth++;
3368 if (flags & NDR_SET_VALUES) {
3369 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3371 if (flags & NDR_IN) {
3372 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigW");
3373 ndr->depth++;
3374 ndr_print_ptr(ndr, "handle", r->in.handle);
3375 ndr->depth++;
3376 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3377 ndr->depth--;
3378 ndr_print_uint32(ndr, "offered", r->in.offered);
3379 ndr->depth--;
3381 if (flags & NDR_OUT) {
3382 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
3383 ndr->depth++;
3384 ndr_print_ptr(ndr, "query", r->out.query);
3385 ndr->depth++;
3386 ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
3387 ndr->depth--;
3388 ndr_print_ptr(ndr, "needed", r->out.needed);
3389 ndr->depth++;
3390 ndr_print_uint32(ndr, "needed", *r->out.needed);
3391 ndr->depth--;
3392 ndr_print_WERROR(ndr, "result", r->out.result);
3393 ndr->depth--;
3395 ndr->depth--;
3398 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3400 if (flags & NDR_IN) {
3401 if (r->in.handle == NULL) {
3402 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3404 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3407 if (flags & NDR_OUT) {
3408 if (r->out.lock_status == NULL) {
3409 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3411 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3412 if (r->out.needed == NULL) {
3413 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3415 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3416 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3418 return NDR_ERR_SUCCESS;
3421 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
3423 TALLOC_CTX *_mem_save_handle_0;
3424 TALLOC_CTX *_mem_save_lock_status_0;
3425 TALLOC_CTX *_mem_save_needed_0;
3426 if (flags & NDR_IN) {
3427 ZERO_STRUCT(r->out);
3429 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3430 NDR_PULL_ALLOC(ndr, r->in.handle);
3432 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3433 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3434 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3437 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3438 ZERO_STRUCTP(r->out.lock_status);
3439 NDR_PULL_ALLOC(ndr, r->out.needed);
3440 ZERO_STRUCTP(r->out.needed);
3442 if (flags & NDR_OUT) {
3443 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3444 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3446 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3447 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
3448 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3449 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
3450 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3451 NDR_PULL_ALLOC(ndr, r->out.needed);
3453 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3454 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3455 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3456 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3457 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3459 return NDR_ERR_SUCCESS;
3462 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3464 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusW");
3465 ndr->depth++;
3466 if (flags & NDR_SET_VALUES) {
3467 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3469 if (flags & NDR_IN) {
3470 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusW");
3471 ndr->depth++;
3472 ndr_print_ptr(ndr, "handle", r->in.handle);
3473 ndr->depth++;
3474 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3475 ndr->depth--;
3476 ndr_print_uint32(ndr, "offered", r->in.offered);
3477 ndr->depth--;
3479 if (flags & NDR_OUT) {
3480 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusW");
3481 ndr->depth++;
3482 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
3483 ndr->depth++;
3484 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
3485 ndr->depth--;
3486 ndr_print_ptr(ndr, "needed", r->out.needed);
3487 ndr->depth++;
3488 ndr_print_uint32(ndr, "needed", *r->out.needed);
3489 ndr->depth--;
3490 ndr_print_WERROR(ndr, "result", r->out.result);
3491 ndr->depth--;
3493 ndr->depth--;
3496 static enum ndr_err_code ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
3498 uint32_t cntr_Arguments_1;
3499 if (flags & NDR_IN) {
3500 if (r->in.handle == NULL) {
3501 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3503 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
3505 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
3506 if (r->in.Arguments) {
3507 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.NumArgs));
3508 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3509 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3511 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3512 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3516 if (flags & NDR_OUT) {
3517 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3519 return NDR_ERR_SUCCESS;
3522 static enum ndr_err_code ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
3524 uint32_t _ptr_Arguments;
3525 uint32_t cntr_Arguments_1;
3526 TALLOC_CTX *_mem_save_handle_0;
3527 TALLOC_CTX *_mem_save_Arguments_0;
3528 TALLOC_CTX *_mem_save_Arguments_1;
3529 if (flags & NDR_IN) {
3530 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3531 NDR_PULL_ALLOC(ndr, r->in.handle);
3533 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3534 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3535 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3536 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3537 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
3538 if (r->in.NumArgs > SC_MAX_ARGUMENTS) {
3539 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3541 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
3542 if (_ptr_Arguments) {
3543 NDR_PULL_ALLOC(ndr, r->in.Arguments);
3544 } else {
3545 r->in.Arguments = NULL;
3547 if (r->in.Arguments) {
3548 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
3549 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3550 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
3551 NDR_PULL_ALLOC_N(ndr, r->in.Arguments, ndr_get_array_size(ndr, &r->in.Arguments));
3552 _mem_save_Arguments_1 = NDR_PULL_GET_MEM_CTX(ndr);
3553 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3554 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3555 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3557 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3558 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_1, 0);
3561 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
3563 if (r->in.Arguments) {
3564 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.Arguments, r->in.NumArgs));
3567 if (flags & NDR_OUT) {
3568 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3570 return NDR_ERR_SUCCESS;
3573 _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r)
3575 uint32_t cntr_Arguments_1;
3576 ndr_print_struct(ndr, name, "svcctl_StartServiceW");
3577 ndr->depth++;
3578 if (flags & NDR_SET_VALUES) {
3579 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3581 if (flags & NDR_IN) {
3582 ndr_print_struct(ndr, "in", "svcctl_StartServiceW");
3583 ndr->depth++;
3584 ndr_print_ptr(ndr, "handle", r->in.handle);
3585 ndr->depth++;
3586 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3587 ndr->depth--;
3588 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
3589 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
3590 ndr->depth++;
3591 if (r->in.Arguments) {
3592 ndr->print(ndr, "%s: ARRAY(%d)", "Arguments", (int)r->in.NumArgs);
3593 ndr->depth++;
3594 for (cntr_Arguments_1=0;cntr_Arguments_1<r->in.NumArgs;cntr_Arguments_1++) {
3595 char *idx_1=NULL;
3596 if (asprintf(&idx_1, "[%d]", cntr_Arguments_1) != -1) {
3597 ndr_print_svcctl_ArgumentString(ndr, "Arguments", &r->in.Arguments[cntr_Arguments_1]);
3598 free(idx_1);
3601 ndr->depth--;
3603 ndr->depth--;
3604 ndr->depth--;
3606 if (flags & NDR_OUT) {
3607 ndr_print_struct(ndr, "out", "svcctl_StartServiceW");
3608 ndr->depth++;
3609 ndr_print_WERROR(ndr, "result", r->out.result);
3610 ndr->depth--;
3612 ndr->depth--;
3615 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3617 if (flags & NDR_IN) {
3618 if (r->in.handle == NULL) {
3619 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3621 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3622 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3623 if (r->in.service_name) {
3624 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3625 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3626 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3627 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3629 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3630 if (r->in.display_name_length) {
3631 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3634 if (flags & NDR_OUT) {
3635 if (r->out.display_name == NULL) {
3636 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3638 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
3639 if (*r->out.display_name) {
3640 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3641 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3642 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3643 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3645 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3646 if (r->out.display_name_length) {
3647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3649 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3651 return NDR_ERR_SUCCESS;
3654 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
3656 uint32_t _ptr_service_name;
3657 uint32_t _ptr_display_name;
3658 uint32_t _ptr_display_name_length;
3659 TALLOC_CTX *_mem_save_handle_0;
3660 TALLOC_CTX *_mem_save_service_name_0;
3661 TALLOC_CTX *_mem_save_display_name_0;
3662 TALLOC_CTX *_mem_save_display_name_1;
3663 TALLOC_CTX *_mem_save_display_name_length_0;
3664 if (flags & NDR_IN) {
3665 ZERO_STRUCT(r->out);
3667 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3668 NDR_PULL_ALLOC(ndr, r->in.handle);
3670 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3671 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3672 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3673 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3674 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3675 if (_ptr_service_name) {
3676 NDR_PULL_ALLOC(ndr, r->in.service_name);
3677 } else {
3678 r->in.service_name = NULL;
3680 if (r->in.service_name) {
3681 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3682 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3683 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3684 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3685 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3686 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
3688 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3689 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
3690 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3692 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3693 if (_ptr_display_name_length) {
3694 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3695 } else {
3696 r->in.display_name_length = NULL;
3698 if (r->in.display_name_length) {
3699 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3700 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3701 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3702 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3704 NDR_PULL_ALLOC(ndr, r->out.display_name);
3705 ZERO_STRUCTP(r->out.display_name);
3707 if (flags & NDR_OUT) {
3708 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3709 NDR_PULL_ALLOC(ndr, r->out.display_name);
3711 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3712 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
3713 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
3714 if (_ptr_display_name) {
3715 NDR_PULL_ALLOC(ndr, *r->out.display_name);
3716 } else {
3717 *r->out.display_name = NULL;
3719 if (*r->out.display_name) {
3720 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3721 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
3722 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
3723 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
3724 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
3725 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name));
3727 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
3728 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16));
3729 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
3731 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
3732 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3733 if (_ptr_display_name_length) {
3734 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3735 } else {
3736 r->out.display_name_length = NULL;
3738 if (r->out.display_name_length) {
3739 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3740 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3741 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3744 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3746 return NDR_ERR_SUCCESS;
3749 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3751 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameW");
3752 ndr->depth++;
3753 if (flags & NDR_SET_VALUES) {
3754 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3756 if (flags & NDR_IN) {
3757 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameW");
3758 ndr->depth++;
3759 ndr_print_ptr(ndr, "handle", r->in.handle);
3760 ndr->depth++;
3761 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3762 ndr->depth--;
3763 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3764 ndr->depth++;
3765 if (r->in.service_name) {
3766 ndr_print_string(ndr, "service_name", r->in.service_name);
3768 ndr->depth--;
3769 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3770 ndr->depth++;
3771 if (r->in.display_name_length) {
3772 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3774 ndr->depth--;
3775 ndr->depth--;
3777 if (flags & NDR_OUT) {
3778 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameW");
3779 ndr->depth++;
3780 ndr_print_ptr(ndr, "display_name", r->out.display_name);
3781 ndr->depth++;
3782 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
3783 ndr->depth++;
3784 if (*r->out.display_name) {
3785 ndr_print_string(ndr, "display_name", *r->out.display_name);
3787 ndr->depth--;
3788 ndr->depth--;
3789 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3790 ndr->depth++;
3791 if (r->out.display_name_length) {
3792 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3794 ndr->depth--;
3795 ndr_print_WERROR(ndr, "result", r->out.result);
3796 ndr->depth--;
3798 ndr->depth--;
3801 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
3803 if (flags & NDR_IN) {
3804 if (r->in.handle == NULL) {
3805 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3807 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3808 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3809 if (r->in.service_name) {
3810 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3811 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3812 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3813 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3815 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3816 if (r->in.display_name_length) {
3817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3820 if (flags & NDR_OUT) {
3821 if (r->out.key_name == NULL) {
3822 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3824 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
3825 if (*r->out.key_name) {
3826 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3827 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3828 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3829 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3831 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3832 if (r->out.display_name_length) {
3833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3835 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3837 return NDR_ERR_SUCCESS;
3840 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
3842 uint32_t _ptr_service_name;
3843 uint32_t _ptr_key_name;
3844 uint32_t _ptr_display_name_length;
3845 TALLOC_CTX *_mem_save_handle_0;
3846 TALLOC_CTX *_mem_save_service_name_0;
3847 TALLOC_CTX *_mem_save_key_name_0;
3848 TALLOC_CTX *_mem_save_key_name_1;
3849 TALLOC_CTX *_mem_save_display_name_length_0;
3850 if (flags & NDR_IN) {
3851 ZERO_STRUCT(r->out);
3853 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3854 NDR_PULL_ALLOC(ndr, r->in.handle);
3856 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3857 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3858 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3859 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3860 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3861 if (_ptr_service_name) {
3862 NDR_PULL_ALLOC(ndr, r->in.service_name);
3863 } else {
3864 r->in.service_name = NULL;
3866 if (r->in.service_name) {
3867 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3868 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3869 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3870 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3871 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3872 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
3874 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3875 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
3876 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3878 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3879 if (_ptr_display_name_length) {
3880 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3881 } else {
3882 r->in.display_name_length = NULL;
3884 if (r->in.display_name_length) {
3885 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3886 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3887 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3888 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3890 NDR_PULL_ALLOC(ndr, r->out.key_name);
3891 ZERO_STRUCTP(r->out.key_name);
3893 if (flags & NDR_OUT) {
3894 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3895 NDR_PULL_ALLOC(ndr, r->out.key_name);
3897 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3898 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
3899 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
3900 if (_ptr_key_name) {
3901 NDR_PULL_ALLOC(ndr, *r->out.key_name);
3902 } else {
3903 *r->out.key_name = NULL;
3905 if (*r->out.key_name) {
3906 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3907 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
3908 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
3909 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
3910 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
3911 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name));
3913 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
3914 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16));
3915 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
3917 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
3918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3919 if (_ptr_display_name_length) {
3920 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3921 } else {
3922 r->out.display_name_length = NULL;
3924 if (r->out.display_name_length) {
3925 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3926 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3927 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3928 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3930 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3932 return NDR_ERR_SUCCESS;
3935 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r)
3937 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameW");
3938 ndr->depth++;
3939 if (flags & NDR_SET_VALUES) {
3940 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3942 if (flags & NDR_IN) {
3943 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameW");
3944 ndr->depth++;
3945 ndr_print_ptr(ndr, "handle", r->in.handle);
3946 ndr->depth++;
3947 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3948 ndr->depth--;
3949 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3950 ndr->depth++;
3951 if (r->in.service_name) {
3952 ndr_print_string(ndr, "service_name", r->in.service_name);
3954 ndr->depth--;
3955 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3956 ndr->depth++;
3957 if (r->in.display_name_length) {
3958 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3960 ndr->depth--;
3961 ndr->depth--;
3963 if (flags & NDR_OUT) {
3964 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameW");
3965 ndr->depth++;
3966 ndr_print_ptr(ndr, "key_name", r->out.key_name);
3967 ndr->depth++;
3968 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
3969 ndr->depth++;
3970 if (*r->out.key_name) {
3971 ndr_print_string(ndr, "key_name", *r->out.key_name);
3973 ndr->depth--;
3974 ndr->depth--;
3975 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3976 ndr->depth++;
3977 if (r->out.display_name_length) {
3978 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3980 ndr->depth--;
3981 ndr_print_WERROR(ndr, "result", r->out.result);
3982 ndr->depth--;
3984 ndr->depth--;
3987 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
3989 if (flags & NDR_IN) {
3990 if (r->in.handle == NULL) {
3991 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3993 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3994 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
3995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
3996 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
3998 if (flags & NDR_OUT) {
3999 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4001 return NDR_ERR_SUCCESS;
4004 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
4006 TALLOC_CTX *_mem_save_handle_0;
4007 if (flags & NDR_IN) {
4008 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4009 NDR_PULL_ALLOC(ndr, r->in.handle);
4011 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4012 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4013 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4014 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4015 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
4016 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
4017 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
4019 if (flags & NDR_OUT) {
4020 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4022 return NDR_ERR_SUCCESS;
4025 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r)
4027 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsA");
4028 ndr->depth++;
4029 if (flags & NDR_SET_VALUES) {
4030 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4032 if (flags & NDR_IN) {
4033 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsA");
4034 ndr->depth++;
4035 ndr_print_ptr(ndr, "handle", r->in.handle);
4036 ndr->depth++;
4037 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4038 ndr->depth--;
4039 ndr_print_uint32(ndr, "bits", r->in.bits);
4040 ndr_print_uint32(ndr, "bitson", r->in.bitson);
4041 ndr_print_uint32(ndr, "immediate", r->in.immediate);
4042 ndr->depth--;
4044 if (flags & NDR_OUT) {
4045 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsA");
4046 ndr->depth++;
4047 ndr_print_WERROR(ndr, "result", r->out.result);
4048 ndr->depth--;
4050 ndr->depth--;
4053 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
4055 if (flags & NDR_IN) {
4056 if (r->in.handle == NULL) {
4057 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4059 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4061 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4062 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4063 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4064 if (r->in.binary_path) {
4065 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4066 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4067 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4068 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4070 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
4071 if (r->in.load_order_group) {
4072 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4073 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4074 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4075 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.load_order_group, ndr_charset_length(r->in.load_order_group, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4077 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4078 if (r->in.dependencies) {
4079 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4080 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4081 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4082 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4084 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4085 if (r->in.service_start_name) {
4086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4087 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4088 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4089 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4091 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4092 if (r->in.password) {
4093 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4094 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4095 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4096 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4098 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
4099 if (r->in.display_name) {
4100 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4101 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4102 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4103 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.display_name, ndr_charset_length(r->in.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4106 if (flags & NDR_OUT) {
4107 if (r->out.tag_id == NULL) {
4108 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4110 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
4111 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4113 return NDR_ERR_SUCCESS;
4116 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
4118 uint32_t _ptr_binary_path;
4119 uint32_t _ptr_load_order_group;
4120 uint32_t _ptr_dependencies;
4121 uint32_t _ptr_service_start_name;
4122 uint32_t _ptr_password;
4123 uint32_t _ptr_display_name;
4124 TALLOC_CTX *_mem_save_handle_0;
4125 TALLOC_CTX *_mem_save_binary_path_0;
4126 TALLOC_CTX *_mem_save_load_order_group_0;
4127 TALLOC_CTX *_mem_save_tag_id_0;
4128 TALLOC_CTX *_mem_save_dependencies_0;
4129 TALLOC_CTX *_mem_save_service_start_name_0;
4130 TALLOC_CTX *_mem_save_password_0;
4131 TALLOC_CTX *_mem_save_display_name_0;
4132 if (flags & NDR_IN) {
4133 ZERO_STRUCT(r->out);
4135 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4136 NDR_PULL_ALLOC(ndr, r->in.handle);
4138 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4139 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4140 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4141 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4142 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4143 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4144 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4145 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4146 if (_ptr_binary_path) {
4147 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4148 } else {
4149 r->in.binary_path = NULL;
4151 if (r->in.binary_path) {
4152 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4153 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4154 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4155 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4156 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4157 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
4159 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4160 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
4161 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4163 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
4164 if (_ptr_load_order_group) {
4165 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
4166 } else {
4167 r->in.load_order_group = NULL;
4169 if (r->in.load_order_group) {
4170 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4171 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
4172 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
4173 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
4174 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
4175 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.load_order_group), ndr_get_array_length(ndr, &r->in.load_order_group));
4177 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
4178 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t), CH_UTF16));
4179 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
4181 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4182 if (_ptr_dependencies) {
4183 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4184 } else {
4185 r->in.dependencies = NULL;
4187 if (r->in.dependencies) {
4188 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4189 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4190 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4191 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4192 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4193 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dependencies), ndr_get_array_length(ndr, &r->in.dependencies));
4195 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4196 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4197 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4199 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4200 if (_ptr_service_start_name) {
4201 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4202 } else {
4203 r->in.service_start_name = NULL;
4205 if (r->in.service_start_name) {
4206 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4207 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4208 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4209 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4210 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4211 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
4213 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4214 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
4215 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4217 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4218 if (_ptr_password) {
4219 NDR_PULL_ALLOC(ndr, r->in.password);
4220 } else {
4221 r->in.password = NULL;
4223 if (r->in.password) {
4224 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4225 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4226 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4227 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4228 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4229 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.password), ndr_get_array_length(ndr, &r->in.password));
4231 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4232 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4233 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
4236 if (_ptr_display_name) {
4237 NDR_PULL_ALLOC(ndr, r->in.display_name);
4238 } else {
4239 r->in.display_name = NULL;
4241 if (r->in.display_name) {
4242 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4243 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
4244 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
4245 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
4246 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
4247 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.display_name), ndr_get_array_length(ndr, &r->in.display_name));
4249 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
4250 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t), CH_UTF16));
4251 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
4253 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4254 ZERO_STRUCTP(r->out.tag_id);
4256 if (flags & NDR_OUT) {
4257 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4258 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4260 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
4261 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
4262 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
4263 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
4264 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4266 return NDR_ERR_SUCCESS;
4269 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r)
4271 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigA");
4272 ndr->depth++;
4273 if (flags & NDR_SET_VALUES) {
4274 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4276 if (flags & NDR_IN) {
4277 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigA");
4278 ndr->depth++;
4279 ndr_print_ptr(ndr, "handle", r->in.handle);
4280 ndr->depth++;
4281 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4282 ndr->depth--;
4283 ndr_print_uint32(ndr, "type", r->in.type);
4284 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4285 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4286 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4287 ndr->depth++;
4288 if (r->in.binary_path) {
4289 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4291 ndr->depth--;
4292 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
4293 ndr->depth++;
4294 if (r->in.load_order_group) {
4295 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
4297 ndr->depth--;
4298 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4299 ndr->depth++;
4300 if (r->in.dependencies) {
4301 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4303 ndr->depth--;
4304 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4305 ndr->depth++;
4306 if (r->in.service_start_name) {
4307 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4309 ndr->depth--;
4310 ndr_print_ptr(ndr, "password", r->in.password);
4311 ndr->depth++;
4312 if (r->in.password) {
4313 ndr_print_string(ndr, "password", r->in.password);
4315 ndr->depth--;
4316 ndr_print_ptr(ndr, "display_name", r->in.display_name);
4317 ndr->depth++;
4318 if (r->in.display_name) {
4319 ndr_print_string(ndr, "display_name", r->in.display_name);
4321 ndr->depth--;
4322 ndr->depth--;
4324 if (flags & NDR_OUT) {
4325 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigA");
4326 ndr->depth++;
4327 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
4328 ndr->depth++;
4329 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
4330 ndr->depth--;
4331 ndr_print_WERROR(ndr, "result", r->out.result);
4332 ndr->depth--;
4334 ndr->depth--;
4337 static enum ndr_err_code ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
4339 if (flags & NDR_IN) {
4340 if (r->in.handle == NULL) {
4341 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4343 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4344 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
4345 if (r->in.ServiceName) {
4346 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4347 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4348 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4349 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4351 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
4352 if (r->in.DisplayName) {
4353 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4354 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4355 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4356 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
4359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4360 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4361 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4362 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4363 if (r->in.binary_path) {
4364 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4365 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4366 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4367 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4369 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
4370 if (r->in.LoadOrderGroupKey) {
4371 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4372 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4373 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4374 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4377 if (r->in.dependencies) {
4378 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4379 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4380 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4381 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4383 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4384 if (r->in.service_start_name) {
4385 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4386 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4387 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4388 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4390 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4391 if (r->in.password) {
4392 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4393 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4394 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4395 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4398 if (flags & NDR_OUT) {
4399 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
4400 if (r->out.TagId) {
4401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
4403 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4405 return NDR_ERR_SUCCESS;
4408 static enum ndr_err_code ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
4410 uint32_t _ptr_ServiceName;
4411 uint32_t _ptr_DisplayName;
4412 uint32_t _ptr_binary_path;
4413 uint32_t _ptr_LoadOrderGroupKey;
4414 uint32_t _ptr_TagId;
4415 uint32_t _ptr_dependencies;
4416 uint32_t _ptr_service_start_name;
4417 uint32_t _ptr_password;
4418 TALLOC_CTX *_mem_save_handle_0;
4419 TALLOC_CTX *_mem_save_ServiceName_0;
4420 TALLOC_CTX *_mem_save_DisplayName_0;
4421 TALLOC_CTX *_mem_save_binary_path_0;
4422 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
4423 TALLOC_CTX *_mem_save_TagId_0;
4424 TALLOC_CTX *_mem_save_dependencies_0;
4425 TALLOC_CTX *_mem_save_service_start_name_0;
4426 TALLOC_CTX *_mem_save_password_0;
4427 if (flags & NDR_IN) {
4428 ZERO_STRUCT(r->out);
4430 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4431 NDR_PULL_ALLOC(ndr, r->in.handle);
4433 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4434 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4435 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4436 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4437 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
4438 if (_ptr_ServiceName) {
4439 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
4440 } else {
4441 r->in.ServiceName = NULL;
4443 if (r->in.ServiceName) {
4444 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4445 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
4446 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
4447 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
4448 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
4449 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
4451 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
4452 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
4453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
4455 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
4456 if (_ptr_DisplayName) {
4457 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
4458 } else {
4459 r->in.DisplayName = NULL;
4461 if (r->in.DisplayName) {
4462 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4463 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
4464 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
4465 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
4466 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
4467 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DisplayName), ndr_get_array_length(ndr, &r->in.DisplayName));
4469 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
4470 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
4471 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
4473 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
4474 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4475 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4476 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4477 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4478 if (_ptr_binary_path) {
4479 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4480 } else {
4481 r->in.binary_path = NULL;
4483 if (r->in.binary_path) {
4484 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4485 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4486 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4487 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4488 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4489 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.binary_path), ndr_get_array_length(ndr, &r->in.binary_path));
4491 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4492 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t), CH_UTF16));
4493 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4495 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
4496 if (_ptr_LoadOrderGroupKey) {
4497 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
4498 } else {
4499 r->in.LoadOrderGroupKey = NULL;
4501 if (r->in.LoadOrderGroupKey) {
4502 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
4503 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
4504 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
4505 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
4506 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
4507 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey), ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey));
4509 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
4510 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
4511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
4513 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4514 if (_ptr_dependencies) {
4515 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4516 } else {
4517 r->in.dependencies = NULL;
4519 if (r->in.dependencies) {
4520 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4521 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4522 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4523 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4524 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4525 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dependencies), ndr_get_array_length(ndr, &r->in.dependencies));
4527 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4528 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4529 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4531 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4532 if (_ptr_service_start_name) {
4533 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4534 } else {
4535 r->in.service_start_name = NULL;
4537 if (r->in.service_start_name) {
4538 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4539 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4540 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4541 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4542 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4543 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_start_name), ndr_get_array_length(ndr, &r->in.service_start_name));
4545 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4546 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t), CH_UTF16));
4547 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4549 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4550 if (_ptr_password) {
4551 NDR_PULL_ALLOC(ndr, r->in.password);
4552 } else {
4553 r->in.password = NULL;
4555 if (r->in.password) {
4556 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4557 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4558 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4559 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4560 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4561 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.password), ndr_get_array_length(ndr, &r->in.password));
4563 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4564 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4568 if (flags & NDR_OUT) {
4569 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
4570 if (_ptr_TagId) {
4571 NDR_PULL_ALLOC(ndr, r->out.TagId);
4572 } else {
4573 r->out.TagId = NULL;
4575 if (r->out.TagId) {
4576 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
4577 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
4578 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
4579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
4581 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4583 return NDR_ERR_SUCCESS;
4586 _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r)
4588 ndr_print_struct(ndr, name, "svcctl_CreateServiceA");
4589 ndr->depth++;
4590 if (flags & NDR_SET_VALUES) {
4591 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4593 if (flags & NDR_IN) {
4594 ndr_print_struct(ndr, "in", "svcctl_CreateServiceA");
4595 ndr->depth++;
4596 ndr_print_ptr(ndr, "handle", r->in.handle);
4597 ndr->depth++;
4598 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4599 ndr->depth--;
4600 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
4601 ndr->depth++;
4602 if (r->in.ServiceName) {
4603 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
4605 ndr->depth--;
4606 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
4607 ndr->depth++;
4608 if (r->in.DisplayName) {
4609 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
4611 ndr->depth--;
4612 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
4613 ndr_print_uint32(ndr, "type", r->in.type);
4614 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4615 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4616 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4617 ndr->depth++;
4618 if (r->in.binary_path) {
4619 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4621 ndr->depth--;
4622 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4623 ndr->depth++;
4624 if (r->in.LoadOrderGroupKey) {
4625 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4627 ndr->depth--;
4628 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4629 ndr->depth++;
4630 if (r->in.dependencies) {
4631 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4633 ndr->depth--;
4634 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4635 ndr->depth++;
4636 if (r->in.service_start_name) {
4637 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4639 ndr->depth--;
4640 ndr_print_ptr(ndr, "password", r->in.password);
4641 ndr->depth++;
4642 if (r->in.password) {
4643 ndr_print_string(ndr, "password", r->in.password);
4645 ndr->depth--;
4646 ndr->depth--;
4648 if (flags & NDR_OUT) {
4649 ndr_print_struct(ndr, "out", "svcctl_CreateServiceA");
4650 ndr->depth++;
4651 ndr_print_ptr(ndr, "TagId", r->out.TagId);
4652 ndr->depth++;
4653 if (r->out.TagId) {
4654 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
4656 ndr->depth--;
4657 ndr_print_WERROR(ndr, "result", r->out.result);
4658 ndr->depth--;
4660 ndr->depth--;
4663 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
4665 if (flags & NDR_IN) {
4666 if (r->in.service == NULL) {
4667 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4669 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
4670 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
4671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4673 if (flags & NDR_OUT) {
4674 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status));
4675 if (r->out.service_status) {
4676 NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4678 if (r->out.needed == NULL) {
4679 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4681 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4682 if (r->out.services_returned == NULL) {
4683 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4686 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4688 return NDR_ERR_SUCCESS;
4691 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
4693 uint32_t _ptr_service_status;
4694 TALLOC_CTX *_mem_save_service_0;
4695 TALLOC_CTX *_mem_save_service_status_0;
4696 TALLOC_CTX *_mem_save_needed_0;
4697 TALLOC_CTX *_mem_save_services_returned_0;
4698 if (flags & NDR_IN) {
4699 ZERO_STRUCT(r->out);
4701 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4702 NDR_PULL_ALLOC(ndr, r->in.service);
4704 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
4705 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
4706 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
4707 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
4708 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
4709 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4710 NDR_PULL_ALLOC(ndr, r->out.needed);
4711 ZERO_STRUCTP(r->out.needed);
4712 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4713 ZERO_STRUCTP(r->out.services_returned);
4715 if (flags & NDR_OUT) {
4716 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_status));
4717 if (_ptr_service_status) {
4718 NDR_PULL_ALLOC(ndr, r->out.service_status);
4719 } else {
4720 r->out.service_status = NULL;
4722 if (r->out.service_status) {
4723 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
4724 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, 0);
4725 NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
4728 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4729 NDR_PULL_ALLOC(ndr, r->out.needed);
4731 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4732 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4733 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4735 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4736 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4738 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4739 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4740 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4741 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4742 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4744 return NDR_ERR_SUCCESS;
4747 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r)
4749 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesA");
4750 ndr->depth++;
4751 if (flags & NDR_SET_VALUES) {
4752 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4754 if (flags & NDR_IN) {
4755 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesA");
4756 ndr->depth++;
4757 ndr_print_ptr(ndr, "service", r->in.service);
4758 ndr->depth++;
4759 ndr_print_policy_handle(ndr, "service", r->in.service);
4760 ndr->depth--;
4761 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
4762 ndr_print_uint32(ndr, "offered", r->in.offered);
4763 ndr->depth--;
4765 if (flags & NDR_OUT) {
4766 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesA");
4767 ndr->depth++;
4768 ndr_print_ptr(ndr, "service_status", r->out.service_status);
4769 ndr->depth++;
4770 if (r->out.service_status) {
4771 ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status);
4773 ndr->depth--;
4774 ndr_print_ptr(ndr, "needed", r->out.needed);
4775 ndr->depth++;
4776 ndr_print_uint32(ndr, "needed", *r->out.needed);
4777 ndr->depth--;
4778 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4779 ndr->depth++;
4780 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4781 ndr->depth--;
4782 ndr_print_WERROR(ndr, "result", r->out.result);
4783 ndr->depth--;
4785 ndr->depth--;
4788 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
4790 if (flags & NDR_IN) {
4791 if (r->in.handle == NULL) {
4792 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4794 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4795 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4796 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
4797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4798 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
4799 if (r->in.resume_handle) {
4800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
4803 if (flags & NDR_OUT) {
4804 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
4805 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
4806 if (r->out.needed == NULL) {
4807 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4810 if (r->out.services_returned == NULL) {
4811 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4814 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
4815 if (r->out.resume_handle) {
4816 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
4818 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4820 return NDR_ERR_SUCCESS;
4823 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
4825 uint32_t _ptr_resume_handle;
4826 TALLOC_CTX *_mem_save_handle_0;
4827 TALLOC_CTX *_mem_save_needed_0;
4828 TALLOC_CTX *_mem_save_services_returned_0;
4829 TALLOC_CTX *_mem_save_resume_handle_0;
4830 if (flags & NDR_IN) {
4831 ZERO_STRUCT(r->out);
4833 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4834 NDR_PULL_ALLOC(ndr, r->in.handle);
4836 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4837 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4838 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4841 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
4842 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4843 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4844 if (_ptr_resume_handle) {
4845 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
4846 } else {
4847 r->in.resume_handle = NULL;
4849 if (r->in.resume_handle) {
4850 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4851 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
4852 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
4853 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4855 NDR_PULL_ALLOC(ndr, r->out.needed);
4856 ZERO_STRUCTP(r->out.needed);
4857 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4858 ZERO_STRUCTP(r->out.services_returned);
4860 if (flags & NDR_OUT) {
4861 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
4862 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
4863 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
4864 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4865 NDR_PULL_ALLOC(ndr, r->out.needed);
4867 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4868 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4869 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4870 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4871 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4872 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4874 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4875 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4876 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4877 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4878 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4879 if (_ptr_resume_handle) {
4880 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
4881 } else {
4882 r->out.resume_handle = NULL;
4884 if (r->out.resume_handle) {
4885 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4886 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
4887 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
4888 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4890 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4891 if (r->out.service) {
4892 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
4895 return NDR_ERR_SUCCESS;
4898 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r)
4900 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusA");
4901 ndr->depth++;
4902 if (flags & NDR_SET_VALUES) {
4903 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4905 if (flags & NDR_IN) {
4906 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusA");
4907 ndr->depth++;
4908 ndr_print_ptr(ndr, "handle", r->in.handle);
4909 ndr->depth++;
4910 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4911 ndr->depth--;
4912 ndr_print_uint32(ndr, "type", r->in.type);
4913 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
4914 ndr_print_uint32(ndr, "offered", r->in.offered);
4915 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
4916 ndr->depth++;
4917 if (r->in.resume_handle) {
4918 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
4920 ndr->depth--;
4921 ndr->depth--;
4923 if (flags & NDR_OUT) {
4924 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
4925 ndr->depth++;
4926 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
4927 ndr_print_ptr(ndr, "needed", r->out.needed);
4928 ndr->depth++;
4929 ndr_print_uint32(ndr, "needed", *r->out.needed);
4930 ndr->depth--;
4931 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4932 ndr->depth++;
4933 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4934 ndr->depth--;
4935 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
4936 ndr->depth++;
4937 if (r->out.resume_handle) {
4938 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
4940 ndr->depth--;
4941 ndr_print_WERROR(ndr, "result", r->out.result);
4942 ndr->depth--;
4944 ndr->depth--;
4947 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
4949 if (flags & NDR_IN) {
4950 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
4951 if (r->in.MachineName) {
4952 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4953 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4954 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4955 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4957 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
4958 if (r->in.DatabaseName) {
4959 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4960 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4961 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4962 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
4966 if (flags & NDR_OUT) {
4967 if (r->out.handle == NULL) {
4968 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4970 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4971 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4973 return NDR_ERR_SUCCESS;
4976 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
4978 uint32_t _ptr_MachineName;
4979 uint32_t _ptr_DatabaseName;
4980 TALLOC_CTX *_mem_save_MachineName_0;
4981 TALLOC_CTX *_mem_save_DatabaseName_0;
4982 TALLOC_CTX *_mem_save_handle_0;
4983 if (flags & NDR_IN) {
4984 ZERO_STRUCT(r->out);
4986 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
4987 if (_ptr_MachineName) {
4988 NDR_PULL_ALLOC(ndr, r->in.MachineName);
4989 } else {
4990 r->in.MachineName = NULL;
4992 if (r->in.MachineName) {
4993 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4994 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
4995 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
4996 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
4997 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
4998 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.MachineName), ndr_get_array_length(ndr, &r->in.MachineName));
5000 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
5001 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
5002 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
5004 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
5005 if (_ptr_DatabaseName) {
5006 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
5007 } else {
5008 r->in.DatabaseName = NULL;
5010 if (r->in.DatabaseName) {
5011 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5012 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
5013 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
5014 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
5015 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
5016 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.DatabaseName), ndr_get_array_length(ndr, &r->in.DatabaseName));
5018 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
5019 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
5020 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
5022 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5023 NDR_PULL_ALLOC(ndr, r->out.handle);
5024 ZERO_STRUCTP(r->out.handle);
5026 if (flags & NDR_OUT) {
5027 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5028 NDR_PULL_ALLOC(ndr, r->out.handle);
5030 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5031 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5032 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5034 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5036 return NDR_ERR_SUCCESS;
5039 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r)
5041 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerA");
5042 ndr->depth++;
5043 if (flags & NDR_SET_VALUES) {
5044 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5046 if (flags & NDR_IN) {
5047 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerA");
5048 ndr->depth++;
5049 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
5050 ndr->depth++;
5051 if (r->in.MachineName) {
5052 ndr_print_string(ndr, "MachineName", r->in.MachineName);
5054 ndr->depth--;
5055 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
5056 ndr->depth++;
5057 if (r->in.DatabaseName) {
5058 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
5060 ndr->depth--;
5061 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5062 ndr->depth--;
5064 if (flags & NDR_OUT) {
5065 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerA");
5066 ndr->depth++;
5067 ndr_print_ptr(ndr, "handle", r->out.handle);
5068 ndr->depth++;
5069 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5070 ndr->depth--;
5071 ndr_print_WERROR(ndr, "result", r->out.result);
5072 ndr->depth--;
5074 ndr->depth--;
5077 static enum ndr_err_code ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
5079 if (flags & NDR_IN) {
5080 if (r->in.scmanager_handle == NULL) {
5081 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5083 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5084 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
5085 if (r->in.ServiceName) {
5086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5087 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5088 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5089 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
5093 if (flags & NDR_OUT) {
5094 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5096 return NDR_ERR_SUCCESS;
5099 static enum ndr_err_code ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
5101 uint32_t _ptr_ServiceName;
5102 TALLOC_CTX *_mem_save_scmanager_handle_0;
5103 TALLOC_CTX *_mem_save_ServiceName_0;
5104 if (flags & NDR_IN) {
5105 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5106 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5108 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5109 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
5110 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
5112 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
5113 if (_ptr_ServiceName) {
5114 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
5115 } else {
5116 r->in.ServiceName = NULL;
5118 if (r->in.ServiceName) {
5119 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5120 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
5121 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
5122 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
5123 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
5124 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.ServiceName), ndr_get_array_length(ndr, &r->in.ServiceName));
5126 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
5127 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
5128 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
5130 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5132 if (flags & NDR_OUT) {
5133 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5135 return NDR_ERR_SUCCESS;
5138 _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r)
5140 ndr_print_struct(ndr, name, "svcctl_OpenServiceA");
5141 ndr->depth++;
5142 if (flags & NDR_SET_VALUES) {
5143 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5145 if (flags & NDR_IN) {
5146 ndr_print_struct(ndr, "in", "svcctl_OpenServiceA");
5147 ndr->depth++;
5148 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
5149 ndr->depth++;
5150 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
5151 ndr->depth--;
5152 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
5153 ndr->depth++;
5154 if (r->in.ServiceName) {
5155 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5157 ndr->depth--;
5158 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5159 ndr->depth--;
5161 if (flags & NDR_OUT) {
5162 ndr_print_struct(ndr, "out", "svcctl_OpenServiceA");
5163 ndr->depth++;
5164 ndr_print_WERROR(ndr, "result", r->out.result);
5165 ndr->depth--;
5167 ndr->depth--;
5170 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
5172 if (flags & NDR_IN) {
5173 if (r->in.handle == NULL) {
5174 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5176 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5177 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5179 if (flags & NDR_OUT) {
5180 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5181 if (r->out.needed == NULL) {
5182 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5185 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5187 return NDR_ERR_SUCCESS;
5190 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
5192 TALLOC_CTX *_mem_save_handle_0;
5193 TALLOC_CTX *_mem_save_needed_0;
5194 if (flags & NDR_IN) {
5195 ZERO_STRUCT(r->out);
5197 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5198 NDR_PULL_ALLOC(ndr, r->in.handle);
5200 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5201 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5202 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5204 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5205 NDR_PULL_ALLOC(ndr, r->out.needed);
5206 ZERO_STRUCTP(r->out.needed);
5208 if (flags & NDR_OUT) {
5209 NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.offered);
5210 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5211 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5212 NDR_PULL_ALLOC(ndr, r->out.needed);
5214 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5215 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5217 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5218 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5220 return NDR_ERR_SUCCESS;
5223 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r)
5225 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigA");
5226 ndr->depth++;
5227 if (flags & NDR_SET_VALUES) {
5228 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5230 if (flags & NDR_IN) {
5231 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigA");
5232 ndr->depth++;
5233 ndr_print_ptr(ndr, "handle", r->in.handle);
5234 ndr->depth++;
5235 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5236 ndr->depth--;
5237 ndr_print_uint32(ndr, "offered", r->in.offered);
5238 ndr->depth--;
5240 if (flags & NDR_OUT) {
5241 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
5242 ndr->depth++;
5243 ndr_print_array_uint8(ndr, "query", r->out.query, r->in.offered);
5244 ndr_print_ptr(ndr, "needed", r->out.needed);
5245 ndr->depth++;
5246 ndr_print_uint32(ndr, "needed", *r->out.needed);
5247 ndr->depth--;
5248 ndr_print_WERROR(ndr, "result", r->out.result);
5249 ndr->depth--;
5251 ndr->depth--;
5254 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5256 if (flags & NDR_IN) {
5257 if (r->in.handle == NULL) {
5258 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5260 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5263 if (flags & NDR_OUT) {
5264 if (r->out.lock_status == NULL) {
5265 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5267 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5268 if (r->out.needed == NULL) {
5269 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5272 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5274 return NDR_ERR_SUCCESS;
5277 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
5279 TALLOC_CTX *_mem_save_handle_0;
5280 TALLOC_CTX *_mem_save_lock_status_0;
5281 TALLOC_CTX *_mem_save_needed_0;
5282 if (flags & NDR_IN) {
5283 ZERO_STRUCT(r->out);
5285 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5286 NDR_PULL_ALLOC(ndr, r->in.handle);
5288 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5289 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5290 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5291 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5292 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5293 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5294 ZERO_STRUCTP(r->out.lock_status);
5295 NDR_PULL_ALLOC(ndr, r->out.needed);
5296 ZERO_STRUCTP(r->out.needed);
5298 if (flags & NDR_OUT) {
5299 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5300 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5302 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5303 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
5304 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
5306 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5307 NDR_PULL_ALLOC(ndr, r->out.needed);
5309 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5310 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5311 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5313 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5315 return NDR_ERR_SUCCESS;
5318 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5320 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusA");
5321 ndr->depth++;
5322 if (flags & NDR_SET_VALUES) {
5323 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5325 if (flags & NDR_IN) {
5326 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusA");
5327 ndr->depth++;
5328 ndr_print_ptr(ndr, "handle", r->in.handle);
5329 ndr->depth++;
5330 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5331 ndr->depth--;
5332 ndr_print_uint32(ndr, "offered", r->in.offered);
5333 ndr->depth--;
5335 if (flags & NDR_OUT) {
5336 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusA");
5337 ndr->depth++;
5338 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
5339 ndr->depth++;
5340 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
5341 ndr->depth--;
5342 ndr_print_ptr(ndr, "needed", r->out.needed);
5343 ndr->depth++;
5344 ndr_print_uint32(ndr, "needed", *r->out.needed);
5345 ndr->depth--;
5346 ndr_print_WERROR(ndr, "result", r->out.result);
5347 ndr->depth--;
5349 ndr->depth--;
5352 static enum ndr_err_code ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
5354 if (flags & NDR_IN) {
5355 if (r->in.handle == NULL) {
5356 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5358 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
5360 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
5361 if (r->in.Arguments) {
5362 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5363 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5364 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5365 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5368 if (flags & NDR_OUT) {
5369 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5371 return NDR_ERR_SUCCESS;
5374 static enum ndr_err_code ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
5376 uint32_t _ptr_Arguments;
5377 TALLOC_CTX *_mem_save_handle_0;
5378 TALLOC_CTX *_mem_save_Arguments_0;
5379 if (flags & NDR_IN) {
5380 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5381 NDR_PULL_ALLOC(ndr, r->in.handle);
5383 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5384 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5385 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5386 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5387 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
5388 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
5389 if (_ptr_Arguments) {
5390 NDR_PULL_ALLOC(ndr, r->in.Arguments);
5391 } else {
5392 r->in.Arguments = NULL;
5394 if (r->in.Arguments) {
5395 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
5396 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
5397 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
5398 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
5399 if (ndr_get_array_length(ndr, &r->in.Arguments) > ndr_get_array_size(ndr, &r->in.Arguments)) {
5400 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.Arguments), ndr_get_array_length(ndr, &r->in.Arguments));
5402 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t)));
5403 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t), CH_UTF16));
5404 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
5407 if (flags & NDR_OUT) {
5408 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5410 return NDR_ERR_SUCCESS;
5413 _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r)
5415 ndr_print_struct(ndr, name, "svcctl_StartServiceA");
5416 ndr->depth++;
5417 if (flags & NDR_SET_VALUES) {
5418 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5420 if (flags & NDR_IN) {
5421 ndr_print_struct(ndr, "in", "svcctl_StartServiceA");
5422 ndr->depth++;
5423 ndr_print_ptr(ndr, "handle", r->in.handle);
5424 ndr->depth++;
5425 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5426 ndr->depth--;
5427 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
5428 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
5429 ndr->depth++;
5430 if (r->in.Arguments) {
5431 ndr_print_string(ndr, "Arguments", r->in.Arguments);
5433 ndr->depth--;
5434 ndr->depth--;
5436 if (flags & NDR_OUT) {
5437 ndr_print_struct(ndr, "out", "svcctl_StartServiceA");
5438 ndr->depth++;
5439 ndr_print_WERROR(ndr, "result", r->out.result);
5440 ndr->depth--;
5442 ndr->depth--;
5445 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5447 if (flags & NDR_IN) {
5448 if (r->in.handle == NULL) {
5449 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5451 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5452 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5453 if (r->in.service_name) {
5454 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5455 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5456 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5457 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5459 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5460 if (r->in.display_name_length) {
5461 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5464 if (flags & NDR_OUT) {
5465 if (r->out.display_name == NULL) {
5466 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5468 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
5469 if (*r->out.display_name) {
5470 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5471 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5472 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5473 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5475 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5476 if (r->out.display_name_length) {
5477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5479 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5481 return NDR_ERR_SUCCESS;
5484 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
5486 uint32_t _ptr_service_name;
5487 uint32_t _ptr_display_name;
5488 uint32_t _ptr_display_name_length;
5489 TALLOC_CTX *_mem_save_handle_0;
5490 TALLOC_CTX *_mem_save_service_name_0;
5491 TALLOC_CTX *_mem_save_display_name_0;
5492 TALLOC_CTX *_mem_save_display_name_1;
5493 TALLOC_CTX *_mem_save_display_name_length_0;
5494 if (flags & NDR_IN) {
5495 ZERO_STRUCT(r->out);
5497 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5498 NDR_PULL_ALLOC(ndr, r->in.handle);
5500 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5501 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5502 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5503 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5504 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5505 if (_ptr_service_name) {
5506 NDR_PULL_ALLOC(ndr, r->in.service_name);
5507 } else {
5508 r->in.service_name = NULL;
5510 if (r->in.service_name) {
5511 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5512 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5513 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5514 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5515 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5516 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
5518 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5519 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
5520 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5522 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5523 if (_ptr_display_name_length) {
5524 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5525 } else {
5526 r->in.display_name_length = NULL;
5528 if (r->in.display_name_length) {
5529 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5530 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5531 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5532 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5534 NDR_PULL_ALLOC(ndr, r->out.display_name);
5535 ZERO_STRUCTP(r->out.display_name);
5537 if (flags & NDR_OUT) {
5538 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5539 NDR_PULL_ALLOC(ndr, r->out.display_name);
5541 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5542 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
5543 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
5544 if (_ptr_display_name) {
5545 NDR_PULL_ALLOC(ndr, *r->out.display_name);
5546 } else {
5547 *r->out.display_name = NULL;
5549 if (*r->out.display_name) {
5550 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5551 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
5552 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
5553 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
5554 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
5555 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.display_name), ndr_get_array_length(ndr, r->out.display_name));
5557 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
5558 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t), CH_UTF16));
5559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
5561 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
5562 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5563 if (_ptr_display_name_length) {
5564 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5565 } else {
5566 r->out.display_name_length = NULL;
5568 if (r->out.display_name_length) {
5569 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5570 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5574 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5576 return NDR_ERR_SUCCESS;
5579 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5581 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameA");
5582 ndr->depth++;
5583 if (flags & NDR_SET_VALUES) {
5584 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5586 if (flags & NDR_IN) {
5587 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameA");
5588 ndr->depth++;
5589 ndr_print_ptr(ndr, "handle", r->in.handle);
5590 ndr->depth++;
5591 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5592 ndr->depth--;
5593 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5594 ndr->depth++;
5595 if (r->in.service_name) {
5596 ndr_print_string(ndr, "service_name", r->in.service_name);
5598 ndr->depth--;
5599 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5600 ndr->depth++;
5601 if (r->in.display_name_length) {
5602 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5604 ndr->depth--;
5605 ndr->depth--;
5607 if (flags & NDR_OUT) {
5608 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameA");
5609 ndr->depth++;
5610 ndr_print_ptr(ndr, "display_name", r->out.display_name);
5611 ndr->depth++;
5612 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
5613 ndr->depth++;
5614 if (*r->out.display_name) {
5615 ndr_print_string(ndr, "display_name", *r->out.display_name);
5617 ndr->depth--;
5618 ndr->depth--;
5619 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5620 ndr->depth++;
5621 if (r->out.display_name_length) {
5622 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5624 ndr->depth--;
5625 ndr_print_WERROR(ndr, "result", r->out.result);
5626 ndr->depth--;
5628 ndr->depth--;
5631 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
5633 if (flags & NDR_IN) {
5634 if (r->in.handle == NULL) {
5635 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5637 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5638 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5639 if (r->in.service_name) {
5640 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5641 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5642 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5643 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5645 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5646 if (r->in.display_name_length) {
5647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5650 if (flags & NDR_OUT) {
5651 if (r->out.key_name == NULL) {
5652 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5654 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
5655 if (*r->out.key_name) {
5656 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5657 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5658 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5659 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5661 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5662 if (r->out.display_name_length) {
5663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5665 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5667 return NDR_ERR_SUCCESS;
5670 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
5672 uint32_t _ptr_service_name;
5673 uint32_t _ptr_key_name;
5674 uint32_t _ptr_display_name_length;
5675 TALLOC_CTX *_mem_save_handle_0;
5676 TALLOC_CTX *_mem_save_service_name_0;
5677 TALLOC_CTX *_mem_save_key_name_0;
5678 TALLOC_CTX *_mem_save_key_name_1;
5679 TALLOC_CTX *_mem_save_display_name_length_0;
5680 if (flags & NDR_IN) {
5681 ZERO_STRUCT(r->out);
5683 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5684 NDR_PULL_ALLOC(ndr, r->in.handle);
5686 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5687 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5688 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5689 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5690 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5691 if (_ptr_service_name) {
5692 NDR_PULL_ALLOC(ndr, r->in.service_name);
5693 } else {
5694 r->in.service_name = NULL;
5696 if (r->in.service_name) {
5697 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5698 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5699 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5700 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5701 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5702 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service_name), ndr_get_array_length(ndr, &r->in.service_name));
5704 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5705 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t), CH_UTF16));
5706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5709 if (_ptr_display_name_length) {
5710 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5711 } else {
5712 r->in.display_name_length = NULL;
5714 if (r->in.display_name_length) {
5715 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5716 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5720 NDR_PULL_ALLOC(ndr, r->out.key_name);
5721 ZERO_STRUCTP(r->out.key_name);
5723 if (flags & NDR_OUT) {
5724 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5725 NDR_PULL_ALLOC(ndr, r->out.key_name);
5727 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5728 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
5729 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
5730 if (_ptr_key_name) {
5731 NDR_PULL_ALLOC(ndr, *r->out.key_name);
5732 } else {
5733 *r->out.key_name = NULL;
5735 if (*r->out.key_name) {
5736 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5737 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
5738 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
5739 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
5740 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
5741 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.key_name), ndr_get_array_length(ndr, r->out.key_name));
5743 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
5744 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t), CH_UTF16));
5745 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
5747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
5748 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5749 if (_ptr_display_name_length) {
5750 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5751 } else {
5752 r->out.display_name_length = NULL;
5754 if (r->out.display_name_length) {
5755 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5756 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5757 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5760 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5762 return NDR_ERR_SUCCESS;
5765 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r)
5767 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameA");
5768 ndr->depth++;
5769 if (flags & NDR_SET_VALUES) {
5770 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5772 if (flags & NDR_IN) {
5773 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameA");
5774 ndr->depth++;
5775 ndr_print_ptr(ndr, "handle", r->in.handle);
5776 ndr->depth++;
5777 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5778 ndr->depth--;
5779 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5780 ndr->depth++;
5781 if (r->in.service_name) {
5782 ndr_print_string(ndr, "service_name", r->in.service_name);
5784 ndr->depth--;
5785 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5786 ndr->depth++;
5787 if (r->in.display_name_length) {
5788 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5790 ndr->depth--;
5791 ndr->depth--;
5793 if (flags & NDR_OUT) {
5794 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameA");
5795 ndr->depth++;
5796 ndr_print_ptr(ndr, "key_name", r->out.key_name);
5797 ndr->depth++;
5798 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
5799 ndr->depth++;
5800 if (*r->out.key_name) {
5801 ndr_print_string(ndr, "key_name", *r->out.key_name);
5803 ndr->depth--;
5804 ndr->depth--;
5805 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5806 ndr->depth++;
5807 if (r->out.display_name_length) {
5808 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5810 ndr->depth--;
5811 ndr_print_WERROR(ndr, "result", r->out.result);
5812 ndr->depth--;
5814 ndr->depth--;
5817 static enum ndr_err_code ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5819 if (flags & NDR_IN) {
5821 if (flags & NDR_OUT) {
5822 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5824 return NDR_ERR_SUCCESS;
5827 static enum ndr_err_code ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
5829 if (flags & NDR_IN) {
5831 if (flags & NDR_OUT) {
5832 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5834 return NDR_ERR_SUCCESS;
5837 _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5839 ndr_print_struct(ndr, name, "svcctl_GetCurrentGroupeStateW");
5840 ndr->depth++;
5841 if (flags & NDR_SET_VALUES) {
5842 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5844 if (flags & NDR_IN) {
5845 ndr_print_struct(ndr, "in", "svcctl_GetCurrentGroupeStateW");
5846 ndr->depth++;
5847 ndr->depth--;
5849 if (flags & NDR_OUT) {
5850 ndr_print_struct(ndr, "out", "svcctl_GetCurrentGroupeStateW");
5851 ndr->depth++;
5852 ndr_print_WERROR(ndr, "result", r->out.result);
5853 ndr->depth--;
5855 ndr->depth--;
5858 static enum ndr_err_code ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
5860 if (flags & NDR_IN) {
5862 if (flags & NDR_OUT) {
5863 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5865 return NDR_ERR_SUCCESS;
5868 static enum ndr_err_code ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
5870 if (flags & NDR_IN) {
5872 if (flags & NDR_OUT) {
5873 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5875 return NDR_ERR_SUCCESS;
5878 _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r)
5880 ndr_print_struct(ndr, name, "svcctl_EnumServiceGroupW");
5881 ndr->depth++;
5882 if (flags & NDR_SET_VALUES) {
5883 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5885 if (flags & NDR_IN) {
5886 ndr_print_struct(ndr, "in", "svcctl_EnumServiceGroupW");
5887 ndr->depth++;
5888 ndr->depth--;
5890 if (flags & NDR_OUT) {
5891 ndr_print_struct(ndr, "out", "svcctl_EnumServiceGroupW");
5892 ndr->depth++;
5893 ndr_print_WERROR(ndr, "result", r->out.result);
5894 ndr->depth--;
5896 ndr->depth--;
5899 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5901 if (flags & NDR_IN) {
5902 if (r->in.handle == NULL) {
5903 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5905 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5907 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5908 if (r->in.info) {
5909 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
5912 if (flags & NDR_OUT) {
5913 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5915 return NDR_ERR_SUCCESS;
5918 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
5920 uint32_t _ptr_info;
5921 TALLOC_CTX *_mem_save_handle_0;
5922 TALLOC_CTX *_mem_save_info_0;
5923 if (flags & NDR_IN) {
5924 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5925 NDR_PULL_ALLOC(ndr, r->in.handle);
5927 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5928 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5929 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5930 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5931 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
5932 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5933 if (_ptr_info) {
5934 NDR_PULL_ALLOC(ndr, r->in.info);
5935 } else {
5936 r->in.info = NULL;
5938 if (r->in.info) {
5939 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5940 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5941 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
5942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5945 if (flags & NDR_OUT) {
5946 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5948 return NDR_ERR_SUCCESS;
5951 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5953 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2A");
5954 ndr->depth++;
5955 if (flags & NDR_SET_VALUES) {
5956 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5958 if (flags & NDR_IN) {
5959 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2A");
5960 ndr->depth++;
5961 ndr_print_ptr(ndr, "handle", r->in.handle);
5962 ndr->depth++;
5963 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5964 ndr->depth--;
5965 ndr_print_uint32(ndr, "info_level", r->in.info_level);
5966 ndr_print_ptr(ndr, "info", r->in.info);
5967 ndr->depth++;
5968 if (r->in.info) {
5969 ndr_print_uint8(ndr, "info", *r->in.info);
5971 ndr->depth--;
5972 ndr->depth--;
5974 if (flags & NDR_OUT) {
5975 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2A");
5976 ndr->depth++;
5977 ndr_print_WERROR(ndr, "result", r->out.result);
5978 ndr->depth--;
5980 ndr->depth--;
5983 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
5985 if (flags & NDR_IN) {
5986 if (r->in.handle == NULL) {
5987 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5989 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5990 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5991 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5992 if (r->in.info) {
5993 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
5996 if (flags & NDR_OUT) {
5997 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5999 return NDR_ERR_SUCCESS;
6002 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
6004 uint32_t _ptr_info;
6005 TALLOC_CTX *_mem_save_handle_0;
6006 TALLOC_CTX *_mem_save_info_0;
6007 if (flags & NDR_IN) {
6008 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6009 NDR_PULL_ALLOC(ndr, r->in.handle);
6011 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6012 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6013 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6014 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6015 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6016 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
6017 if (_ptr_info) {
6018 NDR_PULL_ALLOC(ndr, r->in.info);
6019 } else {
6020 r->in.info = NULL;
6022 if (r->in.info) {
6023 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6024 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
6025 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
6026 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
6029 if (flags & NDR_OUT) {
6030 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6032 return NDR_ERR_SUCCESS;
6035 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r)
6037 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2W");
6038 ndr->depth++;
6039 if (flags & NDR_SET_VALUES) {
6040 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6042 if (flags & NDR_IN) {
6043 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2W");
6044 ndr->depth++;
6045 ndr_print_ptr(ndr, "handle", r->in.handle);
6046 ndr->depth++;
6047 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6048 ndr->depth--;
6049 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6050 ndr_print_ptr(ndr, "info", r->in.info);
6051 ndr->depth++;
6052 if (r->in.info) {
6053 ndr_print_uint8(ndr, "info", *r->in.info);
6055 ndr->depth--;
6056 ndr->depth--;
6058 if (flags & NDR_OUT) {
6059 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2W");
6060 ndr->depth++;
6061 ndr_print_WERROR(ndr, "result", r->out.result);
6062 ndr->depth--;
6064 ndr->depth--;
6067 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
6069 if (flags & NDR_IN) {
6070 if (r->in.handle == NULL) {
6071 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6073 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6074 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6075 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6077 if (flags & NDR_OUT) {
6078 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6079 if (r->out.needed == NULL) {
6080 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6083 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6085 return NDR_ERR_SUCCESS;
6088 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
6090 TALLOC_CTX *_mem_save_handle_0;
6091 TALLOC_CTX *_mem_save_needed_0;
6092 if (flags & NDR_IN) {
6093 ZERO_STRUCT(r->out);
6095 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6096 NDR_PULL_ALLOC(ndr, r->in.handle);
6098 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6099 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6100 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6102 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6103 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6104 NDR_PULL_ALLOC(ndr, r->out.needed);
6105 ZERO_STRUCTP(r->out.needed);
6107 if (flags & NDR_OUT) {
6108 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6109 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6110 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6111 NDR_PULL_ALLOC(ndr, r->out.needed);
6113 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6114 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6115 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6116 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6117 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6119 return NDR_ERR_SUCCESS;
6122 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r)
6124 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2A");
6125 ndr->depth++;
6126 if (flags & NDR_SET_VALUES) {
6127 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6129 if (flags & NDR_IN) {
6130 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2A");
6131 ndr->depth++;
6132 ndr_print_ptr(ndr, "handle", r->in.handle);
6133 ndr->depth++;
6134 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6135 ndr->depth--;
6136 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6137 ndr_print_uint32(ndr, "offered", r->in.offered);
6138 ndr->depth--;
6140 if (flags & NDR_OUT) {
6141 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
6142 ndr->depth++;
6143 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6144 ndr_print_ptr(ndr, "needed", r->out.needed);
6145 ndr->depth++;
6146 ndr_print_uint32(ndr, "needed", *r->out.needed);
6147 ndr->depth--;
6148 ndr_print_WERROR(ndr, "result", r->out.result);
6149 ndr->depth--;
6151 ndr->depth--;
6154 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
6156 if (flags & NDR_IN) {
6157 if (r->in.handle == NULL) {
6158 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6160 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6161 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6164 if (flags & NDR_OUT) {
6165 if (r->out.buffer == NULL) {
6166 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6168 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6169 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6170 if (r->out.needed == NULL) {
6171 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6174 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6176 return NDR_ERR_SUCCESS;
6179 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
6181 TALLOC_CTX *_mem_save_handle_0;
6182 TALLOC_CTX *_mem_save_needed_0;
6183 if (flags & NDR_IN) {
6184 ZERO_STRUCT(r->out);
6186 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6187 NDR_PULL_ALLOC(ndr, r->in.handle);
6189 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6190 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6191 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6192 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6193 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6195 if (r->in.offered > 8192) {
6196 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6198 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6199 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6200 NDR_PULL_ALLOC(ndr, r->out.needed);
6201 ZERO_STRUCTP(r->out.needed);
6203 if (flags & NDR_OUT) {
6204 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6205 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6206 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6208 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6209 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6210 NDR_PULL_ALLOC(ndr, r->out.needed);
6212 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6213 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6214 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6215 if (*r->out.needed > 8192) {
6216 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6219 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6220 if (r->out.buffer) {
6221 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6224 return NDR_ERR_SUCCESS;
6227 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r)
6229 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2W");
6230 ndr->depth++;
6231 if (flags & NDR_SET_VALUES) {
6232 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6234 if (flags & NDR_IN) {
6235 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2W");
6236 ndr->depth++;
6237 ndr_print_ptr(ndr, "handle", r->in.handle);
6238 ndr->depth++;
6239 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6240 ndr->depth--;
6241 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6242 ndr_print_uint32(ndr, "offered", r->in.offered);
6243 ndr->depth--;
6245 if (flags & NDR_OUT) {
6246 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
6247 ndr->depth++;
6248 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6249 ndr->depth++;
6250 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6251 ndr->depth--;
6252 ndr_print_ptr(ndr, "needed", r->out.needed);
6253 ndr->depth++;
6254 ndr_print_uint32(ndr, "needed", *r->out.needed);
6255 ndr->depth--;
6256 ndr_print_WERROR(ndr, "result", r->out.result);
6257 ndr->depth--;
6259 ndr->depth--;
6262 static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
6264 if (flags & NDR_IN) {
6265 if (r->in.handle == NULL) {
6266 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6268 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6269 NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr, NDR_SCALARS, r->in.info_level));
6270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6272 if (flags & NDR_OUT) {
6273 if (r->out.buffer == NULL) {
6274 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6276 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6277 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6278 if (r->out.needed == NULL) {
6279 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6282 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6284 return NDR_ERR_SUCCESS;
6287 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
6289 TALLOC_CTX *_mem_save_handle_0;
6290 TALLOC_CTX *_mem_save_needed_0;
6291 if (flags & NDR_IN) {
6292 ZERO_STRUCT(r->out);
6294 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6295 NDR_PULL_ALLOC(ndr, r->in.handle);
6297 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6298 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6299 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6300 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6301 NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
6302 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6303 if (r->in.offered > 8192) {
6304 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6306 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6307 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6308 NDR_PULL_ALLOC(ndr, r->out.needed);
6309 ZERO_STRUCTP(r->out.needed);
6311 if (flags & NDR_OUT) {
6312 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6313 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6314 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6316 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6317 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6318 NDR_PULL_ALLOC(ndr, r->out.needed);
6320 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6321 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6322 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6323 if (*r->out.needed > 8192) {
6324 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6326 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6327 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6328 if (r->out.buffer) {
6329 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6332 return NDR_ERR_SUCCESS;
6335 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r)
6337 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatusEx");
6338 ndr->depth++;
6339 if (flags & NDR_SET_VALUES) {
6340 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6342 if (flags & NDR_IN) {
6343 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatusEx");
6344 ndr->depth++;
6345 ndr_print_ptr(ndr, "handle", r->in.handle);
6346 ndr->depth++;
6347 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6348 ndr->depth--;
6349 ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
6350 ndr_print_uint32(ndr, "offered", r->in.offered);
6351 ndr->depth--;
6353 if (flags & NDR_OUT) {
6354 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
6355 ndr->depth++;
6356 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6357 ndr->depth++;
6358 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6359 ndr->depth--;
6360 ndr_print_ptr(ndr, "needed", r->out.needed);
6361 ndr->depth++;
6362 ndr_print_uint32(ndr, "needed", *r->out.needed);
6363 ndr->depth--;
6364 ndr_print_WERROR(ndr, "result", r->out.result);
6365 ndr->depth--;
6367 ndr->depth--;
6370 static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
6372 if (flags & NDR_IN) {
6373 if (r->in.scmanager == NULL) {
6374 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6376 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6379 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6381 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6382 if (r->in.resume_handle) {
6383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6386 if (flags & NDR_OUT) {
6387 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6388 if (r->out.needed == NULL) {
6389 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6392 if (r->out.service_returned == NULL) {
6393 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6396 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6397 if (r->out.resume_handle) {
6398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6400 if (r->out.group_name == NULL) {
6401 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6403 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name));
6404 if (*r->out.group_name) {
6405 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6406 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6407 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6408 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6410 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6412 return NDR_ERR_SUCCESS;
6415 static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
6417 uint32_t _ptr_resume_handle;
6418 uint32_t _ptr_group_name;
6419 TALLOC_CTX *_mem_save_scmanager_0;
6420 TALLOC_CTX *_mem_save_needed_0;
6421 TALLOC_CTX *_mem_save_service_returned_0;
6422 TALLOC_CTX *_mem_save_resume_handle_0;
6423 TALLOC_CTX *_mem_save_group_name_0;
6424 TALLOC_CTX *_mem_save_group_name_1;
6425 if (flags & NDR_IN) {
6426 ZERO_STRUCT(r->out);
6428 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6429 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6431 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6432 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6433 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6434 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6437 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6439 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6440 if (_ptr_resume_handle) {
6441 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6442 } else {
6443 r->in.resume_handle = NULL;
6445 if (r->in.resume_handle) {
6446 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6447 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6448 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6449 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6451 NDR_PULL_ALLOC(ndr, r->out.needed);
6452 ZERO_STRUCTP(r->out.needed);
6453 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6454 ZERO_STRUCTP(r->out.service_returned);
6455 NDR_PULL_ALLOC(ndr, r->out.group_name);
6456 ZERO_STRUCTP(r->out.group_name);
6458 if (flags & NDR_OUT) {
6459 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6460 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6461 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6462 NDR_PULL_ALLOC(ndr, r->out.needed);
6464 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6465 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6466 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6467 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6468 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6469 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6471 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6472 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6473 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6474 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6475 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6476 if (_ptr_resume_handle) {
6477 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6478 } else {
6479 r->out.resume_handle = NULL;
6481 if (r->out.resume_handle) {
6482 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6483 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6484 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6487 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6488 NDR_PULL_ALLOC(ndr, r->out.group_name);
6490 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6491 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
6492 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6493 if (_ptr_group_name) {
6494 NDR_PULL_ALLOC(ndr, *r->out.group_name);
6495 } else {
6496 *r->out.group_name = NULL;
6498 if (*r->out.group_name) {
6499 _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6500 NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0);
6501 NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
6502 NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
6503 if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) {
6504 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.group_name), ndr_get_array_length(ndr, r->out.group_name));
6506 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t)));
6507 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t), CH_UTF16));
6508 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0);
6510 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
6511 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6513 return NDR_ERR_SUCCESS;
6516 _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r)
6518 ndr_print_struct(ndr, name, "EnumServicesStatusExA");
6519 ndr->depth++;
6520 if (flags & NDR_SET_VALUES) {
6521 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6523 if (flags & NDR_IN) {
6524 ndr_print_struct(ndr, "in", "EnumServicesStatusExA");
6525 ndr->depth++;
6526 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6527 ndr->depth++;
6528 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6529 ndr->depth--;
6530 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6531 ndr_print_uint32(ndr, "type", r->in.type);
6532 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6533 ndr_print_uint32(ndr, "offered", r->in.offered);
6534 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6535 ndr->depth++;
6536 if (r->in.resume_handle) {
6537 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6539 ndr->depth--;
6540 ndr->depth--;
6542 if (flags & NDR_OUT) {
6543 ndr_print_struct(ndr, "out", "EnumServicesStatusExA");
6544 ndr->depth++;
6545 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6546 ndr_print_ptr(ndr, "needed", r->out.needed);
6547 ndr->depth++;
6548 ndr_print_uint32(ndr, "needed", *r->out.needed);
6549 ndr->depth--;
6550 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6551 ndr->depth++;
6552 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6553 ndr->depth--;
6554 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6555 ndr->depth++;
6556 if (r->out.resume_handle) {
6557 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6559 ndr->depth--;
6560 ndr_print_ptr(ndr, "group_name", r->out.group_name);
6561 ndr->depth++;
6562 ndr_print_ptr(ndr, "group_name", *r->out.group_name);
6563 ndr->depth++;
6564 if (*r->out.group_name) {
6565 ndr_print_string(ndr, "group_name", *r->out.group_name);
6567 ndr->depth--;
6568 ndr->depth--;
6569 ndr_print_WERROR(ndr, "result", r->out.result);
6570 ndr->depth--;
6572 ndr->depth--;
6575 static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
6577 if (flags & NDR_IN) {
6578 if (r->in.scmanager == NULL) {
6579 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6581 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6582 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6583 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6584 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6585 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6586 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6587 if (r->in.resume_handle) {
6588 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6590 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.group_name));
6591 if (r->in.group_name) {
6592 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6593 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6594 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6595 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.group_name, ndr_charset_length(r->in.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6598 if (flags & NDR_OUT) {
6599 if (r->out.services == NULL) {
6600 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6602 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6603 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6604 if (r->out.needed == NULL) {
6605 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6608 if (r->out.service_returned == NULL) {
6609 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6612 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6613 if (r->out.resume_handle) {
6614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6616 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6618 return NDR_ERR_SUCCESS;
6621 static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
6623 uint32_t _ptr_resume_handle;
6624 uint32_t _ptr_group_name;
6625 TALLOC_CTX *_mem_save_scmanager_0;
6626 TALLOC_CTX *_mem_save_needed_0;
6627 TALLOC_CTX *_mem_save_service_returned_0;
6628 TALLOC_CTX *_mem_save_resume_handle_0;
6629 TALLOC_CTX *_mem_save_group_name_0;
6630 if (flags & NDR_IN) {
6631 ZERO_STRUCT(r->out);
6633 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6634 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6636 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6637 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6638 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6639 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6640 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6641 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6642 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6643 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6644 if (r->in.offered > 0x40000) {
6645 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6647 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6648 if (_ptr_resume_handle) {
6649 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6650 } else {
6651 r->in.resume_handle = NULL;
6653 if (r->in.resume_handle) {
6654 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6655 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6656 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6657 if (*r->in.resume_handle > 0x40000) {
6658 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6662 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6663 if (_ptr_group_name) {
6664 NDR_PULL_ALLOC(ndr, r->in.group_name);
6665 } else {
6666 r->in.group_name = NULL;
6668 if (r->in.group_name) {
6669 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6670 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_name, 0);
6671 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.group_name));
6672 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.group_name));
6673 if (ndr_get_array_length(ndr, &r->in.group_name) > ndr_get_array_size(ndr, &r->in.group_name)) {
6674 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.group_name), ndr_get_array_length(ndr, &r->in.group_name));
6676 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.group_name), sizeof(uint16_t)));
6677 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.group_name, ndr_get_array_length(ndr, &r->in.group_name), sizeof(uint16_t), CH_UTF16));
6678 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
6680 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6681 memset(r->out.services, 0, (r->in.offered) * sizeof(*r->out.services));
6682 NDR_PULL_ALLOC(ndr, r->out.needed);
6683 ZERO_STRUCTP(r->out.needed);
6684 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6685 ZERO_STRUCTP(r->out.service_returned);
6687 if (flags & NDR_OUT) {
6688 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.services));
6689 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6690 NDR_PULL_ALLOC_N(ndr, r->out.services, ndr_get_array_size(ndr, &r->out.services));
6692 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, ndr_get_array_size(ndr, &r->out.services)));
6693 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6694 NDR_PULL_ALLOC(ndr, r->out.needed);
6696 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6697 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6698 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6699 if (*r->out.needed > 0x40000) {
6700 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6702 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6703 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6704 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6706 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6707 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6708 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6709 if (*r->out.service_returned > 0x40000) {
6710 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6712 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6713 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6714 if (_ptr_resume_handle) {
6715 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6716 } else {
6717 r->out.resume_handle = NULL;
6719 if (r->out.resume_handle) {
6720 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6721 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6722 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6723 if (*r->out.resume_handle > 0x40000) {
6724 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6728 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6729 if (r->out.services) {
6730 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.services, r->in.offered));
6733 return NDR_ERR_SUCCESS;
6736 _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r)
6738 ndr_print_struct(ndr, name, "EnumServicesStatusExW");
6739 ndr->depth++;
6740 if (flags & NDR_SET_VALUES) {
6741 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6743 if (flags & NDR_IN) {
6744 ndr_print_struct(ndr, "in", "EnumServicesStatusExW");
6745 ndr->depth++;
6746 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6747 ndr->depth++;
6748 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6749 ndr->depth--;
6750 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6751 ndr_print_uint32(ndr, "type", r->in.type);
6752 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6753 ndr_print_uint32(ndr, "offered", r->in.offered);
6754 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6755 ndr->depth++;
6756 if (r->in.resume_handle) {
6757 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6759 ndr->depth--;
6760 ndr_print_ptr(ndr, "group_name", r->in.group_name);
6761 ndr->depth++;
6762 if (r->in.group_name) {
6763 ndr_print_string(ndr, "group_name", r->in.group_name);
6765 ndr->depth--;
6766 ndr->depth--;
6768 if (flags & NDR_OUT) {
6769 ndr_print_struct(ndr, "out", "EnumServicesStatusExW");
6770 ndr->depth++;
6771 ndr_print_ptr(ndr, "services", r->out.services);
6772 ndr->depth++;
6773 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6774 ndr->depth--;
6775 ndr_print_ptr(ndr, "needed", r->out.needed);
6776 ndr->depth++;
6777 ndr_print_uint32(ndr, "needed", *r->out.needed);
6778 ndr->depth--;
6779 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6780 ndr->depth++;
6781 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6782 ndr->depth--;
6783 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6784 ndr->depth++;
6785 if (r->out.resume_handle) {
6786 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6788 ndr->depth--;
6789 ndr_print_WERROR(ndr, "result", r->out.result);
6790 ndr->depth--;
6792 ndr->depth--;
6795 static enum ndr_err_code ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
6797 if (flags & NDR_IN) {
6799 if (flags & NDR_OUT) {
6800 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6802 return NDR_ERR_SUCCESS;
6805 static enum ndr_err_code ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
6807 if (flags & NDR_IN) {
6809 if (flags & NDR_OUT) {
6810 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6812 return NDR_ERR_SUCCESS;
6815 _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r)
6817 ndr_print_struct(ndr, name, "svcctl_SCSendTSMessage");
6818 ndr->depth++;
6819 if (flags & NDR_SET_VALUES) {
6820 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6822 if (flags & NDR_IN) {
6823 ndr_print_struct(ndr, "in", "svcctl_SCSendTSMessage");
6824 ndr->depth++;
6825 ndr->depth--;
6827 if (flags & NDR_OUT) {
6828 ndr_print_struct(ndr, "out", "svcctl_SCSendTSMessage");
6829 ndr->depth++;
6830 ndr_print_WERROR(ndr, "result", r->out.result);
6831 ndr->depth--;
6833 ndr->depth--;
6836 static const struct ndr_interface_call svcctl_calls[] = {
6838 "svcctl_CloseServiceHandle",
6839 sizeof(struct svcctl_CloseServiceHandle),
6840 (ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
6841 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
6842 (ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
6843 false,
6846 "svcctl_ControlService",
6847 sizeof(struct svcctl_ControlService),
6848 (ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
6849 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
6850 (ndr_print_function_t) ndr_print_svcctl_ControlService,
6851 false,
6854 "svcctl_DeleteService",
6855 sizeof(struct svcctl_DeleteService),
6856 (ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
6857 (ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
6858 (ndr_print_function_t) ndr_print_svcctl_DeleteService,
6859 false,
6862 "svcctl_LockServiceDatabase",
6863 sizeof(struct svcctl_LockServiceDatabase),
6864 (ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
6865 (ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
6866 (ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
6867 false,
6870 "svcctl_QueryServiceObjectSecurity",
6871 sizeof(struct svcctl_QueryServiceObjectSecurity),
6872 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
6873 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
6874 (ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
6875 false,
6878 "svcctl_SetServiceObjectSecurity",
6879 sizeof(struct svcctl_SetServiceObjectSecurity),
6880 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
6881 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
6882 (ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
6883 false,
6886 "svcctl_QueryServiceStatus",
6887 sizeof(struct svcctl_QueryServiceStatus),
6888 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
6889 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
6890 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
6891 false,
6894 "svcctl_SetServiceStatus",
6895 sizeof(struct svcctl_SetServiceStatus),
6896 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
6897 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
6898 (ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
6899 false,
6902 "svcctl_UnlockServiceDatabase",
6903 sizeof(struct svcctl_UnlockServiceDatabase),
6904 (ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
6905 (ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
6906 (ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
6907 false,
6910 "svcctl_NotifyBootConfigStatus",
6911 sizeof(struct svcctl_NotifyBootConfigStatus),
6912 (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
6913 (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
6914 (ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
6915 false,
6918 "svcctl_SCSetServiceBitsW",
6919 sizeof(struct svcctl_SCSetServiceBitsW),
6920 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
6921 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
6922 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
6923 false,
6926 "svcctl_ChangeServiceConfigW",
6927 sizeof(struct svcctl_ChangeServiceConfigW),
6928 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
6929 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
6930 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
6931 false,
6934 "svcctl_CreateServiceW",
6935 sizeof(struct svcctl_CreateServiceW),
6936 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
6937 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
6938 (ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
6939 false,
6942 "svcctl_EnumDependentServicesW",
6943 sizeof(struct svcctl_EnumDependentServicesW),
6944 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
6945 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
6946 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
6947 false,
6950 "svcctl_EnumServicesStatusW",
6951 sizeof(struct svcctl_EnumServicesStatusW),
6952 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
6953 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
6954 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
6955 false,
6958 "svcctl_OpenSCManagerW",
6959 sizeof(struct svcctl_OpenSCManagerW),
6960 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
6961 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
6962 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
6963 false,
6966 "svcctl_OpenServiceW",
6967 sizeof(struct svcctl_OpenServiceW),
6968 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
6969 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
6970 (ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
6971 false,
6974 "svcctl_QueryServiceConfigW",
6975 sizeof(struct svcctl_QueryServiceConfigW),
6976 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
6977 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
6978 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
6979 false,
6982 "svcctl_QueryServiceLockStatusW",
6983 sizeof(struct svcctl_QueryServiceLockStatusW),
6984 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
6985 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
6986 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
6987 false,
6990 "svcctl_StartServiceW",
6991 sizeof(struct svcctl_StartServiceW),
6992 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
6993 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
6994 (ndr_print_function_t) ndr_print_svcctl_StartServiceW,
6995 false,
6998 "svcctl_GetServiceDisplayNameW",
6999 sizeof(struct svcctl_GetServiceDisplayNameW),
7000 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
7001 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
7002 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
7003 false,
7006 "svcctl_GetServiceKeyNameW",
7007 sizeof(struct svcctl_GetServiceKeyNameW),
7008 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
7009 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
7010 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
7011 false,
7014 "svcctl_SCSetServiceBitsA",
7015 sizeof(struct svcctl_SCSetServiceBitsA),
7016 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
7017 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
7018 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
7019 false,
7022 "svcctl_ChangeServiceConfigA",
7023 sizeof(struct svcctl_ChangeServiceConfigA),
7024 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
7025 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
7026 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
7027 false,
7030 "svcctl_CreateServiceA",
7031 sizeof(struct svcctl_CreateServiceA),
7032 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
7033 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
7034 (ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
7035 false,
7038 "svcctl_EnumDependentServicesA",
7039 sizeof(struct svcctl_EnumDependentServicesA),
7040 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
7041 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
7042 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
7043 false,
7046 "svcctl_EnumServicesStatusA",
7047 sizeof(struct svcctl_EnumServicesStatusA),
7048 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
7049 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
7050 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
7051 false,
7054 "svcctl_OpenSCManagerA",
7055 sizeof(struct svcctl_OpenSCManagerA),
7056 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
7057 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
7058 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
7059 false,
7062 "svcctl_OpenServiceA",
7063 sizeof(struct svcctl_OpenServiceA),
7064 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
7065 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
7066 (ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
7067 false,
7070 "svcctl_QueryServiceConfigA",
7071 sizeof(struct svcctl_QueryServiceConfigA),
7072 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
7073 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
7074 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
7075 false,
7078 "svcctl_QueryServiceLockStatusA",
7079 sizeof(struct svcctl_QueryServiceLockStatusA),
7080 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
7081 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
7082 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
7083 false,
7086 "svcctl_StartServiceA",
7087 sizeof(struct svcctl_StartServiceA),
7088 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
7089 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
7090 (ndr_print_function_t) ndr_print_svcctl_StartServiceA,
7091 false,
7094 "svcctl_GetServiceDisplayNameA",
7095 sizeof(struct svcctl_GetServiceDisplayNameA),
7096 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
7097 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
7098 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
7099 false,
7102 "svcctl_GetServiceKeyNameA",
7103 sizeof(struct svcctl_GetServiceKeyNameA),
7104 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
7105 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
7106 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
7107 false,
7110 "svcctl_GetCurrentGroupeStateW",
7111 sizeof(struct svcctl_GetCurrentGroupeStateW),
7112 (ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
7113 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
7114 (ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
7115 false,
7118 "svcctl_EnumServiceGroupW",
7119 sizeof(struct svcctl_EnumServiceGroupW),
7120 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
7121 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
7122 (ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
7123 false,
7126 "svcctl_ChangeServiceConfig2A",
7127 sizeof(struct svcctl_ChangeServiceConfig2A),
7128 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
7129 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
7130 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
7131 false,
7134 "svcctl_ChangeServiceConfig2W",
7135 sizeof(struct svcctl_ChangeServiceConfig2W),
7136 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
7137 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
7138 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
7139 false,
7142 "svcctl_QueryServiceConfig2A",
7143 sizeof(struct svcctl_QueryServiceConfig2A),
7144 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
7145 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
7146 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
7147 false,
7150 "svcctl_QueryServiceConfig2W",
7151 sizeof(struct svcctl_QueryServiceConfig2W),
7152 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
7153 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
7154 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
7155 false,
7158 "svcctl_QueryServiceStatusEx",
7159 sizeof(struct svcctl_QueryServiceStatusEx),
7160 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
7161 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
7162 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
7163 false,
7166 "EnumServicesStatusExA",
7167 sizeof(struct EnumServicesStatusExA),
7168 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExA,
7169 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExA,
7170 (ndr_print_function_t) ndr_print_EnumServicesStatusExA,
7171 false,
7174 "EnumServicesStatusExW",
7175 sizeof(struct EnumServicesStatusExW),
7176 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExW,
7177 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExW,
7178 (ndr_print_function_t) ndr_print_EnumServicesStatusExW,
7179 false,
7182 "svcctl_SCSendTSMessage",
7183 sizeof(struct svcctl_SCSendTSMessage),
7184 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
7185 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
7186 (ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
7187 false,
7189 { NULL, 0, NULL, NULL, NULL, false }
7192 static const char * const svcctl_endpoint_strings[] = {
7193 "ncacn_np:[\\pipe\\svcctl]",
7194 "ncalrpc:",
7197 static const struct ndr_interface_string_array svcctl_endpoints = {
7198 .count = 2,
7199 .names = svcctl_endpoint_strings
7202 static const char * const svcctl_authservice_strings[] = {
7203 "host",
7206 static const struct ndr_interface_string_array svcctl_authservices = {
7207 .count = 1,
7208 .names = svcctl_authservice_strings
7212 const struct ndr_interface_table ndr_table_svcctl = {
7213 .name = "svcctl",
7214 .syntax_id = {
7215 {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
7216 NDR_SVCCTL_VERSION
7218 .helpstring = NDR_SVCCTL_HELPSTRING,
7219 .num_calls = 44,
7220 .calls = svcctl_calls,
7221 .endpoints = &svcctl_endpoints,
7222 .authservices = &svcctl_authservices