s3: re-run make samba3-idl.
[Samba.git] / librpc / gen_ndr / ndr_svcctl.c
blob117d49794c5ac0d6891b50511172eba83b1e8736
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, 4));
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));
16 if (ndr_flags & NDR_BUFFERS) {
17 if (r->lock_owner) {
18 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
19 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
21 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lock_owner, ndr_charset_length(r->lock_owner, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24 return NDR_ERR_SUCCESS;
27 static enum ndr_err_code ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_LOCK_STATUS *r)
29 uint32_t _ptr_lock_owner;
30 TALLOC_CTX *_mem_save_lock_owner_0;
31 if (ndr_flags & NDR_SCALARS) {
32 NDR_CHECK(ndr_pull_align(ndr, 4));
33 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_locked));
34 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lock_owner));
35 if (_ptr_lock_owner) {
36 NDR_PULL_ALLOC(ndr, r->lock_owner);
37 } else {
38 r->lock_owner = NULL;
40 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_duration));
42 if (ndr_flags & NDR_BUFFERS) {
43 if (r->lock_owner) {
44 _mem_save_lock_owner_0 = NDR_PULL_GET_MEM_CTX(ndr);
45 NDR_PULL_SET_MEM_CTX(ndr, r->lock_owner, 0);
46 NDR_CHECK(ndr_pull_array_size(ndr, &r->lock_owner));
47 NDR_CHECK(ndr_pull_array_length(ndr, &r->lock_owner));
48 if (ndr_get_array_length(ndr, &r->lock_owner) > ndr_get_array_size(ndr, &r->lock_owner)) {
49 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));
51 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t)));
52 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lock_owner, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t), CH_UTF16));
53 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_owner_0, 0);
56 return NDR_ERR_SUCCESS;
59 _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r)
61 ndr_print_struct(ndr, name, "SERVICE_LOCK_STATUS");
62 ndr->depth++;
63 ndr_print_uint32(ndr, "is_locked", r->is_locked);
64 ndr_print_ptr(ndr, "lock_owner", r->lock_owner);
65 ndr->depth++;
66 if (r->lock_owner) {
67 ndr_print_string(ndr, "lock_owner", r->lock_owner);
69 ndr->depth--;
70 ndr_print_uint32(ndr, "lock_duration", r->lock_duration);
71 ndr->depth--;
74 static enum ndr_err_code ndr_push_svcctl_ServiceStatus(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceStatus r)
76 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
77 return NDR_ERR_SUCCESS;
80 static enum ndr_err_code ndr_pull_svcctl_ServiceStatus(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceStatus *r)
82 uint32_t v;
83 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
84 *r = v;
85 return NDR_ERR_SUCCESS;
88 _PUBLIC_ void ndr_print_svcctl_ServiceStatus(struct ndr_print *ndr, const char *name, enum svcctl_ServiceStatus r)
90 const char *val = NULL;
92 switch (r) {
93 case SVCCTL_STATE_UNKNOWN: val = "SVCCTL_STATE_UNKNOWN"; break;
94 case SVCCTL_STOPPED: val = "SVCCTL_STOPPED"; break;
95 case SVCCTL_START_PENDING: val = "SVCCTL_START_PENDING"; break;
96 case SVCCTL_STOP_PENDING: val = "SVCCTL_STOP_PENDING"; break;
97 case SVCCTL_RUNNING: val = "SVCCTL_RUNNING"; break;
98 case SVCCTL_CONTINUE_PENDING: val = "SVCCTL_CONTINUE_PENDING"; break;
99 case SVCCTL_PAUSE_PENDING: val = "SVCCTL_PAUSE_PENDING"; break;
100 case SVCCTL_PAUSED: val = "SVCCTL_PAUSED"; break;
102 ndr_print_enum(ndr, name, "ENUM", val, r);
105 static enum ndr_err_code ndr_push_svcctl_ControlsAccepted(struct ndr_push *ndr, int ndr_flags, uint32_t r)
107 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
108 return NDR_ERR_SUCCESS;
111 static enum ndr_err_code ndr_pull_svcctl_ControlsAccepted(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
113 uint32_t v;
114 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
115 *r = v;
116 return NDR_ERR_SUCCESS;
119 _PUBLIC_ void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const char *name, uint32_t r)
121 ndr_print_uint32(ndr, name, r);
122 ndr->depth++;
123 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_STOP", SVCCTL_ACCEPT_STOP, r);
124 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PAUSE_CONTINUE", SVCCTL_ACCEPT_PAUSE_CONTINUE, r);
125 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_SHUTDOWN", SVCCTL_ACCEPT_SHUTDOWN, r);
126 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PARAMCHANGE", SVCCTL_ACCEPT_PARAMCHANGE, r);
127 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NETBINDCHANGE", SVCCTL_ACCEPT_NETBINDCHANGE, r);
128 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_HARDWAREPROFILECHANGE", SVCCTL_ACCEPT_HARDWAREPROFILECHANGE, r);
129 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_POWEREVENT", SVCCTL_ACCEPT_POWEREVENT, r);
130 ndr->depth--;
133 static enum ndr_err_code ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r)
135 if (ndr_flags & NDR_SCALARS) {
136 NDR_CHECK(ndr_push_align(ndr, 4));
137 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
138 NDR_CHECK(ndr_push_svcctl_ServiceStatus(ndr, NDR_SCALARS, r->state));
139 NDR_CHECK(ndr_push_svcctl_ControlsAccepted(ndr, NDR_SCALARS, r->controls_accepted));
140 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->win32_exit_code));
141 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code));
142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point));
143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wait_hint));
145 if (ndr_flags & NDR_BUFFERS) {
147 return NDR_ERR_SUCCESS;
150 static enum ndr_err_code ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS *r)
152 if (ndr_flags & NDR_SCALARS) {
153 NDR_CHECK(ndr_pull_align(ndr, 4));
154 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
155 NDR_CHECK(ndr_pull_svcctl_ServiceStatus(ndr, NDR_SCALARS, &r->state));
156 NDR_CHECK(ndr_pull_svcctl_ControlsAccepted(ndr, NDR_SCALARS, &r->controls_accepted));
157 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->win32_exit_code));
158 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code));
159 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point));
160 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wait_hint));
162 if (ndr_flags & NDR_BUFFERS) {
164 return NDR_ERR_SUCCESS;
167 _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r)
169 ndr_print_struct(ndr, name, "SERVICE_STATUS");
170 ndr->depth++;
171 ndr_print_uint32(ndr, "type", r->type);
172 ndr_print_svcctl_ServiceStatus(ndr, "state", r->state);
173 ndr_print_svcctl_ControlsAccepted(ndr, "controls_accepted", r->controls_accepted);
174 ndr_print_WERROR(ndr, "win32_exit_code", r->win32_exit_code);
175 ndr_print_uint32(ndr, "service_exit_code", r->service_exit_code);
176 ndr_print_uint32(ndr, "check_point", r->check_point);
177 ndr_print_uint32(ndr, "wait_hint", r->wait_hint);
178 ndr->depth--;
181 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS_PROCESS *r)
183 if (ndr_flags & NDR_SCALARS) {
184 NDR_CHECK(ndr_push_align(ndr, 4));
185 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->process_id));
187 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_flags));
189 if (ndr_flags & NDR_BUFFERS) {
191 return NDR_ERR_SUCCESS;
194 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS_PROCESS *r)
196 if (ndr_flags & NDR_SCALARS) {
197 NDR_CHECK(ndr_pull_align(ndr, 4));
198 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->process_id));
200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_flags));
202 if (ndr_flags & NDR_BUFFERS) {
204 return NDR_ERR_SUCCESS;
207 _PUBLIC_ void ndr_print_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS_PROCESS *r)
209 ndr_print_struct(ndr, name, "SERVICE_STATUS_PROCESS");
210 ndr->depth++;
211 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
212 ndr_print_uint32(ndr, "process_id", r->process_id);
213 ndr_print_uint32(ndr, "service_flags", r->service_flags);
214 ndr->depth--;
217 _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSW *r)
219 if (ndr_flags & NDR_SCALARS) {
220 NDR_CHECK(ndr_push_align(ndr, 4));
222 uint32_t _flags_save_string = ndr->flags;
223 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
224 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
225 ndr->flags = _flags_save_string;
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->display_name));
231 ndr->flags = _flags_save_string;
233 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
235 if (ndr_flags & NDR_BUFFERS) {
237 uint32_t _flags_save_string = ndr->flags;
238 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
239 if (r->service_name) {
240 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->service_name));
241 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
243 ndr->flags = _flags_save_string;
246 uint32_t _flags_save_string = ndr->flags;
247 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
248 if (r->display_name) {
249 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->display_name));
250 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
252 ndr->flags = _flags_save_string;
255 return NDR_ERR_SUCCESS;
258 _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSW *r)
260 uint32_t _ptr_service_name;
261 TALLOC_CTX *_mem_save_service_name_0;
262 uint32_t _ptr_display_name;
263 TALLOC_CTX *_mem_save_display_name_0;
264 if (ndr_flags & NDR_SCALARS) {
265 NDR_CHECK(ndr_pull_align(ndr, 4));
267 uint32_t _flags_save_string = ndr->flags;
268 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
269 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
270 if (_ptr_service_name) {
271 NDR_PULL_ALLOC(ndr, r->service_name);
272 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
273 } else {
274 r->service_name = NULL;
276 ndr->flags = _flags_save_string;
279 uint32_t _flags_save_string = ndr->flags;
280 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
281 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
282 if (_ptr_display_name) {
283 NDR_PULL_ALLOC(ndr, r->display_name);
284 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
285 } else {
286 r->display_name = NULL;
288 ndr->flags = _flags_save_string;
290 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
292 if (ndr_flags & NDR_BUFFERS) {
294 uint32_t _flags_save_string = ndr->flags;
295 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
296 if (r->service_name) {
297 uint32_t _relative_save_offset;
298 _relative_save_offset = ndr->offset;
299 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
300 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
301 NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
302 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
303 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
304 ndr->offset = _relative_save_offset;
306 ndr->flags = _flags_save_string;
309 uint32_t _flags_save_string = ndr->flags;
310 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
311 if (r->display_name) {
312 uint32_t _relative_save_offset;
313 _relative_save_offset = ndr->offset;
314 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
315 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
316 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
317 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
318 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
319 ndr->offset = _relative_save_offset;
321 ndr->flags = _flags_save_string;
324 return NDR_ERR_SUCCESS;
327 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSW *r)
329 ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSW");
330 ndr->depth++;
331 ndr_print_ptr(ndr, "service_name", r->service_name);
332 ndr->depth++;
333 if (r->service_name) {
334 ndr_print_string(ndr, "service_name", r->service_name);
336 ndr->depth--;
337 ndr_print_ptr(ndr, "display_name", r->display_name);
338 ndr->depth++;
339 if (r->display_name) {
340 ndr_print_string(ndr, "display_name", r->display_name);
342 ndr->depth--;
343 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
344 ndr->depth--;
347 _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, struct smb_iconv_convenience *ic, int flags)
349 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSW, ic);
352 _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSA *r)
354 if (ndr_flags & NDR_SCALARS) {
355 NDR_CHECK(ndr_push_align(ndr, 4));
357 uint32_t _flags_save_string = ndr->flags;
358 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
359 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
360 ndr->flags = _flags_save_string;
363 uint32_t _flags_save_string = ndr->flags;
364 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
365 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
366 ndr->flags = _flags_save_string;
368 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
370 if (ndr_flags & NDR_BUFFERS) {
372 uint32_t _flags_save_string = ndr->flags;
373 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
374 if (r->service_name) {
375 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->service_name));
376 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
378 ndr->flags = _flags_save_string;
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->display_name) {
384 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->display_name));
385 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
387 ndr->flags = _flags_save_string;
390 return NDR_ERR_SUCCESS;
393 _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSA *r)
395 uint32_t _ptr_service_name;
396 TALLOC_CTX *_mem_save_service_name_0;
397 uint32_t _ptr_display_name;
398 TALLOC_CTX *_mem_save_display_name_0;
399 if (ndr_flags & NDR_SCALARS) {
400 NDR_CHECK(ndr_pull_align(ndr, 4));
402 uint32_t _flags_save_string = ndr->flags;
403 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
404 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
405 if (_ptr_service_name) {
406 NDR_PULL_ALLOC(ndr, r->service_name);
407 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
408 } else {
409 r->service_name = NULL;
411 ndr->flags = _flags_save_string;
414 uint32_t _flags_save_string = ndr->flags;
415 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
416 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
417 if (_ptr_display_name) {
418 NDR_PULL_ALLOC(ndr, r->display_name);
419 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
420 } else {
421 r->display_name = NULL;
423 ndr->flags = _flags_save_string;
425 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
427 if (ndr_flags & NDR_BUFFERS) {
429 uint32_t _flags_save_string = ndr->flags;
430 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
431 if (r->service_name) {
432 uint32_t _relative_save_offset;
433 _relative_save_offset = ndr->offset;
434 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
435 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
436 NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
437 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
438 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
439 ndr->offset = _relative_save_offset;
441 ndr->flags = _flags_save_string;
444 uint32_t _flags_save_string = ndr->flags;
445 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
446 if (r->display_name) {
447 uint32_t _relative_save_offset;
448 _relative_save_offset = ndr->offset;
449 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
450 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
451 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
452 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
454 ndr->offset = _relative_save_offset;
456 ndr->flags = _flags_save_string;
459 return NDR_ERR_SUCCESS;
462 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSA *r)
464 ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSA");
465 ndr->depth++;
466 ndr_print_ptr(ndr, "service_name", r->service_name);
467 ndr->depth++;
468 if (r->service_name) {
469 ndr_print_string(ndr, "service_name", r->service_name);
471 ndr->depth--;
472 ndr_print_ptr(ndr, "display_name", r->display_name);
473 ndr->depth++;
474 if (r->display_name) {
475 ndr_print_string(ndr, "display_name", r->display_name);
477 ndr->depth--;
478 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
479 ndr->depth--;
482 _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA *r, struct smb_iconv_convenience *ic, int flags)
484 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSA, ic);
487 _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
490 return NDR_ERR_SUCCESS;
493 _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
495 uint32_t v;
496 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
497 *r = v;
498 return NDR_ERR_SUCCESS;
501 _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r)
503 ndr_print_uint32(ndr, name, r);
504 ndr->depth++;
505 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WORKSTATION", SV_TYPE_WORKSTATION, r);
506 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER", SV_TYPE_SERVER, r);
507 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SQLSERVER", SV_TYPE_SQLSERVER, r);
508 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_CTRL", SV_TYPE_DOMAIN_CTRL, r);
509 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_BAKCTRL", SV_TYPE_DOMAIN_BAKCTRL, r);
510 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_TIME_SOURCE", SV_TYPE_TIME_SOURCE, r);
511 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_AFP", SV_TYPE_AFP, r);
512 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NOVELL", SV_TYPE_NOVELL, r);
513 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MEMBER", SV_TYPE_DOMAIN_MEMBER, r);
514 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_PRINTQ_SERVER", SV_TYPE_PRINTQ_SERVER, r);
515 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DIALIN_SERVER", SV_TYPE_DIALIN_SERVER, r);
516 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_UNIX", SV_TYPE_SERVER_UNIX, r);
517 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NT", SV_TYPE_NT, r);
518 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WFW", SV_TYPE_WFW, r);
519 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_MFPN", SV_TYPE_SERVER_MFPN, r);
520 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_NT", SV_TYPE_SERVER_NT, r);
521 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_POTENTIAL_BROWSER", SV_TYPE_POTENTIAL_BROWSER, r);
522 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_BACKUP_BROWSER", SV_TYPE_BACKUP_BROWSER, r);
523 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_MASTER_BROWSER", SV_TYPE_MASTER_BROWSER, r);
524 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MASTER", SV_TYPE_DOMAIN_MASTER, r);
525 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_OSF", SV_TYPE_SERVER_OSF, r);
526 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_VMS", SV_TYPE_SERVER_VMS, r);
527 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WIN95_PLUS", SV_TYPE_WIN95_PLUS, r);
528 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DFS_SERVER", SV_TYPE_DFS_SERVER, r);
529 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_ALTERNATE_XPORT", SV_TYPE_ALTERNATE_XPORT, r);
530 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_LOCAL_LIST_ONLY", SV_TYPE_LOCAL_LIST_ONLY, r);
531 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_ENUM", SV_TYPE_DOMAIN_ENUM, r);
532 ndr->depth--;
535 static enum ndr_err_code ndr_push_SERVICE_CONTROL(struct ndr_push *ndr, int ndr_flags, enum SERVICE_CONTROL r)
537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
538 return NDR_ERR_SUCCESS;
541 static enum ndr_err_code ndr_pull_SERVICE_CONTROL(struct ndr_pull *ndr, int ndr_flags, enum SERVICE_CONTROL *r)
543 uint32_t v;
544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
545 *r = v;
546 return NDR_ERR_SUCCESS;
549 _PUBLIC_ void ndr_print_SERVICE_CONTROL(struct ndr_print *ndr, const char *name, enum SERVICE_CONTROL r)
551 const char *val = NULL;
553 switch (r) {
554 case SVCCTL_CONTROL_STOP: val = "SVCCTL_CONTROL_STOP"; break;
555 case SVCCTL_CONTROL_PAUSE: val = "SVCCTL_CONTROL_PAUSE"; break;
556 case SVCCTL_CONTROL_CONTINUE: val = "SVCCTL_CONTROL_CONTINUE"; break;
557 case SVCCTL_CONTROL_INTERROGATE: val = "SVCCTL_CONTROL_INTERROGATE"; break;
558 case SVCCTL_CONTROL_SHUTDOWN: val = "SVCCTL_CONTROL_SHUTDOWN"; break;
560 ndr_print_enum(ndr, name, "ENUM", val, r);
563 static enum ndr_err_code ndr_push_svcctl_ErrorControl(struct ndr_push *ndr, int ndr_flags, enum svcctl_ErrorControl r)
565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
566 return NDR_ERR_SUCCESS;
569 static enum ndr_err_code ndr_pull_svcctl_ErrorControl(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ErrorControl *r)
571 uint32_t v;
572 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
573 *r = v;
574 return NDR_ERR_SUCCESS;
577 _PUBLIC_ void ndr_print_svcctl_ErrorControl(struct ndr_print *ndr, const char *name, enum svcctl_ErrorControl r)
579 const char *val = NULL;
581 switch (r) {
582 case SVCCTL_SVC_ERROR_IGNORE: val = "SVCCTL_SVC_ERROR_IGNORE"; break;
583 case SVCCTL_SVC_ERROR_NORMAL: val = "SVCCTL_SVC_ERROR_NORMAL"; break;
584 case SVCCTL_SVC_ERROR_CRITICAL: val = "SVCCTL_SVC_ERROR_CRITICAL"; break;
585 case SVCCTL_SVC_ERROR_SEVERE: val = "SVCCTL_SVC_ERROR_SEVERE"; break;
587 ndr_print_enum(ndr, name, "ENUM", val, r);
590 static enum ndr_err_code ndr_push_svcctl_StartType(struct ndr_push *ndr, int ndr_flags, enum svcctl_StartType r)
592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
593 return NDR_ERR_SUCCESS;
596 static enum ndr_err_code ndr_pull_svcctl_StartType(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StartType *r)
598 uint32_t v;
599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
600 *r = v;
601 return NDR_ERR_SUCCESS;
604 _PUBLIC_ void ndr_print_svcctl_StartType(struct ndr_print *ndr, const char *name, enum svcctl_StartType r)
606 const char *val = NULL;
608 switch (r) {
609 case SVCCTL_BOOT_START: val = "SVCCTL_BOOT_START"; break;
610 case SVCCTL_SYSTEM_START: val = "SVCCTL_SYSTEM_START"; break;
611 case SVCCTL_AUTO_START: val = "SVCCTL_AUTO_START"; break;
612 case SVCCTL_DEMAND_START: val = "SVCCTL_DEMAND_START"; break;
613 case SVCCTL_DISABLED: val = "SVCCTL_DISABLED"; break;
615 ndr_print_enum(ndr, name, "ENUM", val, r);
618 static enum ndr_err_code ndr_push_svcctl_ServiceState(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceState r)
620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
621 return NDR_ERR_SUCCESS;
624 static enum ndr_err_code ndr_pull_svcctl_ServiceState(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceState *r)
626 uint32_t v;
627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
628 *r = v;
629 return NDR_ERR_SUCCESS;
632 _PUBLIC_ void ndr_print_svcctl_ServiceState(struct ndr_print *ndr, const char *name, enum svcctl_ServiceState r)
634 const char *val = NULL;
636 switch (r) {
637 case SERVICE_STATE_ACTIVE: val = "SERVICE_STATE_ACTIVE"; break;
638 case SERVICE_STATE_INACTIVE: val = "SERVICE_STATE_INACTIVE"; break;
639 case SERVICE_STATE_ALL: val = "SERVICE_STATE_ALL"; break;
641 ndr_print_enum(ndr, name, "ENUM", val, r);
644 static enum ndr_err_code ndr_push_svcctl_MgrAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
647 return NDR_ERR_SUCCESS;
650 static enum ndr_err_code ndr_pull_svcctl_MgrAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
652 uint32_t v;
653 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
654 *r = v;
655 return NDR_ERR_SUCCESS;
658 _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
660 ndr_print_uint32(ndr, name, r);
661 ndr->depth++;
662 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CONNECT", SC_RIGHT_MGR_CONNECT, r);
663 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CREATE_SERVICE", SC_RIGHT_MGR_CREATE_SERVICE, r);
664 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_ENUMERATE_SERVICE", SC_RIGHT_MGR_ENUMERATE_SERVICE, r);
665 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_LOCK", SC_RIGHT_MGR_LOCK, r);
666 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_QUERY_LOCK_STATUS", SC_RIGHT_MGR_QUERY_LOCK_STATUS, r);
667 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_MODIFY_BOOT_CONFIG", SC_RIGHT_MGR_MODIFY_BOOT_CONFIG, r);
668 ndr->depth--;
671 static enum ndr_err_code ndr_push_svcctl_ServiceAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
674 return NDR_ERR_SUCCESS;
677 static enum ndr_err_code ndr_pull_svcctl_ServiceAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
679 uint32_t v;
680 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
681 *r = v;
682 return NDR_ERR_SUCCESS;
685 _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
687 ndr_print_uint32(ndr, name, r);
688 ndr->depth++;
689 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_CONFIG", SC_RIGHT_SVC_QUERY_CONFIG, r);
690 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_CHANGE_CONFIG", SC_RIGHT_SVC_CHANGE_CONFIG, r);
691 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_STATUS", SC_RIGHT_SVC_QUERY_STATUS, r);
692 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_ENUMERATE_DEPENDENTS", SC_RIGHT_SVC_ENUMERATE_DEPENDENTS, r);
693 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_START", SC_RIGHT_SVC_START, r);
694 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_STOP", SC_RIGHT_SVC_STOP, r);
695 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_PAUSE_CONTINUE", SC_RIGHT_SVC_PAUSE_CONTINUE, r);
696 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_INTERROGATE", SC_RIGHT_SVC_INTERROGATE, r);
697 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_USER_DEFINED_CONTROL", SC_RIGHT_SVC_USER_DEFINED_CONTROL, r);
698 ndr->depth--;
701 _PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r)
703 if (ndr_flags & NDR_SCALARS) {
704 NDR_CHECK(ndr_push_align(ndr, 4));
705 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_type));
706 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->start_type));
707 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->error_control));
708 NDR_CHECK(ndr_push_unique_ptr(ndr, r->executablepath));
709 NDR_CHECK(ndr_push_unique_ptr(ndr, r->loadordergroup));
710 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tag_id));
711 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies));
712 NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname));
713 NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname));
715 if (ndr_flags & NDR_BUFFERS) {
716 if (r->executablepath) {
717 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
718 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
720 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->executablepath, ndr_charset_length(r->executablepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
722 if (r->loadordergroup) {
723 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
726 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->loadordergroup, ndr_charset_length(r->loadordergroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
728 if (r->dependencies) {
729 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
732 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dependencies, ndr_charset_length(r->dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
734 if (r->startname) {
735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
736 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
738 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->startname, ndr_charset_length(r->startname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
740 if (r->displayname) {
741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
743 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
744 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->displayname, ndr_charset_length(r->displayname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
747 return NDR_ERR_SUCCESS;
750 _PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r)
752 uint32_t _ptr_executablepath;
753 TALLOC_CTX *_mem_save_executablepath_0;
754 uint32_t _ptr_loadordergroup;
755 TALLOC_CTX *_mem_save_loadordergroup_0;
756 uint32_t _ptr_dependencies;
757 TALLOC_CTX *_mem_save_dependencies_0;
758 uint32_t _ptr_startname;
759 TALLOC_CTX *_mem_save_startname_0;
760 uint32_t _ptr_displayname;
761 TALLOC_CTX *_mem_save_displayname_0;
762 if (ndr_flags & NDR_SCALARS) {
763 NDR_CHECK(ndr_pull_align(ndr, 4));
764 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_type));
765 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->start_type));
766 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->error_control));
767 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_executablepath));
768 if (_ptr_executablepath) {
769 NDR_PULL_ALLOC(ndr, r->executablepath);
770 } else {
771 r->executablepath = NULL;
773 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_loadordergroup));
774 if (_ptr_loadordergroup) {
775 NDR_PULL_ALLOC(ndr, r->loadordergroup);
776 } else {
777 r->loadordergroup = NULL;
779 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tag_id));
780 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
781 if (_ptr_dependencies) {
782 NDR_PULL_ALLOC(ndr, r->dependencies);
783 } else {
784 r->dependencies = NULL;
786 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_startname));
787 if (_ptr_startname) {
788 NDR_PULL_ALLOC(ndr, r->startname);
789 } else {
790 r->startname = NULL;
792 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayname));
793 if (_ptr_displayname) {
794 NDR_PULL_ALLOC(ndr, r->displayname);
795 } else {
796 r->displayname = NULL;
799 if (ndr_flags & NDR_BUFFERS) {
800 if (r->executablepath) {
801 _mem_save_executablepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
802 NDR_PULL_SET_MEM_CTX(ndr, r->executablepath, 0);
803 NDR_CHECK(ndr_pull_array_size(ndr, &r->executablepath));
804 NDR_CHECK(ndr_pull_array_length(ndr, &r->executablepath));
805 if (ndr_get_array_length(ndr, &r->executablepath) > ndr_get_array_size(ndr, &r->executablepath)) {
806 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));
808 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t)));
809 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->executablepath, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t), CH_UTF16));
810 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_executablepath_0, 0);
812 if (r->loadordergroup) {
813 _mem_save_loadordergroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
814 NDR_PULL_SET_MEM_CTX(ndr, r->loadordergroup, 0);
815 NDR_CHECK(ndr_pull_array_size(ndr, &r->loadordergroup));
816 NDR_CHECK(ndr_pull_array_length(ndr, &r->loadordergroup));
817 if (ndr_get_array_length(ndr, &r->loadordergroup) > ndr_get_array_size(ndr, &r->loadordergroup)) {
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->loadordergroup), ndr_get_array_length(ndr, &r->loadordergroup));
820 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t)));
821 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->loadordergroup, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t), CH_UTF16));
822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_loadordergroup_0, 0);
824 if (r->dependencies) {
825 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
826 NDR_PULL_SET_MEM_CTX(ndr, r->dependencies, 0);
827 NDR_CHECK(ndr_pull_array_size(ndr, &r->dependencies));
828 NDR_CHECK(ndr_pull_array_length(ndr, &r->dependencies));
829 if (ndr_get_array_length(ndr, &r->dependencies) > ndr_get_array_size(ndr, &r->dependencies)) {
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->dependencies), ndr_get_array_length(ndr, &r->dependencies));
832 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t)));
833 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dependencies, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t), CH_UTF16));
834 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
836 if (r->startname) {
837 _mem_save_startname_0 = NDR_PULL_GET_MEM_CTX(ndr);
838 NDR_PULL_SET_MEM_CTX(ndr, r->startname, 0);
839 NDR_CHECK(ndr_pull_array_size(ndr, &r->startname));
840 NDR_CHECK(ndr_pull_array_length(ndr, &r->startname));
841 if (ndr_get_array_length(ndr, &r->startname) > ndr_get_array_size(ndr, &r->startname)) {
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->startname), ndr_get_array_length(ndr, &r->startname));
844 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t)));
845 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->startname, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t), CH_UTF16));
846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_startname_0, 0);
848 if (r->displayname) {
849 _mem_save_displayname_0 = NDR_PULL_GET_MEM_CTX(ndr);
850 NDR_PULL_SET_MEM_CTX(ndr, r->displayname, 0);
851 NDR_CHECK(ndr_pull_array_size(ndr, &r->displayname));
852 NDR_CHECK(ndr_pull_array_length(ndr, &r->displayname));
853 if (ndr_get_array_length(ndr, &r->displayname) > ndr_get_array_size(ndr, &r->displayname)) {
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->displayname), ndr_get_array_length(ndr, &r->displayname));
856 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t)));
857 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->displayname, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t), CH_UTF16));
858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayname_0, 0);
861 return NDR_ERR_SUCCESS;
864 _PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r)
866 ndr_print_struct(ndr, name, "QUERY_SERVICE_CONFIG");
867 ndr->depth++;
868 ndr_print_uint32(ndr, "service_type", r->service_type);
869 ndr_print_svcctl_StartType(ndr, "start_type", r->start_type);
870 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->error_control);
871 ndr_print_ptr(ndr, "executablepath", r->executablepath);
872 ndr->depth++;
873 if (r->executablepath) {
874 ndr_print_string(ndr, "executablepath", r->executablepath);
876 ndr->depth--;
877 ndr_print_ptr(ndr, "loadordergroup", r->loadordergroup);
878 ndr->depth++;
879 if (r->loadordergroup) {
880 ndr_print_string(ndr, "loadordergroup", r->loadordergroup);
882 ndr->depth--;
883 ndr_print_uint32(ndr, "tag_id", r->tag_id);
884 ndr_print_ptr(ndr, "dependencies", r->dependencies);
885 ndr->depth++;
886 if (r->dependencies) {
887 ndr_print_string(ndr, "dependencies", r->dependencies);
889 ndr->depth--;
890 ndr_print_ptr(ndr, "startname", r->startname);
891 ndr->depth++;
892 if (r->startname) {
893 ndr_print_string(ndr, "startname", r->startname);
895 ndr->depth--;
896 ndr_print_ptr(ndr, "displayname", r->displayname);
897 ndr->depth++;
898 if (r->displayname) {
899 ndr_print_string(ndr, "displayname", r->displayname);
901 ndr->depth--;
902 ndr->depth--;
905 _PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, struct smb_iconv_convenience *ic, int flags)
907 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG, ic);
910 static enum ndr_err_code ndr_push_svcctl_ConfigLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_ConfigLevel r)
912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
913 return NDR_ERR_SUCCESS;
916 static enum ndr_err_code ndr_pull_svcctl_ConfigLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ConfigLevel *r)
918 uint32_t v;
919 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
920 *r = v;
921 return NDR_ERR_SUCCESS;
924 _PUBLIC_ void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r)
926 const char *val = NULL;
928 switch (r) {
929 case SERVICE_CONFIG_DESCRIPTION: val = "SERVICE_CONFIG_DESCRIPTION"; break;
930 case SERVICE_CONFIG_FAILURE_ACTIONS: val = "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
932 ndr_print_enum(ndr, name, "ENUM", val, r);
935 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_DESCRIPTION *r)
937 if (ndr_flags & NDR_SCALARS) {
938 NDR_CHECK(ndr_push_align(ndr, 4));
940 uint32_t _flags_save_string = ndr->flags;
941 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
942 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
943 ndr->flags = _flags_save_string;
946 if (ndr_flags & NDR_BUFFERS) {
948 uint32_t _flags_save_string = ndr->flags;
949 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
950 if (r->description) {
951 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->description));
952 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
954 ndr->flags = _flags_save_string;
957 return NDR_ERR_SUCCESS;
960 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_DESCRIPTION *r)
962 uint32_t _ptr_description;
963 TALLOC_CTX *_mem_save_description_0;
964 if (ndr_flags & NDR_SCALARS) {
965 NDR_CHECK(ndr_pull_align(ndr, 4));
967 uint32_t _flags_save_string = ndr->flags;
968 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
969 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
970 if (_ptr_description) {
971 NDR_PULL_ALLOC(ndr, r->description);
972 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
973 } else {
974 r->description = NULL;
976 ndr->flags = _flags_save_string;
979 if (ndr_flags & NDR_BUFFERS) {
981 uint32_t _flags_save_string = ndr->flags;
982 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
983 if (r->description) {
984 uint32_t _relative_save_offset;
985 _relative_save_offset = ndr->offset;
986 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
987 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
988 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
989 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
990 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
991 ndr->offset = _relative_save_offset;
993 ndr->flags = _flags_save_string;
996 return NDR_ERR_SUCCESS;
999 _PUBLIC_ void ndr_print_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTION *r)
1001 ndr_print_struct(ndr, name, "SERVICE_DESCRIPTION");
1002 ndr->depth++;
1003 ndr_print_ptr(ndr, "description", r->description);
1004 ndr->depth++;
1005 if (r->description) {
1006 ndr_print_string(ndr, "description", r->description);
1008 ndr->depth--;
1009 ndr->depth--;
1012 _PUBLIC_ size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION *r, struct smb_iconv_convenience *ic, int flags)
1014 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION, ic);
1017 static enum ndr_err_code ndr_push_SC_ACTION_TYPE(struct ndr_push *ndr, int ndr_flags, enum SC_ACTION_TYPE r)
1019 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1020 return NDR_ERR_SUCCESS;
1023 static enum ndr_err_code ndr_pull_SC_ACTION_TYPE(struct ndr_pull *ndr, int ndr_flags, enum SC_ACTION_TYPE *r)
1025 uint32_t v;
1026 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1027 *r = v;
1028 return NDR_ERR_SUCCESS;
1031 _PUBLIC_ void ndr_print_SC_ACTION_TYPE(struct ndr_print *ndr, const char *name, enum SC_ACTION_TYPE r)
1033 const char *val = NULL;
1035 switch (r) {
1036 case SC_ACTION_NONE: val = "SC_ACTION_NONE"; break;
1037 case SC_ACTION_RESTART: val = "SC_ACTION_RESTART"; break;
1038 case SC_ACTION_REBOOT: val = "SC_ACTION_REBOOT"; break;
1039 case SC_ACTION_RUN_COMMAND: val = "SC_ACTION_RUN_COMMAND"; break;
1041 ndr_print_enum(ndr, name, "ENUM", val, r);
1044 static enum ndr_err_code ndr_push_SC_ACTION(struct ndr_push *ndr, int ndr_flags, const struct SC_ACTION *r)
1046 if (ndr_flags & NDR_SCALARS) {
1047 NDR_CHECK(ndr_push_align(ndr, 4));
1048 NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr, NDR_SCALARS, r->type));
1049 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->delay));
1051 if (ndr_flags & NDR_BUFFERS) {
1053 return NDR_ERR_SUCCESS;
1056 static enum ndr_err_code ndr_pull_SC_ACTION(struct ndr_pull *ndr, int ndr_flags, struct SC_ACTION *r)
1058 if (ndr_flags & NDR_SCALARS) {
1059 NDR_CHECK(ndr_pull_align(ndr, 4));
1060 NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr, NDR_SCALARS, &r->type));
1061 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->delay));
1063 if (ndr_flags & NDR_BUFFERS) {
1065 return NDR_ERR_SUCCESS;
1068 _PUBLIC_ void ndr_print_SC_ACTION(struct ndr_print *ndr, const char *name, const struct SC_ACTION *r)
1070 ndr_print_struct(ndr, name, "SC_ACTION");
1071 ndr->depth++;
1072 ndr_print_SC_ACTION_TYPE(ndr, "type", r->type);
1073 ndr_print_uint32(ndr, "delay", r->delay);
1074 ndr->depth--;
1077 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_FAILURE_ACTIONS *r)
1079 uint32_t cntr_actions_1;
1080 if (ndr_flags & NDR_SCALARS) {
1081 NDR_CHECK(ndr_push_align(ndr, 4));
1082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reset_period));
1084 uint32_t _flags_save_string = ndr->flags;
1085 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1086 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->rebootmsg));
1087 ndr->flags = _flags_save_string;
1090 uint32_t _flags_save_string = ndr->flags;
1091 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1092 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->command));
1093 ndr->flags = _flags_save_string;
1095 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions));
1096 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->actions));
1098 if (ndr_flags & NDR_BUFFERS) {
1100 uint32_t _flags_save_string = ndr->flags;
1101 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1102 if (r->rebootmsg) {
1103 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->rebootmsg));
1104 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->rebootmsg));
1106 ndr->flags = _flags_save_string;
1109 uint32_t _flags_save_string = ndr->flags;
1110 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1111 if (r->command) {
1112 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->command));
1113 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->command));
1115 ndr->flags = _flags_save_string;
1117 if (r->actions) {
1118 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->actions));
1119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions));
1120 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1121 NDR_CHECK(ndr_push_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1125 return NDR_ERR_SUCCESS;
1128 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_FAILURE_ACTIONS *r)
1130 uint32_t _ptr_rebootmsg;
1131 TALLOC_CTX *_mem_save_rebootmsg_0;
1132 uint32_t _ptr_command;
1133 TALLOC_CTX *_mem_save_command_0;
1134 uint32_t _ptr_actions;
1135 uint32_t cntr_actions_1;
1136 TALLOC_CTX *_mem_save_actions_0;
1137 TALLOC_CTX *_mem_save_actions_1;
1138 if (ndr_flags & NDR_SCALARS) {
1139 NDR_CHECK(ndr_pull_align(ndr, 4));
1140 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reset_period));
1142 uint32_t _flags_save_string = ndr->flags;
1143 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1144 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rebootmsg));
1145 if (_ptr_rebootmsg) {
1146 NDR_PULL_ALLOC(ndr, r->rebootmsg);
1147 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->rebootmsg, _ptr_rebootmsg));
1148 } else {
1149 r->rebootmsg = NULL;
1151 ndr->flags = _flags_save_string;
1154 uint32_t _flags_save_string = ndr->flags;
1155 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1156 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
1157 if (_ptr_command) {
1158 NDR_PULL_ALLOC(ndr, r->command);
1159 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->command, _ptr_command));
1160 } else {
1161 r->command = NULL;
1163 ndr->flags = _flags_save_string;
1165 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_actions));
1166 if (r->num_actions > 1024) {
1167 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1169 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_actions));
1170 if (_ptr_actions) {
1171 NDR_PULL_ALLOC(ndr, r->actions);
1172 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->actions, _ptr_actions));
1173 } else {
1174 r->actions = NULL;
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 uint32_t _relative_save_offset;
1183 _relative_save_offset = ndr->offset;
1184 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->rebootmsg));
1185 _mem_save_rebootmsg_0 = NDR_PULL_GET_MEM_CTX(ndr);
1186 NDR_PULL_SET_MEM_CTX(ndr, r->rebootmsg, 0);
1187 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->rebootmsg));
1188 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rebootmsg_0, 0);
1189 ndr->offset = _relative_save_offset;
1191 ndr->flags = _flags_save_string;
1194 uint32_t _flags_save_string = ndr->flags;
1195 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1196 if (r->command) {
1197 uint32_t _relative_save_offset;
1198 _relative_save_offset = ndr->offset;
1199 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->command));
1200 _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
1201 NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
1202 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->command));
1203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
1204 ndr->offset = _relative_save_offset;
1206 ndr->flags = _flags_save_string;
1208 if (r->actions) {
1209 uint32_t _relative_save_offset;
1210 _relative_save_offset = ndr->offset;
1211 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->actions));
1212 _mem_save_actions_0 = NDR_PULL_GET_MEM_CTX(ndr);
1213 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1214 NDR_CHECK(ndr_pull_array_size(ndr, &r->actions));
1215 NDR_PULL_ALLOC_N(ndr, r->actions, ndr_get_array_size(ndr, &r->actions));
1216 _mem_save_actions_1 = NDR_PULL_GET_MEM_CTX(ndr);
1217 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1218 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1219 NDR_CHECK(ndr_pull_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1221 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_1, 0);
1222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_0, 0);
1223 ndr->offset = _relative_save_offset;
1225 if (r->actions) {
1226 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->actions, r->num_actions));
1229 return NDR_ERR_SUCCESS;
1232 _PUBLIC_ void ndr_print_SERVICE_FAILURE_ACTIONS(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONS *r)
1234 uint32_t cntr_actions_1;
1235 ndr_print_struct(ndr, name, "SERVICE_FAILURE_ACTIONS");
1236 ndr->depth++;
1237 ndr_print_uint32(ndr, "reset_period", r->reset_period);
1238 ndr_print_ptr(ndr, "rebootmsg", r->rebootmsg);
1239 ndr->depth++;
1240 if (r->rebootmsg) {
1241 ndr_print_string(ndr, "rebootmsg", r->rebootmsg);
1243 ndr->depth--;
1244 ndr_print_ptr(ndr, "command", r->command);
1245 ndr->depth++;
1246 if (r->command) {
1247 ndr_print_string(ndr, "command", r->command);
1249 ndr->depth--;
1250 ndr_print_uint32(ndr, "num_actions", r->num_actions);
1251 ndr_print_ptr(ndr, "actions", r->actions);
1252 ndr->depth++;
1253 if (r->actions) {
1254 ndr->print(ndr, "%s: ARRAY(%d)", "actions", (int)r->num_actions);
1255 ndr->depth++;
1256 for (cntr_actions_1=0;cntr_actions_1<r->num_actions;cntr_actions_1++) {
1257 char *idx_1=NULL;
1258 if (asprintf(&idx_1, "[%d]", cntr_actions_1) != -1) {
1259 ndr_print_SC_ACTION(ndr, "actions", &r->actions[cntr_actions_1]);
1260 free(idx_1);
1263 ndr->depth--;
1265 ndr->depth--;
1266 ndr->depth--;
1269 _PUBLIC_ size_t ndr_size_SERVICE_FAILURE_ACTIONS(const struct SERVICE_FAILURE_ACTIONS *r, struct smb_iconv_convenience *ic, int flags)
1271 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONS, ic);
1274 static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_StatusLevel r)
1276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1277 return NDR_ERR_SUCCESS;
1280 static enum ndr_err_code ndr_pull_svcctl_StatusLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StatusLevel *r)
1282 uint32_t v;
1283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1284 *r = v;
1285 return NDR_ERR_SUCCESS;
1288 _PUBLIC_ void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r)
1290 const char *val = NULL;
1292 switch (r) {
1293 case SVC_STATUS_PROCESS_INFO: val = "SVC_STATUS_PROCESS_INFO"; break;
1295 ndr_print_enum(ndr, name, "ENUM", val, r);
1298 static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
1300 if (flags & NDR_IN) {
1301 if (r->in.handle == NULL) {
1302 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1304 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1306 if (flags & NDR_OUT) {
1307 if (r->out.handle == NULL) {
1308 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1310 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1311 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1313 return NDR_ERR_SUCCESS;
1316 static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
1318 TALLOC_CTX *_mem_save_handle_0;
1319 if (flags & NDR_IN) {
1320 ZERO_STRUCT(r->out);
1322 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1323 NDR_PULL_ALLOC(ndr, r->in.handle);
1325 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1326 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1327 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1329 NDR_PULL_ALLOC(ndr, r->out.handle);
1330 *r->out.handle = *r->in.handle;
1332 if (flags & NDR_OUT) {
1333 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1334 NDR_PULL_ALLOC(ndr, r->out.handle);
1336 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1337 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1338 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1339 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1340 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1342 return NDR_ERR_SUCCESS;
1345 _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r)
1347 ndr_print_struct(ndr, name, "svcctl_CloseServiceHandle");
1348 ndr->depth++;
1349 if (flags & NDR_SET_VALUES) {
1350 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1352 if (flags & NDR_IN) {
1353 ndr_print_struct(ndr, "in", "svcctl_CloseServiceHandle");
1354 ndr->depth++;
1355 ndr_print_ptr(ndr, "handle", r->in.handle);
1356 ndr->depth++;
1357 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1358 ndr->depth--;
1359 ndr->depth--;
1361 if (flags & NDR_OUT) {
1362 ndr_print_struct(ndr, "out", "svcctl_CloseServiceHandle");
1363 ndr->depth++;
1364 ndr_print_ptr(ndr, "handle", r->out.handle);
1365 ndr->depth++;
1366 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1367 ndr->depth--;
1368 ndr_print_WERROR(ndr, "result", r->out.result);
1369 ndr->depth--;
1371 ndr->depth--;
1374 static enum ndr_err_code ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
1376 if (flags & NDR_IN) {
1377 if (r->in.handle == NULL) {
1378 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1380 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1381 NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.control));
1383 if (flags & NDR_OUT) {
1384 if (r->out.service_status == NULL) {
1385 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1387 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1388 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1390 return NDR_ERR_SUCCESS;
1393 static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
1395 TALLOC_CTX *_mem_save_handle_0;
1396 TALLOC_CTX *_mem_save_service_status_0;
1397 if (flags & NDR_IN) {
1398 ZERO_STRUCT(r->out);
1400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1401 NDR_PULL_ALLOC(ndr, r->in.handle);
1403 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1404 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1405 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1407 NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.control));
1408 NDR_PULL_ALLOC(ndr, r->out.service_status);
1409 ZERO_STRUCTP(r->out.service_status);
1411 if (flags & NDR_OUT) {
1412 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1413 NDR_PULL_ALLOC(ndr, r->out.service_status);
1415 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1416 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1417 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1419 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1421 return NDR_ERR_SUCCESS;
1424 _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r)
1426 ndr_print_struct(ndr, name, "svcctl_ControlService");
1427 ndr->depth++;
1428 if (flags & NDR_SET_VALUES) {
1429 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1431 if (flags & NDR_IN) {
1432 ndr_print_struct(ndr, "in", "svcctl_ControlService");
1433 ndr->depth++;
1434 ndr_print_ptr(ndr, "handle", r->in.handle);
1435 ndr->depth++;
1436 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1437 ndr->depth--;
1438 ndr_print_SERVICE_CONTROL(ndr, "control", r->in.control);
1439 ndr->depth--;
1441 if (flags & NDR_OUT) {
1442 ndr_print_struct(ndr, "out", "svcctl_ControlService");
1443 ndr->depth++;
1444 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1445 ndr->depth++;
1446 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
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_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *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));
1462 if (flags & NDR_OUT) {
1463 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1465 return NDR_ERR_SUCCESS;
1468 static enum ndr_err_code ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
1470 TALLOC_CTX *_mem_save_handle_0;
1471 if (flags & NDR_IN) {
1472 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1473 NDR_PULL_ALLOC(ndr, r->in.handle);
1475 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1476 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1477 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1480 if (flags & NDR_OUT) {
1481 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1483 return NDR_ERR_SUCCESS;
1486 _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r)
1488 ndr_print_struct(ndr, name, "svcctl_DeleteService");
1489 ndr->depth++;
1490 if (flags & NDR_SET_VALUES) {
1491 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1493 if (flags & NDR_IN) {
1494 ndr_print_struct(ndr, "in", "svcctl_DeleteService");
1495 ndr->depth++;
1496 ndr_print_ptr(ndr, "handle", r->in.handle);
1497 ndr->depth++;
1498 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1499 ndr->depth--;
1500 ndr->depth--;
1502 if (flags & NDR_OUT) {
1503 ndr_print_struct(ndr, "out", "svcctl_DeleteService");
1504 ndr->depth++;
1505 ndr_print_WERROR(ndr, "result", r->out.result);
1506 ndr->depth--;
1508 ndr->depth--;
1511 static enum ndr_err_code ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
1513 if (flags & NDR_IN) {
1514 if (r->in.handle == NULL) {
1515 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1517 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1519 if (flags & NDR_OUT) {
1520 if (r->out.lock == NULL) {
1521 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1523 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1524 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1526 return NDR_ERR_SUCCESS;
1529 static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
1531 TALLOC_CTX *_mem_save_handle_0;
1532 TALLOC_CTX *_mem_save_lock_0;
1533 if (flags & NDR_IN) {
1534 ZERO_STRUCT(r->out);
1536 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1537 NDR_PULL_ALLOC(ndr, r->in.handle);
1539 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1540 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1541 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1543 NDR_PULL_ALLOC(ndr, r->out.lock);
1544 ZERO_STRUCTP(r->out.lock);
1546 if (flags & NDR_OUT) {
1547 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1548 NDR_PULL_ALLOC(ndr, r->out.lock);
1550 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1551 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
1552 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1553 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1554 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1556 return NDR_ERR_SUCCESS;
1559 _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r)
1561 ndr_print_struct(ndr, name, "svcctl_LockServiceDatabase");
1562 ndr->depth++;
1563 if (flags & NDR_SET_VALUES) {
1564 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1566 if (flags & NDR_IN) {
1567 ndr_print_struct(ndr, "in", "svcctl_LockServiceDatabase");
1568 ndr->depth++;
1569 ndr_print_ptr(ndr, "handle", r->in.handle);
1570 ndr->depth++;
1571 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1572 ndr->depth--;
1573 ndr->depth--;
1575 if (flags & NDR_OUT) {
1576 ndr_print_struct(ndr, "out", "svcctl_LockServiceDatabase");
1577 ndr->depth++;
1578 ndr_print_ptr(ndr, "lock", r->out.lock);
1579 ndr->depth++;
1580 ndr_print_policy_handle(ndr, "lock", r->out.lock);
1581 ndr->depth--;
1582 ndr_print_WERROR(ndr, "result", r->out.result);
1583 ndr->depth--;
1585 ndr->depth--;
1588 static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1590 if (flags & NDR_IN) {
1591 if (r->in.handle == NULL) {
1592 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1594 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1595 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1598 if (flags & NDR_OUT) {
1599 if (r->out.buffer == NULL) {
1600 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1603 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
1604 if (r->out.needed == NULL) {
1605 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
1608 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1610 return NDR_ERR_SUCCESS;
1613 static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
1615 TALLOC_CTX *_mem_save_handle_0;
1616 TALLOC_CTX *_mem_save_needed_0;
1617 if (flags & NDR_IN) {
1618 ZERO_STRUCT(r->out);
1620 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1621 NDR_PULL_ALLOC(ndr, r->in.handle);
1623 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1624 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1625 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1627 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1628 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1629 if (r->in.offered > 0x40000) {
1630 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1632 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
1633 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
1634 NDR_PULL_ALLOC(ndr, r->out.needed);
1635 ZERO_STRUCTP(r->out.needed);
1637 if (flags & NDR_OUT) {
1638 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
1639 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1640 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
1642 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
1643 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1644 NDR_PULL_ALLOC(ndr, r->out.needed);
1646 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
1647 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
1648 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
1649 if (*r->out.needed > 0x40000) {
1650 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
1653 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1654 if (r->out.buffer) {
1655 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
1658 return NDR_ERR_SUCCESS;
1661 _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1663 ndr_print_struct(ndr, name, "svcctl_QueryServiceObjectSecurity");
1664 ndr->depth++;
1665 if (flags & NDR_SET_VALUES) {
1666 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1668 if (flags & NDR_IN) {
1669 ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
1670 ndr->depth++;
1671 ndr_print_ptr(ndr, "handle", r->in.handle);
1672 ndr->depth++;
1673 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1674 ndr->depth--;
1675 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1676 ndr_print_uint32(ndr, "offered", r->in.offered);
1677 ndr->depth--;
1679 if (flags & NDR_OUT) {
1680 ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
1681 ndr->depth++;
1682 ndr_print_ptr(ndr, "buffer", r->out.buffer);
1683 ndr->depth++;
1684 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
1685 ndr->depth--;
1686 ndr_print_ptr(ndr, "needed", r->out.needed);
1687 ndr->depth++;
1688 ndr_print_uint32(ndr, "needed", *r->out.needed);
1689 ndr->depth--;
1690 ndr_print_WERROR(ndr, "result", r->out.result);
1691 ndr->depth--;
1693 ndr->depth--;
1696 static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1698 if (flags & NDR_IN) {
1699 if (r->in.handle == NULL) {
1700 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1702 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1703 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1704 if (r->in.buffer == NULL) {
1705 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1707 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1708 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
1709 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1711 if (flags & NDR_OUT) {
1712 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1714 return NDR_ERR_SUCCESS;
1717 static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
1719 TALLOC_CTX *_mem_save_handle_0;
1720 if (flags & NDR_IN) {
1721 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1722 NDR_PULL_ALLOC(ndr, r->in.handle);
1724 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1725 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1726 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1728 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1729 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
1730 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1731 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
1733 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
1734 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1735 if (r->in.buffer) {
1736 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
1739 if (flags & NDR_OUT) {
1740 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1742 return NDR_ERR_SUCCESS;
1745 _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1747 ndr_print_struct(ndr, name, "svcctl_SetServiceObjectSecurity");
1748 ndr->depth++;
1749 if (flags & NDR_SET_VALUES) {
1750 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1752 if (flags & NDR_IN) {
1753 ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
1754 ndr->depth++;
1755 ndr_print_ptr(ndr, "handle", r->in.handle);
1756 ndr->depth++;
1757 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1758 ndr->depth--;
1759 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1760 ndr_print_ptr(ndr, "buffer", r->in.buffer);
1761 ndr->depth++;
1762 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
1763 ndr->depth--;
1764 ndr_print_uint32(ndr, "offered", r->in.offered);
1765 ndr->depth--;
1767 if (flags & NDR_OUT) {
1768 ndr_print_struct(ndr, "out", "svcctl_SetServiceObjectSecurity");
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_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *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));
1784 if (flags & NDR_OUT) {
1785 if (r->out.service_status == NULL) {
1786 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1788 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1789 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1791 return NDR_ERR_SUCCESS;
1794 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
1796 TALLOC_CTX *_mem_save_handle_0;
1797 TALLOC_CTX *_mem_save_service_status_0;
1798 if (flags & NDR_IN) {
1799 ZERO_STRUCT(r->out);
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_PULL_ALLOC(ndr, r->out.service_status);
1809 ZERO_STRUCTP(r->out.service_status);
1811 if (flags & NDR_OUT) {
1812 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1813 NDR_PULL_ALLOC(ndr, r->out.service_status);
1815 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1816 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1817 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1818 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1819 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1821 return NDR_ERR_SUCCESS;
1824 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r)
1826 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatus");
1827 ndr->depth++;
1828 if (flags & NDR_SET_VALUES) {
1829 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1831 if (flags & NDR_IN) {
1832 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatus");
1833 ndr->depth++;
1834 ndr_print_ptr(ndr, "handle", r->in.handle);
1835 ndr->depth++;
1836 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1837 ndr->depth--;
1838 ndr->depth--;
1840 if (flags & NDR_OUT) {
1841 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatus");
1842 ndr->depth++;
1843 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1844 ndr->depth++;
1845 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1846 ndr->depth--;
1847 ndr_print_WERROR(ndr, "result", r->out.result);
1848 ndr->depth--;
1850 ndr->depth--;
1853 static enum ndr_err_code ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
1855 if (flags & NDR_IN) {
1857 if (flags & NDR_OUT) {
1858 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1860 return NDR_ERR_SUCCESS;
1863 static enum ndr_err_code ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
1865 if (flags & NDR_IN) {
1867 if (flags & NDR_OUT) {
1868 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1870 return NDR_ERR_SUCCESS;
1873 _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r)
1875 ndr_print_struct(ndr, name, "svcctl_SetServiceStatus");
1876 ndr->depth++;
1877 if (flags & NDR_SET_VALUES) {
1878 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1880 if (flags & NDR_IN) {
1881 ndr_print_struct(ndr, "in", "svcctl_SetServiceStatus");
1882 ndr->depth++;
1883 ndr->depth--;
1885 if (flags & NDR_OUT) {
1886 ndr_print_struct(ndr, "out", "svcctl_SetServiceStatus");
1887 ndr->depth++;
1888 ndr_print_WERROR(ndr, "result", r->out.result);
1889 ndr->depth--;
1891 ndr->depth--;
1894 static enum ndr_err_code ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
1896 if (flags & NDR_IN) {
1897 if (r->in.lock == NULL) {
1898 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1900 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.lock));
1902 if (flags & NDR_OUT) {
1903 if (r->out.lock == NULL) {
1904 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1906 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1907 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1909 return NDR_ERR_SUCCESS;
1912 static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
1914 TALLOC_CTX *_mem_save_lock_0;
1915 if (flags & NDR_IN) {
1916 ZERO_STRUCT(r->out);
1918 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1919 NDR_PULL_ALLOC(ndr, r->in.lock);
1921 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1922 NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC);
1923 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.lock));
1924 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1925 NDR_PULL_ALLOC(ndr, r->out.lock);
1926 *r->out.lock = *r->in.lock;
1928 if (flags & NDR_OUT) {
1929 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1930 NDR_PULL_ALLOC(ndr, r->out.lock);
1932 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1933 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
1934 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1935 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1936 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1938 return NDR_ERR_SUCCESS;
1941 _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r)
1943 ndr_print_struct(ndr, name, "svcctl_UnlockServiceDatabase");
1944 ndr->depth++;
1945 if (flags & NDR_SET_VALUES) {
1946 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1948 if (flags & NDR_IN) {
1949 ndr_print_struct(ndr, "in", "svcctl_UnlockServiceDatabase");
1950 ndr->depth++;
1951 ndr_print_ptr(ndr, "lock", r->in.lock);
1952 ndr->depth++;
1953 ndr_print_policy_handle(ndr, "lock", r->in.lock);
1954 ndr->depth--;
1955 ndr->depth--;
1957 if (flags & NDR_OUT) {
1958 ndr_print_struct(ndr, "out", "svcctl_UnlockServiceDatabase");
1959 ndr->depth++;
1960 ndr_print_ptr(ndr, "lock", r->out.lock);
1961 ndr->depth++;
1962 ndr_print_policy_handle(ndr, "lock", r->out.lock);
1963 ndr->depth--;
1964 ndr_print_WERROR(ndr, "result", r->out.result);
1965 ndr->depth--;
1967 ndr->depth--;
1970 static enum ndr_err_code ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
1972 if (flags & NDR_IN) {
1974 if (flags & NDR_OUT) {
1975 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1977 return NDR_ERR_SUCCESS;
1980 static enum ndr_err_code ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
1982 if (flags & NDR_IN) {
1984 if (flags & NDR_OUT) {
1985 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1987 return NDR_ERR_SUCCESS;
1990 _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r)
1992 ndr_print_struct(ndr, name, "svcctl_NotifyBootConfigStatus");
1993 ndr->depth++;
1994 if (flags & NDR_SET_VALUES) {
1995 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1997 if (flags & NDR_IN) {
1998 ndr_print_struct(ndr, "in", "svcctl_NotifyBootConfigStatus");
1999 ndr->depth++;
2000 ndr->depth--;
2002 if (flags & NDR_OUT) {
2003 ndr_print_struct(ndr, "out", "svcctl_NotifyBootConfigStatus");
2004 ndr->depth++;
2005 ndr_print_WERROR(ndr, "result", r->out.result);
2006 ndr->depth--;
2008 ndr->depth--;
2011 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
2013 if (flags & NDR_IN) {
2014 if (r->in.handle == NULL) {
2015 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2017 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2018 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
2019 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
2020 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
2022 if (flags & NDR_OUT) {
2023 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2025 return NDR_ERR_SUCCESS;
2028 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
2030 TALLOC_CTX *_mem_save_handle_0;
2031 if (flags & NDR_IN) {
2032 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2033 NDR_PULL_ALLOC(ndr, r->in.handle);
2035 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2036 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2037 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2039 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
2040 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
2041 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
2043 if (flags & NDR_OUT) {
2044 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2046 return NDR_ERR_SUCCESS;
2049 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r)
2051 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsW");
2052 ndr->depth++;
2053 if (flags & NDR_SET_VALUES) {
2054 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2056 if (flags & NDR_IN) {
2057 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsW");
2058 ndr->depth++;
2059 ndr_print_ptr(ndr, "handle", r->in.handle);
2060 ndr->depth++;
2061 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2062 ndr->depth--;
2063 ndr_print_uint32(ndr, "bits", r->in.bits);
2064 ndr_print_uint32(ndr, "bitson", r->in.bitson);
2065 ndr_print_uint32(ndr, "immediate", r->in.immediate);
2066 ndr->depth--;
2068 if (flags & NDR_OUT) {
2069 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsW");
2070 ndr->depth++;
2071 ndr_print_WERROR(ndr, "result", r->out.result);
2072 ndr->depth--;
2074 ndr->depth--;
2077 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
2079 if (flags & NDR_IN) {
2080 if (r->in.handle == NULL) {
2081 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2083 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2085 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2086 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2087 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
2088 if (r->in.binary_path) {
2089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2092 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));
2094 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
2095 if (r->in.load_order_group) {
2096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2097 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2099 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));
2101 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2102 if (r->in.dependencies) {
2103 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2104 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2105 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2106 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2108 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2109 if (r->in.service_start_name) {
2110 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2111 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2112 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2113 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));
2115 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2116 if (r->in.password) {
2117 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2118 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2120 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2122 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
2123 if (r->in.display_name) {
2124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2125 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2127 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));
2130 if (flags & NDR_OUT) {
2131 if (r->out.tag_id == NULL) {
2132 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2134 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
2135 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2137 return NDR_ERR_SUCCESS;
2140 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
2142 uint32_t _ptr_binary_path;
2143 uint32_t _ptr_load_order_group;
2144 uint32_t _ptr_dependencies;
2145 uint32_t _ptr_service_start_name;
2146 uint32_t _ptr_password;
2147 uint32_t _ptr_display_name;
2148 TALLOC_CTX *_mem_save_handle_0;
2149 TALLOC_CTX *_mem_save_binary_path_0;
2150 TALLOC_CTX *_mem_save_load_order_group_0;
2151 TALLOC_CTX *_mem_save_tag_id_0;
2152 TALLOC_CTX *_mem_save_dependencies_0;
2153 TALLOC_CTX *_mem_save_service_start_name_0;
2154 TALLOC_CTX *_mem_save_password_0;
2155 TALLOC_CTX *_mem_save_display_name_0;
2156 if (flags & NDR_IN) {
2157 ZERO_STRUCT(r->out);
2159 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2160 NDR_PULL_ALLOC(ndr, r->in.handle);
2162 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2163 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2164 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2165 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2166 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2167 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2168 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2169 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
2170 if (_ptr_binary_path) {
2171 NDR_PULL_ALLOC(ndr, r->in.binary_path);
2172 } else {
2173 r->in.binary_path = NULL;
2175 if (r->in.binary_path) {
2176 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
2177 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
2178 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2179 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2180 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2181 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));
2183 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2184 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));
2185 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
2187 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
2188 if (_ptr_load_order_group) {
2189 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
2190 } else {
2191 r->in.load_order_group = NULL;
2193 if (r->in.load_order_group) {
2194 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
2195 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
2196 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
2197 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
2198 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
2199 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));
2201 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
2202 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));
2203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
2205 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2206 if (_ptr_dependencies) {
2207 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2208 } else {
2209 r->in.dependencies = NULL;
2211 if (r->in.dependencies) {
2212 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2213 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2214 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2215 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
2216 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
2217 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));
2219 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
2220 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
2221 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2223 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2224 if (_ptr_service_start_name) {
2225 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2226 } else {
2227 r->in.service_start_name = NULL;
2229 if (r->in.service_start_name) {
2230 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2231 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2232 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2233 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2234 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2235 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));
2237 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2238 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));
2239 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2241 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2242 if (_ptr_password) {
2243 NDR_PULL_ALLOC(ndr, r->in.password);
2244 } else {
2245 r->in.password = NULL;
2247 if (r->in.password) {
2248 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2249 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2250 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2251 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
2252 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
2253 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));
2255 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
2256 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
2257 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2259 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
2260 if (_ptr_display_name) {
2261 NDR_PULL_ALLOC(ndr, r->in.display_name);
2262 } else {
2263 r->in.display_name = NULL;
2265 if (r->in.display_name) {
2266 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2267 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
2268 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
2269 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
2270 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
2271 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));
2273 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
2274 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));
2275 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
2277 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2278 ZERO_STRUCTP(r->out.tag_id);
2280 if (flags & NDR_OUT) {
2281 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2282 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2284 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
2285 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
2286 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
2287 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
2288 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2290 return NDR_ERR_SUCCESS;
2293 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r)
2295 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigW");
2296 ndr->depth++;
2297 if (flags & NDR_SET_VALUES) {
2298 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2300 if (flags & NDR_IN) {
2301 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigW");
2302 ndr->depth++;
2303 ndr_print_ptr(ndr, "handle", r->in.handle);
2304 ndr->depth++;
2305 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2306 ndr->depth--;
2307 ndr_print_uint32(ndr, "type", r->in.type);
2308 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2309 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2310 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
2311 ndr->depth++;
2312 if (r->in.binary_path) {
2313 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2315 ndr->depth--;
2316 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
2317 ndr->depth++;
2318 if (r->in.load_order_group) {
2319 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
2321 ndr->depth--;
2322 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2323 ndr->depth++;
2324 if (r->in.dependencies) {
2325 ndr_print_string(ndr, "dependencies", r->in.dependencies);
2327 ndr->depth--;
2328 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2329 ndr->depth++;
2330 if (r->in.service_start_name) {
2331 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2333 ndr->depth--;
2334 ndr_print_ptr(ndr, "password", r->in.password);
2335 ndr->depth++;
2336 if (r->in.password) {
2337 ndr_print_string(ndr, "password", r->in.password);
2339 ndr->depth--;
2340 ndr_print_ptr(ndr, "display_name", r->in.display_name);
2341 ndr->depth++;
2342 if (r->in.display_name) {
2343 ndr_print_string(ndr, "display_name", r->in.display_name);
2345 ndr->depth--;
2346 ndr->depth--;
2348 if (flags & NDR_OUT) {
2349 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigW");
2350 ndr->depth++;
2351 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
2352 ndr->depth++;
2353 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
2354 ndr->depth--;
2355 ndr_print_WERROR(ndr, "result", r->out.result);
2356 ndr->depth--;
2358 ndr->depth--;
2361 static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
2363 if (flags & NDR_IN) {
2364 if (r->in.scmanager_handle == NULL) {
2365 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2367 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2371 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2372 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
2373 if (r->in.DisplayName) {
2374 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2377 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2379 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
2380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2381 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2382 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2386 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));
2387 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
2388 if (r->in.LoadOrderGroupKey) {
2389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2392 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2394 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.TagId));
2395 if (r->in.TagId) {
2396 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.TagId));
2398 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2399 if (r->in.dependencies) {
2400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
2401 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, r->in.dependencies_size));
2403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
2404 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2405 if (r->in.service_start_name) {
2406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2409 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));
2411 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2412 if (r->in.password) {
2413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
2414 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.password, r->in.password_size));
2416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
2418 if (flags & NDR_OUT) {
2419 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
2420 if (r->out.TagId) {
2421 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
2423 if (r->out.handle == NULL) {
2424 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2426 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2427 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2429 return NDR_ERR_SUCCESS;
2432 static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
2434 uint32_t _ptr_DisplayName;
2435 uint32_t _ptr_LoadOrderGroupKey;
2436 uint32_t _ptr_TagId;
2437 uint32_t _ptr_dependencies;
2438 uint32_t _ptr_service_start_name;
2439 uint32_t _ptr_password;
2440 TALLOC_CTX *_mem_save_scmanager_handle_0;
2441 TALLOC_CTX *_mem_save_DisplayName_0;
2442 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
2443 TALLOC_CTX *_mem_save_TagId_0;
2444 TALLOC_CTX *_mem_save_dependencies_0;
2445 TALLOC_CTX *_mem_save_service_start_name_0;
2446 TALLOC_CTX *_mem_save_password_0;
2447 TALLOC_CTX *_mem_save_handle_0;
2448 if (flags & NDR_IN) {
2449 ZERO_STRUCT(r->out);
2451 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2452 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
2454 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2455 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
2456 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2457 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
2458 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
2459 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
2460 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
2461 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));
2463 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
2464 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
2465 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
2466 if (_ptr_DisplayName) {
2467 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
2468 } else {
2469 r->in.DisplayName = NULL;
2471 if (r->in.DisplayName) {
2472 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2473 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
2474 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
2475 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
2476 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
2477 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));
2479 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
2480 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
2481 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
2483 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
2484 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2485 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2486 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2487 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2488 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2489 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2490 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));
2492 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2493 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));
2494 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
2495 if (_ptr_LoadOrderGroupKey) {
2496 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
2497 } else {
2498 r->in.LoadOrderGroupKey = NULL;
2500 if (r->in.LoadOrderGroupKey) {
2501 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
2502 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
2503 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
2504 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
2505 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
2506 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));
2508 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
2509 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
2510 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
2512 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2513 if (_ptr_TagId) {
2514 NDR_PULL_ALLOC(ndr, r->in.TagId);
2515 } else {
2516 r->in.TagId = NULL;
2518 if (r->in.TagId) {
2519 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2520 NDR_PULL_SET_MEM_CTX(ndr, r->in.TagId, 0);
2521 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.TagId));
2522 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2524 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2525 if (_ptr_dependencies) {
2526 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2527 } else {
2528 r->in.dependencies = NULL;
2530 if (r->in.dependencies) {
2531 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2532 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2533 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2534 NDR_PULL_ALLOC_N(ndr, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies));
2535 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies)));
2536 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dependencies_size));
2539 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2540 if (_ptr_service_start_name) {
2541 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2542 } else {
2543 r->in.service_start_name = NULL;
2545 if (r->in.service_start_name) {
2546 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2547 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2548 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2549 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2550 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2551 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));
2553 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2554 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));
2555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2557 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2558 if (_ptr_password) {
2559 NDR_PULL_ALLOC(ndr, r->in.password);
2560 } else {
2561 r->in.password = NULL;
2563 if (r->in.password) {
2564 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2565 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2566 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2567 NDR_PULL_ALLOC_N(ndr, r->in.password, ndr_get_array_size(ndr, &r->in.password));
2568 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.password, ndr_get_array_size(ndr, &r->in.password)));
2569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.password_size));
2572 NDR_PULL_ALLOC(ndr, r->out.handle);
2573 ZERO_STRUCTP(r->out.handle);
2574 if (r->in.dependencies) {
2575 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.dependencies, r->in.dependencies_size));
2577 if (r->in.password) {
2578 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.password, r->in.password_size));
2581 if (flags & NDR_OUT) {
2582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2583 if (_ptr_TagId) {
2584 NDR_PULL_ALLOC(ndr, r->out.TagId);
2585 } else {
2586 r->out.TagId = NULL;
2588 if (r->out.TagId) {
2589 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2590 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
2591 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
2592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2594 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2595 NDR_PULL_ALLOC(ndr, r->out.handle);
2597 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2598 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2599 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2600 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2601 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2603 return NDR_ERR_SUCCESS;
2606 _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r)
2608 ndr_print_struct(ndr, name, "svcctl_CreateServiceW");
2609 ndr->depth++;
2610 if (flags & NDR_SET_VALUES) {
2611 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2613 if (flags & NDR_IN) {
2614 ndr_print_struct(ndr, "in", "svcctl_CreateServiceW");
2615 ndr->depth++;
2616 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
2617 ndr->depth++;
2618 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
2619 ndr->depth--;
2620 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
2621 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
2622 ndr->depth++;
2623 if (r->in.DisplayName) {
2624 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
2626 ndr->depth--;
2627 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
2628 ndr_print_uint32(ndr, "type", r->in.type);
2629 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2630 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2631 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2632 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2633 ndr->depth++;
2634 if (r->in.LoadOrderGroupKey) {
2635 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2637 ndr->depth--;
2638 ndr_print_ptr(ndr, "TagId", r->in.TagId);
2639 ndr->depth++;
2640 if (r->in.TagId) {
2641 ndr_print_uint32(ndr, "TagId", *r->in.TagId);
2643 ndr->depth--;
2644 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2645 ndr->depth++;
2646 if (r->in.dependencies) {
2647 ndr_print_array_uint8(ndr, "dependencies", r->in.dependencies, r->in.dependencies_size);
2649 ndr->depth--;
2650 ndr_print_uint32(ndr, "dependencies_size", r->in.dependencies_size);
2651 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2652 ndr->depth++;
2653 if (r->in.service_start_name) {
2654 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2656 ndr->depth--;
2657 ndr_print_ptr(ndr, "password", r->in.password);
2658 ndr->depth++;
2659 if (r->in.password) {
2660 ndr_print_array_uint8(ndr, "password", r->in.password, r->in.password_size);
2662 ndr->depth--;
2663 ndr_print_uint32(ndr, "password_size", r->in.password_size);
2664 ndr->depth--;
2666 if (flags & NDR_OUT) {
2667 ndr_print_struct(ndr, "out", "svcctl_CreateServiceW");
2668 ndr->depth++;
2669 ndr_print_ptr(ndr, "TagId", r->out.TagId);
2670 ndr->depth++;
2671 if (r->out.TagId) {
2672 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
2674 ndr->depth--;
2675 ndr_print_ptr(ndr, "handle", r->out.handle);
2676 ndr->depth++;
2677 ndr_print_policy_handle(ndr, "handle", r->out.handle);
2678 ndr->depth--;
2679 ndr_print_WERROR(ndr, "result", r->out.result);
2680 ndr->depth--;
2682 ndr->depth--;
2685 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
2687 if (flags & NDR_IN) {
2688 if (r->in.service == NULL) {
2689 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2691 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
2692 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
2693 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2695 if (flags & NDR_OUT) {
2696 if (r->out.service_status == NULL) {
2697 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2699 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2700 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.offered));
2701 if (r->out.needed == NULL) {
2702 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2705 if (r->out.services_returned == NULL) {
2706 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2708 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2709 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2711 return NDR_ERR_SUCCESS;
2714 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
2716 TALLOC_CTX *_mem_save_service_0;
2717 TALLOC_CTX *_mem_save_needed_0;
2718 TALLOC_CTX *_mem_save_services_returned_0;
2719 if (flags & NDR_IN) {
2720 ZERO_STRUCT(r->out);
2722 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2723 NDR_PULL_ALLOC(ndr, r->in.service);
2725 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
2726 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
2727 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
2728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
2729 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
2730 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2731 if (r->in.offered > 0x40000) {
2732 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2734 NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.offered);
2735 memset(r->out.service_status, 0, (r->in.offered) * sizeof(*r->out.service_status));
2736 NDR_PULL_ALLOC(ndr, r->out.needed);
2737 ZERO_STRUCTP(r->out.needed);
2738 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2739 ZERO_STRUCTP(r->out.services_returned);
2741 if (flags & NDR_OUT) {
2742 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service_status));
2743 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2744 NDR_PULL_ALLOC_N(ndr, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status));
2746 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status)));
2747 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2748 NDR_PULL_ALLOC(ndr, r->out.needed);
2750 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2751 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2752 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2753 if (*r->out.needed > 0x40000) {
2754 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2756 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2757 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2758 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2760 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
2761 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
2762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
2763 if (*r->out.services_returned > 0x40000) {
2764 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2766 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
2767 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2768 if (r->out.service_status) {
2769 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service_status, r->in.offered));
2772 return NDR_ERR_SUCCESS;
2775 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r)
2777 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesW");
2778 ndr->depth++;
2779 if (flags & NDR_SET_VALUES) {
2780 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2782 if (flags & NDR_IN) {
2783 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesW");
2784 ndr->depth++;
2785 ndr_print_ptr(ndr, "service", r->in.service);
2786 ndr->depth++;
2787 ndr_print_policy_handle(ndr, "service", r->in.service);
2788 ndr->depth--;
2789 ndr_print_uint32(ndr, "state", r->in.state);
2790 ndr_print_uint32(ndr, "offered", r->in.offered);
2791 ndr->depth--;
2793 if (flags & NDR_OUT) {
2794 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesW");
2795 ndr->depth++;
2796 ndr_print_ptr(ndr, "service_status", r->out.service_status);
2797 ndr->depth++;
2798 ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.offered);
2799 ndr->depth--;
2800 ndr_print_ptr(ndr, "needed", r->out.needed);
2801 ndr->depth++;
2802 ndr_print_uint32(ndr, "needed", *r->out.needed);
2803 ndr->depth--;
2804 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
2805 ndr->depth++;
2806 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
2807 ndr->depth--;
2808 ndr_print_WERROR(ndr, "result", r->out.result);
2809 ndr->depth--;
2811 ndr->depth--;
2814 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
2816 if (flags & NDR_IN) {
2817 if (r->in.handle == NULL) {
2818 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2820 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2822 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
2823 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2824 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
2825 if (r->in.resume_handle) {
2826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
2829 if (flags & NDR_OUT) {
2830 if (r->out.service == NULL) {
2831 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2834 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
2835 if (r->out.needed == NULL) {
2836 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2839 if (r->out.services_returned == NULL) {
2840 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2843 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
2844 if (r->out.resume_handle) {
2845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
2847 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2849 return NDR_ERR_SUCCESS;
2852 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
2854 uint32_t _ptr_resume_handle;
2855 TALLOC_CTX *_mem_save_handle_0;
2856 TALLOC_CTX *_mem_save_needed_0;
2857 TALLOC_CTX *_mem_save_services_returned_0;
2858 TALLOC_CTX *_mem_save_resume_handle_0;
2859 if (flags & NDR_IN) {
2860 ZERO_STRUCT(r->out);
2862 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2863 NDR_PULL_ALLOC(ndr, r->in.handle);
2865 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2866 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2867 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2868 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2869 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2870 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
2871 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2872 if (r->in.offered > 0x40000) {
2873 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2875 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
2876 if (_ptr_resume_handle) {
2877 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
2878 } else {
2879 r->in.resume_handle = NULL;
2881 if (r->in.resume_handle) {
2882 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2883 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
2884 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
2885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
2887 NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.offered);
2888 memset(r->out.service, 0, (r->in.offered) * sizeof(*r->out.service));
2889 NDR_PULL_ALLOC(ndr, r->out.needed);
2890 ZERO_STRUCTP(r->out.needed);
2891 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2892 ZERO_STRUCTP(r->out.services_returned);
2894 if (flags & NDR_OUT) {
2895 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
2896 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2897 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
2899 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
2900 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2901 NDR_PULL_ALLOC(ndr, r->out.needed);
2903 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2904 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2905 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2906 if (*r->out.needed > 0x40000) {
2907 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2909 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2910 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2911 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2913 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
2914 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
2915 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
2916 if (*r->out.services_returned > 0x40000) {
2917 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
2920 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
2921 if (_ptr_resume_handle) {
2922 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
2923 } else {
2924 r->out.resume_handle = NULL;
2926 if (r->out.resume_handle) {
2927 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2928 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
2929 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
2930 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
2932 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2933 if (r->out.service) {
2934 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
2937 return NDR_ERR_SUCCESS;
2940 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r)
2942 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusW");
2943 ndr->depth++;
2944 if (flags & NDR_SET_VALUES) {
2945 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2947 if (flags & NDR_IN) {
2948 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusW");
2949 ndr->depth++;
2950 ndr_print_ptr(ndr, "handle", r->in.handle);
2951 ndr->depth++;
2952 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2953 ndr->depth--;
2954 ndr_print_uint32(ndr, "type", r->in.type);
2955 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
2956 ndr_print_uint32(ndr, "offered", r->in.offered);
2957 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
2958 ndr->depth++;
2959 if (r->in.resume_handle) {
2960 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
2962 ndr->depth--;
2963 ndr->depth--;
2965 if (flags & NDR_OUT) {
2966 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
2967 ndr->depth++;
2968 ndr_print_ptr(ndr, "service", r->out.service);
2969 ndr->depth++;
2970 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
2971 ndr->depth--;
2972 ndr_print_ptr(ndr, "needed", r->out.needed);
2973 ndr->depth++;
2974 ndr_print_uint32(ndr, "needed", *r->out.needed);
2975 ndr->depth--;
2976 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
2977 ndr->depth++;
2978 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
2979 ndr->depth--;
2980 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
2981 ndr->depth++;
2982 if (r->out.resume_handle) {
2983 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
2985 ndr->depth--;
2986 ndr_print_WERROR(ndr, "result", r->out.result);
2987 ndr->depth--;
2989 ndr->depth--;
2992 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
2994 if (flags & NDR_IN) {
2995 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
2996 if (r->in.MachineName) {
2997 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
2998 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2999 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3000 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3002 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
3003 if (r->in.DatabaseName) {
3004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3005 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3007 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3009 NDR_CHECK(ndr_push_svcctl_MgrAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3011 if (flags & NDR_OUT) {
3012 if (r->out.handle == NULL) {
3013 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3015 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3016 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3018 return NDR_ERR_SUCCESS;
3021 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
3023 uint32_t _ptr_MachineName;
3024 uint32_t _ptr_DatabaseName;
3025 TALLOC_CTX *_mem_save_MachineName_0;
3026 TALLOC_CTX *_mem_save_DatabaseName_0;
3027 TALLOC_CTX *_mem_save_handle_0;
3028 if (flags & NDR_IN) {
3029 ZERO_STRUCT(r->out);
3031 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
3032 if (_ptr_MachineName) {
3033 NDR_PULL_ALLOC(ndr, r->in.MachineName);
3034 } else {
3035 r->in.MachineName = NULL;
3037 if (r->in.MachineName) {
3038 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3039 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
3040 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
3041 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
3042 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
3043 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));
3045 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
3046 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
3047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
3049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
3050 if (_ptr_DatabaseName) {
3051 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
3052 } else {
3053 r->in.DatabaseName = NULL;
3055 if (r->in.DatabaseName) {
3056 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3057 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
3058 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
3059 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
3060 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
3061 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));
3063 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
3064 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
3065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
3067 NDR_CHECK(ndr_pull_svcctl_MgrAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3068 NDR_PULL_ALLOC(ndr, r->out.handle);
3069 ZERO_STRUCTP(r->out.handle);
3071 if (flags & NDR_OUT) {
3072 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3073 NDR_PULL_ALLOC(ndr, r->out.handle);
3075 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3076 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3077 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3079 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3081 return NDR_ERR_SUCCESS;
3084 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r)
3086 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerW");
3087 ndr->depth++;
3088 if (flags & NDR_SET_VALUES) {
3089 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3091 if (flags & NDR_IN) {
3092 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerW");
3093 ndr->depth++;
3094 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
3095 ndr->depth++;
3096 if (r->in.MachineName) {
3097 ndr_print_string(ndr, "MachineName", r->in.MachineName);
3099 ndr->depth--;
3100 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
3101 ndr->depth++;
3102 if (r->in.DatabaseName) {
3103 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
3105 ndr->depth--;
3106 ndr_print_svcctl_MgrAccessMask(ndr, "access_mask", r->in.access_mask);
3107 ndr->depth--;
3109 if (flags & NDR_OUT) {
3110 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerW");
3111 ndr->depth++;
3112 ndr_print_ptr(ndr, "handle", r->out.handle);
3113 ndr->depth++;
3114 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3115 ndr->depth--;
3116 ndr_print_WERROR(ndr, "result", r->out.result);
3117 ndr->depth--;
3119 ndr->depth--;
3122 static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
3124 if (flags & NDR_IN) {
3125 if (r->in.scmanager_handle == NULL) {
3126 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3128 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3129 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3130 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3132 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3133 NDR_CHECK(ndr_push_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3135 if (flags & NDR_OUT) {
3136 if (r->out.handle == NULL) {
3137 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3139 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3140 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3142 return NDR_ERR_SUCCESS;
3145 static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
3147 TALLOC_CTX *_mem_save_scmanager_handle_0;
3148 TALLOC_CTX *_mem_save_handle_0;
3149 if (flags & NDR_IN) {
3150 ZERO_STRUCT(r->out);
3152 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3153 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
3155 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3156 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
3157 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
3159 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
3160 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
3161 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
3162 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));
3164 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
3165 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
3166 NDR_CHECK(ndr_pull_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3167 NDR_PULL_ALLOC(ndr, r->out.handle);
3168 ZERO_STRUCTP(r->out.handle);
3170 if (flags & NDR_OUT) {
3171 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3172 NDR_PULL_ALLOC(ndr, r->out.handle);
3174 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3175 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3176 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3178 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3180 return NDR_ERR_SUCCESS;
3183 _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r)
3185 ndr_print_struct(ndr, name, "svcctl_OpenServiceW");
3186 ndr->depth++;
3187 if (flags & NDR_SET_VALUES) {
3188 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3190 if (flags & NDR_IN) {
3191 ndr_print_struct(ndr, "in", "svcctl_OpenServiceW");
3192 ndr->depth++;
3193 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
3194 ndr->depth++;
3195 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
3196 ndr->depth--;
3197 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
3198 ndr_print_svcctl_ServiceAccessMask(ndr, "access_mask", r->in.access_mask);
3199 ndr->depth--;
3201 if (flags & NDR_OUT) {
3202 ndr_print_struct(ndr, "out", "svcctl_OpenServiceW");
3203 ndr->depth++;
3204 ndr_print_ptr(ndr, "handle", r->out.handle);
3205 ndr->depth++;
3206 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3207 ndr->depth--;
3208 ndr_print_WERROR(ndr, "result", r->out.result);
3209 ndr->depth--;
3211 ndr->depth--;
3214 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
3216 if (flags & NDR_IN) {
3217 if (r->in.handle == NULL) {
3218 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3220 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3221 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3223 if (flags & NDR_OUT) {
3224 if (r->out.query == NULL) {
3225 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3227 NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3228 if (r->out.needed == NULL) {
3229 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3231 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3232 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3234 return NDR_ERR_SUCCESS;
3237 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
3239 TALLOC_CTX *_mem_save_handle_0;
3240 TALLOC_CTX *_mem_save_query_0;
3241 TALLOC_CTX *_mem_save_needed_0;
3242 if (flags & NDR_IN) {
3243 ZERO_STRUCT(r->out);
3245 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3246 NDR_PULL_ALLOC(ndr, r->in.handle);
3248 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3249 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3250 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3251 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3252 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3253 if (r->in.offered > 8192) {
3254 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3256 NDR_PULL_ALLOC(ndr, r->out.query);
3257 ZERO_STRUCTP(r->out.query);
3258 NDR_PULL_ALLOC(ndr, r->out.needed);
3259 ZERO_STRUCTP(r->out.needed);
3261 if (flags & NDR_OUT) {
3262 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3263 NDR_PULL_ALLOC(ndr, r->out.query);
3265 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
3266 NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
3267 NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3268 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
3269 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3270 NDR_PULL_ALLOC(ndr, r->out.needed);
3272 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3273 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3274 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3275 if (*r->out.needed > 8192) {
3276 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3278 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3279 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3281 return NDR_ERR_SUCCESS;
3284 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r)
3286 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigW");
3287 ndr->depth++;
3288 if (flags & NDR_SET_VALUES) {
3289 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3291 if (flags & NDR_IN) {
3292 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigW");
3293 ndr->depth++;
3294 ndr_print_ptr(ndr, "handle", r->in.handle);
3295 ndr->depth++;
3296 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3297 ndr->depth--;
3298 ndr_print_uint32(ndr, "offered", r->in.offered);
3299 ndr->depth--;
3301 if (flags & NDR_OUT) {
3302 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
3303 ndr->depth++;
3304 ndr_print_ptr(ndr, "query", r->out.query);
3305 ndr->depth++;
3306 ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
3307 ndr->depth--;
3308 ndr_print_ptr(ndr, "needed", r->out.needed);
3309 ndr->depth++;
3310 ndr_print_uint32(ndr, "needed", *r->out.needed);
3311 ndr->depth--;
3312 ndr_print_WERROR(ndr, "result", r->out.result);
3313 ndr->depth--;
3315 ndr->depth--;
3318 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3320 if (flags & NDR_IN) {
3321 if (r->in.handle == NULL) {
3322 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3324 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3327 if (flags & NDR_OUT) {
3328 if (r->out.lock_status == NULL) {
3329 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3331 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3332 if (r->out.needed == NULL) {
3333 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3335 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3336 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3338 return NDR_ERR_SUCCESS;
3341 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
3343 TALLOC_CTX *_mem_save_handle_0;
3344 TALLOC_CTX *_mem_save_lock_status_0;
3345 TALLOC_CTX *_mem_save_needed_0;
3346 if (flags & NDR_IN) {
3347 ZERO_STRUCT(r->out);
3349 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3350 NDR_PULL_ALLOC(ndr, r->in.handle);
3352 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3353 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3354 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3356 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3357 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3358 ZERO_STRUCTP(r->out.lock_status);
3359 NDR_PULL_ALLOC(ndr, r->out.needed);
3360 ZERO_STRUCTP(r->out.needed);
3362 if (flags & NDR_OUT) {
3363 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3364 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3366 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3367 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
3368 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3369 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
3370 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3371 NDR_PULL_ALLOC(ndr, r->out.needed);
3373 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3374 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3375 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3376 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3377 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3379 return NDR_ERR_SUCCESS;
3382 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3384 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusW");
3385 ndr->depth++;
3386 if (flags & NDR_SET_VALUES) {
3387 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3389 if (flags & NDR_IN) {
3390 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusW");
3391 ndr->depth++;
3392 ndr_print_ptr(ndr, "handle", r->in.handle);
3393 ndr->depth++;
3394 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3395 ndr->depth--;
3396 ndr_print_uint32(ndr, "offered", r->in.offered);
3397 ndr->depth--;
3399 if (flags & NDR_OUT) {
3400 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusW");
3401 ndr->depth++;
3402 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
3403 ndr->depth++;
3404 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
3405 ndr->depth--;
3406 ndr_print_ptr(ndr, "needed", r->out.needed);
3407 ndr->depth++;
3408 ndr_print_uint32(ndr, "needed", *r->out.needed);
3409 ndr->depth--;
3410 ndr_print_WERROR(ndr, "result", r->out.result);
3411 ndr->depth--;
3413 ndr->depth--;
3416 static enum ndr_err_code ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
3418 if (flags & NDR_IN) {
3419 if (r->in.handle == NULL) {
3420 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3422 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
3424 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
3425 if (r->in.Arguments) {
3426 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
3427 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3428 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
3429 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3432 if (flags & NDR_OUT) {
3433 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3435 return NDR_ERR_SUCCESS;
3438 static enum ndr_err_code ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
3440 uint32_t _ptr_Arguments;
3441 TALLOC_CTX *_mem_save_handle_0;
3442 TALLOC_CTX *_mem_save_Arguments_0;
3443 if (flags & NDR_IN) {
3444 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3445 NDR_PULL_ALLOC(ndr, r->in.handle);
3447 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3448 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3449 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3450 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3451 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
3452 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
3453 if (_ptr_Arguments) {
3454 NDR_PULL_ALLOC(ndr, r->in.Arguments);
3455 } else {
3456 r->in.Arguments = NULL;
3458 if (r->in.Arguments) {
3459 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
3460 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3461 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
3462 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
3463 if (ndr_get_array_length(ndr, &r->in.Arguments) > ndr_get_array_size(ndr, &r->in.Arguments)) {
3464 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));
3466 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t)));
3467 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t), CH_UTF16));
3468 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
3471 if (flags & NDR_OUT) {
3472 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3474 return NDR_ERR_SUCCESS;
3477 _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r)
3479 ndr_print_struct(ndr, name, "svcctl_StartServiceW");
3480 ndr->depth++;
3481 if (flags & NDR_SET_VALUES) {
3482 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3484 if (flags & NDR_IN) {
3485 ndr_print_struct(ndr, "in", "svcctl_StartServiceW");
3486 ndr->depth++;
3487 ndr_print_ptr(ndr, "handle", r->in.handle);
3488 ndr->depth++;
3489 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3490 ndr->depth--;
3491 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
3492 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
3493 ndr->depth++;
3494 if (r->in.Arguments) {
3495 ndr_print_string(ndr, "Arguments", r->in.Arguments);
3497 ndr->depth--;
3498 ndr->depth--;
3500 if (flags & NDR_OUT) {
3501 ndr_print_struct(ndr, "out", "svcctl_StartServiceW");
3502 ndr->depth++;
3503 ndr_print_WERROR(ndr, "result", r->out.result);
3504 ndr->depth--;
3506 ndr->depth--;
3509 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3511 if (flags & NDR_IN) {
3512 if (r->in.handle == NULL) {
3513 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3515 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3516 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3517 if (r->in.service_name) {
3518 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3521 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));
3523 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3524 if (r->in.display_name_length) {
3525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3528 if (flags & NDR_OUT) {
3529 if (r->out.display_name == NULL) {
3530 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3532 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
3533 if (*r->out.display_name) {
3534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3537 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));
3539 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3540 if (r->out.display_name_length) {
3541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3543 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3545 return NDR_ERR_SUCCESS;
3548 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
3550 uint32_t _ptr_service_name;
3551 uint32_t _ptr_display_name;
3552 uint32_t _ptr_display_name_length;
3553 TALLOC_CTX *_mem_save_handle_0;
3554 TALLOC_CTX *_mem_save_service_name_0;
3555 TALLOC_CTX *_mem_save_display_name_0;
3556 TALLOC_CTX *_mem_save_display_name_1;
3557 TALLOC_CTX *_mem_save_display_name_length_0;
3558 if (flags & NDR_IN) {
3559 ZERO_STRUCT(r->out);
3561 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3562 NDR_PULL_ALLOC(ndr, r->in.handle);
3564 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3565 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3566 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3567 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3568 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3569 if (_ptr_service_name) {
3570 NDR_PULL_ALLOC(ndr, r->in.service_name);
3571 } else {
3572 r->in.service_name = NULL;
3574 if (r->in.service_name) {
3575 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3576 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3577 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3578 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3579 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3580 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));
3582 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3583 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));
3584 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3586 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3587 if (_ptr_display_name_length) {
3588 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3589 } else {
3590 r->in.display_name_length = NULL;
3592 if (r->in.display_name_length) {
3593 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3594 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3595 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3598 NDR_PULL_ALLOC(ndr, r->out.display_name);
3599 ZERO_STRUCTP(r->out.display_name);
3601 if (flags & NDR_OUT) {
3602 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3603 NDR_PULL_ALLOC(ndr, r->out.display_name);
3605 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3606 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
3607 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
3608 if (_ptr_display_name) {
3609 NDR_PULL_ALLOC(ndr, *r->out.display_name);
3610 } else {
3611 *r->out.display_name = NULL;
3613 if (*r->out.display_name) {
3614 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3615 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
3616 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
3617 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
3618 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
3619 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));
3621 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
3622 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));
3623 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
3625 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
3626 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3627 if (_ptr_display_name_length) {
3628 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3629 } else {
3630 r->out.display_name_length = NULL;
3632 if (r->out.display_name_length) {
3633 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3634 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3635 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3636 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3638 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3640 return NDR_ERR_SUCCESS;
3643 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3645 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameW");
3646 ndr->depth++;
3647 if (flags & NDR_SET_VALUES) {
3648 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3650 if (flags & NDR_IN) {
3651 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameW");
3652 ndr->depth++;
3653 ndr_print_ptr(ndr, "handle", r->in.handle);
3654 ndr->depth++;
3655 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3656 ndr->depth--;
3657 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3658 ndr->depth++;
3659 if (r->in.service_name) {
3660 ndr_print_string(ndr, "service_name", r->in.service_name);
3662 ndr->depth--;
3663 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3664 ndr->depth++;
3665 if (r->in.display_name_length) {
3666 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3668 ndr->depth--;
3669 ndr->depth--;
3671 if (flags & NDR_OUT) {
3672 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameW");
3673 ndr->depth++;
3674 ndr_print_ptr(ndr, "display_name", r->out.display_name);
3675 ndr->depth++;
3676 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
3677 ndr->depth++;
3678 if (*r->out.display_name) {
3679 ndr_print_string(ndr, "display_name", *r->out.display_name);
3681 ndr->depth--;
3682 ndr->depth--;
3683 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3684 ndr->depth++;
3685 if (r->out.display_name_length) {
3686 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3688 ndr->depth--;
3689 ndr_print_WERROR(ndr, "result", r->out.result);
3690 ndr->depth--;
3692 ndr->depth--;
3695 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
3697 if (flags & NDR_IN) {
3698 if (r->in.handle == NULL) {
3699 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3701 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3702 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3703 if (r->in.service_name) {
3704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3705 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3706 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3707 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));
3709 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3710 if (r->in.display_name_length) {
3711 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3714 if (flags & NDR_OUT) {
3715 if (r->out.key_name == NULL) {
3716 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3718 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
3719 if (*r->out.key_name) {
3720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3721 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3722 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3723 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));
3725 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3726 if (r->out.display_name_length) {
3727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3729 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3731 return NDR_ERR_SUCCESS;
3734 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
3736 uint32_t _ptr_service_name;
3737 uint32_t _ptr_key_name;
3738 uint32_t _ptr_display_name_length;
3739 TALLOC_CTX *_mem_save_handle_0;
3740 TALLOC_CTX *_mem_save_service_name_0;
3741 TALLOC_CTX *_mem_save_key_name_0;
3742 TALLOC_CTX *_mem_save_key_name_1;
3743 TALLOC_CTX *_mem_save_display_name_length_0;
3744 if (flags & NDR_IN) {
3745 ZERO_STRUCT(r->out);
3747 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3748 NDR_PULL_ALLOC(ndr, r->in.handle);
3750 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3751 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3752 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3753 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3754 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3755 if (_ptr_service_name) {
3756 NDR_PULL_ALLOC(ndr, r->in.service_name);
3757 } else {
3758 r->in.service_name = NULL;
3760 if (r->in.service_name) {
3761 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3762 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3763 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3764 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3765 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3766 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));
3768 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3769 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));
3770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3772 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3773 if (_ptr_display_name_length) {
3774 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3775 } else {
3776 r->in.display_name_length = NULL;
3778 if (r->in.display_name_length) {
3779 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3780 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3781 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3782 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3784 NDR_PULL_ALLOC(ndr, r->out.key_name);
3785 ZERO_STRUCTP(r->out.key_name);
3787 if (flags & NDR_OUT) {
3788 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3789 NDR_PULL_ALLOC(ndr, r->out.key_name);
3791 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3792 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
3793 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
3794 if (_ptr_key_name) {
3795 NDR_PULL_ALLOC(ndr, *r->out.key_name);
3796 } else {
3797 *r->out.key_name = NULL;
3799 if (*r->out.key_name) {
3800 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3801 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
3802 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
3803 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
3804 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
3805 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));
3807 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
3808 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));
3809 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
3811 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
3812 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3813 if (_ptr_display_name_length) {
3814 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3815 } else {
3816 r->out.display_name_length = NULL;
3818 if (r->out.display_name_length) {
3819 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3820 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3824 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3826 return NDR_ERR_SUCCESS;
3829 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r)
3831 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameW");
3832 ndr->depth++;
3833 if (flags & NDR_SET_VALUES) {
3834 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3836 if (flags & NDR_IN) {
3837 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameW");
3838 ndr->depth++;
3839 ndr_print_ptr(ndr, "handle", r->in.handle);
3840 ndr->depth++;
3841 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3842 ndr->depth--;
3843 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3844 ndr->depth++;
3845 if (r->in.service_name) {
3846 ndr_print_string(ndr, "service_name", r->in.service_name);
3848 ndr->depth--;
3849 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3850 ndr->depth++;
3851 if (r->in.display_name_length) {
3852 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3854 ndr->depth--;
3855 ndr->depth--;
3857 if (flags & NDR_OUT) {
3858 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameW");
3859 ndr->depth++;
3860 ndr_print_ptr(ndr, "key_name", r->out.key_name);
3861 ndr->depth++;
3862 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
3863 ndr->depth++;
3864 if (*r->out.key_name) {
3865 ndr_print_string(ndr, "key_name", *r->out.key_name);
3867 ndr->depth--;
3868 ndr->depth--;
3869 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3870 ndr->depth++;
3871 if (r->out.display_name_length) {
3872 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3874 ndr->depth--;
3875 ndr_print_WERROR(ndr, "result", r->out.result);
3876 ndr->depth--;
3878 ndr->depth--;
3881 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
3883 if (flags & NDR_IN) {
3884 if (r->in.handle == NULL) {
3885 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3887 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3888 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
3889 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
3890 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
3892 if (flags & NDR_OUT) {
3893 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3895 return NDR_ERR_SUCCESS;
3898 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
3900 TALLOC_CTX *_mem_save_handle_0;
3901 if (flags & NDR_IN) {
3902 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3903 NDR_PULL_ALLOC(ndr, r->in.handle);
3905 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3906 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3907 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3909 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
3910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
3911 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
3913 if (flags & NDR_OUT) {
3914 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3916 return NDR_ERR_SUCCESS;
3919 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r)
3921 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsA");
3922 ndr->depth++;
3923 if (flags & NDR_SET_VALUES) {
3924 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3926 if (flags & NDR_IN) {
3927 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsA");
3928 ndr->depth++;
3929 ndr_print_ptr(ndr, "handle", r->in.handle);
3930 ndr->depth++;
3931 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3932 ndr->depth--;
3933 ndr_print_uint32(ndr, "bits", r->in.bits);
3934 ndr_print_uint32(ndr, "bitson", r->in.bitson);
3935 ndr_print_uint32(ndr, "immediate", r->in.immediate);
3936 ndr->depth--;
3938 if (flags & NDR_OUT) {
3939 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsA");
3940 ndr->depth++;
3941 ndr_print_WERROR(ndr, "result", r->out.result);
3942 ndr->depth--;
3944 ndr->depth--;
3947 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
3949 if (flags & NDR_IN) {
3950 if (r->in.handle == NULL) {
3951 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3953 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
3955 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
3956 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
3957 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
3958 if (r->in.binary_path) {
3959 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
3960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3961 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
3962 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));
3964 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
3965 if (r->in.load_order_group) {
3966 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
3967 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3968 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
3969 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));
3971 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
3972 if (r->in.dependencies) {
3973 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
3974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3975 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
3976 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3978 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
3979 if (r->in.service_start_name) {
3980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
3981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
3983 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));
3985 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
3986 if (r->in.password) {
3987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
3988 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3989 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
3990 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3992 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
3993 if (r->in.display_name) {
3994 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
3995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3996 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
3997 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));
4000 if (flags & NDR_OUT) {
4001 if (r->out.tag_id == NULL) {
4002 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
4005 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4007 return NDR_ERR_SUCCESS;
4010 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
4012 uint32_t _ptr_binary_path;
4013 uint32_t _ptr_load_order_group;
4014 uint32_t _ptr_dependencies;
4015 uint32_t _ptr_service_start_name;
4016 uint32_t _ptr_password;
4017 uint32_t _ptr_display_name;
4018 TALLOC_CTX *_mem_save_handle_0;
4019 TALLOC_CTX *_mem_save_binary_path_0;
4020 TALLOC_CTX *_mem_save_load_order_group_0;
4021 TALLOC_CTX *_mem_save_tag_id_0;
4022 TALLOC_CTX *_mem_save_dependencies_0;
4023 TALLOC_CTX *_mem_save_service_start_name_0;
4024 TALLOC_CTX *_mem_save_password_0;
4025 TALLOC_CTX *_mem_save_display_name_0;
4026 if (flags & NDR_IN) {
4027 ZERO_STRUCT(r->out);
4029 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4030 NDR_PULL_ALLOC(ndr, r->in.handle);
4032 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4033 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4034 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4035 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4036 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4037 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4038 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4039 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4040 if (_ptr_binary_path) {
4041 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4042 } else {
4043 r->in.binary_path = NULL;
4045 if (r->in.binary_path) {
4046 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4047 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4048 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4049 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4050 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4051 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));
4053 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4054 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));
4055 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4057 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
4058 if (_ptr_load_order_group) {
4059 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
4060 } else {
4061 r->in.load_order_group = NULL;
4063 if (r->in.load_order_group) {
4064 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4065 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
4066 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
4067 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
4068 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
4069 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));
4071 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
4072 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));
4073 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
4075 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4076 if (_ptr_dependencies) {
4077 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4078 } else {
4079 r->in.dependencies = NULL;
4081 if (r->in.dependencies) {
4082 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4083 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4084 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4085 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4086 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4087 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));
4089 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4090 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4091 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4093 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4094 if (_ptr_service_start_name) {
4095 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4096 } else {
4097 r->in.service_start_name = NULL;
4099 if (r->in.service_start_name) {
4100 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4101 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4102 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4103 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4104 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4105 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));
4107 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4108 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));
4109 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4111 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4112 if (_ptr_password) {
4113 NDR_PULL_ALLOC(ndr, r->in.password);
4114 } else {
4115 r->in.password = NULL;
4117 if (r->in.password) {
4118 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4119 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4120 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4121 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4122 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4123 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));
4125 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4126 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4127 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4129 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
4130 if (_ptr_display_name) {
4131 NDR_PULL_ALLOC(ndr, r->in.display_name);
4132 } else {
4133 r->in.display_name = NULL;
4135 if (r->in.display_name) {
4136 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4137 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
4138 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
4139 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
4140 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
4141 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));
4143 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
4144 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));
4145 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
4147 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4148 ZERO_STRUCTP(r->out.tag_id);
4150 if (flags & NDR_OUT) {
4151 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4152 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4154 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
4155 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
4156 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
4157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
4158 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4160 return NDR_ERR_SUCCESS;
4163 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r)
4165 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigA");
4166 ndr->depth++;
4167 if (flags & NDR_SET_VALUES) {
4168 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4170 if (flags & NDR_IN) {
4171 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigA");
4172 ndr->depth++;
4173 ndr_print_ptr(ndr, "handle", r->in.handle);
4174 ndr->depth++;
4175 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4176 ndr->depth--;
4177 ndr_print_uint32(ndr, "type", r->in.type);
4178 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4179 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4180 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4181 ndr->depth++;
4182 if (r->in.binary_path) {
4183 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4185 ndr->depth--;
4186 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
4187 ndr->depth++;
4188 if (r->in.load_order_group) {
4189 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
4191 ndr->depth--;
4192 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4193 ndr->depth++;
4194 if (r->in.dependencies) {
4195 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4197 ndr->depth--;
4198 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4199 ndr->depth++;
4200 if (r->in.service_start_name) {
4201 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4203 ndr->depth--;
4204 ndr_print_ptr(ndr, "password", r->in.password);
4205 ndr->depth++;
4206 if (r->in.password) {
4207 ndr_print_string(ndr, "password", r->in.password);
4209 ndr->depth--;
4210 ndr_print_ptr(ndr, "display_name", r->in.display_name);
4211 ndr->depth++;
4212 if (r->in.display_name) {
4213 ndr_print_string(ndr, "display_name", r->in.display_name);
4215 ndr->depth--;
4216 ndr->depth--;
4218 if (flags & NDR_OUT) {
4219 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigA");
4220 ndr->depth++;
4221 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
4222 ndr->depth++;
4223 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
4224 ndr->depth--;
4225 ndr_print_WERROR(ndr, "result", r->out.result);
4226 ndr->depth--;
4228 ndr->depth--;
4231 static enum ndr_err_code ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
4233 if (flags & NDR_IN) {
4234 if (r->in.handle == NULL) {
4235 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4237 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4238 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
4239 if (r->in.ServiceName) {
4240 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4243 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4245 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
4246 if (r->in.DisplayName) {
4247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4249 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4250 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
4253 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4254 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4255 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4256 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4257 if (r->in.binary_path) {
4258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4261 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));
4263 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
4264 if (r->in.LoadOrderGroupKey) {
4265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4268 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4270 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4271 if (r->in.dependencies) {
4272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4275 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4277 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4278 if (r->in.service_start_name) {
4279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4282 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));
4284 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4285 if (r->in.password) {
4286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4289 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4292 if (flags & NDR_OUT) {
4293 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
4294 if (r->out.TagId) {
4295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
4297 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4299 return NDR_ERR_SUCCESS;
4302 static enum ndr_err_code ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
4304 uint32_t _ptr_ServiceName;
4305 uint32_t _ptr_DisplayName;
4306 uint32_t _ptr_binary_path;
4307 uint32_t _ptr_LoadOrderGroupKey;
4308 uint32_t _ptr_TagId;
4309 uint32_t _ptr_dependencies;
4310 uint32_t _ptr_service_start_name;
4311 uint32_t _ptr_password;
4312 TALLOC_CTX *_mem_save_handle_0;
4313 TALLOC_CTX *_mem_save_ServiceName_0;
4314 TALLOC_CTX *_mem_save_DisplayName_0;
4315 TALLOC_CTX *_mem_save_binary_path_0;
4316 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
4317 TALLOC_CTX *_mem_save_TagId_0;
4318 TALLOC_CTX *_mem_save_dependencies_0;
4319 TALLOC_CTX *_mem_save_service_start_name_0;
4320 TALLOC_CTX *_mem_save_password_0;
4321 if (flags & NDR_IN) {
4322 ZERO_STRUCT(r->out);
4324 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4325 NDR_PULL_ALLOC(ndr, r->in.handle);
4327 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4328 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4329 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4330 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4331 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
4332 if (_ptr_ServiceName) {
4333 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
4334 } else {
4335 r->in.ServiceName = NULL;
4337 if (r->in.ServiceName) {
4338 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4339 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
4340 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
4341 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
4342 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
4343 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));
4345 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
4346 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
4347 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
4349 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
4350 if (_ptr_DisplayName) {
4351 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
4352 } else {
4353 r->in.DisplayName = NULL;
4355 if (r->in.DisplayName) {
4356 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4357 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
4358 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
4359 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
4360 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
4361 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));
4363 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
4364 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
4365 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
4367 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
4368 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4369 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4370 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4371 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4372 if (_ptr_binary_path) {
4373 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4374 } else {
4375 r->in.binary_path = NULL;
4377 if (r->in.binary_path) {
4378 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4379 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4380 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4381 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4382 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4383 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));
4385 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4386 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));
4387 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4389 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
4390 if (_ptr_LoadOrderGroupKey) {
4391 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
4392 } else {
4393 r->in.LoadOrderGroupKey = NULL;
4395 if (r->in.LoadOrderGroupKey) {
4396 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
4397 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
4398 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
4399 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
4400 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
4401 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));
4403 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
4404 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
4405 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
4407 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4408 if (_ptr_dependencies) {
4409 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4410 } else {
4411 r->in.dependencies = NULL;
4413 if (r->in.dependencies) {
4414 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4415 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4416 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4417 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4418 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4419 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));
4421 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4422 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4426 if (_ptr_service_start_name) {
4427 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4428 } else {
4429 r->in.service_start_name = NULL;
4431 if (r->in.service_start_name) {
4432 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4433 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4434 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4435 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4436 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4437 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));
4439 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4440 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));
4441 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4443 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4444 if (_ptr_password) {
4445 NDR_PULL_ALLOC(ndr, r->in.password);
4446 } else {
4447 r->in.password = NULL;
4449 if (r->in.password) {
4450 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4451 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4452 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4453 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4454 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4455 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));
4457 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4458 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4459 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4462 if (flags & NDR_OUT) {
4463 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
4464 if (_ptr_TagId) {
4465 NDR_PULL_ALLOC(ndr, r->out.TagId);
4466 } else {
4467 r->out.TagId = NULL;
4469 if (r->out.TagId) {
4470 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
4471 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
4472 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
4473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
4475 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4477 return NDR_ERR_SUCCESS;
4480 _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r)
4482 ndr_print_struct(ndr, name, "svcctl_CreateServiceA");
4483 ndr->depth++;
4484 if (flags & NDR_SET_VALUES) {
4485 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4487 if (flags & NDR_IN) {
4488 ndr_print_struct(ndr, "in", "svcctl_CreateServiceA");
4489 ndr->depth++;
4490 ndr_print_ptr(ndr, "handle", r->in.handle);
4491 ndr->depth++;
4492 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4493 ndr->depth--;
4494 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
4495 ndr->depth++;
4496 if (r->in.ServiceName) {
4497 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
4499 ndr->depth--;
4500 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
4501 ndr->depth++;
4502 if (r->in.DisplayName) {
4503 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
4505 ndr->depth--;
4506 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
4507 ndr_print_uint32(ndr, "type", r->in.type);
4508 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4509 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4510 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4511 ndr->depth++;
4512 if (r->in.binary_path) {
4513 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4515 ndr->depth--;
4516 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4517 ndr->depth++;
4518 if (r->in.LoadOrderGroupKey) {
4519 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4521 ndr->depth--;
4522 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4523 ndr->depth++;
4524 if (r->in.dependencies) {
4525 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4527 ndr->depth--;
4528 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4529 ndr->depth++;
4530 if (r->in.service_start_name) {
4531 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4533 ndr->depth--;
4534 ndr_print_ptr(ndr, "password", r->in.password);
4535 ndr->depth++;
4536 if (r->in.password) {
4537 ndr_print_string(ndr, "password", r->in.password);
4539 ndr->depth--;
4540 ndr->depth--;
4542 if (flags & NDR_OUT) {
4543 ndr_print_struct(ndr, "out", "svcctl_CreateServiceA");
4544 ndr->depth++;
4545 ndr_print_ptr(ndr, "TagId", r->out.TagId);
4546 ndr->depth++;
4547 if (r->out.TagId) {
4548 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
4550 ndr->depth--;
4551 ndr_print_WERROR(ndr, "result", r->out.result);
4552 ndr->depth--;
4554 ndr->depth--;
4557 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
4559 if (flags & NDR_IN) {
4560 if (r->in.service == NULL) {
4561 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4563 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
4564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.state));
4565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4567 if (flags & NDR_OUT) {
4568 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status));
4569 if (r->out.service_status) {
4570 NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4572 if (r->out.needed == NULL) {
4573 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4576 if (r->out.services_returned == NULL) {
4577 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4580 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4582 return NDR_ERR_SUCCESS;
4585 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
4587 uint32_t _ptr_service_status;
4588 TALLOC_CTX *_mem_save_service_0;
4589 TALLOC_CTX *_mem_save_service_status_0;
4590 TALLOC_CTX *_mem_save_needed_0;
4591 TALLOC_CTX *_mem_save_services_returned_0;
4592 if (flags & NDR_IN) {
4593 ZERO_STRUCT(r->out);
4595 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4596 NDR_PULL_ALLOC(ndr, r->in.service);
4598 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
4599 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
4600 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
4601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
4602 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.state));
4603 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4604 NDR_PULL_ALLOC(ndr, r->out.needed);
4605 ZERO_STRUCTP(r->out.needed);
4606 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4607 ZERO_STRUCTP(r->out.services_returned);
4609 if (flags & NDR_OUT) {
4610 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_status));
4611 if (_ptr_service_status) {
4612 NDR_PULL_ALLOC(ndr, r->out.service_status);
4613 } else {
4614 r->out.service_status = NULL;
4616 if (r->out.service_status) {
4617 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
4618 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, 0);
4619 NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4620 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
4622 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4623 NDR_PULL_ALLOC(ndr, r->out.needed);
4625 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4626 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4628 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4629 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4630 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4632 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4633 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4634 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4636 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4638 return NDR_ERR_SUCCESS;
4641 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r)
4643 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesA");
4644 ndr->depth++;
4645 if (flags & NDR_SET_VALUES) {
4646 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4648 if (flags & NDR_IN) {
4649 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesA");
4650 ndr->depth++;
4651 ndr_print_ptr(ndr, "service", r->in.service);
4652 ndr->depth++;
4653 ndr_print_policy_handle(ndr, "service", r->in.service);
4654 ndr->depth--;
4655 ndr_print_uint32(ndr, "state", r->in.state);
4656 ndr_print_uint32(ndr, "offered", r->in.offered);
4657 ndr->depth--;
4659 if (flags & NDR_OUT) {
4660 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesA");
4661 ndr->depth++;
4662 ndr_print_ptr(ndr, "service_status", r->out.service_status);
4663 ndr->depth++;
4664 if (r->out.service_status) {
4665 ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status);
4667 ndr->depth--;
4668 ndr_print_ptr(ndr, "needed", r->out.needed);
4669 ndr->depth++;
4670 ndr_print_uint32(ndr, "needed", *r->out.needed);
4671 ndr->depth--;
4672 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4673 ndr->depth++;
4674 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4675 ndr->depth--;
4676 ndr_print_WERROR(ndr, "result", r->out.result);
4677 ndr->depth--;
4679 ndr->depth--;
4682 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
4684 if (flags & NDR_IN) {
4685 if (r->in.handle == NULL) {
4686 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4688 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4690 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
4691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4692 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
4693 if (r->in.resume_handle) {
4694 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
4697 if (flags & NDR_OUT) {
4698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4699 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
4700 if (r->out.needed == NULL) {
4701 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4704 if (r->out.services_returned == NULL) {
4705 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4707 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4708 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
4709 if (r->out.resume_handle) {
4710 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
4712 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4714 return NDR_ERR_SUCCESS;
4717 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
4719 uint32_t _ptr_resume_handle;
4720 TALLOC_CTX *_mem_save_handle_0;
4721 TALLOC_CTX *_mem_save_needed_0;
4722 TALLOC_CTX *_mem_save_services_returned_0;
4723 TALLOC_CTX *_mem_save_resume_handle_0;
4724 if (flags & NDR_IN) {
4725 ZERO_STRUCT(r->out);
4727 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4728 NDR_PULL_ALLOC(ndr, r->in.handle);
4730 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4731 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4732 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4733 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4734 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4735 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
4736 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4737 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4738 if (_ptr_resume_handle) {
4739 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
4740 } else {
4741 r->in.resume_handle = NULL;
4743 if (r->in.resume_handle) {
4744 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4745 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
4746 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
4747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4749 NDR_PULL_ALLOC(ndr, r->out.needed);
4750 ZERO_STRUCTP(r->out.needed);
4751 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4752 ZERO_STRUCTP(r->out.services_returned);
4754 if (flags & NDR_OUT) {
4755 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
4756 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
4757 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
4758 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4759 NDR_PULL_ALLOC(ndr, r->out.needed);
4761 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4762 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4764 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4765 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4766 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4768 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4769 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4770 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4771 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4772 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4773 if (_ptr_resume_handle) {
4774 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
4775 } else {
4776 r->out.resume_handle = NULL;
4778 if (r->out.resume_handle) {
4779 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4780 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
4781 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
4782 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4784 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4785 if (r->out.service) {
4786 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
4789 return NDR_ERR_SUCCESS;
4792 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r)
4794 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusA");
4795 ndr->depth++;
4796 if (flags & NDR_SET_VALUES) {
4797 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4799 if (flags & NDR_IN) {
4800 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusA");
4801 ndr->depth++;
4802 ndr_print_ptr(ndr, "handle", r->in.handle);
4803 ndr->depth++;
4804 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4805 ndr->depth--;
4806 ndr_print_uint32(ndr, "type", r->in.type);
4807 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
4808 ndr_print_uint32(ndr, "offered", r->in.offered);
4809 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
4810 ndr->depth++;
4811 if (r->in.resume_handle) {
4812 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
4814 ndr->depth--;
4815 ndr->depth--;
4817 if (flags & NDR_OUT) {
4818 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
4819 ndr->depth++;
4820 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
4821 ndr_print_ptr(ndr, "needed", r->out.needed);
4822 ndr->depth++;
4823 ndr_print_uint32(ndr, "needed", *r->out.needed);
4824 ndr->depth--;
4825 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4826 ndr->depth++;
4827 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4828 ndr->depth--;
4829 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
4830 ndr->depth++;
4831 if (r->out.resume_handle) {
4832 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
4834 ndr->depth--;
4835 ndr_print_WERROR(ndr, "result", r->out.result);
4836 ndr->depth--;
4838 ndr->depth--;
4841 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
4843 if (flags & NDR_IN) {
4844 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
4845 if (r->in.MachineName) {
4846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4849 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4851 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
4852 if (r->in.DatabaseName) {
4853 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4854 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4855 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4856 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4858 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
4860 if (flags & NDR_OUT) {
4861 if (r->out.handle == NULL) {
4862 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4864 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4865 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4867 return NDR_ERR_SUCCESS;
4870 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
4872 uint32_t _ptr_MachineName;
4873 uint32_t _ptr_DatabaseName;
4874 TALLOC_CTX *_mem_save_MachineName_0;
4875 TALLOC_CTX *_mem_save_DatabaseName_0;
4876 TALLOC_CTX *_mem_save_handle_0;
4877 if (flags & NDR_IN) {
4878 ZERO_STRUCT(r->out);
4880 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
4881 if (_ptr_MachineName) {
4882 NDR_PULL_ALLOC(ndr, r->in.MachineName);
4883 } else {
4884 r->in.MachineName = NULL;
4886 if (r->in.MachineName) {
4887 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4888 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
4889 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
4890 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
4891 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
4892 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));
4894 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
4895 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
4896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
4898 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
4899 if (_ptr_DatabaseName) {
4900 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
4901 } else {
4902 r->in.DatabaseName = NULL;
4904 if (r->in.DatabaseName) {
4905 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4906 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
4907 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
4908 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
4909 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
4910 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));
4912 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
4913 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
4914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
4916 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
4917 NDR_PULL_ALLOC(ndr, r->out.handle);
4918 ZERO_STRUCTP(r->out.handle);
4920 if (flags & NDR_OUT) {
4921 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4922 NDR_PULL_ALLOC(ndr, r->out.handle);
4924 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4925 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
4926 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4928 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4930 return NDR_ERR_SUCCESS;
4933 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r)
4935 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerA");
4936 ndr->depth++;
4937 if (flags & NDR_SET_VALUES) {
4938 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4940 if (flags & NDR_IN) {
4941 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerA");
4942 ndr->depth++;
4943 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
4944 ndr->depth++;
4945 if (r->in.MachineName) {
4946 ndr_print_string(ndr, "MachineName", r->in.MachineName);
4948 ndr->depth--;
4949 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
4950 ndr->depth++;
4951 if (r->in.DatabaseName) {
4952 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
4954 ndr->depth--;
4955 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
4956 ndr->depth--;
4958 if (flags & NDR_OUT) {
4959 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerA");
4960 ndr->depth++;
4961 ndr_print_ptr(ndr, "handle", r->out.handle);
4962 ndr->depth++;
4963 ndr_print_policy_handle(ndr, "handle", r->out.handle);
4964 ndr->depth--;
4965 ndr_print_WERROR(ndr, "result", r->out.result);
4966 ndr->depth--;
4968 ndr->depth--;
4971 static enum ndr_err_code ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
4973 if (flags & NDR_IN) {
4974 if (r->in.scmanager_handle == NULL) {
4975 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4977 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
4978 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
4979 if (r->in.ServiceName) {
4980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4983 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4985 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
4987 if (flags & NDR_OUT) {
4988 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4990 return NDR_ERR_SUCCESS;
4993 static enum ndr_err_code ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
4995 uint32_t _ptr_ServiceName;
4996 TALLOC_CTX *_mem_save_scmanager_handle_0;
4997 TALLOC_CTX *_mem_save_ServiceName_0;
4998 if (flags & NDR_IN) {
4999 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5000 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5002 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5003 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
5004 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5005 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
5006 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
5007 if (_ptr_ServiceName) {
5008 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
5009 } else {
5010 r->in.ServiceName = NULL;
5012 if (r->in.ServiceName) {
5013 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5014 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
5015 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
5016 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
5017 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
5018 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));
5020 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
5021 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
5022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
5024 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5026 if (flags & NDR_OUT) {
5027 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5029 return NDR_ERR_SUCCESS;
5032 _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r)
5034 ndr_print_struct(ndr, name, "svcctl_OpenServiceA");
5035 ndr->depth++;
5036 if (flags & NDR_SET_VALUES) {
5037 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5039 if (flags & NDR_IN) {
5040 ndr_print_struct(ndr, "in", "svcctl_OpenServiceA");
5041 ndr->depth++;
5042 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
5043 ndr->depth++;
5044 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
5045 ndr->depth--;
5046 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
5047 ndr->depth++;
5048 if (r->in.ServiceName) {
5049 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5051 ndr->depth--;
5052 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5053 ndr->depth--;
5055 if (flags & NDR_OUT) {
5056 ndr_print_struct(ndr, "out", "svcctl_OpenServiceA");
5057 ndr->depth++;
5058 ndr_print_WERROR(ndr, "result", r->out.result);
5059 ndr->depth--;
5061 ndr->depth--;
5064 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
5066 if (flags & NDR_IN) {
5067 if (r->in.handle == NULL) {
5068 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5070 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5073 if (flags & NDR_OUT) {
5074 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5075 if (r->out.needed == NULL) {
5076 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5079 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5081 return NDR_ERR_SUCCESS;
5084 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
5086 TALLOC_CTX *_mem_save_handle_0;
5087 TALLOC_CTX *_mem_save_needed_0;
5088 if (flags & NDR_IN) {
5089 ZERO_STRUCT(r->out);
5091 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5092 NDR_PULL_ALLOC(ndr, r->in.handle);
5094 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5095 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5096 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5098 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5099 NDR_PULL_ALLOC(ndr, r->out.needed);
5100 ZERO_STRUCTP(r->out.needed);
5102 if (flags & NDR_OUT) {
5103 NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.offered);
5104 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5105 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5106 NDR_PULL_ALLOC(ndr, r->out.needed);
5108 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5109 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5110 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5112 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5114 return NDR_ERR_SUCCESS;
5117 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r)
5119 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigA");
5120 ndr->depth++;
5121 if (flags & NDR_SET_VALUES) {
5122 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5124 if (flags & NDR_IN) {
5125 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigA");
5126 ndr->depth++;
5127 ndr_print_ptr(ndr, "handle", r->in.handle);
5128 ndr->depth++;
5129 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5130 ndr->depth--;
5131 ndr_print_uint32(ndr, "offered", r->in.offered);
5132 ndr->depth--;
5134 if (flags & NDR_OUT) {
5135 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
5136 ndr->depth++;
5137 ndr_print_array_uint8(ndr, "query", r->out.query, r->in.offered);
5138 ndr_print_ptr(ndr, "needed", r->out.needed);
5139 ndr->depth++;
5140 ndr_print_uint32(ndr, "needed", *r->out.needed);
5141 ndr->depth--;
5142 ndr_print_WERROR(ndr, "result", r->out.result);
5143 ndr->depth--;
5145 ndr->depth--;
5148 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5150 if (flags & NDR_IN) {
5151 if (r->in.handle == NULL) {
5152 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5154 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5157 if (flags & NDR_OUT) {
5158 if (r->out.lock_status == NULL) {
5159 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5161 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5162 if (r->out.needed == NULL) {
5163 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5166 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5168 return NDR_ERR_SUCCESS;
5171 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
5173 TALLOC_CTX *_mem_save_handle_0;
5174 TALLOC_CTX *_mem_save_lock_status_0;
5175 TALLOC_CTX *_mem_save_needed_0;
5176 if (flags & NDR_IN) {
5177 ZERO_STRUCT(r->out);
5179 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5180 NDR_PULL_ALLOC(ndr, r->in.handle);
5182 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5183 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5184 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5185 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5186 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5187 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5188 ZERO_STRUCTP(r->out.lock_status);
5189 NDR_PULL_ALLOC(ndr, r->out.needed);
5190 ZERO_STRUCTP(r->out.needed);
5192 if (flags & NDR_OUT) {
5193 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5194 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5196 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5197 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
5198 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
5200 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5201 NDR_PULL_ALLOC(ndr, r->out.needed);
5203 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5204 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5206 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5207 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5209 return NDR_ERR_SUCCESS;
5212 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5214 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusA");
5215 ndr->depth++;
5216 if (flags & NDR_SET_VALUES) {
5217 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5219 if (flags & NDR_IN) {
5220 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusA");
5221 ndr->depth++;
5222 ndr_print_ptr(ndr, "handle", r->in.handle);
5223 ndr->depth++;
5224 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5225 ndr->depth--;
5226 ndr_print_uint32(ndr, "offered", r->in.offered);
5227 ndr->depth--;
5229 if (flags & NDR_OUT) {
5230 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusA");
5231 ndr->depth++;
5232 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
5233 ndr->depth++;
5234 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
5235 ndr->depth--;
5236 ndr_print_ptr(ndr, "needed", r->out.needed);
5237 ndr->depth++;
5238 ndr_print_uint32(ndr, "needed", *r->out.needed);
5239 ndr->depth--;
5240 ndr_print_WERROR(ndr, "result", r->out.result);
5241 ndr->depth--;
5243 ndr->depth--;
5246 static enum ndr_err_code ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
5248 if (flags & NDR_IN) {
5249 if (r->in.handle == NULL) {
5250 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5252 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5253 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
5254 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
5255 if (r->in.Arguments) {
5256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5259 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5262 if (flags & NDR_OUT) {
5263 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5265 return NDR_ERR_SUCCESS;
5268 static enum ndr_err_code ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
5270 uint32_t _ptr_Arguments;
5271 TALLOC_CTX *_mem_save_handle_0;
5272 TALLOC_CTX *_mem_save_Arguments_0;
5273 if (flags & NDR_IN) {
5274 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5275 NDR_PULL_ALLOC(ndr, r->in.handle);
5277 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5278 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5279 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5281 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
5282 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
5283 if (_ptr_Arguments) {
5284 NDR_PULL_ALLOC(ndr, r->in.Arguments);
5285 } else {
5286 r->in.Arguments = NULL;
5288 if (r->in.Arguments) {
5289 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
5290 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
5291 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
5292 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
5293 if (ndr_get_array_length(ndr, &r->in.Arguments) > ndr_get_array_size(ndr, &r->in.Arguments)) {
5294 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));
5296 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t)));
5297 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t), CH_UTF16));
5298 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
5301 if (flags & NDR_OUT) {
5302 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5304 return NDR_ERR_SUCCESS;
5307 _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r)
5309 ndr_print_struct(ndr, name, "svcctl_StartServiceA");
5310 ndr->depth++;
5311 if (flags & NDR_SET_VALUES) {
5312 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5314 if (flags & NDR_IN) {
5315 ndr_print_struct(ndr, "in", "svcctl_StartServiceA");
5316 ndr->depth++;
5317 ndr_print_ptr(ndr, "handle", r->in.handle);
5318 ndr->depth++;
5319 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5320 ndr->depth--;
5321 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
5322 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
5323 ndr->depth++;
5324 if (r->in.Arguments) {
5325 ndr_print_string(ndr, "Arguments", r->in.Arguments);
5327 ndr->depth--;
5328 ndr->depth--;
5330 if (flags & NDR_OUT) {
5331 ndr_print_struct(ndr, "out", "svcctl_StartServiceA");
5332 ndr->depth++;
5333 ndr_print_WERROR(ndr, "result", r->out.result);
5334 ndr->depth--;
5336 ndr->depth--;
5339 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5341 if (flags & NDR_IN) {
5342 if (r->in.handle == NULL) {
5343 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5345 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5346 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5347 if (r->in.service_name) {
5348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5351 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));
5353 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5354 if (r->in.display_name_length) {
5355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5358 if (flags & NDR_OUT) {
5359 if (r->out.display_name == NULL) {
5360 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5362 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
5363 if (*r->out.display_name) {
5364 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5367 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));
5369 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5370 if (r->out.display_name_length) {
5371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5373 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5375 return NDR_ERR_SUCCESS;
5378 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
5380 uint32_t _ptr_service_name;
5381 uint32_t _ptr_display_name;
5382 uint32_t _ptr_display_name_length;
5383 TALLOC_CTX *_mem_save_handle_0;
5384 TALLOC_CTX *_mem_save_service_name_0;
5385 TALLOC_CTX *_mem_save_display_name_0;
5386 TALLOC_CTX *_mem_save_display_name_1;
5387 TALLOC_CTX *_mem_save_display_name_length_0;
5388 if (flags & NDR_IN) {
5389 ZERO_STRUCT(r->out);
5391 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5392 NDR_PULL_ALLOC(ndr, r->in.handle);
5394 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5395 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5396 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5397 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5398 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5399 if (_ptr_service_name) {
5400 NDR_PULL_ALLOC(ndr, r->in.service_name);
5401 } else {
5402 r->in.service_name = NULL;
5404 if (r->in.service_name) {
5405 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5406 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5407 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5408 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5409 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5410 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));
5412 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5413 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));
5414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5416 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5417 if (_ptr_display_name_length) {
5418 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5419 } else {
5420 r->in.display_name_length = NULL;
5422 if (r->in.display_name_length) {
5423 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5424 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5426 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5428 NDR_PULL_ALLOC(ndr, r->out.display_name);
5429 ZERO_STRUCTP(r->out.display_name);
5431 if (flags & NDR_OUT) {
5432 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5433 NDR_PULL_ALLOC(ndr, r->out.display_name);
5435 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5436 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
5437 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
5438 if (_ptr_display_name) {
5439 NDR_PULL_ALLOC(ndr, *r->out.display_name);
5440 } else {
5441 *r->out.display_name = NULL;
5443 if (*r->out.display_name) {
5444 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5445 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
5446 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
5447 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
5448 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
5449 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));
5451 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
5452 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));
5453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
5455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
5456 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5457 if (_ptr_display_name_length) {
5458 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5459 } else {
5460 r->out.display_name_length = NULL;
5462 if (r->out.display_name_length) {
5463 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5464 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5465 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5468 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5470 return NDR_ERR_SUCCESS;
5473 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5475 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameA");
5476 ndr->depth++;
5477 if (flags & NDR_SET_VALUES) {
5478 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5480 if (flags & NDR_IN) {
5481 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameA");
5482 ndr->depth++;
5483 ndr_print_ptr(ndr, "handle", r->in.handle);
5484 ndr->depth++;
5485 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5486 ndr->depth--;
5487 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5488 ndr->depth++;
5489 if (r->in.service_name) {
5490 ndr_print_string(ndr, "service_name", r->in.service_name);
5492 ndr->depth--;
5493 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5494 ndr->depth++;
5495 if (r->in.display_name_length) {
5496 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5498 ndr->depth--;
5499 ndr->depth--;
5501 if (flags & NDR_OUT) {
5502 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameA");
5503 ndr->depth++;
5504 ndr_print_ptr(ndr, "display_name", r->out.display_name);
5505 ndr->depth++;
5506 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
5507 ndr->depth++;
5508 if (*r->out.display_name) {
5509 ndr_print_string(ndr, "display_name", *r->out.display_name);
5511 ndr->depth--;
5512 ndr->depth--;
5513 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5514 ndr->depth++;
5515 if (r->out.display_name_length) {
5516 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5518 ndr->depth--;
5519 ndr_print_WERROR(ndr, "result", r->out.result);
5520 ndr->depth--;
5522 ndr->depth--;
5525 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
5527 if (flags & NDR_IN) {
5528 if (r->in.handle == NULL) {
5529 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5531 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5532 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5533 if (r->in.service_name) {
5534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5537 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));
5539 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5540 if (r->in.display_name_length) {
5541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5544 if (flags & NDR_OUT) {
5545 if (r->out.key_name == NULL) {
5546 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5548 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
5549 if (*r->out.key_name) {
5550 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5552 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5553 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));
5555 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5556 if (r->out.display_name_length) {
5557 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5559 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5561 return NDR_ERR_SUCCESS;
5564 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
5566 uint32_t _ptr_service_name;
5567 uint32_t _ptr_key_name;
5568 uint32_t _ptr_display_name_length;
5569 TALLOC_CTX *_mem_save_handle_0;
5570 TALLOC_CTX *_mem_save_service_name_0;
5571 TALLOC_CTX *_mem_save_key_name_0;
5572 TALLOC_CTX *_mem_save_key_name_1;
5573 TALLOC_CTX *_mem_save_display_name_length_0;
5574 if (flags & NDR_IN) {
5575 ZERO_STRUCT(r->out);
5577 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5578 NDR_PULL_ALLOC(ndr, r->in.handle);
5580 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5581 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5582 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5583 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5584 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5585 if (_ptr_service_name) {
5586 NDR_PULL_ALLOC(ndr, r->in.service_name);
5587 } else {
5588 r->in.service_name = NULL;
5590 if (r->in.service_name) {
5591 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5592 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5593 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5594 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5595 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5596 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));
5598 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5599 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));
5600 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5603 if (_ptr_display_name_length) {
5604 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5605 } else {
5606 r->in.display_name_length = NULL;
5608 if (r->in.display_name_length) {
5609 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5610 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5611 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5612 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5614 NDR_PULL_ALLOC(ndr, r->out.key_name);
5615 ZERO_STRUCTP(r->out.key_name);
5617 if (flags & NDR_OUT) {
5618 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5619 NDR_PULL_ALLOC(ndr, r->out.key_name);
5621 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5622 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
5623 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
5624 if (_ptr_key_name) {
5625 NDR_PULL_ALLOC(ndr, *r->out.key_name);
5626 } else {
5627 *r->out.key_name = NULL;
5629 if (*r->out.key_name) {
5630 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5631 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
5632 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
5633 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
5634 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
5635 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));
5637 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
5638 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));
5639 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
5641 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
5642 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5643 if (_ptr_display_name_length) {
5644 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5645 } else {
5646 r->out.display_name_length = NULL;
5648 if (r->out.display_name_length) {
5649 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5650 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5651 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5654 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5656 return NDR_ERR_SUCCESS;
5659 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r)
5661 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameA");
5662 ndr->depth++;
5663 if (flags & NDR_SET_VALUES) {
5664 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5666 if (flags & NDR_IN) {
5667 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameA");
5668 ndr->depth++;
5669 ndr_print_ptr(ndr, "handle", r->in.handle);
5670 ndr->depth++;
5671 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5672 ndr->depth--;
5673 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5674 ndr->depth++;
5675 if (r->in.service_name) {
5676 ndr_print_string(ndr, "service_name", r->in.service_name);
5678 ndr->depth--;
5679 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5680 ndr->depth++;
5681 if (r->in.display_name_length) {
5682 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5684 ndr->depth--;
5685 ndr->depth--;
5687 if (flags & NDR_OUT) {
5688 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameA");
5689 ndr->depth++;
5690 ndr_print_ptr(ndr, "key_name", r->out.key_name);
5691 ndr->depth++;
5692 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
5693 ndr->depth++;
5694 if (*r->out.key_name) {
5695 ndr_print_string(ndr, "key_name", *r->out.key_name);
5697 ndr->depth--;
5698 ndr->depth--;
5699 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5700 ndr->depth++;
5701 if (r->out.display_name_length) {
5702 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5704 ndr->depth--;
5705 ndr_print_WERROR(ndr, "result", r->out.result);
5706 ndr->depth--;
5708 ndr->depth--;
5711 static enum ndr_err_code ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5713 if (flags & NDR_IN) {
5715 if (flags & NDR_OUT) {
5716 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5718 return NDR_ERR_SUCCESS;
5721 static enum ndr_err_code ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
5723 if (flags & NDR_IN) {
5725 if (flags & NDR_OUT) {
5726 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5728 return NDR_ERR_SUCCESS;
5731 _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5733 ndr_print_struct(ndr, name, "svcctl_GetCurrentGroupeStateW");
5734 ndr->depth++;
5735 if (flags & NDR_SET_VALUES) {
5736 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5738 if (flags & NDR_IN) {
5739 ndr_print_struct(ndr, "in", "svcctl_GetCurrentGroupeStateW");
5740 ndr->depth++;
5741 ndr->depth--;
5743 if (flags & NDR_OUT) {
5744 ndr_print_struct(ndr, "out", "svcctl_GetCurrentGroupeStateW");
5745 ndr->depth++;
5746 ndr_print_WERROR(ndr, "result", r->out.result);
5747 ndr->depth--;
5749 ndr->depth--;
5752 static enum ndr_err_code ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
5754 if (flags & NDR_IN) {
5756 if (flags & NDR_OUT) {
5757 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5759 return NDR_ERR_SUCCESS;
5762 static enum ndr_err_code ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
5764 if (flags & NDR_IN) {
5766 if (flags & NDR_OUT) {
5767 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5769 return NDR_ERR_SUCCESS;
5772 _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r)
5774 ndr_print_struct(ndr, name, "svcctl_EnumServiceGroupW");
5775 ndr->depth++;
5776 if (flags & NDR_SET_VALUES) {
5777 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5779 if (flags & NDR_IN) {
5780 ndr_print_struct(ndr, "in", "svcctl_EnumServiceGroupW");
5781 ndr->depth++;
5782 ndr->depth--;
5784 if (flags & NDR_OUT) {
5785 ndr_print_struct(ndr, "out", "svcctl_EnumServiceGroupW");
5786 ndr->depth++;
5787 ndr_print_WERROR(ndr, "result", r->out.result);
5788 ndr->depth--;
5790 ndr->depth--;
5793 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5795 if (flags & NDR_IN) {
5796 if (r->in.handle == NULL) {
5797 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5799 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5801 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5802 if (r->in.info) {
5803 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
5806 if (flags & NDR_OUT) {
5807 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5809 return NDR_ERR_SUCCESS;
5812 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
5814 uint32_t _ptr_info;
5815 TALLOC_CTX *_mem_save_handle_0;
5816 TALLOC_CTX *_mem_save_info_0;
5817 if (flags & NDR_IN) {
5818 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5819 NDR_PULL_ALLOC(ndr, r->in.handle);
5821 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5822 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5823 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5824 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5825 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
5826 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5827 if (_ptr_info) {
5828 NDR_PULL_ALLOC(ndr, r->in.info);
5829 } else {
5830 r->in.info = NULL;
5832 if (r->in.info) {
5833 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5834 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5835 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
5836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5839 if (flags & NDR_OUT) {
5840 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5842 return NDR_ERR_SUCCESS;
5845 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5847 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2A");
5848 ndr->depth++;
5849 if (flags & NDR_SET_VALUES) {
5850 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5852 if (flags & NDR_IN) {
5853 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2A");
5854 ndr->depth++;
5855 ndr_print_ptr(ndr, "handle", r->in.handle);
5856 ndr->depth++;
5857 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5858 ndr->depth--;
5859 ndr_print_uint32(ndr, "info_level", r->in.info_level);
5860 ndr_print_ptr(ndr, "info", r->in.info);
5861 ndr->depth++;
5862 if (r->in.info) {
5863 ndr_print_uint8(ndr, "info", *r->in.info);
5865 ndr->depth--;
5866 ndr->depth--;
5868 if (flags & NDR_OUT) {
5869 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2A");
5870 ndr->depth++;
5871 ndr_print_WERROR(ndr, "result", r->out.result);
5872 ndr->depth--;
5874 ndr->depth--;
5877 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
5879 if (flags & NDR_IN) {
5880 if (r->in.handle == NULL) {
5881 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5883 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5884 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5885 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5886 if (r->in.info) {
5887 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
5890 if (flags & NDR_OUT) {
5891 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5893 return NDR_ERR_SUCCESS;
5896 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
5898 uint32_t _ptr_info;
5899 TALLOC_CTX *_mem_save_handle_0;
5900 TALLOC_CTX *_mem_save_info_0;
5901 if (flags & NDR_IN) {
5902 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5903 NDR_PULL_ALLOC(ndr, r->in.handle);
5905 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5906 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5907 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5909 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
5910 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5911 if (_ptr_info) {
5912 NDR_PULL_ALLOC(ndr, r->in.info);
5913 } else {
5914 r->in.info = NULL;
5916 if (r->in.info) {
5917 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5918 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5919 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
5920 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5923 if (flags & NDR_OUT) {
5924 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5926 return NDR_ERR_SUCCESS;
5929 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r)
5931 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2W");
5932 ndr->depth++;
5933 if (flags & NDR_SET_VALUES) {
5934 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5936 if (flags & NDR_IN) {
5937 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2W");
5938 ndr->depth++;
5939 ndr_print_ptr(ndr, "handle", r->in.handle);
5940 ndr->depth++;
5941 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5942 ndr->depth--;
5943 ndr_print_uint32(ndr, "info_level", r->in.info_level);
5944 ndr_print_ptr(ndr, "info", r->in.info);
5945 ndr->depth++;
5946 if (r->in.info) {
5947 ndr_print_uint8(ndr, "info", *r->in.info);
5949 ndr->depth--;
5950 ndr->depth--;
5952 if (flags & NDR_OUT) {
5953 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2W");
5954 ndr->depth++;
5955 ndr_print_WERROR(ndr, "result", r->out.result);
5956 ndr->depth--;
5958 ndr->depth--;
5961 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
5963 if (flags & NDR_IN) {
5964 if (r->in.handle == NULL) {
5965 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5967 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5968 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
5969 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5971 if (flags & NDR_OUT) {
5972 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
5973 if (r->out.needed == NULL) {
5974 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5976 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5977 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5979 return NDR_ERR_SUCCESS;
5982 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
5984 TALLOC_CTX *_mem_save_handle_0;
5985 TALLOC_CTX *_mem_save_needed_0;
5986 if (flags & NDR_IN) {
5987 ZERO_STRUCT(r->out);
5989 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5990 NDR_PULL_ALLOC(ndr, r->in.handle);
5992 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5993 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5994 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5995 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5996 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
5997 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5998 NDR_PULL_ALLOC(ndr, r->out.needed);
5999 ZERO_STRUCTP(r->out.needed);
6001 if (flags & NDR_OUT) {
6002 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6003 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6004 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6005 NDR_PULL_ALLOC(ndr, r->out.needed);
6007 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6008 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6011 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6013 return NDR_ERR_SUCCESS;
6016 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r)
6018 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2A");
6019 ndr->depth++;
6020 if (flags & NDR_SET_VALUES) {
6021 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6023 if (flags & NDR_IN) {
6024 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2A");
6025 ndr->depth++;
6026 ndr_print_ptr(ndr, "handle", r->in.handle);
6027 ndr->depth++;
6028 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6029 ndr->depth--;
6030 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6031 ndr_print_uint32(ndr, "offered", r->in.offered);
6032 ndr->depth--;
6034 if (flags & NDR_OUT) {
6035 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
6036 ndr->depth++;
6037 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6038 ndr_print_ptr(ndr, "needed", r->out.needed);
6039 ndr->depth++;
6040 ndr_print_uint32(ndr, "needed", *r->out.needed);
6041 ndr->depth--;
6042 ndr_print_WERROR(ndr, "result", r->out.result);
6043 ndr->depth--;
6045 ndr->depth--;
6048 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
6050 if (flags & NDR_IN) {
6051 if (r->in.handle == NULL) {
6052 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6054 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6055 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6058 if (flags & NDR_OUT) {
6059 if (r->out.buffer == NULL) {
6060 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6063 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6064 if (r->out.needed == NULL) {
6065 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6067 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6068 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6070 return NDR_ERR_SUCCESS;
6073 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
6075 TALLOC_CTX *_mem_save_handle_0;
6076 TALLOC_CTX *_mem_save_needed_0;
6077 if (flags & NDR_IN) {
6078 ZERO_STRUCT(r->out);
6080 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6081 NDR_PULL_ALLOC(ndr, r->in.handle);
6083 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6084 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6085 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6086 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6087 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6088 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6089 if (r->in.offered > 8192) {
6090 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6092 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6093 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6094 NDR_PULL_ALLOC(ndr, r->out.needed);
6095 ZERO_STRUCTP(r->out.needed);
6097 if (flags & NDR_OUT) {
6098 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6099 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6100 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6102 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6103 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6104 NDR_PULL_ALLOC(ndr, r->out.needed);
6106 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6107 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6109 if (*r->out.needed > 8192) {
6110 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6112 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6113 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6114 if (r->out.buffer) {
6115 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6118 return NDR_ERR_SUCCESS;
6121 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r)
6123 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2W");
6124 ndr->depth++;
6125 if (flags & NDR_SET_VALUES) {
6126 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6128 if (flags & NDR_IN) {
6129 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2W");
6130 ndr->depth++;
6131 ndr_print_ptr(ndr, "handle", r->in.handle);
6132 ndr->depth++;
6133 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6134 ndr->depth--;
6135 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6136 ndr_print_uint32(ndr, "offered", r->in.offered);
6137 ndr->depth--;
6139 if (flags & NDR_OUT) {
6140 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
6141 ndr->depth++;
6142 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6143 ndr->depth++;
6144 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6145 ndr->depth--;
6146 ndr_print_ptr(ndr, "needed", r->out.needed);
6147 ndr->depth++;
6148 ndr_print_uint32(ndr, "needed", *r->out.needed);
6149 ndr->depth--;
6150 ndr_print_WERROR(ndr, "result", r->out.result);
6151 ndr->depth--;
6153 ndr->depth--;
6156 static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
6158 if (flags & NDR_IN) {
6159 if (r->in.handle == NULL) {
6160 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6162 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6163 NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr, NDR_SCALARS, r->in.info_level));
6164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6166 if (flags & NDR_OUT) {
6167 if (r->out.buffer == NULL) {
6168 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6171 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6172 if (r->out.needed == NULL) {
6173 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6176 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6178 return NDR_ERR_SUCCESS;
6181 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
6183 TALLOC_CTX *_mem_save_handle_0;
6184 TALLOC_CTX *_mem_save_needed_0;
6185 if (flags & NDR_IN) {
6186 ZERO_STRUCT(r->out);
6188 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6189 NDR_PULL_ALLOC(ndr, r->in.handle);
6191 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6192 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6193 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6194 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6195 NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
6196 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6197 if (r->in.offered > 8192) {
6198 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6200 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6201 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6202 NDR_PULL_ALLOC(ndr, r->out.needed);
6203 ZERO_STRUCTP(r->out.needed);
6205 if (flags & NDR_OUT) {
6206 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6207 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6208 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6210 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6211 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6212 NDR_PULL_ALLOC(ndr, r->out.needed);
6214 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6215 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6217 if (*r->out.needed > 8192) {
6218 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6221 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6222 if (r->out.buffer) {
6223 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6226 return NDR_ERR_SUCCESS;
6229 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r)
6231 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatusEx");
6232 ndr->depth++;
6233 if (flags & NDR_SET_VALUES) {
6234 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6236 if (flags & NDR_IN) {
6237 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatusEx");
6238 ndr->depth++;
6239 ndr_print_ptr(ndr, "handle", r->in.handle);
6240 ndr->depth++;
6241 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6242 ndr->depth--;
6243 ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
6244 ndr_print_uint32(ndr, "offered", r->in.offered);
6245 ndr->depth--;
6247 if (flags & NDR_OUT) {
6248 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
6249 ndr->depth++;
6250 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6251 ndr->depth++;
6252 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6253 ndr->depth--;
6254 ndr_print_ptr(ndr, "needed", r->out.needed);
6255 ndr->depth++;
6256 ndr_print_uint32(ndr, "needed", *r->out.needed);
6257 ndr->depth--;
6258 ndr_print_WERROR(ndr, "result", r->out.result);
6259 ndr->depth--;
6261 ndr->depth--;
6264 static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
6266 if (flags & NDR_IN) {
6267 if (r->in.scmanager == NULL) {
6268 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6270 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6273 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6275 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6276 if (r->in.resume_handle) {
6277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6280 if (flags & NDR_OUT) {
6281 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6282 if (r->out.needed == NULL) {
6283 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6286 if (r->out.service_returned == NULL) {
6287 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6290 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6291 if (r->out.resume_handle) {
6292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6294 if (r->out.group_name == NULL) {
6295 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6297 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name));
6298 if (*r->out.group_name) {
6299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6301 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6302 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));
6304 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6306 return NDR_ERR_SUCCESS;
6309 static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
6311 uint32_t _ptr_resume_handle;
6312 uint32_t _ptr_group_name;
6313 TALLOC_CTX *_mem_save_scmanager_0;
6314 TALLOC_CTX *_mem_save_needed_0;
6315 TALLOC_CTX *_mem_save_service_returned_0;
6316 TALLOC_CTX *_mem_save_resume_handle_0;
6317 TALLOC_CTX *_mem_save_group_name_0;
6318 TALLOC_CTX *_mem_save_group_name_1;
6319 if (flags & NDR_IN) {
6320 ZERO_STRUCT(r->out);
6322 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6323 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6325 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6326 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6327 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6331 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6333 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6334 if (_ptr_resume_handle) {
6335 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6336 } else {
6337 r->in.resume_handle = NULL;
6339 if (r->in.resume_handle) {
6340 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6341 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6342 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6345 NDR_PULL_ALLOC(ndr, r->out.needed);
6346 ZERO_STRUCTP(r->out.needed);
6347 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6348 ZERO_STRUCTP(r->out.service_returned);
6349 NDR_PULL_ALLOC(ndr, r->out.group_name);
6350 ZERO_STRUCTP(r->out.group_name);
6352 if (flags & NDR_OUT) {
6353 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6354 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6355 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6356 NDR_PULL_ALLOC(ndr, r->out.needed);
6358 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6359 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6360 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6362 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6363 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6365 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6366 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6367 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6368 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6369 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6370 if (_ptr_resume_handle) {
6371 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6372 } else {
6373 r->out.resume_handle = NULL;
6375 if (r->out.resume_handle) {
6376 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6377 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6378 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6379 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6381 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6382 NDR_PULL_ALLOC(ndr, r->out.group_name);
6384 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6385 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
6386 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6387 if (_ptr_group_name) {
6388 NDR_PULL_ALLOC(ndr, *r->out.group_name);
6389 } else {
6390 *r->out.group_name = NULL;
6392 if (*r->out.group_name) {
6393 _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6394 NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0);
6395 NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
6396 NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
6397 if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) {
6398 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));
6400 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t)));
6401 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));
6402 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0);
6404 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
6405 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6407 return NDR_ERR_SUCCESS;
6410 _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r)
6412 ndr_print_struct(ndr, name, "EnumServicesStatusExA");
6413 ndr->depth++;
6414 if (flags & NDR_SET_VALUES) {
6415 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6417 if (flags & NDR_IN) {
6418 ndr_print_struct(ndr, "in", "EnumServicesStatusExA");
6419 ndr->depth++;
6420 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6421 ndr->depth++;
6422 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6423 ndr->depth--;
6424 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6425 ndr_print_uint32(ndr, "type", r->in.type);
6426 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6427 ndr_print_uint32(ndr, "offered", r->in.offered);
6428 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6429 ndr->depth++;
6430 if (r->in.resume_handle) {
6431 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6433 ndr->depth--;
6434 ndr->depth--;
6436 if (flags & NDR_OUT) {
6437 ndr_print_struct(ndr, "out", "EnumServicesStatusExA");
6438 ndr->depth++;
6439 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6440 ndr_print_ptr(ndr, "needed", r->out.needed);
6441 ndr->depth++;
6442 ndr_print_uint32(ndr, "needed", *r->out.needed);
6443 ndr->depth--;
6444 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6445 ndr->depth++;
6446 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6447 ndr->depth--;
6448 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6449 ndr->depth++;
6450 if (r->out.resume_handle) {
6451 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6453 ndr->depth--;
6454 ndr_print_ptr(ndr, "group_name", r->out.group_name);
6455 ndr->depth++;
6456 ndr_print_ptr(ndr, "group_name", *r->out.group_name);
6457 ndr->depth++;
6458 if (*r->out.group_name) {
6459 ndr_print_string(ndr, "group_name", *r->out.group_name);
6461 ndr->depth--;
6462 ndr->depth--;
6463 ndr_print_WERROR(ndr, "result", r->out.result);
6464 ndr->depth--;
6466 ndr->depth--;
6469 static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
6471 if (flags & NDR_IN) {
6472 if (r->in.scmanager == NULL) {
6473 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6475 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6478 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6480 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6481 if (r->in.resume_handle) {
6482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6484 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.group_name));
6485 if (r->in.group_name) {
6486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6488 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6489 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));
6492 if (flags & NDR_OUT) {
6493 if (r->out.services == NULL) {
6494 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6497 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6498 if (r->out.needed == NULL) {
6499 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6502 if (r->out.service_returned == NULL) {
6503 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6506 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6507 if (r->out.resume_handle) {
6508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6510 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6512 return NDR_ERR_SUCCESS;
6515 static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
6517 uint32_t _ptr_resume_handle;
6518 uint32_t _ptr_group_name;
6519 TALLOC_CTX *_mem_save_scmanager_0;
6520 TALLOC_CTX *_mem_save_needed_0;
6521 TALLOC_CTX *_mem_save_service_returned_0;
6522 TALLOC_CTX *_mem_save_resume_handle_0;
6523 TALLOC_CTX *_mem_save_group_name_0;
6524 if (flags & NDR_IN) {
6525 ZERO_STRUCT(r->out);
6527 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6528 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6530 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6531 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6532 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6533 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6534 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6535 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6536 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6537 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6538 if (r->in.offered > 0x40000) {
6539 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6541 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6542 if (_ptr_resume_handle) {
6543 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6544 } else {
6545 r->in.resume_handle = NULL;
6547 if (r->in.resume_handle) {
6548 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6549 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6550 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6551 if (*r->in.resume_handle > 0x40000) {
6552 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6554 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6556 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6557 if (_ptr_group_name) {
6558 NDR_PULL_ALLOC(ndr, r->in.group_name);
6559 } else {
6560 r->in.group_name = NULL;
6562 if (r->in.group_name) {
6563 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6564 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_name, 0);
6565 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.group_name));
6566 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.group_name));
6567 if (ndr_get_array_length(ndr, &r->in.group_name) > ndr_get_array_size(ndr, &r->in.group_name)) {
6568 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));
6570 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.group_name), sizeof(uint16_t)));
6571 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));
6572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
6574 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6575 memset(r->out.services, 0, (r->in.offered) * sizeof(*r->out.services));
6576 NDR_PULL_ALLOC(ndr, r->out.needed);
6577 ZERO_STRUCTP(r->out.needed);
6578 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6579 ZERO_STRUCTP(r->out.service_returned);
6581 if (flags & NDR_OUT) {
6582 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.services));
6583 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6584 NDR_PULL_ALLOC_N(ndr, r->out.services, ndr_get_array_size(ndr, &r->out.services));
6586 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, ndr_get_array_size(ndr, &r->out.services)));
6587 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6588 NDR_PULL_ALLOC(ndr, r->out.needed);
6590 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6591 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6592 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6593 if (*r->out.needed > 0x40000) {
6594 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6597 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6598 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6600 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6601 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6602 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6603 if (*r->out.service_returned > 0x40000) {
6604 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6606 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6607 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6608 if (_ptr_resume_handle) {
6609 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6610 } else {
6611 r->out.resume_handle = NULL;
6613 if (r->out.resume_handle) {
6614 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6615 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6616 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6617 if (*r->out.resume_handle > 0x40000) {
6618 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6620 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6622 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6623 if (r->out.services) {
6624 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.services, r->in.offered));
6627 return NDR_ERR_SUCCESS;
6630 _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r)
6632 ndr_print_struct(ndr, name, "EnumServicesStatusExW");
6633 ndr->depth++;
6634 if (flags & NDR_SET_VALUES) {
6635 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6637 if (flags & NDR_IN) {
6638 ndr_print_struct(ndr, "in", "EnumServicesStatusExW");
6639 ndr->depth++;
6640 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6641 ndr->depth++;
6642 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6643 ndr->depth--;
6644 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6645 ndr_print_uint32(ndr, "type", r->in.type);
6646 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6647 ndr_print_uint32(ndr, "offered", r->in.offered);
6648 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6649 ndr->depth++;
6650 if (r->in.resume_handle) {
6651 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6653 ndr->depth--;
6654 ndr_print_ptr(ndr, "group_name", r->in.group_name);
6655 ndr->depth++;
6656 if (r->in.group_name) {
6657 ndr_print_string(ndr, "group_name", r->in.group_name);
6659 ndr->depth--;
6660 ndr->depth--;
6662 if (flags & NDR_OUT) {
6663 ndr_print_struct(ndr, "out", "EnumServicesStatusExW");
6664 ndr->depth++;
6665 ndr_print_ptr(ndr, "services", r->out.services);
6666 ndr->depth++;
6667 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6668 ndr->depth--;
6669 ndr_print_ptr(ndr, "needed", r->out.needed);
6670 ndr->depth++;
6671 ndr_print_uint32(ndr, "needed", *r->out.needed);
6672 ndr->depth--;
6673 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6674 ndr->depth++;
6675 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6676 ndr->depth--;
6677 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6678 ndr->depth++;
6679 if (r->out.resume_handle) {
6680 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6682 ndr->depth--;
6683 ndr_print_WERROR(ndr, "result", r->out.result);
6684 ndr->depth--;
6686 ndr->depth--;
6689 static enum ndr_err_code ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
6691 if (flags & NDR_IN) {
6693 if (flags & NDR_OUT) {
6694 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6696 return NDR_ERR_SUCCESS;
6699 static enum ndr_err_code ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
6701 if (flags & NDR_IN) {
6703 if (flags & NDR_OUT) {
6704 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6706 return NDR_ERR_SUCCESS;
6709 _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r)
6711 ndr_print_struct(ndr, name, "svcctl_SCSendTSMessage");
6712 ndr->depth++;
6713 if (flags & NDR_SET_VALUES) {
6714 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6716 if (flags & NDR_IN) {
6717 ndr_print_struct(ndr, "in", "svcctl_SCSendTSMessage");
6718 ndr->depth++;
6719 ndr->depth--;
6721 if (flags & NDR_OUT) {
6722 ndr_print_struct(ndr, "out", "svcctl_SCSendTSMessage");
6723 ndr->depth++;
6724 ndr_print_WERROR(ndr, "result", r->out.result);
6725 ndr->depth--;
6727 ndr->depth--;
6730 static const struct ndr_interface_call svcctl_calls[] = {
6732 "svcctl_CloseServiceHandle",
6733 sizeof(struct svcctl_CloseServiceHandle),
6734 (ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
6735 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
6736 (ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
6737 false,
6740 "svcctl_ControlService",
6741 sizeof(struct svcctl_ControlService),
6742 (ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
6743 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
6744 (ndr_print_function_t) ndr_print_svcctl_ControlService,
6745 false,
6748 "svcctl_DeleteService",
6749 sizeof(struct svcctl_DeleteService),
6750 (ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
6751 (ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
6752 (ndr_print_function_t) ndr_print_svcctl_DeleteService,
6753 false,
6756 "svcctl_LockServiceDatabase",
6757 sizeof(struct svcctl_LockServiceDatabase),
6758 (ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
6759 (ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
6760 (ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
6761 false,
6764 "svcctl_QueryServiceObjectSecurity",
6765 sizeof(struct svcctl_QueryServiceObjectSecurity),
6766 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
6767 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
6768 (ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
6769 false,
6772 "svcctl_SetServiceObjectSecurity",
6773 sizeof(struct svcctl_SetServiceObjectSecurity),
6774 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
6775 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
6776 (ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
6777 false,
6780 "svcctl_QueryServiceStatus",
6781 sizeof(struct svcctl_QueryServiceStatus),
6782 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
6783 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
6784 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
6785 false,
6788 "svcctl_SetServiceStatus",
6789 sizeof(struct svcctl_SetServiceStatus),
6790 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
6791 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
6792 (ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
6793 false,
6796 "svcctl_UnlockServiceDatabase",
6797 sizeof(struct svcctl_UnlockServiceDatabase),
6798 (ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
6799 (ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
6800 (ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
6801 false,
6804 "svcctl_NotifyBootConfigStatus",
6805 sizeof(struct svcctl_NotifyBootConfigStatus),
6806 (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
6807 (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
6808 (ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
6809 false,
6812 "svcctl_SCSetServiceBitsW",
6813 sizeof(struct svcctl_SCSetServiceBitsW),
6814 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
6815 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
6816 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
6817 false,
6820 "svcctl_ChangeServiceConfigW",
6821 sizeof(struct svcctl_ChangeServiceConfigW),
6822 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
6823 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
6824 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
6825 false,
6828 "svcctl_CreateServiceW",
6829 sizeof(struct svcctl_CreateServiceW),
6830 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
6831 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
6832 (ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
6833 false,
6836 "svcctl_EnumDependentServicesW",
6837 sizeof(struct svcctl_EnumDependentServicesW),
6838 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
6839 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
6840 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
6841 false,
6844 "svcctl_EnumServicesStatusW",
6845 sizeof(struct svcctl_EnumServicesStatusW),
6846 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
6847 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
6848 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
6849 false,
6852 "svcctl_OpenSCManagerW",
6853 sizeof(struct svcctl_OpenSCManagerW),
6854 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
6855 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
6856 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
6857 false,
6860 "svcctl_OpenServiceW",
6861 sizeof(struct svcctl_OpenServiceW),
6862 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
6863 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
6864 (ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
6865 false,
6868 "svcctl_QueryServiceConfigW",
6869 sizeof(struct svcctl_QueryServiceConfigW),
6870 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
6871 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
6872 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
6873 false,
6876 "svcctl_QueryServiceLockStatusW",
6877 sizeof(struct svcctl_QueryServiceLockStatusW),
6878 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
6879 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
6880 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
6881 false,
6884 "svcctl_StartServiceW",
6885 sizeof(struct svcctl_StartServiceW),
6886 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
6887 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
6888 (ndr_print_function_t) ndr_print_svcctl_StartServiceW,
6889 false,
6892 "svcctl_GetServiceDisplayNameW",
6893 sizeof(struct svcctl_GetServiceDisplayNameW),
6894 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
6895 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
6896 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
6897 false,
6900 "svcctl_GetServiceKeyNameW",
6901 sizeof(struct svcctl_GetServiceKeyNameW),
6902 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
6903 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
6904 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
6905 false,
6908 "svcctl_SCSetServiceBitsA",
6909 sizeof(struct svcctl_SCSetServiceBitsA),
6910 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
6911 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
6912 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
6913 false,
6916 "svcctl_ChangeServiceConfigA",
6917 sizeof(struct svcctl_ChangeServiceConfigA),
6918 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
6919 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
6920 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
6921 false,
6924 "svcctl_CreateServiceA",
6925 sizeof(struct svcctl_CreateServiceA),
6926 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
6927 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
6928 (ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
6929 false,
6932 "svcctl_EnumDependentServicesA",
6933 sizeof(struct svcctl_EnumDependentServicesA),
6934 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
6935 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
6936 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
6937 false,
6940 "svcctl_EnumServicesStatusA",
6941 sizeof(struct svcctl_EnumServicesStatusA),
6942 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
6943 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
6944 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
6945 false,
6948 "svcctl_OpenSCManagerA",
6949 sizeof(struct svcctl_OpenSCManagerA),
6950 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
6951 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
6952 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
6953 false,
6956 "svcctl_OpenServiceA",
6957 sizeof(struct svcctl_OpenServiceA),
6958 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
6959 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
6960 (ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
6961 false,
6964 "svcctl_QueryServiceConfigA",
6965 sizeof(struct svcctl_QueryServiceConfigA),
6966 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
6967 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
6968 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
6969 false,
6972 "svcctl_QueryServiceLockStatusA",
6973 sizeof(struct svcctl_QueryServiceLockStatusA),
6974 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
6975 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
6976 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
6977 false,
6980 "svcctl_StartServiceA",
6981 sizeof(struct svcctl_StartServiceA),
6982 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
6983 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
6984 (ndr_print_function_t) ndr_print_svcctl_StartServiceA,
6985 false,
6988 "svcctl_GetServiceDisplayNameA",
6989 sizeof(struct svcctl_GetServiceDisplayNameA),
6990 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
6991 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
6992 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
6993 false,
6996 "svcctl_GetServiceKeyNameA",
6997 sizeof(struct svcctl_GetServiceKeyNameA),
6998 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
6999 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
7000 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
7001 false,
7004 "svcctl_GetCurrentGroupeStateW",
7005 sizeof(struct svcctl_GetCurrentGroupeStateW),
7006 (ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
7007 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
7008 (ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
7009 false,
7012 "svcctl_EnumServiceGroupW",
7013 sizeof(struct svcctl_EnumServiceGroupW),
7014 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
7015 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
7016 (ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
7017 false,
7020 "svcctl_ChangeServiceConfig2A",
7021 sizeof(struct svcctl_ChangeServiceConfig2A),
7022 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
7023 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
7024 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
7025 false,
7028 "svcctl_ChangeServiceConfig2W",
7029 sizeof(struct svcctl_ChangeServiceConfig2W),
7030 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
7031 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
7032 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
7033 false,
7036 "svcctl_QueryServiceConfig2A",
7037 sizeof(struct svcctl_QueryServiceConfig2A),
7038 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
7039 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
7040 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
7041 false,
7044 "svcctl_QueryServiceConfig2W",
7045 sizeof(struct svcctl_QueryServiceConfig2W),
7046 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
7047 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
7048 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
7049 false,
7052 "svcctl_QueryServiceStatusEx",
7053 sizeof(struct svcctl_QueryServiceStatusEx),
7054 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
7055 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
7056 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
7057 false,
7060 "EnumServicesStatusExA",
7061 sizeof(struct EnumServicesStatusExA),
7062 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExA,
7063 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExA,
7064 (ndr_print_function_t) ndr_print_EnumServicesStatusExA,
7065 false,
7068 "EnumServicesStatusExW",
7069 sizeof(struct EnumServicesStatusExW),
7070 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExW,
7071 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExW,
7072 (ndr_print_function_t) ndr_print_EnumServicesStatusExW,
7073 false,
7076 "svcctl_SCSendTSMessage",
7077 sizeof(struct svcctl_SCSendTSMessage),
7078 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
7079 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
7080 (ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
7081 false,
7083 { NULL, 0, NULL, NULL, NULL, false }
7086 static const char * const svcctl_endpoint_strings[] = {
7087 "ncacn_np:[\\pipe\\svcctl]",
7088 "ncalrpc:",
7091 static const struct ndr_interface_string_array svcctl_endpoints = {
7092 .count = 2,
7093 .names = svcctl_endpoint_strings
7096 static const char * const svcctl_authservice_strings[] = {
7097 "host",
7100 static const struct ndr_interface_string_array svcctl_authservices = {
7101 .count = 1,
7102 .names = svcctl_authservice_strings
7106 const struct ndr_interface_table ndr_table_svcctl = {
7107 .name = "svcctl",
7108 .syntax_id = {
7109 {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
7110 NDR_SVCCTL_VERSION
7112 .helpstring = NDR_SVCCTL_HELPSTRING,
7113 .num_calls = 44,
7114 .calls = svcctl_calls,
7115 .endpoints = &svcctl_endpoints,
7116 .authservices = &svcctl_authservices