Final part of fix for bug #8679 - recvfile code path using splice() on Linux leaves...
[Samba.git] / librpc / gen_ndr / ndr_svcctl.c
blobe67d7935622bb4f056d840f586958924ebf9c56c
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_svcctl.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 static enum ndr_err_code ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_LOCK_STATUS *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 5));
12 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_locked));
13 NDR_CHECK(ndr_push_unique_ptr(ndr, r->lock_owner));
14 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_duration));
15 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
17 if (ndr_flags & NDR_BUFFERS) {
18 if (r->lock_owner) {
19 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
20 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
21 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
22 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lock_owner, ndr_charset_length(r->lock_owner, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25 return NDR_ERR_SUCCESS;
28 static enum ndr_err_code ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_LOCK_STATUS *r)
30 uint32_t _ptr_lock_owner;
31 TALLOC_CTX *_mem_save_lock_owner_0;
32 if (ndr_flags & NDR_SCALARS) {
33 NDR_CHECK(ndr_pull_align(ndr, 5));
34 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_locked));
35 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lock_owner));
36 if (_ptr_lock_owner) {
37 NDR_PULL_ALLOC(ndr, r->lock_owner);
38 } else {
39 r->lock_owner = NULL;
41 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_duration));
42 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
44 if (ndr_flags & NDR_BUFFERS) {
45 if (r->lock_owner) {
46 _mem_save_lock_owner_0 = NDR_PULL_GET_MEM_CTX(ndr);
47 NDR_PULL_SET_MEM_CTX(ndr, r->lock_owner, 0);
48 NDR_CHECK(ndr_pull_array_size(ndr, &r->lock_owner));
49 NDR_CHECK(ndr_pull_array_length(ndr, &r->lock_owner));
50 if (ndr_get_array_length(ndr, &r->lock_owner) > ndr_get_array_size(ndr, &r->lock_owner)) {
51 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->lock_owner), ndr_get_array_length(ndr, &r->lock_owner));
53 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t)));
54 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lock_owner, ndr_get_array_length(ndr, &r->lock_owner), sizeof(uint16_t), CH_UTF16));
55 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_owner_0, 0);
58 return NDR_ERR_SUCCESS;
61 _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r)
63 ndr_print_struct(ndr, name, "SERVICE_LOCK_STATUS");
64 ndr->depth++;
65 ndr_print_uint32(ndr, "is_locked", r->is_locked);
66 ndr_print_ptr(ndr, "lock_owner", r->lock_owner);
67 ndr->depth++;
68 if (r->lock_owner) {
69 ndr_print_string(ndr, "lock_owner", r->lock_owner);
71 ndr->depth--;
72 ndr_print_uint32(ndr, "lock_duration", r->lock_duration);
73 ndr->depth--;
76 static enum ndr_err_code ndr_push_svcctl_ServiceStatus(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceStatus r)
78 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
79 return NDR_ERR_SUCCESS;
82 static enum ndr_err_code ndr_pull_svcctl_ServiceStatus(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceStatus *r)
84 uint32_t v;
85 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
86 *r = v;
87 return NDR_ERR_SUCCESS;
90 _PUBLIC_ void ndr_print_svcctl_ServiceStatus(struct ndr_print *ndr, const char *name, enum svcctl_ServiceStatus r)
92 const char *val = NULL;
94 switch (r) {
95 case SVCCTL_STATE_UNKNOWN: val = "SVCCTL_STATE_UNKNOWN"; break;
96 case SVCCTL_STOPPED: val = "SVCCTL_STOPPED"; break;
97 case SVCCTL_START_PENDING: val = "SVCCTL_START_PENDING"; break;
98 case SVCCTL_STOP_PENDING: val = "SVCCTL_STOP_PENDING"; break;
99 case SVCCTL_RUNNING: val = "SVCCTL_RUNNING"; break;
100 case SVCCTL_CONTINUE_PENDING: val = "SVCCTL_CONTINUE_PENDING"; break;
101 case SVCCTL_PAUSE_PENDING: val = "SVCCTL_PAUSE_PENDING"; break;
102 case SVCCTL_PAUSED: val = "SVCCTL_PAUSED"; break;
104 ndr_print_enum(ndr, name, "ENUM", val, r);
107 static enum ndr_err_code ndr_push_svcctl_ControlsAccepted(struct ndr_push *ndr, int ndr_flags, uint32_t r)
109 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
110 return NDR_ERR_SUCCESS;
113 static enum ndr_err_code ndr_pull_svcctl_ControlsAccepted(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
115 uint32_t v;
116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
117 *r = v;
118 return NDR_ERR_SUCCESS;
121 _PUBLIC_ void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const char *name, uint32_t r)
123 ndr_print_uint32(ndr, name, r);
124 ndr->depth++;
125 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_STOP", SVCCTL_ACCEPT_STOP, r);
126 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PAUSE_CONTINUE", SVCCTL_ACCEPT_PAUSE_CONTINUE, r);
127 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_SHUTDOWN", SVCCTL_ACCEPT_SHUTDOWN, r);
128 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PARAMCHANGE", SVCCTL_ACCEPT_PARAMCHANGE, r);
129 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NETBINDCHANGE", SVCCTL_ACCEPT_NETBINDCHANGE, r);
130 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_HARDWAREPROFILECHANGE", SVCCTL_ACCEPT_HARDWAREPROFILECHANGE, r);
131 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_POWEREVENT", SVCCTL_ACCEPT_POWEREVENT, r);
132 ndr->depth--;
135 static enum ndr_err_code ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r)
137 if (ndr_flags & NDR_SCALARS) {
138 NDR_CHECK(ndr_push_align(ndr, 4));
139 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
140 NDR_CHECK(ndr_push_svcctl_ServiceStatus(ndr, NDR_SCALARS, r->state));
141 NDR_CHECK(ndr_push_svcctl_ControlsAccepted(ndr, NDR_SCALARS, r->controls_accepted));
142 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->win32_exit_code));
143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code));
144 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point));
145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wait_hint));
146 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
148 if (ndr_flags & NDR_BUFFERS) {
150 return NDR_ERR_SUCCESS;
153 static enum ndr_err_code ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS *r)
155 if (ndr_flags & NDR_SCALARS) {
156 NDR_CHECK(ndr_pull_align(ndr, 4));
157 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
158 NDR_CHECK(ndr_pull_svcctl_ServiceStatus(ndr, NDR_SCALARS, &r->state));
159 NDR_CHECK(ndr_pull_svcctl_ControlsAccepted(ndr, NDR_SCALARS, &r->controls_accepted));
160 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->win32_exit_code));
161 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code));
162 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point));
163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wait_hint));
164 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
166 if (ndr_flags & NDR_BUFFERS) {
168 return NDR_ERR_SUCCESS;
171 _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r)
173 ndr_print_struct(ndr, name, "SERVICE_STATUS");
174 ndr->depth++;
175 ndr_print_uint32(ndr, "type", r->type);
176 ndr_print_svcctl_ServiceStatus(ndr, "state", r->state);
177 ndr_print_svcctl_ControlsAccepted(ndr, "controls_accepted", r->controls_accepted);
178 ndr_print_WERROR(ndr, "win32_exit_code", r->win32_exit_code);
179 ndr_print_uint32(ndr, "service_exit_code", r->service_exit_code);
180 ndr_print_uint32(ndr, "check_point", r->check_point);
181 ndr_print_uint32(ndr, "wait_hint", r->wait_hint);
182 ndr->depth--;
185 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS_PROCESS *r)
187 if (ndr_flags & NDR_SCALARS) {
188 NDR_CHECK(ndr_push_align(ndr, 4));
189 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->process_id));
191 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_flags));
192 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
194 if (ndr_flags & NDR_BUFFERS) {
196 return NDR_ERR_SUCCESS;
199 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS_PROCESS *r)
201 if (ndr_flags & NDR_SCALARS) {
202 NDR_CHECK(ndr_pull_align(ndr, 4));
203 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
204 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->process_id));
205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_flags));
206 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
208 if (ndr_flags & NDR_BUFFERS) {
210 return NDR_ERR_SUCCESS;
213 _PUBLIC_ void ndr_print_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS_PROCESS *r)
215 ndr_print_struct(ndr, name, "SERVICE_STATUS_PROCESS");
216 ndr->depth++;
217 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
218 ndr_print_uint32(ndr, "process_id", r->process_id);
219 ndr_print_uint32(ndr, "service_flags", r->service_flags);
220 ndr->depth--;
223 _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSW *r)
225 if (ndr_flags & NDR_SCALARS) {
226 NDR_CHECK(ndr_push_align(ndr, 5));
228 uint32_t _flags_save_string = ndr->flags;
229 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
230 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
231 ndr->flags = _flags_save_string;
234 uint32_t _flags_save_string = ndr->flags;
235 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
236 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
237 ndr->flags = _flags_save_string;
239 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
240 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
242 if (ndr_flags & NDR_BUFFERS) {
244 uint32_t _flags_save_string = ndr->flags;
245 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
246 if (r->service_name) {
247 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->service_name));
248 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
249 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->service_name));
251 ndr->flags = _flags_save_string;
254 uint32_t _flags_save_string = ndr->flags;
255 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
256 if (r->display_name) {
257 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->display_name));
258 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
259 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->display_name));
261 ndr->flags = _flags_save_string;
264 return NDR_ERR_SUCCESS;
267 _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSW *r)
269 uint32_t _ptr_service_name;
270 TALLOC_CTX *_mem_save_service_name_0;
271 uint32_t _ptr_display_name;
272 TALLOC_CTX *_mem_save_display_name_0;
273 if (ndr_flags & NDR_SCALARS) {
274 NDR_CHECK(ndr_pull_align(ndr, 5));
276 uint32_t _flags_save_string = ndr->flags;
277 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
278 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
279 if (_ptr_service_name) {
280 NDR_PULL_ALLOC(ndr, r->service_name);
281 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
282 } else {
283 r->service_name = NULL;
285 ndr->flags = _flags_save_string;
288 uint32_t _flags_save_string = ndr->flags;
289 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
290 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
291 if (_ptr_display_name) {
292 NDR_PULL_ALLOC(ndr, r->display_name);
293 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
294 } else {
295 r->display_name = NULL;
297 ndr->flags = _flags_save_string;
299 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
300 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
302 if (ndr_flags & NDR_BUFFERS) {
304 uint32_t _flags_save_string = ndr->flags;
305 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
306 if (r->service_name) {
307 uint32_t _relative_save_offset;
308 _relative_save_offset = ndr->offset;
309 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
310 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
311 NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
312 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
313 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
314 ndr->offset = _relative_save_offset;
316 ndr->flags = _flags_save_string;
319 uint32_t _flags_save_string = ndr->flags;
320 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
321 if (r->display_name) {
322 uint32_t _relative_save_offset;
323 _relative_save_offset = ndr->offset;
324 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
325 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
326 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
327 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
329 ndr->offset = _relative_save_offset;
331 ndr->flags = _flags_save_string;
334 return NDR_ERR_SUCCESS;
337 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSW *r)
339 ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSW");
340 ndr->depth++;
341 ndr_print_ptr(ndr, "service_name", r->service_name);
342 ndr->depth++;
343 if (r->service_name) {
344 ndr_print_string(ndr, "service_name", r->service_name);
346 ndr->depth--;
347 ndr_print_ptr(ndr, "display_name", r->display_name);
348 ndr->depth++;
349 if (r->display_name) {
350 ndr_print_string(ndr, "display_name", r->display_name);
352 ndr->depth--;
353 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
354 ndr->depth--;
357 _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, struct smb_iconv_convenience *ic, int flags)
359 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSW, ic);
362 _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSA *r)
364 if (ndr_flags & NDR_SCALARS) {
365 NDR_CHECK(ndr_push_align(ndr, 5));
367 uint32_t _flags_save_string = ndr->flags;
368 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
369 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
370 ndr->flags = _flags_save_string;
373 uint32_t _flags_save_string = ndr->flags;
374 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
375 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
376 ndr->flags = _flags_save_string;
378 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
379 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
381 if (ndr_flags & NDR_BUFFERS) {
383 uint32_t _flags_save_string = ndr->flags;
384 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
385 if (r->service_name) {
386 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->service_name));
387 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
388 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->service_name));
390 ndr->flags = _flags_save_string;
393 uint32_t _flags_save_string = ndr->flags;
394 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
395 if (r->display_name) {
396 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->display_name));
397 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
398 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->display_name));
400 ndr->flags = _flags_save_string;
403 return NDR_ERR_SUCCESS;
406 _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSA *r)
408 uint32_t _ptr_service_name;
409 TALLOC_CTX *_mem_save_service_name_0;
410 uint32_t _ptr_display_name;
411 TALLOC_CTX *_mem_save_display_name_0;
412 if (ndr_flags & NDR_SCALARS) {
413 NDR_CHECK(ndr_pull_align(ndr, 5));
415 uint32_t _flags_save_string = ndr->flags;
416 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
417 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
418 if (_ptr_service_name) {
419 NDR_PULL_ALLOC(ndr, r->service_name);
420 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
421 } else {
422 r->service_name = NULL;
424 ndr->flags = _flags_save_string;
427 uint32_t _flags_save_string = ndr->flags;
428 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
429 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
430 if (_ptr_display_name) {
431 NDR_PULL_ALLOC(ndr, r->display_name);
432 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
433 } else {
434 r->display_name = NULL;
436 ndr->flags = _flags_save_string;
438 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
439 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
441 if (ndr_flags & NDR_BUFFERS) {
443 uint32_t _flags_save_string = ndr->flags;
444 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
445 if (r->service_name) {
446 uint32_t _relative_save_offset;
447 _relative_save_offset = ndr->offset;
448 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
449 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
450 NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
451 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
453 ndr->offset = _relative_save_offset;
455 ndr->flags = _flags_save_string;
458 uint32_t _flags_save_string = ndr->flags;
459 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
460 if (r->display_name) {
461 uint32_t _relative_save_offset;
462 _relative_save_offset = ndr->offset;
463 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
464 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
465 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
466 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
467 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
468 ndr->offset = _relative_save_offset;
470 ndr->flags = _flags_save_string;
473 return NDR_ERR_SUCCESS;
476 _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSA *r)
478 ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSA");
479 ndr->depth++;
480 ndr_print_ptr(ndr, "service_name", r->service_name);
481 ndr->depth++;
482 if (r->service_name) {
483 ndr_print_string(ndr, "service_name", r->service_name);
485 ndr->depth--;
486 ndr_print_ptr(ndr, "display_name", r->display_name);
487 ndr->depth++;
488 if (r->display_name) {
489 ndr_print_string(ndr, "display_name", r->display_name);
491 ndr->depth--;
492 ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
493 ndr->depth--;
496 _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA *r, struct smb_iconv_convenience *ic, int flags)
498 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSA, ic);
501 _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ServerType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
504 return NDR_ERR_SUCCESS;
507 _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ServerType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
509 uint32_t v;
510 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
511 *r = v;
512 return NDR_ERR_SUCCESS;
515 _PUBLIC_ void ndr_print_svcctl_ServerType(struct ndr_print *ndr, const char *name, uint32_t r)
517 ndr_print_uint32(ndr, name, r);
518 ndr->depth++;
519 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WORKSTATION", SV_TYPE_WORKSTATION, r);
520 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER", SV_TYPE_SERVER, r);
521 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SQLSERVER", SV_TYPE_SQLSERVER, r);
522 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_CTRL", SV_TYPE_DOMAIN_CTRL, r);
523 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_BAKCTRL", SV_TYPE_DOMAIN_BAKCTRL, r);
524 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_TIME_SOURCE", SV_TYPE_TIME_SOURCE, r);
525 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_AFP", SV_TYPE_AFP, r);
526 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NOVELL", SV_TYPE_NOVELL, r);
527 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MEMBER", SV_TYPE_DOMAIN_MEMBER, r);
528 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_PRINTQ_SERVER", SV_TYPE_PRINTQ_SERVER, r);
529 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DIALIN_SERVER", SV_TYPE_DIALIN_SERVER, r);
530 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_UNIX", SV_TYPE_SERVER_UNIX, r);
531 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_NT", SV_TYPE_NT, r);
532 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WFW", SV_TYPE_WFW, r);
533 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_MFPN", SV_TYPE_SERVER_MFPN, r);
534 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_NT", SV_TYPE_SERVER_NT, r);
535 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_POTENTIAL_BROWSER", SV_TYPE_POTENTIAL_BROWSER, r);
536 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_BACKUP_BROWSER", SV_TYPE_BACKUP_BROWSER, r);
537 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_MASTER_BROWSER", SV_TYPE_MASTER_BROWSER, r);
538 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_MASTER", SV_TYPE_DOMAIN_MASTER, r);
539 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_OSF", SV_TYPE_SERVER_OSF, r);
540 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_SERVER_VMS", SV_TYPE_SERVER_VMS, r);
541 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_WIN95_PLUS", SV_TYPE_WIN95_PLUS, r);
542 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DFS_SERVER", SV_TYPE_DFS_SERVER, r);
543 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_ALTERNATE_XPORT", SV_TYPE_ALTERNATE_XPORT, r);
544 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_LOCAL_LIST_ONLY", SV_TYPE_LOCAL_LIST_ONLY, r);
545 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SV_TYPE_DOMAIN_ENUM", SV_TYPE_DOMAIN_ENUM, r);
546 ndr->depth--;
549 static enum ndr_err_code ndr_push_SERVICE_CONTROL(struct ndr_push *ndr, int ndr_flags, enum SERVICE_CONTROL r)
551 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
552 return NDR_ERR_SUCCESS;
555 static enum ndr_err_code ndr_pull_SERVICE_CONTROL(struct ndr_pull *ndr, int ndr_flags, enum SERVICE_CONTROL *r)
557 uint32_t v;
558 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
559 *r = v;
560 return NDR_ERR_SUCCESS;
563 _PUBLIC_ void ndr_print_SERVICE_CONTROL(struct ndr_print *ndr, const char *name, enum SERVICE_CONTROL r)
565 const char *val = NULL;
567 switch (r) {
568 case SVCCTL_CONTROL_STOP: val = "SVCCTL_CONTROL_STOP"; break;
569 case SVCCTL_CONTROL_PAUSE: val = "SVCCTL_CONTROL_PAUSE"; break;
570 case SVCCTL_CONTROL_CONTINUE: val = "SVCCTL_CONTROL_CONTINUE"; break;
571 case SVCCTL_CONTROL_INTERROGATE: val = "SVCCTL_CONTROL_INTERROGATE"; break;
572 case SVCCTL_CONTROL_SHUTDOWN: val = "SVCCTL_CONTROL_SHUTDOWN"; break;
574 ndr_print_enum(ndr, name, "ENUM", val, r);
577 static enum ndr_err_code ndr_push_svcctl_ErrorControl(struct ndr_push *ndr, int ndr_flags, enum svcctl_ErrorControl r)
579 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
580 return NDR_ERR_SUCCESS;
583 static enum ndr_err_code ndr_pull_svcctl_ErrorControl(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ErrorControl *r)
585 uint32_t v;
586 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
587 *r = v;
588 return NDR_ERR_SUCCESS;
591 _PUBLIC_ void ndr_print_svcctl_ErrorControl(struct ndr_print *ndr, const char *name, enum svcctl_ErrorControl r)
593 const char *val = NULL;
595 switch (r) {
596 case SVCCTL_SVC_ERROR_IGNORE: val = "SVCCTL_SVC_ERROR_IGNORE"; break;
597 case SVCCTL_SVC_ERROR_NORMAL: val = "SVCCTL_SVC_ERROR_NORMAL"; break;
598 case SVCCTL_SVC_ERROR_CRITICAL: val = "SVCCTL_SVC_ERROR_CRITICAL"; break;
599 case SVCCTL_SVC_ERROR_SEVERE: val = "SVCCTL_SVC_ERROR_SEVERE"; break;
601 ndr_print_enum(ndr, name, "ENUM", val, r);
604 static enum ndr_err_code ndr_push_svcctl_StartType(struct ndr_push *ndr, int ndr_flags, enum svcctl_StartType r)
606 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
607 return NDR_ERR_SUCCESS;
610 static enum ndr_err_code ndr_pull_svcctl_StartType(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StartType *r)
612 uint32_t v;
613 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
614 *r = v;
615 return NDR_ERR_SUCCESS;
618 _PUBLIC_ void ndr_print_svcctl_StartType(struct ndr_print *ndr, const char *name, enum svcctl_StartType r)
620 const char *val = NULL;
622 switch (r) {
623 case SVCCTL_BOOT_START: val = "SVCCTL_BOOT_START"; break;
624 case SVCCTL_SYSTEM_START: val = "SVCCTL_SYSTEM_START"; break;
625 case SVCCTL_AUTO_START: val = "SVCCTL_AUTO_START"; break;
626 case SVCCTL_DEMAND_START: val = "SVCCTL_DEMAND_START"; break;
627 case SVCCTL_DISABLED: val = "SVCCTL_DISABLED"; break;
629 ndr_print_enum(ndr, name, "ENUM", val, r);
632 static enum ndr_err_code ndr_push_svcctl_ServiceState(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceState r)
634 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
635 return NDR_ERR_SUCCESS;
638 static enum ndr_err_code ndr_pull_svcctl_ServiceState(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceState *r)
640 uint32_t v;
641 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
642 *r = v;
643 return NDR_ERR_SUCCESS;
646 _PUBLIC_ void ndr_print_svcctl_ServiceState(struct ndr_print *ndr, const char *name, enum svcctl_ServiceState r)
648 const char *val = NULL;
650 switch (r) {
651 case SERVICE_STATE_ACTIVE: val = "SERVICE_STATE_ACTIVE"; break;
652 case SERVICE_STATE_INACTIVE: val = "SERVICE_STATE_INACTIVE"; break;
653 case SERVICE_STATE_ALL: val = "SERVICE_STATE_ALL"; break;
655 ndr_print_enum(ndr, name, "ENUM", val, r);
658 static enum ndr_err_code ndr_push_svcctl_MgrAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
661 return NDR_ERR_SUCCESS;
664 static enum ndr_err_code ndr_pull_svcctl_MgrAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
666 uint32_t v;
667 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
668 *r = v;
669 return NDR_ERR_SUCCESS;
672 _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
674 ndr_print_uint32(ndr, name, r);
675 ndr->depth++;
676 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CONNECT", SC_RIGHT_MGR_CONNECT, r);
677 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CREATE_SERVICE", SC_RIGHT_MGR_CREATE_SERVICE, r);
678 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_ENUMERATE_SERVICE", SC_RIGHT_MGR_ENUMERATE_SERVICE, r);
679 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_LOCK", SC_RIGHT_MGR_LOCK, r);
680 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_QUERY_LOCK_STATUS", SC_RIGHT_MGR_QUERY_LOCK_STATUS, r);
681 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_MODIFY_BOOT_CONFIG", SC_RIGHT_MGR_MODIFY_BOOT_CONFIG, r);
682 ndr->depth--;
685 static enum ndr_err_code ndr_push_svcctl_ServiceAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
688 return NDR_ERR_SUCCESS;
691 static enum ndr_err_code ndr_pull_svcctl_ServiceAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
693 uint32_t v;
694 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
695 *r = v;
696 return NDR_ERR_SUCCESS;
699 _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
701 ndr_print_uint32(ndr, name, r);
702 ndr->depth++;
703 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_CONFIG", SC_RIGHT_SVC_QUERY_CONFIG, r);
704 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_CHANGE_CONFIG", SC_RIGHT_SVC_CHANGE_CONFIG, r);
705 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_STATUS", SC_RIGHT_SVC_QUERY_STATUS, r);
706 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_ENUMERATE_DEPENDENTS", SC_RIGHT_SVC_ENUMERATE_DEPENDENTS, r);
707 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_START", SC_RIGHT_SVC_START, r);
708 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_STOP", SC_RIGHT_SVC_STOP, r);
709 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_PAUSE_CONTINUE", SC_RIGHT_SVC_PAUSE_CONTINUE, r);
710 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_INTERROGATE", SC_RIGHT_SVC_INTERROGATE, r);
711 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_USER_DEFINED_CONTROL", SC_RIGHT_SVC_USER_DEFINED_CONTROL, r);
712 ndr->depth--;
715 _PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r)
717 if (ndr_flags & NDR_SCALARS) {
718 NDR_CHECK(ndr_push_align(ndr, 5));
719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_type));
720 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->start_type));
721 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->error_control));
722 NDR_CHECK(ndr_push_unique_ptr(ndr, r->executablepath));
723 NDR_CHECK(ndr_push_unique_ptr(ndr, r->loadordergroup));
724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tag_id));
725 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies));
726 NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname));
727 NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname));
728 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
730 if (ndr_flags & NDR_BUFFERS) {
731 if (r->executablepath) {
732 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
733 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
734 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
735 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->executablepath, ndr_charset_length(r->executablepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
737 if (r->loadordergroup) {
738 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
739 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
740 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
741 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->loadordergroup, ndr_charset_length(r->loadordergroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
743 if (r->dependencies) {
744 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
745 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
746 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
747 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dependencies, ndr_charset_length(r->dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
749 if (r->startname) {
750 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
751 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
752 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
753 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->startname, ndr_charset_length(r->startname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
755 if (r->displayname) {
756 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
757 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
758 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
759 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->displayname, ndr_charset_length(r->displayname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
762 return NDR_ERR_SUCCESS;
765 _PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r)
767 uint32_t _ptr_executablepath;
768 TALLOC_CTX *_mem_save_executablepath_0;
769 uint32_t _ptr_loadordergroup;
770 TALLOC_CTX *_mem_save_loadordergroup_0;
771 uint32_t _ptr_dependencies;
772 TALLOC_CTX *_mem_save_dependencies_0;
773 uint32_t _ptr_startname;
774 TALLOC_CTX *_mem_save_startname_0;
775 uint32_t _ptr_displayname;
776 TALLOC_CTX *_mem_save_displayname_0;
777 if (ndr_flags & NDR_SCALARS) {
778 NDR_CHECK(ndr_pull_align(ndr, 5));
779 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_type));
780 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->start_type));
781 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->error_control));
782 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_executablepath));
783 if (_ptr_executablepath) {
784 NDR_PULL_ALLOC(ndr, r->executablepath);
785 } else {
786 r->executablepath = NULL;
788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_loadordergroup));
789 if (_ptr_loadordergroup) {
790 NDR_PULL_ALLOC(ndr, r->loadordergroup);
791 } else {
792 r->loadordergroup = NULL;
794 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tag_id));
795 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
796 if (_ptr_dependencies) {
797 NDR_PULL_ALLOC(ndr, r->dependencies);
798 } else {
799 r->dependencies = NULL;
801 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_startname));
802 if (_ptr_startname) {
803 NDR_PULL_ALLOC(ndr, r->startname);
804 } else {
805 r->startname = NULL;
807 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayname));
808 if (_ptr_displayname) {
809 NDR_PULL_ALLOC(ndr, r->displayname);
810 } else {
811 r->displayname = NULL;
813 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
815 if (ndr_flags & NDR_BUFFERS) {
816 if (r->executablepath) {
817 _mem_save_executablepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
818 NDR_PULL_SET_MEM_CTX(ndr, r->executablepath, 0);
819 NDR_CHECK(ndr_pull_array_size(ndr, &r->executablepath));
820 NDR_CHECK(ndr_pull_array_length(ndr, &r->executablepath));
821 if (ndr_get_array_length(ndr, &r->executablepath) > ndr_get_array_size(ndr, &r->executablepath)) {
822 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));
824 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t)));
825 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->executablepath, ndr_get_array_length(ndr, &r->executablepath), sizeof(uint16_t), CH_UTF16));
826 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_executablepath_0, 0);
828 if (r->loadordergroup) {
829 _mem_save_loadordergroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
830 NDR_PULL_SET_MEM_CTX(ndr, r->loadordergroup, 0);
831 NDR_CHECK(ndr_pull_array_size(ndr, &r->loadordergroup));
832 NDR_CHECK(ndr_pull_array_length(ndr, &r->loadordergroup));
833 if (ndr_get_array_length(ndr, &r->loadordergroup) > ndr_get_array_size(ndr, &r->loadordergroup)) {
834 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));
836 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t)));
837 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->loadordergroup, ndr_get_array_length(ndr, &r->loadordergroup), sizeof(uint16_t), CH_UTF16));
838 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_loadordergroup_0, 0);
840 if (r->dependencies) {
841 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
842 NDR_PULL_SET_MEM_CTX(ndr, r->dependencies, 0);
843 NDR_CHECK(ndr_pull_array_size(ndr, &r->dependencies));
844 NDR_CHECK(ndr_pull_array_length(ndr, &r->dependencies));
845 if (ndr_get_array_length(ndr, &r->dependencies) > ndr_get_array_size(ndr, &r->dependencies)) {
846 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));
848 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t)));
849 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dependencies, ndr_get_array_length(ndr, &r->dependencies), sizeof(uint16_t), CH_UTF16));
850 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
852 if (r->startname) {
853 _mem_save_startname_0 = NDR_PULL_GET_MEM_CTX(ndr);
854 NDR_PULL_SET_MEM_CTX(ndr, r->startname, 0);
855 NDR_CHECK(ndr_pull_array_size(ndr, &r->startname));
856 NDR_CHECK(ndr_pull_array_length(ndr, &r->startname));
857 if (ndr_get_array_length(ndr, &r->startname) > ndr_get_array_size(ndr, &r->startname)) {
858 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));
860 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t)));
861 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->startname, ndr_get_array_length(ndr, &r->startname), sizeof(uint16_t), CH_UTF16));
862 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_startname_0, 0);
864 if (r->displayname) {
865 _mem_save_displayname_0 = NDR_PULL_GET_MEM_CTX(ndr);
866 NDR_PULL_SET_MEM_CTX(ndr, r->displayname, 0);
867 NDR_CHECK(ndr_pull_array_size(ndr, &r->displayname));
868 NDR_CHECK(ndr_pull_array_length(ndr, &r->displayname));
869 if (ndr_get_array_length(ndr, &r->displayname) > ndr_get_array_size(ndr, &r->displayname)) {
870 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));
872 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t)));
873 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->displayname, ndr_get_array_length(ndr, &r->displayname), sizeof(uint16_t), CH_UTF16));
874 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayname_0, 0);
877 return NDR_ERR_SUCCESS;
880 _PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r)
882 ndr_print_struct(ndr, name, "QUERY_SERVICE_CONFIG");
883 ndr->depth++;
884 ndr_print_uint32(ndr, "service_type", r->service_type);
885 ndr_print_svcctl_StartType(ndr, "start_type", r->start_type);
886 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->error_control);
887 ndr_print_ptr(ndr, "executablepath", r->executablepath);
888 ndr->depth++;
889 if (r->executablepath) {
890 ndr_print_string(ndr, "executablepath", r->executablepath);
892 ndr->depth--;
893 ndr_print_ptr(ndr, "loadordergroup", r->loadordergroup);
894 ndr->depth++;
895 if (r->loadordergroup) {
896 ndr_print_string(ndr, "loadordergroup", r->loadordergroup);
898 ndr->depth--;
899 ndr_print_uint32(ndr, "tag_id", r->tag_id);
900 ndr_print_ptr(ndr, "dependencies", r->dependencies);
901 ndr->depth++;
902 if (r->dependencies) {
903 ndr_print_string(ndr, "dependencies", r->dependencies);
905 ndr->depth--;
906 ndr_print_ptr(ndr, "startname", r->startname);
907 ndr->depth++;
908 if (r->startname) {
909 ndr_print_string(ndr, "startname", r->startname);
911 ndr->depth--;
912 ndr_print_ptr(ndr, "displayname", r->displayname);
913 ndr->depth++;
914 if (r->displayname) {
915 ndr_print_string(ndr, "displayname", r->displayname);
917 ndr->depth--;
918 ndr->depth--;
921 _PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, struct smb_iconv_convenience *ic, int flags)
923 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG, ic);
926 static enum ndr_err_code ndr_push_svcctl_ArgumentString(struct ndr_push *ndr, int ndr_flags, const struct svcctl_ArgumentString *r)
928 if (ndr_flags & NDR_SCALARS) {
929 NDR_CHECK(ndr_push_align(ndr, 5));
930 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
931 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
933 if (ndr_flags & NDR_BUFFERS) {
934 if (r->string) {
935 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
936 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
937 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
938 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, ndr_charset_length(r->string, CH_UTF16), sizeof(uint16_t), CH_UTF16));
941 return NDR_ERR_SUCCESS;
944 static enum ndr_err_code ndr_pull_svcctl_ArgumentString(struct ndr_pull *ndr, int ndr_flags, struct svcctl_ArgumentString *r)
946 uint32_t _ptr_string;
947 TALLOC_CTX *_mem_save_string_0;
948 if (ndr_flags & NDR_SCALARS) {
949 NDR_CHECK(ndr_pull_align(ndr, 5));
950 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
951 if (_ptr_string) {
952 NDR_PULL_ALLOC(ndr, r->string);
953 } else {
954 r->string = NULL;
956 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
958 if (ndr_flags & NDR_BUFFERS) {
959 if (r->string) {
960 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
961 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
962 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
963 NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
964 if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
965 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));
967 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t)));
968 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
972 return NDR_ERR_SUCCESS;
975 _PUBLIC_ void ndr_print_svcctl_ArgumentString(struct ndr_print *ndr, const char *name, const struct svcctl_ArgumentString *r)
977 ndr_print_struct(ndr, name, "svcctl_ArgumentString");
978 ndr->depth++;
979 ndr_print_ptr(ndr, "string", r->string);
980 ndr->depth++;
981 if (r->string) {
982 ndr_print_string(ndr, "string", r->string);
984 ndr->depth--;
985 ndr->depth--;
988 static enum ndr_err_code ndr_push_svcctl_ConfigLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_ConfigLevel r)
990 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
991 return NDR_ERR_SUCCESS;
994 static enum ndr_err_code ndr_pull_svcctl_ConfigLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ConfigLevel *r)
996 uint32_t v;
997 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
998 *r = v;
999 return NDR_ERR_SUCCESS;
1002 _PUBLIC_ void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r)
1004 const char *val = NULL;
1006 switch (r) {
1007 case SERVICE_CONFIG_DESCRIPTION: val = "SERVICE_CONFIG_DESCRIPTION"; break;
1008 case SERVICE_CONFIG_FAILURE_ACTIONS: val = "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
1010 ndr_print_enum(ndr, name, "ENUM", val, r);
1013 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_DESCRIPTION *r)
1015 if (ndr_flags & NDR_SCALARS) {
1016 NDR_CHECK(ndr_push_align(ndr, 5));
1018 uint32_t _flags_save_string = ndr->flags;
1019 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1020 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
1021 ndr->flags = _flags_save_string;
1023 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1025 if (ndr_flags & NDR_BUFFERS) {
1027 uint32_t _flags_save_string = ndr->flags;
1028 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1029 if (r->description) {
1030 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->description));
1031 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
1032 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->description));
1034 ndr->flags = _flags_save_string;
1037 return NDR_ERR_SUCCESS;
1040 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_DESCRIPTION *r)
1042 uint32_t _ptr_description;
1043 TALLOC_CTX *_mem_save_description_0;
1044 if (ndr_flags & NDR_SCALARS) {
1045 NDR_CHECK(ndr_pull_align(ndr, 5));
1047 uint32_t _flags_save_string = ndr->flags;
1048 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
1050 if (_ptr_description) {
1051 NDR_PULL_ALLOC(ndr, r->description);
1052 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
1053 } else {
1054 r->description = NULL;
1056 ndr->flags = _flags_save_string;
1058 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1060 if (ndr_flags & NDR_BUFFERS) {
1062 uint32_t _flags_save_string = ndr->flags;
1063 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1064 if (r->description) {
1065 uint32_t _relative_save_offset;
1066 _relative_save_offset = ndr->offset;
1067 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
1068 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
1069 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
1070 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
1071 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
1072 ndr->offset = _relative_save_offset;
1074 ndr->flags = _flags_save_string;
1077 return NDR_ERR_SUCCESS;
1080 _PUBLIC_ void ndr_print_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTION *r)
1082 ndr_print_struct(ndr, name, "SERVICE_DESCRIPTION");
1083 ndr->depth++;
1084 ndr_print_ptr(ndr, "description", r->description);
1085 ndr->depth++;
1086 if (r->description) {
1087 ndr_print_string(ndr, "description", r->description);
1089 ndr->depth--;
1090 ndr->depth--;
1093 _PUBLIC_ size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION *r, struct smb_iconv_convenience *ic, int flags)
1095 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION, ic);
1098 static enum ndr_err_code ndr_push_SC_ACTION_TYPE(struct ndr_push *ndr, int ndr_flags, enum SC_ACTION_TYPE r)
1100 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1101 return NDR_ERR_SUCCESS;
1104 static enum ndr_err_code ndr_pull_SC_ACTION_TYPE(struct ndr_pull *ndr, int ndr_flags, enum SC_ACTION_TYPE *r)
1106 uint32_t v;
1107 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1108 *r = v;
1109 return NDR_ERR_SUCCESS;
1112 _PUBLIC_ void ndr_print_SC_ACTION_TYPE(struct ndr_print *ndr, const char *name, enum SC_ACTION_TYPE r)
1114 const char *val = NULL;
1116 switch (r) {
1117 case SC_ACTION_NONE: val = "SC_ACTION_NONE"; break;
1118 case SC_ACTION_RESTART: val = "SC_ACTION_RESTART"; break;
1119 case SC_ACTION_REBOOT: val = "SC_ACTION_REBOOT"; break;
1120 case SC_ACTION_RUN_COMMAND: val = "SC_ACTION_RUN_COMMAND"; break;
1122 ndr_print_enum(ndr, name, "ENUM", val, r);
1125 static enum ndr_err_code ndr_push_SC_ACTION(struct ndr_push *ndr, int ndr_flags, const struct SC_ACTION *r)
1127 if (ndr_flags & NDR_SCALARS) {
1128 NDR_CHECK(ndr_push_align(ndr, 4));
1129 NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr, NDR_SCALARS, r->type));
1130 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->delay));
1131 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1133 if (ndr_flags & NDR_BUFFERS) {
1135 return NDR_ERR_SUCCESS;
1138 static enum ndr_err_code ndr_pull_SC_ACTION(struct ndr_pull *ndr, int ndr_flags, struct SC_ACTION *r)
1140 if (ndr_flags & NDR_SCALARS) {
1141 NDR_CHECK(ndr_pull_align(ndr, 4));
1142 NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr, NDR_SCALARS, &r->type));
1143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->delay));
1144 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1146 if (ndr_flags & NDR_BUFFERS) {
1148 return NDR_ERR_SUCCESS;
1151 _PUBLIC_ void ndr_print_SC_ACTION(struct ndr_print *ndr, const char *name, const struct SC_ACTION *r)
1153 ndr_print_struct(ndr, name, "SC_ACTION");
1154 ndr->depth++;
1155 ndr_print_SC_ACTION_TYPE(ndr, "type", r->type);
1156 ndr_print_uint32(ndr, "delay", r->delay);
1157 ndr->depth--;
1160 _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_FAILURE_ACTIONS *r)
1162 uint32_t cntr_actions_1;
1163 if (ndr_flags & NDR_SCALARS) {
1164 NDR_CHECK(ndr_push_align(ndr, 5));
1165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reset_period));
1167 uint32_t _flags_save_string = ndr->flags;
1168 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1169 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->rebootmsg));
1170 ndr->flags = _flags_save_string;
1173 uint32_t _flags_save_string = ndr->flags;
1174 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1175 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->command));
1176 ndr->flags = _flags_save_string;
1178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions));
1179 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->actions));
1180 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1182 if (ndr_flags & NDR_BUFFERS) {
1184 uint32_t _flags_save_string = ndr->flags;
1185 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1186 if (r->rebootmsg) {
1187 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->rebootmsg));
1188 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->rebootmsg));
1189 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->rebootmsg));
1191 ndr->flags = _flags_save_string;
1194 uint32_t _flags_save_string = ndr->flags;
1195 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1196 if (r->command) {
1197 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->command));
1198 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->command));
1199 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->command));
1201 ndr->flags = _flags_save_string;
1203 if (r->actions) {
1204 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->actions));
1205 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_actions));
1206 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1207 NDR_CHECK(ndr_push_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1209 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->actions));
1212 return NDR_ERR_SUCCESS;
1215 _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_FAILURE_ACTIONS *r)
1217 uint32_t _ptr_rebootmsg;
1218 TALLOC_CTX *_mem_save_rebootmsg_0;
1219 uint32_t _ptr_command;
1220 TALLOC_CTX *_mem_save_command_0;
1221 uint32_t _ptr_actions;
1222 uint32_t cntr_actions_1;
1223 TALLOC_CTX *_mem_save_actions_0;
1224 TALLOC_CTX *_mem_save_actions_1;
1225 if (ndr_flags & NDR_SCALARS) {
1226 NDR_CHECK(ndr_pull_align(ndr, 5));
1227 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reset_period));
1229 uint32_t _flags_save_string = ndr->flags;
1230 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1231 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rebootmsg));
1232 if (_ptr_rebootmsg) {
1233 NDR_PULL_ALLOC(ndr, r->rebootmsg);
1234 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->rebootmsg, _ptr_rebootmsg));
1235 } else {
1236 r->rebootmsg = NULL;
1238 ndr->flags = _flags_save_string;
1241 uint32_t _flags_save_string = ndr->flags;
1242 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1243 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
1244 if (_ptr_command) {
1245 NDR_PULL_ALLOC(ndr, r->command);
1246 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->command, _ptr_command));
1247 } else {
1248 r->command = NULL;
1250 ndr->flags = _flags_save_string;
1252 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_actions));
1253 if (r->num_actions > 1024) {
1254 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1256 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_actions));
1257 if (_ptr_actions) {
1258 NDR_PULL_ALLOC(ndr, r->actions);
1259 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->actions, _ptr_actions));
1260 } else {
1261 r->actions = NULL;
1263 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1265 if (ndr_flags & NDR_BUFFERS) {
1267 uint32_t _flags_save_string = ndr->flags;
1268 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1269 if (r->rebootmsg) {
1270 uint32_t _relative_save_offset;
1271 _relative_save_offset = ndr->offset;
1272 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->rebootmsg));
1273 _mem_save_rebootmsg_0 = NDR_PULL_GET_MEM_CTX(ndr);
1274 NDR_PULL_SET_MEM_CTX(ndr, r->rebootmsg, 0);
1275 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->rebootmsg));
1276 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rebootmsg_0, 0);
1277 ndr->offset = _relative_save_offset;
1279 ndr->flags = _flags_save_string;
1282 uint32_t _flags_save_string = ndr->flags;
1283 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1284 if (r->command) {
1285 uint32_t _relative_save_offset;
1286 _relative_save_offset = ndr->offset;
1287 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->command));
1288 _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
1289 NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
1290 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->command));
1291 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
1292 ndr->offset = _relative_save_offset;
1294 ndr->flags = _flags_save_string;
1296 if (r->actions) {
1297 uint32_t _relative_save_offset;
1298 _relative_save_offset = ndr->offset;
1299 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->actions));
1300 _mem_save_actions_0 = NDR_PULL_GET_MEM_CTX(ndr);
1301 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1302 NDR_CHECK(ndr_pull_array_size(ndr, &r->actions));
1303 NDR_PULL_ALLOC_N(ndr, r->actions, ndr_get_array_size(ndr, &r->actions));
1304 _mem_save_actions_1 = NDR_PULL_GET_MEM_CTX(ndr);
1305 NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1306 for (cntr_actions_1 = 0; cntr_actions_1 < r->num_actions; cntr_actions_1++) {
1307 NDR_CHECK(ndr_pull_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1309 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_1, 0);
1310 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_0, 0);
1311 ndr->offset = _relative_save_offset;
1313 if (r->actions) {
1314 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->actions, r->num_actions));
1317 return NDR_ERR_SUCCESS;
1320 _PUBLIC_ void ndr_print_SERVICE_FAILURE_ACTIONS(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONS *r)
1322 uint32_t cntr_actions_1;
1323 ndr_print_struct(ndr, name, "SERVICE_FAILURE_ACTIONS");
1324 ndr->depth++;
1325 ndr_print_uint32(ndr, "reset_period", r->reset_period);
1326 ndr_print_ptr(ndr, "rebootmsg", r->rebootmsg);
1327 ndr->depth++;
1328 if (r->rebootmsg) {
1329 ndr_print_string(ndr, "rebootmsg", r->rebootmsg);
1331 ndr->depth--;
1332 ndr_print_ptr(ndr, "command", r->command);
1333 ndr->depth++;
1334 if (r->command) {
1335 ndr_print_string(ndr, "command", r->command);
1337 ndr->depth--;
1338 ndr_print_uint32(ndr, "num_actions", r->num_actions);
1339 ndr_print_ptr(ndr, "actions", r->actions);
1340 ndr->depth++;
1341 if (r->actions) {
1342 ndr->print(ndr, "%s: ARRAY(%d)", "actions", (int)r->num_actions);
1343 ndr->depth++;
1344 for (cntr_actions_1=0;cntr_actions_1<r->num_actions;cntr_actions_1++) {
1345 char *idx_1=NULL;
1346 if (asprintf(&idx_1, "[%d]", cntr_actions_1) != -1) {
1347 ndr_print_SC_ACTION(ndr, "actions", &r->actions[cntr_actions_1]);
1348 free(idx_1);
1351 ndr->depth--;
1353 ndr->depth--;
1354 ndr->depth--;
1357 _PUBLIC_ size_t ndr_size_SERVICE_FAILURE_ACTIONS(const struct SERVICE_FAILURE_ACTIONS *r, struct smb_iconv_convenience *ic, int flags)
1359 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONS, ic);
1362 static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_StatusLevel r)
1364 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1365 return NDR_ERR_SUCCESS;
1368 static enum ndr_err_code ndr_pull_svcctl_StatusLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StatusLevel *r)
1370 uint32_t v;
1371 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1372 *r = v;
1373 return NDR_ERR_SUCCESS;
1376 _PUBLIC_ void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r)
1378 const char *val = NULL;
1380 switch (r) {
1381 case SVC_STATUS_PROCESS_INFO: val = "SVC_STATUS_PROCESS_INFO"; break;
1383 ndr_print_enum(ndr, name, "ENUM", val, r);
1386 static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
1388 if (flags & NDR_IN) {
1389 if (r->in.handle == NULL) {
1390 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1392 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1394 if (flags & NDR_OUT) {
1395 if (r->out.handle == NULL) {
1396 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1398 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1399 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1401 return NDR_ERR_SUCCESS;
1404 static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
1406 TALLOC_CTX *_mem_save_handle_0;
1407 if (flags & NDR_IN) {
1408 ZERO_STRUCT(r->out);
1410 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1411 NDR_PULL_ALLOC(ndr, r->in.handle);
1413 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1414 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1415 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1416 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1417 NDR_PULL_ALLOC(ndr, r->out.handle);
1418 *r->out.handle = *r->in.handle;
1420 if (flags & NDR_OUT) {
1421 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1422 NDR_PULL_ALLOC(ndr, r->out.handle);
1424 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1425 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1426 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1427 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1428 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1430 return NDR_ERR_SUCCESS;
1433 _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r)
1435 ndr_print_struct(ndr, name, "svcctl_CloseServiceHandle");
1436 ndr->depth++;
1437 if (flags & NDR_SET_VALUES) {
1438 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1440 if (flags & NDR_IN) {
1441 ndr_print_struct(ndr, "in", "svcctl_CloseServiceHandle");
1442 ndr->depth++;
1443 ndr_print_ptr(ndr, "handle", r->in.handle);
1444 ndr->depth++;
1445 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1446 ndr->depth--;
1447 ndr->depth--;
1449 if (flags & NDR_OUT) {
1450 ndr_print_struct(ndr, "out", "svcctl_CloseServiceHandle");
1451 ndr->depth++;
1452 ndr_print_ptr(ndr, "handle", r->out.handle);
1453 ndr->depth++;
1454 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1455 ndr->depth--;
1456 ndr_print_WERROR(ndr, "result", r->out.result);
1457 ndr->depth--;
1459 ndr->depth--;
1462 static enum ndr_err_code ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
1464 if (flags & NDR_IN) {
1465 if (r->in.handle == NULL) {
1466 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1468 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1469 NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.control));
1471 if (flags & NDR_OUT) {
1472 if (r->out.service_status == NULL) {
1473 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1475 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1476 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1478 return NDR_ERR_SUCCESS;
1481 static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
1483 TALLOC_CTX *_mem_save_handle_0;
1484 TALLOC_CTX *_mem_save_service_status_0;
1485 if (flags & NDR_IN) {
1486 ZERO_STRUCT(r->out);
1488 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1489 NDR_PULL_ALLOC(ndr, r->in.handle);
1491 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1492 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1493 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1494 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1495 NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.control));
1496 NDR_PULL_ALLOC(ndr, r->out.service_status);
1497 ZERO_STRUCTP(r->out.service_status);
1499 if (flags & NDR_OUT) {
1500 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1501 NDR_PULL_ALLOC(ndr, r->out.service_status);
1503 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1504 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1505 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1507 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1509 return NDR_ERR_SUCCESS;
1512 _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r)
1514 ndr_print_struct(ndr, name, "svcctl_ControlService");
1515 ndr->depth++;
1516 if (flags & NDR_SET_VALUES) {
1517 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1519 if (flags & NDR_IN) {
1520 ndr_print_struct(ndr, "in", "svcctl_ControlService");
1521 ndr->depth++;
1522 ndr_print_ptr(ndr, "handle", r->in.handle);
1523 ndr->depth++;
1524 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1525 ndr->depth--;
1526 ndr_print_SERVICE_CONTROL(ndr, "control", r->in.control);
1527 ndr->depth--;
1529 if (flags & NDR_OUT) {
1530 ndr_print_struct(ndr, "out", "svcctl_ControlService");
1531 ndr->depth++;
1532 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1533 ndr->depth++;
1534 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1535 ndr->depth--;
1536 ndr_print_WERROR(ndr, "result", r->out.result);
1537 ndr->depth--;
1539 ndr->depth--;
1542 static enum ndr_err_code ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *r)
1544 if (flags & NDR_IN) {
1545 if (r->in.handle == NULL) {
1546 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1548 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1550 if (flags & NDR_OUT) {
1551 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1553 return NDR_ERR_SUCCESS;
1556 static enum ndr_err_code ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
1558 TALLOC_CTX *_mem_save_handle_0;
1559 if (flags & NDR_IN) {
1560 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1561 NDR_PULL_ALLOC(ndr, r->in.handle);
1563 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1564 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1565 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1566 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1568 if (flags & NDR_OUT) {
1569 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1571 return NDR_ERR_SUCCESS;
1574 _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r)
1576 ndr_print_struct(ndr, name, "svcctl_DeleteService");
1577 ndr->depth++;
1578 if (flags & NDR_SET_VALUES) {
1579 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1581 if (flags & NDR_IN) {
1582 ndr_print_struct(ndr, "in", "svcctl_DeleteService");
1583 ndr->depth++;
1584 ndr_print_ptr(ndr, "handle", r->in.handle);
1585 ndr->depth++;
1586 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1587 ndr->depth--;
1588 ndr->depth--;
1590 if (flags & NDR_OUT) {
1591 ndr_print_struct(ndr, "out", "svcctl_DeleteService");
1592 ndr->depth++;
1593 ndr_print_WERROR(ndr, "result", r->out.result);
1594 ndr->depth--;
1596 ndr->depth--;
1599 static enum ndr_err_code ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
1601 if (flags & NDR_IN) {
1602 if (r->in.handle == NULL) {
1603 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1605 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1607 if (flags & NDR_OUT) {
1608 if (r->out.lock == NULL) {
1609 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1611 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1612 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1614 return NDR_ERR_SUCCESS;
1617 static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
1619 TALLOC_CTX *_mem_save_handle_0;
1620 TALLOC_CTX *_mem_save_lock_0;
1621 if (flags & NDR_IN) {
1622 ZERO_STRUCT(r->out);
1624 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1625 NDR_PULL_ALLOC(ndr, r->in.handle);
1627 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1628 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1629 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1630 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1631 NDR_PULL_ALLOC(ndr, r->out.lock);
1632 ZERO_STRUCTP(r->out.lock);
1634 if (flags & NDR_OUT) {
1635 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1636 NDR_PULL_ALLOC(ndr, r->out.lock);
1638 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1639 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
1640 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1641 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1642 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1644 return NDR_ERR_SUCCESS;
1647 _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r)
1649 ndr_print_struct(ndr, name, "svcctl_LockServiceDatabase");
1650 ndr->depth++;
1651 if (flags & NDR_SET_VALUES) {
1652 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1654 if (flags & NDR_IN) {
1655 ndr_print_struct(ndr, "in", "svcctl_LockServiceDatabase");
1656 ndr->depth++;
1657 ndr_print_ptr(ndr, "handle", r->in.handle);
1658 ndr->depth++;
1659 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1660 ndr->depth--;
1661 ndr->depth--;
1663 if (flags & NDR_OUT) {
1664 ndr_print_struct(ndr, "out", "svcctl_LockServiceDatabase");
1665 ndr->depth++;
1666 ndr_print_ptr(ndr, "lock", r->out.lock);
1667 ndr->depth++;
1668 ndr_print_policy_handle(ndr, "lock", r->out.lock);
1669 ndr->depth--;
1670 ndr_print_WERROR(ndr, "result", r->out.result);
1671 ndr->depth--;
1673 ndr->depth--;
1676 static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1678 if (flags & NDR_IN) {
1679 if (r->in.handle == NULL) {
1680 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1682 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1683 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1686 if (flags & NDR_OUT) {
1687 if (r->out.buffer == NULL) {
1688 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1690 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1691 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
1692 if (r->out.needed == NULL) {
1693 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1695 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
1696 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1698 return NDR_ERR_SUCCESS;
1701 static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
1703 TALLOC_CTX *_mem_save_handle_0;
1704 TALLOC_CTX *_mem_save_needed_0;
1705 if (flags & NDR_IN) {
1706 ZERO_STRUCT(r->out);
1708 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1709 NDR_PULL_ALLOC(ndr, r->in.handle);
1711 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1712 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1713 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1714 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1715 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1716 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1717 if (r->in.offered > 0x40000) {
1718 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1720 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
1721 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
1722 NDR_PULL_ALLOC(ndr, r->out.needed);
1723 ZERO_STRUCTP(r->out.needed);
1725 if (flags & NDR_OUT) {
1726 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
1727 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1728 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
1730 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
1731 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1732 NDR_PULL_ALLOC(ndr, r->out.needed);
1734 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
1735 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
1736 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
1737 if (*r->out.needed > 0x40000) {
1738 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1740 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
1741 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1742 if (r->out.buffer) {
1743 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
1746 return NDR_ERR_SUCCESS;
1749 _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1751 ndr_print_struct(ndr, name, "svcctl_QueryServiceObjectSecurity");
1752 ndr->depth++;
1753 if (flags & NDR_SET_VALUES) {
1754 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1756 if (flags & NDR_IN) {
1757 ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
1758 ndr->depth++;
1759 ndr_print_ptr(ndr, "handle", r->in.handle);
1760 ndr->depth++;
1761 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1762 ndr->depth--;
1763 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1764 ndr_print_uint32(ndr, "offered", r->in.offered);
1765 ndr->depth--;
1767 if (flags & NDR_OUT) {
1768 ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
1769 ndr->depth++;
1770 ndr_print_ptr(ndr, "buffer", r->out.buffer);
1771 ndr->depth++;
1772 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
1773 ndr->depth--;
1774 ndr_print_ptr(ndr, "needed", r->out.needed);
1775 ndr->depth++;
1776 ndr_print_uint32(ndr, "needed", *r->out.needed);
1777 ndr->depth--;
1778 ndr_print_WERROR(ndr, "result", r->out.result);
1779 ndr->depth--;
1781 ndr->depth--;
1784 static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1786 if (flags & NDR_IN) {
1787 if (r->in.handle == NULL) {
1788 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1790 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1791 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1792 if (r->in.buffer == NULL) {
1793 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1795 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1796 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
1797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1799 if (flags & NDR_OUT) {
1800 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1802 return NDR_ERR_SUCCESS;
1805 static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
1807 TALLOC_CTX *_mem_save_handle_0;
1808 if (flags & NDR_IN) {
1809 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1810 NDR_PULL_ALLOC(ndr, r->in.handle);
1812 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1813 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1814 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1816 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1817 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
1818 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1819 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
1821 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
1822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1823 if (r->in.buffer) {
1824 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
1827 if (flags & NDR_OUT) {
1828 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1830 return NDR_ERR_SUCCESS;
1833 _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1835 ndr_print_struct(ndr, name, "svcctl_SetServiceObjectSecurity");
1836 ndr->depth++;
1837 if (flags & NDR_SET_VALUES) {
1838 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1840 if (flags & NDR_IN) {
1841 ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
1842 ndr->depth++;
1843 ndr_print_ptr(ndr, "handle", r->in.handle);
1844 ndr->depth++;
1845 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1846 ndr->depth--;
1847 ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1848 ndr_print_ptr(ndr, "buffer", r->in.buffer);
1849 ndr->depth++;
1850 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
1851 ndr->depth--;
1852 ndr_print_uint32(ndr, "offered", r->in.offered);
1853 ndr->depth--;
1855 if (flags & NDR_OUT) {
1856 ndr_print_struct(ndr, "out", "svcctl_SetServiceObjectSecurity");
1857 ndr->depth++;
1858 ndr_print_WERROR(ndr, "result", r->out.result);
1859 ndr->depth--;
1861 ndr->depth--;
1864 static enum ndr_err_code ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *r)
1866 if (flags & NDR_IN) {
1867 if (r->in.handle == NULL) {
1868 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1870 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1872 if (flags & NDR_OUT) {
1873 if (r->out.service_status == NULL) {
1874 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1876 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1877 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1879 return NDR_ERR_SUCCESS;
1882 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
1884 TALLOC_CTX *_mem_save_handle_0;
1885 TALLOC_CTX *_mem_save_service_status_0;
1886 if (flags & NDR_IN) {
1887 ZERO_STRUCT(r->out);
1889 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1890 NDR_PULL_ALLOC(ndr, r->in.handle);
1892 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1893 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1894 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1895 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1896 NDR_PULL_ALLOC(ndr, r->out.service_status);
1897 ZERO_STRUCTP(r->out.service_status);
1899 if (flags & NDR_OUT) {
1900 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1901 NDR_PULL_ALLOC(ndr, r->out.service_status);
1903 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1904 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1905 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1906 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1907 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1909 return NDR_ERR_SUCCESS;
1912 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r)
1914 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatus");
1915 ndr->depth++;
1916 if (flags & NDR_SET_VALUES) {
1917 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1919 if (flags & NDR_IN) {
1920 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatus");
1921 ndr->depth++;
1922 ndr_print_ptr(ndr, "handle", r->in.handle);
1923 ndr->depth++;
1924 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1925 ndr->depth--;
1926 ndr->depth--;
1928 if (flags & NDR_OUT) {
1929 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatus");
1930 ndr->depth++;
1931 ndr_print_ptr(ndr, "service_status", r->out.service_status);
1932 ndr->depth++;
1933 ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1934 ndr->depth--;
1935 ndr_print_WERROR(ndr, "result", r->out.result);
1936 ndr->depth--;
1938 ndr->depth--;
1941 static enum ndr_err_code ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
1943 if (flags & NDR_IN) {
1945 if (flags & NDR_OUT) {
1946 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1948 return NDR_ERR_SUCCESS;
1951 static enum ndr_err_code ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
1953 if (flags & NDR_IN) {
1955 if (flags & NDR_OUT) {
1956 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1958 return NDR_ERR_SUCCESS;
1961 _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r)
1963 ndr_print_struct(ndr, name, "svcctl_SetServiceStatus");
1964 ndr->depth++;
1965 if (flags & NDR_SET_VALUES) {
1966 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1968 if (flags & NDR_IN) {
1969 ndr_print_struct(ndr, "in", "svcctl_SetServiceStatus");
1970 ndr->depth++;
1971 ndr->depth--;
1973 if (flags & NDR_OUT) {
1974 ndr_print_struct(ndr, "out", "svcctl_SetServiceStatus");
1975 ndr->depth++;
1976 ndr_print_WERROR(ndr, "result", r->out.result);
1977 ndr->depth--;
1979 ndr->depth--;
1982 static enum ndr_err_code ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
1984 if (flags & NDR_IN) {
1985 if (r->in.lock == NULL) {
1986 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1988 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.lock));
1990 if (flags & NDR_OUT) {
1991 if (r->out.lock == NULL) {
1992 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1994 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1995 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1997 return NDR_ERR_SUCCESS;
2000 static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
2002 TALLOC_CTX *_mem_save_lock_0;
2003 if (flags & NDR_IN) {
2004 ZERO_STRUCT(r->out);
2006 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2007 NDR_PULL_ALLOC(ndr, r->in.lock);
2009 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
2010 NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC);
2011 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.lock));
2012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
2013 NDR_PULL_ALLOC(ndr, r->out.lock);
2014 *r->out.lock = *r->in.lock;
2016 if (flags & NDR_OUT) {
2017 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2018 NDR_PULL_ALLOC(ndr, r->out.lock);
2020 _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
2021 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
2022 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
2023 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
2024 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2026 return NDR_ERR_SUCCESS;
2029 _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r)
2031 ndr_print_struct(ndr, name, "svcctl_UnlockServiceDatabase");
2032 ndr->depth++;
2033 if (flags & NDR_SET_VALUES) {
2034 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2036 if (flags & NDR_IN) {
2037 ndr_print_struct(ndr, "in", "svcctl_UnlockServiceDatabase");
2038 ndr->depth++;
2039 ndr_print_ptr(ndr, "lock", r->in.lock);
2040 ndr->depth++;
2041 ndr_print_policy_handle(ndr, "lock", r->in.lock);
2042 ndr->depth--;
2043 ndr->depth--;
2045 if (flags & NDR_OUT) {
2046 ndr_print_struct(ndr, "out", "svcctl_UnlockServiceDatabase");
2047 ndr->depth++;
2048 ndr_print_ptr(ndr, "lock", r->out.lock);
2049 ndr->depth++;
2050 ndr_print_policy_handle(ndr, "lock", r->out.lock);
2051 ndr->depth--;
2052 ndr_print_WERROR(ndr, "result", r->out.result);
2053 ndr->depth--;
2055 ndr->depth--;
2058 static enum ndr_err_code ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2060 if (flags & NDR_IN) {
2062 if (flags & NDR_OUT) {
2063 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2065 return NDR_ERR_SUCCESS;
2068 static enum ndr_err_code ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
2070 if (flags & NDR_IN) {
2072 if (flags & NDR_OUT) {
2073 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2075 return NDR_ERR_SUCCESS;
2078 _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2080 ndr_print_struct(ndr, name, "svcctl_NotifyBootConfigStatus");
2081 ndr->depth++;
2082 if (flags & NDR_SET_VALUES) {
2083 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2085 if (flags & NDR_IN) {
2086 ndr_print_struct(ndr, "in", "svcctl_NotifyBootConfigStatus");
2087 ndr->depth++;
2088 ndr->depth--;
2090 if (flags & NDR_OUT) {
2091 ndr_print_struct(ndr, "out", "svcctl_NotifyBootConfigStatus");
2092 ndr->depth++;
2093 ndr_print_WERROR(ndr, "result", r->out.result);
2094 ndr->depth--;
2096 ndr->depth--;
2099 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
2101 if (flags & NDR_IN) {
2102 if (r->in.handle == NULL) {
2103 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2105 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2106 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
2107 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
2108 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
2110 if (flags & NDR_OUT) {
2111 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2113 return NDR_ERR_SUCCESS;
2116 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
2118 TALLOC_CTX *_mem_save_handle_0;
2119 if (flags & NDR_IN) {
2120 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2121 NDR_PULL_ALLOC(ndr, r->in.handle);
2123 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2124 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2125 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2126 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2127 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
2128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
2129 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
2131 if (flags & NDR_OUT) {
2132 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2134 return NDR_ERR_SUCCESS;
2137 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r)
2139 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsW");
2140 ndr->depth++;
2141 if (flags & NDR_SET_VALUES) {
2142 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2144 if (flags & NDR_IN) {
2145 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsW");
2146 ndr->depth++;
2147 ndr_print_ptr(ndr, "handle", r->in.handle);
2148 ndr->depth++;
2149 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2150 ndr->depth--;
2151 ndr_print_uint32(ndr, "bits", r->in.bits);
2152 ndr_print_uint32(ndr, "bitson", r->in.bitson);
2153 ndr_print_uint32(ndr, "immediate", r->in.immediate);
2154 ndr->depth--;
2156 if (flags & NDR_OUT) {
2157 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsW");
2158 ndr->depth++;
2159 ndr_print_WERROR(ndr, "result", r->out.result);
2160 ndr->depth--;
2162 ndr->depth--;
2165 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
2167 if (flags & NDR_IN) {
2168 if (r->in.handle == NULL) {
2169 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2171 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2173 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2174 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2175 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
2176 if (r->in.binary_path) {
2177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, 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.binary_path, CH_UTF16)));
2180 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));
2182 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
2183 if (r->in.load_order_group) {
2184 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, 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.load_order_group, CH_UTF16)));
2187 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));
2189 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2190 if (r->in.dependencies) {
2191 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2192 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2193 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
2194 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2196 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2197 if (r->in.service_start_name) {
2198 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2199 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2200 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2201 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));
2203 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2204 if (r->in.password) {
2205 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2206 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2207 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
2208 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2210 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
2211 if (r->in.display_name) {
2212 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2213 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2214 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2215 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));
2218 if (flags & NDR_OUT) {
2219 if (r->out.tag_id == NULL) {
2220 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2222 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
2223 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2225 return NDR_ERR_SUCCESS;
2228 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
2230 uint32_t _ptr_binary_path;
2231 uint32_t _ptr_load_order_group;
2232 uint32_t _ptr_dependencies;
2233 uint32_t _ptr_service_start_name;
2234 uint32_t _ptr_password;
2235 uint32_t _ptr_display_name;
2236 TALLOC_CTX *_mem_save_handle_0;
2237 TALLOC_CTX *_mem_save_binary_path_0;
2238 TALLOC_CTX *_mem_save_load_order_group_0;
2239 TALLOC_CTX *_mem_save_tag_id_0;
2240 TALLOC_CTX *_mem_save_dependencies_0;
2241 TALLOC_CTX *_mem_save_service_start_name_0;
2242 TALLOC_CTX *_mem_save_password_0;
2243 TALLOC_CTX *_mem_save_display_name_0;
2244 if (flags & NDR_IN) {
2245 ZERO_STRUCT(r->out);
2247 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2248 NDR_PULL_ALLOC(ndr, r->in.handle);
2250 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2251 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2252 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2253 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2254 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2255 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2256 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2257 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
2258 if (_ptr_binary_path) {
2259 NDR_PULL_ALLOC(ndr, r->in.binary_path);
2260 } else {
2261 r->in.binary_path = NULL;
2263 if (r->in.binary_path) {
2264 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
2265 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
2266 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2267 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2268 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2269 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));
2271 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2272 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));
2273 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
2275 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
2276 if (_ptr_load_order_group) {
2277 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
2278 } else {
2279 r->in.load_order_group = NULL;
2281 if (r->in.load_order_group) {
2282 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
2283 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
2284 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
2285 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
2286 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
2287 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));
2289 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
2290 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));
2291 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
2293 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2294 if (_ptr_dependencies) {
2295 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2296 } else {
2297 r->in.dependencies = NULL;
2299 if (r->in.dependencies) {
2300 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2301 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2302 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2303 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
2304 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
2305 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));
2307 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
2308 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
2309 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2311 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2312 if (_ptr_service_start_name) {
2313 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2314 } else {
2315 r->in.service_start_name = NULL;
2317 if (r->in.service_start_name) {
2318 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2319 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2320 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2321 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2322 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2323 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));
2325 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2326 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));
2327 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2329 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2330 if (_ptr_password) {
2331 NDR_PULL_ALLOC(ndr, r->in.password);
2332 } else {
2333 r->in.password = NULL;
2335 if (r->in.password) {
2336 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2337 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2338 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2339 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
2340 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
2341 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));
2343 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
2344 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
2345 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2347 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
2348 if (_ptr_display_name) {
2349 NDR_PULL_ALLOC(ndr, r->in.display_name);
2350 } else {
2351 r->in.display_name = NULL;
2353 if (r->in.display_name) {
2354 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2355 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
2356 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
2357 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
2358 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
2359 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));
2361 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
2362 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));
2363 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
2365 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2366 ZERO_STRUCTP(r->out.tag_id);
2368 if (flags & NDR_OUT) {
2369 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2370 NDR_PULL_ALLOC(ndr, r->out.tag_id);
2372 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
2373 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
2374 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
2375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
2376 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2378 return NDR_ERR_SUCCESS;
2381 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r)
2383 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigW");
2384 ndr->depth++;
2385 if (flags & NDR_SET_VALUES) {
2386 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2388 if (flags & NDR_IN) {
2389 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigW");
2390 ndr->depth++;
2391 ndr_print_ptr(ndr, "handle", r->in.handle);
2392 ndr->depth++;
2393 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2394 ndr->depth--;
2395 ndr_print_uint32(ndr, "type", r->in.type);
2396 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2397 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2398 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
2399 ndr->depth++;
2400 if (r->in.binary_path) {
2401 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2403 ndr->depth--;
2404 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
2405 ndr->depth++;
2406 if (r->in.load_order_group) {
2407 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
2409 ndr->depth--;
2410 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2411 ndr->depth++;
2412 if (r->in.dependencies) {
2413 ndr_print_string(ndr, "dependencies", r->in.dependencies);
2415 ndr->depth--;
2416 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2417 ndr->depth++;
2418 if (r->in.service_start_name) {
2419 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2421 ndr->depth--;
2422 ndr_print_ptr(ndr, "password", r->in.password);
2423 ndr->depth++;
2424 if (r->in.password) {
2425 ndr_print_string(ndr, "password", r->in.password);
2427 ndr->depth--;
2428 ndr_print_ptr(ndr, "display_name", r->in.display_name);
2429 ndr->depth++;
2430 if (r->in.display_name) {
2431 ndr_print_string(ndr, "display_name", r->in.display_name);
2433 ndr->depth--;
2434 ndr->depth--;
2436 if (flags & NDR_OUT) {
2437 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigW");
2438 ndr->depth++;
2439 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
2440 ndr->depth++;
2441 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
2442 ndr->depth--;
2443 ndr_print_WERROR(ndr, "result", r->out.result);
2444 ndr->depth--;
2446 ndr->depth--;
2449 static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
2451 if (flags & NDR_IN) {
2452 if (r->in.scmanager_handle == NULL) {
2453 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2455 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2456 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2457 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2458 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2459 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2460 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
2461 if (r->in.DisplayName) {
2462 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2463 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2464 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2465 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
2468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2469 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2470 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2471 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2472 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2473 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2474 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));
2475 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
2476 if (r->in.LoadOrderGroupKey) {
2477 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2478 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2479 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2480 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2482 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.TagId));
2483 if (r->in.TagId) {
2484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.TagId));
2486 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2487 if (r->in.dependencies) {
2488 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dependencies_size));
2489 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, r->in.dependencies_size));
2491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
2492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2493 if (r->in.service_start_name) {
2494 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2495 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2496 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2497 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));
2499 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2500 if (r->in.password) {
2501 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.password_size));
2502 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.password, r->in.password_size));
2504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
2506 if (flags & NDR_OUT) {
2507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
2508 if (r->out.TagId) {
2509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
2511 if (r->out.handle == NULL) {
2512 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2514 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2515 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2517 return NDR_ERR_SUCCESS;
2520 static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
2522 uint32_t _ptr_DisplayName;
2523 uint32_t _ptr_LoadOrderGroupKey;
2524 uint32_t _ptr_TagId;
2525 uint32_t _ptr_dependencies;
2526 uint32_t _ptr_service_start_name;
2527 uint32_t _ptr_password;
2528 TALLOC_CTX *_mem_save_scmanager_handle_0;
2529 TALLOC_CTX *_mem_save_DisplayName_0;
2530 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
2531 TALLOC_CTX *_mem_save_TagId_0;
2532 TALLOC_CTX *_mem_save_dependencies_0;
2533 TALLOC_CTX *_mem_save_service_start_name_0;
2534 TALLOC_CTX *_mem_save_password_0;
2535 TALLOC_CTX *_mem_save_handle_0;
2536 if (flags & NDR_IN) {
2537 ZERO_STRUCT(r->out);
2539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2540 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
2542 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2543 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
2544 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
2546 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
2547 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
2548 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
2549 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));
2551 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
2552 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
2553 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
2554 if (_ptr_DisplayName) {
2555 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
2556 } else {
2557 r->in.DisplayName = NULL;
2559 if (r->in.DisplayName) {
2560 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2561 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
2562 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
2563 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
2564 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
2565 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));
2567 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
2568 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
2569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
2571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
2572 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2573 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2574 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2575 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2576 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2577 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
2578 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));
2580 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
2581 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));
2582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
2583 if (_ptr_LoadOrderGroupKey) {
2584 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
2585 } else {
2586 r->in.LoadOrderGroupKey = NULL;
2588 if (r->in.LoadOrderGroupKey) {
2589 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
2590 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
2591 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
2592 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
2593 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
2594 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));
2596 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
2597 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
2598 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
2600 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2601 if (_ptr_TagId) {
2602 NDR_PULL_ALLOC(ndr, r->in.TagId);
2603 } else {
2604 r->in.TagId = NULL;
2606 if (r->in.TagId) {
2607 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2608 NDR_PULL_SET_MEM_CTX(ndr, r->in.TagId, 0);
2609 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.TagId));
2610 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2612 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2613 if (_ptr_dependencies) {
2614 NDR_PULL_ALLOC(ndr, r->in.dependencies);
2615 } else {
2616 r->in.dependencies = NULL;
2618 if (r->in.dependencies) {
2619 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2620 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2621 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2622 NDR_PULL_ALLOC_N(ndr, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies));
2623 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, ndr_get_array_size(ndr, &r->in.dependencies)));
2624 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2626 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dependencies_size));
2627 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2628 if (_ptr_service_start_name) {
2629 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2630 } else {
2631 r->in.service_start_name = NULL;
2633 if (r->in.service_start_name) {
2634 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2635 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2636 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2637 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2638 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
2639 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));
2641 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
2642 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));
2643 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2645 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2646 if (_ptr_password) {
2647 NDR_PULL_ALLOC(ndr, r->in.password);
2648 } else {
2649 r->in.password = NULL;
2651 if (r->in.password) {
2652 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2653 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2654 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2655 NDR_PULL_ALLOC_N(ndr, r->in.password, ndr_get_array_size(ndr, &r->in.password));
2656 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.password, ndr_get_array_size(ndr, &r->in.password)));
2657 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2659 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.password_size));
2660 NDR_PULL_ALLOC(ndr, r->out.handle);
2661 ZERO_STRUCTP(r->out.handle);
2662 if (r->in.dependencies) {
2663 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.dependencies, r->in.dependencies_size));
2665 if (r->in.password) {
2666 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.password, r->in.password_size));
2669 if (flags & NDR_OUT) {
2670 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2671 if (_ptr_TagId) {
2672 NDR_PULL_ALLOC(ndr, r->out.TagId);
2673 } else {
2674 r->out.TagId = NULL;
2676 if (r->out.TagId) {
2677 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2678 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
2679 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
2680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2682 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2683 NDR_PULL_ALLOC(ndr, r->out.handle);
2685 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2686 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2687 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2688 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2689 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2691 return NDR_ERR_SUCCESS;
2694 _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r)
2696 ndr_print_struct(ndr, name, "svcctl_CreateServiceW");
2697 ndr->depth++;
2698 if (flags & NDR_SET_VALUES) {
2699 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2701 if (flags & NDR_IN) {
2702 ndr_print_struct(ndr, "in", "svcctl_CreateServiceW");
2703 ndr->depth++;
2704 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
2705 ndr->depth++;
2706 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
2707 ndr->depth--;
2708 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
2709 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
2710 ndr->depth++;
2711 if (r->in.DisplayName) {
2712 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
2714 ndr->depth--;
2715 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
2716 ndr_print_uint32(ndr, "type", r->in.type);
2717 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2718 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2719 ndr_print_string(ndr, "binary_path", r->in.binary_path);
2720 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2721 ndr->depth++;
2722 if (r->in.LoadOrderGroupKey) {
2723 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
2725 ndr->depth--;
2726 ndr_print_ptr(ndr, "TagId", r->in.TagId);
2727 ndr->depth++;
2728 if (r->in.TagId) {
2729 ndr_print_uint32(ndr, "TagId", *r->in.TagId);
2731 ndr->depth--;
2732 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2733 ndr->depth++;
2734 if (r->in.dependencies) {
2735 ndr_print_array_uint8(ndr, "dependencies", r->in.dependencies, r->in.dependencies_size);
2737 ndr->depth--;
2738 ndr_print_uint32(ndr, "dependencies_size", r->in.dependencies_size);
2739 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2740 ndr->depth++;
2741 if (r->in.service_start_name) {
2742 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2744 ndr->depth--;
2745 ndr_print_ptr(ndr, "password", r->in.password);
2746 ndr->depth++;
2747 if (r->in.password) {
2748 ndr_print_array_uint8(ndr, "password", r->in.password, r->in.password_size);
2750 ndr->depth--;
2751 ndr_print_uint32(ndr, "password_size", r->in.password_size);
2752 ndr->depth--;
2754 if (flags & NDR_OUT) {
2755 ndr_print_struct(ndr, "out", "svcctl_CreateServiceW");
2756 ndr->depth++;
2757 ndr_print_ptr(ndr, "TagId", r->out.TagId);
2758 ndr->depth++;
2759 if (r->out.TagId) {
2760 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
2762 ndr->depth--;
2763 ndr_print_ptr(ndr, "handle", r->out.handle);
2764 ndr->depth++;
2765 ndr_print_policy_handle(ndr, "handle", r->out.handle);
2766 ndr->depth--;
2767 ndr_print_WERROR(ndr, "result", r->out.result);
2768 ndr->depth--;
2770 ndr->depth--;
2773 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
2775 if (flags & NDR_IN) {
2776 if (r->in.service == NULL) {
2777 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2779 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
2780 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
2781 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2783 if (flags & NDR_OUT) {
2784 if (r->out.service_status == NULL) {
2785 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2787 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
2788 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.offered));
2789 if (r->out.needed == NULL) {
2790 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2792 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2793 if (r->out.services_returned == NULL) {
2794 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2797 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2799 return NDR_ERR_SUCCESS;
2802 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
2804 TALLOC_CTX *_mem_save_service_0;
2805 TALLOC_CTX *_mem_save_needed_0;
2806 TALLOC_CTX *_mem_save_services_returned_0;
2807 if (flags & NDR_IN) {
2808 ZERO_STRUCT(r->out);
2810 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2811 NDR_PULL_ALLOC(ndr, r->in.service);
2813 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
2814 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
2815 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
2816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
2817 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
2818 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2819 if (r->in.offered > 0x40000) {
2820 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2822 NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.offered);
2823 memset(r->out.service_status, 0, (r->in.offered) * sizeof(*r->out.service_status));
2824 NDR_PULL_ALLOC(ndr, r->out.needed);
2825 ZERO_STRUCTP(r->out.needed);
2826 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2827 ZERO_STRUCTP(r->out.services_returned);
2829 if (flags & NDR_OUT) {
2830 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service_status));
2831 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2832 NDR_PULL_ALLOC_N(ndr, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status));
2834 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, ndr_get_array_size(ndr, &r->out.service_status)));
2835 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2836 NDR_PULL_ALLOC(ndr, r->out.needed);
2838 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2839 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2841 if (*r->out.needed > 0x40000) {
2842 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2845 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2846 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2848 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
2849 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
2850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
2851 if (*r->out.services_returned > 0x40000) {
2852 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2854 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
2855 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2856 if (r->out.service_status) {
2857 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service_status, r->in.offered));
2860 return NDR_ERR_SUCCESS;
2863 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r)
2865 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesW");
2866 ndr->depth++;
2867 if (flags & NDR_SET_VALUES) {
2868 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2870 if (flags & NDR_IN) {
2871 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesW");
2872 ndr->depth++;
2873 ndr_print_ptr(ndr, "service", r->in.service);
2874 ndr->depth++;
2875 ndr_print_policy_handle(ndr, "service", r->in.service);
2876 ndr->depth--;
2877 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
2878 ndr_print_uint32(ndr, "offered", r->in.offered);
2879 ndr->depth--;
2881 if (flags & NDR_OUT) {
2882 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesW");
2883 ndr->depth++;
2884 ndr_print_ptr(ndr, "service_status", r->out.service_status);
2885 ndr->depth++;
2886 ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.offered);
2887 ndr->depth--;
2888 ndr_print_ptr(ndr, "needed", r->out.needed);
2889 ndr->depth++;
2890 ndr_print_uint32(ndr, "needed", *r->out.needed);
2891 ndr->depth--;
2892 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
2893 ndr->depth++;
2894 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
2895 ndr->depth--;
2896 ndr_print_WERROR(ndr, "result", r->out.result);
2897 ndr->depth--;
2899 ndr->depth--;
2902 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
2904 if (flags & NDR_IN) {
2905 if (r->in.handle == NULL) {
2906 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2908 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2909 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2910 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
2911 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
2912 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
2913 if (r->in.resume_handle) {
2914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
2917 if (flags & NDR_OUT) {
2918 if (r->out.service == NULL) {
2919 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2921 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
2922 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
2923 if (r->out.needed == NULL) {
2924 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2926 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
2927 if (r->out.services_returned == NULL) {
2928 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
2931 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
2932 if (r->out.resume_handle) {
2933 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
2935 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2937 return NDR_ERR_SUCCESS;
2940 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
2942 uint32_t _ptr_resume_handle;
2943 TALLOC_CTX *_mem_save_handle_0;
2944 TALLOC_CTX *_mem_save_needed_0;
2945 TALLOC_CTX *_mem_save_services_returned_0;
2946 TALLOC_CTX *_mem_save_resume_handle_0;
2947 if (flags & NDR_IN) {
2948 ZERO_STRUCT(r->out);
2950 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2951 NDR_PULL_ALLOC(ndr, r->in.handle);
2953 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2954 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2955 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2957 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2958 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
2959 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2960 if (r->in.offered > 0x40000) {
2961 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2963 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
2964 if (_ptr_resume_handle) {
2965 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
2966 } else {
2967 r->in.resume_handle = NULL;
2969 if (r->in.resume_handle) {
2970 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2971 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
2972 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
2973 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
2975 NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.offered);
2976 memset(r->out.service, 0, (r->in.offered) * sizeof(*r->out.service));
2977 NDR_PULL_ALLOC(ndr, r->out.needed);
2978 ZERO_STRUCTP(r->out.needed);
2979 NDR_PULL_ALLOC(ndr, r->out.services_returned);
2980 ZERO_STRUCTP(r->out.services_returned);
2982 if (flags & NDR_OUT) {
2983 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
2984 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2985 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
2987 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
2988 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2989 NDR_PULL_ALLOC(ndr, r->out.needed);
2991 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2992 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
2993 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
2994 if (*r->out.needed > 0x40000) {
2995 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2997 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
2998 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2999 NDR_PULL_ALLOC(ndr, r->out.services_returned);
3001 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
3002 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
3003 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
3004 if (*r->out.services_returned > 0x40000) {
3005 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3007 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
3008 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
3009 if (_ptr_resume_handle) {
3010 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
3011 } else {
3012 r->out.resume_handle = NULL;
3014 if (r->out.resume_handle) {
3015 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3016 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
3017 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
3018 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
3020 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3021 if (r->out.service) {
3022 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
3025 return NDR_ERR_SUCCESS;
3028 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r)
3030 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusW");
3031 ndr->depth++;
3032 if (flags & NDR_SET_VALUES) {
3033 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3035 if (flags & NDR_IN) {
3036 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusW");
3037 ndr->depth++;
3038 ndr_print_ptr(ndr, "handle", r->in.handle);
3039 ndr->depth++;
3040 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3041 ndr->depth--;
3042 ndr_print_uint32(ndr, "type", r->in.type);
3043 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
3044 ndr_print_uint32(ndr, "offered", r->in.offered);
3045 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
3046 ndr->depth++;
3047 if (r->in.resume_handle) {
3048 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
3050 ndr->depth--;
3051 ndr->depth--;
3053 if (flags & NDR_OUT) {
3054 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
3055 ndr->depth++;
3056 ndr_print_ptr(ndr, "service", r->out.service);
3057 ndr->depth++;
3058 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
3059 ndr->depth--;
3060 ndr_print_ptr(ndr, "needed", r->out.needed);
3061 ndr->depth++;
3062 ndr_print_uint32(ndr, "needed", *r->out.needed);
3063 ndr->depth--;
3064 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
3065 ndr->depth++;
3066 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
3067 ndr->depth--;
3068 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
3069 ndr->depth++;
3070 if (r->out.resume_handle) {
3071 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
3073 ndr->depth--;
3074 ndr_print_WERROR(ndr, "result", r->out.result);
3075 ndr->depth--;
3077 ndr->depth--;
3080 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
3082 if (flags & NDR_IN) {
3083 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
3084 if (r->in.MachineName) {
3085 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3087 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3088 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3090 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
3091 if (r->in.DatabaseName) {
3092 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3093 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3094 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3095 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3097 NDR_CHECK(ndr_push_svcctl_MgrAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3099 if (flags & NDR_OUT) {
3100 if (r->out.handle == NULL) {
3101 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3103 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3104 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3106 return NDR_ERR_SUCCESS;
3109 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
3111 uint32_t _ptr_MachineName;
3112 uint32_t _ptr_DatabaseName;
3113 TALLOC_CTX *_mem_save_MachineName_0;
3114 TALLOC_CTX *_mem_save_DatabaseName_0;
3115 TALLOC_CTX *_mem_save_handle_0;
3116 if (flags & NDR_IN) {
3117 ZERO_STRUCT(r->out);
3119 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
3120 if (_ptr_MachineName) {
3121 NDR_PULL_ALLOC(ndr, r->in.MachineName);
3122 } else {
3123 r->in.MachineName = NULL;
3125 if (r->in.MachineName) {
3126 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3127 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
3128 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
3129 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
3130 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
3131 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));
3133 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
3134 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
3135 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
3137 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
3138 if (_ptr_DatabaseName) {
3139 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
3140 } else {
3141 r->in.DatabaseName = NULL;
3143 if (r->in.DatabaseName) {
3144 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3145 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
3146 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
3147 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
3148 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
3149 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));
3151 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
3152 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
3153 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
3155 NDR_CHECK(ndr_pull_svcctl_MgrAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3156 NDR_PULL_ALLOC(ndr, r->out.handle);
3157 ZERO_STRUCTP(r->out.handle);
3159 if (flags & NDR_OUT) {
3160 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3161 NDR_PULL_ALLOC(ndr, r->out.handle);
3163 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3164 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3165 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3166 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3167 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3169 return NDR_ERR_SUCCESS;
3172 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r)
3174 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerW");
3175 ndr->depth++;
3176 if (flags & NDR_SET_VALUES) {
3177 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3179 if (flags & NDR_IN) {
3180 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerW");
3181 ndr->depth++;
3182 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
3183 ndr->depth++;
3184 if (r->in.MachineName) {
3185 ndr_print_string(ndr, "MachineName", r->in.MachineName);
3187 ndr->depth--;
3188 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
3189 ndr->depth++;
3190 if (r->in.DatabaseName) {
3191 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
3193 ndr->depth--;
3194 ndr_print_svcctl_MgrAccessMask(ndr, "access_mask", r->in.access_mask);
3195 ndr->depth--;
3197 if (flags & NDR_OUT) {
3198 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerW");
3199 ndr->depth++;
3200 ndr_print_ptr(ndr, "handle", r->out.handle);
3201 ndr->depth++;
3202 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3203 ndr->depth--;
3204 ndr_print_WERROR(ndr, "result", r->out.result);
3205 ndr->depth--;
3207 ndr->depth--;
3210 static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
3212 if (flags & NDR_IN) {
3213 if (r->in.scmanager_handle == NULL) {
3214 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3216 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3217 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3218 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3219 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3220 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3221 NDR_CHECK(ndr_push_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3223 if (flags & NDR_OUT) {
3224 if (r->out.handle == NULL) {
3225 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3227 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3228 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3230 return NDR_ERR_SUCCESS;
3233 static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
3235 TALLOC_CTX *_mem_save_scmanager_handle_0;
3236 TALLOC_CTX *_mem_save_handle_0;
3237 if (flags & NDR_IN) {
3238 ZERO_STRUCT(r->out);
3240 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3241 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
3243 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3244 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
3245 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3246 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
3247 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
3248 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
3249 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
3250 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));
3252 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
3253 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
3254 NDR_CHECK(ndr_pull_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3255 NDR_PULL_ALLOC(ndr, r->out.handle);
3256 ZERO_STRUCTP(r->out.handle);
3258 if (flags & NDR_OUT) {
3259 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3260 NDR_PULL_ALLOC(ndr, r->out.handle);
3262 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3263 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3264 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3266 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3268 return NDR_ERR_SUCCESS;
3271 _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r)
3273 ndr_print_struct(ndr, name, "svcctl_OpenServiceW");
3274 ndr->depth++;
3275 if (flags & NDR_SET_VALUES) {
3276 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3278 if (flags & NDR_IN) {
3279 ndr_print_struct(ndr, "in", "svcctl_OpenServiceW");
3280 ndr->depth++;
3281 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
3282 ndr->depth++;
3283 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
3284 ndr->depth--;
3285 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
3286 ndr_print_svcctl_ServiceAccessMask(ndr, "access_mask", r->in.access_mask);
3287 ndr->depth--;
3289 if (flags & NDR_OUT) {
3290 ndr_print_struct(ndr, "out", "svcctl_OpenServiceW");
3291 ndr->depth++;
3292 ndr_print_ptr(ndr, "handle", r->out.handle);
3293 ndr->depth++;
3294 ndr_print_policy_handle(ndr, "handle", r->out.handle);
3295 ndr->depth--;
3296 ndr_print_WERROR(ndr, "result", r->out.result);
3297 ndr->depth--;
3299 ndr->depth--;
3302 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
3304 if (flags & NDR_IN) {
3305 if (r->in.handle == NULL) {
3306 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3308 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3311 if (flags & NDR_OUT) {
3312 if (r->out.query == NULL) {
3313 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3315 NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3316 if (r->out.needed == NULL) {
3317 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3320 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3322 return NDR_ERR_SUCCESS;
3325 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
3327 TALLOC_CTX *_mem_save_handle_0;
3328 TALLOC_CTX *_mem_save_query_0;
3329 TALLOC_CTX *_mem_save_needed_0;
3330 if (flags & NDR_IN) {
3331 ZERO_STRUCT(r->out);
3333 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3334 NDR_PULL_ALLOC(ndr, r->in.handle);
3336 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3337 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3338 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3339 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3341 if (r->in.offered > 8192) {
3342 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3344 NDR_PULL_ALLOC(ndr, r->out.query);
3345 ZERO_STRUCTP(r->out.query);
3346 NDR_PULL_ALLOC(ndr, r->out.needed);
3347 ZERO_STRUCTP(r->out.needed);
3349 if (flags & NDR_OUT) {
3350 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3351 NDR_PULL_ALLOC(ndr, r->out.query);
3353 _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
3354 NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
3355 NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3356 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
3357 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3358 NDR_PULL_ALLOC(ndr, r->out.needed);
3360 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3361 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3362 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3363 if (*r->out.needed > 8192) {
3364 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3366 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3367 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3369 return NDR_ERR_SUCCESS;
3372 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r)
3374 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigW");
3375 ndr->depth++;
3376 if (flags & NDR_SET_VALUES) {
3377 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3379 if (flags & NDR_IN) {
3380 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigW");
3381 ndr->depth++;
3382 ndr_print_ptr(ndr, "handle", r->in.handle);
3383 ndr->depth++;
3384 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3385 ndr->depth--;
3386 ndr_print_uint32(ndr, "offered", r->in.offered);
3387 ndr->depth--;
3389 if (flags & NDR_OUT) {
3390 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
3391 ndr->depth++;
3392 ndr_print_ptr(ndr, "query", r->out.query);
3393 ndr->depth++;
3394 ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
3395 ndr->depth--;
3396 ndr_print_ptr(ndr, "needed", r->out.needed);
3397 ndr->depth++;
3398 ndr_print_uint32(ndr, "needed", *r->out.needed);
3399 ndr->depth--;
3400 ndr_print_WERROR(ndr, "result", r->out.result);
3401 ndr->depth--;
3403 ndr->depth--;
3406 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3408 if (flags & NDR_IN) {
3409 if (r->in.handle == NULL) {
3410 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3412 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3415 if (flags & NDR_OUT) {
3416 if (r->out.lock_status == NULL) {
3417 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3419 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3420 if (r->out.needed == NULL) {
3421 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3424 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3426 return NDR_ERR_SUCCESS;
3429 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
3431 TALLOC_CTX *_mem_save_handle_0;
3432 TALLOC_CTX *_mem_save_lock_status_0;
3433 TALLOC_CTX *_mem_save_needed_0;
3434 if (flags & NDR_IN) {
3435 ZERO_STRUCT(r->out);
3437 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3438 NDR_PULL_ALLOC(ndr, r->in.handle);
3440 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3441 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3442 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3443 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3444 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3445 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3446 ZERO_STRUCTP(r->out.lock_status);
3447 NDR_PULL_ALLOC(ndr, r->out.needed);
3448 ZERO_STRUCTP(r->out.needed);
3450 if (flags & NDR_OUT) {
3451 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3452 NDR_PULL_ALLOC(ndr, r->out.lock_status);
3454 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3455 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
3456 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3457 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
3458 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3459 NDR_PULL_ALLOC(ndr, r->out.needed);
3461 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3462 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3463 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3465 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3467 return NDR_ERR_SUCCESS;
3470 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3472 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusW");
3473 ndr->depth++;
3474 if (flags & NDR_SET_VALUES) {
3475 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3477 if (flags & NDR_IN) {
3478 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusW");
3479 ndr->depth++;
3480 ndr_print_ptr(ndr, "handle", r->in.handle);
3481 ndr->depth++;
3482 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3483 ndr->depth--;
3484 ndr_print_uint32(ndr, "offered", r->in.offered);
3485 ndr->depth--;
3487 if (flags & NDR_OUT) {
3488 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusW");
3489 ndr->depth++;
3490 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
3491 ndr->depth++;
3492 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
3493 ndr->depth--;
3494 ndr_print_ptr(ndr, "needed", r->out.needed);
3495 ndr->depth++;
3496 ndr_print_uint32(ndr, "needed", *r->out.needed);
3497 ndr->depth--;
3498 ndr_print_WERROR(ndr, "result", r->out.result);
3499 ndr->depth--;
3501 ndr->depth--;
3504 static enum ndr_err_code ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
3506 uint32_t cntr_Arguments_1;
3507 if (flags & NDR_IN) {
3508 if (r->in.handle == NULL) {
3509 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3511 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
3513 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
3514 if (r->in.Arguments) {
3515 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.NumArgs));
3516 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3517 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3519 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3520 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3524 if (flags & NDR_OUT) {
3525 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3527 return NDR_ERR_SUCCESS;
3530 static enum ndr_err_code ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
3532 uint32_t _ptr_Arguments;
3533 uint32_t cntr_Arguments_1;
3534 TALLOC_CTX *_mem_save_handle_0;
3535 TALLOC_CTX *_mem_save_Arguments_0;
3536 TALLOC_CTX *_mem_save_Arguments_1;
3537 if (flags & NDR_IN) {
3538 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3539 NDR_PULL_ALLOC(ndr, r->in.handle);
3541 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3542 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3543 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3544 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3545 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
3546 if (r->in.NumArgs > SC_MAX_ARGUMENTS) {
3547 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3549 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
3550 if (_ptr_Arguments) {
3551 NDR_PULL_ALLOC(ndr, r->in.Arguments);
3552 } else {
3553 r->in.Arguments = NULL;
3555 if (r->in.Arguments) {
3556 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
3557 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3558 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
3559 NDR_PULL_ALLOC_N(ndr, r->in.Arguments, ndr_get_array_size(ndr, &r->in.Arguments));
3560 _mem_save_Arguments_1 = NDR_PULL_GET_MEM_CTX(ndr);
3561 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3562 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3563 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3565 for (cntr_Arguments_1 = 0; cntr_Arguments_1 < r->in.NumArgs; cntr_Arguments_1++) {
3566 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3568 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_1, 0);
3569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
3571 if (r->in.Arguments) {
3572 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.Arguments, r->in.NumArgs));
3575 if (flags & NDR_OUT) {
3576 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3578 return NDR_ERR_SUCCESS;
3581 _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r)
3583 uint32_t cntr_Arguments_1;
3584 ndr_print_struct(ndr, name, "svcctl_StartServiceW");
3585 ndr->depth++;
3586 if (flags & NDR_SET_VALUES) {
3587 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3589 if (flags & NDR_IN) {
3590 ndr_print_struct(ndr, "in", "svcctl_StartServiceW");
3591 ndr->depth++;
3592 ndr_print_ptr(ndr, "handle", r->in.handle);
3593 ndr->depth++;
3594 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3595 ndr->depth--;
3596 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
3597 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
3598 ndr->depth++;
3599 if (r->in.Arguments) {
3600 ndr->print(ndr, "%s: ARRAY(%d)", "Arguments", (int)r->in.NumArgs);
3601 ndr->depth++;
3602 for (cntr_Arguments_1=0;cntr_Arguments_1<r->in.NumArgs;cntr_Arguments_1++) {
3603 char *idx_1=NULL;
3604 if (asprintf(&idx_1, "[%d]", cntr_Arguments_1) != -1) {
3605 ndr_print_svcctl_ArgumentString(ndr, "Arguments", &r->in.Arguments[cntr_Arguments_1]);
3606 free(idx_1);
3609 ndr->depth--;
3611 ndr->depth--;
3612 ndr->depth--;
3614 if (flags & NDR_OUT) {
3615 ndr_print_struct(ndr, "out", "svcctl_StartServiceW");
3616 ndr->depth++;
3617 ndr_print_WERROR(ndr, "result", r->out.result);
3618 ndr->depth--;
3620 ndr->depth--;
3623 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3625 if (flags & NDR_IN) {
3626 if (r->in.handle == NULL) {
3627 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3629 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3630 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3631 if (r->in.service_name) {
3632 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3633 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3634 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3635 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));
3637 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3638 if (r->in.display_name_length) {
3639 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3642 if (flags & NDR_OUT) {
3643 if (r->out.display_name == NULL) {
3644 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3646 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
3647 if (*r->out.display_name) {
3648 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3649 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3650 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
3651 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));
3653 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3654 if (r->out.display_name_length) {
3655 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3657 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3659 return NDR_ERR_SUCCESS;
3662 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
3664 uint32_t _ptr_service_name;
3665 uint32_t _ptr_display_name;
3666 uint32_t _ptr_display_name_length;
3667 TALLOC_CTX *_mem_save_handle_0;
3668 TALLOC_CTX *_mem_save_service_name_0;
3669 TALLOC_CTX *_mem_save_display_name_0;
3670 TALLOC_CTX *_mem_save_display_name_1;
3671 TALLOC_CTX *_mem_save_display_name_length_0;
3672 if (flags & NDR_IN) {
3673 ZERO_STRUCT(r->out);
3675 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3676 NDR_PULL_ALLOC(ndr, r->in.handle);
3678 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3679 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3680 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3681 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3682 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3683 if (_ptr_service_name) {
3684 NDR_PULL_ALLOC(ndr, r->in.service_name);
3685 } else {
3686 r->in.service_name = NULL;
3688 if (r->in.service_name) {
3689 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3690 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3691 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3692 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3693 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3694 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));
3696 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3697 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));
3698 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3700 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3701 if (_ptr_display_name_length) {
3702 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3703 } else {
3704 r->in.display_name_length = NULL;
3706 if (r->in.display_name_length) {
3707 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3708 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3709 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3712 NDR_PULL_ALLOC(ndr, r->out.display_name);
3713 ZERO_STRUCTP(r->out.display_name);
3715 if (flags & NDR_OUT) {
3716 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3717 NDR_PULL_ALLOC(ndr, r->out.display_name);
3719 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3720 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
3721 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
3722 if (_ptr_display_name) {
3723 NDR_PULL_ALLOC(ndr, *r->out.display_name);
3724 } else {
3725 *r->out.display_name = NULL;
3727 if (*r->out.display_name) {
3728 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3729 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
3730 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
3731 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
3732 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
3733 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));
3735 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
3736 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));
3737 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
3739 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
3740 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3741 if (_ptr_display_name_length) {
3742 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3743 } else {
3744 r->out.display_name_length = NULL;
3746 if (r->out.display_name_length) {
3747 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3748 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3749 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3750 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3752 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3754 return NDR_ERR_SUCCESS;
3757 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r)
3759 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameW");
3760 ndr->depth++;
3761 if (flags & NDR_SET_VALUES) {
3762 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3764 if (flags & NDR_IN) {
3765 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameW");
3766 ndr->depth++;
3767 ndr_print_ptr(ndr, "handle", r->in.handle);
3768 ndr->depth++;
3769 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3770 ndr->depth--;
3771 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3772 ndr->depth++;
3773 if (r->in.service_name) {
3774 ndr_print_string(ndr, "service_name", r->in.service_name);
3776 ndr->depth--;
3777 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3778 ndr->depth++;
3779 if (r->in.display_name_length) {
3780 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3782 ndr->depth--;
3783 ndr->depth--;
3785 if (flags & NDR_OUT) {
3786 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameW");
3787 ndr->depth++;
3788 ndr_print_ptr(ndr, "display_name", r->out.display_name);
3789 ndr->depth++;
3790 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
3791 ndr->depth++;
3792 if (*r->out.display_name) {
3793 ndr_print_string(ndr, "display_name", *r->out.display_name);
3795 ndr->depth--;
3796 ndr->depth--;
3797 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3798 ndr->depth++;
3799 if (r->out.display_name_length) {
3800 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3802 ndr->depth--;
3803 ndr_print_WERROR(ndr, "result", r->out.result);
3804 ndr->depth--;
3806 ndr->depth--;
3809 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
3811 if (flags & NDR_IN) {
3812 if (r->in.handle == NULL) {
3813 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3815 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3816 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
3817 if (r->in.service_name) {
3818 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3819 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3820 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
3821 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));
3823 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
3824 if (r->in.display_name_length) {
3825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
3828 if (flags & NDR_OUT) {
3829 if (r->out.key_name == NULL) {
3830 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3832 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
3833 if (*r->out.key_name) {
3834 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3835 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3836 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
3837 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));
3839 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
3840 if (r->out.display_name_length) {
3841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
3843 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3845 return NDR_ERR_SUCCESS;
3848 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
3850 uint32_t _ptr_service_name;
3851 uint32_t _ptr_key_name;
3852 uint32_t _ptr_display_name_length;
3853 TALLOC_CTX *_mem_save_handle_0;
3854 TALLOC_CTX *_mem_save_service_name_0;
3855 TALLOC_CTX *_mem_save_key_name_0;
3856 TALLOC_CTX *_mem_save_key_name_1;
3857 TALLOC_CTX *_mem_save_display_name_length_0;
3858 if (flags & NDR_IN) {
3859 ZERO_STRUCT(r->out);
3861 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3862 NDR_PULL_ALLOC(ndr, r->in.handle);
3864 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3865 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3866 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3868 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
3869 if (_ptr_service_name) {
3870 NDR_PULL_ALLOC(ndr, r->in.service_name);
3871 } else {
3872 r->in.service_name = NULL;
3874 if (r->in.service_name) {
3875 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3876 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
3877 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
3878 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
3879 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
3880 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));
3882 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
3883 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));
3884 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
3886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3887 if (_ptr_display_name_length) {
3888 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
3889 } else {
3890 r->in.display_name_length = NULL;
3892 if (r->in.display_name_length) {
3893 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3894 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
3895 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
3896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3898 NDR_PULL_ALLOC(ndr, r->out.key_name);
3899 ZERO_STRUCTP(r->out.key_name);
3901 if (flags & NDR_OUT) {
3902 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3903 NDR_PULL_ALLOC(ndr, r->out.key_name);
3905 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3906 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
3907 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
3908 if (_ptr_key_name) {
3909 NDR_PULL_ALLOC(ndr, *r->out.key_name);
3910 } else {
3911 *r->out.key_name = NULL;
3913 if (*r->out.key_name) {
3914 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
3915 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
3916 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
3917 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
3918 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
3919 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));
3921 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
3922 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));
3923 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
3925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
3926 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
3927 if (_ptr_display_name_length) {
3928 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
3929 } else {
3930 r->out.display_name_length = NULL;
3932 if (r->out.display_name_length) {
3933 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
3934 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
3935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
3936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
3938 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3940 return NDR_ERR_SUCCESS;
3943 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r)
3945 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameW");
3946 ndr->depth++;
3947 if (flags & NDR_SET_VALUES) {
3948 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3950 if (flags & NDR_IN) {
3951 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameW");
3952 ndr->depth++;
3953 ndr_print_ptr(ndr, "handle", r->in.handle);
3954 ndr->depth++;
3955 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3956 ndr->depth--;
3957 ndr_print_ptr(ndr, "service_name", r->in.service_name);
3958 ndr->depth++;
3959 if (r->in.service_name) {
3960 ndr_print_string(ndr, "service_name", r->in.service_name);
3962 ndr->depth--;
3963 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
3964 ndr->depth++;
3965 if (r->in.display_name_length) {
3966 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
3968 ndr->depth--;
3969 ndr->depth--;
3971 if (flags & NDR_OUT) {
3972 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameW");
3973 ndr->depth++;
3974 ndr_print_ptr(ndr, "key_name", r->out.key_name);
3975 ndr->depth++;
3976 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
3977 ndr->depth++;
3978 if (*r->out.key_name) {
3979 ndr_print_string(ndr, "key_name", *r->out.key_name);
3981 ndr->depth--;
3982 ndr->depth--;
3983 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
3984 ndr->depth++;
3985 if (r->out.display_name_length) {
3986 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
3988 ndr->depth--;
3989 ndr_print_WERROR(ndr, "result", r->out.result);
3990 ndr->depth--;
3992 ndr->depth--;
3995 static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
3997 if (flags & NDR_IN) {
3998 if (r->in.handle == NULL) {
3999 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4001 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
4003 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
4004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
4006 if (flags & NDR_OUT) {
4007 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4009 return NDR_ERR_SUCCESS;
4012 static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
4014 TALLOC_CTX *_mem_save_handle_0;
4015 if (flags & NDR_IN) {
4016 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4017 NDR_PULL_ALLOC(ndr, r->in.handle);
4019 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4020 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4021 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
4024 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
4025 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
4027 if (flags & NDR_OUT) {
4028 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4030 return NDR_ERR_SUCCESS;
4033 _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r)
4035 ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsA");
4036 ndr->depth++;
4037 if (flags & NDR_SET_VALUES) {
4038 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4040 if (flags & NDR_IN) {
4041 ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsA");
4042 ndr->depth++;
4043 ndr_print_ptr(ndr, "handle", r->in.handle);
4044 ndr->depth++;
4045 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4046 ndr->depth--;
4047 ndr_print_uint32(ndr, "bits", r->in.bits);
4048 ndr_print_uint32(ndr, "bitson", r->in.bitson);
4049 ndr_print_uint32(ndr, "immediate", r->in.immediate);
4050 ndr->depth--;
4052 if (flags & NDR_OUT) {
4053 ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsA");
4054 ndr->depth++;
4055 ndr_print_WERROR(ndr, "result", r->out.result);
4056 ndr->depth--;
4058 ndr->depth--;
4061 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
4063 if (flags & NDR_IN) {
4064 if (r->in.handle == NULL) {
4065 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4067 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4068 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4069 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4070 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4071 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4072 if (r->in.binary_path) {
4073 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, 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.binary_path, CH_UTF16)));
4076 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));
4078 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
4079 if (r->in.load_order_group) {
4080 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, 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.load_order_group, CH_UTF16)));
4083 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));
4085 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4086 if (r->in.dependencies) {
4087 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4088 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4089 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4090 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4092 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4093 if (r->in.service_start_name) {
4094 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4095 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4096 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4097 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));
4099 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4100 if (r->in.password) {
4101 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4102 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4103 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4104 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4106 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
4107 if (r->in.display_name) {
4108 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4109 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4110 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4111 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));
4114 if (flags & NDR_OUT) {
4115 if (r->out.tag_id == NULL) {
4116 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4118 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
4119 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4121 return NDR_ERR_SUCCESS;
4124 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
4126 uint32_t _ptr_binary_path;
4127 uint32_t _ptr_load_order_group;
4128 uint32_t _ptr_dependencies;
4129 uint32_t _ptr_service_start_name;
4130 uint32_t _ptr_password;
4131 uint32_t _ptr_display_name;
4132 TALLOC_CTX *_mem_save_handle_0;
4133 TALLOC_CTX *_mem_save_binary_path_0;
4134 TALLOC_CTX *_mem_save_load_order_group_0;
4135 TALLOC_CTX *_mem_save_tag_id_0;
4136 TALLOC_CTX *_mem_save_dependencies_0;
4137 TALLOC_CTX *_mem_save_service_start_name_0;
4138 TALLOC_CTX *_mem_save_password_0;
4139 TALLOC_CTX *_mem_save_display_name_0;
4140 if (flags & NDR_IN) {
4141 ZERO_STRUCT(r->out);
4143 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4144 NDR_PULL_ALLOC(ndr, r->in.handle);
4146 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4147 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4148 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4149 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4150 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4151 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4152 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4153 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4154 if (_ptr_binary_path) {
4155 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4156 } else {
4157 r->in.binary_path = NULL;
4159 if (r->in.binary_path) {
4160 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4161 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4162 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4163 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4164 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4165 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));
4167 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4168 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));
4169 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4171 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
4172 if (_ptr_load_order_group) {
4173 NDR_PULL_ALLOC(ndr, r->in.load_order_group);
4174 } else {
4175 r->in.load_order_group = NULL;
4177 if (r->in.load_order_group) {
4178 _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4179 NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
4180 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
4181 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
4182 if (ndr_get_array_length(ndr, &r->in.load_order_group) > ndr_get_array_size(ndr, &r->in.load_order_group)) {
4183 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));
4185 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.load_order_group), sizeof(uint16_t)));
4186 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));
4187 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
4189 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4190 if (_ptr_dependencies) {
4191 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4192 } else {
4193 r->in.dependencies = NULL;
4195 if (r->in.dependencies) {
4196 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4197 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4198 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4199 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4200 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4201 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));
4203 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4204 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4205 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4207 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4208 if (_ptr_service_start_name) {
4209 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4210 } else {
4211 r->in.service_start_name = NULL;
4213 if (r->in.service_start_name) {
4214 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4215 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4216 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4217 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4218 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4219 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));
4221 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4222 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));
4223 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4225 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4226 if (_ptr_password) {
4227 NDR_PULL_ALLOC(ndr, r->in.password);
4228 } else {
4229 r->in.password = NULL;
4231 if (r->in.password) {
4232 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4233 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4234 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4235 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4236 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4237 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));
4239 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4240 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4241 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4243 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
4244 if (_ptr_display_name) {
4245 NDR_PULL_ALLOC(ndr, r->in.display_name);
4246 } else {
4247 r->in.display_name = NULL;
4249 if (r->in.display_name) {
4250 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4251 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
4252 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
4253 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
4254 if (ndr_get_array_length(ndr, &r->in.display_name) > ndr_get_array_size(ndr, &r->in.display_name)) {
4255 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));
4257 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.display_name), sizeof(uint16_t)));
4258 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));
4259 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
4261 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4262 ZERO_STRUCTP(r->out.tag_id);
4264 if (flags & NDR_OUT) {
4265 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4266 NDR_PULL_ALLOC(ndr, r->out.tag_id);
4268 _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
4269 NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
4270 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
4271 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
4272 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4274 return NDR_ERR_SUCCESS;
4277 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r)
4279 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigA");
4280 ndr->depth++;
4281 if (flags & NDR_SET_VALUES) {
4282 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4284 if (flags & NDR_IN) {
4285 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigA");
4286 ndr->depth++;
4287 ndr_print_ptr(ndr, "handle", r->in.handle);
4288 ndr->depth++;
4289 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4290 ndr->depth--;
4291 ndr_print_uint32(ndr, "type", r->in.type);
4292 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4293 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4294 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4295 ndr->depth++;
4296 if (r->in.binary_path) {
4297 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4299 ndr->depth--;
4300 ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
4301 ndr->depth++;
4302 if (r->in.load_order_group) {
4303 ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
4305 ndr->depth--;
4306 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4307 ndr->depth++;
4308 if (r->in.dependencies) {
4309 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4311 ndr->depth--;
4312 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4313 ndr->depth++;
4314 if (r->in.service_start_name) {
4315 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4317 ndr->depth--;
4318 ndr_print_ptr(ndr, "password", r->in.password);
4319 ndr->depth++;
4320 if (r->in.password) {
4321 ndr_print_string(ndr, "password", r->in.password);
4323 ndr->depth--;
4324 ndr_print_ptr(ndr, "display_name", r->in.display_name);
4325 ndr->depth++;
4326 if (r->in.display_name) {
4327 ndr_print_string(ndr, "display_name", r->in.display_name);
4329 ndr->depth--;
4330 ndr->depth--;
4332 if (flags & NDR_OUT) {
4333 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigA");
4334 ndr->depth++;
4335 ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
4336 ndr->depth++;
4337 ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
4338 ndr->depth--;
4339 ndr_print_WERROR(ndr, "result", r->out.result);
4340 ndr->depth--;
4342 ndr->depth--;
4345 static enum ndr_err_code ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
4347 if (flags & NDR_IN) {
4348 if (r->in.handle == NULL) {
4349 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4351 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4352 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
4353 if (r->in.ServiceName) {
4354 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4355 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4356 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4357 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4359 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
4360 if (r->in.DisplayName) {
4361 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4362 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4363 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4364 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
4367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4368 NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4369 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4370 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4371 if (r->in.binary_path) {
4372 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, 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.binary_path, CH_UTF16)));
4375 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));
4377 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
4378 if (r->in.LoadOrderGroupKey) {
4379 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4380 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4381 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4382 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4384 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4385 if (r->in.dependencies) {
4386 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4387 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4388 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4389 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4391 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4392 if (r->in.service_start_name) {
4393 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4394 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4395 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4396 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));
4398 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4399 if (r->in.password) {
4400 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4401 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4402 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4403 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4406 if (flags & NDR_OUT) {
4407 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
4408 if (r->out.TagId) {
4409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
4411 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4413 return NDR_ERR_SUCCESS;
4416 static enum ndr_err_code ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
4418 uint32_t _ptr_ServiceName;
4419 uint32_t _ptr_DisplayName;
4420 uint32_t _ptr_binary_path;
4421 uint32_t _ptr_LoadOrderGroupKey;
4422 uint32_t _ptr_TagId;
4423 uint32_t _ptr_dependencies;
4424 uint32_t _ptr_service_start_name;
4425 uint32_t _ptr_password;
4426 TALLOC_CTX *_mem_save_handle_0;
4427 TALLOC_CTX *_mem_save_ServiceName_0;
4428 TALLOC_CTX *_mem_save_DisplayName_0;
4429 TALLOC_CTX *_mem_save_binary_path_0;
4430 TALLOC_CTX *_mem_save_LoadOrderGroupKey_0;
4431 TALLOC_CTX *_mem_save_TagId_0;
4432 TALLOC_CTX *_mem_save_dependencies_0;
4433 TALLOC_CTX *_mem_save_service_start_name_0;
4434 TALLOC_CTX *_mem_save_password_0;
4435 if (flags & NDR_IN) {
4436 ZERO_STRUCT(r->out);
4438 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4439 NDR_PULL_ALLOC(ndr, r->in.handle);
4441 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4442 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4443 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4444 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4445 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
4446 if (_ptr_ServiceName) {
4447 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
4448 } else {
4449 r->in.ServiceName = NULL;
4451 if (r->in.ServiceName) {
4452 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4453 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
4454 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
4455 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
4456 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
4457 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));
4459 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
4460 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
4461 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
4463 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
4464 if (_ptr_DisplayName) {
4465 NDR_PULL_ALLOC(ndr, r->in.DisplayName);
4466 } else {
4467 r->in.DisplayName = NULL;
4469 if (r->in.DisplayName) {
4470 _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4471 NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
4472 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
4473 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
4474 if (ndr_get_array_length(ndr, &r->in.DisplayName) > ndr_get_array_size(ndr, &r->in.DisplayName)) {
4475 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));
4477 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t)));
4478 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, ndr_get_array_length(ndr, &r->in.DisplayName), sizeof(uint16_t), CH_UTF16));
4479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
4481 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
4482 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4483 NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4484 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4485 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4486 if (_ptr_binary_path) {
4487 NDR_PULL_ALLOC(ndr, r->in.binary_path);
4488 } else {
4489 r->in.binary_path = NULL;
4491 if (r->in.binary_path) {
4492 _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4493 NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4494 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4495 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4496 if (ndr_get_array_length(ndr, &r->in.binary_path) > ndr_get_array_size(ndr, &r->in.binary_path)) {
4497 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));
4499 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.binary_path), sizeof(uint16_t)));
4500 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));
4501 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4503 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
4504 if (_ptr_LoadOrderGroupKey) {
4505 NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
4506 } else {
4507 r->in.LoadOrderGroupKey = NULL;
4509 if (r->in.LoadOrderGroupKey) {
4510 _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
4511 NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
4512 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
4513 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
4514 if (ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey) > ndr_get_array_size(ndr, &r->in.LoadOrderGroupKey)) {
4515 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));
4517 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t)));
4518 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, ndr_get_array_length(ndr, &r->in.LoadOrderGroupKey), sizeof(uint16_t), CH_UTF16));
4519 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
4521 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4522 if (_ptr_dependencies) {
4523 NDR_PULL_ALLOC(ndr, r->in.dependencies);
4524 } else {
4525 r->in.dependencies = NULL;
4527 if (r->in.dependencies) {
4528 _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4529 NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4530 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4531 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4532 if (ndr_get_array_length(ndr, &r->in.dependencies) > ndr_get_array_size(ndr, &r->in.dependencies)) {
4533 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));
4535 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t)));
4536 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, ndr_get_array_length(ndr, &r->in.dependencies), sizeof(uint16_t), CH_UTF16));
4537 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4539 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4540 if (_ptr_service_start_name) {
4541 NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4542 } else {
4543 r->in.service_start_name = NULL;
4545 if (r->in.service_start_name) {
4546 _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4547 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4548 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4549 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4550 if (ndr_get_array_length(ndr, &r->in.service_start_name) > ndr_get_array_size(ndr, &r->in.service_start_name)) {
4551 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));
4553 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_start_name), sizeof(uint16_t)));
4554 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));
4555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4557 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4558 if (_ptr_password) {
4559 NDR_PULL_ALLOC(ndr, r->in.password);
4560 } else {
4561 r->in.password = NULL;
4563 if (r->in.password) {
4564 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4565 NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4566 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4567 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4568 if (ndr_get_array_length(ndr, &r->in.password) > ndr_get_array_size(ndr, &r->in.password)) {
4569 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));
4571 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t)));
4572 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, ndr_get_array_length(ndr, &r->in.password), sizeof(uint16_t), CH_UTF16));
4573 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4576 if (flags & NDR_OUT) {
4577 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
4578 if (_ptr_TagId) {
4579 NDR_PULL_ALLOC(ndr, r->out.TagId);
4580 } else {
4581 r->out.TagId = NULL;
4583 if (r->out.TagId) {
4584 _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
4585 NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
4586 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
4587 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
4589 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4591 return NDR_ERR_SUCCESS;
4594 _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r)
4596 ndr_print_struct(ndr, name, "svcctl_CreateServiceA");
4597 ndr->depth++;
4598 if (flags & NDR_SET_VALUES) {
4599 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4601 if (flags & NDR_IN) {
4602 ndr_print_struct(ndr, "in", "svcctl_CreateServiceA");
4603 ndr->depth++;
4604 ndr_print_ptr(ndr, "handle", r->in.handle);
4605 ndr->depth++;
4606 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4607 ndr->depth--;
4608 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
4609 ndr->depth++;
4610 if (r->in.ServiceName) {
4611 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
4613 ndr->depth--;
4614 ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
4615 ndr->depth++;
4616 if (r->in.DisplayName) {
4617 ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
4619 ndr->depth--;
4620 ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
4621 ndr_print_uint32(ndr, "type", r->in.type);
4622 ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4623 ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4624 ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4625 ndr->depth++;
4626 if (r->in.binary_path) {
4627 ndr_print_string(ndr, "binary_path", r->in.binary_path);
4629 ndr->depth--;
4630 ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4631 ndr->depth++;
4632 if (r->in.LoadOrderGroupKey) {
4633 ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
4635 ndr->depth--;
4636 ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4637 ndr->depth++;
4638 if (r->in.dependencies) {
4639 ndr_print_string(ndr, "dependencies", r->in.dependencies);
4641 ndr->depth--;
4642 ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4643 ndr->depth++;
4644 if (r->in.service_start_name) {
4645 ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4647 ndr->depth--;
4648 ndr_print_ptr(ndr, "password", r->in.password);
4649 ndr->depth++;
4650 if (r->in.password) {
4651 ndr_print_string(ndr, "password", r->in.password);
4653 ndr->depth--;
4654 ndr->depth--;
4656 if (flags & NDR_OUT) {
4657 ndr_print_struct(ndr, "out", "svcctl_CreateServiceA");
4658 ndr->depth++;
4659 ndr_print_ptr(ndr, "TagId", r->out.TagId);
4660 ndr->depth++;
4661 if (r->out.TagId) {
4662 ndr_print_uint32(ndr, "TagId", *r->out.TagId);
4664 ndr->depth--;
4665 ndr_print_WERROR(ndr, "result", r->out.result);
4666 ndr->depth--;
4668 ndr->depth--;
4671 static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
4673 if (flags & NDR_IN) {
4674 if (r->in.service == NULL) {
4675 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4677 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
4678 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
4679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4681 if (flags & NDR_OUT) {
4682 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status));
4683 if (r->out.service_status) {
4684 NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4686 if (r->out.needed == NULL) {
4687 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4690 if (r->out.services_returned == NULL) {
4691 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4693 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4694 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4696 return NDR_ERR_SUCCESS;
4699 static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
4701 uint32_t _ptr_service_status;
4702 TALLOC_CTX *_mem_save_service_0;
4703 TALLOC_CTX *_mem_save_service_status_0;
4704 TALLOC_CTX *_mem_save_needed_0;
4705 TALLOC_CTX *_mem_save_services_returned_0;
4706 if (flags & NDR_IN) {
4707 ZERO_STRUCT(r->out);
4709 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4710 NDR_PULL_ALLOC(ndr, r->in.service);
4712 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
4713 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
4714 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
4715 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
4716 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
4717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4718 NDR_PULL_ALLOC(ndr, r->out.needed);
4719 ZERO_STRUCTP(r->out.needed);
4720 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4721 ZERO_STRUCTP(r->out.services_returned);
4723 if (flags & NDR_OUT) {
4724 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_status));
4725 if (_ptr_service_status) {
4726 NDR_PULL_ALLOC(ndr, r->out.service_status);
4727 } else {
4728 r->out.service_status = NULL;
4730 if (r->out.service_status) {
4731 _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
4732 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, 0);
4733 NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
4734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
4736 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4737 NDR_PULL_ALLOC(ndr, r->out.needed);
4739 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4740 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4741 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4743 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4744 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4746 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4747 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4748 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4750 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4752 return NDR_ERR_SUCCESS;
4755 _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r)
4757 ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesA");
4758 ndr->depth++;
4759 if (flags & NDR_SET_VALUES) {
4760 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4762 if (flags & NDR_IN) {
4763 ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesA");
4764 ndr->depth++;
4765 ndr_print_ptr(ndr, "service", r->in.service);
4766 ndr->depth++;
4767 ndr_print_policy_handle(ndr, "service", r->in.service);
4768 ndr->depth--;
4769 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
4770 ndr_print_uint32(ndr, "offered", r->in.offered);
4771 ndr->depth--;
4773 if (flags & NDR_OUT) {
4774 ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesA");
4775 ndr->depth++;
4776 ndr_print_ptr(ndr, "service_status", r->out.service_status);
4777 ndr->depth++;
4778 if (r->out.service_status) {
4779 ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status);
4781 ndr->depth--;
4782 ndr_print_ptr(ndr, "needed", r->out.needed);
4783 ndr->depth++;
4784 ndr_print_uint32(ndr, "needed", *r->out.needed);
4785 ndr->depth--;
4786 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4787 ndr->depth++;
4788 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4789 ndr->depth--;
4790 ndr_print_WERROR(ndr, "result", r->out.result);
4791 ndr->depth--;
4793 ndr->depth--;
4796 static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
4798 if (flags & NDR_IN) {
4799 if (r->in.handle == NULL) {
4800 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4802 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4804 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
4805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4806 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
4807 if (r->in.resume_handle) {
4808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
4811 if (flags & NDR_OUT) {
4812 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
4813 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
4814 if (r->out.needed == NULL) {
4815 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4818 if (r->out.services_returned == NULL) {
4819 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
4822 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
4823 if (r->out.resume_handle) {
4824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
4826 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4828 return NDR_ERR_SUCCESS;
4831 static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
4833 uint32_t _ptr_resume_handle;
4834 TALLOC_CTX *_mem_save_handle_0;
4835 TALLOC_CTX *_mem_save_needed_0;
4836 TALLOC_CTX *_mem_save_services_returned_0;
4837 TALLOC_CTX *_mem_save_resume_handle_0;
4838 if (flags & NDR_IN) {
4839 ZERO_STRUCT(r->out);
4841 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4842 NDR_PULL_ALLOC(ndr, r->in.handle);
4844 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4845 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4846 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4847 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4848 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4849 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
4850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4851 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4852 if (_ptr_resume_handle) {
4853 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
4854 } else {
4855 r->in.resume_handle = NULL;
4857 if (r->in.resume_handle) {
4858 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4859 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
4860 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
4861 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4863 NDR_PULL_ALLOC(ndr, r->out.needed);
4864 ZERO_STRUCTP(r->out.needed);
4865 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4866 ZERO_STRUCTP(r->out.services_returned);
4868 if (flags & NDR_OUT) {
4869 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
4870 NDR_PULL_ALLOC_N(ndr, r->out.service, ndr_get_array_size(ndr, &r->out.service));
4871 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, ndr_get_array_size(ndr, &r->out.service)));
4872 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4873 NDR_PULL_ALLOC(ndr, r->out.needed);
4875 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4876 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4877 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4878 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4879 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4880 NDR_PULL_ALLOC(ndr, r->out.services_returned);
4882 _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
4883 NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
4884 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
4885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
4886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
4887 if (_ptr_resume_handle) {
4888 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
4889 } else {
4890 r->out.resume_handle = NULL;
4892 if (r->out.resume_handle) {
4893 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4894 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
4895 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
4896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
4898 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4899 if (r->out.service) {
4900 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.service, r->in.offered));
4903 return NDR_ERR_SUCCESS;
4906 _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r)
4908 ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusA");
4909 ndr->depth++;
4910 if (flags & NDR_SET_VALUES) {
4911 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4913 if (flags & NDR_IN) {
4914 ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusA");
4915 ndr->depth++;
4916 ndr_print_ptr(ndr, "handle", r->in.handle);
4917 ndr->depth++;
4918 ndr_print_policy_handle(ndr, "handle", r->in.handle);
4919 ndr->depth--;
4920 ndr_print_uint32(ndr, "type", r->in.type);
4921 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
4922 ndr_print_uint32(ndr, "offered", r->in.offered);
4923 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
4924 ndr->depth++;
4925 if (r->in.resume_handle) {
4926 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
4928 ndr->depth--;
4929 ndr->depth--;
4931 if (flags & NDR_OUT) {
4932 ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
4933 ndr->depth++;
4934 ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
4935 ndr_print_ptr(ndr, "needed", r->out.needed);
4936 ndr->depth++;
4937 ndr_print_uint32(ndr, "needed", *r->out.needed);
4938 ndr->depth--;
4939 ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
4940 ndr->depth++;
4941 ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
4942 ndr->depth--;
4943 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
4944 ndr->depth++;
4945 if (r->out.resume_handle) {
4946 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
4948 ndr->depth--;
4949 ndr_print_WERROR(ndr, "result", r->out.result);
4950 ndr->depth--;
4952 ndr->depth--;
4955 static enum ndr_err_code ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
4957 if (flags & NDR_IN) {
4958 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
4959 if (r->in.MachineName) {
4960 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4961 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4962 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
4963 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4965 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
4966 if (r->in.DatabaseName) {
4967 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4968 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4969 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
4970 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
4974 if (flags & NDR_OUT) {
4975 if (r->out.handle == NULL) {
4976 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4978 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4979 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4981 return NDR_ERR_SUCCESS;
4984 static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
4986 uint32_t _ptr_MachineName;
4987 uint32_t _ptr_DatabaseName;
4988 TALLOC_CTX *_mem_save_MachineName_0;
4989 TALLOC_CTX *_mem_save_DatabaseName_0;
4990 TALLOC_CTX *_mem_save_handle_0;
4991 if (flags & NDR_IN) {
4992 ZERO_STRUCT(r->out);
4994 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
4995 if (_ptr_MachineName) {
4996 NDR_PULL_ALLOC(ndr, r->in.MachineName);
4997 } else {
4998 r->in.MachineName = NULL;
5000 if (r->in.MachineName) {
5001 _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5002 NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
5003 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
5004 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
5005 if (ndr_get_array_length(ndr, &r->in.MachineName) > ndr_get_array_size(ndr, &r->in.MachineName)) {
5006 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));
5008 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t)));
5009 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, ndr_get_array_length(ndr, &r->in.MachineName), sizeof(uint16_t), CH_UTF16));
5010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
5012 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
5013 if (_ptr_DatabaseName) {
5014 NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
5015 } else {
5016 r->in.DatabaseName = NULL;
5018 if (r->in.DatabaseName) {
5019 _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5020 NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
5021 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
5022 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
5023 if (ndr_get_array_length(ndr, &r->in.DatabaseName) > ndr_get_array_size(ndr, &r->in.DatabaseName)) {
5024 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));
5026 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t)));
5027 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, ndr_get_array_length(ndr, &r->in.DatabaseName), sizeof(uint16_t), CH_UTF16));
5028 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
5030 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5031 NDR_PULL_ALLOC(ndr, r->out.handle);
5032 ZERO_STRUCTP(r->out.handle);
5034 if (flags & NDR_OUT) {
5035 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5036 NDR_PULL_ALLOC(ndr, r->out.handle);
5038 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5039 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5040 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5042 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5044 return NDR_ERR_SUCCESS;
5047 _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r)
5049 ndr_print_struct(ndr, name, "svcctl_OpenSCManagerA");
5050 ndr->depth++;
5051 if (flags & NDR_SET_VALUES) {
5052 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5054 if (flags & NDR_IN) {
5055 ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerA");
5056 ndr->depth++;
5057 ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
5058 ndr->depth++;
5059 if (r->in.MachineName) {
5060 ndr_print_string(ndr, "MachineName", r->in.MachineName);
5062 ndr->depth--;
5063 ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
5064 ndr->depth++;
5065 if (r->in.DatabaseName) {
5066 ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
5068 ndr->depth--;
5069 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5070 ndr->depth--;
5072 if (flags & NDR_OUT) {
5073 ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerA");
5074 ndr->depth++;
5075 ndr_print_ptr(ndr, "handle", r->out.handle);
5076 ndr->depth++;
5077 ndr_print_policy_handle(ndr, "handle", r->out.handle);
5078 ndr->depth--;
5079 ndr_print_WERROR(ndr, "result", r->out.result);
5080 ndr->depth--;
5082 ndr->depth--;
5085 static enum ndr_err_code ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
5087 if (flags & NDR_IN) {
5088 if (r->in.scmanager_handle == NULL) {
5089 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5091 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5092 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
5093 if (r->in.ServiceName) {
5094 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5095 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5096 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5097 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5099 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
5101 if (flags & NDR_OUT) {
5102 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5104 return NDR_ERR_SUCCESS;
5107 static enum ndr_err_code ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
5109 uint32_t _ptr_ServiceName;
5110 TALLOC_CTX *_mem_save_scmanager_handle_0;
5111 TALLOC_CTX *_mem_save_ServiceName_0;
5112 if (flags & NDR_IN) {
5113 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5114 NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5116 _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5117 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
5118 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
5120 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
5121 if (_ptr_ServiceName) {
5122 NDR_PULL_ALLOC(ndr, r->in.ServiceName);
5123 } else {
5124 r->in.ServiceName = NULL;
5126 if (r->in.ServiceName) {
5127 _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5128 NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
5129 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
5130 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
5131 if (ndr_get_array_length(ndr, &r->in.ServiceName) > ndr_get_array_size(ndr, &r->in.ServiceName)) {
5132 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));
5134 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t)));
5135 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, ndr_get_array_length(ndr, &r->in.ServiceName), sizeof(uint16_t), CH_UTF16));
5136 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
5138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5140 if (flags & NDR_OUT) {
5141 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5143 return NDR_ERR_SUCCESS;
5146 _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r)
5148 ndr_print_struct(ndr, name, "svcctl_OpenServiceA");
5149 ndr->depth++;
5150 if (flags & NDR_SET_VALUES) {
5151 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5153 if (flags & NDR_IN) {
5154 ndr_print_struct(ndr, "in", "svcctl_OpenServiceA");
5155 ndr->depth++;
5156 ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
5157 ndr->depth++;
5158 ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
5159 ndr->depth--;
5160 ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
5161 ndr->depth++;
5162 if (r->in.ServiceName) {
5163 ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5165 ndr->depth--;
5166 ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5167 ndr->depth--;
5169 if (flags & NDR_OUT) {
5170 ndr_print_struct(ndr, "out", "svcctl_OpenServiceA");
5171 ndr->depth++;
5172 ndr_print_WERROR(ndr, "result", r->out.result);
5173 ndr->depth--;
5175 ndr->depth--;
5178 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
5180 if (flags & NDR_IN) {
5181 if (r->in.handle == NULL) {
5182 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5184 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5187 if (flags & NDR_OUT) {
5188 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5189 if (r->out.needed == NULL) {
5190 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5192 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5193 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5195 return NDR_ERR_SUCCESS;
5198 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
5200 TALLOC_CTX *_mem_save_handle_0;
5201 TALLOC_CTX *_mem_save_needed_0;
5202 if (flags & NDR_IN) {
5203 ZERO_STRUCT(r->out);
5205 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5206 NDR_PULL_ALLOC(ndr, r->in.handle);
5208 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5209 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5210 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5212 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5213 NDR_PULL_ALLOC(ndr, r->out.needed);
5214 ZERO_STRUCTP(r->out.needed);
5216 if (flags & NDR_OUT) {
5217 NDR_PULL_ALLOC_N(ndr, r->out.query, r->in.offered);
5218 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5219 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5220 NDR_PULL_ALLOC(ndr, r->out.needed);
5222 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5223 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5224 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5226 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5228 return NDR_ERR_SUCCESS;
5231 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r)
5233 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigA");
5234 ndr->depth++;
5235 if (flags & NDR_SET_VALUES) {
5236 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5238 if (flags & NDR_IN) {
5239 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigA");
5240 ndr->depth++;
5241 ndr_print_ptr(ndr, "handle", r->in.handle);
5242 ndr->depth++;
5243 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5244 ndr->depth--;
5245 ndr_print_uint32(ndr, "offered", r->in.offered);
5246 ndr->depth--;
5248 if (flags & NDR_OUT) {
5249 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
5250 ndr->depth++;
5251 ndr_print_array_uint8(ndr, "query", r->out.query, r->in.offered);
5252 ndr_print_ptr(ndr, "needed", r->out.needed);
5253 ndr->depth++;
5254 ndr_print_uint32(ndr, "needed", *r->out.needed);
5255 ndr->depth--;
5256 ndr_print_WERROR(ndr, "result", r->out.result);
5257 ndr->depth--;
5259 ndr->depth--;
5262 static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5264 if (flags & NDR_IN) {
5265 if (r->in.handle == NULL) {
5266 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5268 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5271 if (flags & NDR_OUT) {
5272 if (r->out.lock_status == NULL) {
5273 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5275 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5276 if (r->out.needed == NULL) {
5277 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5280 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5282 return NDR_ERR_SUCCESS;
5285 static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
5287 TALLOC_CTX *_mem_save_handle_0;
5288 TALLOC_CTX *_mem_save_lock_status_0;
5289 TALLOC_CTX *_mem_save_needed_0;
5290 if (flags & NDR_IN) {
5291 ZERO_STRUCT(r->out);
5293 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5294 NDR_PULL_ALLOC(ndr, r->in.handle);
5296 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5297 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5298 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5299 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5300 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5301 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5302 ZERO_STRUCTP(r->out.lock_status);
5303 NDR_PULL_ALLOC(ndr, r->out.needed);
5304 ZERO_STRUCTP(r->out.needed);
5306 if (flags & NDR_OUT) {
5307 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5308 NDR_PULL_ALLOC(ndr, r->out.lock_status);
5310 _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5311 NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
5312 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5313 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
5314 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5315 NDR_PULL_ALLOC(ndr, r->out.needed);
5317 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5318 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5319 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5320 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5321 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5323 return NDR_ERR_SUCCESS;
5326 _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5328 ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusA");
5329 ndr->depth++;
5330 if (flags & NDR_SET_VALUES) {
5331 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5333 if (flags & NDR_IN) {
5334 ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusA");
5335 ndr->depth++;
5336 ndr_print_ptr(ndr, "handle", r->in.handle);
5337 ndr->depth++;
5338 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5339 ndr->depth--;
5340 ndr_print_uint32(ndr, "offered", r->in.offered);
5341 ndr->depth--;
5343 if (flags & NDR_OUT) {
5344 ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusA");
5345 ndr->depth++;
5346 ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
5347 ndr->depth++;
5348 ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
5349 ndr->depth--;
5350 ndr_print_ptr(ndr, "needed", r->out.needed);
5351 ndr->depth++;
5352 ndr_print_uint32(ndr, "needed", *r->out.needed);
5353 ndr->depth--;
5354 ndr_print_WERROR(ndr, "result", r->out.result);
5355 ndr->depth--;
5357 ndr->depth--;
5360 static enum ndr_err_code ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
5362 if (flags & NDR_IN) {
5363 if (r->in.handle == NULL) {
5364 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5366 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
5368 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
5369 if (r->in.Arguments) {
5370 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5371 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5372 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
5373 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5376 if (flags & NDR_OUT) {
5377 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5379 return NDR_ERR_SUCCESS;
5382 static enum ndr_err_code ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
5384 uint32_t _ptr_Arguments;
5385 TALLOC_CTX *_mem_save_handle_0;
5386 TALLOC_CTX *_mem_save_Arguments_0;
5387 if (flags & NDR_IN) {
5388 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5389 NDR_PULL_ALLOC(ndr, r->in.handle);
5391 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5392 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5393 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5394 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5395 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
5396 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
5397 if (_ptr_Arguments) {
5398 NDR_PULL_ALLOC(ndr, r->in.Arguments);
5399 } else {
5400 r->in.Arguments = NULL;
5402 if (r->in.Arguments) {
5403 _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
5404 NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
5405 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
5406 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
5407 if (ndr_get_array_length(ndr, &r->in.Arguments) > ndr_get_array_size(ndr, &r->in.Arguments)) {
5408 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));
5410 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t)));
5411 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, ndr_get_array_length(ndr, &r->in.Arguments), sizeof(uint16_t), CH_UTF16));
5412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
5415 if (flags & NDR_OUT) {
5416 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5418 return NDR_ERR_SUCCESS;
5421 _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r)
5423 ndr_print_struct(ndr, name, "svcctl_StartServiceA");
5424 ndr->depth++;
5425 if (flags & NDR_SET_VALUES) {
5426 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5428 if (flags & NDR_IN) {
5429 ndr_print_struct(ndr, "in", "svcctl_StartServiceA");
5430 ndr->depth++;
5431 ndr_print_ptr(ndr, "handle", r->in.handle);
5432 ndr->depth++;
5433 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5434 ndr->depth--;
5435 ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
5436 ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
5437 ndr->depth++;
5438 if (r->in.Arguments) {
5439 ndr_print_string(ndr, "Arguments", r->in.Arguments);
5441 ndr->depth--;
5442 ndr->depth--;
5444 if (flags & NDR_OUT) {
5445 ndr_print_struct(ndr, "out", "svcctl_StartServiceA");
5446 ndr->depth++;
5447 ndr_print_WERROR(ndr, "result", r->out.result);
5448 ndr->depth--;
5450 ndr->depth--;
5453 static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5455 if (flags & NDR_IN) {
5456 if (r->in.handle == NULL) {
5457 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5459 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5460 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5461 if (r->in.service_name) {
5462 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5463 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5464 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5465 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));
5467 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5468 if (r->in.display_name_length) {
5469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5472 if (flags & NDR_OUT) {
5473 if (r->out.display_name == NULL) {
5474 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5476 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
5477 if (*r->out.display_name) {
5478 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5479 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5480 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
5481 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));
5483 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5484 if (r->out.display_name_length) {
5485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5487 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5489 return NDR_ERR_SUCCESS;
5492 static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
5494 uint32_t _ptr_service_name;
5495 uint32_t _ptr_display_name;
5496 uint32_t _ptr_display_name_length;
5497 TALLOC_CTX *_mem_save_handle_0;
5498 TALLOC_CTX *_mem_save_service_name_0;
5499 TALLOC_CTX *_mem_save_display_name_0;
5500 TALLOC_CTX *_mem_save_display_name_1;
5501 TALLOC_CTX *_mem_save_display_name_length_0;
5502 if (flags & NDR_IN) {
5503 ZERO_STRUCT(r->out);
5505 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5506 NDR_PULL_ALLOC(ndr, r->in.handle);
5508 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5509 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5510 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5512 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5513 if (_ptr_service_name) {
5514 NDR_PULL_ALLOC(ndr, r->in.service_name);
5515 } else {
5516 r->in.service_name = NULL;
5518 if (r->in.service_name) {
5519 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5520 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5521 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5522 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5523 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5524 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));
5526 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5527 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));
5528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5530 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5531 if (_ptr_display_name_length) {
5532 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5533 } else {
5534 r->in.display_name_length = NULL;
5536 if (r->in.display_name_length) {
5537 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5538 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5539 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5540 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5542 NDR_PULL_ALLOC(ndr, r->out.display_name);
5543 ZERO_STRUCTP(r->out.display_name);
5545 if (flags & NDR_OUT) {
5546 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5547 NDR_PULL_ALLOC(ndr, r->out.display_name);
5549 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5550 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
5551 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
5552 if (_ptr_display_name) {
5553 NDR_PULL_ALLOC(ndr, *r->out.display_name);
5554 } else {
5555 *r->out.display_name = NULL;
5557 if (*r->out.display_name) {
5558 _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5559 NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
5560 NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
5561 NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
5562 if (ndr_get_array_length(ndr, r->out.display_name) > ndr_get_array_size(ndr, r->out.display_name)) {
5563 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));
5565 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.display_name), sizeof(uint16_t)));
5566 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));
5567 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
5569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
5570 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5571 if (_ptr_display_name_length) {
5572 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5573 } else {
5574 r->out.display_name_length = NULL;
5576 if (r->out.display_name_length) {
5577 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5578 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5579 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5582 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5584 return NDR_ERR_SUCCESS;
5587 _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r)
5589 ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameA");
5590 ndr->depth++;
5591 if (flags & NDR_SET_VALUES) {
5592 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5594 if (flags & NDR_IN) {
5595 ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameA");
5596 ndr->depth++;
5597 ndr_print_ptr(ndr, "handle", r->in.handle);
5598 ndr->depth++;
5599 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5600 ndr->depth--;
5601 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5602 ndr->depth++;
5603 if (r->in.service_name) {
5604 ndr_print_string(ndr, "service_name", r->in.service_name);
5606 ndr->depth--;
5607 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5608 ndr->depth++;
5609 if (r->in.display_name_length) {
5610 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5612 ndr->depth--;
5613 ndr->depth--;
5615 if (flags & NDR_OUT) {
5616 ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameA");
5617 ndr->depth++;
5618 ndr_print_ptr(ndr, "display_name", r->out.display_name);
5619 ndr->depth++;
5620 ndr_print_ptr(ndr, "display_name", *r->out.display_name);
5621 ndr->depth++;
5622 if (*r->out.display_name) {
5623 ndr_print_string(ndr, "display_name", *r->out.display_name);
5625 ndr->depth--;
5626 ndr->depth--;
5627 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5628 ndr->depth++;
5629 if (r->out.display_name_length) {
5630 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5632 ndr->depth--;
5633 ndr_print_WERROR(ndr, "result", r->out.result);
5634 ndr->depth--;
5636 ndr->depth--;
5639 static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
5641 if (flags & NDR_IN) {
5642 if (r->in.handle == NULL) {
5643 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5645 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5646 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
5647 if (r->in.service_name) {
5648 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5649 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5650 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
5651 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));
5653 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
5654 if (r->in.display_name_length) {
5655 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
5658 if (flags & NDR_OUT) {
5659 if (r->out.key_name == NULL) {
5660 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5662 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
5663 if (*r->out.key_name) {
5664 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5665 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5666 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
5667 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));
5669 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
5670 if (r->out.display_name_length) {
5671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
5673 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5675 return NDR_ERR_SUCCESS;
5678 static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
5680 uint32_t _ptr_service_name;
5681 uint32_t _ptr_key_name;
5682 uint32_t _ptr_display_name_length;
5683 TALLOC_CTX *_mem_save_handle_0;
5684 TALLOC_CTX *_mem_save_service_name_0;
5685 TALLOC_CTX *_mem_save_key_name_0;
5686 TALLOC_CTX *_mem_save_key_name_1;
5687 TALLOC_CTX *_mem_save_display_name_length_0;
5688 if (flags & NDR_IN) {
5689 ZERO_STRUCT(r->out);
5691 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5692 NDR_PULL_ALLOC(ndr, r->in.handle);
5694 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5695 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5696 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5697 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5698 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
5699 if (_ptr_service_name) {
5700 NDR_PULL_ALLOC(ndr, r->in.service_name);
5701 } else {
5702 r->in.service_name = NULL;
5704 if (r->in.service_name) {
5705 _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5706 NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
5707 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
5708 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
5709 if (ndr_get_array_length(ndr, &r->in.service_name) > ndr_get_array_size(ndr, &r->in.service_name)) {
5710 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));
5712 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service_name), sizeof(uint16_t)));
5713 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));
5714 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
5716 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5717 if (_ptr_display_name_length) {
5718 NDR_PULL_ALLOC(ndr, r->in.display_name_length);
5719 } else {
5720 r->in.display_name_length = NULL;
5722 if (r->in.display_name_length) {
5723 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5724 NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
5725 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
5726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5728 NDR_PULL_ALLOC(ndr, r->out.key_name);
5729 ZERO_STRUCTP(r->out.key_name);
5731 if (flags & NDR_OUT) {
5732 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5733 NDR_PULL_ALLOC(ndr, r->out.key_name);
5735 _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5736 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
5737 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
5738 if (_ptr_key_name) {
5739 NDR_PULL_ALLOC(ndr, *r->out.key_name);
5740 } else {
5741 *r->out.key_name = NULL;
5743 if (*r->out.key_name) {
5744 _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
5745 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
5746 NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
5747 NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
5748 if (ndr_get_array_length(ndr, r->out.key_name) > ndr_get_array_size(ndr, r->out.key_name)) {
5749 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));
5751 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.key_name), sizeof(uint16_t)));
5752 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));
5753 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
5755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
5756 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
5757 if (_ptr_display_name_length) {
5758 NDR_PULL_ALLOC(ndr, r->out.display_name_length);
5759 } else {
5760 r->out.display_name_length = NULL;
5762 if (r->out.display_name_length) {
5763 _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
5764 NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
5765 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
5766 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
5768 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5770 return NDR_ERR_SUCCESS;
5773 _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r)
5775 ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameA");
5776 ndr->depth++;
5777 if (flags & NDR_SET_VALUES) {
5778 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5780 if (flags & NDR_IN) {
5781 ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameA");
5782 ndr->depth++;
5783 ndr_print_ptr(ndr, "handle", r->in.handle);
5784 ndr->depth++;
5785 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5786 ndr->depth--;
5787 ndr_print_ptr(ndr, "service_name", r->in.service_name);
5788 ndr->depth++;
5789 if (r->in.service_name) {
5790 ndr_print_string(ndr, "service_name", r->in.service_name);
5792 ndr->depth--;
5793 ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
5794 ndr->depth++;
5795 if (r->in.display_name_length) {
5796 ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
5798 ndr->depth--;
5799 ndr->depth--;
5801 if (flags & NDR_OUT) {
5802 ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameA");
5803 ndr->depth++;
5804 ndr_print_ptr(ndr, "key_name", r->out.key_name);
5805 ndr->depth++;
5806 ndr_print_ptr(ndr, "key_name", *r->out.key_name);
5807 ndr->depth++;
5808 if (*r->out.key_name) {
5809 ndr_print_string(ndr, "key_name", *r->out.key_name);
5811 ndr->depth--;
5812 ndr->depth--;
5813 ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
5814 ndr->depth++;
5815 if (r->out.display_name_length) {
5816 ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
5818 ndr->depth--;
5819 ndr_print_WERROR(ndr, "result", r->out.result);
5820 ndr->depth--;
5822 ndr->depth--;
5825 static enum ndr_err_code ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5827 if (flags & NDR_IN) {
5829 if (flags & NDR_OUT) {
5830 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5832 return NDR_ERR_SUCCESS;
5835 static enum ndr_err_code ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
5837 if (flags & NDR_IN) {
5839 if (flags & NDR_OUT) {
5840 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5842 return NDR_ERR_SUCCESS;
5845 _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
5847 ndr_print_struct(ndr, name, "svcctl_GetCurrentGroupeStateW");
5848 ndr->depth++;
5849 if (flags & NDR_SET_VALUES) {
5850 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5852 if (flags & NDR_IN) {
5853 ndr_print_struct(ndr, "in", "svcctl_GetCurrentGroupeStateW");
5854 ndr->depth++;
5855 ndr->depth--;
5857 if (flags & NDR_OUT) {
5858 ndr_print_struct(ndr, "out", "svcctl_GetCurrentGroupeStateW");
5859 ndr->depth++;
5860 ndr_print_WERROR(ndr, "result", r->out.result);
5861 ndr->depth--;
5863 ndr->depth--;
5866 static enum ndr_err_code ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
5868 if (flags & NDR_IN) {
5870 if (flags & NDR_OUT) {
5871 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5873 return NDR_ERR_SUCCESS;
5876 static enum ndr_err_code ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
5878 if (flags & NDR_IN) {
5880 if (flags & NDR_OUT) {
5881 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5883 return NDR_ERR_SUCCESS;
5886 _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r)
5888 ndr_print_struct(ndr, name, "svcctl_EnumServiceGroupW");
5889 ndr->depth++;
5890 if (flags & NDR_SET_VALUES) {
5891 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5893 if (flags & NDR_IN) {
5894 ndr_print_struct(ndr, "in", "svcctl_EnumServiceGroupW");
5895 ndr->depth++;
5896 ndr->depth--;
5898 if (flags & NDR_OUT) {
5899 ndr_print_struct(ndr, "out", "svcctl_EnumServiceGroupW");
5900 ndr->depth++;
5901 ndr_print_WERROR(ndr, "result", r->out.result);
5902 ndr->depth--;
5904 ndr->depth--;
5907 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5909 if (flags & NDR_IN) {
5910 if (r->in.handle == NULL) {
5911 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5913 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5915 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5916 if (r->in.info) {
5917 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
5920 if (flags & NDR_OUT) {
5921 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5923 return NDR_ERR_SUCCESS;
5926 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
5928 uint32_t _ptr_info;
5929 TALLOC_CTX *_mem_save_handle_0;
5930 TALLOC_CTX *_mem_save_info_0;
5931 if (flags & NDR_IN) {
5932 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5933 NDR_PULL_ALLOC(ndr, r->in.handle);
5935 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5936 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5937 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5939 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
5940 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5941 if (_ptr_info) {
5942 NDR_PULL_ALLOC(ndr, r->in.info);
5943 } else {
5944 r->in.info = NULL;
5946 if (r->in.info) {
5947 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5948 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5949 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
5950 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5953 if (flags & NDR_OUT) {
5954 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5956 return NDR_ERR_SUCCESS;
5959 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r)
5961 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2A");
5962 ndr->depth++;
5963 if (flags & NDR_SET_VALUES) {
5964 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5966 if (flags & NDR_IN) {
5967 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2A");
5968 ndr->depth++;
5969 ndr_print_ptr(ndr, "handle", r->in.handle);
5970 ndr->depth++;
5971 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5972 ndr->depth--;
5973 ndr_print_uint32(ndr, "info_level", r->in.info_level);
5974 ndr_print_ptr(ndr, "info", r->in.info);
5975 ndr->depth++;
5976 if (r->in.info) {
5977 ndr_print_uint8(ndr, "info", *r->in.info);
5979 ndr->depth--;
5980 ndr->depth--;
5982 if (flags & NDR_OUT) {
5983 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2A");
5984 ndr->depth++;
5985 ndr_print_WERROR(ndr, "result", r->out.result);
5986 ndr->depth--;
5988 ndr->depth--;
5991 static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
5993 if (flags & NDR_IN) {
5994 if (r->in.handle == NULL) {
5995 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5997 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5998 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
5999 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
6000 if (r->in.info) {
6001 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
6004 if (flags & NDR_OUT) {
6005 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6007 return NDR_ERR_SUCCESS;
6010 static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
6012 uint32_t _ptr_info;
6013 TALLOC_CTX *_mem_save_handle_0;
6014 TALLOC_CTX *_mem_save_info_0;
6015 if (flags & NDR_IN) {
6016 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6017 NDR_PULL_ALLOC(ndr, r->in.handle);
6019 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6020 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6021 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6024 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
6025 if (_ptr_info) {
6026 NDR_PULL_ALLOC(ndr, r->in.info);
6027 } else {
6028 r->in.info = NULL;
6030 if (r->in.info) {
6031 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6032 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
6033 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
6034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
6037 if (flags & NDR_OUT) {
6038 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6040 return NDR_ERR_SUCCESS;
6043 _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r)
6045 ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2W");
6046 ndr->depth++;
6047 if (flags & NDR_SET_VALUES) {
6048 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6050 if (flags & NDR_IN) {
6051 ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2W");
6052 ndr->depth++;
6053 ndr_print_ptr(ndr, "handle", r->in.handle);
6054 ndr->depth++;
6055 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6056 ndr->depth--;
6057 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6058 ndr_print_ptr(ndr, "info", r->in.info);
6059 ndr->depth++;
6060 if (r->in.info) {
6061 ndr_print_uint8(ndr, "info", *r->in.info);
6063 ndr->depth--;
6064 ndr->depth--;
6066 if (flags & NDR_OUT) {
6067 ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2W");
6068 ndr->depth++;
6069 ndr_print_WERROR(ndr, "result", r->out.result);
6070 ndr->depth--;
6072 ndr->depth--;
6075 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
6077 if (flags & NDR_IN) {
6078 if (r->in.handle == NULL) {
6079 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6081 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6082 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6085 if (flags & NDR_OUT) {
6086 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6087 if (r->out.needed == NULL) {
6088 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6091 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6093 return NDR_ERR_SUCCESS;
6096 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
6098 TALLOC_CTX *_mem_save_handle_0;
6099 TALLOC_CTX *_mem_save_needed_0;
6100 if (flags & NDR_IN) {
6101 ZERO_STRUCT(r->out);
6103 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6104 NDR_PULL_ALLOC(ndr, r->in.handle);
6106 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6107 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6108 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6109 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6110 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6112 NDR_PULL_ALLOC(ndr, r->out.needed);
6113 ZERO_STRUCTP(r->out.needed);
6115 if (flags & NDR_OUT) {
6116 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6117 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6118 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6119 NDR_PULL_ALLOC(ndr, r->out.needed);
6121 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6122 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6123 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6124 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6125 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6127 return NDR_ERR_SUCCESS;
6130 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r)
6132 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2A");
6133 ndr->depth++;
6134 if (flags & NDR_SET_VALUES) {
6135 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6137 if (flags & NDR_IN) {
6138 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2A");
6139 ndr->depth++;
6140 ndr_print_ptr(ndr, "handle", r->in.handle);
6141 ndr->depth++;
6142 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6143 ndr->depth--;
6144 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6145 ndr_print_uint32(ndr, "offered", r->in.offered);
6146 ndr->depth--;
6148 if (flags & NDR_OUT) {
6149 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
6150 ndr->depth++;
6151 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6152 ndr_print_ptr(ndr, "needed", r->out.needed);
6153 ndr->depth++;
6154 ndr_print_uint32(ndr, "needed", *r->out.needed);
6155 ndr->depth--;
6156 ndr_print_WERROR(ndr, "result", r->out.result);
6157 ndr->depth--;
6159 ndr->depth--;
6162 static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
6164 if (flags & NDR_IN) {
6165 if (r->in.handle == NULL) {
6166 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6168 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6169 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6172 if (flags & NDR_OUT) {
6173 if (r->out.buffer == NULL) {
6174 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6176 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6177 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6178 if (r->out.needed == NULL) {
6179 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6182 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6184 return NDR_ERR_SUCCESS;
6187 static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
6189 TALLOC_CTX *_mem_save_handle_0;
6190 TALLOC_CTX *_mem_save_needed_0;
6191 if (flags & NDR_IN) {
6192 ZERO_STRUCT(r->out);
6194 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6195 NDR_PULL_ALLOC(ndr, r->in.handle);
6197 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6198 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6199 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6201 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6202 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6203 if (r->in.offered > 8192) {
6204 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6206 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6207 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6208 NDR_PULL_ALLOC(ndr, r->out.needed);
6209 ZERO_STRUCTP(r->out.needed);
6211 if (flags & NDR_OUT) {
6212 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6213 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6214 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6216 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6217 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6218 NDR_PULL_ALLOC(ndr, r->out.needed);
6220 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6221 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6223 if (*r->out.needed > 8192) {
6224 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6227 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6228 if (r->out.buffer) {
6229 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6232 return NDR_ERR_SUCCESS;
6235 _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r)
6237 ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2W");
6238 ndr->depth++;
6239 if (flags & NDR_SET_VALUES) {
6240 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6242 if (flags & NDR_IN) {
6243 ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2W");
6244 ndr->depth++;
6245 ndr_print_ptr(ndr, "handle", r->in.handle);
6246 ndr->depth++;
6247 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6248 ndr->depth--;
6249 ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6250 ndr_print_uint32(ndr, "offered", r->in.offered);
6251 ndr->depth--;
6253 if (flags & NDR_OUT) {
6254 ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
6255 ndr->depth++;
6256 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6257 ndr->depth++;
6258 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6259 ndr->depth--;
6260 ndr_print_ptr(ndr, "needed", r->out.needed);
6261 ndr->depth++;
6262 ndr_print_uint32(ndr, "needed", *r->out.needed);
6263 ndr->depth--;
6264 ndr_print_WERROR(ndr, "result", r->out.result);
6265 ndr->depth--;
6267 ndr->depth--;
6270 static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
6272 if (flags & NDR_IN) {
6273 if (r->in.handle == NULL) {
6274 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6276 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6277 NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr, NDR_SCALARS, r->in.info_level));
6278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6280 if (flags & NDR_OUT) {
6281 if (r->out.buffer == NULL) {
6282 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6284 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6285 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6286 if (r->out.needed == NULL) {
6287 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6290 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6292 return NDR_ERR_SUCCESS;
6295 static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
6297 TALLOC_CTX *_mem_save_handle_0;
6298 TALLOC_CTX *_mem_save_needed_0;
6299 if (flags & NDR_IN) {
6300 ZERO_STRUCT(r->out);
6302 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6303 NDR_PULL_ALLOC(ndr, r->in.handle);
6305 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6306 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6307 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6308 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6309 NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
6310 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6311 if (r->in.offered > 8192) {
6312 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6314 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6315 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6316 NDR_PULL_ALLOC(ndr, r->out.needed);
6317 ZERO_STRUCTP(r->out.needed);
6319 if (flags & NDR_OUT) {
6320 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6321 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6322 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
6324 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
6325 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6326 NDR_PULL_ALLOC(ndr, r->out.needed);
6328 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6329 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6331 if (*r->out.needed > 8192) {
6332 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6334 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6335 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6336 if (r->out.buffer) {
6337 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6340 return NDR_ERR_SUCCESS;
6343 _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r)
6345 ndr_print_struct(ndr, name, "svcctl_QueryServiceStatusEx");
6346 ndr->depth++;
6347 if (flags & NDR_SET_VALUES) {
6348 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6350 if (flags & NDR_IN) {
6351 ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatusEx");
6352 ndr->depth++;
6353 ndr_print_ptr(ndr, "handle", r->in.handle);
6354 ndr->depth++;
6355 ndr_print_policy_handle(ndr, "handle", r->in.handle);
6356 ndr->depth--;
6357 ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
6358 ndr_print_uint32(ndr, "offered", r->in.offered);
6359 ndr->depth--;
6361 if (flags & NDR_OUT) {
6362 ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
6363 ndr->depth++;
6364 ndr_print_ptr(ndr, "buffer", r->out.buffer);
6365 ndr->depth++;
6366 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6367 ndr->depth--;
6368 ndr_print_ptr(ndr, "needed", r->out.needed);
6369 ndr->depth++;
6370 ndr_print_uint32(ndr, "needed", *r->out.needed);
6371 ndr->depth--;
6372 ndr_print_WERROR(ndr, "result", r->out.result);
6373 ndr->depth--;
6375 ndr->depth--;
6378 static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
6380 if (flags & NDR_IN) {
6381 if (r->in.scmanager == NULL) {
6382 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6384 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6387 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6389 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6390 if (r->in.resume_handle) {
6391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6394 if (flags & NDR_OUT) {
6395 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6396 if (r->out.needed == NULL) {
6397 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6400 if (r->out.service_returned == NULL) {
6401 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6404 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6405 if (r->out.resume_handle) {
6406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6408 if (r->out.group_name == NULL) {
6409 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6411 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name));
6412 if (*r->out.group_name) {
6413 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6414 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6415 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
6416 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));
6418 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6420 return NDR_ERR_SUCCESS;
6423 static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
6425 uint32_t _ptr_resume_handle;
6426 uint32_t _ptr_group_name;
6427 TALLOC_CTX *_mem_save_scmanager_0;
6428 TALLOC_CTX *_mem_save_needed_0;
6429 TALLOC_CTX *_mem_save_service_returned_0;
6430 TALLOC_CTX *_mem_save_resume_handle_0;
6431 TALLOC_CTX *_mem_save_group_name_0;
6432 TALLOC_CTX *_mem_save_group_name_1;
6433 if (flags & NDR_IN) {
6434 ZERO_STRUCT(r->out);
6436 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6437 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6439 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6440 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6441 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6444 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6445 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6446 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6447 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6448 if (_ptr_resume_handle) {
6449 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6450 } else {
6451 r->in.resume_handle = NULL;
6453 if (r->in.resume_handle) {
6454 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6455 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6456 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6457 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6459 NDR_PULL_ALLOC(ndr, r->out.needed);
6460 ZERO_STRUCTP(r->out.needed);
6461 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6462 ZERO_STRUCTP(r->out.service_returned);
6463 NDR_PULL_ALLOC(ndr, r->out.group_name);
6464 ZERO_STRUCTP(r->out.group_name);
6466 if (flags & NDR_OUT) {
6467 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6468 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6469 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6470 NDR_PULL_ALLOC(ndr, r->out.needed);
6472 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6473 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6474 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6476 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6477 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6479 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6480 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6481 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6482 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6483 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6484 if (_ptr_resume_handle) {
6485 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6486 } else {
6487 r->out.resume_handle = NULL;
6489 if (r->out.resume_handle) {
6490 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6491 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6492 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6493 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6495 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6496 NDR_PULL_ALLOC(ndr, r->out.group_name);
6498 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6499 NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
6500 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6501 if (_ptr_group_name) {
6502 NDR_PULL_ALLOC(ndr, *r->out.group_name);
6503 } else {
6504 *r->out.group_name = NULL;
6506 if (*r->out.group_name) {
6507 _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6508 NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0);
6509 NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
6510 NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
6511 if (ndr_get_array_length(ndr, r->out.group_name) > ndr_get_array_size(ndr, r->out.group_name)) {
6512 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));
6514 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.group_name), sizeof(uint16_t)));
6515 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));
6516 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0);
6518 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
6519 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6521 return NDR_ERR_SUCCESS;
6524 _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r)
6526 ndr_print_struct(ndr, name, "EnumServicesStatusExA");
6527 ndr->depth++;
6528 if (flags & NDR_SET_VALUES) {
6529 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6531 if (flags & NDR_IN) {
6532 ndr_print_struct(ndr, "in", "EnumServicesStatusExA");
6533 ndr->depth++;
6534 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6535 ndr->depth++;
6536 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6537 ndr->depth--;
6538 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6539 ndr_print_uint32(ndr, "type", r->in.type);
6540 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6541 ndr_print_uint32(ndr, "offered", r->in.offered);
6542 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6543 ndr->depth++;
6544 if (r->in.resume_handle) {
6545 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6547 ndr->depth--;
6548 ndr->depth--;
6550 if (flags & NDR_OUT) {
6551 ndr_print_struct(ndr, "out", "EnumServicesStatusExA");
6552 ndr->depth++;
6553 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6554 ndr_print_ptr(ndr, "needed", r->out.needed);
6555 ndr->depth++;
6556 ndr_print_uint32(ndr, "needed", *r->out.needed);
6557 ndr->depth--;
6558 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6559 ndr->depth++;
6560 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6561 ndr->depth--;
6562 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6563 ndr->depth++;
6564 if (r->out.resume_handle) {
6565 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6567 ndr->depth--;
6568 ndr_print_ptr(ndr, "group_name", r->out.group_name);
6569 ndr->depth++;
6570 ndr_print_ptr(ndr, "group_name", *r->out.group_name);
6571 ndr->depth++;
6572 if (*r->out.group_name) {
6573 ndr_print_string(ndr, "group_name", *r->out.group_name);
6575 ndr->depth--;
6576 ndr->depth--;
6577 ndr_print_WERROR(ndr, "result", r->out.result);
6578 ndr->depth--;
6580 ndr->depth--;
6583 static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
6585 if (flags & NDR_IN) {
6586 if (r->in.scmanager == NULL) {
6587 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6589 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6590 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6592 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
6593 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6594 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
6595 if (r->in.resume_handle) {
6596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
6598 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.group_name));
6599 if (r->in.group_name) {
6600 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6601 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6602 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
6603 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));
6606 if (flags & NDR_OUT) {
6607 if (r->out.services == NULL) {
6608 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6610 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6611 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
6612 if (r->out.needed == NULL) {
6613 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6616 if (r->out.service_returned == NULL) {
6617 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6619 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
6620 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
6621 if (r->out.resume_handle) {
6622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
6624 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6626 return NDR_ERR_SUCCESS;
6629 static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
6631 uint32_t _ptr_resume_handle;
6632 uint32_t _ptr_group_name;
6633 TALLOC_CTX *_mem_save_scmanager_0;
6634 TALLOC_CTX *_mem_save_needed_0;
6635 TALLOC_CTX *_mem_save_service_returned_0;
6636 TALLOC_CTX *_mem_save_resume_handle_0;
6637 TALLOC_CTX *_mem_save_group_name_0;
6638 if (flags & NDR_IN) {
6639 ZERO_STRUCT(r->out);
6641 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6642 NDR_PULL_ALLOC(ndr, r->in.scmanager);
6644 _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
6645 NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
6646 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
6647 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
6648 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6649 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6650 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
6651 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6652 if (r->in.offered > 0x40000) {
6653 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6655 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6656 if (_ptr_resume_handle) {
6657 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
6658 } else {
6659 r->in.resume_handle = NULL;
6661 if (r->in.resume_handle) {
6662 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6663 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
6664 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
6665 if (*r->in.resume_handle > 0x40000) {
6666 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6668 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6670 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
6671 if (_ptr_group_name) {
6672 NDR_PULL_ALLOC(ndr, r->in.group_name);
6673 } else {
6674 r->in.group_name = NULL;
6676 if (r->in.group_name) {
6677 _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6678 NDR_PULL_SET_MEM_CTX(ndr, r->in.group_name, 0);
6679 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.group_name));
6680 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.group_name));
6681 if (ndr_get_array_length(ndr, &r->in.group_name) > ndr_get_array_size(ndr, &r->in.group_name)) {
6682 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));
6684 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.group_name), sizeof(uint16_t)));
6685 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));
6686 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
6688 NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
6689 memset(r->out.services, 0, (r->in.offered) * sizeof(*r->out.services));
6690 NDR_PULL_ALLOC(ndr, r->out.needed);
6691 ZERO_STRUCTP(r->out.needed);
6692 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6693 ZERO_STRUCTP(r->out.service_returned);
6695 if (flags & NDR_OUT) {
6696 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.services));
6697 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6698 NDR_PULL_ALLOC_N(ndr, r->out.services, ndr_get_array_size(ndr, &r->out.services));
6700 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, ndr_get_array_size(ndr, &r->out.services)));
6701 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6702 NDR_PULL_ALLOC(ndr, r->out.needed);
6704 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6705 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6706 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6707 if (*r->out.needed > 0x40000) {
6708 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6711 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6712 NDR_PULL_ALLOC(ndr, r->out.service_returned);
6714 _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6715 NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
6716 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
6717 if (*r->out.service_returned > 0x40000) {
6718 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6720 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
6721 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
6722 if (_ptr_resume_handle) {
6723 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
6724 } else {
6725 r->out.resume_handle = NULL;
6727 if (r->out.resume_handle) {
6728 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6729 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
6730 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
6731 if (*r->out.resume_handle > 0x40000) {
6732 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
6736 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6737 if (r->out.services) {
6738 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.services, r->in.offered));
6741 return NDR_ERR_SUCCESS;
6744 _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r)
6746 ndr_print_struct(ndr, name, "EnumServicesStatusExW");
6747 ndr->depth++;
6748 if (flags & NDR_SET_VALUES) {
6749 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6751 if (flags & NDR_IN) {
6752 ndr_print_struct(ndr, "in", "EnumServicesStatusExW");
6753 ndr->depth++;
6754 ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
6755 ndr->depth++;
6756 ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
6757 ndr->depth--;
6758 ndr_print_uint32(ndr, "info_level", r->in.info_level);
6759 ndr_print_uint32(ndr, "type", r->in.type);
6760 ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
6761 ndr_print_uint32(ndr, "offered", r->in.offered);
6762 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
6763 ndr->depth++;
6764 if (r->in.resume_handle) {
6765 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
6767 ndr->depth--;
6768 ndr_print_ptr(ndr, "group_name", r->in.group_name);
6769 ndr->depth++;
6770 if (r->in.group_name) {
6771 ndr_print_string(ndr, "group_name", r->in.group_name);
6773 ndr->depth--;
6774 ndr->depth--;
6776 if (flags & NDR_OUT) {
6777 ndr_print_struct(ndr, "out", "EnumServicesStatusExW");
6778 ndr->depth++;
6779 ndr_print_ptr(ndr, "services", r->out.services);
6780 ndr->depth++;
6781 ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
6782 ndr->depth--;
6783 ndr_print_ptr(ndr, "needed", r->out.needed);
6784 ndr->depth++;
6785 ndr_print_uint32(ndr, "needed", *r->out.needed);
6786 ndr->depth--;
6787 ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
6788 ndr->depth++;
6789 ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
6790 ndr->depth--;
6791 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
6792 ndr->depth++;
6793 if (r->out.resume_handle) {
6794 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
6796 ndr->depth--;
6797 ndr_print_WERROR(ndr, "result", r->out.result);
6798 ndr->depth--;
6800 ndr->depth--;
6803 static enum ndr_err_code ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
6805 if (flags & NDR_IN) {
6807 if (flags & NDR_OUT) {
6808 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6810 return NDR_ERR_SUCCESS;
6813 static enum ndr_err_code ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
6815 if (flags & NDR_IN) {
6817 if (flags & NDR_OUT) {
6818 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6820 return NDR_ERR_SUCCESS;
6823 _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r)
6825 ndr_print_struct(ndr, name, "svcctl_SCSendTSMessage");
6826 ndr->depth++;
6827 if (flags & NDR_SET_VALUES) {
6828 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6830 if (flags & NDR_IN) {
6831 ndr_print_struct(ndr, "in", "svcctl_SCSendTSMessage");
6832 ndr->depth++;
6833 ndr->depth--;
6835 if (flags & NDR_OUT) {
6836 ndr_print_struct(ndr, "out", "svcctl_SCSendTSMessage");
6837 ndr->depth++;
6838 ndr_print_WERROR(ndr, "result", r->out.result);
6839 ndr->depth--;
6841 ndr->depth--;
6844 static const struct ndr_interface_call svcctl_calls[] = {
6846 "svcctl_CloseServiceHandle",
6847 sizeof(struct svcctl_CloseServiceHandle),
6848 (ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
6849 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
6850 (ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
6851 false,
6854 "svcctl_ControlService",
6855 sizeof(struct svcctl_ControlService),
6856 (ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
6857 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
6858 (ndr_print_function_t) ndr_print_svcctl_ControlService,
6859 false,
6862 "svcctl_DeleteService",
6863 sizeof(struct svcctl_DeleteService),
6864 (ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
6865 (ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
6866 (ndr_print_function_t) ndr_print_svcctl_DeleteService,
6867 false,
6870 "svcctl_LockServiceDatabase",
6871 sizeof(struct svcctl_LockServiceDatabase),
6872 (ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
6873 (ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
6874 (ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
6875 false,
6878 "svcctl_QueryServiceObjectSecurity",
6879 sizeof(struct svcctl_QueryServiceObjectSecurity),
6880 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
6881 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
6882 (ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
6883 false,
6886 "svcctl_SetServiceObjectSecurity",
6887 sizeof(struct svcctl_SetServiceObjectSecurity),
6888 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
6889 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
6890 (ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
6891 false,
6894 "svcctl_QueryServiceStatus",
6895 sizeof(struct svcctl_QueryServiceStatus),
6896 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
6897 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
6898 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
6899 false,
6902 "svcctl_SetServiceStatus",
6903 sizeof(struct svcctl_SetServiceStatus),
6904 (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
6905 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
6906 (ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
6907 false,
6910 "svcctl_UnlockServiceDatabase",
6911 sizeof(struct svcctl_UnlockServiceDatabase),
6912 (ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
6913 (ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
6914 (ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
6915 false,
6918 "svcctl_NotifyBootConfigStatus",
6919 sizeof(struct svcctl_NotifyBootConfigStatus),
6920 (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
6921 (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
6922 (ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
6923 false,
6926 "svcctl_SCSetServiceBitsW",
6927 sizeof(struct svcctl_SCSetServiceBitsW),
6928 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
6929 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
6930 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
6931 false,
6934 "svcctl_ChangeServiceConfigW",
6935 sizeof(struct svcctl_ChangeServiceConfigW),
6936 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
6937 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
6938 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
6939 false,
6942 "svcctl_CreateServiceW",
6943 sizeof(struct svcctl_CreateServiceW),
6944 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
6945 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
6946 (ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
6947 false,
6950 "svcctl_EnumDependentServicesW",
6951 sizeof(struct svcctl_EnumDependentServicesW),
6952 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
6953 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
6954 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
6955 false,
6958 "svcctl_EnumServicesStatusW",
6959 sizeof(struct svcctl_EnumServicesStatusW),
6960 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
6961 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
6962 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
6963 false,
6966 "svcctl_OpenSCManagerW",
6967 sizeof(struct svcctl_OpenSCManagerW),
6968 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
6969 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
6970 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
6971 false,
6974 "svcctl_OpenServiceW",
6975 sizeof(struct svcctl_OpenServiceW),
6976 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
6977 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
6978 (ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
6979 false,
6982 "svcctl_QueryServiceConfigW",
6983 sizeof(struct svcctl_QueryServiceConfigW),
6984 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
6985 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
6986 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
6987 false,
6990 "svcctl_QueryServiceLockStatusW",
6991 sizeof(struct svcctl_QueryServiceLockStatusW),
6992 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
6993 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
6994 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
6995 false,
6998 "svcctl_StartServiceW",
6999 sizeof(struct svcctl_StartServiceW),
7000 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
7001 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
7002 (ndr_print_function_t) ndr_print_svcctl_StartServiceW,
7003 false,
7006 "svcctl_GetServiceDisplayNameW",
7007 sizeof(struct svcctl_GetServiceDisplayNameW),
7008 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
7009 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
7010 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
7011 false,
7014 "svcctl_GetServiceKeyNameW",
7015 sizeof(struct svcctl_GetServiceKeyNameW),
7016 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
7017 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
7018 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
7019 false,
7022 "svcctl_SCSetServiceBitsA",
7023 sizeof(struct svcctl_SCSetServiceBitsA),
7024 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
7025 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
7026 (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
7027 false,
7030 "svcctl_ChangeServiceConfigA",
7031 sizeof(struct svcctl_ChangeServiceConfigA),
7032 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
7033 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
7034 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
7035 false,
7038 "svcctl_CreateServiceA",
7039 sizeof(struct svcctl_CreateServiceA),
7040 (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
7041 (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
7042 (ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
7043 false,
7046 "svcctl_EnumDependentServicesA",
7047 sizeof(struct svcctl_EnumDependentServicesA),
7048 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
7049 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
7050 (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
7051 false,
7054 "svcctl_EnumServicesStatusA",
7055 sizeof(struct svcctl_EnumServicesStatusA),
7056 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
7057 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
7058 (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
7059 false,
7062 "svcctl_OpenSCManagerA",
7063 sizeof(struct svcctl_OpenSCManagerA),
7064 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
7065 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
7066 (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
7067 false,
7070 "svcctl_OpenServiceA",
7071 sizeof(struct svcctl_OpenServiceA),
7072 (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
7073 (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
7074 (ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
7075 false,
7078 "svcctl_QueryServiceConfigA",
7079 sizeof(struct svcctl_QueryServiceConfigA),
7080 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
7081 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
7082 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
7083 false,
7086 "svcctl_QueryServiceLockStatusA",
7087 sizeof(struct svcctl_QueryServiceLockStatusA),
7088 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
7089 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
7090 (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
7091 false,
7094 "svcctl_StartServiceA",
7095 sizeof(struct svcctl_StartServiceA),
7096 (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
7097 (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
7098 (ndr_print_function_t) ndr_print_svcctl_StartServiceA,
7099 false,
7102 "svcctl_GetServiceDisplayNameA",
7103 sizeof(struct svcctl_GetServiceDisplayNameA),
7104 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
7105 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
7106 (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
7107 false,
7110 "svcctl_GetServiceKeyNameA",
7111 sizeof(struct svcctl_GetServiceKeyNameA),
7112 (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
7113 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
7114 (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
7115 false,
7118 "svcctl_GetCurrentGroupeStateW",
7119 sizeof(struct svcctl_GetCurrentGroupeStateW),
7120 (ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
7121 (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
7122 (ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
7123 false,
7126 "svcctl_EnumServiceGroupW",
7127 sizeof(struct svcctl_EnumServiceGroupW),
7128 (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
7129 (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
7130 (ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
7131 false,
7134 "svcctl_ChangeServiceConfig2A",
7135 sizeof(struct svcctl_ChangeServiceConfig2A),
7136 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
7137 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
7138 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
7139 false,
7142 "svcctl_ChangeServiceConfig2W",
7143 sizeof(struct svcctl_ChangeServiceConfig2W),
7144 (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
7145 (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
7146 (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
7147 false,
7150 "svcctl_QueryServiceConfig2A",
7151 sizeof(struct svcctl_QueryServiceConfig2A),
7152 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
7153 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
7154 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
7155 false,
7158 "svcctl_QueryServiceConfig2W",
7159 sizeof(struct svcctl_QueryServiceConfig2W),
7160 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
7161 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
7162 (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
7163 false,
7166 "svcctl_QueryServiceStatusEx",
7167 sizeof(struct svcctl_QueryServiceStatusEx),
7168 (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
7169 (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
7170 (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
7171 false,
7174 "EnumServicesStatusExA",
7175 sizeof(struct EnumServicesStatusExA),
7176 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExA,
7177 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExA,
7178 (ndr_print_function_t) ndr_print_EnumServicesStatusExA,
7179 false,
7182 "EnumServicesStatusExW",
7183 sizeof(struct EnumServicesStatusExW),
7184 (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExW,
7185 (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExW,
7186 (ndr_print_function_t) ndr_print_EnumServicesStatusExW,
7187 false,
7190 "svcctl_SCSendTSMessage",
7191 sizeof(struct svcctl_SCSendTSMessage),
7192 (ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
7193 (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
7194 (ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
7195 false,
7197 { NULL, 0, NULL, NULL, NULL, false }
7200 static const char * const svcctl_endpoint_strings[] = {
7201 "ncacn_np:[\\pipe\\svcctl]",
7202 "ncalrpc:",
7205 static const struct ndr_interface_string_array svcctl_endpoints = {
7206 .count = 2,
7207 .names = svcctl_endpoint_strings
7210 static const char * const svcctl_authservice_strings[] = {
7211 "host",
7214 static const struct ndr_interface_string_array svcctl_authservices = {
7215 .count = 1,
7216 .names = svcctl_authservice_strings
7220 const struct ndr_interface_table ndr_table_svcctl = {
7221 .name = "svcctl",
7222 .syntax_id = {
7223 {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
7224 NDR_SVCCTL_VERSION
7226 .helpstring = NDR_SVCCTL_HELPSTRING,
7227 .num_calls = 44,
7228 .calls = svcctl_calls,
7229 .endpoints = &svcctl_endpoints,
7230 .authservices = &svcctl_authservices