idl: regenerate IDL for NDR64 changes
[Samba/kamenim.git] / librpc / gen_ndr / ndr_svcctl.c
blob4b190b6c9114178f4ee8161357b87677531bed2e
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_svcctl.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 static enum ndr_err_code ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_LOCK_STATUS *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 5));
12 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_locked));
13 NDR_CHECK(ndr_push_unique_ptr(ndr, r->lock_owner));
14 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_duration));
16 if (ndr_flags & NDR_BUFFERS) {
17 if (r->lock_owner) {
18 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
19 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
20 NDR_CHECK(ndr_push_uint3264(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, 5));
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_enum_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_enum_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, 5));
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, 5));
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, 5));
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, 5));
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_enum_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_enum_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_enum_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_enum_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_enum_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_enum_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_enum_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_enum_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, 5));
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_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
718 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
719 NDR_CHECK(ndr_push_uint3264(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_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
724 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
725 NDR_CHECK(ndr_push_uint3264(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_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
730 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
731 NDR_CHECK(ndr_push_uint3264(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_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
736 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
737 NDR_CHECK(ndr_push_uint3264(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_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
742 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
743 NDR_CHECK(ndr_push_uint3264(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, 5));
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_ArgumentString(struct ndr_push *ndr, int ndr_flags, const struct svcctl_ArgumentString *r)
912 if (ndr_flags & NDR_SCALARS) {
913 NDR_CHECK(ndr_push_align(ndr, 5));
914 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
916 if (ndr_flags & NDR_BUFFERS) {
917 if (r->string) {
918 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
919 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
920 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
921 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, ndr_charset_length(r->string, CH_UTF16), sizeof(uint16_t), CH_UTF16));
924 return NDR_ERR_SUCCESS;
927 static enum ndr_err_code ndr_pull_svcctl_ArgumentString(struct ndr_pull *ndr, int ndr_flags, struct svcctl_ArgumentString *r)
929 uint32_t _ptr_string;
930 TALLOC_CTX *_mem_save_string_0;
931 if (ndr_flags & NDR_SCALARS) {
932 NDR_CHECK(ndr_pull_align(ndr, 5));
933 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
934 if (_ptr_string) {
935 NDR_PULL_ALLOC(ndr, r->string);
936 } else {
937 r->string = NULL;
940 if (ndr_flags & NDR_BUFFERS) {
941 if (r->string) {
942 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
943 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
944 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
945 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
946 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
947 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
949 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t)));
950 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
951 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
954 return NDR_ERR_SUCCESS;
957 _PUBLIC_ void ndr_print_svcctl_ArgumentString(struct ndr_print *ndr, const char *name, const struct svcctl_ArgumentString *r)
959 ndr_print_struct(ndr, name, "svcctl_ArgumentString");
960 ndr->depth++;
961 ndr_print_ptr(ndr, "string", r->string);
962 ndr->depth++;
963 if (r->string) {
964 ndr_print_string(ndr, "string", r->string);
966 ndr->depth--;
967 ndr->depth--;
970 static enum ndr_err_code ndr_push_svcctl_ConfigLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_ConfigLevel r)
972 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
973 return NDR_ERR_SUCCESS;
976 static enum ndr_err_code ndr_pull_svcctl_ConfigLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ConfigLevel *r)
978 uint32_t v;
979 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
980 *r = v;
981 return NDR_ERR_SUCCESS;
984 _PUBLIC_ void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r)
986 const char *val = NULL;
988 switch (r) {
989 case SERVICE_CONFIG_DESCRIPTION: val = "SERVICE_CONFIG_DESCRIPTION"; break;
990 case SERVICE_CONFIG_FAILURE_ACTIONS: val = "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
992 ndr_print_enum(ndr, name, "ENUM", val, r);
995 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_DESCRIPTION *r)
997 if (ndr_flags & NDR_SCALARS) {
998 NDR_CHECK(ndr_push_align(ndr, 5));
1000 uint32_t _flags_save_string = ndr->flags;
1001 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1002 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
1003 ndr->flags = _flags_save_string;
1006 if (ndr_flags & NDR_BUFFERS) {
1008 uint32_t _flags_save_string = ndr->flags;
1009 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1010 if (r->description) {
1011 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->description));
1012 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
1014 ndr->flags = _flags_save_string;
1017 return NDR_ERR_SUCCESS;
1020 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_DESCRIPTION *r)
1022 uint32_t _ptr_description;
1023 TALLOC_CTX *_mem_save_description_0;
1024 if (ndr_flags & NDR_SCALARS) {
1025 NDR_CHECK(ndr_pull_align(ndr, 5));
1027 uint32_t _flags_save_string = ndr->flags;
1028 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1029 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
1030 if (_ptr_description) {
1031 NDR_PULL_ALLOC(ndr, r->description);
1032 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
1033 } else {
1034 r->description = NULL;
1036 ndr->flags = _flags_save_string;
1039 if (ndr_flags & NDR_BUFFERS) {
1041 uint32_t _flags_save_string = ndr->flags;
1042 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1043 if (r->description) {
1044 uint32_t _relative_save_offset;
1045 _relative_save_offset = ndr->offset;
1046 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
1047 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
1048 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
1049 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
1050 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
1051 ndr->offset = _relative_save_offset;
1053 ndr->flags = _flags_save_string;
1056 return NDR_ERR_SUCCESS;
1059 _PUBLIC_ void ndr_print_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTION *r)
1061 ndr_print_struct(ndr, name, "SERVICE_DESCRIPTION");
1062 ndr->depth++;
1063 ndr_print_ptr(ndr, "description", r->description);
1064 ndr->depth++;
1065 if (r->description) {
1066 ndr_print_string(ndr, "description", r->description);
1068 ndr->depth--;
1069 ndr->depth--;
1072 _PUBLIC_ size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION *r, struct smb_iconv_convenience *ic, int flags)
1074 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION, ic);
1077 static enum ndr_err_code ndr_push_SC_ACTION_TYPE(struct ndr_push *ndr, int ndr_flags, enum SC_ACTION_TYPE r)
1079 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1080 return NDR_ERR_SUCCESS;
1083 static enum ndr_err_code ndr_pull_SC_ACTION_TYPE(struct ndr_pull *ndr, int ndr_flags, enum SC_ACTION_TYPE *r)
1085 uint32_t v;
1086 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1087 *r = v;
1088 return NDR_ERR_SUCCESS;
1091 _PUBLIC_ void ndr_print_SC_ACTION_TYPE(struct ndr_print *ndr, const char *name, enum SC_ACTION_TYPE r)
1093 const char *val = NULL;
1095 switch (r) {
1096 case SC_ACTION_NONE: val = "SC_ACTION_NONE"; break;
1097 case SC_ACTION_RESTART: val = "SC_ACTION_RESTART"; break;
1098 case SC_ACTION_REBOOT: val = "SC_ACTION_REBOOT"; break;
1099 case SC_ACTION_RUN_COMMAND: val = "SC_ACTION_RUN_COMMAND"; break;
1101 ndr_print_enum(ndr, name, "ENUM", val, r);
1104 static enum ndr_err_code ndr_push_SC_ACTION(struct ndr_push *ndr, int ndr_flags, const struct SC_ACTION *r)
1106 if (ndr_flags & NDR_SCALARS) {
1107 NDR_CHECK(ndr_push_align(ndr, 4));
1108 NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr, NDR_SCALARS, r->type));
1109 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->delay));
1111 if (ndr_flags & NDR_BUFFERS) {
1113 return NDR_ERR_SUCCESS;
1116 static enum ndr_err_code ndr_pull_SC_ACTION(struct ndr_pull *ndr, int ndr_flags, struct SC_ACTION *r)
1118 if (ndr_flags & NDR_SCALARS) {
1119 NDR_CHECK(ndr_pull_align(ndr, 4));
1120 NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr, NDR_SCALARS, &r->type));
1121 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->delay));
1123 if (ndr_flags & NDR_BUFFERS) {
1125 return NDR_ERR_SUCCESS;
1128 _PUBLIC_ void ndr_print_SC_ACTION(struct ndr_print *ndr, const char *name, const struct SC_ACTION *r)
1130 ndr_print_struct(ndr, name, "SC_ACTION");
1131 ndr->depth++;
1132 ndr_print_SC_ACTION_TYPE(ndr, "type", r->type);
1133 ndr_print_uint32(ndr, "delay", r->delay);
1134 ndr->depth--;
1137 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_FAILURE_ACTIONS *r)
1139 uint32_t cntr_actions_1;
1140 if (ndr_flags & NDR_SCALARS) {
1141 NDR_CHECK(ndr_push_align(ndr, 5));
1142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reset_period));
1144 uint32_t _flags_save_string = ndr->flags;
1145 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1146 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->rebootmsg));
1147 ndr->flags = _flags_save_string;
1150 uint32_t _flags_save_string = ndr->flags;
1151 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1152 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->command));
1153 ndr->flags = _flags_save_string;
1155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions));
1156 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->actions));
1158 if (ndr_flags & NDR_BUFFERS) {
1160 uint32_t _flags_save_string = ndr->flags;
1161 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1162 if (r->rebootmsg) {
1163 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->rebootmsg));
1164 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->rebootmsg));
1166 ndr->flags = _flags_save_string;
1169 uint32_t _flags_save_string = ndr->flags;
1170 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1171 if (r->command) {
1172 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->command));
1173 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->command));
1175 ndr->flags = _flags_save_string;
1177 if (r->actions) {
1178 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->actions));
1179 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_actions));
1180 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1181 NDR_CHECK(ndr_push_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1185 return NDR_ERR_SUCCESS;
1188 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_FAILURE_ACTIONS *r)
1190 uint32_t _ptr_rebootmsg;
1191 TALLOC_CTX *_mem_save_rebootmsg_0;
1192 uint32_t _ptr_command;
1193 TALLOC_CTX *_mem_save_command_0;
1194 uint32_t _ptr_actions;
1195 uint32_t cntr_actions_1;
1196 TALLOC_CTX *_mem_save_actions_0;
1197 TALLOC_CTX *_mem_save_actions_1;
1198 if (ndr_flags & NDR_SCALARS) {
1199 NDR_CHECK(ndr_pull_align(ndr, 5));
1200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reset_period));
1202 uint32_t _flags_save_string = ndr->flags;
1203 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1204 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rebootmsg));
1205 if (_ptr_rebootmsg) {
1206 NDR_PULL_ALLOC(ndr, r->rebootmsg);
1207 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->rebootmsg, _ptr_rebootmsg));
1208 } else {
1209 r->rebootmsg = NULL;
1211 ndr->flags = _flags_save_string;
1214 uint32_t _flags_save_string = ndr->flags;
1215 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1216 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
1217 if (_ptr_command) {
1218 NDR_PULL_ALLOC(ndr, r->command);
1219 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->command, _ptr_command));
1220 } else {
1221 r->command = NULL;
1223 ndr->flags = _flags_save_string;
1225 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_actions));
1226 if (r->num_actions > 1024) {
1227 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1229 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_actions));
1230 if (_ptr_actions) {
1231 NDR_PULL_ALLOC(ndr, r->actions);
1232 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->actions, _ptr_actions));
1233 } else {
1234 r->actions = NULL;
1237 if (ndr_flags & NDR_BUFFERS) {
1239 uint32_t _flags_save_string = ndr->flags;
1240 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1241 if (r->rebootmsg) {
1242 uint32_t _relative_save_offset;
1243 _relative_save_offset = ndr->offset;
1244 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->rebootmsg));
1245 _mem_save_rebootmsg_0 = NDR_PULL_GET_MEM_CTX(ndr);
1246 NDR_PULL_SET_MEM_CTX(ndr, r->rebootmsg, 0);
1247 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->rebootmsg));
1248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rebootmsg_0, 0);
1249 ndr->offset = _relative_save_offset;
1251 ndr->flags = _flags_save_string;
1254 uint32_t _flags_save_string = ndr->flags;
1255 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1256 if (r->command) {
1257 uint32_t _relative_save_offset;
1258 _relative_save_offset = ndr->offset;
1259 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->command));
1260 _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
1261 NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
1262 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->command));
1263 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
1264 ndr->offset = _relative_save_offset;
1266 ndr->flags = _flags_save_string;
1268 if (r->actions) {
1269 uint32_t _relative_save_offset;
1270 _relative_save_offset = ndr->offset;
1271 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->actions));
1272 _mem_save_actions_0 = NDR_PULL_GET_MEM_CTX(ndr);
1273 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1274 NDR_CHECK(ndr_pull_array_size(ndr, &r->actions));
1275 NDR_PULL_ALLOC_N(ndr, r->actions, ndr_get_array_size(ndr, &r->actions));
1276 _mem_save_actions_1 = NDR_PULL_GET_MEM_CTX(ndr);
1277 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1278 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1279 NDR_CHECK(ndr_pull_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_1, 0);
1282 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_0, 0);
1283 ndr->offset = _relative_save_offset;
1285 if (r->actions) {
1286 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->actions, r->num_actions));
1289 return NDR_ERR_SUCCESS;
1292 _PUBLIC_ void ndr_print_SERVICE_FAILURE_ACTIONS(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONS *r)
1294 uint32_t cntr_actions_1;
1295 ndr_print_struct(ndr, name, "SERVICE_FAILURE_ACTIONS");
1296 ndr->depth++;
1297 ndr_print_uint32(ndr, "reset_period", r->reset_period);
1298 ndr_print_ptr(ndr, "rebootmsg", r->rebootmsg);
1299 ndr->depth++;
1300 if (r->rebootmsg) {
1301 ndr_print_string(ndr, "rebootmsg", r->rebootmsg);
1303 ndr->depth--;
1304 ndr_print_ptr(ndr, "command", r->command);
1305 ndr->depth++;
1306 if (r->command) {
1307 ndr_print_string(ndr, "command", r->command);
1309 ndr->depth--;
1310 ndr_print_uint32(ndr, "num_actions", r->num_actions);
1311 ndr_print_ptr(ndr, "actions", r->actions);
1312 ndr->depth++;
1313 if (r->actions) {
1314 ndr->print(ndr, "%s: ARRAY(%d)", "actions", (int)r->num_actions);
1315 ndr->depth++;
1316 for (cntr_actions_1=0;cntr_actions_1<r->num_actions;cntr_actions_1++) {
1317 char *idx_1=NULL;
1318 if (asprintf(&idx_1, "[%d]", cntr_actions_1) != -1) {
1319 ndr_print_SC_ACTION(ndr, "actions", &r->actions[cntr_actions_1]);
1320 free(idx_1);
1323 ndr->depth--;
1325 ndr->depth--;
1326 ndr->depth--;
1329 _PUBLIC_ size_t ndr_size_SERVICE_FAILURE_ACTIONS(const struct SERVICE_FAILURE_ACTIONS *r, struct smb_iconv_convenience *ic, int flags)
1331 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONS, ic);
1334 static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_StatusLevel r)
1336 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1337 return NDR_ERR_SUCCESS;
1340 static enum ndr_err_code ndr_pull_svcctl_StatusLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StatusLevel *r)
1342 uint32_t v;
1343 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1344 *r = v;
1345 return NDR_ERR_SUCCESS;
1348 _PUBLIC_ void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r)
1350 const char *val = NULL;
1352 switch (r) {
1353 case SVC_STATUS_PROCESS_INFO: val = "SVC_STATUS_PROCESS_INFO"; break;
1355 ndr_print_enum(ndr, name, "ENUM", val, r);
1358 static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
1360 if (flags & NDR_IN) {
1361 if (r->in.handle == NULL) {
1362 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1364 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1366 if (flags & NDR_OUT) {
1367 if (r->out.handle == NULL) {
1368 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1370 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1371 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1373 return NDR_ERR_SUCCESS;
1376 static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
1378 TALLOC_CTX *_mem_save_handle_0;
1379 if (flags & NDR_IN) {
1380 ZERO_STRUCT(r->out);
1382 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1383 NDR_PULL_ALLOC(ndr, r->in.handle);
1385 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1386 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1387 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1388 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1389 NDR_PULL_ALLOC(ndr, r->out.handle);
1390 *r->out.handle = *r->in.handle;
1392 if (flags & NDR_OUT) {
1393 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1394 NDR_PULL_ALLOC(ndr, r->out.handle);
1396 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1397 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1398 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1400 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1402 return NDR_ERR_SUCCESS;
1405 _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r)
1407 ndr_print_struct(ndr, name, "svcctl_CloseServiceHandle");
1408 ndr->depth++;
1409 if (flags & NDR_SET_VALUES) {
1410 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1412 if (flags & NDR_IN) {
1413 ndr_print_struct(ndr, "in", "svcctl_CloseServiceHandle");
1414 ndr->depth++;
1415 ndr_print_ptr(ndr, "handle", r->in.handle);
1416 ndr->depth++;
1417 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1418 ndr->depth--;
1419 ndr->depth--;
1421 if (flags & NDR_OUT) {
1422 ndr_print_struct(ndr, "out", "svcctl_CloseServiceHandle");
1423 ndr->depth++;
1424 ndr_print_ptr(ndr, "handle", r->out.handle);
1425 ndr->depth++;
1426 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1427 ndr->depth--;
1428 ndr_print_WERROR(ndr, "result", r->out.result);
1429 ndr->depth--;
1431 ndr->depth--;
1434 static enum ndr_err_code ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
1436 if (flags & NDR_IN) {
1437 if (r->in.handle == NULL) {
1438 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1440 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1441 NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.control));
1443 if (flags & NDR_OUT) {
1444 if (r->out.service_status == NULL) {
1445 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1447 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1448 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1450 return NDR_ERR_SUCCESS;
1453 static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
1455 TALLOC_CTX *_mem_save_handle_0;
1456 TALLOC_CTX *_mem_save_service_status_0;
1457 if (flags & NDR_IN) {
1458 ZERO_STRUCT(r->out);
1460 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1461 NDR_PULL_ALLOC(ndr, r->in.handle);
1463 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1464 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1465 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1467 NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.control));
1468 NDR_PULL_ALLOC(ndr, r->out.service_status);
1469 ZERO_STRUCTP(r->out.service_status);
1471 if (flags & NDR_OUT) {
1472 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1473 NDR_PULL_ALLOC(ndr, r->out.service_status);
1475 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1476 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1477 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1479 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1481 return NDR_ERR_SUCCESS;
1484 _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r)
1486 ndr_print_struct(ndr, name, "svcctl_ControlService");
1487 ndr->depth++;
1488 if (flags & NDR_SET_VALUES) {
1489 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1491 if (flags & NDR_IN) {
1492 ndr_print_struct(ndr, "in", "svcctl_ControlService");
1493 ndr->depth++;
1494 ndr_print_ptr(ndr, "handle", r->in.handle);
1495 ndr->depth++;
1496 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1497 ndr->depth--;
1498 ndr_print_SERVICE_CONTROL(ndr, "control", r->in.control);
1499 ndr->depth--;
1501 if (flags & NDR_OUT) {
1502 ndr_print_struct(ndr, "out", "svcctl_ControlService");
1503 ndr->depth++;
1504 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1505 ndr->depth++;
1506 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1507 ndr->depth--;
1508 ndr_print_WERROR(ndr, "result", r->out.result);
1509 ndr->depth--;
1511 ndr->depth--;
1514 static enum ndr_err_code ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *r)
1516 if (flags & NDR_IN) {
1517 if (r->in.handle == NULL) {
1518 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1520 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1522 if (flags & NDR_OUT) {
1523 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1525 return NDR_ERR_SUCCESS;
1528 static enum ndr_err_code ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
1530 TALLOC_CTX *_mem_save_handle_0;
1531 if (flags & NDR_IN) {
1532 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1533 NDR_PULL_ALLOC(ndr, r->in.handle);
1535 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1536 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1537 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1540 if (flags & NDR_OUT) {
1541 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1543 return NDR_ERR_SUCCESS;
1546 _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r)
1548 ndr_print_struct(ndr, name, "svcctl_DeleteService");
1549 ndr->depth++;
1550 if (flags & NDR_SET_VALUES) {
1551 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1553 if (flags & NDR_IN) {
1554 ndr_print_struct(ndr, "in", "svcctl_DeleteService");
1555 ndr->depth++;
1556 ndr_print_ptr(ndr, "handle", r->in.handle);
1557 ndr->depth++;
1558 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1559 ndr->depth--;
1560 ndr->depth--;
1562 if (flags & NDR_OUT) {
1563 ndr_print_struct(ndr, "out", "svcctl_DeleteService");
1564 ndr->depth++;
1565 ndr_print_WERROR(ndr, "result", r->out.result);
1566 ndr->depth--;
1568 ndr->depth--;
1571 static enum ndr_err_code ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
1573 if (flags & NDR_IN) {
1574 if (r->in.handle == NULL) {
1575 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1577 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1579 if (flags & NDR_OUT) {
1580 if (r->out.lock == NULL) {
1581 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1583 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1584 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1586 return NDR_ERR_SUCCESS;
1589 static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
1591 TALLOC_CTX *_mem_save_handle_0;
1592 TALLOC_CTX *_mem_save_lock_0;
1593 if (flags & NDR_IN) {
1594 ZERO_STRUCT(r->out);
1596 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1597 NDR_PULL_ALLOC(ndr, r->in.handle);
1599 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1600 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1601 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1602 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1603 NDR_PULL_ALLOC(ndr, r->out.lock);
1604 ZERO_STRUCTP(r->out.lock);
1606 if (flags & NDR_OUT) {
1607 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1608 NDR_PULL_ALLOC(ndr, r->out.lock);
1610 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1611 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
1612 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1613 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1614 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1616 return NDR_ERR_SUCCESS;
1619 _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r)
1621 ndr_print_struct(ndr, name, "svcctl_LockServiceDatabase");
1622 ndr->depth++;
1623 if (flags & NDR_SET_VALUES) {
1624 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1626 if (flags & NDR_IN) {
1627 ndr_print_struct(ndr, "in", "svcctl_LockServiceDatabase");
1628 ndr->depth++;
1629 ndr_print_ptr(ndr, "handle", r->in.handle);
1630 ndr->depth++;
1631 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1632 ndr->depth--;
1633 ndr->depth--;
1635 if (flags & NDR_OUT) {
1636 ndr_print_struct(ndr, "out", "svcctl_LockServiceDatabase");
1637 ndr->depth++;
1638 ndr_print_ptr(ndr, "lock", r->out.lock);
1639 ndr->depth++;
1640 ndr_print_policy_handle(ndr, "lock", r->out.lock);
1641 ndr->depth--;
1642 ndr_print_WERROR(ndr, "result", r->out.result);
1643 ndr->depth--;
1645 ndr->depth--;
1648 static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1650 if (flags & NDR_IN) {
1651 if (r->in.handle == NULL) {
1652 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1654 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1655 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1656 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1658 if (flags & NDR_OUT) {
1659 if (r->out.buffer == NULL) {
1660 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1662 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1663 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
1664 if (r->out.needed == NULL) {
1665 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
1668 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1670 return NDR_ERR_SUCCESS;
1673 static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
1675 TALLOC_CTX *_mem_save_handle_0;
1676 TALLOC_CTX *_mem_save_needed_0;
1677 if (flags & NDR_IN) {
1678 ZERO_STRUCT(r->out);
1680 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1681 NDR_PULL_ALLOC(ndr, r->in.handle);
1683 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1684 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1685 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1686 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1687 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1689 if (r->in.offered > 0x40000) {
1690 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1692 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
1693 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
1694 NDR_PULL_ALLOC(ndr, r->out.needed);
1695 ZERO_STRUCTP(r->out.needed);
1697 if (flags & NDR_OUT) {
1698 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
1699 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1700 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
1702 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
1703 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1704 NDR_PULL_ALLOC(ndr, r->out.needed);
1706 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
1707 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
1708 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
1709 if (*r->out.needed > 0x40000) {
1710 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1712 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
1713 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1714 if (r->out.buffer) {
1715 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
1718 return NDR_ERR_SUCCESS;
1721 _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1723 ndr_print_struct(ndr, name, "svcctl_QueryServiceObjectSecurity");
1724 ndr->depth++;
1725 if (flags & NDR_SET_VALUES) {
1726 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1728 if (flags & NDR_IN) {
1729 ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
1730 ndr->depth++;
1731 ndr_print_ptr(ndr, "handle", r->in.handle);
1732 ndr->depth++;
1733 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1734 ndr->depth--;
1735 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1736 ndr_print_uint32(ndr, "offered", r->in.offered);
1737 ndr->depth--;
1739 if (flags & NDR_OUT) {
1740 ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
1741 ndr->depth++;
1742 ndr_print_ptr(ndr, "buffer", r->out.buffer);
1743 ndr->depth++;
1744 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
1745 ndr->depth--;
1746 ndr_print_ptr(ndr, "needed", r->out.needed);
1747 ndr->depth++;
1748 ndr_print_uint32(ndr, "needed", *r->out.needed);
1749 ndr->depth--;
1750 ndr_print_WERROR(ndr, "result", r->out.result);
1751 ndr->depth--;
1753 ndr->depth--;
1756 static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1758 if (flags & NDR_IN) {
1759 if (r->in.handle == NULL) {
1760 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1762 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1763 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1764 if (r->in.buffer == NULL) {
1765 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1767 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1768 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
1769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1771 if (flags & NDR_OUT) {
1772 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1774 return NDR_ERR_SUCCESS;
1777 static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
1779 TALLOC_CTX *_mem_save_handle_0;
1780 if (flags & NDR_IN) {
1781 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1782 NDR_PULL_ALLOC(ndr, r->in.handle);
1784 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1785 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1786 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1787 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1788 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1789 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
1790 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1791 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
1793 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
1794 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1795 if (r->in.buffer) {
1796 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
1799 if (flags & NDR_OUT) {
1800 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1802 return NDR_ERR_SUCCESS;
1805 _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1807 ndr_print_struct(ndr, name, "svcctl_SetServiceObjectSecurity");
1808 ndr->depth++;
1809 if (flags & NDR_SET_VALUES) {
1810 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1812 if (flags & NDR_IN) {
1813 ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
1814 ndr->depth++;
1815 ndr_print_ptr(ndr, "handle", r->in.handle);
1816 ndr->depth++;
1817 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1818 ndr->depth--;
1819 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1820 ndr_print_ptr(ndr, "buffer", r->in.buffer);
1821 ndr->depth++;
1822 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
1823 ndr->depth--;
1824 ndr_print_uint32(ndr, "offered", r->in.offered);
1825 ndr->depth--;
1827 if (flags & NDR_OUT) {
1828 ndr_print_struct(ndr, "out", "svcctl_SetServiceObjectSecurity");
1829 ndr->depth++;
1830 ndr_print_WERROR(ndr, "result", r->out.result);
1831 ndr->depth--;
1833 ndr->depth--;
1836 static enum ndr_err_code ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *r)
1838 if (flags & NDR_IN) {
1839 if (r->in.handle == NULL) {
1840 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1842 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1844 if (flags & NDR_OUT) {
1845 if (r->out.service_status == NULL) {
1846 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1848 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1849 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1851 return NDR_ERR_SUCCESS;
1854 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
1856 TALLOC_CTX *_mem_save_handle_0;
1857 TALLOC_CTX *_mem_save_service_status_0;
1858 if (flags & NDR_IN) {
1859 ZERO_STRUCT(r->out);
1861 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1862 NDR_PULL_ALLOC(ndr, r->in.handle);
1864 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1865 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1866 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1868 NDR_PULL_ALLOC(ndr, r->out.service_status);
1869 ZERO_STRUCTP(r->out.service_status);
1871 if (flags & NDR_OUT) {
1872 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1873 NDR_PULL_ALLOC(ndr, r->out.service_status);
1875 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1876 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1877 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1878 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1879 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1881 return NDR_ERR_SUCCESS;
1884 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r)
1886 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatus");
1887 ndr->depth++;
1888 if (flags & NDR_SET_VALUES) {
1889 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1891 if (flags & NDR_IN) {
1892 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatus");
1893 ndr->depth++;
1894 ndr_print_ptr(ndr, "handle", r->in.handle);
1895 ndr->depth++;
1896 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1897 ndr->depth--;
1898 ndr->depth--;
1900 if (flags & NDR_OUT) {
1901 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatus");
1902 ndr->depth++;
1903 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1904 ndr->depth++;
1905 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1906 ndr->depth--;
1907 ndr_print_WERROR(ndr, "result", r->out.result);
1908 ndr->depth--;
1910 ndr->depth--;
1913 static enum ndr_err_code ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
1915 if (flags & NDR_IN) {
1917 if (flags & NDR_OUT) {
1918 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1920 return NDR_ERR_SUCCESS;
1923 static enum ndr_err_code ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
1925 if (flags & NDR_IN) {
1927 if (flags & NDR_OUT) {
1928 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1930 return NDR_ERR_SUCCESS;
1933 _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r)
1935 ndr_print_struct(ndr, name, "svcctl_SetServiceStatus");
1936 ndr->depth++;
1937 if (flags & NDR_SET_VALUES) {
1938 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1940 if (flags & NDR_IN) {
1941 ndr_print_struct(ndr, "in", "svcctl_SetServiceStatus");
1942 ndr->depth++;
1943 ndr->depth--;
1945 if (flags & NDR_OUT) {
1946 ndr_print_struct(ndr, "out", "svcctl_SetServiceStatus");
1947 ndr->depth++;
1948 ndr_print_WERROR(ndr, "result", r->out.result);
1949 ndr->depth--;
1951 ndr->depth--;
1954 static enum ndr_err_code ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
1956 if (flags & NDR_IN) {
1957 if (r->in.lock == NULL) {
1958 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1960 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.lock));
1962 if (flags & NDR_OUT) {
1963 if (r->out.lock == NULL) {
1964 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1966 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1967 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1969 return NDR_ERR_SUCCESS;
1972 static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
1974 TALLOC_CTX *_mem_save_lock_0;
1975 if (flags & NDR_IN) {
1976 ZERO_STRUCT(r->out);
1978 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1979 NDR_PULL_ALLOC(ndr, r->in.lock);
1981 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1982 NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC);
1983 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.lock));
1984 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1985 NDR_PULL_ALLOC(ndr, r->out.lock);
1986 *r->out.lock = *r->in.lock;
1988 if (flags & NDR_OUT) {
1989 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1990 NDR_PULL_ALLOC(ndr, r->out.lock);
1992 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1993 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
1994 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1995 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1996 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1998 return NDR_ERR_SUCCESS;
2001 _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r)
2003 ndr_print_struct(ndr, name, "svcctl_UnlockServiceDatabase");
2004 ndr->depth++;
2005 if (flags & NDR_SET_VALUES) {
2006 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2008 if (flags & NDR_IN) {
2009 ndr_print_struct(ndr, "in", "svcctl_UnlockServiceDatabase");
2010 ndr->depth++;
2011 ndr_print_ptr(ndr, "lock", r->in.lock);
2012 ndr->depth++;
2013 ndr_print_policy_handle(ndr, "lock", r->in.lock);
2014 ndr->depth--;
2015 ndr->depth--;
2017 if (flags & NDR_OUT) {
2018 ndr_print_struct(ndr, "out", "svcctl_UnlockServiceDatabase");
2019 ndr->depth++;
2020 ndr_print_ptr(ndr, "lock", r->out.lock);
2021 ndr->depth++;
2022 ndr_print_policy_handle(ndr, "lock", r->out.lock);
2023 ndr->depth--;
2024 ndr_print_WERROR(ndr, "result", r->out.result);
2025 ndr->depth--;
2027 ndr->depth--;
2030 static enum ndr_err_code ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2032 if (flags & NDR_IN) {
2034 if (flags & NDR_OUT) {
2035 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2037 return NDR_ERR_SUCCESS;
2040 static enum ndr_err_code ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
2042 if (flags & NDR_IN) {
2044 if (flags & NDR_OUT) {
2045 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2047 return NDR_ERR_SUCCESS;
2050 _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2052 ndr_print_struct(ndr, name, "svcctl_NotifyBootConfigStatus");
2053 ndr->depth++;
2054 if (flags & NDR_SET_VALUES) {
2055 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2057 if (flags & NDR_IN) {
2058 ndr_print_struct(ndr, "in", "svcctl_NotifyBootConfigStatus");
2059 ndr->depth++;
2060 ndr->depth--;
2062 if (flags & NDR_OUT) {
2063 ndr_print_struct(ndr, "out", "svcctl_NotifyBootConfigStatus");
2064 ndr->depth++;
2065 ndr_print_WERROR(ndr, "result", r->out.result);
2066 ndr->depth--;
2068 ndr->depth--;
2071 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
2073 if (flags & NDR_IN) {
2074 if (r->in.handle == NULL) {
2075 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2077 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
2079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
2080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
2082 if (flags & NDR_OUT) {
2083 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2085 return NDR_ERR_SUCCESS;
2088 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
2090 TALLOC_CTX *_mem_save_handle_0;
2091 if (flags & NDR_IN) {
2092 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2093 NDR_PULL_ALLOC(ndr, r->in.handle);
2095 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2096 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2097 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2098 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2099 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
2100 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
2101 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
2103 if (flags & NDR_OUT) {
2104 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2106 return NDR_ERR_SUCCESS;
2109 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r)
2111 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsW");
2112 ndr->depth++;
2113 if (flags & NDR_SET_VALUES) {
2114 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2116 if (flags & NDR_IN) {
2117 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsW");
2118 ndr->depth++;
2119 ndr_print_ptr(ndr, "handle", r->in.handle);
2120 ndr->depth++;
2121 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2122 ndr->depth--;
2123 ndr_print_uint32(ndr, "bits", r->in.bits);
2124 ndr_print_uint32(ndr, "bitson", r->in.bitson);
2125 ndr_print_uint32(ndr, "immediate", r->in.immediate);
2126 ndr->depth--;
2128 if (flags & NDR_OUT) {
2129 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsW");
2130 ndr->depth++;
2131 ndr_print_WERROR(ndr, "result", r->out.result);
2132 ndr->depth--;
2134 ndr->depth--;
2137 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
2139 if (flags & NDR_IN) {
2140 if (r->in.handle == NULL) {
2141 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2143 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2144 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2145 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2146 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2147 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
2148 if (r->in.binary_path) {
2149 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2150 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2151 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2152 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));
2154 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
2155 if (r->in.load_order_group) {
2156 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2157 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2158 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2159 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));
2161 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2162 if (r->in.dependencies) {
2163 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2164 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2165 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2166 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2168 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2169 if (r->in.service_start_name) {
2170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2171 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2172 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2173 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));
2175 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2176 if (r->in.password) {
2177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2178 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2179 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2180 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2182 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
2183 if (r->in.display_name) {
2184 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2185 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2186 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2187 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));
2190 if (flags & NDR_OUT) {
2191 if (r->out.tag_id == NULL) {
2192 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
2195 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2197 return NDR_ERR_SUCCESS;
2200 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
2202 uint32_t _ptr_binary_path;
2203 uint32_t _ptr_load_order_group;
2204 uint32_t _ptr_dependencies;
2205 uint32_t _ptr_service_start_name;
2206 uint32_t _ptr_password;
2207 uint32_t _ptr_display_name;
2208 TALLOC_CTX *_mem_save_handle_0;
2209 TALLOC_CTX *_mem_save_binary_path_0;
2210 TALLOC_CTX *_mem_save_load_order_group_0;
2211 TALLOC_CTX *_mem_save_tag_id_0;
2212 TALLOC_CTX *_mem_save_dependencies_0;
2213 TALLOC_CTX *_mem_save_service_start_name_0;
2214 TALLOC_CTX *_mem_save_password_0;
2215 TALLOC_CTX *_mem_save_display_name_0;
2216 if (flags & NDR_IN) {
2217 ZERO_STRUCT(r->out);
2219 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2220 NDR_PULL_ALLOC(ndr, r->in.handle);
2222 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2223 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2224 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2226 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2227 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2228 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2229 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
2230 if (_ptr_binary_path) {
2231 NDR_PULL_ALLOC(ndr, r->in.binary_path);
2232 } else {
2233 r->in.binary_path = NULL;
2235 if (r->in.binary_path) {
2236 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
2237 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
2238 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2239 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2240 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2241 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));
2243 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2244 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));
2245 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
2247 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
2248 if (_ptr_load_order_group) {
2249 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
2250 } else {
2251 r->in.load_order_group = NULL;
2253 if (r->in.load_order_group) {
2254 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
2255 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
2256 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
2257 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
2258 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
2259 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));
2261 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
2262 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));
2263 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
2265 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2266 if (_ptr_dependencies) {
2267 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2268 } else {
2269 r->in.dependencies = NULL;
2271 if (r->in.dependencies) {
2272 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2273 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2274 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2275 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
2276 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
2277 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));
2279 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
2280 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
2281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2283 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2284 if (_ptr_service_start_name) {
2285 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2286 } else {
2287 r->in.service_start_name = NULL;
2289 if (r->in.service_start_name) {
2290 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2291 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2292 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2293 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2294 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2295 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));
2297 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2298 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));
2299 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2301 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2302 if (_ptr_password) {
2303 NDR_PULL_ALLOC(ndr, r->in.password);
2304 } else {
2305 r->in.password = NULL;
2307 if (r->in.password) {
2308 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2309 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2310 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2311 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
2312 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
2313 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));
2315 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
2316 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
2317 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2319 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
2320 if (_ptr_display_name) {
2321 NDR_PULL_ALLOC(ndr, r->in.display_name);
2322 } else {
2323 r->in.display_name = NULL;
2325 if (r->in.display_name) {
2326 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2327 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
2328 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
2329 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
2330 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
2331 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));
2333 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
2334 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));
2335 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
2337 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2338 ZERO_STRUCTP(r->out.tag_id);
2340 if (flags & NDR_OUT) {
2341 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2342 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2344 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
2345 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
2346 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
2347 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
2348 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2350 return NDR_ERR_SUCCESS;
2353 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r)
2355 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigW");
2356 ndr->depth++;
2357 if (flags & NDR_SET_VALUES) {
2358 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2360 if (flags & NDR_IN) {
2361 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigW");
2362 ndr->depth++;
2363 ndr_print_ptr(ndr, "handle", r->in.handle);
2364 ndr->depth++;
2365 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2366 ndr->depth--;
2367 ndr_print_uint32(ndr, "type", r->in.type);
2368 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2369 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2370 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
2371 ndr->depth++;
2372 if (r->in.binary_path) {
2373 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2375 ndr->depth--;
2376 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
2377 ndr->depth++;
2378 if (r->in.load_order_group) {
2379 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
2381 ndr->depth--;
2382 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2383 ndr->depth++;
2384 if (r->in.dependencies) {
2385 ndr_print_string(ndr, "dependencies", r->in.dependencies);
2387 ndr->depth--;
2388 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2389 ndr->depth++;
2390 if (r->in.service_start_name) {
2391 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2393 ndr->depth--;
2394 ndr_print_ptr(ndr, "password", r->in.password);
2395 ndr->depth++;
2396 if (r->in.password) {
2397 ndr_print_string(ndr, "password", r->in.password);
2399 ndr->depth--;
2400 ndr_print_ptr(ndr, "display_name", r->in.display_name);
2401 ndr->depth++;
2402 if (r->in.display_name) {
2403 ndr_print_string(ndr, "display_name", r->in.display_name);
2405 ndr->depth--;
2406 ndr->depth--;
2408 if (flags & NDR_OUT) {
2409 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigW");
2410 ndr->depth++;
2411 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
2412 ndr->depth++;
2413 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
2414 ndr->depth--;
2415 ndr_print_WERROR(ndr, "result", r->out.result);
2416 ndr->depth--;
2418 ndr->depth--;
2421 static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
2423 if (flags & NDR_IN) {
2424 if (r->in.scmanager_handle == NULL) {
2425 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2427 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2428 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2429 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2430 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2431 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2432 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
2433 if (r->in.DisplayName) {
2434 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2435 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2436 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2437 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2439 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
2440 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2441 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2442 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2443 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2444 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2445 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2446 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));
2447 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
2448 if (r->in.LoadOrderGroupKey) {
2449 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2450 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2451 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2452 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2454 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.TagId));
2455 if (r->in.TagId) {
2456 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.TagId));
2458 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2459 if (r->in.dependencies) {
2460 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dependencies_size));
2461 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, r->in.dependencies_size));
2463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
2464 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2465 if (r->in.service_start_name) {
2466 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2467 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2468 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2469 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));
2471 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2472 if (r->in.password) {
2473 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.password_size));
2474 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.password, r->in.password_size));
2476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
2478 if (flags & NDR_OUT) {
2479 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
2480 if (r->out.TagId) {
2481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
2483 if (r->out.handle == NULL) {
2484 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2486 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2487 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2489 return NDR_ERR_SUCCESS;
2492 static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
2494 uint32_t _ptr_DisplayName;
2495 uint32_t _ptr_LoadOrderGroupKey;
2496 uint32_t _ptr_TagId;
2497 uint32_t _ptr_dependencies;
2498 uint32_t _ptr_service_start_name;
2499 uint32_t _ptr_password;
2500 TALLOC_CTX *_mem_save_scmanager_handle_0;
2501 TALLOC_CTX *_mem_save_DisplayName_0;
2502 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
2503 TALLOC_CTX *_mem_save_TagId_0;
2504 TALLOC_CTX *_mem_save_dependencies_0;
2505 TALLOC_CTX *_mem_save_service_start_name_0;
2506 TALLOC_CTX *_mem_save_password_0;
2507 TALLOC_CTX *_mem_save_handle_0;
2508 if (flags & NDR_IN) {
2509 ZERO_STRUCT(r->out);
2511 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2512 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
2514 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2515 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
2516 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
2518 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
2519 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
2520 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
2521 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));
2523 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
2524 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
2525 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
2526 if (_ptr_DisplayName) {
2527 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
2528 } else {
2529 r->in.DisplayName = NULL;
2531 if (r->in.DisplayName) {
2532 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2533 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
2534 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
2535 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
2536 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
2537 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));
2539 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
2540 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
2541 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
2543 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
2544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2545 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2546 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2547 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2548 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2549 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2550 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));
2552 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2553 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));
2554 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
2555 if (_ptr_LoadOrderGroupKey) {
2556 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
2557 } else {
2558 r->in.LoadOrderGroupKey = NULL;
2560 if (r->in.LoadOrderGroupKey) {
2561 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
2562 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
2563 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
2564 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
2565 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
2566 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));
2568 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
2569 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
2570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
2572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2573 if (_ptr_TagId) {
2574 NDR_PULL_ALLOC(ndr, r->in.TagId);
2575 } else {
2576 r->in.TagId = NULL;
2578 if (r->in.TagId) {
2579 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2580 NDR_PULL_SET_MEM_CTX(ndr, r->in.TagId, 0);
2581 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.TagId));
2582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2584 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2585 if (_ptr_dependencies) {
2586 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2587 } else {
2588 r->in.dependencies = NULL;
2590 if (r->in.dependencies) {
2591 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2592 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2593 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2594 NDR_PULL_ALLOC_N(ndr, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies));
2595 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies)));
2596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dependencies_size));
2599 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2600 if (_ptr_service_start_name) {
2601 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2602 } else {
2603 r->in.service_start_name = NULL;
2605 if (r->in.service_start_name) {
2606 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2607 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2608 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2609 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2610 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2611 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));
2613 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2614 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));
2615 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2617 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2618 if (_ptr_password) {
2619 NDR_PULL_ALLOC(ndr, r->in.password);
2620 } else {
2621 r->in.password = NULL;
2623 if (r->in.password) {
2624 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2625 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2626 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2627 NDR_PULL_ALLOC_N(ndr, r->in.password, ndr_get_array_size(ndr, &r->in.password));
2628 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.password, ndr_get_array_size(ndr, &r->in.password)));
2629 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2631 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.password_size));
2632 NDR_PULL_ALLOC(ndr, r->out.handle);
2633 ZERO_STRUCTP(r->out.handle);
2634 if (r->in.dependencies) {
2635 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.dependencies, r->in.dependencies_size));
2637 if (r->in.password) {
2638 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.password, r->in.password_size));
2641 if (flags & NDR_OUT) {
2642 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2643 if (_ptr_TagId) {
2644 NDR_PULL_ALLOC(ndr, r->out.TagId);
2645 } else {
2646 r->out.TagId = NULL;
2648 if (r->out.TagId) {
2649 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2650 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
2651 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
2652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2654 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2655 NDR_PULL_ALLOC(ndr, r->out.handle);
2657 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2658 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2659 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2661 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2663 return NDR_ERR_SUCCESS;
2666 _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r)
2668 ndr_print_struct(ndr, name, "svcctl_CreateServiceW");
2669 ndr->depth++;
2670 if (flags & NDR_SET_VALUES) {
2671 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2673 if (flags & NDR_IN) {
2674 ndr_print_struct(ndr, "in", "svcctl_CreateServiceW");
2675 ndr->depth++;
2676 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
2677 ndr->depth++;
2678 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
2679 ndr->depth--;
2680 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
2681 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
2682 ndr->depth++;
2683 if (r->in.DisplayName) {
2684 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
2686 ndr->depth--;
2687 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
2688 ndr_print_uint32(ndr, "type", r->in.type);
2689 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2690 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2691 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2692 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2693 ndr->depth++;
2694 if (r->in.LoadOrderGroupKey) {
2695 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2697 ndr->depth--;
2698 ndr_print_ptr(ndr, "TagId", r->in.TagId);
2699 ndr->depth++;
2700 if (r->in.TagId) {
2701 ndr_print_uint32(ndr, "TagId", *r->in.TagId);
2703 ndr->depth--;
2704 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2705 ndr->depth++;
2706 if (r->in.dependencies) {
2707 ndr_print_array_uint8(ndr, "dependencies", r->in.dependencies, r->in.dependencies_size);
2709 ndr->depth--;
2710 ndr_print_uint32(ndr, "dependencies_size", r->in.dependencies_size);
2711 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2712 ndr->depth++;
2713 if (r->in.service_start_name) {
2714 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2716 ndr->depth--;
2717 ndr_print_ptr(ndr, "password", r->in.password);
2718 ndr->depth++;
2719 if (r->in.password) {
2720 ndr_print_array_uint8(ndr, "password", r->in.password, r->in.password_size);
2722 ndr->depth--;
2723 ndr_print_uint32(ndr, "password_size", r->in.password_size);
2724 ndr->depth--;
2726 if (flags & NDR_OUT) {
2727 ndr_print_struct(ndr, "out", "svcctl_CreateServiceW");
2728 ndr->depth++;
2729 ndr_print_ptr(ndr, "TagId", r->out.TagId);
2730 ndr->depth++;
2731 if (r->out.TagId) {
2732 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
2734 ndr->depth--;
2735 ndr_print_ptr(ndr, "handle", r->out.handle);
2736 ndr->depth++;
2737 ndr_print_policy_handle(ndr, "handle", r->out.handle);
2738 ndr->depth--;
2739 ndr_print_WERROR(ndr, "result", r->out.result);
2740 ndr->depth--;
2742 ndr->depth--;
2745 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
2747 if (flags & NDR_IN) {
2748 if (r->in.service == NULL) {
2749 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2751 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
2752 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
2753 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2755 if (flags & NDR_OUT) {
2756 if (r->out.service_status == NULL) {
2757 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2759 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
2760 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.offered));
2761 if (r->out.needed == NULL) {
2762 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2764 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2765 if (r->out.services_returned == NULL) {
2766 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2769 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2771 return NDR_ERR_SUCCESS;
2774 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
2776 TALLOC_CTX *_mem_save_service_0;
2777 TALLOC_CTX *_mem_save_needed_0;
2778 TALLOC_CTX *_mem_save_services_returned_0;
2779 if (flags & NDR_IN) {
2780 ZERO_STRUCT(r->out);
2782 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2783 NDR_PULL_ALLOC(ndr, r->in.service);
2785 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
2786 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
2787 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
2788 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
2789 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
2790 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2791 if (r->in.offered > 0x40000) {
2792 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2794 NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.offered);
2795 memset(r->out.service_status, 0, (r->in.offered) * sizeof(*r->out.service_status));
2796 NDR_PULL_ALLOC(ndr, r->out.needed);
2797 ZERO_STRUCTP(r->out.needed);
2798 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2799 ZERO_STRUCTP(r->out.services_returned);
2801 if (flags & NDR_OUT) {
2802 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service_status));
2803 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2804 NDR_PULL_ALLOC_N(ndr, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status));
2806 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status)));
2807 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2808 NDR_PULL_ALLOC(ndr, r->out.needed);
2810 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2811 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2812 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2813 if (*r->out.needed > 0x40000) {
2814 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2817 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2818 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2820 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
2821 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
2822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
2823 if (*r->out.services_returned > 0x40000) {
2824 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2826 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
2827 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2828 if (r->out.service_status) {
2829 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service_status, r->in.offered));
2832 return NDR_ERR_SUCCESS;
2835 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r)
2837 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesW");
2838 ndr->depth++;
2839 if (flags & NDR_SET_VALUES) {
2840 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2842 if (flags & NDR_IN) {
2843 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesW");
2844 ndr->depth++;
2845 ndr_print_ptr(ndr, "service", r->in.service);
2846 ndr->depth++;
2847 ndr_print_policy_handle(ndr, "service", r->in.service);
2848 ndr->depth--;
2849 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
2850 ndr_print_uint32(ndr, "offered", r->in.offered);
2851 ndr->depth--;
2853 if (flags & NDR_OUT) {
2854 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesW");
2855 ndr->depth++;
2856 ndr_print_ptr(ndr, "service_status", r->out.service_status);
2857 ndr->depth++;
2858 ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.offered);
2859 ndr->depth--;
2860 ndr_print_ptr(ndr, "needed", r->out.needed);
2861 ndr->depth++;
2862 ndr_print_uint32(ndr, "needed", *r->out.needed);
2863 ndr->depth--;
2864 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
2865 ndr->depth++;
2866 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
2867 ndr->depth--;
2868 ndr_print_WERROR(ndr, "result", r->out.result);
2869 ndr->depth--;
2871 ndr->depth--;
2874 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
2876 if (flags & NDR_IN) {
2877 if (r->in.handle == NULL) {
2878 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2880 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2881 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2882 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
2883 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2884 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
2885 if (r->in.resume_handle) {
2886 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
2889 if (flags & NDR_OUT) {
2890 if (r->out.service == NULL) {
2891 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2893 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
2894 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
2895 if (r->out.needed == NULL) {
2896 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2898 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2899 if (r->out.services_returned == NULL) {
2900 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2902 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
2904 if (r->out.resume_handle) {
2905 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
2907 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2909 return NDR_ERR_SUCCESS;
2912 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
2914 uint32_t _ptr_resume_handle;
2915 TALLOC_CTX *_mem_save_handle_0;
2916 TALLOC_CTX *_mem_save_needed_0;
2917 TALLOC_CTX *_mem_save_services_returned_0;
2918 TALLOC_CTX *_mem_save_resume_handle_0;
2919 if (flags & NDR_IN) {
2920 ZERO_STRUCT(r->out);
2922 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2923 NDR_PULL_ALLOC(ndr, r->in.handle);
2925 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2926 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2927 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2928 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2929 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2930 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
2931 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2932 if (r->in.offered > 0x40000) {
2933 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2935 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
2936 if (_ptr_resume_handle) {
2937 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
2938 } else {
2939 r->in.resume_handle = NULL;
2941 if (r->in.resume_handle) {
2942 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2943 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
2944 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
2945 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
2947 NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.offered);
2948 memset(r->out.service, 0, (r->in.offered) * sizeof(*r->out.service));
2949 NDR_PULL_ALLOC(ndr, r->out.needed);
2950 ZERO_STRUCTP(r->out.needed);
2951 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2952 ZERO_STRUCTP(r->out.services_returned);
2954 if (flags & NDR_OUT) {
2955 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
2956 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2957 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
2959 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
2960 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2961 NDR_PULL_ALLOC(ndr, r->out.needed);
2963 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2964 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2965 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2966 if (*r->out.needed > 0x40000) {
2967 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2970 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2971 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2973 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
2974 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
2975 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
2976 if (*r->out.services_returned > 0x40000) {
2977 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
2980 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
2981 if (_ptr_resume_handle) {
2982 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
2983 } else {
2984 r->out.resume_handle = NULL;
2986 if (r->out.resume_handle) {
2987 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2988 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
2989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
2990 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
2992 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2993 if (r->out.service) {
2994 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
2997 return NDR_ERR_SUCCESS;
3000 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r)
3002 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusW");
3003 ndr->depth++;
3004 if (flags & NDR_SET_VALUES) {
3005 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3007 if (flags & NDR_IN) {
3008 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusW");
3009 ndr->depth++;
3010 ndr_print_ptr(ndr, "handle", r->in.handle);
3011 ndr->depth++;
3012 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3013 ndr->depth--;
3014 ndr_print_uint32(ndr, "type", r->in.type);
3015 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
3016 ndr_print_uint32(ndr, "offered", r->in.offered);
3017 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
3018 ndr->depth++;
3019 if (r->in.resume_handle) {
3020 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
3022 ndr->depth--;
3023 ndr->depth--;
3025 if (flags & NDR_OUT) {
3026 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
3027 ndr->depth++;
3028 ndr_print_ptr(ndr, "service", r->out.service);
3029 ndr->depth++;
3030 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
3031 ndr->depth--;
3032 ndr_print_ptr(ndr, "needed", r->out.needed);
3033 ndr->depth++;
3034 ndr_print_uint32(ndr, "needed", *r->out.needed);
3035 ndr->depth--;
3036 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
3037 ndr->depth++;
3038 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
3039 ndr->depth--;
3040 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
3041 ndr->depth++;
3042 if (r->out.resume_handle) {
3043 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
3045 ndr->depth--;
3046 ndr_print_WERROR(ndr, "result", r->out.result);
3047 ndr->depth--;
3049 ndr->depth--;
3052 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
3054 if (flags & NDR_IN) {
3055 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
3056 if (r->in.MachineName) {
3057 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3058 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3059 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3060 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3062 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
3063 if (r->in.DatabaseName) {
3064 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3065 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3066 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3067 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3069 NDR_CHECK(ndr_push_svcctl_MgrAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3071 if (flags & NDR_OUT) {
3072 if (r->out.handle == NULL) {
3073 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3075 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3076 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3078 return NDR_ERR_SUCCESS;
3081 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
3083 uint32_t _ptr_MachineName;
3084 uint32_t _ptr_DatabaseName;
3085 TALLOC_CTX *_mem_save_MachineName_0;
3086 TALLOC_CTX *_mem_save_DatabaseName_0;
3087 TALLOC_CTX *_mem_save_handle_0;
3088 if (flags & NDR_IN) {
3089 ZERO_STRUCT(r->out);
3091 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
3092 if (_ptr_MachineName) {
3093 NDR_PULL_ALLOC(ndr, r->in.MachineName);
3094 } else {
3095 r->in.MachineName = NULL;
3097 if (r->in.MachineName) {
3098 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3099 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
3100 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
3101 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
3102 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
3103 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));
3105 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
3106 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
3107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
3109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
3110 if (_ptr_DatabaseName) {
3111 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
3112 } else {
3113 r->in.DatabaseName = NULL;
3115 if (r->in.DatabaseName) {
3116 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3117 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
3118 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
3119 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
3120 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
3121 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));
3123 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
3124 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
3125 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
3127 NDR_CHECK(ndr_pull_svcctl_MgrAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3128 NDR_PULL_ALLOC(ndr, r->out.handle);
3129 ZERO_STRUCTP(r->out.handle);
3131 if (flags & NDR_OUT) {
3132 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3133 NDR_PULL_ALLOC(ndr, r->out.handle);
3135 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3136 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3137 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3138 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3139 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3141 return NDR_ERR_SUCCESS;
3144 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r)
3146 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerW");
3147 ndr->depth++;
3148 if (flags & NDR_SET_VALUES) {
3149 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3151 if (flags & NDR_IN) {
3152 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerW");
3153 ndr->depth++;
3154 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
3155 ndr->depth++;
3156 if (r->in.MachineName) {
3157 ndr_print_string(ndr, "MachineName", r->in.MachineName);
3159 ndr->depth--;
3160 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
3161 ndr->depth++;
3162 if (r->in.DatabaseName) {
3163 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
3165 ndr->depth--;
3166 ndr_print_svcctl_MgrAccessMask(ndr, "access_mask", r->in.access_mask);
3167 ndr->depth--;
3169 if (flags & NDR_OUT) {
3170 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerW");
3171 ndr->depth++;
3172 ndr_print_ptr(ndr, "handle", r->out.handle);
3173 ndr->depth++;
3174 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3175 ndr->depth--;
3176 ndr_print_WERROR(ndr, "result", r->out.result);
3177 ndr->depth--;
3179 ndr->depth--;
3182 static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
3184 if (flags & NDR_IN) {
3185 if (r->in.scmanager_handle == NULL) {
3186 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3188 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3189 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3190 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3191 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3192 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3193 NDR_CHECK(ndr_push_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3195 if (flags & NDR_OUT) {
3196 if (r->out.handle == NULL) {
3197 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3199 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3200 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3202 return NDR_ERR_SUCCESS;
3205 static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
3207 TALLOC_CTX *_mem_save_scmanager_handle_0;
3208 TALLOC_CTX *_mem_save_handle_0;
3209 if (flags & NDR_IN) {
3210 ZERO_STRUCT(r->out);
3212 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3213 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
3215 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3216 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
3217 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
3219 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
3220 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
3221 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
3222 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));
3224 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
3225 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
3226 NDR_CHECK(ndr_pull_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3227 NDR_PULL_ALLOC(ndr, r->out.handle);
3228 ZERO_STRUCTP(r->out.handle);
3230 if (flags & NDR_OUT) {
3231 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3232 NDR_PULL_ALLOC(ndr, r->out.handle);
3234 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3235 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3236 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3237 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3238 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3240 return NDR_ERR_SUCCESS;
3243 _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r)
3245 ndr_print_struct(ndr, name, "svcctl_OpenServiceW");
3246 ndr->depth++;
3247 if (flags & NDR_SET_VALUES) {
3248 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3250 if (flags & NDR_IN) {
3251 ndr_print_struct(ndr, "in", "svcctl_OpenServiceW");
3252 ndr->depth++;
3253 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
3254 ndr->depth++;
3255 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
3256 ndr->depth--;
3257 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
3258 ndr_print_svcctl_ServiceAccessMask(ndr, "access_mask", r->in.access_mask);
3259 ndr->depth--;
3261 if (flags & NDR_OUT) {
3262 ndr_print_struct(ndr, "out", "svcctl_OpenServiceW");
3263 ndr->depth++;
3264 ndr_print_ptr(ndr, "handle", r->out.handle);
3265 ndr->depth++;
3266 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3267 ndr->depth--;
3268 ndr_print_WERROR(ndr, "result", r->out.result);
3269 ndr->depth--;
3271 ndr->depth--;
3274 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
3276 if (flags & NDR_IN) {
3277 if (r->in.handle == NULL) {
3278 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3280 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3283 if (flags & NDR_OUT) {
3284 if (r->out.query == NULL) {
3285 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3287 NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3288 if (r->out.needed == NULL) {
3289 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3292 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3294 return NDR_ERR_SUCCESS;
3297 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
3299 TALLOC_CTX *_mem_save_handle_0;
3300 TALLOC_CTX *_mem_save_query_0;
3301 TALLOC_CTX *_mem_save_needed_0;
3302 if (flags & NDR_IN) {
3303 ZERO_STRUCT(r->out);
3305 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3306 NDR_PULL_ALLOC(ndr, r->in.handle);
3308 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3309 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3310 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3311 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3312 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3313 if (r->in.offered > 8192) {
3314 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3316 NDR_PULL_ALLOC(ndr, r->out.query);
3317 ZERO_STRUCTP(r->out.query);
3318 NDR_PULL_ALLOC(ndr, r->out.needed);
3319 ZERO_STRUCTP(r->out.needed);
3321 if (flags & NDR_OUT) {
3322 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3323 NDR_PULL_ALLOC(ndr, r->out.query);
3325 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
3326 NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
3327 NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
3329 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3330 NDR_PULL_ALLOC(ndr, r->out.needed);
3332 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3333 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3334 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3335 if (*r->out.needed > 8192) {
3336 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3338 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3339 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3341 return NDR_ERR_SUCCESS;
3344 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r)
3346 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigW");
3347 ndr->depth++;
3348 if (flags & NDR_SET_VALUES) {
3349 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3351 if (flags & NDR_IN) {
3352 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigW");
3353 ndr->depth++;
3354 ndr_print_ptr(ndr, "handle", r->in.handle);
3355 ndr->depth++;
3356 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3357 ndr->depth--;
3358 ndr_print_uint32(ndr, "offered", r->in.offered);
3359 ndr->depth--;
3361 if (flags & NDR_OUT) {
3362 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
3363 ndr->depth++;
3364 ndr_print_ptr(ndr, "query", r->out.query);
3365 ndr->depth++;
3366 ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
3367 ndr->depth--;
3368 ndr_print_ptr(ndr, "needed", r->out.needed);
3369 ndr->depth++;
3370 ndr_print_uint32(ndr, "needed", *r->out.needed);
3371 ndr->depth--;
3372 ndr_print_WERROR(ndr, "result", r->out.result);
3373 ndr->depth--;
3375 ndr->depth--;
3378 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3380 if (flags & NDR_IN) {
3381 if (r->in.handle == NULL) {
3382 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3384 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3387 if (flags & NDR_OUT) {
3388 if (r->out.lock_status == NULL) {
3389 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3391 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3392 if (r->out.needed == NULL) {
3393 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3396 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3398 return NDR_ERR_SUCCESS;
3401 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
3403 TALLOC_CTX *_mem_save_handle_0;
3404 TALLOC_CTX *_mem_save_lock_status_0;
3405 TALLOC_CTX *_mem_save_needed_0;
3406 if (flags & NDR_IN) {
3407 ZERO_STRUCT(r->out);
3409 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3410 NDR_PULL_ALLOC(ndr, r->in.handle);
3412 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3413 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3414 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3415 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3417 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3418 ZERO_STRUCTP(r->out.lock_status);
3419 NDR_PULL_ALLOC(ndr, r->out.needed);
3420 ZERO_STRUCTP(r->out.needed);
3422 if (flags & NDR_OUT) {
3423 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3424 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3426 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3427 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
3428 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3429 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
3430 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3431 NDR_PULL_ALLOC(ndr, r->out.needed);
3433 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3434 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3436 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3437 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3439 return NDR_ERR_SUCCESS;
3442 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3444 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusW");
3445 ndr->depth++;
3446 if (flags & NDR_SET_VALUES) {
3447 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3449 if (flags & NDR_IN) {
3450 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusW");
3451 ndr->depth++;
3452 ndr_print_ptr(ndr, "handle", r->in.handle);
3453 ndr->depth++;
3454 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3455 ndr->depth--;
3456 ndr_print_uint32(ndr, "offered", r->in.offered);
3457 ndr->depth--;
3459 if (flags & NDR_OUT) {
3460 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusW");
3461 ndr->depth++;
3462 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
3463 ndr->depth++;
3464 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
3465 ndr->depth--;
3466 ndr_print_ptr(ndr, "needed", r->out.needed);
3467 ndr->depth++;
3468 ndr_print_uint32(ndr, "needed", *r->out.needed);
3469 ndr->depth--;
3470 ndr_print_WERROR(ndr, "result", r->out.result);
3471 ndr->depth--;
3473 ndr->depth--;
3476 static enum ndr_err_code ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
3478 uint32_t cntr_Arguments_1;
3479 if (flags & NDR_IN) {
3480 if (r->in.handle == NULL) {
3481 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3483 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
3485 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
3486 if (r->in.Arguments) {
3487 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.NumArgs));
3488 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3489 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3491 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3492 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3496 if (flags & NDR_OUT) {
3497 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3499 return NDR_ERR_SUCCESS;
3502 static enum ndr_err_code ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
3504 uint32_t _ptr_Arguments;
3505 uint32_t cntr_Arguments_1;
3506 TALLOC_CTX *_mem_save_handle_0;
3507 TALLOC_CTX *_mem_save_Arguments_0;
3508 TALLOC_CTX *_mem_save_Arguments_1;
3509 if (flags & NDR_IN) {
3510 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3511 NDR_PULL_ALLOC(ndr, r->in.handle);
3513 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3514 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3515 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3516 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3517 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
3518 if (r->in.NumArgs > SC_MAX_ARGUMENTS) {
3519 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3521 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
3522 if (_ptr_Arguments) {
3523 NDR_PULL_ALLOC(ndr, r->in.Arguments);
3524 } else {
3525 r->in.Arguments = NULL;
3527 if (r->in.Arguments) {
3528 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
3529 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3530 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
3531 NDR_PULL_ALLOC_N(ndr, r->in.Arguments, ndr_get_array_size(ndr, &r->in.Arguments));
3532 _mem_save_Arguments_1 = NDR_PULL_GET_MEM_CTX(ndr);
3533 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3534 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3535 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3537 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3538 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3540 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_1, 0);
3541 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
3543 if (r->in.Arguments) {
3544 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.Arguments, r->in.NumArgs));
3547 if (flags & NDR_OUT) {
3548 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3550 return NDR_ERR_SUCCESS;
3553 _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r)
3555 uint32_t cntr_Arguments_1;
3556 ndr_print_struct(ndr, name, "svcctl_StartServiceW");
3557 ndr->depth++;
3558 if (flags & NDR_SET_VALUES) {
3559 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3561 if (flags & NDR_IN) {
3562 ndr_print_struct(ndr, "in", "svcctl_StartServiceW");
3563 ndr->depth++;
3564 ndr_print_ptr(ndr, "handle", r->in.handle);
3565 ndr->depth++;
3566 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3567 ndr->depth--;
3568 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
3569 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
3570 ndr->depth++;
3571 if (r->in.Arguments) {
3572 ndr->print(ndr, "%s: ARRAY(%d)", "Arguments", (int)r->in.NumArgs);
3573 ndr->depth++;
3574 for (cntr_Arguments_1=0;cntr_Arguments_1<r->in.NumArgs;cntr_Arguments_1++) {
3575 char *idx_1=NULL;
3576 if (asprintf(&idx_1, "[%d]", cntr_Arguments_1) != -1) {
3577 ndr_print_svcctl_ArgumentString(ndr, "Arguments", &r->in.Arguments[cntr_Arguments_1]);
3578 free(idx_1);
3581 ndr->depth--;
3583 ndr->depth--;
3584 ndr->depth--;
3586 if (flags & NDR_OUT) {
3587 ndr_print_struct(ndr, "out", "svcctl_StartServiceW");
3588 ndr->depth++;
3589 ndr_print_WERROR(ndr, "result", r->out.result);
3590 ndr->depth--;
3592 ndr->depth--;
3595 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3597 if (flags & NDR_IN) {
3598 if (r->in.handle == NULL) {
3599 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3601 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3602 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3603 if (r->in.service_name) {
3604 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3605 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3606 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3607 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));
3609 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3610 if (r->in.display_name_length) {
3611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3614 if (flags & NDR_OUT) {
3615 if (r->out.display_name == NULL) {
3616 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3618 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
3619 if (*r->out.display_name) {
3620 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3621 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3623 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));
3625 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3626 if (r->out.display_name_length) {
3627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3629 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3631 return NDR_ERR_SUCCESS;
3634 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
3636 uint32_t _ptr_service_name;
3637 uint32_t _ptr_display_name;
3638 uint32_t _ptr_display_name_length;
3639 TALLOC_CTX *_mem_save_handle_0;
3640 TALLOC_CTX *_mem_save_service_name_0;
3641 TALLOC_CTX *_mem_save_display_name_0;
3642 TALLOC_CTX *_mem_save_display_name_1;
3643 TALLOC_CTX *_mem_save_display_name_length_0;
3644 if (flags & NDR_IN) {
3645 ZERO_STRUCT(r->out);
3647 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3648 NDR_PULL_ALLOC(ndr, r->in.handle);
3650 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3651 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3652 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3653 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3654 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3655 if (_ptr_service_name) {
3656 NDR_PULL_ALLOC(ndr, r->in.service_name);
3657 } else {
3658 r->in.service_name = NULL;
3660 if (r->in.service_name) {
3661 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3662 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3663 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3664 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3665 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3666 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));
3668 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3669 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));
3670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3672 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3673 if (_ptr_display_name_length) {
3674 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3675 } else {
3676 r->in.display_name_length = NULL;
3678 if (r->in.display_name_length) {
3679 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3680 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3681 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3682 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3684 NDR_PULL_ALLOC(ndr, r->out.display_name);
3685 ZERO_STRUCTP(r->out.display_name);
3687 if (flags & NDR_OUT) {
3688 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3689 NDR_PULL_ALLOC(ndr, r->out.display_name);
3691 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3692 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
3693 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
3694 if (_ptr_display_name) {
3695 NDR_PULL_ALLOC(ndr, *r->out.display_name);
3696 } else {
3697 *r->out.display_name = NULL;
3699 if (*r->out.display_name) {
3700 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3701 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
3702 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
3703 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
3704 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
3705 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));
3707 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
3708 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));
3709 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
3711 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
3712 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3713 if (_ptr_display_name_length) {
3714 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3715 } else {
3716 r->out.display_name_length = NULL;
3718 if (r->out.display_name_length) {
3719 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3720 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3721 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3722 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3724 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3726 return NDR_ERR_SUCCESS;
3729 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3731 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameW");
3732 ndr->depth++;
3733 if (flags & NDR_SET_VALUES) {
3734 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3736 if (flags & NDR_IN) {
3737 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameW");
3738 ndr->depth++;
3739 ndr_print_ptr(ndr, "handle", r->in.handle);
3740 ndr->depth++;
3741 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3742 ndr->depth--;
3743 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3744 ndr->depth++;
3745 if (r->in.service_name) {
3746 ndr_print_string(ndr, "service_name", r->in.service_name);
3748 ndr->depth--;
3749 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3750 ndr->depth++;
3751 if (r->in.display_name_length) {
3752 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3754 ndr->depth--;
3755 ndr->depth--;
3757 if (flags & NDR_OUT) {
3758 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameW");
3759 ndr->depth++;
3760 ndr_print_ptr(ndr, "display_name", r->out.display_name);
3761 ndr->depth++;
3762 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
3763 ndr->depth++;
3764 if (*r->out.display_name) {
3765 ndr_print_string(ndr, "display_name", *r->out.display_name);
3767 ndr->depth--;
3768 ndr->depth--;
3769 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3770 ndr->depth++;
3771 if (r->out.display_name_length) {
3772 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3774 ndr->depth--;
3775 ndr_print_WERROR(ndr, "result", r->out.result);
3776 ndr->depth--;
3778 ndr->depth--;
3781 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
3783 if (flags & NDR_IN) {
3784 if (r->in.handle == NULL) {
3785 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3787 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3788 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3789 if (r->in.service_name) {
3790 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3791 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3792 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3793 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));
3795 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3796 if (r->in.display_name_length) {
3797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3800 if (flags & NDR_OUT) {
3801 if (r->out.key_name == NULL) {
3802 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3804 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
3805 if (*r->out.key_name) {
3806 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3807 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3808 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3809 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));
3811 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3812 if (r->out.display_name_length) {
3813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3815 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3817 return NDR_ERR_SUCCESS;
3820 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
3822 uint32_t _ptr_service_name;
3823 uint32_t _ptr_key_name;
3824 uint32_t _ptr_display_name_length;
3825 TALLOC_CTX *_mem_save_handle_0;
3826 TALLOC_CTX *_mem_save_service_name_0;
3827 TALLOC_CTX *_mem_save_key_name_0;
3828 TALLOC_CTX *_mem_save_key_name_1;
3829 TALLOC_CTX *_mem_save_display_name_length_0;
3830 if (flags & NDR_IN) {
3831 ZERO_STRUCT(r->out);
3833 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3834 NDR_PULL_ALLOC(ndr, r->in.handle);
3836 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3837 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3838 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3840 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3841 if (_ptr_service_name) {
3842 NDR_PULL_ALLOC(ndr, r->in.service_name);
3843 } else {
3844 r->in.service_name = NULL;
3846 if (r->in.service_name) {
3847 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3848 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3849 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3850 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3851 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3852 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));
3854 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3855 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));
3856 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3858 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3859 if (_ptr_display_name_length) {
3860 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3861 } else {
3862 r->in.display_name_length = NULL;
3864 if (r->in.display_name_length) {
3865 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3866 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3867 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3868 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3870 NDR_PULL_ALLOC(ndr, r->out.key_name);
3871 ZERO_STRUCTP(r->out.key_name);
3873 if (flags & NDR_OUT) {
3874 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3875 NDR_PULL_ALLOC(ndr, r->out.key_name);
3877 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3878 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
3879 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
3880 if (_ptr_key_name) {
3881 NDR_PULL_ALLOC(ndr, *r->out.key_name);
3882 } else {
3883 *r->out.key_name = NULL;
3885 if (*r->out.key_name) {
3886 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3887 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
3888 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
3889 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
3890 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
3891 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));
3893 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
3894 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));
3895 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
3897 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
3898 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3899 if (_ptr_display_name_length) {
3900 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3901 } else {
3902 r->out.display_name_length = NULL;
3904 if (r->out.display_name_length) {
3905 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3906 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3907 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3910 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3912 return NDR_ERR_SUCCESS;
3915 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r)
3917 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameW");
3918 ndr->depth++;
3919 if (flags & NDR_SET_VALUES) {
3920 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3922 if (flags & NDR_IN) {
3923 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameW");
3924 ndr->depth++;
3925 ndr_print_ptr(ndr, "handle", r->in.handle);
3926 ndr->depth++;
3927 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3928 ndr->depth--;
3929 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3930 ndr->depth++;
3931 if (r->in.service_name) {
3932 ndr_print_string(ndr, "service_name", r->in.service_name);
3934 ndr->depth--;
3935 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3936 ndr->depth++;
3937 if (r->in.display_name_length) {
3938 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3940 ndr->depth--;
3941 ndr->depth--;
3943 if (flags & NDR_OUT) {
3944 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameW");
3945 ndr->depth++;
3946 ndr_print_ptr(ndr, "key_name", r->out.key_name);
3947 ndr->depth++;
3948 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
3949 ndr->depth++;
3950 if (*r->out.key_name) {
3951 ndr_print_string(ndr, "key_name", *r->out.key_name);
3953 ndr->depth--;
3954 ndr->depth--;
3955 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3956 ndr->depth++;
3957 if (r->out.display_name_length) {
3958 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3960 ndr->depth--;
3961 ndr_print_WERROR(ndr, "result", r->out.result);
3962 ndr->depth--;
3964 ndr->depth--;
3967 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
3969 if (flags & NDR_IN) {
3970 if (r->in.handle == NULL) {
3971 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3973 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
3975 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
3976 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
3978 if (flags & NDR_OUT) {
3979 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3981 return NDR_ERR_SUCCESS;
3984 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
3986 TALLOC_CTX *_mem_save_handle_0;
3987 if (flags & NDR_IN) {
3988 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3989 NDR_PULL_ALLOC(ndr, r->in.handle);
3991 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3992 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3993 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3994 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3995 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
3996 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
3997 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
3999 if (flags & NDR_OUT) {
4000 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4002 return NDR_ERR_SUCCESS;
4005 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r)
4007 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsA");
4008 ndr->depth++;
4009 if (flags & NDR_SET_VALUES) {
4010 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4012 if (flags & NDR_IN) {
4013 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsA");
4014 ndr->depth++;
4015 ndr_print_ptr(ndr, "handle", r->in.handle);
4016 ndr->depth++;
4017 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4018 ndr->depth--;
4019 ndr_print_uint32(ndr, "bits", r->in.bits);
4020 ndr_print_uint32(ndr, "bitson", r->in.bitson);
4021 ndr_print_uint32(ndr, "immediate", r->in.immediate);
4022 ndr->depth--;
4024 if (flags & NDR_OUT) {
4025 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsA");
4026 ndr->depth++;
4027 ndr_print_WERROR(ndr, "result", r->out.result);
4028 ndr->depth--;
4030 ndr->depth--;
4033 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
4035 if (flags & NDR_IN) {
4036 if (r->in.handle == NULL) {
4037 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4039 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4041 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4042 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4043 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4044 if (r->in.binary_path) {
4045 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4046 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4047 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4048 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));
4050 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
4051 if (r->in.load_order_group) {
4052 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4053 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4054 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4055 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));
4057 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4058 if (r->in.dependencies) {
4059 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4060 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4061 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4062 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4064 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4065 if (r->in.service_start_name) {
4066 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4067 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4068 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4069 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));
4071 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4072 if (r->in.password) {
4073 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4074 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4075 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4076 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4078 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
4079 if (r->in.display_name) {
4080 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4081 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4082 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4083 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));
4086 if (flags & NDR_OUT) {
4087 if (r->out.tag_id == NULL) {
4088 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
4091 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4093 return NDR_ERR_SUCCESS;
4096 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
4098 uint32_t _ptr_binary_path;
4099 uint32_t _ptr_load_order_group;
4100 uint32_t _ptr_dependencies;
4101 uint32_t _ptr_service_start_name;
4102 uint32_t _ptr_password;
4103 uint32_t _ptr_display_name;
4104 TALLOC_CTX *_mem_save_handle_0;
4105 TALLOC_CTX *_mem_save_binary_path_0;
4106 TALLOC_CTX *_mem_save_load_order_group_0;
4107 TALLOC_CTX *_mem_save_tag_id_0;
4108 TALLOC_CTX *_mem_save_dependencies_0;
4109 TALLOC_CTX *_mem_save_service_start_name_0;
4110 TALLOC_CTX *_mem_save_password_0;
4111 TALLOC_CTX *_mem_save_display_name_0;
4112 if (flags & NDR_IN) {
4113 ZERO_STRUCT(r->out);
4115 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4116 NDR_PULL_ALLOC(ndr, r->in.handle);
4118 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4119 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4120 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4122 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4123 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4124 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4125 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4126 if (_ptr_binary_path) {
4127 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4128 } else {
4129 r->in.binary_path = NULL;
4131 if (r->in.binary_path) {
4132 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4133 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4134 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4135 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4136 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4137 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));
4139 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4140 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));
4141 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4143 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
4144 if (_ptr_load_order_group) {
4145 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
4146 } else {
4147 r->in.load_order_group = NULL;
4149 if (r->in.load_order_group) {
4150 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4151 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
4152 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
4153 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
4154 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
4155 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));
4157 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
4158 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));
4159 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
4161 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4162 if (_ptr_dependencies) {
4163 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4164 } else {
4165 r->in.dependencies = NULL;
4167 if (r->in.dependencies) {
4168 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4169 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4170 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4171 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4172 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4173 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));
4175 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4176 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4179 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4180 if (_ptr_service_start_name) {
4181 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4182 } else {
4183 r->in.service_start_name = NULL;
4185 if (r->in.service_start_name) {
4186 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4187 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4188 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4189 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4190 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4191 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));
4193 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4194 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));
4195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4197 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4198 if (_ptr_password) {
4199 NDR_PULL_ALLOC(ndr, r->in.password);
4200 } else {
4201 r->in.password = NULL;
4203 if (r->in.password) {
4204 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4205 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4206 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4207 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4208 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4209 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));
4211 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4212 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4213 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4215 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
4216 if (_ptr_display_name) {
4217 NDR_PULL_ALLOC(ndr, r->in.display_name);
4218 } else {
4219 r->in.display_name = NULL;
4221 if (r->in.display_name) {
4222 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4223 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
4224 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
4225 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
4226 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
4227 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));
4229 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
4230 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));
4231 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
4233 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4234 ZERO_STRUCTP(r->out.tag_id);
4236 if (flags & NDR_OUT) {
4237 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4238 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4240 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
4241 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
4242 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
4243 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
4244 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4246 return NDR_ERR_SUCCESS;
4249 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r)
4251 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigA");
4252 ndr->depth++;
4253 if (flags & NDR_SET_VALUES) {
4254 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4256 if (flags & NDR_IN) {
4257 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigA");
4258 ndr->depth++;
4259 ndr_print_ptr(ndr, "handle", r->in.handle);
4260 ndr->depth++;
4261 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4262 ndr->depth--;
4263 ndr_print_uint32(ndr, "type", r->in.type);
4264 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4265 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4266 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4267 ndr->depth++;
4268 if (r->in.binary_path) {
4269 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4271 ndr->depth--;
4272 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
4273 ndr->depth++;
4274 if (r->in.load_order_group) {
4275 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
4277 ndr->depth--;
4278 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4279 ndr->depth++;
4280 if (r->in.dependencies) {
4281 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4283 ndr->depth--;
4284 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4285 ndr->depth++;
4286 if (r->in.service_start_name) {
4287 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4289 ndr->depth--;
4290 ndr_print_ptr(ndr, "password", r->in.password);
4291 ndr->depth++;
4292 if (r->in.password) {
4293 ndr_print_string(ndr, "password", r->in.password);
4295 ndr->depth--;
4296 ndr_print_ptr(ndr, "display_name", r->in.display_name);
4297 ndr->depth++;
4298 if (r->in.display_name) {
4299 ndr_print_string(ndr, "display_name", r->in.display_name);
4301 ndr->depth--;
4302 ndr->depth--;
4304 if (flags & NDR_OUT) {
4305 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigA");
4306 ndr->depth++;
4307 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
4308 ndr->depth++;
4309 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
4310 ndr->depth--;
4311 ndr_print_WERROR(ndr, "result", r->out.result);
4312 ndr->depth--;
4314 ndr->depth--;
4317 static enum ndr_err_code ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
4319 if (flags & NDR_IN) {
4320 if (r->in.handle == NULL) {
4321 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4323 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4324 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
4325 if (r->in.ServiceName) {
4326 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4327 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4328 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4329 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4331 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
4332 if (r->in.DisplayName) {
4333 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4334 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4335 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4336 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4338 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
4339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4340 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4341 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4342 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4343 if (r->in.binary_path) {
4344 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4345 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4346 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4347 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));
4349 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
4350 if (r->in.LoadOrderGroupKey) {
4351 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4352 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4353 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4354 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4356 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4357 if (r->in.dependencies) {
4358 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4359 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4360 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4361 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4363 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4364 if (r->in.service_start_name) {
4365 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4366 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4367 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4368 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));
4370 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4371 if (r->in.password) {
4372 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4373 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4374 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4375 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4378 if (flags & NDR_OUT) {
4379 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
4380 if (r->out.TagId) {
4381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
4383 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4385 return NDR_ERR_SUCCESS;
4388 static enum ndr_err_code ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
4390 uint32_t _ptr_ServiceName;
4391 uint32_t _ptr_DisplayName;
4392 uint32_t _ptr_binary_path;
4393 uint32_t _ptr_LoadOrderGroupKey;
4394 uint32_t _ptr_TagId;
4395 uint32_t _ptr_dependencies;
4396 uint32_t _ptr_service_start_name;
4397 uint32_t _ptr_password;
4398 TALLOC_CTX *_mem_save_handle_0;
4399 TALLOC_CTX *_mem_save_ServiceName_0;
4400 TALLOC_CTX *_mem_save_DisplayName_0;
4401 TALLOC_CTX *_mem_save_binary_path_0;
4402 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
4403 TALLOC_CTX *_mem_save_TagId_0;
4404 TALLOC_CTX *_mem_save_dependencies_0;
4405 TALLOC_CTX *_mem_save_service_start_name_0;
4406 TALLOC_CTX *_mem_save_password_0;
4407 if (flags & NDR_IN) {
4408 ZERO_STRUCT(r->out);
4410 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4411 NDR_PULL_ALLOC(ndr, r->in.handle);
4413 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4414 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4415 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4416 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4417 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
4418 if (_ptr_ServiceName) {
4419 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
4420 } else {
4421 r->in.ServiceName = NULL;
4423 if (r->in.ServiceName) {
4424 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4425 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
4426 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
4427 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
4428 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
4429 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));
4431 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
4432 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
4433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
4435 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
4436 if (_ptr_DisplayName) {
4437 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
4438 } else {
4439 r->in.DisplayName = NULL;
4441 if (r->in.DisplayName) {
4442 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4443 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
4444 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
4445 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
4446 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
4447 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));
4449 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
4450 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
4451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
4453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
4454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4455 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4456 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4457 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4458 if (_ptr_binary_path) {
4459 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4460 } else {
4461 r->in.binary_path = NULL;
4463 if (r->in.binary_path) {
4464 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4465 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4466 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4467 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4468 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4469 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));
4471 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4472 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));
4473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4475 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
4476 if (_ptr_LoadOrderGroupKey) {
4477 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
4478 } else {
4479 r->in.LoadOrderGroupKey = NULL;
4481 if (r->in.LoadOrderGroupKey) {
4482 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
4483 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
4484 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
4485 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
4486 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
4487 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));
4489 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
4490 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
4491 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
4493 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4494 if (_ptr_dependencies) {
4495 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4496 } else {
4497 r->in.dependencies = NULL;
4499 if (r->in.dependencies) {
4500 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4501 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4502 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4503 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4504 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4505 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));
4507 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4508 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4509 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4511 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4512 if (_ptr_service_start_name) {
4513 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4514 } else {
4515 r->in.service_start_name = NULL;
4517 if (r->in.service_start_name) {
4518 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4519 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4520 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4521 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4522 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4523 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));
4525 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4526 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));
4527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4529 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4530 if (_ptr_password) {
4531 NDR_PULL_ALLOC(ndr, r->in.password);
4532 } else {
4533 r->in.password = NULL;
4535 if (r->in.password) {
4536 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4537 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4538 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4539 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4540 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4541 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));
4543 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4544 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4548 if (flags & NDR_OUT) {
4549 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
4550 if (_ptr_TagId) {
4551 NDR_PULL_ALLOC(ndr, r->out.TagId);
4552 } else {
4553 r->out.TagId = NULL;
4555 if (r->out.TagId) {
4556 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
4557 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
4558 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
4559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
4561 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4563 return NDR_ERR_SUCCESS;
4566 _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r)
4568 ndr_print_struct(ndr, name, "svcctl_CreateServiceA");
4569 ndr->depth++;
4570 if (flags & NDR_SET_VALUES) {
4571 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4573 if (flags & NDR_IN) {
4574 ndr_print_struct(ndr, "in", "svcctl_CreateServiceA");
4575 ndr->depth++;
4576 ndr_print_ptr(ndr, "handle", r->in.handle);
4577 ndr->depth++;
4578 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4579 ndr->depth--;
4580 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
4581 ndr->depth++;
4582 if (r->in.ServiceName) {
4583 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
4585 ndr->depth--;
4586 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
4587 ndr->depth++;
4588 if (r->in.DisplayName) {
4589 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
4591 ndr->depth--;
4592 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
4593 ndr_print_uint32(ndr, "type", r->in.type);
4594 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4595 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4596 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4597 ndr->depth++;
4598 if (r->in.binary_path) {
4599 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4601 ndr->depth--;
4602 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4603 ndr->depth++;
4604 if (r->in.LoadOrderGroupKey) {
4605 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4607 ndr->depth--;
4608 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4609 ndr->depth++;
4610 if (r->in.dependencies) {
4611 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4613 ndr->depth--;
4614 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4615 ndr->depth++;
4616 if (r->in.service_start_name) {
4617 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4619 ndr->depth--;
4620 ndr_print_ptr(ndr, "password", r->in.password);
4621 ndr->depth++;
4622 if (r->in.password) {
4623 ndr_print_string(ndr, "password", r->in.password);
4625 ndr->depth--;
4626 ndr->depth--;
4628 if (flags & NDR_OUT) {
4629 ndr_print_struct(ndr, "out", "svcctl_CreateServiceA");
4630 ndr->depth++;
4631 ndr_print_ptr(ndr, "TagId", r->out.TagId);
4632 ndr->depth++;
4633 if (r->out.TagId) {
4634 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
4636 ndr->depth--;
4637 ndr_print_WERROR(ndr, "result", r->out.result);
4638 ndr->depth--;
4640 ndr->depth--;
4643 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
4645 if (flags & NDR_IN) {
4646 if (r->in.service == NULL) {
4647 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4649 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
4650 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
4651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4653 if (flags & NDR_OUT) {
4654 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status));
4655 if (r->out.service_status) {
4656 NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4658 if (r->out.needed == NULL) {
4659 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4662 if (r->out.services_returned == NULL) {
4663 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4666 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4668 return NDR_ERR_SUCCESS;
4671 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
4673 uint32_t _ptr_service_status;
4674 TALLOC_CTX *_mem_save_service_0;
4675 TALLOC_CTX *_mem_save_service_status_0;
4676 TALLOC_CTX *_mem_save_needed_0;
4677 TALLOC_CTX *_mem_save_services_returned_0;
4678 if (flags & NDR_IN) {
4679 ZERO_STRUCT(r->out);
4681 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4682 NDR_PULL_ALLOC(ndr, r->in.service);
4684 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
4685 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
4686 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
4687 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
4688 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
4689 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4690 NDR_PULL_ALLOC(ndr, r->out.needed);
4691 ZERO_STRUCTP(r->out.needed);
4692 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4693 ZERO_STRUCTP(r->out.services_returned);
4695 if (flags & NDR_OUT) {
4696 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_status));
4697 if (_ptr_service_status) {
4698 NDR_PULL_ALLOC(ndr, r->out.service_status);
4699 } else {
4700 r->out.service_status = NULL;
4702 if (r->out.service_status) {
4703 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
4704 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, 0);
4705 NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
4708 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4709 NDR_PULL_ALLOC(ndr, r->out.needed);
4711 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4712 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4714 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4715 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4716 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4718 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4719 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4720 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4721 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4722 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4724 return NDR_ERR_SUCCESS;
4727 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r)
4729 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesA");
4730 ndr->depth++;
4731 if (flags & NDR_SET_VALUES) {
4732 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4734 if (flags & NDR_IN) {
4735 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesA");
4736 ndr->depth++;
4737 ndr_print_ptr(ndr, "service", r->in.service);
4738 ndr->depth++;
4739 ndr_print_policy_handle(ndr, "service", r->in.service);
4740 ndr->depth--;
4741 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
4742 ndr_print_uint32(ndr, "offered", r->in.offered);
4743 ndr->depth--;
4745 if (flags & NDR_OUT) {
4746 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesA");
4747 ndr->depth++;
4748 ndr_print_ptr(ndr, "service_status", r->out.service_status);
4749 ndr->depth++;
4750 if (r->out.service_status) {
4751 ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status);
4753 ndr->depth--;
4754 ndr_print_ptr(ndr, "needed", r->out.needed);
4755 ndr->depth++;
4756 ndr_print_uint32(ndr, "needed", *r->out.needed);
4757 ndr->depth--;
4758 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4759 ndr->depth++;
4760 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4761 ndr->depth--;
4762 ndr_print_WERROR(ndr, "result", r->out.result);
4763 ndr->depth--;
4765 ndr->depth--;
4768 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
4770 if (flags & NDR_IN) {
4771 if (r->in.handle == NULL) {
4772 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4774 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4775 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4776 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
4777 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4778 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
4779 if (r->in.resume_handle) {
4780 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
4783 if (flags & NDR_OUT) {
4784 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
4785 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
4786 if (r->out.needed == NULL) {
4787 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4790 if (r->out.services_returned == NULL) {
4791 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4793 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4794 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
4795 if (r->out.resume_handle) {
4796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
4798 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4800 return NDR_ERR_SUCCESS;
4803 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
4805 uint32_t _ptr_resume_handle;
4806 TALLOC_CTX *_mem_save_handle_0;
4807 TALLOC_CTX *_mem_save_needed_0;
4808 TALLOC_CTX *_mem_save_services_returned_0;
4809 TALLOC_CTX *_mem_save_resume_handle_0;
4810 if (flags & NDR_IN) {
4811 ZERO_STRUCT(r->out);
4813 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4814 NDR_PULL_ALLOC(ndr, r->in.handle);
4816 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4817 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4818 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4819 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4820 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4821 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
4822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4823 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4824 if (_ptr_resume_handle) {
4825 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
4826 } else {
4827 r->in.resume_handle = NULL;
4829 if (r->in.resume_handle) {
4830 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4831 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
4832 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
4833 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4835 NDR_PULL_ALLOC(ndr, r->out.needed);
4836 ZERO_STRUCTP(r->out.needed);
4837 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4838 ZERO_STRUCTP(r->out.services_returned);
4840 if (flags & NDR_OUT) {
4841 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
4842 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
4843 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
4844 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4845 NDR_PULL_ALLOC(ndr, r->out.needed);
4847 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4848 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4849 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4850 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4851 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4852 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4854 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4855 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4856 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4857 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4858 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4859 if (_ptr_resume_handle) {
4860 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
4861 } else {
4862 r->out.resume_handle = NULL;
4864 if (r->out.resume_handle) {
4865 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4866 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
4867 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
4868 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4870 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4871 if (r->out.service) {
4872 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
4875 return NDR_ERR_SUCCESS;
4878 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r)
4880 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusA");
4881 ndr->depth++;
4882 if (flags & NDR_SET_VALUES) {
4883 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4885 if (flags & NDR_IN) {
4886 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusA");
4887 ndr->depth++;
4888 ndr_print_ptr(ndr, "handle", r->in.handle);
4889 ndr->depth++;
4890 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4891 ndr->depth--;
4892 ndr_print_uint32(ndr, "type", r->in.type);
4893 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
4894 ndr_print_uint32(ndr, "offered", r->in.offered);
4895 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
4896 ndr->depth++;
4897 if (r->in.resume_handle) {
4898 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
4900 ndr->depth--;
4901 ndr->depth--;
4903 if (flags & NDR_OUT) {
4904 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
4905 ndr->depth++;
4906 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
4907 ndr_print_ptr(ndr, "needed", r->out.needed);
4908 ndr->depth++;
4909 ndr_print_uint32(ndr, "needed", *r->out.needed);
4910 ndr->depth--;
4911 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4912 ndr->depth++;
4913 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4914 ndr->depth--;
4915 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
4916 ndr->depth++;
4917 if (r->out.resume_handle) {
4918 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
4920 ndr->depth--;
4921 ndr_print_WERROR(ndr, "result", r->out.result);
4922 ndr->depth--;
4924 ndr->depth--;
4927 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
4929 if (flags & NDR_IN) {
4930 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
4931 if (r->in.MachineName) {
4932 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4933 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4934 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4935 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4937 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
4938 if (r->in.DatabaseName) {
4939 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4940 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4941 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4942 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4944 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
4946 if (flags & NDR_OUT) {
4947 if (r->out.handle == NULL) {
4948 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4950 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4951 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4953 return NDR_ERR_SUCCESS;
4956 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
4958 uint32_t _ptr_MachineName;
4959 uint32_t _ptr_DatabaseName;
4960 TALLOC_CTX *_mem_save_MachineName_0;
4961 TALLOC_CTX *_mem_save_DatabaseName_0;
4962 TALLOC_CTX *_mem_save_handle_0;
4963 if (flags & NDR_IN) {
4964 ZERO_STRUCT(r->out);
4966 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
4967 if (_ptr_MachineName) {
4968 NDR_PULL_ALLOC(ndr, r->in.MachineName);
4969 } else {
4970 r->in.MachineName = NULL;
4972 if (r->in.MachineName) {
4973 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4974 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
4975 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
4976 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
4977 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
4978 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));
4980 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
4981 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
4982 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
4984 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
4985 if (_ptr_DatabaseName) {
4986 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
4987 } else {
4988 r->in.DatabaseName = NULL;
4990 if (r->in.DatabaseName) {
4991 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4992 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
4993 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
4994 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
4995 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
4996 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));
4998 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
4999 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
5000 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
5002 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5003 NDR_PULL_ALLOC(ndr, r->out.handle);
5004 ZERO_STRUCTP(r->out.handle);
5006 if (flags & NDR_OUT) {
5007 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5008 NDR_PULL_ALLOC(ndr, r->out.handle);
5010 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5011 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5012 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5014 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5016 return NDR_ERR_SUCCESS;
5019 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r)
5021 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerA");
5022 ndr->depth++;
5023 if (flags & NDR_SET_VALUES) {
5024 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5026 if (flags & NDR_IN) {
5027 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerA");
5028 ndr->depth++;
5029 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
5030 ndr->depth++;
5031 if (r->in.MachineName) {
5032 ndr_print_string(ndr, "MachineName", r->in.MachineName);
5034 ndr->depth--;
5035 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
5036 ndr->depth++;
5037 if (r->in.DatabaseName) {
5038 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
5040 ndr->depth--;
5041 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5042 ndr->depth--;
5044 if (flags & NDR_OUT) {
5045 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerA");
5046 ndr->depth++;
5047 ndr_print_ptr(ndr, "handle", r->out.handle);
5048 ndr->depth++;
5049 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5050 ndr->depth--;
5051 ndr_print_WERROR(ndr, "result", r->out.result);
5052 ndr->depth--;
5054 ndr->depth--;
5057 static enum ndr_err_code ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
5059 if (flags & NDR_IN) {
5060 if (r->in.scmanager_handle == NULL) {
5061 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5063 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5064 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
5065 if (r->in.ServiceName) {
5066 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5067 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5068 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5069 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
5073 if (flags & NDR_OUT) {
5074 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5076 return NDR_ERR_SUCCESS;
5079 static enum ndr_err_code ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
5081 uint32_t _ptr_ServiceName;
5082 TALLOC_CTX *_mem_save_scmanager_handle_0;
5083 TALLOC_CTX *_mem_save_ServiceName_0;
5084 if (flags & NDR_IN) {
5085 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5086 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5088 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5089 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
5090 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5091 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
5092 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
5093 if (_ptr_ServiceName) {
5094 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
5095 } else {
5096 r->in.ServiceName = NULL;
5098 if (r->in.ServiceName) {
5099 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5100 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
5101 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
5102 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
5103 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
5104 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));
5106 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
5107 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
5108 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
5110 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5112 if (flags & NDR_OUT) {
5113 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5115 return NDR_ERR_SUCCESS;
5118 _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r)
5120 ndr_print_struct(ndr, name, "svcctl_OpenServiceA");
5121 ndr->depth++;
5122 if (flags & NDR_SET_VALUES) {
5123 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5125 if (flags & NDR_IN) {
5126 ndr_print_struct(ndr, "in", "svcctl_OpenServiceA");
5127 ndr->depth++;
5128 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
5129 ndr->depth++;
5130 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
5131 ndr->depth--;
5132 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
5133 ndr->depth++;
5134 if (r->in.ServiceName) {
5135 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5137 ndr->depth--;
5138 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5139 ndr->depth--;
5141 if (flags & NDR_OUT) {
5142 ndr_print_struct(ndr, "out", "svcctl_OpenServiceA");
5143 ndr->depth++;
5144 ndr_print_WERROR(ndr, "result", r->out.result);
5145 ndr->depth--;
5147 ndr->depth--;
5150 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
5152 if (flags & NDR_IN) {
5153 if (r->in.handle == NULL) {
5154 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5156 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5159 if (flags & NDR_OUT) {
5160 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5161 if (r->out.needed == NULL) {
5162 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5165 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5167 return NDR_ERR_SUCCESS;
5170 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
5172 TALLOC_CTX *_mem_save_handle_0;
5173 TALLOC_CTX *_mem_save_needed_0;
5174 if (flags & NDR_IN) {
5175 ZERO_STRUCT(r->out);
5177 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5178 NDR_PULL_ALLOC(ndr, r->in.handle);
5180 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5181 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5182 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5183 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5184 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5185 NDR_PULL_ALLOC(ndr, r->out.needed);
5186 ZERO_STRUCTP(r->out.needed);
5188 if (flags & NDR_OUT) {
5189 NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.offered);
5190 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5191 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5192 NDR_PULL_ALLOC(ndr, r->out.needed);
5194 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5195 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5196 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5197 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5198 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5200 return NDR_ERR_SUCCESS;
5203 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r)
5205 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigA");
5206 ndr->depth++;
5207 if (flags & NDR_SET_VALUES) {
5208 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5210 if (flags & NDR_IN) {
5211 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigA");
5212 ndr->depth++;
5213 ndr_print_ptr(ndr, "handle", r->in.handle);
5214 ndr->depth++;
5215 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5216 ndr->depth--;
5217 ndr_print_uint32(ndr, "offered", r->in.offered);
5218 ndr->depth--;
5220 if (flags & NDR_OUT) {
5221 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
5222 ndr->depth++;
5223 ndr_print_array_uint8(ndr, "query", r->out.query, r->in.offered);
5224 ndr_print_ptr(ndr, "needed", r->out.needed);
5225 ndr->depth++;
5226 ndr_print_uint32(ndr, "needed", *r->out.needed);
5227 ndr->depth--;
5228 ndr_print_WERROR(ndr, "result", r->out.result);
5229 ndr->depth--;
5231 ndr->depth--;
5234 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5236 if (flags & NDR_IN) {
5237 if (r->in.handle == NULL) {
5238 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5240 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5243 if (flags & NDR_OUT) {
5244 if (r->out.lock_status == NULL) {
5245 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5247 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5248 if (r->out.needed == NULL) {
5249 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5251 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5252 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5254 return NDR_ERR_SUCCESS;
5257 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
5259 TALLOC_CTX *_mem_save_handle_0;
5260 TALLOC_CTX *_mem_save_lock_status_0;
5261 TALLOC_CTX *_mem_save_needed_0;
5262 if (flags & NDR_IN) {
5263 ZERO_STRUCT(r->out);
5265 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5266 NDR_PULL_ALLOC(ndr, r->in.handle);
5268 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5269 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5270 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5271 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5272 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5273 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5274 ZERO_STRUCTP(r->out.lock_status);
5275 NDR_PULL_ALLOC(ndr, r->out.needed);
5276 ZERO_STRUCTP(r->out.needed);
5278 if (flags & NDR_OUT) {
5279 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5280 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5282 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5283 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
5284 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5285 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
5286 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5287 NDR_PULL_ALLOC(ndr, r->out.needed);
5289 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5290 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5291 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5292 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5293 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5295 return NDR_ERR_SUCCESS;
5298 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5300 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusA");
5301 ndr->depth++;
5302 if (flags & NDR_SET_VALUES) {
5303 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5305 if (flags & NDR_IN) {
5306 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusA");
5307 ndr->depth++;
5308 ndr_print_ptr(ndr, "handle", r->in.handle);
5309 ndr->depth++;
5310 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5311 ndr->depth--;
5312 ndr_print_uint32(ndr, "offered", r->in.offered);
5313 ndr->depth--;
5315 if (flags & NDR_OUT) {
5316 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusA");
5317 ndr->depth++;
5318 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
5319 ndr->depth++;
5320 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
5321 ndr->depth--;
5322 ndr_print_ptr(ndr, "needed", r->out.needed);
5323 ndr->depth++;
5324 ndr_print_uint32(ndr, "needed", *r->out.needed);
5325 ndr->depth--;
5326 ndr_print_WERROR(ndr, "result", r->out.result);
5327 ndr->depth--;
5329 ndr->depth--;
5332 static enum ndr_err_code ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
5334 if (flags & NDR_IN) {
5335 if (r->in.handle == NULL) {
5336 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5338 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
5340 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
5341 if (r->in.Arguments) {
5342 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5343 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5344 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5345 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5348 if (flags & NDR_OUT) {
5349 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5351 return NDR_ERR_SUCCESS;
5354 static enum ndr_err_code ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
5356 uint32_t _ptr_Arguments;
5357 TALLOC_CTX *_mem_save_handle_0;
5358 TALLOC_CTX *_mem_save_Arguments_0;
5359 if (flags & NDR_IN) {
5360 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5361 NDR_PULL_ALLOC(ndr, r->in.handle);
5363 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5364 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5365 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5366 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5367 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
5368 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
5369 if (_ptr_Arguments) {
5370 NDR_PULL_ALLOC(ndr, r->in.Arguments);
5371 } else {
5372 r->in.Arguments = NULL;
5374 if (r->in.Arguments) {
5375 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
5376 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
5377 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
5378 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
5379 if (ndr_get_array_length(ndr, &r->in.Arguments) > ndr_get_array_size(ndr, &r->in.Arguments)) {
5380 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));
5382 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t)));
5383 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t), CH_UTF16));
5384 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
5387 if (flags & NDR_OUT) {
5388 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5390 return NDR_ERR_SUCCESS;
5393 _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r)
5395 ndr_print_struct(ndr, name, "svcctl_StartServiceA");
5396 ndr->depth++;
5397 if (flags & NDR_SET_VALUES) {
5398 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5400 if (flags & NDR_IN) {
5401 ndr_print_struct(ndr, "in", "svcctl_StartServiceA");
5402 ndr->depth++;
5403 ndr_print_ptr(ndr, "handle", r->in.handle);
5404 ndr->depth++;
5405 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5406 ndr->depth--;
5407 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
5408 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
5409 ndr->depth++;
5410 if (r->in.Arguments) {
5411 ndr_print_string(ndr, "Arguments", r->in.Arguments);
5413 ndr->depth--;
5414 ndr->depth--;
5416 if (flags & NDR_OUT) {
5417 ndr_print_struct(ndr, "out", "svcctl_StartServiceA");
5418 ndr->depth++;
5419 ndr_print_WERROR(ndr, "result", r->out.result);
5420 ndr->depth--;
5422 ndr->depth--;
5425 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5427 if (flags & NDR_IN) {
5428 if (r->in.handle == NULL) {
5429 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5431 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5432 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5433 if (r->in.service_name) {
5434 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5435 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5436 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5437 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));
5439 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5440 if (r->in.display_name_length) {
5441 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5444 if (flags & NDR_OUT) {
5445 if (r->out.display_name == NULL) {
5446 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5448 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
5449 if (*r->out.display_name) {
5450 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5451 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5452 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5453 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));
5455 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5456 if (r->out.display_name_length) {
5457 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5459 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5461 return NDR_ERR_SUCCESS;
5464 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
5466 uint32_t _ptr_service_name;
5467 uint32_t _ptr_display_name;
5468 uint32_t _ptr_display_name_length;
5469 TALLOC_CTX *_mem_save_handle_0;
5470 TALLOC_CTX *_mem_save_service_name_0;
5471 TALLOC_CTX *_mem_save_display_name_0;
5472 TALLOC_CTX *_mem_save_display_name_1;
5473 TALLOC_CTX *_mem_save_display_name_length_0;
5474 if (flags & NDR_IN) {
5475 ZERO_STRUCT(r->out);
5477 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5478 NDR_PULL_ALLOC(ndr, r->in.handle);
5480 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5481 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5482 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5483 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5484 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5485 if (_ptr_service_name) {
5486 NDR_PULL_ALLOC(ndr, r->in.service_name);
5487 } else {
5488 r->in.service_name = NULL;
5490 if (r->in.service_name) {
5491 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5492 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5493 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5494 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5495 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5496 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));
5498 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5499 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));
5500 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5502 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5503 if (_ptr_display_name_length) {
5504 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5505 } else {
5506 r->in.display_name_length = NULL;
5508 if (r->in.display_name_length) {
5509 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5510 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5511 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5512 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5514 NDR_PULL_ALLOC(ndr, r->out.display_name);
5515 ZERO_STRUCTP(r->out.display_name);
5517 if (flags & NDR_OUT) {
5518 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5519 NDR_PULL_ALLOC(ndr, r->out.display_name);
5521 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5522 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
5523 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
5524 if (_ptr_display_name) {
5525 NDR_PULL_ALLOC(ndr, *r->out.display_name);
5526 } else {
5527 *r->out.display_name = NULL;
5529 if (*r->out.display_name) {
5530 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5531 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
5532 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
5533 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
5534 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
5535 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));
5537 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
5538 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));
5539 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
5541 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
5542 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5543 if (_ptr_display_name_length) {
5544 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5545 } else {
5546 r->out.display_name_length = NULL;
5548 if (r->out.display_name_length) {
5549 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5550 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5552 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5554 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5556 return NDR_ERR_SUCCESS;
5559 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5561 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameA");
5562 ndr->depth++;
5563 if (flags & NDR_SET_VALUES) {
5564 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5566 if (flags & NDR_IN) {
5567 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameA");
5568 ndr->depth++;
5569 ndr_print_ptr(ndr, "handle", r->in.handle);
5570 ndr->depth++;
5571 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5572 ndr->depth--;
5573 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5574 ndr->depth++;
5575 if (r->in.service_name) {
5576 ndr_print_string(ndr, "service_name", r->in.service_name);
5578 ndr->depth--;
5579 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5580 ndr->depth++;
5581 if (r->in.display_name_length) {
5582 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5584 ndr->depth--;
5585 ndr->depth--;
5587 if (flags & NDR_OUT) {
5588 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameA");
5589 ndr->depth++;
5590 ndr_print_ptr(ndr, "display_name", r->out.display_name);
5591 ndr->depth++;
5592 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
5593 ndr->depth++;
5594 if (*r->out.display_name) {
5595 ndr_print_string(ndr, "display_name", *r->out.display_name);
5597 ndr->depth--;
5598 ndr->depth--;
5599 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5600 ndr->depth++;
5601 if (r->out.display_name_length) {
5602 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5604 ndr->depth--;
5605 ndr_print_WERROR(ndr, "result", r->out.result);
5606 ndr->depth--;
5608 ndr->depth--;
5611 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
5613 if (flags & NDR_IN) {
5614 if (r->in.handle == NULL) {
5615 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5617 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5618 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5619 if (r->in.service_name) {
5620 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5621 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5623 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));
5625 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5626 if (r->in.display_name_length) {
5627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5630 if (flags & NDR_OUT) {
5631 if (r->out.key_name == NULL) {
5632 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5634 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
5635 if (*r->out.key_name) {
5636 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5637 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5638 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5639 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));
5641 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5642 if (r->out.display_name_length) {
5643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5645 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5647 return NDR_ERR_SUCCESS;
5650 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
5652 uint32_t _ptr_service_name;
5653 uint32_t _ptr_key_name;
5654 uint32_t _ptr_display_name_length;
5655 TALLOC_CTX *_mem_save_handle_0;
5656 TALLOC_CTX *_mem_save_service_name_0;
5657 TALLOC_CTX *_mem_save_key_name_0;
5658 TALLOC_CTX *_mem_save_key_name_1;
5659 TALLOC_CTX *_mem_save_display_name_length_0;
5660 if (flags & NDR_IN) {
5661 ZERO_STRUCT(r->out);
5663 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5664 NDR_PULL_ALLOC(ndr, r->in.handle);
5666 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5667 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5668 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5669 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5670 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5671 if (_ptr_service_name) {
5672 NDR_PULL_ALLOC(ndr, r->in.service_name);
5673 } else {
5674 r->in.service_name = NULL;
5676 if (r->in.service_name) {
5677 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5678 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5679 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5680 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5681 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5682 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));
5684 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5685 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));
5686 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5688 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5689 if (_ptr_display_name_length) {
5690 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5691 } else {
5692 r->in.display_name_length = NULL;
5694 if (r->in.display_name_length) {
5695 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5696 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5697 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5698 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5700 NDR_PULL_ALLOC(ndr, r->out.key_name);
5701 ZERO_STRUCTP(r->out.key_name);
5703 if (flags & NDR_OUT) {
5704 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5705 NDR_PULL_ALLOC(ndr, r->out.key_name);
5707 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5708 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
5709 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
5710 if (_ptr_key_name) {
5711 NDR_PULL_ALLOC(ndr, *r->out.key_name);
5712 } else {
5713 *r->out.key_name = NULL;
5715 if (*r->out.key_name) {
5716 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5717 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
5718 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
5719 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
5720 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
5721 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));
5723 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
5724 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));
5725 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
5727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
5728 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5729 if (_ptr_display_name_length) {
5730 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5731 } else {
5732 r->out.display_name_length = NULL;
5734 if (r->out.display_name_length) {
5735 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5736 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5737 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5738 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5740 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5742 return NDR_ERR_SUCCESS;
5745 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r)
5747 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameA");
5748 ndr->depth++;
5749 if (flags & NDR_SET_VALUES) {
5750 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5752 if (flags & NDR_IN) {
5753 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameA");
5754 ndr->depth++;
5755 ndr_print_ptr(ndr, "handle", r->in.handle);
5756 ndr->depth++;
5757 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5758 ndr->depth--;
5759 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5760 ndr->depth++;
5761 if (r->in.service_name) {
5762 ndr_print_string(ndr, "service_name", r->in.service_name);
5764 ndr->depth--;
5765 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5766 ndr->depth++;
5767 if (r->in.display_name_length) {
5768 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5770 ndr->depth--;
5771 ndr->depth--;
5773 if (flags & NDR_OUT) {
5774 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameA");
5775 ndr->depth++;
5776 ndr_print_ptr(ndr, "key_name", r->out.key_name);
5777 ndr->depth++;
5778 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
5779 ndr->depth++;
5780 if (*r->out.key_name) {
5781 ndr_print_string(ndr, "key_name", *r->out.key_name);
5783 ndr->depth--;
5784 ndr->depth--;
5785 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5786 ndr->depth++;
5787 if (r->out.display_name_length) {
5788 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5790 ndr->depth--;
5791 ndr_print_WERROR(ndr, "result", r->out.result);
5792 ndr->depth--;
5794 ndr->depth--;
5797 static enum ndr_err_code ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5799 if (flags & NDR_IN) {
5801 if (flags & NDR_OUT) {
5802 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5804 return NDR_ERR_SUCCESS;
5807 static enum ndr_err_code ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
5809 if (flags & NDR_IN) {
5811 if (flags & NDR_OUT) {
5812 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5814 return NDR_ERR_SUCCESS;
5817 _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5819 ndr_print_struct(ndr, name, "svcctl_GetCurrentGroupeStateW");
5820 ndr->depth++;
5821 if (flags & NDR_SET_VALUES) {
5822 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5824 if (flags & NDR_IN) {
5825 ndr_print_struct(ndr, "in", "svcctl_GetCurrentGroupeStateW");
5826 ndr->depth++;
5827 ndr->depth--;
5829 if (flags & NDR_OUT) {
5830 ndr_print_struct(ndr, "out", "svcctl_GetCurrentGroupeStateW");
5831 ndr->depth++;
5832 ndr_print_WERROR(ndr, "result", r->out.result);
5833 ndr->depth--;
5835 ndr->depth--;
5838 static enum ndr_err_code ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
5840 if (flags & NDR_IN) {
5842 if (flags & NDR_OUT) {
5843 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5845 return NDR_ERR_SUCCESS;
5848 static enum ndr_err_code ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
5850 if (flags & NDR_IN) {
5852 if (flags & NDR_OUT) {
5853 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5855 return NDR_ERR_SUCCESS;
5858 _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r)
5860 ndr_print_struct(ndr, name, "svcctl_EnumServiceGroupW");
5861 ndr->depth++;
5862 if (flags & NDR_SET_VALUES) {
5863 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5865 if (flags & NDR_IN) {
5866 ndr_print_struct(ndr, "in", "svcctl_EnumServiceGroupW");
5867 ndr->depth++;
5868 ndr->depth--;
5870 if (flags & NDR_OUT) {
5871 ndr_print_struct(ndr, "out", "svcctl_EnumServiceGroupW");
5872 ndr->depth++;
5873 ndr_print_WERROR(ndr, "result", r->out.result);
5874 ndr->depth--;
5876 ndr->depth--;
5879 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5881 if (flags & NDR_IN) {
5882 if (r->in.handle == NULL) {
5883 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5885 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5886 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5887 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5888 if (r->in.info) {
5889 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
5892 if (flags & NDR_OUT) {
5893 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5895 return NDR_ERR_SUCCESS;
5898 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
5900 uint32_t _ptr_info;
5901 TALLOC_CTX *_mem_save_handle_0;
5902 TALLOC_CTX *_mem_save_info_0;
5903 if (flags & NDR_IN) {
5904 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5905 NDR_PULL_ALLOC(ndr, r->in.handle);
5907 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5908 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5909 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5910 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5911 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
5912 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5913 if (_ptr_info) {
5914 NDR_PULL_ALLOC(ndr, r->in.info);
5915 } else {
5916 r->in.info = NULL;
5918 if (r->in.info) {
5919 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5920 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5921 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
5922 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5925 if (flags & NDR_OUT) {
5926 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5928 return NDR_ERR_SUCCESS;
5931 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5933 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2A");
5934 ndr->depth++;
5935 if (flags & NDR_SET_VALUES) {
5936 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5938 if (flags & NDR_IN) {
5939 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2A");
5940 ndr->depth++;
5941 ndr_print_ptr(ndr, "handle", r->in.handle);
5942 ndr->depth++;
5943 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5944 ndr->depth--;
5945 ndr_print_uint32(ndr, "info_level", r->in.info_level);
5946 ndr_print_ptr(ndr, "info", r->in.info);
5947 ndr->depth++;
5948 if (r->in.info) {
5949 ndr_print_uint8(ndr, "info", *r->in.info);
5951 ndr->depth--;
5952 ndr->depth--;
5954 if (flags & NDR_OUT) {
5955 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2A");
5956 ndr->depth++;
5957 ndr_print_WERROR(ndr, "result", r->out.result);
5958 ndr->depth--;
5960 ndr->depth--;
5963 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
5965 if (flags & NDR_IN) {
5966 if (r->in.handle == NULL) {
5967 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5969 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5970 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5971 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5972 if (r->in.info) {
5973 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
5976 if (flags & NDR_OUT) {
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_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
5984 uint32_t _ptr_info;
5985 TALLOC_CTX *_mem_save_handle_0;
5986 TALLOC_CTX *_mem_save_info_0;
5987 if (flags & NDR_IN) {
5988 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5989 NDR_PULL_ALLOC(ndr, r->in.handle);
5991 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5992 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5993 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5994 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5995 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
5996 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5997 if (_ptr_info) {
5998 NDR_PULL_ALLOC(ndr, r->in.info);
5999 } else {
6000 r->in.info = NULL;
6002 if (r->in.info) {
6003 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6004 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
6005 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
6006 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
6009 if (flags & NDR_OUT) {
6010 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6012 return NDR_ERR_SUCCESS;
6015 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r)
6017 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2W");
6018 ndr->depth++;
6019 if (flags & NDR_SET_VALUES) {
6020 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6022 if (flags & NDR_IN) {
6023 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2W");
6024 ndr->depth++;
6025 ndr_print_ptr(ndr, "handle", r->in.handle);
6026 ndr->depth++;
6027 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6028 ndr->depth--;
6029 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6030 ndr_print_ptr(ndr, "info", r->in.info);
6031 ndr->depth++;
6032 if (r->in.info) {
6033 ndr_print_uint8(ndr, "info", *r->in.info);
6035 ndr->depth--;
6036 ndr->depth--;
6038 if (flags & NDR_OUT) {
6039 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2W");
6040 ndr->depth++;
6041 ndr_print_WERROR(ndr, "result", r->out.result);
6042 ndr->depth--;
6044 ndr->depth--;
6047 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
6049 if (flags & NDR_IN) {
6050 if (r->in.handle == NULL) {
6051 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6053 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6054 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6057 if (flags & NDR_OUT) {
6058 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6059 if (r->out.needed == NULL) {
6060 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6063 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6065 return NDR_ERR_SUCCESS;
6068 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
6070 TALLOC_CTX *_mem_save_handle_0;
6071 TALLOC_CTX *_mem_save_needed_0;
6072 if (flags & NDR_IN) {
6073 ZERO_STRUCT(r->out);
6075 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6076 NDR_PULL_ALLOC(ndr, r->in.handle);
6078 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6079 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6080 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6081 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6082 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6083 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6084 NDR_PULL_ALLOC(ndr, r->out.needed);
6085 ZERO_STRUCTP(r->out.needed);
6087 if (flags & NDR_OUT) {
6088 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6089 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6090 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6091 NDR_PULL_ALLOC(ndr, r->out.needed);
6093 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6094 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6095 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6096 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6097 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6099 return NDR_ERR_SUCCESS;
6102 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r)
6104 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2A");
6105 ndr->depth++;
6106 if (flags & NDR_SET_VALUES) {
6107 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6109 if (flags & NDR_IN) {
6110 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2A");
6111 ndr->depth++;
6112 ndr_print_ptr(ndr, "handle", r->in.handle);
6113 ndr->depth++;
6114 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6115 ndr->depth--;
6116 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6117 ndr_print_uint32(ndr, "offered", r->in.offered);
6118 ndr->depth--;
6120 if (flags & NDR_OUT) {
6121 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
6122 ndr->depth++;
6123 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6124 ndr_print_ptr(ndr, "needed", r->out.needed);
6125 ndr->depth++;
6126 ndr_print_uint32(ndr, "needed", *r->out.needed);
6127 ndr->depth--;
6128 ndr_print_WERROR(ndr, "result", r->out.result);
6129 ndr->depth--;
6131 ndr->depth--;
6134 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
6136 if (flags & NDR_IN) {
6137 if (r->in.handle == NULL) {
6138 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6140 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6141 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6144 if (flags & NDR_OUT) {
6145 if (r->out.buffer == NULL) {
6146 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6148 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6149 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6150 if (r->out.needed == NULL) {
6151 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6153 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6154 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6156 return NDR_ERR_SUCCESS;
6159 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
6161 TALLOC_CTX *_mem_save_handle_0;
6162 TALLOC_CTX *_mem_save_needed_0;
6163 if (flags & NDR_IN) {
6164 ZERO_STRUCT(r->out);
6166 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6167 NDR_PULL_ALLOC(ndr, r->in.handle);
6169 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6170 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6171 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6172 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6173 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6174 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6175 if (r->in.offered > 8192) {
6176 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6178 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6179 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6180 NDR_PULL_ALLOC(ndr, r->out.needed);
6181 ZERO_STRUCTP(r->out.needed);
6183 if (flags & NDR_OUT) {
6184 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6185 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6186 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6188 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6189 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6190 NDR_PULL_ALLOC(ndr, r->out.needed);
6192 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6193 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6195 if (*r->out.needed > 8192) {
6196 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6198 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6199 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6200 if (r->out.buffer) {
6201 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6204 return NDR_ERR_SUCCESS;
6207 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r)
6209 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2W");
6210 ndr->depth++;
6211 if (flags & NDR_SET_VALUES) {
6212 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6214 if (flags & NDR_IN) {
6215 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2W");
6216 ndr->depth++;
6217 ndr_print_ptr(ndr, "handle", r->in.handle);
6218 ndr->depth++;
6219 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6220 ndr->depth--;
6221 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6222 ndr_print_uint32(ndr, "offered", r->in.offered);
6223 ndr->depth--;
6225 if (flags & NDR_OUT) {
6226 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
6227 ndr->depth++;
6228 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6229 ndr->depth++;
6230 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6231 ndr->depth--;
6232 ndr_print_ptr(ndr, "needed", r->out.needed);
6233 ndr->depth++;
6234 ndr_print_uint32(ndr, "needed", *r->out.needed);
6235 ndr->depth--;
6236 ndr_print_WERROR(ndr, "result", r->out.result);
6237 ndr->depth--;
6239 ndr->depth--;
6242 static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
6244 if (flags & NDR_IN) {
6245 if (r->in.handle == NULL) {
6246 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6248 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6249 NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr, NDR_SCALARS, r->in.info_level));
6250 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6252 if (flags & NDR_OUT) {
6253 if (r->out.buffer == NULL) {
6254 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6256 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6257 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6258 if (r->out.needed == NULL) {
6259 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6262 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6264 return NDR_ERR_SUCCESS;
6267 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
6269 TALLOC_CTX *_mem_save_handle_0;
6270 TALLOC_CTX *_mem_save_needed_0;
6271 if (flags & NDR_IN) {
6272 ZERO_STRUCT(r->out);
6274 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6275 NDR_PULL_ALLOC(ndr, r->in.handle);
6277 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6278 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6279 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6281 NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
6282 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6283 if (r->in.offered > 8192) {
6284 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6286 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6287 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6288 NDR_PULL_ALLOC(ndr, r->out.needed);
6289 ZERO_STRUCTP(r->out.needed);
6291 if (flags & NDR_OUT) {
6292 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6293 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6294 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6296 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6297 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6298 NDR_PULL_ALLOC(ndr, r->out.needed);
6300 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6301 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6302 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6303 if (*r->out.needed > 8192) {
6304 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6307 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6308 if (r->out.buffer) {
6309 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6312 return NDR_ERR_SUCCESS;
6315 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r)
6317 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatusEx");
6318 ndr->depth++;
6319 if (flags & NDR_SET_VALUES) {
6320 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6322 if (flags & NDR_IN) {
6323 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatusEx");
6324 ndr->depth++;
6325 ndr_print_ptr(ndr, "handle", r->in.handle);
6326 ndr->depth++;
6327 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6328 ndr->depth--;
6329 ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
6330 ndr_print_uint32(ndr, "offered", r->in.offered);
6331 ndr->depth--;
6333 if (flags & NDR_OUT) {
6334 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
6335 ndr->depth++;
6336 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6337 ndr->depth++;
6338 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6339 ndr->depth--;
6340 ndr_print_ptr(ndr, "needed", r->out.needed);
6341 ndr->depth++;
6342 ndr_print_uint32(ndr, "needed", *r->out.needed);
6343 ndr->depth--;
6344 ndr_print_WERROR(ndr, "result", r->out.result);
6345 ndr->depth--;
6347 ndr->depth--;
6350 static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
6352 if (flags & NDR_IN) {
6353 if (r->in.scmanager == NULL) {
6354 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6356 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6359 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6360 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6361 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6362 if (r->in.resume_handle) {
6363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6366 if (flags & NDR_OUT) {
6367 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6368 if (r->out.needed == NULL) {
6369 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6372 if (r->out.service_returned == NULL) {
6373 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6377 if (r->out.resume_handle) {
6378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6380 if (r->out.group_name == NULL) {
6381 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6383 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name));
6384 if (*r->out.group_name) {
6385 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6386 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6387 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6388 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));
6390 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6392 return NDR_ERR_SUCCESS;
6395 static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
6397 uint32_t _ptr_resume_handle;
6398 uint32_t _ptr_group_name;
6399 TALLOC_CTX *_mem_save_scmanager_0;
6400 TALLOC_CTX *_mem_save_needed_0;
6401 TALLOC_CTX *_mem_save_service_returned_0;
6402 TALLOC_CTX *_mem_save_resume_handle_0;
6403 TALLOC_CTX *_mem_save_group_name_0;
6404 TALLOC_CTX *_mem_save_group_name_1;
6405 if (flags & NDR_IN) {
6406 ZERO_STRUCT(r->out);
6408 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6409 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6411 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6412 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6413 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6417 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6418 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6419 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6420 if (_ptr_resume_handle) {
6421 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6422 } else {
6423 r->in.resume_handle = NULL;
6425 if (r->in.resume_handle) {
6426 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6427 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6429 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6431 NDR_PULL_ALLOC(ndr, r->out.needed);
6432 ZERO_STRUCTP(r->out.needed);
6433 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6434 ZERO_STRUCTP(r->out.service_returned);
6435 NDR_PULL_ALLOC(ndr, r->out.group_name);
6436 ZERO_STRUCTP(r->out.group_name);
6438 if (flags & NDR_OUT) {
6439 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6440 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6441 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6442 NDR_PULL_ALLOC(ndr, r->out.needed);
6444 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6445 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6446 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6447 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6448 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6449 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6451 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6452 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6454 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6455 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6456 if (_ptr_resume_handle) {
6457 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6458 } else {
6459 r->out.resume_handle = NULL;
6461 if (r->out.resume_handle) {
6462 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6463 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6464 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6465 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6467 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6468 NDR_PULL_ALLOC(ndr, r->out.group_name);
6470 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6471 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
6472 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6473 if (_ptr_group_name) {
6474 NDR_PULL_ALLOC(ndr, *r->out.group_name);
6475 } else {
6476 *r->out.group_name = NULL;
6478 if (*r->out.group_name) {
6479 _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6480 NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0);
6481 NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
6482 NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
6483 if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) {
6484 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));
6486 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t)));
6487 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));
6488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0);
6490 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
6491 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6493 return NDR_ERR_SUCCESS;
6496 _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r)
6498 ndr_print_struct(ndr, name, "EnumServicesStatusExA");
6499 ndr->depth++;
6500 if (flags & NDR_SET_VALUES) {
6501 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6503 if (flags & NDR_IN) {
6504 ndr_print_struct(ndr, "in", "EnumServicesStatusExA");
6505 ndr->depth++;
6506 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6507 ndr->depth++;
6508 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6509 ndr->depth--;
6510 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6511 ndr_print_uint32(ndr, "type", r->in.type);
6512 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6513 ndr_print_uint32(ndr, "offered", r->in.offered);
6514 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6515 ndr->depth++;
6516 if (r->in.resume_handle) {
6517 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6519 ndr->depth--;
6520 ndr->depth--;
6522 if (flags & NDR_OUT) {
6523 ndr_print_struct(ndr, "out", "EnumServicesStatusExA");
6524 ndr->depth++;
6525 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6526 ndr_print_ptr(ndr, "needed", r->out.needed);
6527 ndr->depth++;
6528 ndr_print_uint32(ndr, "needed", *r->out.needed);
6529 ndr->depth--;
6530 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6531 ndr->depth++;
6532 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6533 ndr->depth--;
6534 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6535 ndr->depth++;
6536 if (r->out.resume_handle) {
6537 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6539 ndr->depth--;
6540 ndr_print_ptr(ndr, "group_name", r->out.group_name);
6541 ndr->depth++;
6542 ndr_print_ptr(ndr, "group_name", *r->out.group_name);
6543 ndr->depth++;
6544 if (*r->out.group_name) {
6545 ndr_print_string(ndr, "group_name", *r->out.group_name);
6547 ndr->depth--;
6548 ndr->depth--;
6549 ndr_print_WERROR(ndr, "result", r->out.result);
6550 ndr->depth--;
6552 ndr->depth--;
6555 static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
6557 if (flags & NDR_IN) {
6558 if (r->in.scmanager == NULL) {
6559 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6561 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6564 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6567 if (r->in.resume_handle) {
6568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6570 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.group_name));
6571 if (r->in.group_name) {
6572 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6573 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6574 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6575 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));
6578 if (flags & NDR_OUT) {
6579 if (r->out.services == NULL) {
6580 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6582 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6583 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6584 if (r->out.needed == NULL) {
6585 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6587 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6588 if (r->out.service_returned == NULL) {
6589 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6592 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6593 if (r->out.resume_handle) {
6594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6596 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6598 return NDR_ERR_SUCCESS;
6601 static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
6603 uint32_t _ptr_resume_handle;
6604 uint32_t _ptr_group_name;
6605 TALLOC_CTX *_mem_save_scmanager_0;
6606 TALLOC_CTX *_mem_save_needed_0;
6607 TALLOC_CTX *_mem_save_service_returned_0;
6608 TALLOC_CTX *_mem_save_resume_handle_0;
6609 TALLOC_CTX *_mem_save_group_name_0;
6610 if (flags & NDR_IN) {
6611 ZERO_STRUCT(r->out);
6613 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6614 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6616 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6617 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6618 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6620 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6621 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6622 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6623 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6624 if (r->in.offered > 0x40000) {
6625 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6627 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6628 if (_ptr_resume_handle) {
6629 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6630 } else {
6631 r->in.resume_handle = NULL;
6633 if (r->in.resume_handle) {
6634 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6635 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6636 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6637 if (*r->in.resume_handle > 0x40000) {
6638 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6640 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6642 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6643 if (_ptr_group_name) {
6644 NDR_PULL_ALLOC(ndr, r->in.group_name);
6645 } else {
6646 r->in.group_name = NULL;
6648 if (r->in.group_name) {
6649 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6650 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_name, 0);
6651 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.group_name));
6652 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.group_name));
6653 if (ndr_get_array_length(ndr, &r->in.group_name) > ndr_get_array_size(ndr, &r->in.group_name)) {
6654 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));
6656 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.group_name), sizeof(uint16_t)));
6657 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));
6658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
6660 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6661 memset(r->out.services, 0, (r->in.offered) * sizeof(*r->out.services));
6662 NDR_PULL_ALLOC(ndr, r->out.needed);
6663 ZERO_STRUCTP(r->out.needed);
6664 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6665 ZERO_STRUCTP(r->out.service_returned);
6667 if (flags & NDR_OUT) {
6668 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.services));
6669 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6670 NDR_PULL_ALLOC_N(ndr, r->out.services, ndr_get_array_size(ndr, &r->out.services));
6672 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, ndr_get_array_size(ndr, &r->out.services)));
6673 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6674 NDR_PULL_ALLOC(ndr, r->out.needed);
6676 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6677 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6678 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6679 if (*r->out.needed > 0x40000) {
6680 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6682 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6683 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6684 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6686 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6687 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6689 if (*r->out.service_returned > 0x40000) {
6690 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6692 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6693 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6694 if (_ptr_resume_handle) {
6695 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6696 } else {
6697 r->out.resume_handle = NULL;
6699 if (r->out.resume_handle) {
6700 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6701 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6702 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6703 if (*r->out.resume_handle > 0x40000) {
6704 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6708 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6709 if (r->out.services) {
6710 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.services, r->in.offered));
6713 return NDR_ERR_SUCCESS;
6716 _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r)
6718 ndr_print_struct(ndr, name, "EnumServicesStatusExW");
6719 ndr->depth++;
6720 if (flags & NDR_SET_VALUES) {
6721 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6723 if (flags & NDR_IN) {
6724 ndr_print_struct(ndr, "in", "EnumServicesStatusExW");
6725 ndr->depth++;
6726 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6727 ndr->depth++;
6728 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6729 ndr->depth--;
6730 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6731 ndr_print_uint32(ndr, "type", r->in.type);
6732 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6733 ndr_print_uint32(ndr, "offered", r->in.offered);
6734 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6735 ndr->depth++;
6736 if (r->in.resume_handle) {
6737 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6739 ndr->depth--;
6740 ndr_print_ptr(ndr, "group_name", r->in.group_name);
6741 ndr->depth++;
6742 if (r->in.group_name) {
6743 ndr_print_string(ndr, "group_name", r->in.group_name);
6745 ndr->depth--;
6746 ndr->depth--;
6748 if (flags & NDR_OUT) {
6749 ndr_print_struct(ndr, "out", "EnumServicesStatusExW");
6750 ndr->depth++;
6751 ndr_print_ptr(ndr, "services", r->out.services);
6752 ndr->depth++;
6753 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6754 ndr->depth--;
6755 ndr_print_ptr(ndr, "needed", r->out.needed);
6756 ndr->depth++;
6757 ndr_print_uint32(ndr, "needed", *r->out.needed);
6758 ndr->depth--;
6759 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6760 ndr->depth++;
6761 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6762 ndr->depth--;
6763 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6764 ndr->depth++;
6765 if (r->out.resume_handle) {
6766 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6768 ndr->depth--;
6769 ndr_print_WERROR(ndr, "result", r->out.result);
6770 ndr->depth--;
6772 ndr->depth--;
6775 static enum ndr_err_code ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
6777 if (flags & NDR_IN) {
6779 if (flags & NDR_OUT) {
6780 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6782 return NDR_ERR_SUCCESS;
6785 static enum ndr_err_code ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
6787 if (flags & NDR_IN) {
6789 if (flags & NDR_OUT) {
6790 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6792 return NDR_ERR_SUCCESS;
6795 _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r)
6797 ndr_print_struct(ndr, name, "svcctl_SCSendTSMessage");
6798 ndr->depth++;
6799 if (flags & NDR_SET_VALUES) {
6800 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6802 if (flags & NDR_IN) {
6803 ndr_print_struct(ndr, "in", "svcctl_SCSendTSMessage");
6804 ndr->depth++;
6805 ndr->depth--;
6807 if (flags & NDR_OUT) {
6808 ndr_print_struct(ndr, "out", "svcctl_SCSendTSMessage");
6809 ndr->depth++;
6810 ndr_print_WERROR(ndr, "result", r->out.result);
6811 ndr->depth--;
6813 ndr->depth--;
6816 static const struct ndr_interface_call svcctl_calls[] = {
6818 "svcctl_CloseServiceHandle",
6819 sizeof(struct svcctl_CloseServiceHandle),
6820 (ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
6821 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
6822 (ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
6823 false,
6826 "svcctl_ControlService",
6827 sizeof(struct svcctl_ControlService),
6828 (ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
6829 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
6830 (ndr_print_function_t) ndr_print_svcctl_ControlService,
6831 false,
6834 "svcctl_DeleteService",
6835 sizeof(struct svcctl_DeleteService),
6836 (ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
6837 (ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
6838 (ndr_print_function_t) ndr_print_svcctl_DeleteService,
6839 false,
6842 "svcctl_LockServiceDatabase",
6843 sizeof(struct svcctl_LockServiceDatabase),
6844 (ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
6845 (ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
6846 (ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
6847 false,
6850 "svcctl_QueryServiceObjectSecurity",
6851 sizeof(struct svcctl_QueryServiceObjectSecurity),
6852 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
6853 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
6854 (ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
6855 false,
6858 "svcctl_SetServiceObjectSecurity",
6859 sizeof(struct svcctl_SetServiceObjectSecurity),
6860 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
6861 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
6862 (ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
6863 false,
6866 "svcctl_QueryServiceStatus",
6867 sizeof(struct svcctl_QueryServiceStatus),
6868 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
6869 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
6870 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
6871 false,
6874 "svcctl_SetServiceStatus",
6875 sizeof(struct svcctl_SetServiceStatus),
6876 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
6877 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
6878 (ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
6879 false,
6882 "svcctl_UnlockServiceDatabase",
6883 sizeof(struct svcctl_UnlockServiceDatabase),
6884 (ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
6885 (ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
6886 (ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
6887 false,
6890 "svcctl_NotifyBootConfigStatus",
6891 sizeof(struct svcctl_NotifyBootConfigStatus),
6892 (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
6893 (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
6894 (ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
6895 false,
6898 "svcctl_SCSetServiceBitsW",
6899 sizeof(struct svcctl_SCSetServiceBitsW),
6900 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
6901 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
6902 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
6903 false,
6906 "svcctl_ChangeServiceConfigW",
6907 sizeof(struct svcctl_ChangeServiceConfigW),
6908 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
6909 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
6910 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
6911 false,
6914 "svcctl_CreateServiceW",
6915 sizeof(struct svcctl_CreateServiceW),
6916 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
6917 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
6918 (ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
6919 false,
6922 "svcctl_EnumDependentServicesW",
6923 sizeof(struct svcctl_EnumDependentServicesW),
6924 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
6925 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
6926 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
6927 false,
6930 "svcctl_EnumServicesStatusW",
6931 sizeof(struct svcctl_EnumServicesStatusW),
6932 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
6933 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
6934 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
6935 false,
6938 "svcctl_OpenSCManagerW",
6939 sizeof(struct svcctl_OpenSCManagerW),
6940 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
6941 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
6942 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
6943 false,
6946 "svcctl_OpenServiceW",
6947 sizeof(struct svcctl_OpenServiceW),
6948 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
6949 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
6950 (ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
6951 false,
6954 "svcctl_QueryServiceConfigW",
6955 sizeof(struct svcctl_QueryServiceConfigW),
6956 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
6957 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
6958 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
6959 false,
6962 "svcctl_QueryServiceLockStatusW",
6963 sizeof(struct svcctl_QueryServiceLockStatusW),
6964 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
6965 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
6966 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
6967 false,
6970 "svcctl_StartServiceW",
6971 sizeof(struct svcctl_StartServiceW),
6972 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
6973 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
6974 (ndr_print_function_t) ndr_print_svcctl_StartServiceW,
6975 false,
6978 "svcctl_GetServiceDisplayNameW",
6979 sizeof(struct svcctl_GetServiceDisplayNameW),
6980 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
6981 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
6982 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
6983 false,
6986 "svcctl_GetServiceKeyNameW",
6987 sizeof(struct svcctl_GetServiceKeyNameW),
6988 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
6989 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
6990 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
6991 false,
6994 "svcctl_SCSetServiceBitsA",
6995 sizeof(struct svcctl_SCSetServiceBitsA),
6996 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
6997 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
6998 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
6999 false,
7002 "svcctl_ChangeServiceConfigA",
7003 sizeof(struct svcctl_ChangeServiceConfigA),
7004 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
7005 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
7006 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
7007 false,
7010 "svcctl_CreateServiceA",
7011 sizeof(struct svcctl_CreateServiceA),
7012 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
7013 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
7014 (ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
7015 false,
7018 "svcctl_EnumDependentServicesA",
7019 sizeof(struct svcctl_EnumDependentServicesA),
7020 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
7021 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
7022 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
7023 false,
7026 "svcctl_EnumServicesStatusA",
7027 sizeof(struct svcctl_EnumServicesStatusA),
7028 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
7029 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
7030 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
7031 false,
7034 "svcctl_OpenSCManagerA",
7035 sizeof(struct svcctl_OpenSCManagerA),
7036 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
7037 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
7038 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
7039 false,
7042 "svcctl_OpenServiceA",
7043 sizeof(struct svcctl_OpenServiceA),
7044 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
7045 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
7046 (ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
7047 false,
7050 "svcctl_QueryServiceConfigA",
7051 sizeof(struct svcctl_QueryServiceConfigA),
7052 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
7053 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
7054 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
7055 false,
7058 "svcctl_QueryServiceLockStatusA",
7059 sizeof(struct svcctl_QueryServiceLockStatusA),
7060 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
7061 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
7062 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
7063 false,
7066 "svcctl_StartServiceA",
7067 sizeof(struct svcctl_StartServiceA),
7068 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
7069 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
7070 (ndr_print_function_t) ndr_print_svcctl_StartServiceA,
7071 false,
7074 "svcctl_GetServiceDisplayNameA",
7075 sizeof(struct svcctl_GetServiceDisplayNameA),
7076 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
7077 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
7078 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
7079 false,
7082 "svcctl_GetServiceKeyNameA",
7083 sizeof(struct svcctl_GetServiceKeyNameA),
7084 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
7085 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
7086 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
7087 false,
7090 "svcctl_GetCurrentGroupeStateW",
7091 sizeof(struct svcctl_GetCurrentGroupeStateW),
7092 (ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
7093 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
7094 (ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
7095 false,
7098 "svcctl_EnumServiceGroupW",
7099 sizeof(struct svcctl_EnumServiceGroupW),
7100 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
7101 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
7102 (ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
7103 false,
7106 "svcctl_ChangeServiceConfig2A",
7107 sizeof(struct svcctl_ChangeServiceConfig2A),
7108 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
7109 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
7110 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
7111 false,
7114 "svcctl_ChangeServiceConfig2W",
7115 sizeof(struct svcctl_ChangeServiceConfig2W),
7116 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
7117 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
7118 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
7119 false,
7122 "svcctl_QueryServiceConfig2A",
7123 sizeof(struct svcctl_QueryServiceConfig2A),
7124 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
7125 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
7126 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
7127 false,
7130 "svcctl_QueryServiceConfig2W",
7131 sizeof(struct svcctl_QueryServiceConfig2W),
7132 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
7133 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
7134 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
7135 false,
7138 "svcctl_QueryServiceStatusEx",
7139 sizeof(struct svcctl_QueryServiceStatusEx),
7140 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
7141 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
7142 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
7143 false,
7146 "EnumServicesStatusExA",
7147 sizeof(struct EnumServicesStatusExA),
7148 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExA,
7149 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExA,
7150 (ndr_print_function_t) ndr_print_EnumServicesStatusExA,
7151 false,
7154 "EnumServicesStatusExW",
7155 sizeof(struct EnumServicesStatusExW),
7156 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExW,
7157 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExW,
7158 (ndr_print_function_t) ndr_print_EnumServicesStatusExW,
7159 false,
7162 "svcctl_SCSendTSMessage",
7163 sizeof(struct svcctl_SCSendTSMessage),
7164 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
7165 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
7166 (ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
7167 false,
7169 { NULL, 0, NULL, NULL, NULL, false }
7172 static const char * const svcctl_endpoint_strings[] = {
7173 "ncacn_np:[\\pipe\\svcctl]",
7174 "ncalrpc:",
7177 static const struct ndr_interface_string_array svcctl_endpoints = {
7178 .count = 2,
7179 .names = svcctl_endpoint_strings
7182 static const char * const svcctl_authservice_strings[] = {
7183 "host",
7186 static const struct ndr_interface_string_array svcctl_authservices = {
7187 .count = 1,
7188 .names = svcctl_authservice_strings
7192 const struct ndr_interface_table ndr_table_svcctl = {
7193 .name = "svcctl",
7194 .syntax_id = {
7195 {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
7196 NDR_SVCCTL_VERSION
7198 .helpstring = NDR_SVCCTL_HELPSTRING,
7199 .num_calls = 44,
7200 .calls = svcctl_calls,
7201 .endpoints = &svcctl_endpoints,
7202 .authservices = &svcctl_authservices