1 /* parser auto-generated by pidl */
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
) {
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
);
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
) {
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");
65 ndr_print_uint32(ndr
, "is_locked", r
->is_locked
);
66 ndr_print_ptr(ndr
, "lock_owner", r
->lock_owner
);
69 ndr_print_string(ndr
, "lock_owner", r
->lock_owner
);
72 ndr_print_uint32(ndr
, "lock_duration", r
->lock_duration
);
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
)
85 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &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
;
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
)
116 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &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
);
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
);
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");
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
);
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");
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
);
223 _PUBLIC_
enum ndr_err_code
ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push
*ndr
, int ndr_flags
, const struct ENUM_SERVICE_STATUSW
*r
)
225 if (ndr_flags
& NDR_SCALARS
) {
226 NDR_CHECK(ndr_push_align(ndr
, 5));
228 uint32_t _flags_save_string
= ndr
->flags
;
229 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
230 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->service_name
));
231 ndr
->flags
= _flags_save_string
;
234 uint32_t _flags_save_string
= ndr
->flags
;
235 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
236 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->display_name
));
237 ndr
->flags
= _flags_save_string
;
239 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr
, NDR_SCALARS
, &r
->status
));
240 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
242 if (ndr_flags
& NDR_BUFFERS
) {
244 uint32_t _flags_save_string
= ndr
->flags
;
245 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
246 if (r
->service_name
) {
247 NDR_CHECK(ndr_push_relative_ptr2_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
);
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
);
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
));
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
);
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
));
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
);
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 if (ndr
->offset
> ndr
->relative_highest_offset
) {
315 ndr
->relative_highest_offset
= ndr
->offset
;
317 ndr
->offset
= _relative_save_offset
;
319 ndr
->flags
= _flags_save_string
;
322 uint32_t _flags_save_string
= ndr
->flags
;
323 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
324 if (r
->display_name
) {
325 uint32_t _relative_save_offset
;
326 _relative_save_offset
= ndr
->offset
;
327 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->display_name
));
328 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
329 NDR_PULL_SET_MEM_CTX(ndr
, r
->display_name
, 0);
330 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->display_name
));
331 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
332 if (ndr
->offset
> ndr
->relative_highest_offset
) {
333 ndr
->relative_highest_offset
= ndr
->offset
;
335 ndr
->offset
= _relative_save_offset
;
337 ndr
->flags
= _flags_save_string
;
340 return NDR_ERR_SUCCESS
;
343 _PUBLIC_
void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print
*ndr
, const char *name
, const struct ENUM_SERVICE_STATUSW
*r
)
345 ndr_print_struct(ndr
, name
, "ENUM_SERVICE_STATUSW");
347 ndr_print_ptr(ndr
, "service_name", r
->service_name
);
349 if (r
->service_name
) {
350 ndr_print_string(ndr
, "service_name", r
->service_name
);
353 ndr_print_ptr(ndr
, "display_name", r
->display_name
);
355 if (r
->display_name
) {
356 ndr_print_string(ndr
, "display_name", r
->display_name
);
359 ndr_print_SERVICE_STATUS(ndr
, "status", &r
->status
);
363 _PUBLIC_
size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW
*r
, struct smb_iconv_convenience
*ic
, int flags
)
365 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_ENUM_SERVICE_STATUSW
, ic
);
368 _PUBLIC_
enum ndr_err_code
ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push
*ndr
, int ndr_flags
, const struct ENUM_SERVICE_STATUSA
*r
)
370 if (ndr_flags
& NDR_SCALARS
) {
371 NDR_CHECK(ndr_push_align(ndr
, 5));
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
->service_name
));
376 ndr
->flags
= _flags_save_string
;
379 uint32_t _flags_save_string
= ndr
->flags
;
380 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
381 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->display_name
));
382 ndr
->flags
= _flags_save_string
;
384 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr
, NDR_SCALARS
, &r
->status
));
385 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
387 if (ndr_flags
& NDR_BUFFERS
) {
389 uint32_t _flags_save_string
= ndr
->flags
;
390 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
391 if (r
->service_name
) {
392 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->service_name
));
393 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->service_name
));
394 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->service_name
));
396 ndr
->flags
= _flags_save_string
;
399 uint32_t _flags_save_string
= ndr
->flags
;
400 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
401 if (r
->display_name
) {
402 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->display_name
));
403 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->display_name
));
404 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->display_name
));
406 ndr
->flags
= _flags_save_string
;
409 return NDR_ERR_SUCCESS
;
412 _PUBLIC_
enum ndr_err_code
ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull
*ndr
, int ndr_flags
, struct ENUM_SERVICE_STATUSA
*r
)
414 uint32_t _ptr_service_name
;
415 TALLOC_CTX
*_mem_save_service_name_0
;
416 uint32_t _ptr_display_name
;
417 TALLOC_CTX
*_mem_save_display_name_0
;
418 if (ndr_flags
& NDR_SCALARS
) {
419 NDR_CHECK(ndr_pull_align(ndr
, 5));
421 uint32_t _flags_save_string
= ndr
->flags
;
422 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
423 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_name
));
424 if (_ptr_service_name
) {
425 NDR_PULL_ALLOC(ndr
, r
->service_name
);
426 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->service_name
, _ptr_service_name
));
428 r
->service_name
= NULL
;
430 ndr
->flags
= _flags_save_string
;
433 uint32_t _flags_save_string
= ndr
->flags
;
434 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
435 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
436 if (_ptr_display_name
) {
437 NDR_PULL_ALLOC(ndr
, r
->display_name
);
438 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->display_name
, _ptr_display_name
));
440 r
->display_name
= NULL
;
442 ndr
->flags
= _flags_save_string
;
444 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr
, NDR_SCALARS
, &r
->status
));
445 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
447 if (ndr_flags
& NDR_BUFFERS
) {
449 uint32_t _flags_save_string
= ndr
->flags
;
450 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
451 if (r
->service_name
) {
452 uint32_t _relative_save_offset
;
453 _relative_save_offset
= ndr
->offset
;
454 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->service_name
));
455 _mem_save_service_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
456 NDR_PULL_SET_MEM_CTX(ndr
, r
->service_name
, 0);
457 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->service_name
));
458 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_name_0
, 0);
459 if (ndr
->offset
> ndr
->relative_highest_offset
) {
460 ndr
->relative_highest_offset
= ndr
->offset
;
462 ndr
->offset
= _relative_save_offset
;
464 ndr
->flags
= _flags_save_string
;
467 uint32_t _flags_save_string
= ndr
->flags
;
468 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
469 if (r
->display_name
) {
470 uint32_t _relative_save_offset
;
471 _relative_save_offset
= ndr
->offset
;
472 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->display_name
));
473 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
474 NDR_PULL_SET_MEM_CTX(ndr
, r
->display_name
, 0);
475 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->display_name
));
476 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
477 if (ndr
->offset
> ndr
->relative_highest_offset
) {
478 ndr
->relative_highest_offset
= ndr
->offset
;
480 ndr
->offset
= _relative_save_offset
;
482 ndr
->flags
= _flags_save_string
;
485 return NDR_ERR_SUCCESS
;
488 _PUBLIC_
void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print
*ndr
, const char *name
, const struct ENUM_SERVICE_STATUSA
*r
)
490 ndr_print_struct(ndr
, name
, "ENUM_SERVICE_STATUSA");
492 ndr_print_ptr(ndr
, "service_name", r
->service_name
);
494 if (r
->service_name
) {
495 ndr_print_string(ndr
, "service_name", r
->service_name
);
498 ndr_print_ptr(ndr
, "display_name", r
->display_name
);
500 if (r
->display_name
) {
501 ndr_print_string(ndr
, "display_name", r
->display_name
);
504 ndr_print_SERVICE_STATUS(ndr
, "status", &r
->status
);
508 _PUBLIC_
size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA
*r
, struct smb_iconv_convenience
*ic
, int flags
)
510 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_ENUM_SERVICE_STATUSA
, ic
);
513 _PUBLIC_
enum ndr_err_code
ndr_push_svcctl_ServerType(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
515 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
516 return NDR_ERR_SUCCESS
;
519 _PUBLIC_
enum ndr_err_code
ndr_pull_svcctl_ServerType(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
522 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
524 return NDR_ERR_SUCCESS
;
527 _PUBLIC_
void ndr_print_svcctl_ServerType(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
529 ndr_print_uint32(ndr
, name
, r
);
531 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_WORKSTATION", SV_TYPE_WORKSTATION
, r
);
532 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_SERVER", SV_TYPE_SERVER
, r
);
533 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_SQLSERVER", SV_TYPE_SQLSERVER
, r
);
534 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_DOMAIN_CTRL", SV_TYPE_DOMAIN_CTRL
, r
);
535 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_DOMAIN_BAKCTRL", SV_TYPE_DOMAIN_BAKCTRL
, r
);
536 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_TIME_SOURCE", SV_TYPE_TIME_SOURCE
, r
);
537 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_AFP", SV_TYPE_AFP
, r
);
538 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_NOVELL", SV_TYPE_NOVELL
, r
);
539 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_DOMAIN_MEMBER", SV_TYPE_DOMAIN_MEMBER
, r
);
540 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_PRINTQ_SERVER", SV_TYPE_PRINTQ_SERVER
, r
);
541 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_DIALIN_SERVER", SV_TYPE_DIALIN_SERVER
, r
);
542 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_SERVER_UNIX", SV_TYPE_SERVER_UNIX
, r
);
543 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_NT", SV_TYPE_NT
, r
);
544 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_WFW", SV_TYPE_WFW
, r
);
545 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_SERVER_MFPN", SV_TYPE_SERVER_MFPN
, r
);
546 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_SERVER_NT", SV_TYPE_SERVER_NT
, r
);
547 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_POTENTIAL_BROWSER", SV_TYPE_POTENTIAL_BROWSER
, r
);
548 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_BACKUP_BROWSER", SV_TYPE_BACKUP_BROWSER
, r
);
549 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_MASTER_BROWSER", SV_TYPE_MASTER_BROWSER
, r
);
550 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_DOMAIN_MASTER", SV_TYPE_DOMAIN_MASTER
, r
);
551 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_SERVER_OSF", SV_TYPE_SERVER_OSF
, r
);
552 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_SERVER_VMS", SV_TYPE_SERVER_VMS
, r
);
553 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_WIN95_PLUS", SV_TYPE_WIN95_PLUS
, r
);
554 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_DFS_SERVER", SV_TYPE_DFS_SERVER
, r
);
555 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_ALTERNATE_XPORT", SV_TYPE_ALTERNATE_XPORT
, r
);
556 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_LOCAL_LIST_ONLY", SV_TYPE_LOCAL_LIST_ONLY
, r
);
557 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SV_TYPE_DOMAIN_ENUM", SV_TYPE_DOMAIN_ENUM
, r
);
561 static enum ndr_err_code
ndr_push_SERVICE_CONTROL(struct ndr_push
*ndr
, int ndr_flags
, enum SERVICE_CONTROL r
)
563 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
564 return NDR_ERR_SUCCESS
;
567 static enum ndr_err_code
ndr_pull_SERVICE_CONTROL(struct ndr_pull
*ndr
, int ndr_flags
, enum SERVICE_CONTROL
*r
)
570 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
572 return NDR_ERR_SUCCESS
;
575 _PUBLIC_
void ndr_print_SERVICE_CONTROL(struct ndr_print
*ndr
, const char *name
, enum SERVICE_CONTROL r
)
577 const char *val
= NULL
;
580 case SVCCTL_CONTROL_STOP
: val
= "SVCCTL_CONTROL_STOP"; break;
581 case SVCCTL_CONTROL_PAUSE
: val
= "SVCCTL_CONTROL_PAUSE"; break;
582 case SVCCTL_CONTROL_CONTINUE
: val
= "SVCCTL_CONTROL_CONTINUE"; break;
583 case SVCCTL_CONTROL_INTERROGATE
: val
= "SVCCTL_CONTROL_INTERROGATE"; break;
584 case SVCCTL_CONTROL_SHUTDOWN
: val
= "SVCCTL_CONTROL_SHUTDOWN"; break;
586 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
589 static enum ndr_err_code
ndr_push_svcctl_ErrorControl(struct ndr_push
*ndr
, int ndr_flags
, enum svcctl_ErrorControl r
)
591 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
592 return NDR_ERR_SUCCESS
;
595 static enum ndr_err_code
ndr_pull_svcctl_ErrorControl(struct ndr_pull
*ndr
, int ndr_flags
, enum svcctl_ErrorControl
*r
)
598 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
600 return NDR_ERR_SUCCESS
;
603 _PUBLIC_
void ndr_print_svcctl_ErrorControl(struct ndr_print
*ndr
, const char *name
, enum svcctl_ErrorControl r
)
605 const char *val
= NULL
;
608 case SVCCTL_SVC_ERROR_IGNORE
: val
= "SVCCTL_SVC_ERROR_IGNORE"; break;
609 case SVCCTL_SVC_ERROR_NORMAL
: val
= "SVCCTL_SVC_ERROR_NORMAL"; break;
610 case SVCCTL_SVC_ERROR_CRITICAL
: val
= "SVCCTL_SVC_ERROR_CRITICAL"; break;
611 case SVCCTL_SVC_ERROR_SEVERE
: val
= "SVCCTL_SVC_ERROR_SEVERE"; break;
613 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
616 static enum ndr_err_code
ndr_push_svcctl_StartType(struct ndr_push
*ndr
, int ndr_flags
, enum svcctl_StartType r
)
618 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
619 return NDR_ERR_SUCCESS
;
622 static enum ndr_err_code
ndr_pull_svcctl_StartType(struct ndr_pull
*ndr
, int ndr_flags
, enum svcctl_StartType
*r
)
625 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
627 return NDR_ERR_SUCCESS
;
630 _PUBLIC_
void ndr_print_svcctl_StartType(struct ndr_print
*ndr
, const char *name
, enum svcctl_StartType r
)
632 const char *val
= NULL
;
635 case SVCCTL_BOOT_START
: val
= "SVCCTL_BOOT_START"; break;
636 case SVCCTL_SYSTEM_START
: val
= "SVCCTL_SYSTEM_START"; break;
637 case SVCCTL_AUTO_START
: val
= "SVCCTL_AUTO_START"; break;
638 case SVCCTL_DEMAND_START
: val
= "SVCCTL_DEMAND_START"; break;
639 case SVCCTL_DISABLED
: val
= "SVCCTL_DISABLED"; break;
641 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
644 static enum ndr_err_code
ndr_push_svcctl_ServiceState(struct ndr_push
*ndr
, int ndr_flags
, enum svcctl_ServiceState r
)
646 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
647 return NDR_ERR_SUCCESS
;
650 static enum ndr_err_code
ndr_pull_svcctl_ServiceState(struct ndr_pull
*ndr
, int ndr_flags
, enum svcctl_ServiceState
*r
)
653 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
655 return NDR_ERR_SUCCESS
;
658 _PUBLIC_
void ndr_print_svcctl_ServiceState(struct ndr_print
*ndr
, const char *name
, enum svcctl_ServiceState r
)
660 const char *val
= NULL
;
663 case SERVICE_STATE_ACTIVE
: val
= "SERVICE_STATE_ACTIVE"; break;
664 case SERVICE_STATE_INACTIVE
: val
= "SERVICE_STATE_INACTIVE"; break;
665 case SERVICE_STATE_ALL
: val
= "SERVICE_STATE_ALL"; break;
667 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
670 static enum ndr_err_code
ndr_push_svcctl_MgrAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
672 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
673 return NDR_ERR_SUCCESS
;
676 static enum ndr_err_code
ndr_pull_svcctl_MgrAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
679 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
681 return NDR_ERR_SUCCESS
;
684 _PUBLIC_
void ndr_print_svcctl_MgrAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
686 ndr_print_uint32(ndr
, name
, r
);
688 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_MGR_CONNECT", SC_RIGHT_MGR_CONNECT
, r
);
689 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_MGR_CREATE_SERVICE", SC_RIGHT_MGR_CREATE_SERVICE
, r
);
690 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_MGR_ENUMERATE_SERVICE", SC_RIGHT_MGR_ENUMERATE_SERVICE
, r
);
691 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_MGR_LOCK", SC_RIGHT_MGR_LOCK
, r
);
692 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_MGR_QUERY_LOCK_STATUS", SC_RIGHT_MGR_QUERY_LOCK_STATUS
, r
);
693 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_MGR_MODIFY_BOOT_CONFIG", SC_RIGHT_MGR_MODIFY_BOOT_CONFIG
, r
);
697 static enum ndr_err_code
ndr_push_svcctl_ServiceAccessMask(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
700 return NDR_ERR_SUCCESS
;
703 static enum ndr_err_code
ndr_pull_svcctl_ServiceAccessMask(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
706 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
708 return NDR_ERR_SUCCESS
;
711 _PUBLIC_
void ndr_print_svcctl_ServiceAccessMask(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
713 ndr_print_uint32(ndr
, name
, r
);
715 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_CONFIG", SC_RIGHT_SVC_QUERY_CONFIG
, r
);
716 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_CHANGE_CONFIG", SC_RIGHT_SVC_CHANGE_CONFIG
, r
);
717 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_STATUS", SC_RIGHT_SVC_QUERY_STATUS
, r
);
718 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_ENUMERATE_DEPENDENTS", SC_RIGHT_SVC_ENUMERATE_DEPENDENTS
, r
);
719 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_START", SC_RIGHT_SVC_START
, r
);
720 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_STOP", SC_RIGHT_SVC_STOP
, r
);
721 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_PAUSE_CONTINUE", SC_RIGHT_SVC_PAUSE_CONTINUE
, r
);
722 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_INTERROGATE", SC_RIGHT_SVC_INTERROGATE
, r
);
723 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SC_RIGHT_SVC_USER_DEFINED_CONTROL", SC_RIGHT_SVC_USER_DEFINED_CONTROL
, r
);
727 _PUBLIC_
enum ndr_err_code
ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push
*ndr
, int ndr_flags
, const struct QUERY_SERVICE_CONFIG
*r
)
729 if (ndr_flags
& NDR_SCALARS
) {
730 NDR_CHECK(ndr_push_align(ndr
, 5));
731 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->service_type
));
732 NDR_CHECK(ndr_push_svcctl_StartType(ndr
, NDR_SCALARS
, r
->start_type
));
733 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr
, NDR_SCALARS
, r
->error_control
));
734 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->executablepath
));
735 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->loadordergroup
));
736 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->tag_id
));
737 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependencies
));
738 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->startname
));
739 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->displayname
));
740 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
742 if (ndr_flags
& NDR_BUFFERS
) {
743 if (r
->executablepath
) {
744 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->executablepath
, 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
->executablepath
, CH_UTF16
)));
747 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->executablepath
, ndr_charset_length(r
->executablepath
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
749 if (r
->loadordergroup
) {
750 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->loadordergroup
, 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
->loadordergroup
, CH_UTF16
)));
753 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->loadordergroup
, ndr_charset_length(r
->loadordergroup
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
755 if (r
->dependencies
) {
756 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->dependencies
, 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
->dependencies
, CH_UTF16
)));
759 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->dependencies
, ndr_charset_length(r
->dependencies
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
762 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->startname
, CH_UTF16
)));
763 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
764 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->startname
, CH_UTF16
)));
765 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->startname
, ndr_charset_length(r
->startname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
767 if (r
->displayname
) {
768 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->displayname
, CH_UTF16
)));
769 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
770 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->displayname
, CH_UTF16
)));
771 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->displayname
, ndr_charset_length(r
->displayname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
774 return NDR_ERR_SUCCESS
;
777 _PUBLIC_
enum ndr_err_code
ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull
*ndr
, int ndr_flags
, struct QUERY_SERVICE_CONFIG
*r
)
779 uint32_t _ptr_executablepath
;
780 TALLOC_CTX
*_mem_save_executablepath_0
;
781 uint32_t _ptr_loadordergroup
;
782 TALLOC_CTX
*_mem_save_loadordergroup_0
;
783 uint32_t _ptr_dependencies
;
784 TALLOC_CTX
*_mem_save_dependencies_0
;
785 uint32_t _ptr_startname
;
786 TALLOC_CTX
*_mem_save_startname_0
;
787 uint32_t _ptr_displayname
;
788 TALLOC_CTX
*_mem_save_displayname_0
;
789 if (ndr_flags
& NDR_SCALARS
) {
790 NDR_CHECK(ndr_pull_align(ndr
, 5));
791 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->service_type
));
792 NDR_CHECK(ndr_pull_svcctl_StartType(ndr
, NDR_SCALARS
, &r
->start_type
));
793 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr
, NDR_SCALARS
, &r
->error_control
));
794 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_executablepath
));
795 if (_ptr_executablepath
) {
796 NDR_PULL_ALLOC(ndr
, r
->executablepath
);
798 r
->executablepath
= NULL
;
800 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_loadordergroup
));
801 if (_ptr_loadordergroup
) {
802 NDR_PULL_ALLOC(ndr
, r
->loadordergroup
);
804 r
->loadordergroup
= NULL
;
806 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->tag_id
));
807 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependencies
));
808 if (_ptr_dependencies
) {
809 NDR_PULL_ALLOC(ndr
, r
->dependencies
);
811 r
->dependencies
= NULL
;
813 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_startname
));
814 if (_ptr_startname
) {
815 NDR_PULL_ALLOC(ndr
, r
->startname
);
819 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_displayname
));
820 if (_ptr_displayname
) {
821 NDR_PULL_ALLOC(ndr
, r
->displayname
);
823 r
->displayname
= NULL
;
825 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
827 if (ndr_flags
& NDR_BUFFERS
) {
828 if (r
->executablepath
) {
829 _mem_save_executablepath_0
= NDR_PULL_GET_MEM_CTX(ndr
);
830 NDR_PULL_SET_MEM_CTX(ndr
, r
->executablepath
, 0);
831 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->executablepath
));
832 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->executablepath
));
833 if (ndr_get_array_length(ndr
, &r
->executablepath
) > ndr_get_array_size(ndr
, &r
->executablepath
)) {
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
->executablepath
), ndr_get_array_length(ndr
, &r
->executablepath
));
836 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->executablepath
), sizeof(uint16_t)));
837 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->executablepath
, ndr_get_array_length(ndr
, &r
->executablepath
), sizeof(uint16_t), CH_UTF16
));
838 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_executablepath_0
, 0);
840 if (r
->loadordergroup
) {
841 _mem_save_loadordergroup_0
= NDR_PULL_GET_MEM_CTX(ndr
);
842 NDR_PULL_SET_MEM_CTX(ndr
, r
->loadordergroup
, 0);
843 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->loadordergroup
));
844 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->loadordergroup
));
845 if (ndr_get_array_length(ndr
, &r
->loadordergroup
) > ndr_get_array_size(ndr
, &r
->loadordergroup
)) {
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
->loadordergroup
), ndr_get_array_length(ndr
, &r
->loadordergroup
));
848 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->loadordergroup
), sizeof(uint16_t)));
849 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->loadordergroup
, ndr_get_array_length(ndr
, &r
->loadordergroup
), sizeof(uint16_t), CH_UTF16
));
850 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_loadordergroup_0
, 0);
852 if (r
->dependencies
) {
853 _mem_save_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
854 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependencies
, 0);
855 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->dependencies
));
856 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->dependencies
));
857 if (ndr_get_array_length(ndr
, &r
->dependencies
) > ndr_get_array_size(ndr
, &r
->dependencies
)) {
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
->dependencies
), ndr_get_array_length(ndr
, &r
->dependencies
));
860 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->dependencies
), sizeof(uint16_t)));
861 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->dependencies
, ndr_get_array_length(ndr
, &r
->dependencies
), sizeof(uint16_t), CH_UTF16
));
862 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependencies_0
, 0);
865 _mem_save_startname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
866 NDR_PULL_SET_MEM_CTX(ndr
, r
->startname
, 0);
867 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->startname
));
868 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->startname
));
869 if (ndr_get_array_length(ndr
, &r
->startname
) > ndr_get_array_size(ndr
, &r
->startname
)) {
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
->startname
), ndr_get_array_length(ndr
, &r
->startname
));
872 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->startname
), sizeof(uint16_t)));
873 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->startname
, ndr_get_array_length(ndr
, &r
->startname
), sizeof(uint16_t), CH_UTF16
));
874 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_startname_0
, 0);
876 if (r
->displayname
) {
877 _mem_save_displayname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
878 NDR_PULL_SET_MEM_CTX(ndr
, r
->displayname
, 0);
879 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->displayname
));
880 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->displayname
));
881 if (ndr_get_array_length(ndr
, &r
->displayname
) > ndr_get_array_size(ndr
, &r
->displayname
)) {
882 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
));
884 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->displayname
), sizeof(uint16_t)));
885 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->displayname
, ndr_get_array_length(ndr
, &r
->displayname
), sizeof(uint16_t), CH_UTF16
));
886 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_displayname_0
, 0);
889 return NDR_ERR_SUCCESS
;
892 _PUBLIC_
void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print
*ndr
, const char *name
, const struct QUERY_SERVICE_CONFIG
*r
)
894 ndr_print_struct(ndr
, name
, "QUERY_SERVICE_CONFIG");
896 ndr_print_uint32(ndr
, "service_type", r
->service_type
);
897 ndr_print_svcctl_StartType(ndr
, "start_type", r
->start_type
);
898 ndr_print_svcctl_ErrorControl(ndr
, "error_control", r
->error_control
);
899 ndr_print_ptr(ndr
, "executablepath", r
->executablepath
);
901 if (r
->executablepath
) {
902 ndr_print_string(ndr
, "executablepath", r
->executablepath
);
905 ndr_print_ptr(ndr
, "loadordergroup", r
->loadordergroup
);
907 if (r
->loadordergroup
) {
908 ndr_print_string(ndr
, "loadordergroup", r
->loadordergroup
);
911 ndr_print_uint32(ndr
, "tag_id", r
->tag_id
);
912 ndr_print_ptr(ndr
, "dependencies", r
->dependencies
);
914 if (r
->dependencies
) {
915 ndr_print_string(ndr
, "dependencies", r
->dependencies
);
918 ndr_print_ptr(ndr
, "startname", r
->startname
);
921 ndr_print_string(ndr
, "startname", r
->startname
);
924 ndr_print_ptr(ndr
, "displayname", r
->displayname
);
926 if (r
->displayname
) {
927 ndr_print_string(ndr
, "displayname", r
->displayname
);
933 _PUBLIC_
size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG
*r
, struct smb_iconv_convenience
*ic
, int flags
)
935 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_QUERY_SERVICE_CONFIG
, ic
);
938 static enum ndr_err_code
ndr_push_svcctl_ArgumentString(struct ndr_push
*ndr
, int ndr_flags
, const struct svcctl_ArgumentString
*r
)
940 if (ndr_flags
& NDR_SCALARS
) {
941 NDR_CHECK(ndr_push_align(ndr
, 5));
942 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
943 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
945 if (ndr_flags
& NDR_BUFFERS
) {
947 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string
, CH_UTF16
)));
948 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
949 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->string
, CH_UTF16
)));
950 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, ndr_charset_length(r
->string
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
953 return NDR_ERR_SUCCESS
;
956 static enum ndr_err_code
ndr_pull_svcctl_ArgumentString(struct ndr_pull
*ndr
, int ndr_flags
, struct svcctl_ArgumentString
*r
)
958 uint32_t _ptr_string
;
959 TALLOC_CTX
*_mem_save_string_0
;
960 if (ndr_flags
& NDR_SCALARS
) {
961 NDR_CHECK(ndr_pull_align(ndr
, 5));
962 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
964 NDR_PULL_ALLOC(ndr
, r
->string
);
968 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
970 if (ndr_flags
& NDR_BUFFERS
) {
972 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
973 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
974 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
975 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->string
));
976 if (ndr_get_array_length(ndr
, &r
->string
) > ndr_get_array_size(ndr
, &r
->string
)) {
977 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
));
979 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint16_t)));
980 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_length(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
981 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
984 return NDR_ERR_SUCCESS
;
987 _PUBLIC_
void ndr_print_svcctl_ArgumentString(struct ndr_print
*ndr
, const char *name
, const struct svcctl_ArgumentString
*r
)
989 ndr_print_struct(ndr
, name
, "svcctl_ArgumentString");
991 ndr_print_ptr(ndr
, "string", r
->string
);
994 ndr_print_string(ndr
, "string", r
->string
);
1000 static enum ndr_err_code
ndr_push_svcctl_ConfigLevel(struct ndr_push
*ndr
, int ndr_flags
, enum svcctl_ConfigLevel r
)
1002 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1003 return NDR_ERR_SUCCESS
;
1006 static enum ndr_err_code
ndr_pull_svcctl_ConfigLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum svcctl_ConfigLevel
*r
)
1009 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1011 return NDR_ERR_SUCCESS
;
1014 _PUBLIC_
void ndr_print_svcctl_ConfigLevel(struct ndr_print
*ndr
, const char *name
, enum svcctl_ConfigLevel r
)
1016 const char *val
= NULL
;
1019 case SERVICE_CONFIG_DESCRIPTION
: val
= "SERVICE_CONFIG_DESCRIPTION"; break;
1020 case SERVICE_CONFIG_FAILURE_ACTIONS
: val
= "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
1022 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1025 _PUBLIC_
enum ndr_err_code
ndr_push_SERVICE_DESCRIPTION(struct ndr_push
*ndr
, int ndr_flags
, const struct SERVICE_DESCRIPTION
*r
)
1027 if (ndr_flags
& NDR_SCALARS
) {
1028 NDR_CHECK(ndr_push_align(ndr
, 5));
1030 uint32_t _flags_save_string
= ndr
->flags
;
1031 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1032 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->description
));
1033 ndr
->flags
= _flags_save_string
;
1035 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1037 if (ndr_flags
& NDR_BUFFERS
) {
1039 uint32_t _flags_save_string
= ndr
->flags
;
1040 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1041 if (r
->description
) {
1042 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->description
));
1043 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->description
));
1044 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->description
));
1046 ndr
->flags
= _flags_save_string
;
1049 return NDR_ERR_SUCCESS
;
1052 _PUBLIC_
enum ndr_err_code
ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull
*ndr
, int ndr_flags
, struct SERVICE_DESCRIPTION
*r
)
1054 uint32_t _ptr_description
;
1055 TALLOC_CTX
*_mem_save_description_0
;
1056 if (ndr_flags
& NDR_SCALARS
) {
1057 NDR_CHECK(ndr_pull_align(ndr
, 5));
1059 uint32_t _flags_save_string
= ndr
->flags
;
1060 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1061 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_description
));
1062 if (_ptr_description
) {
1063 NDR_PULL_ALLOC(ndr
, r
->description
);
1064 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->description
, _ptr_description
));
1066 r
->description
= NULL
;
1068 ndr
->flags
= _flags_save_string
;
1070 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1072 if (ndr_flags
& NDR_BUFFERS
) {
1074 uint32_t _flags_save_string
= ndr
->flags
;
1075 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1076 if (r
->description
) {
1077 uint32_t _relative_save_offset
;
1078 _relative_save_offset
= ndr
->offset
;
1079 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->description
));
1080 _mem_save_description_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1081 NDR_PULL_SET_MEM_CTX(ndr
, r
->description
, 0);
1082 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->description
));
1083 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_description_0
, 0);
1084 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1085 ndr
->relative_highest_offset
= ndr
->offset
;
1087 ndr
->offset
= _relative_save_offset
;
1089 ndr
->flags
= _flags_save_string
;
1092 return NDR_ERR_SUCCESS
;
1095 _PUBLIC_
void ndr_print_SERVICE_DESCRIPTION(struct ndr_print
*ndr
, const char *name
, const struct SERVICE_DESCRIPTION
*r
)
1097 ndr_print_struct(ndr
, name
, "SERVICE_DESCRIPTION");
1099 ndr_print_ptr(ndr
, "description", r
->description
);
1101 if (r
->description
) {
1102 ndr_print_string(ndr
, "description", r
->description
);
1108 _PUBLIC_
size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1110 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_SERVICE_DESCRIPTION
, ic
);
1113 static enum ndr_err_code
ndr_push_SC_ACTION_TYPE(struct ndr_push
*ndr
, int ndr_flags
, enum SC_ACTION_TYPE r
)
1115 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1116 return NDR_ERR_SUCCESS
;
1119 static enum ndr_err_code
ndr_pull_SC_ACTION_TYPE(struct ndr_pull
*ndr
, int ndr_flags
, enum SC_ACTION_TYPE
*r
)
1122 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1124 return NDR_ERR_SUCCESS
;
1127 _PUBLIC_
void ndr_print_SC_ACTION_TYPE(struct ndr_print
*ndr
, const char *name
, enum SC_ACTION_TYPE r
)
1129 const char *val
= NULL
;
1132 case SC_ACTION_NONE
: val
= "SC_ACTION_NONE"; break;
1133 case SC_ACTION_RESTART
: val
= "SC_ACTION_RESTART"; break;
1134 case SC_ACTION_REBOOT
: val
= "SC_ACTION_REBOOT"; break;
1135 case SC_ACTION_RUN_COMMAND
: val
= "SC_ACTION_RUN_COMMAND"; break;
1137 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1140 static enum ndr_err_code
ndr_push_SC_ACTION(struct ndr_push
*ndr
, int ndr_flags
, const struct SC_ACTION
*r
)
1142 if (ndr_flags
& NDR_SCALARS
) {
1143 NDR_CHECK(ndr_push_align(ndr
, 4));
1144 NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr
, NDR_SCALARS
, r
->type
));
1145 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->delay
));
1146 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1148 if (ndr_flags
& NDR_BUFFERS
) {
1150 return NDR_ERR_SUCCESS
;
1153 static enum ndr_err_code
ndr_pull_SC_ACTION(struct ndr_pull
*ndr
, int ndr_flags
, struct SC_ACTION
*r
)
1155 if (ndr_flags
& NDR_SCALARS
) {
1156 NDR_CHECK(ndr_pull_align(ndr
, 4));
1157 NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr
, NDR_SCALARS
, &r
->type
));
1158 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->delay
));
1159 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1161 if (ndr_flags
& NDR_BUFFERS
) {
1163 return NDR_ERR_SUCCESS
;
1166 _PUBLIC_
void ndr_print_SC_ACTION(struct ndr_print
*ndr
, const char *name
, const struct SC_ACTION
*r
)
1168 ndr_print_struct(ndr
, name
, "SC_ACTION");
1170 ndr_print_SC_ACTION_TYPE(ndr
, "type", r
->type
);
1171 ndr_print_uint32(ndr
, "delay", r
->delay
);
1175 _PUBLIC_
enum ndr_err_code
ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push
*ndr
, int ndr_flags
, const struct SERVICE_FAILURE_ACTIONS
*r
)
1177 uint32_t cntr_actions_1
;
1178 if (ndr_flags
& NDR_SCALARS
) {
1179 NDR_CHECK(ndr_push_align(ndr
, 5));
1180 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reset_period
));
1182 uint32_t _flags_save_string
= ndr
->flags
;
1183 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1184 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->rebootmsg
));
1185 ndr
->flags
= _flags_save_string
;
1188 uint32_t _flags_save_string
= ndr
->flags
;
1189 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1190 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->command
));
1191 ndr
->flags
= _flags_save_string
;
1193 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_actions
));
1194 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->actions
));
1195 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1197 if (ndr_flags
& NDR_BUFFERS
) {
1199 uint32_t _flags_save_string
= ndr
->flags
;
1200 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1202 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->rebootmsg
));
1203 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->rebootmsg
));
1204 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->rebootmsg
));
1206 ndr
->flags
= _flags_save_string
;
1209 uint32_t _flags_save_string
= ndr
->flags
;
1210 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1212 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->command
));
1213 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->command
));
1214 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->command
));
1216 ndr
->flags
= _flags_save_string
;
1219 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->actions
));
1220 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->num_actions
));
1221 for (cntr_actions_1
= 0; cntr_actions_1
< r
->num_actions
; cntr_actions_1
++) {
1222 NDR_CHECK(ndr_push_SC_ACTION(ndr
, NDR_SCALARS
, &r
->actions
[cntr_actions_1
]));
1224 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->actions
));
1227 return NDR_ERR_SUCCESS
;
1230 _PUBLIC_
enum ndr_err_code
ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull
*ndr
, int ndr_flags
, struct SERVICE_FAILURE_ACTIONS
*r
)
1232 uint32_t _ptr_rebootmsg
;
1233 TALLOC_CTX
*_mem_save_rebootmsg_0
;
1234 uint32_t _ptr_command
;
1235 TALLOC_CTX
*_mem_save_command_0
;
1236 uint32_t _ptr_actions
;
1237 uint32_t cntr_actions_1
;
1238 TALLOC_CTX
*_mem_save_actions_0
;
1239 TALLOC_CTX
*_mem_save_actions_1
;
1240 if (ndr_flags
& NDR_SCALARS
) {
1241 NDR_CHECK(ndr_pull_align(ndr
, 5));
1242 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reset_period
));
1244 uint32_t _flags_save_string
= ndr
->flags
;
1245 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1246 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_rebootmsg
));
1247 if (_ptr_rebootmsg
) {
1248 NDR_PULL_ALLOC(ndr
, r
->rebootmsg
);
1249 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->rebootmsg
, _ptr_rebootmsg
));
1251 r
->rebootmsg
= NULL
;
1253 ndr
->flags
= _flags_save_string
;
1256 uint32_t _flags_save_string
= ndr
->flags
;
1257 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1258 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_command
));
1260 NDR_PULL_ALLOC(ndr
, r
->command
);
1261 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->command
, _ptr_command
));
1265 ndr
->flags
= _flags_save_string
;
1267 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_actions
));
1268 if (r
->num_actions
> 1024) {
1269 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1271 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_actions
));
1273 NDR_PULL_ALLOC(ndr
, r
->actions
);
1274 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->actions
, _ptr_actions
));
1278 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1280 if (ndr_flags
& NDR_BUFFERS
) {
1282 uint32_t _flags_save_string
= ndr
->flags
;
1283 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1285 uint32_t _relative_save_offset
;
1286 _relative_save_offset
= ndr
->offset
;
1287 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->rebootmsg
));
1288 _mem_save_rebootmsg_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1289 NDR_PULL_SET_MEM_CTX(ndr
, r
->rebootmsg
, 0);
1290 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->rebootmsg
));
1291 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_rebootmsg_0
, 0);
1292 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1293 ndr
->relative_highest_offset
= ndr
->offset
;
1295 ndr
->offset
= _relative_save_offset
;
1297 ndr
->flags
= _flags_save_string
;
1300 uint32_t _flags_save_string
= ndr
->flags
;
1301 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1303 uint32_t _relative_save_offset
;
1304 _relative_save_offset
= ndr
->offset
;
1305 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->command
));
1306 _mem_save_command_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1307 NDR_PULL_SET_MEM_CTX(ndr
, r
->command
, 0);
1308 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->command
));
1309 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_command_0
, 0);
1310 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1311 ndr
->relative_highest_offset
= ndr
->offset
;
1313 ndr
->offset
= _relative_save_offset
;
1315 ndr
->flags
= _flags_save_string
;
1318 uint32_t _relative_save_offset
;
1319 _relative_save_offset
= ndr
->offset
;
1320 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->actions
));
1321 _mem_save_actions_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1322 NDR_PULL_SET_MEM_CTX(ndr
, r
->actions
, 0);
1323 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->actions
));
1324 NDR_PULL_ALLOC_N(ndr
, r
->actions
, ndr_get_array_size(ndr
, &r
->actions
));
1325 _mem_save_actions_1
= NDR_PULL_GET_MEM_CTX(ndr
);
1326 NDR_PULL_SET_MEM_CTX(ndr
, r
->actions
, 0);
1327 for (cntr_actions_1
= 0; cntr_actions_1
< r
->num_actions
; cntr_actions_1
++) {
1328 NDR_CHECK(ndr_pull_SC_ACTION(ndr
, NDR_SCALARS
, &r
->actions
[cntr_actions_1
]));
1330 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_actions_1
, 0);
1331 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_actions_0
, 0);
1332 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1333 ndr
->relative_highest_offset
= ndr
->offset
;
1335 ndr
->offset
= _relative_save_offset
;
1338 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->actions
, r
->num_actions
));
1341 return NDR_ERR_SUCCESS
;
1344 _PUBLIC_
void ndr_print_SERVICE_FAILURE_ACTIONS(struct ndr_print
*ndr
, const char *name
, const struct SERVICE_FAILURE_ACTIONS
*r
)
1346 uint32_t cntr_actions_1
;
1347 ndr_print_struct(ndr
, name
, "SERVICE_FAILURE_ACTIONS");
1349 ndr_print_uint32(ndr
, "reset_period", r
->reset_period
);
1350 ndr_print_ptr(ndr
, "rebootmsg", r
->rebootmsg
);
1353 ndr_print_string(ndr
, "rebootmsg", r
->rebootmsg
);
1356 ndr_print_ptr(ndr
, "command", r
->command
);
1359 ndr_print_string(ndr
, "command", r
->command
);
1362 ndr_print_uint32(ndr
, "num_actions", r
->num_actions
);
1363 ndr_print_ptr(ndr
, "actions", r
->actions
);
1366 ndr
->print(ndr
, "%s: ARRAY(%d)", "actions", (int)r
->num_actions
);
1368 for (cntr_actions_1
=0;cntr_actions_1
<r
->num_actions
;cntr_actions_1
++) {
1370 if (asprintf(&idx_1
, "[%d]", cntr_actions_1
) != -1) {
1371 ndr_print_SC_ACTION(ndr
, "actions", &r
->actions
[cntr_actions_1
]);
1381 _PUBLIC_
size_t ndr_size_SERVICE_FAILURE_ACTIONS(const struct SERVICE_FAILURE_ACTIONS
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1383 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_SERVICE_FAILURE_ACTIONS
, ic
);
1386 static enum ndr_err_code
ndr_push_svcctl_StatusLevel(struct ndr_push
*ndr
, int ndr_flags
, enum svcctl_StatusLevel r
)
1388 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1389 return NDR_ERR_SUCCESS
;
1392 static enum ndr_err_code
ndr_pull_svcctl_StatusLevel(struct ndr_pull
*ndr
, int ndr_flags
, enum svcctl_StatusLevel
*r
)
1395 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1397 return NDR_ERR_SUCCESS
;
1400 _PUBLIC_
void ndr_print_svcctl_StatusLevel(struct ndr_print
*ndr
, const char *name
, enum svcctl_StatusLevel r
)
1402 const char *val
= NULL
;
1405 case SVC_STATUS_PROCESS_INFO
: val
= "SVC_STATUS_PROCESS_INFO"; break;
1407 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1410 static enum ndr_err_code
ndr_push_svcctl_CloseServiceHandle(struct ndr_push
*ndr
, int flags
, const struct svcctl_CloseServiceHandle
*r
)
1412 if (flags
& NDR_IN
) {
1413 if (r
->in
.handle
== NULL
) {
1414 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1416 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1418 if (flags
& NDR_OUT
) {
1419 if (r
->out
.handle
== NULL
) {
1420 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1422 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1423 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1425 return NDR_ERR_SUCCESS
;
1428 static enum ndr_err_code
ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull
*ndr
, int flags
, struct svcctl_CloseServiceHandle
*r
)
1430 TALLOC_CTX
*_mem_save_handle_0
;
1431 if (flags
& NDR_IN
) {
1432 ZERO_STRUCT(r
->out
);
1434 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1435 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1437 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1438 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1439 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1440 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1441 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1442 *r
->out
.handle
= *r
->in
.handle
;
1444 if (flags
& NDR_OUT
) {
1445 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1446 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
1448 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1449 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1450 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
1451 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1452 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1454 return NDR_ERR_SUCCESS
;
1457 _PUBLIC_
void ndr_print_svcctl_CloseServiceHandle(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_CloseServiceHandle
*r
)
1459 ndr_print_struct(ndr
, name
, "svcctl_CloseServiceHandle");
1461 if (flags
& NDR_SET_VALUES
) {
1462 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1464 if (flags
& NDR_IN
) {
1465 ndr_print_struct(ndr
, "in", "svcctl_CloseServiceHandle");
1467 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1469 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1473 if (flags
& NDR_OUT
) {
1474 ndr_print_struct(ndr
, "out", "svcctl_CloseServiceHandle");
1476 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
1478 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
1480 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1486 static enum ndr_err_code
ndr_push_svcctl_ControlService(struct ndr_push
*ndr
, int flags
, const struct svcctl_ControlService
*r
)
1488 if (flags
& NDR_IN
) {
1489 if (r
->in
.handle
== NULL
) {
1490 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1492 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1493 NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr
, NDR_SCALARS
, r
->in
.control
));
1495 if (flags
& NDR_OUT
) {
1496 if (r
->out
.service_status
== NULL
) {
1497 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1499 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr
, NDR_SCALARS
, r
->out
.service_status
));
1500 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1502 return NDR_ERR_SUCCESS
;
1505 static enum ndr_err_code
ndr_pull_svcctl_ControlService(struct ndr_pull
*ndr
, int flags
, struct svcctl_ControlService
*r
)
1507 TALLOC_CTX
*_mem_save_handle_0
;
1508 TALLOC_CTX
*_mem_save_service_status_0
;
1509 if (flags
& NDR_IN
) {
1510 ZERO_STRUCT(r
->out
);
1512 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1513 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1515 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1516 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1517 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1519 NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr
, NDR_SCALARS
, &r
->in
.control
));
1520 NDR_PULL_ALLOC(ndr
, r
->out
.service_status
);
1521 ZERO_STRUCTP(r
->out
.service_status
);
1523 if (flags
& NDR_OUT
) {
1524 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1525 NDR_PULL_ALLOC(ndr
, r
->out
.service_status
);
1527 _mem_save_service_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1528 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.service_status
, LIBNDR_FLAG_REF_ALLOC
);
1529 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr
, NDR_SCALARS
, r
->out
.service_status
));
1530 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_status_0
, LIBNDR_FLAG_REF_ALLOC
);
1531 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1533 return NDR_ERR_SUCCESS
;
1536 _PUBLIC_
void ndr_print_svcctl_ControlService(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_ControlService
*r
)
1538 ndr_print_struct(ndr
, name
, "svcctl_ControlService");
1540 if (flags
& NDR_SET_VALUES
) {
1541 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1543 if (flags
& NDR_IN
) {
1544 ndr_print_struct(ndr
, "in", "svcctl_ControlService");
1546 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1548 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1550 ndr_print_SERVICE_CONTROL(ndr
, "control", r
->in
.control
);
1553 if (flags
& NDR_OUT
) {
1554 ndr_print_struct(ndr
, "out", "svcctl_ControlService");
1556 ndr_print_ptr(ndr
, "service_status", r
->out
.service_status
);
1558 ndr_print_SERVICE_STATUS(ndr
, "service_status", r
->out
.service_status
);
1560 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1566 static enum ndr_err_code
ndr_push_svcctl_DeleteService(struct ndr_push
*ndr
, int flags
, const struct svcctl_DeleteService
*r
)
1568 if (flags
& NDR_IN
) {
1569 if (r
->in
.handle
== NULL
) {
1570 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1572 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1574 if (flags
& NDR_OUT
) {
1575 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1577 return NDR_ERR_SUCCESS
;
1580 static enum ndr_err_code
ndr_pull_svcctl_DeleteService(struct ndr_pull
*ndr
, int flags
, struct svcctl_DeleteService
*r
)
1582 TALLOC_CTX
*_mem_save_handle_0
;
1583 if (flags
& NDR_IN
) {
1584 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1585 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1587 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1588 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1589 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1590 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1592 if (flags
& NDR_OUT
) {
1593 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1595 return NDR_ERR_SUCCESS
;
1598 _PUBLIC_
void ndr_print_svcctl_DeleteService(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_DeleteService
*r
)
1600 ndr_print_struct(ndr
, name
, "svcctl_DeleteService");
1602 if (flags
& NDR_SET_VALUES
) {
1603 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1605 if (flags
& NDR_IN
) {
1606 ndr_print_struct(ndr
, "in", "svcctl_DeleteService");
1608 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1610 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1614 if (flags
& NDR_OUT
) {
1615 ndr_print_struct(ndr
, "out", "svcctl_DeleteService");
1617 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1623 static enum ndr_err_code
ndr_push_svcctl_LockServiceDatabase(struct ndr_push
*ndr
, int flags
, const struct svcctl_LockServiceDatabase
*r
)
1625 if (flags
& NDR_IN
) {
1626 if (r
->in
.handle
== NULL
) {
1627 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1629 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1631 if (flags
& NDR_OUT
) {
1632 if (r
->out
.lock
== NULL
) {
1633 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1635 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.lock
));
1636 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1638 return NDR_ERR_SUCCESS
;
1641 static enum ndr_err_code
ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull
*ndr
, int flags
, struct svcctl_LockServiceDatabase
*r
)
1643 TALLOC_CTX
*_mem_save_handle_0
;
1644 TALLOC_CTX
*_mem_save_lock_0
;
1645 if (flags
& NDR_IN
) {
1646 ZERO_STRUCT(r
->out
);
1648 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1649 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1651 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1652 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1653 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1654 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1655 NDR_PULL_ALLOC(ndr
, r
->out
.lock
);
1656 ZERO_STRUCTP(r
->out
.lock
);
1658 if (flags
& NDR_OUT
) {
1659 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1660 NDR_PULL_ALLOC(ndr
, r
->out
.lock
);
1662 _mem_save_lock_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1663 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.lock
, LIBNDR_FLAG_REF_ALLOC
);
1664 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.lock
));
1665 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lock_0
, LIBNDR_FLAG_REF_ALLOC
);
1666 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1668 return NDR_ERR_SUCCESS
;
1671 _PUBLIC_
void ndr_print_svcctl_LockServiceDatabase(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_LockServiceDatabase
*r
)
1673 ndr_print_struct(ndr
, name
, "svcctl_LockServiceDatabase");
1675 if (flags
& NDR_SET_VALUES
) {
1676 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1678 if (flags
& NDR_IN
) {
1679 ndr_print_struct(ndr
, "in", "svcctl_LockServiceDatabase");
1681 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1683 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1687 if (flags
& NDR_OUT
) {
1688 ndr_print_struct(ndr
, "out", "svcctl_LockServiceDatabase");
1690 ndr_print_ptr(ndr
, "lock", r
->out
.lock
);
1692 ndr_print_policy_handle(ndr
, "lock", r
->out
.lock
);
1694 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1700 static enum ndr_err_code
ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceObjectSecurity
*r
)
1702 if (flags
& NDR_IN
) {
1703 if (r
->in
.handle
== NULL
) {
1704 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1706 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1707 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.security_flags
));
1708 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
1710 if (flags
& NDR_OUT
) {
1711 if (r
->out
.buffer
== NULL
) {
1712 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1714 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
1715 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
1716 if (r
->out
.needed
== NULL
) {
1717 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1719 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
1720 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1722 return NDR_ERR_SUCCESS
;
1725 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceObjectSecurity
*r
)
1727 TALLOC_CTX
*_mem_save_handle_0
;
1728 TALLOC_CTX
*_mem_save_needed_0
;
1729 if (flags
& NDR_IN
) {
1730 ZERO_STRUCT(r
->out
);
1732 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1733 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1735 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1736 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1737 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1738 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1739 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.security_flags
));
1740 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
1741 if (r
->in
.offered
> 0x40000) {
1742 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1744 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, r
->in
.offered
);
1745 memset(r
->out
.buffer
, 0, (r
->in
.offered
) * sizeof(*r
->out
.buffer
));
1746 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
1747 ZERO_STRUCTP(r
->out
.needed
);
1749 if (flags
& NDR_OUT
) {
1750 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
1751 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1752 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
1754 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
)));
1755 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1756 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
1758 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1759 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
1760 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
1761 if (*r
->out
.needed
> 0x40000) {
1762 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1764 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
1765 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1766 if (r
->out
.buffer
) {
1767 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.offered
));
1770 return NDR_ERR_SUCCESS
;
1773 _PUBLIC_
void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceObjectSecurity
*r
)
1775 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceObjectSecurity");
1777 if (flags
& NDR_SET_VALUES
) {
1778 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1780 if (flags
& NDR_IN
) {
1781 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceObjectSecurity");
1783 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1785 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1787 ndr_print_security_secinfo(ndr
, "security_flags", r
->in
.security_flags
);
1788 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
1791 if (flags
& NDR_OUT
) {
1792 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceObjectSecurity");
1794 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
1796 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.offered
);
1798 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
1800 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
1802 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1808 static enum ndr_err_code
ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push
*ndr
, int flags
, const struct svcctl_SetServiceObjectSecurity
*r
)
1810 if (flags
& NDR_IN
) {
1811 if (r
->in
.handle
== NULL
) {
1812 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1814 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1815 NDR_CHECK(ndr_push_security_secinfo(ndr
, NDR_SCALARS
, r
->in
.security_flags
));
1816 if (r
->in
.buffer
== NULL
) {
1817 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1819 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
1820 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.offered
));
1821 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
1823 if (flags
& NDR_OUT
) {
1824 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1826 return NDR_ERR_SUCCESS
;
1829 static enum ndr_err_code
ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull
*ndr
, int flags
, struct svcctl_SetServiceObjectSecurity
*r
)
1831 TALLOC_CTX
*_mem_save_handle_0
;
1832 if (flags
& NDR_IN
) {
1833 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1834 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1836 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1837 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1838 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1839 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1840 NDR_CHECK(ndr_pull_security_secinfo(ndr
, NDR_SCALARS
, &r
->in
.security_flags
));
1841 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
1842 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1843 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
1845 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
1846 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
1848 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.offered
));
1851 if (flags
& NDR_OUT
) {
1852 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1854 return NDR_ERR_SUCCESS
;
1857 _PUBLIC_
void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_SetServiceObjectSecurity
*r
)
1859 ndr_print_struct(ndr
, name
, "svcctl_SetServiceObjectSecurity");
1861 if (flags
& NDR_SET_VALUES
) {
1862 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1864 if (flags
& NDR_IN
) {
1865 ndr_print_struct(ndr
, "in", "svcctl_SetServiceObjectSecurity");
1867 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1869 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1871 ndr_print_security_secinfo(ndr
, "security_flags", r
->in
.security_flags
);
1872 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
1874 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.offered
);
1876 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
1879 if (flags
& NDR_OUT
) {
1880 ndr_print_struct(ndr
, "out", "svcctl_SetServiceObjectSecurity");
1882 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1888 static enum ndr_err_code
ndr_push_svcctl_QueryServiceStatus(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceStatus
*r
)
1890 if (flags
& NDR_IN
) {
1891 if (r
->in
.handle
== NULL
) {
1892 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1894 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1896 if (flags
& NDR_OUT
) {
1897 if (r
->out
.service_status
== NULL
) {
1898 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
1900 NDR_CHECK(ndr_push_SERVICE_STATUS(ndr
, NDR_SCALARS
, r
->out
.service_status
));
1901 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1903 return NDR_ERR_SUCCESS
;
1906 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceStatus
*r
)
1908 TALLOC_CTX
*_mem_save_handle_0
;
1909 TALLOC_CTX
*_mem_save_service_status_0
;
1910 if (flags
& NDR_IN
) {
1911 ZERO_STRUCT(r
->out
);
1913 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1914 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
1916 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1917 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
1918 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
1919 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
1920 NDR_PULL_ALLOC(ndr
, r
->out
.service_status
);
1921 ZERO_STRUCTP(r
->out
.service_status
);
1923 if (flags
& NDR_OUT
) {
1924 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
1925 NDR_PULL_ALLOC(ndr
, r
->out
.service_status
);
1927 _mem_save_service_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1928 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.service_status
, LIBNDR_FLAG_REF_ALLOC
);
1929 NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr
, NDR_SCALARS
, r
->out
.service_status
));
1930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_status_0
, LIBNDR_FLAG_REF_ALLOC
);
1931 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1933 return NDR_ERR_SUCCESS
;
1936 _PUBLIC_
void ndr_print_svcctl_QueryServiceStatus(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceStatus
*r
)
1938 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceStatus");
1940 if (flags
& NDR_SET_VALUES
) {
1941 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1943 if (flags
& NDR_IN
) {
1944 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceStatus");
1946 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
1948 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
1952 if (flags
& NDR_OUT
) {
1953 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceStatus");
1955 ndr_print_ptr(ndr
, "service_status", r
->out
.service_status
);
1957 ndr_print_SERVICE_STATUS(ndr
, "service_status", r
->out
.service_status
);
1959 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
1965 static enum ndr_err_code
ndr_push_svcctl_SetServiceStatus(struct ndr_push
*ndr
, int flags
, const struct svcctl_SetServiceStatus
*r
)
1967 if (flags
& NDR_IN
) {
1969 if (flags
& NDR_OUT
) {
1970 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
1972 return NDR_ERR_SUCCESS
;
1975 static enum ndr_err_code
ndr_pull_svcctl_SetServiceStatus(struct ndr_pull
*ndr
, int flags
, struct svcctl_SetServiceStatus
*r
)
1977 if (flags
& NDR_IN
) {
1979 if (flags
& NDR_OUT
) {
1980 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
1982 return NDR_ERR_SUCCESS
;
1985 _PUBLIC_
void ndr_print_svcctl_SetServiceStatus(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_SetServiceStatus
*r
)
1987 ndr_print_struct(ndr
, name
, "svcctl_SetServiceStatus");
1989 if (flags
& NDR_SET_VALUES
) {
1990 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
1992 if (flags
& NDR_IN
) {
1993 ndr_print_struct(ndr
, "in", "svcctl_SetServiceStatus");
1997 if (flags
& NDR_OUT
) {
1998 ndr_print_struct(ndr
, "out", "svcctl_SetServiceStatus");
2000 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2006 static enum ndr_err_code
ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push
*ndr
, int flags
, const struct svcctl_UnlockServiceDatabase
*r
)
2008 if (flags
& NDR_IN
) {
2009 if (r
->in
.lock
== NULL
) {
2010 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2012 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.lock
));
2014 if (flags
& NDR_OUT
) {
2015 if (r
->out
.lock
== NULL
) {
2016 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2018 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.lock
));
2019 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2021 return NDR_ERR_SUCCESS
;
2024 static enum ndr_err_code
ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull
*ndr
, int flags
, struct svcctl_UnlockServiceDatabase
*r
)
2026 TALLOC_CTX
*_mem_save_lock_0
;
2027 if (flags
& NDR_IN
) {
2028 ZERO_STRUCT(r
->out
);
2030 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2031 NDR_PULL_ALLOC(ndr
, r
->in
.lock
);
2033 _mem_save_lock_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2034 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.lock
, LIBNDR_FLAG_REF_ALLOC
);
2035 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.lock
));
2036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lock_0
, LIBNDR_FLAG_REF_ALLOC
);
2037 NDR_PULL_ALLOC(ndr
, r
->out
.lock
);
2038 *r
->out
.lock
= *r
->in
.lock
;
2040 if (flags
& NDR_OUT
) {
2041 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2042 NDR_PULL_ALLOC(ndr
, r
->out
.lock
);
2044 _mem_save_lock_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2045 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.lock
, LIBNDR_FLAG_REF_ALLOC
);
2046 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.lock
));
2047 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lock_0
, LIBNDR_FLAG_REF_ALLOC
);
2048 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2050 return NDR_ERR_SUCCESS
;
2053 _PUBLIC_
void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_UnlockServiceDatabase
*r
)
2055 ndr_print_struct(ndr
, name
, "svcctl_UnlockServiceDatabase");
2057 if (flags
& NDR_SET_VALUES
) {
2058 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2060 if (flags
& NDR_IN
) {
2061 ndr_print_struct(ndr
, "in", "svcctl_UnlockServiceDatabase");
2063 ndr_print_ptr(ndr
, "lock", r
->in
.lock
);
2065 ndr_print_policy_handle(ndr
, "lock", r
->in
.lock
);
2069 if (flags
& NDR_OUT
) {
2070 ndr_print_struct(ndr
, "out", "svcctl_UnlockServiceDatabase");
2072 ndr_print_ptr(ndr
, "lock", r
->out
.lock
);
2074 ndr_print_policy_handle(ndr
, "lock", r
->out
.lock
);
2076 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2082 static enum ndr_err_code
ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push
*ndr
, int flags
, const struct svcctl_NotifyBootConfigStatus
*r
)
2084 if (flags
& NDR_IN
) {
2086 if (flags
& NDR_OUT
) {
2087 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2089 return NDR_ERR_SUCCESS
;
2092 static enum ndr_err_code
ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull
*ndr
, int flags
, struct svcctl_NotifyBootConfigStatus
*r
)
2094 if (flags
& NDR_IN
) {
2096 if (flags
& NDR_OUT
) {
2097 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2099 return NDR_ERR_SUCCESS
;
2102 _PUBLIC_
void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_NotifyBootConfigStatus
*r
)
2104 ndr_print_struct(ndr
, name
, "svcctl_NotifyBootConfigStatus");
2106 if (flags
& NDR_SET_VALUES
) {
2107 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2109 if (flags
& NDR_IN
) {
2110 ndr_print_struct(ndr
, "in", "svcctl_NotifyBootConfigStatus");
2114 if (flags
& NDR_OUT
) {
2115 ndr_print_struct(ndr
, "out", "svcctl_NotifyBootConfigStatus");
2117 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2123 static enum ndr_err_code
ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push
*ndr
, int flags
, const struct svcctl_SCSetServiceBitsW
*r
)
2125 if (flags
& NDR_IN
) {
2126 if (r
->in
.handle
== NULL
) {
2127 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2129 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bits
));
2131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bitson
));
2132 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.immediate
));
2134 if (flags
& NDR_OUT
) {
2135 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2137 return NDR_ERR_SUCCESS
;
2140 static enum ndr_err_code
ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull
*ndr
, int flags
, struct svcctl_SCSetServiceBitsW
*r
)
2142 TALLOC_CTX
*_mem_save_handle_0
;
2143 if (flags
& NDR_IN
) {
2144 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2145 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2147 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2148 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2149 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2150 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2151 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bits
));
2152 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bitson
));
2153 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.immediate
));
2155 if (flags
& NDR_OUT
) {
2156 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2158 return NDR_ERR_SUCCESS
;
2161 _PUBLIC_
void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_SCSetServiceBitsW
*r
)
2163 ndr_print_struct(ndr
, name
, "svcctl_SCSetServiceBitsW");
2165 if (flags
& NDR_SET_VALUES
) {
2166 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2168 if (flags
& NDR_IN
) {
2169 ndr_print_struct(ndr
, "in", "svcctl_SCSetServiceBitsW");
2171 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2173 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2175 ndr_print_uint32(ndr
, "bits", r
->in
.bits
);
2176 ndr_print_uint32(ndr
, "bitson", r
->in
.bitson
);
2177 ndr_print_uint32(ndr
, "immediate", r
->in
.immediate
);
2180 if (flags
& NDR_OUT
) {
2181 ndr_print_struct(ndr
, "out", "svcctl_SCSetServiceBitsW");
2183 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2189 static enum ndr_err_code
ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push
*ndr
, int flags
, const struct svcctl_ChangeServiceConfigW
*r
)
2191 if (flags
& NDR_IN
) {
2192 if (r
->in
.handle
== NULL
) {
2193 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2195 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2196 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
2197 NDR_CHECK(ndr_push_svcctl_StartType(ndr
, NDR_SCALARS
, r
->in
.start_type
));
2198 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr
, NDR_SCALARS
, r
->in
.error_control
));
2199 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.binary_path
));
2200 if (r
->in
.binary_path
) {
2201 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
2202 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2203 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
2204 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
));
2206 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.load_order_group
));
2207 if (r
->in
.load_order_group
) {
2208 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.load_order_group
, CH_UTF16
)));
2209 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2210 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.load_order_group
, CH_UTF16
)));
2211 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
));
2213 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.dependencies
));
2214 if (r
->in
.dependencies
) {
2215 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
)));
2216 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2217 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
)));
2218 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dependencies
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
2220 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_start_name
));
2221 if (r
->in
.service_start_name
) {
2222 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
2223 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2224 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
2225 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
));
2227 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
2228 if (r
->in
.password
) {
2229 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
2230 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2231 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
2232 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.password
, ndr_charset_length(r
->in
.password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
2234 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.display_name
));
2235 if (r
->in
.display_name
) {
2236 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.display_name
, CH_UTF16
)));
2237 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2238 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.display_name
, CH_UTF16
)));
2239 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
));
2242 if (flags
& NDR_OUT
) {
2243 if (r
->out
.tag_id
== NULL
) {
2244 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2246 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.tag_id
));
2247 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2249 return NDR_ERR_SUCCESS
;
2252 static enum ndr_err_code
ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull
*ndr
, int flags
, struct svcctl_ChangeServiceConfigW
*r
)
2254 uint32_t _ptr_binary_path
;
2255 uint32_t _ptr_load_order_group
;
2256 uint32_t _ptr_dependencies
;
2257 uint32_t _ptr_service_start_name
;
2258 uint32_t _ptr_password
;
2259 uint32_t _ptr_display_name
;
2260 TALLOC_CTX
*_mem_save_handle_0
;
2261 TALLOC_CTX
*_mem_save_binary_path_0
;
2262 TALLOC_CTX
*_mem_save_load_order_group_0
;
2263 TALLOC_CTX
*_mem_save_tag_id_0
;
2264 TALLOC_CTX
*_mem_save_dependencies_0
;
2265 TALLOC_CTX
*_mem_save_service_start_name_0
;
2266 TALLOC_CTX
*_mem_save_password_0
;
2267 TALLOC_CTX
*_mem_save_display_name_0
;
2268 if (flags
& NDR_IN
) {
2269 ZERO_STRUCT(r
->out
);
2271 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2272 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2274 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2275 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2276 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2277 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2278 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
2279 NDR_CHECK(ndr_pull_svcctl_StartType(ndr
, NDR_SCALARS
, &r
->in
.start_type
));
2280 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr
, NDR_SCALARS
, &r
->in
.error_control
));
2281 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_binary_path
));
2282 if (_ptr_binary_path
) {
2283 NDR_PULL_ALLOC(ndr
, r
->in
.binary_path
);
2285 r
->in
.binary_path
= NULL
;
2287 if (r
->in
.binary_path
) {
2288 _mem_save_binary_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2289 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.binary_path
, 0);
2290 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.binary_path
));
2291 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.binary_path
));
2292 if (ndr_get_array_length(ndr
, &r
->in
.binary_path
) > ndr_get_array_size(ndr
, &r
->in
.binary_path
)) {
2293 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
));
2295 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.binary_path
), sizeof(uint16_t)));
2296 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
));
2297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_binary_path_0
, 0);
2299 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_load_order_group
));
2300 if (_ptr_load_order_group
) {
2301 NDR_PULL_ALLOC(ndr
, r
->in
.load_order_group
);
2303 r
->in
.load_order_group
= NULL
;
2305 if (r
->in
.load_order_group
) {
2306 _mem_save_load_order_group_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2307 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.load_order_group
, 0);
2308 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.load_order_group
));
2309 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.load_order_group
));
2310 if (ndr_get_array_length(ndr
, &r
->in
.load_order_group
) > ndr_get_array_size(ndr
, &r
->in
.load_order_group
)) {
2311 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
));
2313 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.load_order_group
), sizeof(uint16_t)));
2314 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
));
2315 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_load_order_group_0
, 0);
2317 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependencies
));
2318 if (_ptr_dependencies
) {
2319 NDR_PULL_ALLOC(ndr
, r
->in
.dependencies
);
2321 r
->in
.dependencies
= NULL
;
2323 if (r
->in
.dependencies
) {
2324 _mem_save_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2325 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dependencies
, 0);
2326 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dependencies
));
2327 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dependencies
));
2328 if (ndr_get_array_length(ndr
, &r
->in
.dependencies
) > ndr_get_array_size(ndr
, &r
->in
.dependencies
)) {
2329 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
));
2331 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dependencies
), sizeof(uint16_t)));
2332 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dependencies
, ndr_get_array_length(ndr
, &r
->in
.dependencies
), sizeof(uint16_t), CH_UTF16
));
2333 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependencies_0
, 0);
2335 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_start_name
));
2336 if (_ptr_service_start_name
) {
2337 NDR_PULL_ALLOC(ndr
, r
->in
.service_start_name
);
2339 r
->in
.service_start_name
= NULL
;
2341 if (r
->in
.service_start_name
) {
2342 _mem_save_service_start_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2343 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_start_name
, 0);
2344 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_start_name
));
2345 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_start_name
));
2346 if (ndr_get_array_length(ndr
, &r
->in
.service_start_name
) > ndr_get_array_size(ndr
, &r
->in
.service_start_name
)) {
2347 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
));
2349 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_start_name
), sizeof(uint16_t)));
2350 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
));
2351 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_start_name_0
, 0);
2353 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
2354 if (_ptr_password
) {
2355 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
2357 r
->in
.password
= NULL
;
2359 if (r
->in
.password
) {
2360 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2361 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
2362 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.password
));
2363 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.password
));
2364 if (ndr_get_array_length(ndr
, &r
->in
.password
) > ndr_get_array_size(ndr
, &r
->in
.password
)) {
2365 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
));
2367 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t)));
2368 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.password
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t), CH_UTF16
));
2369 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
2371 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
2372 if (_ptr_display_name
) {
2373 NDR_PULL_ALLOC(ndr
, r
->in
.display_name
);
2375 r
->in
.display_name
= NULL
;
2377 if (r
->in
.display_name
) {
2378 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2379 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.display_name
, 0);
2380 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.display_name
));
2381 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.display_name
));
2382 if (ndr_get_array_length(ndr
, &r
->in
.display_name
) > ndr_get_array_size(ndr
, &r
->in
.display_name
)) {
2383 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
));
2385 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.display_name
), sizeof(uint16_t)));
2386 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
));
2387 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
2389 NDR_PULL_ALLOC(ndr
, r
->out
.tag_id
);
2390 ZERO_STRUCTP(r
->out
.tag_id
);
2392 if (flags
& NDR_OUT
) {
2393 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2394 NDR_PULL_ALLOC(ndr
, r
->out
.tag_id
);
2396 _mem_save_tag_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2397 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.tag_id
, LIBNDR_FLAG_REF_ALLOC
);
2398 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.tag_id
));
2399 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_tag_id_0
, LIBNDR_FLAG_REF_ALLOC
);
2400 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2402 return NDR_ERR_SUCCESS
;
2405 _PUBLIC_
void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_ChangeServiceConfigW
*r
)
2407 ndr_print_struct(ndr
, name
, "svcctl_ChangeServiceConfigW");
2409 if (flags
& NDR_SET_VALUES
) {
2410 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2412 if (flags
& NDR_IN
) {
2413 ndr_print_struct(ndr
, "in", "svcctl_ChangeServiceConfigW");
2415 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
2417 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
2419 ndr_print_uint32(ndr
, "type", r
->in
.type
);
2420 ndr_print_svcctl_StartType(ndr
, "start_type", r
->in
.start_type
);
2421 ndr_print_svcctl_ErrorControl(ndr
, "error_control", r
->in
.error_control
);
2422 ndr_print_ptr(ndr
, "binary_path", r
->in
.binary_path
);
2424 if (r
->in
.binary_path
) {
2425 ndr_print_string(ndr
, "binary_path", r
->in
.binary_path
);
2428 ndr_print_ptr(ndr
, "load_order_group", r
->in
.load_order_group
);
2430 if (r
->in
.load_order_group
) {
2431 ndr_print_string(ndr
, "load_order_group", r
->in
.load_order_group
);
2434 ndr_print_ptr(ndr
, "dependencies", r
->in
.dependencies
);
2436 if (r
->in
.dependencies
) {
2437 ndr_print_string(ndr
, "dependencies", r
->in
.dependencies
);
2440 ndr_print_ptr(ndr
, "service_start_name", r
->in
.service_start_name
);
2442 if (r
->in
.service_start_name
) {
2443 ndr_print_string(ndr
, "service_start_name", r
->in
.service_start_name
);
2446 ndr_print_ptr(ndr
, "password", r
->in
.password
);
2448 if (r
->in
.password
) {
2449 ndr_print_string(ndr
, "password", r
->in
.password
);
2452 ndr_print_ptr(ndr
, "display_name", r
->in
.display_name
);
2454 if (r
->in
.display_name
) {
2455 ndr_print_string(ndr
, "display_name", r
->in
.display_name
);
2460 if (flags
& NDR_OUT
) {
2461 ndr_print_struct(ndr
, "out", "svcctl_ChangeServiceConfigW");
2463 ndr_print_ptr(ndr
, "tag_id", r
->out
.tag_id
);
2465 ndr_print_uint32(ndr
, "tag_id", *r
->out
.tag_id
);
2467 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2473 static enum ndr_err_code
ndr_push_svcctl_CreateServiceW(struct ndr_push
*ndr
, int flags
, const struct svcctl_CreateServiceW
*r
)
2475 if (flags
& NDR_IN
) {
2476 if (r
->in
.scmanager_handle
== NULL
) {
2477 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2479 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager_handle
));
2480 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
2481 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2482 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
2483 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.ServiceName
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
2484 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.DisplayName
));
2485 if (r
->in
.DisplayName
) {
2486 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DisplayName
, CH_UTF16
)));
2487 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2488 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DisplayName
, CH_UTF16
)));
2489 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.DisplayName
, ndr_charset_length(r
->in
.DisplayName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
2491 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.desired_access
));
2492 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
2493 NDR_CHECK(ndr_push_svcctl_StartType(ndr
, NDR_SCALARS
, r
->in
.start_type
));
2494 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr
, NDR_SCALARS
, r
->in
.error_control
));
2495 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
2496 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2497 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
2498 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
));
2499 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.LoadOrderGroupKey
));
2500 if (r
->in
.LoadOrderGroupKey
) {
2501 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.LoadOrderGroupKey
, CH_UTF16
)));
2502 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2503 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.LoadOrderGroupKey
, CH_UTF16
)));
2504 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.LoadOrderGroupKey
, ndr_charset_length(r
->in
.LoadOrderGroupKey
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
2506 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.TagId
));
2508 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.TagId
));
2510 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.dependencies
));
2511 if (r
->in
.dependencies
) {
2512 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.dependencies_size
));
2513 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.dependencies
, r
->in
.dependencies_size
));
2515 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.dependencies_size
));
2516 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_start_name
));
2517 if (r
->in
.service_start_name
) {
2518 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
2519 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
2520 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
2521 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
));
2523 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
2524 if (r
->in
.password
) {
2525 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.password_size
));
2526 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.password
, r
->in
.password_size
));
2528 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.password_size
));
2530 if (flags
& NDR_OUT
) {
2531 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.TagId
));
2533 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.TagId
));
2535 if (r
->out
.handle
== NULL
) {
2536 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2538 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
2539 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2541 return NDR_ERR_SUCCESS
;
2544 static enum ndr_err_code
ndr_pull_svcctl_CreateServiceW(struct ndr_pull
*ndr
, int flags
, struct svcctl_CreateServiceW
*r
)
2546 uint32_t _ptr_DisplayName
;
2547 uint32_t _ptr_LoadOrderGroupKey
;
2548 uint32_t _ptr_TagId
;
2549 uint32_t _ptr_dependencies
;
2550 uint32_t _ptr_service_start_name
;
2551 uint32_t _ptr_password
;
2552 TALLOC_CTX
*_mem_save_scmanager_handle_0
;
2553 TALLOC_CTX
*_mem_save_DisplayName_0
;
2554 TALLOC_CTX
*_mem_save_LoadOrderGroupKey_0
;
2555 TALLOC_CTX
*_mem_save_TagId_0
;
2556 TALLOC_CTX
*_mem_save_dependencies_0
;
2557 TALLOC_CTX
*_mem_save_service_start_name_0
;
2558 TALLOC_CTX
*_mem_save_password_0
;
2559 TALLOC_CTX
*_mem_save_handle_0
;
2560 if (flags
& NDR_IN
) {
2561 ZERO_STRUCT(r
->out
);
2563 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2564 NDR_PULL_ALLOC(ndr
, r
->in
.scmanager_handle
);
2566 _mem_save_scmanager_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2567 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.scmanager_handle
, LIBNDR_FLAG_REF_ALLOC
);
2568 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager_handle
));
2569 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_scmanager_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2570 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.ServiceName
));
2571 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.ServiceName
));
2572 if (ndr_get_array_length(ndr
, &r
->in
.ServiceName
) > ndr_get_array_size(ndr
, &r
->in
.ServiceName
)) {
2573 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
));
2575 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t)));
2576 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.ServiceName
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t), CH_UTF16
));
2577 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_DisplayName
));
2578 if (_ptr_DisplayName
) {
2579 NDR_PULL_ALLOC(ndr
, r
->in
.DisplayName
);
2581 r
->in
.DisplayName
= NULL
;
2583 if (r
->in
.DisplayName
) {
2584 _mem_save_DisplayName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2585 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.DisplayName
, 0);
2586 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.DisplayName
));
2587 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.DisplayName
));
2588 if (ndr_get_array_length(ndr
, &r
->in
.DisplayName
) > ndr_get_array_size(ndr
, &r
->in
.DisplayName
)) {
2589 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
));
2591 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.DisplayName
), sizeof(uint16_t)));
2592 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.DisplayName
, ndr_get_array_length(ndr
, &r
->in
.DisplayName
), sizeof(uint16_t), CH_UTF16
));
2593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_DisplayName_0
, 0);
2595 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.desired_access
));
2596 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
2597 NDR_CHECK(ndr_pull_svcctl_StartType(ndr
, NDR_SCALARS
, &r
->in
.start_type
));
2598 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr
, NDR_SCALARS
, &r
->in
.error_control
));
2599 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.binary_path
));
2600 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.binary_path
));
2601 if (ndr_get_array_length(ndr
, &r
->in
.binary_path
) > ndr_get_array_size(ndr
, &r
->in
.binary_path
)) {
2602 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
));
2604 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.binary_path
), sizeof(uint16_t)));
2605 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
));
2606 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_LoadOrderGroupKey
));
2607 if (_ptr_LoadOrderGroupKey
) {
2608 NDR_PULL_ALLOC(ndr
, r
->in
.LoadOrderGroupKey
);
2610 r
->in
.LoadOrderGroupKey
= NULL
;
2612 if (r
->in
.LoadOrderGroupKey
) {
2613 _mem_save_LoadOrderGroupKey_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2614 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.LoadOrderGroupKey
, 0);
2615 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.LoadOrderGroupKey
));
2616 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.LoadOrderGroupKey
));
2617 if (ndr_get_array_length(ndr
, &r
->in
.LoadOrderGroupKey
) > ndr_get_array_size(ndr
, &r
->in
.LoadOrderGroupKey
)) {
2618 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
));
2620 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.LoadOrderGroupKey
), sizeof(uint16_t)));
2621 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.LoadOrderGroupKey
, ndr_get_array_length(ndr
, &r
->in
.LoadOrderGroupKey
), sizeof(uint16_t), CH_UTF16
));
2622 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_LoadOrderGroupKey_0
, 0);
2624 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_TagId
));
2626 NDR_PULL_ALLOC(ndr
, r
->in
.TagId
);
2631 _mem_save_TagId_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2632 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.TagId
, 0);
2633 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.TagId
));
2634 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_TagId_0
, 0);
2636 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependencies
));
2637 if (_ptr_dependencies
) {
2638 NDR_PULL_ALLOC(ndr
, r
->in
.dependencies
);
2640 r
->in
.dependencies
= NULL
;
2642 if (r
->in
.dependencies
) {
2643 _mem_save_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2644 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dependencies
, 0);
2645 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dependencies
));
2646 NDR_PULL_ALLOC_N(ndr
, r
->in
.dependencies
, ndr_get_array_size(ndr
, &r
->in
.dependencies
));
2647 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.dependencies
, ndr_get_array_size(ndr
, &r
->in
.dependencies
)));
2648 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependencies_0
, 0);
2650 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.dependencies_size
));
2651 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_start_name
));
2652 if (_ptr_service_start_name
) {
2653 NDR_PULL_ALLOC(ndr
, r
->in
.service_start_name
);
2655 r
->in
.service_start_name
= NULL
;
2657 if (r
->in
.service_start_name
) {
2658 _mem_save_service_start_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2659 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_start_name
, 0);
2660 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_start_name
));
2661 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_start_name
));
2662 if (ndr_get_array_length(ndr
, &r
->in
.service_start_name
) > ndr_get_array_size(ndr
, &r
->in
.service_start_name
)) {
2663 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
));
2665 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_start_name
), sizeof(uint16_t)));
2666 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
));
2667 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_start_name_0
, 0);
2669 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
2670 if (_ptr_password
) {
2671 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
2673 r
->in
.password
= NULL
;
2675 if (r
->in
.password
) {
2676 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2677 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
2678 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.password
));
2679 NDR_PULL_ALLOC_N(ndr
, r
->in
.password
, ndr_get_array_size(ndr
, &r
->in
.password
));
2680 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.password
, ndr_get_array_size(ndr
, &r
->in
.password
)));
2681 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
2683 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.password_size
));
2684 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
2685 ZERO_STRUCTP(r
->out
.handle
);
2686 if (r
->in
.dependencies
) {
2687 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.dependencies
, r
->in
.dependencies_size
));
2689 if (r
->in
.password
) {
2690 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.password
, r
->in
.password_size
));
2693 if (flags
& NDR_OUT
) {
2694 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_TagId
));
2696 NDR_PULL_ALLOC(ndr
, r
->out
.TagId
);
2698 r
->out
.TagId
= NULL
;
2701 _mem_save_TagId_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2702 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.TagId
, 0);
2703 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.TagId
));
2704 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_TagId_0
, 0);
2706 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2707 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
2709 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2710 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2711 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
2712 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2713 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2715 return NDR_ERR_SUCCESS
;
2718 _PUBLIC_
void ndr_print_svcctl_CreateServiceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_CreateServiceW
*r
)
2720 ndr_print_struct(ndr
, name
, "svcctl_CreateServiceW");
2722 if (flags
& NDR_SET_VALUES
) {
2723 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2725 if (flags
& NDR_IN
) {
2726 ndr_print_struct(ndr
, "in", "svcctl_CreateServiceW");
2728 ndr_print_ptr(ndr
, "scmanager_handle", r
->in
.scmanager_handle
);
2730 ndr_print_policy_handle(ndr
, "scmanager_handle", r
->in
.scmanager_handle
);
2732 ndr_print_string(ndr
, "ServiceName", r
->in
.ServiceName
);
2733 ndr_print_ptr(ndr
, "DisplayName", r
->in
.DisplayName
);
2735 if (r
->in
.DisplayName
) {
2736 ndr_print_string(ndr
, "DisplayName", r
->in
.DisplayName
);
2739 ndr_print_uint32(ndr
, "desired_access", r
->in
.desired_access
);
2740 ndr_print_uint32(ndr
, "type", r
->in
.type
);
2741 ndr_print_svcctl_StartType(ndr
, "start_type", r
->in
.start_type
);
2742 ndr_print_svcctl_ErrorControl(ndr
, "error_control", r
->in
.error_control
);
2743 ndr_print_string(ndr
, "binary_path", r
->in
.binary_path
);
2744 ndr_print_ptr(ndr
, "LoadOrderGroupKey", r
->in
.LoadOrderGroupKey
);
2746 if (r
->in
.LoadOrderGroupKey
) {
2747 ndr_print_string(ndr
, "LoadOrderGroupKey", r
->in
.LoadOrderGroupKey
);
2750 ndr_print_ptr(ndr
, "TagId", r
->in
.TagId
);
2753 ndr_print_uint32(ndr
, "TagId", *r
->in
.TagId
);
2756 ndr_print_ptr(ndr
, "dependencies", r
->in
.dependencies
);
2758 if (r
->in
.dependencies
) {
2759 ndr_print_array_uint8(ndr
, "dependencies", r
->in
.dependencies
, r
->in
.dependencies_size
);
2762 ndr_print_uint32(ndr
, "dependencies_size", r
->in
.dependencies_size
);
2763 ndr_print_ptr(ndr
, "service_start_name", r
->in
.service_start_name
);
2765 if (r
->in
.service_start_name
) {
2766 ndr_print_string(ndr
, "service_start_name", r
->in
.service_start_name
);
2769 ndr_print_ptr(ndr
, "password", r
->in
.password
);
2771 if (r
->in
.password
) {
2772 ndr_print_array_uint8(ndr
, "password", r
->in
.password
, r
->in
.password_size
);
2775 ndr_print_uint32(ndr
, "password_size", r
->in
.password_size
);
2778 if (flags
& NDR_OUT
) {
2779 ndr_print_struct(ndr
, "out", "svcctl_CreateServiceW");
2781 ndr_print_ptr(ndr
, "TagId", r
->out
.TagId
);
2784 ndr_print_uint32(ndr
, "TagId", *r
->out
.TagId
);
2787 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
2789 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
2791 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2797 static enum ndr_err_code
ndr_push_svcctl_EnumDependentServicesW(struct ndr_push
*ndr
, int flags
, const struct svcctl_EnumDependentServicesW
*r
)
2799 if (flags
& NDR_IN
) {
2800 if (r
->in
.service
== NULL
) {
2801 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2803 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.service
));
2804 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr
, NDR_SCALARS
, r
->in
.state
));
2805 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
2807 if (flags
& NDR_OUT
) {
2808 if (r
->out
.service_status
== NULL
) {
2809 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2811 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
2812 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.service_status
, r
->in
.offered
));
2813 if (r
->out
.needed
== NULL
) {
2814 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
2817 if (r
->out
.services_returned
== NULL
) {
2818 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.services_returned
));
2821 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2823 return NDR_ERR_SUCCESS
;
2826 static enum ndr_err_code
ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull
*ndr
, int flags
, struct svcctl_EnumDependentServicesW
*r
)
2828 TALLOC_CTX
*_mem_save_service_0
;
2829 TALLOC_CTX
*_mem_save_needed_0
;
2830 TALLOC_CTX
*_mem_save_services_returned_0
;
2831 if (flags
& NDR_IN
) {
2832 ZERO_STRUCT(r
->out
);
2834 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2835 NDR_PULL_ALLOC(ndr
, r
->in
.service
);
2837 _mem_save_service_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2838 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service
, LIBNDR_FLAG_REF_ALLOC
);
2839 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.service
));
2840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_0
, LIBNDR_FLAG_REF_ALLOC
);
2841 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr
, NDR_SCALARS
, &r
->in
.state
));
2842 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
2843 if (r
->in
.offered
> 0x40000) {
2844 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2846 NDR_PULL_ALLOC_N(ndr
, r
->out
.service_status
, r
->in
.offered
);
2847 memset(r
->out
.service_status
, 0, (r
->in
.offered
) * sizeof(*r
->out
.service_status
));
2848 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
2849 ZERO_STRUCTP(r
->out
.needed
);
2850 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
2851 ZERO_STRUCTP(r
->out
.services_returned
);
2853 if (flags
& NDR_OUT
) {
2854 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.service_status
));
2855 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2856 NDR_PULL_ALLOC_N(ndr
, r
->out
.service_status
, ndr_get_array_size(ndr
, &r
->out
.service_status
));
2858 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.service_status
, ndr_get_array_size(ndr
, &r
->out
.service_status
)));
2859 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2860 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
2862 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2863 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
2864 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
2865 if (*r
->out
.needed
> 0x40000) {
2866 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2868 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
2869 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2870 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
2872 _mem_save_services_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2873 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.services_returned
, LIBNDR_FLAG_REF_ALLOC
);
2874 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.services_returned
));
2875 if (*r
->out
.services_returned
> 0x40000) {
2876 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2878 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_services_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
2879 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
2880 if (r
->out
.service_status
) {
2881 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.service_status
, r
->in
.offered
));
2884 return NDR_ERR_SUCCESS
;
2887 _PUBLIC_
void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_EnumDependentServicesW
*r
)
2889 ndr_print_struct(ndr
, name
, "svcctl_EnumDependentServicesW");
2891 if (flags
& NDR_SET_VALUES
) {
2892 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
2894 if (flags
& NDR_IN
) {
2895 ndr_print_struct(ndr
, "in", "svcctl_EnumDependentServicesW");
2897 ndr_print_ptr(ndr
, "service", r
->in
.service
);
2899 ndr_print_policy_handle(ndr
, "service", r
->in
.service
);
2901 ndr_print_svcctl_ServiceState(ndr
, "state", r
->in
.state
);
2902 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
2905 if (flags
& NDR_OUT
) {
2906 ndr_print_struct(ndr
, "out", "svcctl_EnumDependentServicesW");
2908 ndr_print_ptr(ndr
, "service_status", r
->out
.service_status
);
2910 ndr_print_array_uint8(ndr
, "service_status", r
->out
.service_status
, r
->in
.offered
);
2912 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
2914 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
2916 ndr_print_ptr(ndr
, "services_returned", r
->out
.services_returned
);
2918 ndr_print_uint32(ndr
, "services_returned", *r
->out
.services_returned
);
2920 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
2926 static enum ndr_err_code
ndr_push_svcctl_EnumServicesStatusW(struct ndr_push
*ndr
, int flags
, const struct svcctl_EnumServicesStatusW
*r
)
2928 if (flags
& NDR_IN
) {
2929 if (r
->in
.handle
== NULL
) {
2930 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2932 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2933 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
2934 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr
, NDR_SCALARS
, r
->in
.state
));
2935 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
2936 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.resume_handle
));
2937 if (r
->in
.resume_handle
) {
2938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
2941 if (flags
& NDR_OUT
) {
2942 if (r
->out
.service
== NULL
) {
2943 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2945 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
2946 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.service
, r
->in
.offered
));
2947 if (r
->out
.needed
== NULL
) {
2948 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2950 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
2951 if (r
->out
.services_returned
== NULL
) {
2952 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
2954 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.services_returned
));
2955 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.resume_handle
));
2956 if (r
->out
.resume_handle
) {
2957 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
2959 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
2961 return NDR_ERR_SUCCESS
;
2964 static enum ndr_err_code
ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull
*ndr
, int flags
, struct svcctl_EnumServicesStatusW
*r
)
2966 uint32_t _ptr_resume_handle
;
2967 TALLOC_CTX
*_mem_save_handle_0
;
2968 TALLOC_CTX
*_mem_save_needed_0
;
2969 TALLOC_CTX
*_mem_save_services_returned_0
;
2970 TALLOC_CTX
*_mem_save_resume_handle_0
;
2971 if (flags
& NDR_IN
) {
2972 ZERO_STRUCT(r
->out
);
2974 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
2975 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
2977 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2978 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
2979 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
2980 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
2981 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
2982 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr
, NDR_SCALARS
, &r
->in
.state
));
2983 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
2984 if (r
->in
.offered
> 0x40000) {
2985 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2987 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
2988 if (_ptr_resume_handle
) {
2989 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
2991 r
->in
.resume_handle
= NULL
;
2993 if (r
->in
.resume_handle
) {
2994 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2995 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, 0);
2996 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
2997 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
2999 NDR_PULL_ALLOC_N(ndr
, r
->out
.service
, r
->in
.offered
);
3000 memset(r
->out
.service
, 0, (r
->in
.offered
) * sizeof(*r
->out
.service
));
3001 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
3002 ZERO_STRUCTP(r
->out
.needed
);
3003 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
3004 ZERO_STRUCTP(r
->out
.services_returned
);
3006 if (flags
& NDR_OUT
) {
3007 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.service
));
3008 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3009 NDR_PULL_ALLOC_N(ndr
, r
->out
.service
, ndr_get_array_size(ndr
, &r
->out
.service
));
3011 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.service
, ndr_get_array_size(ndr
, &r
->out
.service
)));
3012 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3013 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
3015 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3016 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
3017 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
3018 if (*r
->out
.needed
> 0x40000) {
3019 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3021 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
3022 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3023 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
3025 _mem_save_services_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3026 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.services_returned
, LIBNDR_FLAG_REF_ALLOC
);
3027 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.services_returned
));
3028 if (*r
->out
.services_returned
> 0x40000) {
3029 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3031 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_services_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
3032 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
3033 if (_ptr_resume_handle
) {
3034 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
3036 r
->out
.resume_handle
= NULL
;
3038 if (r
->out
.resume_handle
) {
3039 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3040 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, 0);
3041 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
3042 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
3044 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3045 if (r
->out
.service
) {
3046 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.service
, r
->in
.offered
));
3049 return NDR_ERR_SUCCESS
;
3052 _PUBLIC_
void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_EnumServicesStatusW
*r
)
3054 ndr_print_struct(ndr
, name
, "svcctl_EnumServicesStatusW");
3056 if (flags
& NDR_SET_VALUES
) {
3057 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3059 if (flags
& NDR_IN
) {
3060 ndr_print_struct(ndr
, "in", "svcctl_EnumServicesStatusW");
3062 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3064 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3066 ndr_print_uint32(ndr
, "type", r
->in
.type
);
3067 ndr_print_svcctl_ServiceState(ndr
, "state", r
->in
.state
);
3068 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
3069 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
3071 if (r
->in
.resume_handle
) {
3072 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
3077 if (flags
& NDR_OUT
) {
3078 ndr_print_struct(ndr
, "out", "svcctl_EnumServicesStatusW");
3080 ndr_print_ptr(ndr
, "service", r
->out
.service
);
3082 ndr_print_array_uint8(ndr
, "service", r
->out
.service
, r
->in
.offered
);
3084 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
3086 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
3088 ndr_print_ptr(ndr
, "services_returned", r
->out
.services_returned
);
3090 ndr_print_uint32(ndr
, "services_returned", *r
->out
.services_returned
);
3092 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
3094 if (r
->out
.resume_handle
) {
3095 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
3098 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3104 static enum ndr_err_code
ndr_push_svcctl_OpenSCManagerW(struct ndr_push
*ndr
, int flags
, const struct svcctl_OpenSCManagerW
*r
)
3106 if (flags
& NDR_IN
) {
3107 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.MachineName
));
3108 if (r
->in
.MachineName
) {
3109 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.MachineName
, CH_UTF16
)));
3110 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3111 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.MachineName
, CH_UTF16
)));
3112 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.MachineName
, ndr_charset_length(r
->in
.MachineName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3114 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.DatabaseName
));
3115 if (r
->in
.DatabaseName
) {
3116 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DatabaseName
, CH_UTF16
)));
3117 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3118 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DatabaseName
, CH_UTF16
)));
3119 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.DatabaseName
, ndr_charset_length(r
->in
.DatabaseName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3121 NDR_CHECK(ndr_push_svcctl_MgrAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
3123 if (flags
& NDR_OUT
) {
3124 if (r
->out
.handle
== NULL
) {
3125 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3127 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3128 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3130 return NDR_ERR_SUCCESS
;
3133 static enum ndr_err_code
ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull
*ndr
, int flags
, struct svcctl_OpenSCManagerW
*r
)
3135 uint32_t _ptr_MachineName
;
3136 uint32_t _ptr_DatabaseName
;
3137 TALLOC_CTX
*_mem_save_MachineName_0
;
3138 TALLOC_CTX
*_mem_save_DatabaseName_0
;
3139 TALLOC_CTX
*_mem_save_handle_0
;
3140 if (flags
& NDR_IN
) {
3141 ZERO_STRUCT(r
->out
);
3143 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_MachineName
));
3144 if (_ptr_MachineName
) {
3145 NDR_PULL_ALLOC(ndr
, r
->in
.MachineName
);
3147 r
->in
.MachineName
= NULL
;
3149 if (r
->in
.MachineName
) {
3150 _mem_save_MachineName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3151 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.MachineName
, 0);
3152 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.MachineName
));
3153 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.MachineName
));
3154 if (ndr_get_array_length(ndr
, &r
->in
.MachineName
) > ndr_get_array_size(ndr
, &r
->in
.MachineName
)) {
3155 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
));
3157 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.MachineName
), sizeof(uint16_t)));
3158 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.MachineName
, ndr_get_array_length(ndr
, &r
->in
.MachineName
), sizeof(uint16_t), CH_UTF16
));
3159 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_MachineName_0
, 0);
3161 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_DatabaseName
));
3162 if (_ptr_DatabaseName
) {
3163 NDR_PULL_ALLOC(ndr
, r
->in
.DatabaseName
);
3165 r
->in
.DatabaseName
= NULL
;
3167 if (r
->in
.DatabaseName
) {
3168 _mem_save_DatabaseName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3169 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.DatabaseName
, 0);
3170 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.DatabaseName
));
3171 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.DatabaseName
));
3172 if (ndr_get_array_length(ndr
, &r
->in
.DatabaseName
) > ndr_get_array_size(ndr
, &r
->in
.DatabaseName
)) {
3173 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
));
3175 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.DatabaseName
), sizeof(uint16_t)));
3176 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.DatabaseName
, ndr_get_array_length(ndr
, &r
->in
.DatabaseName
), sizeof(uint16_t), CH_UTF16
));
3177 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_DatabaseName_0
, 0);
3179 NDR_CHECK(ndr_pull_svcctl_MgrAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
3180 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3181 ZERO_STRUCTP(r
->out
.handle
);
3183 if (flags
& NDR_OUT
) {
3184 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3185 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3187 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3188 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3189 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3190 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3191 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3193 return NDR_ERR_SUCCESS
;
3196 _PUBLIC_
void ndr_print_svcctl_OpenSCManagerW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_OpenSCManagerW
*r
)
3198 ndr_print_struct(ndr
, name
, "svcctl_OpenSCManagerW");
3200 if (flags
& NDR_SET_VALUES
) {
3201 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3203 if (flags
& NDR_IN
) {
3204 ndr_print_struct(ndr
, "in", "svcctl_OpenSCManagerW");
3206 ndr_print_ptr(ndr
, "MachineName", r
->in
.MachineName
);
3208 if (r
->in
.MachineName
) {
3209 ndr_print_string(ndr
, "MachineName", r
->in
.MachineName
);
3212 ndr_print_ptr(ndr
, "DatabaseName", r
->in
.DatabaseName
);
3214 if (r
->in
.DatabaseName
) {
3215 ndr_print_string(ndr
, "DatabaseName", r
->in
.DatabaseName
);
3218 ndr_print_svcctl_MgrAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
3221 if (flags
& NDR_OUT
) {
3222 ndr_print_struct(ndr
, "out", "svcctl_OpenSCManagerW");
3224 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
3226 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
3228 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3234 static enum ndr_err_code
ndr_push_svcctl_OpenServiceW(struct ndr_push
*ndr
, int flags
, const struct svcctl_OpenServiceW
*r
)
3236 if (flags
& NDR_IN
) {
3237 if (r
->in
.scmanager_handle
== NULL
) {
3238 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3240 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager_handle
));
3241 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
3242 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3243 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
3244 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.ServiceName
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
3245 NDR_CHECK(ndr_push_svcctl_ServiceAccessMask(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
3247 if (flags
& NDR_OUT
) {
3248 if (r
->out
.handle
== NULL
) {
3249 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3251 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3252 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3254 return NDR_ERR_SUCCESS
;
3257 static enum ndr_err_code
ndr_pull_svcctl_OpenServiceW(struct ndr_pull
*ndr
, int flags
, struct svcctl_OpenServiceW
*r
)
3259 TALLOC_CTX
*_mem_save_scmanager_handle_0
;
3260 TALLOC_CTX
*_mem_save_handle_0
;
3261 if (flags
& NDR_IN
) {
3262 ZERO_STRUCT(r
->out
);
3264 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3265 NDR_PULL_ALLOC(ndr
, r
->in
.scmanager_handle
);
3267 _mem_save_scmanager_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3268 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.scmanager_handle
, LIBNDR_FLAG_REF_ALLOC
);
3269 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager_handle
));
3270 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_scmanager_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3271 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.ServiceName
));
3272 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.ServiceName
));
3273 if (ndr_get_array_length(ndr
, &r
->in
.ServiceName
) > ndr_get_array_size(ndr
, &r
->in
.ServiceName
)) {
3274 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
));
3276 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t)));
3277 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.ServiceName
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t), CH_UTF16
));
3278 NDR_CHECK(ndr_pull_svcctl_ServiceAccessMask(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
3279 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3280 ZERO_STRUCTP(r
->out
.handle
);
3282 if (flags
& NDR_OUT
) {
3283 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3284 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
3286 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3287 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3288 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
3289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3290 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3292 return NDR_ERR_SUCCESS
;
3295 _PUBLIC_
void ndr_print_svcctl_OpenServiceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_OpenServiceW
*r
)
3297 ndr_print_struct(ndr
, name
, "svcctl_OpenServiceW");
3299 if (flags
& NDR_SET_VALUES
) {
3300 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3302 if (flags
& NDR_IN
) {
3303 ndr_print_struct(ndr
, "in", "svcctl_OpenServiceW");
3305 ndr_print_ptr(ndr
, "scmanager_handle", r
->in
.scmanager_handle
);
3307 ndr_print_policy_handle(ndr
, "scmanager_handle", r
->in
.scmanager_handle
);
3309 ndr_print_string(ndr
, "ServiceName", r
->in
.ServiceName
);
3310 ndr_print_svcctl_ServiceAccessMask(ndr
, "access_mask", r
->in
.access_mask
);
3313 if (flags
& NDR_OUT
) {
3314 ndr_print_struct(ndr
, "out", "svcctl_OpenServiceW");
3316 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
3318 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
3320 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3326 static enum ndr_err_code
ndr_push_svcctl_QueryServiceConfigW(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceConfigW
*r
)
3328 if (flags
& NDR_IN
) {
3329 if (r
->in
.handle
== NULL
) {
3330 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3332 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3333 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
3335 if (flags
& NDR_OUT
) {
3336 if (r
->out
.query
== NULL
) {
3337 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3339 NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.query
));
3340 if (r
->out
.needed
== NULL
) {
3341 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3343 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
3344 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3346 return NDR_ERR_SUCCESS
;
3349 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceConfigW
*r
)
3351 TALLOC_CTX
*_mem_save_handle_0
;
3352 TALLOC_CTX
*_mem_save_query_0
;
3353 TALLOC_CTX
*_mem_save_needed_0
;
3354 if (flags
& NDR_IN
) {
3355 ZERO_STRUCT(r
->out
);
3357 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3358 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3360 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3361 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3362 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3363 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3364 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
3365 if (r
->in
.offered
> 8192) {
3366 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3368 NDR_PULL_ALLOC(ndr
, r
->out
.query
);
3369 ZERO_STRUCTP(r
->out
.query
);
3370 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
3371 ZERO_STRUCTP(r
->out
.needed
);
3373 if (flags
& NDR_OUT
) {
3374 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3375 NDR_PULL_ALLOC(ndr
, r
->out
.query
);
3377 _mem_save_query_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3378 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.query
, LIBNDR_FLAG_REF_ALLOC
);
3379 NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.query
));
3380 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_query_0
, LIBNDR_FLAG_REF_ALLOC
);
3381 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3382 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
3384 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3385 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
3386 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
3387 if (*r
->out
.needed
> 8192) {
3388 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
3391 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3393 return NDR_ERR_SUCCESS
;
3396 _PUBLIC_
void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceConfigW
*r
)
3398 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceConfigW");
3400 if (flags
& NDR_SET_VALUES
) {
3401 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3403 if (flags
& NDR_IN
) {
3404 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceConfigW");
3406 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3408 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3410 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
3413 if (flags
& NDR_OUT
) {
3414 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceConfigW");
3416 ndr_print_ptr(ndr
, "query", r
->out
.query
);
3418 ndr_print_QUERY_SERVICE_CONFIG(ndr
, "query", r
->out
.query
);
3420 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
3422 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
3424 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3430 static enum ndr_err_code
ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceLockStatusW
*r
)
3432 if (flags
& NDR_IN
) {
3433 if (r
->in
.handle
== NULL
) {
3434 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3436 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
3439 if (flags
& NDR_OUT
) {
3440 if (r
->out
.lock_status
== NULL
) {
3441 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3443 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.lock_status
));
3444 if (r
->out
.needed
== NULL
) {
3445 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3447 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
3448 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3450 return NDR_ERR_SUCCESS
;
3453 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceLockStatusW
*r
)
3455 TALLOC_CTX
*_mem_save_handle_0
;
3456 TALLOC_CTX
*_mem_save_lock_status_0
;
3457 TALLOC_CTX
*_mem_save_needed_0
;
3458 if (flags
& NDR_IN
) {
3459 ZERO_STRUCT(r
->out
);
3461 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3462 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3464 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3465 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3466 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3467 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3468 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
3469 NDR_PULL_ALLOC(ndr
, r
->out
.lock_status
);
3470 ZERO_STRUCTP(r
->out
.lock_status
);
3471 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
3472 ZERO_STRUCTP(r
->out
.needed
);
3474 if (flags
& NDR_OUT
) {
3475 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3476 NDR_PULL_ALLOC(ndr
, r
->out
.lock_status
);
3478 _mem_save_lock_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3479 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.lock_status
, LIBNDR_FLAG_REF_ALLOC
);
3480 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.lock_status
));
3481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lock_status_0
, LIBNDR_FLAG_REF_ALLOC
);
3482 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3483 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
3485 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3486 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
3487 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
3488 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
3489 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3491 return NDR_ERR_SUCCESS
;
3494 _PUBLIC_
void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceLockStatusW
*r
)
3496 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceLockStatusW");
3498 if (flags
& NDR_SET_VALUES
) {
3499 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3501 if (flags
& NDR_IN
) {
3502 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceLockStatusW");
3504 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3506 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3508 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
3511 if (flags
& NDR_OUT
) {
3512 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceLockStatusW");
3514 ndr_print_ptr(ndr
, "lock_status", r
->out
.lock_status
);
3516 ndr_print_SERVICE_LOCK_STATUS(ndr
, "lock_status", r
->out
.lock_status
);
3518 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
3520 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
3522 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3528 static enum ndr_err_code
ndr_push_svcctl_StartServiceW(struct ndr_push
*ndr
, int flags
, const struct svcctl_StartServiceW
*r
)
3530 uint32_t cntr_Arguments_1
;
3531 if (flags
& NDR_IN
) {
3532 if (r
->in
.handle
== NULL
) {
3533 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3535 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.NumArgs
));
3537 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Arguments
));
3538 if (r
->in
.Arguments
) {
3539 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.NumArgs
));
3540 for (cntr_Arguments_1
= 0; cntr_Arguments_1
< r
->in
.NumArgs
; cntr_Arguments_1
++) {
3541 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr
, NDR_SCALARS
, &r
->in
.Arguments
[cntr_Arguments_1
]));
3543 for (cntr_Arguments_1
= 0; cntr_Arguments_1
< r
->in
.NumArgs
; cntr_Arguments_1
++) {
3544 NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr
, NDR_BUFFERS
, &r
->in
.Arguments
[cntr_Arguments_1
]));
3548 if (flags
& NDR_OUT
) {
3549 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3551 return NDR_ERR_SUCCESS
;
3554 static enum ndr_err_code
ndr_pull_svcctl_StartServiceW(struct ndr_pull
*ndr
, int flags
, struct svcctl_StartServiceW
*r
)
3556 uint32_t _ptr_Arguments
;
3557 uint32_t cntr_Arguments_1
;
3558 TALLOC_CTX
*_mem_save_handle_0
;
3559 TALLOC_CTX
*_mem_save_Arguments_0
;
3560 TALLOC_CTX
*_mem_save_Arguments_1
;
3561 if (flags
& NDR_IN
) {
3562 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3563 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3565 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3566 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3567 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3568 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3569 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.NumArgs
));
3570 if (r
->in
.NumArgs
> SC_MAX_ARGUMENTS
) {
3571 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3573 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Arguments
));
3574 if (_ptr_Arguments
) {
3575 NDR_PULL_ALLOC(ndr
, r
->in
.Arguments
);
3577 r
->in
.Arguments
= NULL
;
3579 if (r
->in
.Arguments
) {
3580 _mem_save_Arguments_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3581 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Arguments
, 0);
3582 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Arguments
));
3583 NDR_PULL_ALLOC_N(ndr
, r
->in
.Arguments
, ndr_get_array_size(ndr
, &r
->in
.Arguments
));
3584 _mem_save_Arguments_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3585 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Arguments
, 0);
3586 for (cntr_Arguments_1
= 0; cntr_Arguments_1
< r
->in
.NumArgs
; cntr_Arguments_1
++) {
3587 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr
, NDR_SCALARS
, &r
->in
.Arguments
[cntr_Arguments_1
]));
3589 for (cntr_Arguments_1
= 0; cntr_Arguments_1
< r
->in
.NumArgs
; cntr_Arguments_1
++) {
3590 NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr
, NDR_BUFFERS
, &r
->in
.Arguments
[cntr_Arguments_1
]));
3592 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Arguments_1
, 0);
3593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Arguments_0
, 0);
3595 if (r
->in
.Arguments
) {
3596 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.Arguments
, r
->in
.NumArgs
));
3599 if (flags
& NDR_OUT
) {
3600 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3602 return NDR_ERR_SUCCESS
;
3605 _PUBLIC_
void ndr_print_svcctl_StartServiceW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_StartServiceW
*r
)
3607 uint32_t cntr_Arguments_1
;
3608 ndr_print_struct(ndr
, name
, "svcctl_StartServiceW");
3610 if (flags
& NDR_SET_VALUES
) {
3611 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3613 if (flags
& NDR_IN
) {
3614 ndr_print_struct(ndr
, "in", "svcctl_StartServiceW");
3616 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3618 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3620 ndr_print_uint32(ndr
, "NumArgs", r
->in
.NumArgs
);
3621 ndr_print_ptr(ndr
, "Arguments", r
->in
.Arguments
);
3623 if (r
->in
.Arguments
) {
3624 ndr
->print(ndr
, "%s: ARRAY(%d)", "Arguments", (int)r
->in
.NumArgs
);
3626 for (cntr_Arguments_1
=0;cntr_Arguments_1
<r
->in
.NumArgs
;cntr_Arguments_1
++) {
3628 if (asprintf(&idx_1
, "[%d]", cntr_Arguments_1
) != -1) {
3629 ndr_print_svcctl_ArgumentString(ndr
, "Arguments", &r
->in
.Arguments
[cntr_Arguments_1
]);
3638 if (flags
& NDR_OUT
) {
3639 ndr_print_struct(ndr
, "out", "svcctl_StartServiceW");
3641 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3647 static enum ndr_err_code
ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push
*ndr
, int flags
, const struct svcctl_GetServiceDisplayNameW
*r
)
3649 if (flags
& NDR_IN
) {
3650 if (r
->in
.handle
== NULL
) {
3651 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3653 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3654 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_name
));
3655 if (r
->in
.service_name
) {
3656 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
3657 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3658 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
3659 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
));
3661 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.display_name_length
));
3662 if (r
->in
.display_name_length
) {
3663 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.display_name_length
));
3666 if (flags
& NDR_OUT
) {
3667 if (r
->out
.display_name
== NULL
) {
3668 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3670 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.display_name
));
3671 if (*r
->out
.display_name
) {
3672 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.display_name
, CH_UTF16
)));
3673 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3674 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.display_name
, CH_UTF16
)));
3675 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
));
3677 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.display_name_length
));
3678 if (r
->out
.display_name_length
) {
3679 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.display_name_length
));
3681 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3683 return NDR_ERR_SUCCESS
;
3686 static enum ndr_err_code
ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull
*ndr
, int flags
, struct svcctl_GetServiceDisplayNameW
*r
)
3688 uint32_t _ptr_service_name
;
3689 uint32_t _ptr_display_name
;
3690 uint32_t _ptr_display_name_length
;
3691 TALLOC_CTX
*_mem_save_handle_0
;
3692 TALLOC_CTX
*_mem_save_service_name_0
;
3693 TALLOC_CTX
*_mem_save_display_name_0
;
3694 TALLOC_CTX
*_mem_save_display_name_1
;
3695 TALLOC_CTX
*_mem_save_display_name_length_0
;
3696 if (flags
& NDR_IN
) {
3697 ZERO_STRUCT(r
->out
);
3699 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3700 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3702 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3703 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3704 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3705 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3706 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_name
));
3707 if (_ptr_service_name
) {
3708 NDR_PULL_ALLOC(ndr
, r
->in
.service_name
);
3710 r
->in
.service_name
= NULL
;
3712 if (r
->in
.service_name
) {
3713 _mem_save_service_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3714 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_name
, 0);
3715 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_name
));
3716 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_name
));
3717 if (ndr_get_array_length(ndr
, &r
->in
.service_name
) > ndr_get_array_size(ndr
, &r
->in
.service_name
)) {
3718 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
));
3720 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_name
), sizeof(uint16_t)));
3721 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
));
3722 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_name_0
, 0);
3724 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
3725 if (_ptr_display_name_length
) {
3726 NDR_PULL_ALLOC(ndr
, r
->in
.display_name_length
);
3728 r
->in
.display_name_length
= NULL
;
3730 if (r
->in
.display_name_length
) {
3731 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3732 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.display_name_length
, 0);
3733 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.display_name_length
));
3734 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
3736 NDR_PULL_ALLOC(ndr
, r
->out
.display_name
);
3737 ZERO_STRUCTP(r
->out
.display_name
);
3739 if (flags
& NDR_OUT
) {
3740 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3741 NDR_PULL_ALLOC(ndr
, r
->out
.display_name
);
3743 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3744 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.display_name
, LIBNDR_FLAG_REF_ALLOC
);
3745 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
3746 if (_ptr_display_name
) {
3747 NDR_PULL_ALLOC(ndr
, *r
->out
.display_name
);
3749 *r
->out
.display_name
= NULL
;
3751 if (*r
->out
.display_name
) {
3752 _mem_save_display_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3753 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.display_name
, 0);
3754 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.display_name
));
3755 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.display_name
));
3756 if (ndr_get_array_length(ndr
, r
->out
.display_name
) > ndr_get_array_size(ndr
, r
->out
.display_name
)) {
3757 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
));
3759 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.display_name
), sizeof(uint16_t)));
3760 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
));
3761 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_1
, 0);
3763 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, LIBNDR_FLAG_REF_ALLOC
);
3764 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
3765 if (_ptr_display_name_length
) {
3766 NDR_PULL_ALLOC(ndr
, r
->out
.display_name_length
);
3768 r
->out
.display_name_length
= NULL
;
3770 if (r
->out
.display_name_length
) {
3771 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3772 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.display_name_length
, 0);
3773 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.display_name_length
));
3774 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
3776 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3778 return NDR_ERR_SUCCESS
;
3781 _PUBLIC_
void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_GetServiceDisplayNameW
*r
)
3783 ndr_print_struct(ndr
, name
, "svcctl_GetServiceDisplayNameW");
3785 if (flags
& NDR_SET_VALUES
) {
3786 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3788 if (flags
& NDR_IN
) {
3789 ndr_print_struct(ndr
, "in", "svcctl_GetServiceDisplayNameW");
3791 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3793 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3795 ndr_print_ptr(ndr
, "service_name", r
->in
.service_name
);
3797 if (r
->in
.service_name
) {
3798 ndr_print_string(ndr
, "service_name", r
->in
.service_name
);
3801 ndr_print_ptr(ndr
, "display_name_length", r
->in
.display_name_length
);
3803 if (r
->in
.display_name_length
) {
3804 ndr_print_uint32(ndr
, "display_name_length", *r
->in
.display_name_length
);
3809 if (flags
& NDR_OUT
) {
3810 ndr_print_struct(ndr
, "out", "svcctl_GetServiceDisplayNameW");
3812 ndr_print_ptr(ndr
, "display_name", r
->out
.display_name
);
3814 ndr_print_ptr(ndr
, "display_name", *r
->out
.display_name
);
3816 if (*r
->out
.display_name
) {
3817 ndr_print_string(ndr
, "display_name", *r
->out
.display_name
);
3821 ndr_print_ptr(ndr
, "display_name_length", r
->out
.display_name_length
);
3823 if (r
->out
.display_name_length
) {
3824 ndr_print_uint32(ndr
, "display_name_length", *r
->out
.display_name_length
);
3827 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
3833 static enum ndr_err_code
ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push
*ndr
, int flags
, const struct svcctl_GetServiceKeyNameW
*r
)
3835 if (flags
& NDR_IN
) {
3836 if (r
->in
.handle
== NULL
) {
3837 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3839 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3840 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_name
));
3841 if (r
->in
.service_name
) {
3842 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
3843 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3844 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
3845 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
));
3847 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.display_name_length
));
3848 if (r
->in
.display_name_length
) {
3849 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.display_name_length
));
3852 if (flags
& NDR_OUT
) {
3853 if (r
->out
.key_name
== NULL
) {
3854 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
3856 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.key_name
));
3857 if (*r
->out
.key_name
) {
3858 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.key_name
, CH_UTF16
)));
3859 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
3860 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.key_name
, CH_UTF16
)));
3861 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
));
3863 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.display_name_length
));
3864 if (r
->out
.display_name_length
) {
3865 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.display_name_length
));
3867 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
3869 return NDR_ERR_SUCCESS
;
3872 static enum ndr_err_code
ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull
*ndr
, int flags
, struct svcctl_GetServiceKeyNameW
*r
)
3874 uint32_t _ptr_service_name
;
3875 uint32_t _ptr_key_name
;
3876 uint32_t _ptr_display_name_length
;
3877 TALLOC_CTX
*_mem_save_handle_0
;
3878 TALLOC_CTX
*_mem_save_service_name_0
;
3879 TALLOC_CTX
*_mem_save_key_name_0
;
3880 TALLOC_CTX
*_mem_save_key_name_1
;
3881 TALLOC_CTX
*_mem_save_display_name_length_0
;
3882 if (flags
& NDR_IN
) {
3883 ZERO_STRUCT(r
->out
);
3885 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3886 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
3888 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3889 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
3890 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
3891 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
3892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_name
));
3893 if (_ptr_service_name
) {
3894 NDR_PULL_ALLOC(ndr
, r
->in
.service_name
);
3896 r
->in
.service_name
= NULL
;
3898 if (r
->in
.service_name
) {
3899 _mem_save_service_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3900 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_name
, 0);
3901 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_name
));
3902 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_name
));
3903 if (ndr_get_array_length(ndr
, &r
->in
.service_name
) > ndr_get_array_size(ndr
, &r
->in
.service_name
)) {
3904 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
));
3906 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_name
), sizeof(uint16_t)));
3907 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
));
3908 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_name_0
, 0);
3910 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
3911 if (_ptr_display_name_length
) {
3912 NDR_PULL_ALLOC(ndr
, r
->in
.display_name_length
);
3914 r
->in
.display_name_length
= NULL
;
3916 if (r
->in
.display_name_length
) {
3917 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3918 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.display_name_length
, 0);
3919 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.display_name_length
));
3920 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
3922 NDR_PULL_ALLOC(ndr
, r
->out
.key_name
);
3923 ZERO_STRUCTP(r
->out
.key_name
);
3925 if (flags
& NDR_OUT
) {
3926 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
3927 NDR_PULL_ALLOC(ndr
, r
->out
.key_name
);
3929 _mem_save_key_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3930 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.key_name
, LIBNDR_FLAG_REF_ALLOC
);
3931 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_key_name
));
3932 if (_ptr_key_name
) {
3933 NDR_PULL_ALLOC(ndr
, *r
->out
.key_name
);
3935 *r
->out
.key_name
= NULL
;
3937 if (*r
->out
.key_name
) {
3938 _mem_save_key_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
3939 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.key_name
, 0);
3940 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.key_name
));
3941 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.key_name
));
3942 if (ndr_get_array_length(ndr
, r
->out
.key_name
) > ndr_get_array_size(ndr
, r
->out
.key_name
)) {
3943 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
));
3945 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.key_name
), sizeof(uint16_t)));
3946 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
));
3947 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_name_1
, 0);
3949 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_name_0
, LIBNDR_FLAG_REF_ALLOC
);
3950 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
3951 if (_ptr_display_name_length
) {
3952 NDR_PULL_ALLOC(ndr
, r
->out
.display_name_length
);
3954 r
->out
.display_name_length
= NULL
;
3956 if (r
->out
.display_name_length
) {
3957 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3958 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.display_name_length
, 0);
3959 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.display_name_length
));
3960 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
3962 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
3964 return NDR_ERR_SUCCESS
;
3967 _PUBLIC_
void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_GetServiceKeyNameW
*r
)
3969 ndr_print_struct(ndr
, name
, "svcctl_GetServiceKeyNameW");
3971 if (flags
& NDR_SET_VALUES
) {
3972 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
3974 if (flags
& NDR_IN
) {
3975 ndr_print_struct(ndr
, "in", "svcctl_GetServiceKeyNameW");
3977 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
3979 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
3981 ndr_print_ptr(ndr
, "service_name", r
->in
.service_name
);
3983 if (r
->in
.service_name
) {
3984 ndr_print_string(ndr
, "service_name", r
->in
.service_name
);
3987 ndr_print_ptr(ndr
, "display_name_length", r
->in
.display_name_length
);
3989 if (r
->in
.display_name_length
) {
3990 ndr_print_uint32(ndr
, "display_name_length", *r
->in
.display_name_length
);
3995 if (flags
& NDR_OUT
) {
3996 ndr_print_struct(ndr
, "out", "svcctl_GetServiceKeyNameW");
3998 ndr_print_ptr(ndr
, "key_name", r
->out
.key_name
);
4000 ndr_print_ptr(ndr
, "key_name", *r
->out
.key_name
);
4002 if (*r
->out
.key_name
) {
4003 ndr_print_string(ndr
, "key_name", *r
->out
.key_name
);
4007 ndr_print_ptr(ndr
, "display_name_length", r
->out
.display_name_length
);
4009 if (r
->out
.display_name_length
) {
4010 ndr_print_uint32(ndr
, "display_name_length", *r
->out
.display_name_length
);
4013 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4019 static enum ndr_err_code
ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push
*ndr
, int flags
, const struct svcctl_SCSetServiceBitsA
*r
)
4021 if (flags
& NDR_IN
) {
4022 if (r
->in
.handle
== NULL
) {
4023 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4025 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4026 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bits
));
4027 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bitson
));
4028 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.immediate
));
4030 if (flags
& NDR_OUT
) {
4031 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4033 return NDR_ERR_SUCCESS
;
4036 static enum ndr_err_code
ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull
*ndr
, int flags
, struct svcctl_SCSetServiceBitsA
*r
)
4038 TALLOC_CTX
*_mem_save_handle_0
;
4039 if (flags
& NDR_IN
) {
4040 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4041 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
4043 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4044 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
4045 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4046 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
4047 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bits
));
4048 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bitson
));
4049 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.immediate
));
4051 if (flags
& NDR_OUT
) {
4052 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4054 return NDR_ERR_SUCCESS
;
4057 _PUBLIC_
void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_SCSetServiceBitsA
*r
)
4059 ndr_print_struct(ndr
, name
, "svcctl_SCSetServiceBitsA");
4061 if (flags
& NDR_SET_VALUES
) {
4062 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4064 if (flags
& NDR_IN
) {
4065 ndr_print_struct(ndr
, "in", "svcctl_SCSetServiceBitsA");
4067 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
4069 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
4071 ndr_print_uint32(ndr
, "bits", r
->in
.bits
);
4072 ndr_print_uint32(ndr
, "bitson", r
->in
.bitson
);
4073 ndr_print_uint32(ndr
, "immediate", r
->in
.immediate
);
4076 if (flags
& NDR_OUT
) {
4077 ndr_print_struct(ndr
, "out", "svcctl_SCSetServiceBitsA");
4079 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4085 static enum ndr_err_code
ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push
*ndr
, int flags
, const struct svcctl_ChangeServiceConfigA
*r
)
4087 if (flags
& NDR_IN
) {
4088 if (r
->in
.handle
== NULL
) {
4089 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4091 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4092 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
4093 NDR_CHECK(ndr_push_svcctl_StartType(ndr
, NDR_SCALARS
, r
->in
.start_type
));
4094 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr
, NDR_SCALARS
, r
->in
.error_control
));
4095 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.binary_path
));
4096 if (r
->in
.binary_path
) {
4097 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
4098 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4099 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
4100 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
));
4102 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.load_order_group
));
4103 if (r
->in
.load_order_group
) {
4104 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.load_order_group
, CH_UTF16
)));
4105 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4106 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.load_order_group
, CH_UTF16
)));
4107 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
));
4109 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.dependencies
));
4110 if (r
->in
.dependencies
) {
4111 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
)));
4112 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4113 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
)));
4114 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dependencies
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4116 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_start_name
));
4117 if (r
->in
.service_start_name
) {
4118 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
4119 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4120 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
4121 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
));
4123 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
4124 if (r
->in
.password
) {
4125 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
4126 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4127 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
4128 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.password
, ndr_charset_length(r
->in
.password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4130 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.display_name
));
4131 if (r
->in
.display_name
) {
4132 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.display_name
, CH_UTF16
)));
4133 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4134 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.display_name
, CH_UTF16
)));
4135 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
));
4138 if (flags
& NDR_OUT
) {
4139 if (r
->out
.tag_id
== NULL
) {
4140 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4142 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.tag_id
));
4143 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4145 return NDR_ERR_SUCCESS
;
4148 static enum ndr_err_code
ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull
*ndr
, int flags
, struct svcctl_ChangeServiceConfigA
*r
)
4150 uint32_t _ptr_binary_path
;
4151 uint32_t _ptr_load_order_group
;
4152 uint32_t _ptr_dependencies
;
4153 uint32_t _ptr_service_start_name
;
4154 uint32_t _ptr_password
;
4155 uint32_t _ptr_display_name
;
4156 TALLOC_CTX
*_mem_save_handle_0
;
4157 TALLOC_CTX
*_mem_save_binary_path_0
;
4158 TALLOC_CTX
*_mem_save_load_order_group_0
;
4159 TALLOC_CTX
*_mem_save_tag_id_0
;
4160 TALLOC_CTX
*_mem_save_dependencies_0
;
4161 TALLOC_CTX
*_mem_save_service_start_name_0
;
4162 TALLOC_CTX
*_mem_save_password_0
;
4163 TALLOC_CTX
*_mem_save_display_name_0
;
4164 if (flags
& NDR_IN
) {
4165 ZERO_STRUCT(r
->out
);
4167 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4168 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
4170 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4171 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
4172 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
4174 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
4175 NDR_CHECK(ndr_pull_svcctl_StartType(ndr
, NDR_SCALARS
, &r
->in
.start_type
));
4176 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr
, NDR_SCALARS
, &r
->in
.error_control
));
4177 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_binary_path
));
4178 if (_ptr_binary_path
) {
4179 NDR_PULL_ALLOC(ndr
, r
->in
.binary_path
);
4181 r
->in
.binary_path
= NULL
;
4183 if (r
->in
.binary_path
) {
4184 _mem_save_binary_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4185 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.binary_path
, 0);
4186 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.binary_path
));
4187 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.binary_path
));
4188 if (ndr_get_array_length(ndr
, &r
->in
.binary_path
) > ndr_get_array_size(ndr
, &r
->in
.binary_path
)) {
4189 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
));
4191 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.binary_path
), sizeof(uint16_t)));
4192 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
));
4193 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_binary_path_0
, 0);
4195 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_load_order_group
));
4196 if (_ptr_load_order_group
) {
4197 NDR_PULL_ALLOC(ndr
, r
->in
.load_order_group
);
4199 r
->in
.load_order_group
= NULL
;
4201 if (r
->in
.load_order_group
) {
4202 _mem_save_load_order_group_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4203 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.load_order_group
, 0);
4204 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.load_order_group
));
4205 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.load_order_group
));
4206 if (ndr_get_array_length(ndr
, &r
->in
.load_order_group
) > ndr_get_array_size(ndr
, &r
->in
.load_order_group
)) {
4207 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
));
4209 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.load_order_group
), sizeof(uint16_t)));
4210 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
));
4211 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_load_order_group_0
, 0);
4213 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependencies
));
4214 if (_ptr_dependencies
) {
4215 NDR_PULL_ALLOC(ndr
, r
->in
.dependencies
);
4217 r
->in
.dependencies
= NULL
;
4219 if (r
->in
.dependencies
) {
4220 _mem_save_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4221 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dependencies
, 0);
4222 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dependencies
));
4223 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dependencies
));
4224 if (ndr_get_array_length(ndr
, &r
->in
.dependencies
) > ndr_get_array_size(ndr
, &r
->in
.dependencies
)) {
4225 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
));
4227 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dependencies
), sizeof(uint16_t)));
4228 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dependencies
, ndr_get_array_length(ndr
, &r
->in
.dependencies
), sizeof(uint16_t), CH_UTF16
));
4229 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependencies_0
, 0);
4231 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_start_name
));
4232 if (_ptr_service_start_name
) {
4233 NDR_PULL_ALLOC(ndr
, r
->in
.service_start_name
);
4235 r
->in
.service_start_name
= NULL
;
4237 if (r
->in
.service_start_name
) {
4238 _mem_save_service_start_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4239 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_start_name
, 0);
4240 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_start_name
));
4241 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_start_name
));
4242 if (ndr_get_array_length(ndr
, &r
->in
.service_start_name
) > ndr_get_array_size(ndr
, &r
->in
.service_start_name
)) {
4243 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
));
4245 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_start_name
), sizeof(uint16_t)));
4246 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
));
4247 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_start_name_0
, 0);
4249 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
4250 if (_ptr_password
) {
4251 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
4253 r
->in
.password
= NULL
;
4255 if (r
->in
.password
) {
4256 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4257 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
4258 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.password
));
4259 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.password
));
4260 if (ndr_get_array_length(ndr
, &r
->in
.password
) > ndr_get_array_size(ndr
, &r
->in
.password
)) {
4261 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
));
4263 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t)));
4264 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.password
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t), CH_UTF16
));
4265 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
4267 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
4268 if (_ptr_display_name
) {
4269 NDR_PULL_ALLOC(ndr
, r
->in
.display_name
);
4271 r
->in
.display_name
= NULL
;
4273 if (r
->in
.display_name
) {
4274 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4275 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.display_name
, 0);
4276 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.display_name
));
4277 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.display_name
));
4278 if (ndr_get_array_length(ndr
, &r
->in
.display_name
) > ndr_get_array_size(ndr
, &r
->in
.display_name
)) {
4279 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
));
4281 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.display_name
), sizeof(uint16_t)));
4282 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
));
4283 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
4285 NDR_PULL_ALLOC(ndr
, r
->out
.tag_id
);
4286 ZERO_STRUCTP(r
->out
.tag_id
);
4288 if (flags
& NDR_OUT
) {
4289 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4290 NDR_PULL_ALLOC(ndr
, r
->out
.tag_id
);
4292 _mem_save_tag_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4293 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.tag_id
, LIBNDR_FLAG_REF_ALLOC
);
4294 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.tag_id
));
4295 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_tag_id_0
, LIBNDR_FLAG_REF_ALLOC
);
4296 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4298 return NDR_ERR_SUCCESS
;
4301 _PUBLIC_
void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_ChangeServiceConfigA
*r
)
4303 ndr_print_struct(ndr
, name
, "svcctl_ChangeServiceConfigA");
4305 if (flags
& NDR_SET_VALUES
) {
4306 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4308 if (flags
& NDR_IN
) {
4309 ndr_print_struct(ndr
, "in", "svcctl_ChangeServiceConfigA");
4311 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
4313 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
4315 ndr_print_uint32(ndr
, "type", r
->in
.type
);
4316 ndr_print_svcctl_StartType(ndr
, "start_type", r
->in
.start_type
);
4317 ndr_print_svcctl_ErrorControl(ndr
, "error_control", r
->in
.error_control
);
4318 ndr_print_ptr(ndr
, "binary_path", r
->in
.binary_path
);
4320 if (r
->in
.binary_path
) {
4321 ndr_print_string(ndr
, "binary_path", r
->in
.binary_path
);
4324 ndr_print_ptr(ndr
, "load_order_group", r
->in
.load_order_group
);
4326 if (r
->in
.load_order_group
) {
4327 ndr_print_string(ndr
, "load_order_group", r
->in
.load_order_group
);
4330 ndr_print_ptr(ndr
, "dependencies", r
->in
.dependencies
);
4332 if (r
->in
.dependencies
) {
4333 ndr_print_string(ndr
, "dependencies", r
->in
.dependencies
);
4336 ndr_print_ptr(ndr
, "service_start_name", r
->in
.service_start_name
);
4338 if (r
->in
.service_start_name
) {
4339 ndr_print_string(ndr
, "service_start_name", r
->in
.service_start_name
);
4342 ndr_print_ptr(ndr
, "password", r
->in
.password
);
4344 if (r
->in
.password
) {
4345 ndr_print_string(ndr
, "password", r
->in
.password
);
4348 ndr_print_ptr(ndr
, "display_name", r
->in
.display_name
);
4350 if (r
->in
.display_name
) {
4351 ndr_print_string(ndr
, "display_name", r
->in
.display_name
);
4356 if (flags
& NDR_OUT
) {
4357 ndr_print_struct(ndr
, "out", "svcctl_ChangeServiceConfigA");
4359 ndr_print_ptr(ndr
, "tag_id", r
->out
.tag_id
);
4361 ndr_print_uint32(ndr
, "tag_id", *r
->out
.tag_id
);
4363 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4369 static enum ndr_err_code
ndr_push_svcctl_CreateServiceA(struct ndr_push
*ndr
, int flags
, const struct svcctl_CreateServiceA
*r
)
4371 if (flags
& NDR_IN
) {
4372 if (r
->in
.handle
== NULL
) {
4373 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4375 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4376 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.ServiceName
));
4377 if (r
->in
.ServiceName
) {
4378 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
4379 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4380 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
4381 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.ServiceName
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4383 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.DisplayName
));
4384 if (r
->in
.DisplayName
) {
4385 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DisplayName
, CH_UTF16
)));
4386 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4387 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DisplayName
, CH_UTF16
)));
4388 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.DisplayName
, ndr_charset_length(r
->in
.DisplayName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4390 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.desired_access
));
4391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
4392 NDR_CHECK(ndr_push_svcctl_StartType(ndr
, NDR_SCALARS
, r
->in
.start_type
));
4393 NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr
, NDR_SCALARS
, r
->in
.error_control
));
4394 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.binary_path
));
4395 if (r
->in
.binary_path
) {
4396 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
4397 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4398 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.binary_path
, CH_UTF16
)));
4399 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
));
4401 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.LoadOrderGroupKey
));
4402 if (r
->in
.LoadOrderGroupKey
) {
4403 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.LoadOrderGroupKey
, CH_UTF16
)));
4404 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4405 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.LoadOrderGroupKey
, CH_UTF16
)));
4406 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.LoadOrderGroupKey
, ndr_charset_length(r
->in
.LoadOrderGroupKey
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4408 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.dependencies
));
4409 if (r
->in
.dependencies
) {
4410 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
)));
4411 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4412 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
)));
4413 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.dependencies
, ndr_charset_length(r
->in
.dependencies
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4415 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_start_name
));
4416 if (r
->in
.service_start_name
) {
4417 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
4418 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4419 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_start_name
, CH_UTF16
)));
4420 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
));
4422 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.password
));
4423 if (r
->in
.password
) {
4424 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
4425 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4426 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.password
, CH_UTF16
)));
4427 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.password
, ndr_charset_length(r
->in
.password
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4430 if (flags
& NDR_OUT
) {
4431 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.TagId
));
4433 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.TagId
));
4435 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4437 return NDR_ERR_SUCCESS
;
4440 static enum ndr_err_code
ndr_pull_svcctl_CreateServiceA(struct ndr_pull
*ndr
, int flags
, struct svcctl_CreateServiceA
*r
)
4442 uint32_t _ptr_ServiceName
;
4443 uint32_t _ptr_DisplayName
;
4444 uint32_t _ptr_binary_path
;
4445 uint32_t _ptr_LoadOrderGroupKey
;
4446 uint32_t _ptr_TagId
;
4447 uint32_t _ptr_dependencies
;
4448 uint32_t _ptr_service_start_name
;
4449 uint32_t _ptr_password
;
4450 TALLOC_CTX
*_mem_save_handle_0
;
4451 TALLOC_CTX
*_mem_save_ServiceName_0
;
4452 TALLOC_CTX
*_mem_save_DisplayName_0
;
4453 TALLOC_CTX
*_mem_save_binary_path_0
;
4454 TALLOC_CTX
*_mem_save_LoadOrderGroupKey_0
;
4455 TALLOC_CTX
*_mem_save_TagId_0
;
4456 TALLOC_CTX
*_mem_save_dependencies_0
;
4457 TALLOC_CTX
*_mem_save_service_start_name_0
;
4458 TALLOC_CTX
*_mem_save_password_0
;
4459 if (flags
& NDR_IN
) {
4460 ZERO_STRUCT(r
->out
);
4462 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4463 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
4465 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4466 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
4467 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4468 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
4469 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ServiceName
));
4470 if (_ptr_ServiceName
) {
4471 NDR_PULL_ALLOC(ndr
, r
->in
.ServiceName
);
4473 r
->in
.ServiceName
= NULL
;
4475 if (r
->in
.ServiceName
) {
4476 _mem_save_ServiceName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4477 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ServiceName
, 0);
4478 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.ServiceName
));
4479 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.ServiceName
));
4480 if (ndr_get_array_length(ndr
, &r
->in
.ServiceName
) > ndr_get_array_size(ndr
, &r
->in
.ServiceName
)) {
4481 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
));
4483 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t)));
4484 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.ServiceName
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t), CH_UTF16
));
4485 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ServiceName_0
, 0);
4487 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_DisplayName
));
4488 if (_ptr_DisplayName
) {
4489 NDR_PULL_ALLOC(ndr
, r
->in
.DisplayName
);
4491 r
->in
.DisplayName
= NULL
;
4493 if (r
->in
.DisplayName
) {
4494 _mem_save_DisplayName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4495 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.DisplayName
, 0);
4496 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.DisplayName
));
4497 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.DisplayName
));
4498 if (ndr_get_array_length(ndr
, &r
->in
.DisplayName
) > ndr_get_array_size(ndr
, &r
->in
.DisplayName
)) {
4499 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
));
4501 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.DisplayName
), sizeof(uint16_t)));
4502 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.DisplayName
, ndr_get_array_length(ndr
, &r
->in
.DisplayName
), sizeof(uint16_t), CH_UTF16
));
4503 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_DisplayName_0
, 0);
4505 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.desired_access
));
4506 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
4507 NDR_CHECK(ndr_pull_svcctl_StartType(ndr
, NDR_SCALARS
, &r
->in
.start_type
));
4508 NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr
, NDR_SCALARS
, &r
->in
.error_control
));
4509 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_binary_path
));
4510 if (_ptr_binary_path
) {
4511 NDR_PULL_ALLOC(ndr
, r
->in
.binary_path
);
4513 r
->in
.binary_path
= NULL
;
4515 if (r
->in
.binary_path
) {
4516 _mem_save_binary_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4517 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.binary_path
, 0);
4518 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.binary_path
));
4519 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.binary_path
));
4520 if (ndr_get_array_length(ndr
, &r
->in
.binary_path
) > ndr_get_array_size(ndr
, &r
->in
.binary_path
)) {
4521 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
));
4523 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.binary_path
), sizeof(uint16_t)));
4524 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
));
4525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_binary_path_0
, 0);
4527 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_LoadOrderGroupKey
));
4528 if (_ptr_LoadOrderGroupKey
) {
4529 NDR_PULL_ALLOC(ndr
, r
->in
.LoadOrderGroupKey
);
4531 r
->in
.LoadOrderGroupKey
= NULL
;
4533 if (r
->in
.LoadOrderGroupKey
) {
4534 _mem_save_LoadOrderGroupKey_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4535 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.LoadOrderGroupKey
, 0);
4536 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.LoadOrderGroupKey
));
4537 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.LoadOrderGroupKey
));
4538 if (ndr_get_array_length(ndr
, &r
->in
.LoadOrderGroupKey
) > ndr_get_array_size(ndr
, &r
->in
.LoadOrderGroupKey
)) {
4539 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
));
4541 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.LoadOrderGroupKey
), sizeof(uint16_t)));
4542 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.LoadOrderGroupKey
, ndr_get_array_length(ndr
, &r
->in
.LoadOrderGroupKey
), sizeof(uint16_t), CH_UTF16
));
4543 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_LoadOrderGroupKey_0
, 0);
4545 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependencies
));
4546 if (_ptr_dependencies
) {
4547 NDR_PULL_ALLOC(ndr
, r
->in
.dependencies
);
4549 r
->in
.dependencies
= NULL
;
4551 if (r
->in
.dependencies
) {
4552 _mem_save_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4553 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.dependencies
, 0);
4554 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.dependencies
));
4555 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.dependencies
));
4556 if (ndr_get_array_length(ndr
, &r
->in
.dependencies
) > ndr_get_array_size(ndr
, &r
->in
.dependencies
)) {
4557 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
));
4559 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.dependencies
), sizeof(uint16_t)));
4560 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.dependencies
, ndr_get_array_length(ndr
, &r
->in
.dependencies
), sizeof(uint16_t), CH_UTF16
));
4561 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependencies_0
, 0);
4563 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_start_name
));
4564 if (_ptr_service_start_name
) {
4565 NDR_PULL_ALLOC(ndr
, r
->in
.service_start_name
);
4567 r
->in
.service_start_name
= NULL
;
4569 if (r
->in
.service_start_name
) {
4570 _mem_save_service_start_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4571 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_start_name
, 0);
4572 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_start_name
));
4573 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_start_name
));
4574 if (ndr_get_array_length(ndr
, &r
->in
.service_start_name
) > ndr_get_array_size(ndr
, &r
->in
.service_start_name
)) {
4575 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
));
4577 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_start_name
), sizeof(uint16_t)));
4578 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
));
4579 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_start_name_0
, 0);
4581 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_password
));
4582 if (_ptr_password
) {
4583 NDR_PULL_ALLOC(ndr
, r
->in
.password
);
4585 r
->in
.password
= NULL
;
4587 if (r
->in
.password
) {
4588 _mem_save_password_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4589 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.password
, 0);
4590 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.password
));
4591 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.password
));
4592 if (ndr_get_array_length(ndr
, &r
->in
.password
) > ndr_get_array_size(ndr
, &r
->in
.password
)) {
4593 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
));
4595 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t)));
4596 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.password
, ndr_get_array_length(ndr
, &r
->in
.password
), sizeof(uint16_t), CH_UTF16
));
4597 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_password_0
, 0);
4600 if (flags
& NDR_OUT
) {
4601 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_TagId
));
4603 NDR_PULL_ALLOC(ndr
, r
->out
.TagId
);
4605 r
->out
.TagId
= NULL
;
4608 _mem_save_TagId_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4609 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.TagId
, 0);
4610 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.TagId
));
4611 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_TagId_0
, 0);
4613 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4615 return NDR_ERR_SUCCESS
;
4618 _PUBLIC_
void ndr_print_svcctl_CreateServiceA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_CreateServiceA
*r
)
4620 ndr_print_struct(ndr
, name
, "svcctl_CreateServiceA");
4622 if (flags
& NDR_SET_VALUES
) {
4623 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4625 if (flags
& NDR_IN
) {
4626 ndr_print_struct(ndr
, "in", "svcctl_CreateServiceA");
4628 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
4630 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
4632 ndr_print_ptr(ndr
, "ServiceName", r
->in
.ServiceName
);
4634 if (r
->in
.ServiceName
) {
4635 ndr_print_string(ndr
, "ServiceName", r
->in
.ServiceName
);
4638 ndr_print_ptr(ndr
, "DisplayName", r
->in
.DisplayName
);
4640 if (r
->in
.DisplayName
) {
4641 ndr_print_string(ndr
, "DisplayName", r
->in
.DisplayName
);
4644 ndr_print_uint32(ndr
, "desired_access", r
->in
.desired_access
);
4645 ndr_print_uint32(ndr
, "type", r
->in
.type
);
4646 ndr_print_svcctl_StartType(ndr
, "start_type", r
->in
.start_type
);
4647 ndr_print_svcctl_ErrorControl(ndr
, "error_control", r
->in
.error_control
);
4648 ndr_print_ptr(ndr
, "binary_path", r
->in
.binary_path
);
4650 if (r
->in
.binary_path
) {
4651 ndr_print_string(ndr
, "binary_path", r
->in
.binary_path
);
4654 ndr_print_ptr(ndr
, "LoadOrderGroupKey", r
->in
.LoadOrderGroupKey
);
4656 if (r
->in
.LoadOrderGroupKey
) {
4657 ndr_print_string(ndr
, "LoadOrderGroupKey", r
->in
.LoadOrderGroupKey
);
4660 ndr_print_ptr(ndr
, "dependencies", r
->in
.dependencies
);
4662 if (r
->in
.dependencies
) {
4663 ndr_print_string(ndr
, "dependencies", r
->in
.dependencies
);
4666 ndr_print_ptr(ndr
, "service_start_name", r
->in
.service_start_name
);
4668 if (r
->in
.service_start_name
) {
4669 ndr_print_string(ndr
, "service_start_name", r
->in
.service_start_name
);
4672 ndr_print_ptr(ndr
, "password", r
->in
.password
);
4674 if (r
->in
.password
) {
4675 ndr_print_string(ndr
, "password", r
->in
.password
);
4680 if (flags
& NDR_OUT
) {
4681 ndr_print_struct(ndr
, "out", "svcctl_CreateServiceA");
4683 ndr_print_ptr(ndr
, "TagId", r
->out
.TagId
);
4686 ndr_print_uint32(ndr
, "TagId", *r
->out
.TagId
);
4689 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4695 static enum ndr_err_code
ndr_push_svcctl_EnumDependentServicesA(struct ndr_push
*ndr
, int flags
, const struct svcctl_EnumDependentServicesA
*r
)
4697 if (flags
& NDR_IN
) {
4698 if (r
->in
.service
== NULL
) {
4699 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4701 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.service
));
4702 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr
, NDR_SCALARS
, r
->in
.state
));
4703 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
4705 if (flags
& NDR_OUT
) {
4706 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.service_status
));
4707 if (r
->out
.service_status
) {
4708 NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.service_status
));
4710 if (r
->out
.needed
== NULL
) {
4711 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4713 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
4714 if (r
->out
.services_returned
== NULL
) {
4715 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.services_returned
));
4718 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4720 return NDR_ERR_SUCCESS
;
4723 static enum ndr_err_code
ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull
*ndr
, int flags
, struct svcctl_EnumDependentServicesA
*r
)
4725 uint32_t _ptr_service_status
;
4726 TALLOC_CTX
*_mem_save_service_0
;
4727 TALLOC_CTX
*_mem_save_service_status_0
;
4728 TALLOC_CTX
*_mem_save_needed_0
;
4729 TALLOC_CTX
*_mem_save_services_returned_0
;
4730 if (flags
& NDR_IN
) {
4731 ZERO_STRUCT(r
->out
);
4733 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4734 NDR_PULL_ALLOC(ndr
, r
->in
.service
);
4736 _mem_save_service_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4737 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service
, LIBNDR_FLAG_REF_ALLOC
);
4738 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.service
));
4739 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_0
, LIBNDR_FLAG_REF_ALLOC
);
4740 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr
, NDR_SCALARS
, &r
->in
.state
));
4741 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
4742 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
4743 ZERO_STRUCTP(r
->out
.needed
);
4744 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
4745 ZERO_STRUCTP(r
->out
.services_returned
);
4747 if (flags
& NDR_OUT
) {
4748 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_status
));
4749 if (_ptr_service_status
) {
4750 NDR_PULL_ALLOC(ndr
, r
->out
.service_status
);
4752 r
->out
.service_status
= NULL
;
4754 if (r
->out
.service_status
) {
4755 _mem_save_service_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4756 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.service_status
, 0);
4757 NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.service_status
));
4758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_status_0
, 0);
4760 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4761 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
4763 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4764 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
4765 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
4766 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
4767 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4768 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
4770 _mem_save_services_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4771 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.services_returned
, LIBNDR_FLAG_REF_ALLOC
);
4772 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.services_returned
));
4773 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_services_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
4774 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4776 return NDR_ERR_SUCCESS
;
4779 _PUBLIC_
void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_EnumDependentServicesA
*r
)
4781 ndr_print_struct(ndr
, name
, "svcctl_EnumDependentServicesA");
4783 if (flags
& NDR_SET_VALUES
) {
4784 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4786 if (flags
& NDR_IN
) {
4787 ndr_print_struct(ndr
, "in", "svcctl_EnumDependentServicesA");
4789 ndr_print_ptr(ndr
, "service", r
->in
.service
);
4791 ndr_print_policy_handle(ndr
, "service", r
->in
.service
);
4793 ndr_print_svcctl_ServiceState(ndr
, "state", r
->in
.state
);
4794 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
4797 if (flags
& NDR_OUT
) {
4798 ndr_print_struct(ndr
, "out", "svcctl_EnumDependentServicesA");
4800 ndr_print_ptr(ndr
, "service_status", r
->out
.service_status
);
4802 if (r
->out
.service_status
) {
4803 ndr_print_ENUM_SERVICE_STATUSA(ndr
, "service_status", r
->out
.service_status
);
4806 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
4808 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
4810 ndr_print_ptr(ndr
, "services_returned", r
->out
.services_returned
);
4812 ndr_print_uint32(ndr
, "services_returned", *r
->out
.services_returned
);
4814 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4820 static enum ndr_err_code
ndr_push_svcctl_EnumServicesStatusA(struct ndr_push
*ndr
, int flags
, const struct svcctl_EnumServicesStatusA
*r
)
4822 if (flags
& NDR_IN
) {
4823 if (r
->in
.handle
== NULL
) {
4824 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4826 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4827 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
4828 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr
, NDR_SCALARS
, r
->in
.state
));
4829 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
4830 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.resume_handle
));
4831 if (r
->in
.resume_handle
) {
4832 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
4835 if (flags
& NDR_OUT
) {
4836 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
4837 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.service
, r
->in
.offered
));
4838 if (r
->out
.needed
== NULL
) {
4839 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4841 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
4842 if (r
->out
.services_returned
== NULL
) {
4843 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
4845 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.services_returned
));
4846 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.resume_handle
));
4847 if (r
->out
.resume_handle
) {
4848 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
4850 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
4852 return NDR_ERR_SUCCESS
;
4855 static enum ndr_err_code
ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull
*ndr
, int flags
, struct svcctl_EnumServicesStatusA
*r
)
4857 uint32_t _ptr_resume_handle
;
4858 TALLOC_CTX
*_mem_save_handle_0
;
4859 TALLOC_CTX
*_mem_save_needed_0
;
4860 TALLOC_CTX
*_mem_save_services_returned_0
;
4861 TALLOC_CTX
*_mem_save_resume_handle_0
;
4862 if (flags
& NDR_IN
) {
4863 ZERO_STRUCT(r
->out
);
4865 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4866 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
4868 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4869 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
4870 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
4871 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
4872 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
4873 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr
, NDR_SCALARS
, &r
->in
.state
));
4874 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
4875 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
4876 if (_ptr_resume_handle
) {
4877 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
4879 r
->in
.resume_handle
= NULL
;
4881 if (r
->in
.resume_handle
) {
4882 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4883 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, 0);
4884 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
4885 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
4887 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
4888 ZERO_STRUCTP(r
->out
.needed
);
4889 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
4890 ZERO_STRUCTP(r
->out
.services_returned
);
4892 if (flags
& NDR_OUT
) {
4893 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.service
));
4894 NDR_PULL_ALLOC_N(ndr
, r
->out
.service
, ndr_get_array_size(ndr
, &r
->out
.service
));
4895 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.service
, ndr_get_array_size(ndr
, &r
->out
.service
)));
4896 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4897 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
4899 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4900 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
4901 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
4902 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
4903 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
4904 NDR_PULL_ALLOC(ndr
, r
->out
.services_returned
);
4906 _mem_save_services_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4907 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.services_returned
, LIBNDR_FLAG_REF_ALLOC
);
4908 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.services_returned
));
4909 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_services_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
4910 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
4911 if (_ptr_resume_handle
) {
4912 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
4914 r
->out
.resume_handle
= NULL
;
4916 if (r
->out
.resume_handle
) {
4917 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4918 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, 0);
4919 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
4920 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
4922 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
4923 if (r
->out
.service
) {
4924 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.service
, r
->in
.offered
));
4927 return NDR_ERR_SUCCESS
;
4930 _PUBLIC_
void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_EnumServicesStatusA
*r
)
4932 ndr_print_struct(ndr
, name
, "svcctl_EnumServicesStatusA");
4934 if (flags
& NDR_SET_VALUES
) {
4935 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
4937 if (flags
& NDR_IN
) {
4938 ndr_print_struct(ndr
, "in", "svcctl_EnumServicesStatusA");
4940 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
4942 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
4944 ndr_print_uint32(ndr
, "type", r
->in
.type
);
4945 ndr_print_svcctl_ServiceState(ndr
, "state", r
->in
.state
);
4946 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
4947 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
4949 if (r
->in
.resume_handle
) {
4950 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
4955 if (flags
& NDR_OUT
) {
4956 ndr_print_struct(ndr
, "out", "svcctl_EnumServicesStatusA");
4958 ndr_print_array_uint8(ndr
, "service", r
->out
.service
, r
->in
.offered
);
4959 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
4961 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
4963 ndr_print_ptr(ndr
, "services_returned", r
->out
.services_returned
);
4965 ndr_print_uint32(ndr
, "services_returned", *r
->out
.services_returned
);
4967 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
4969 if (r
->out
.resume_handle
) {
4970 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
4973 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
4979 static enum ndr_err_code
ndr_push_svcctl_OpenSCManagerA(struct ndr_push
*ndr
, int flags
, const struct svcctl_OpenSCManagerA
*r
)
4981 if (flags
& NDR_IN
) {
4982 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.MachineName
));
4983 if (r
->in
.MachineName
) {
4984 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.MachineName
, CH_UTF16
)));
4985 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4986 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.MachineName
, CH_UTF16
)));
4987 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.MachineName
, ndr_charset_length(r
->in
.MachineName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4989 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.DatabaseName
));
4990 if (r
->in
.DatabaseName
) {
4991 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DatabaseName
, CH_UTF16
)));
4992 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
4993 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.DatabaseName
, CH_UTF16
)));
4994 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.DatabaseName
, ndr_charset_length(r
->in
.DatabaseName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4996 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
4998 if (flags
& NDR_OUT
) {
4999 if (r
->out
.handle
== NULL
) {
5000 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5002 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5003 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5005 return NDR_ERR_SUCCESS
;
5008 static enum ndr_err_code
ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull
*ndr
, int flags
, struct svcctl_OpenSCManagerA
*r
)
5010 uint32_t _ptr_MachineName
;
5011 uint32_t _ptr_DatabaseName
;
5012 TALLOC_CTX
*_mem_save_MachineName_0
;
5013 TALLOC_CTX
*_mem_save_DatabaseName_0
;
5014 TALLOC_CTX
*_mem_save_handle_0
;
5015 if (flags
& NDR_IN
) {
5016 ZERO_STRUCT(r
->out
);
5018 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_MachineName
));
5019 if (_ptr_MachineName
) {
5020 NDR_PULL_ALLOC(ndr
, r
->in
.MachineName
);
5022 r
->in
.MachineName
= NULL
;
5024 if (r
->in
.MachineName
) {
5025 _mem_save_MachineName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5026 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.MachineName
, 0);
5027 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.MachineName
));
5028 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.MachineName
));
5029 if (ndr_get_array_length(ndr
, &r
->in
.MachineName
) > ndr_get_array_size(ndr
, &r
->in
.MachineName
)) {
5030 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
));
5032 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.MachineName
), sizeof(uint16_t)));
5033 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.MachineName
, ndr_get_array_length(ndr
, &r
->in
.MachineName
), sizeof(uint16_t), CH_UTF16
));
5034 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_MachineName_0
, 0);
5036 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_DatabaseName
));
5037 if (_ptr_DatabaseName
) {
5038 NDR_PULL_ALLOC(ndr
, r
->in
.DatabaseName
);
5040 r
->in
.DatabaseName
= NULL
;
5042 if (r
->in
.DatabaseName
) {
5043 _mem_save_DatabaseName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5044 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.DatabaseName
, 0);
5045 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.DatabaseName
));
5046 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.DatabaseName
));
5047 if (ndr_get_array_length(ndr
, &r
->in
.DatabaseName
) > ndr_get_array_size(ndr
, &r
->in
.DatabaseName
)) {
5048 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
));
5050 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.DatabaseName
), sizeof(uint16_t)));
5051 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.DatabaseName
, ndr_get_array_length(ndr
, &r
->in
.DatabaseName
), sizeof(uint16_t), CH_UTF16
));
5052 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_DatabaseName_0
, 0);
5054 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5055 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5056 ZERO_STRUCTP(r
->out
.handle
);
5058 if (flags
& NDR_OUT
) {
5059 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5060 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
5062 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5063 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5064 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
5065 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5066 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5068 return NDR_ERR_SUCCESS
;
5071 _PUBLIC_
void ndr_print_svcctl_OpenSCManagerA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_OpenSCManagerA
*r
)
5073 ndr_print_struct(ndr
, name
, "svcctl_OpenSCManagerA");
5075 if (flags
& NDR_SET_VALUES
) {
5076 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5078 if (flags
& NDR_IN
) {
5079 ndr_print_struct(ndr
, "in", "svcctl_OpenSCManagerA");
5081 ndr_print_ptr(ndr
, "MachineName", r
->in
.MachineName
);
5083 if (r
->in
.MachineName
) {
5084 ndr_print_string(ndr
, "MachineName", r
->in
.MachineName
);
5087 ndr_print_ptr(ndr
, "DatabaseName", r
->in
.DatabaseName
);
5089 if (r
->in
.DatabaseName
) {
5090 ndr_print_string(ndr
, "DatabaseName", r
->in
.DatabaseName
);
5093 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
5096 if (flags
& NDR_OUT
) {
5097 ndr_print_struct(ndr
, "out", "svcctl_OpenSCManagerA");
5099 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
5101 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
5103 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5109 static enum ndr_err_code
ndr_push_svcctl_OpenServiceA(struct ndr_push
*ndr
, int flags
, const struct svcctl_OpenServiceA
*r
)
5111 if (flags
& NDR_IN
) {
5112 if (r
->in
.scmanager_handle
== NULL
) {
5113 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5115 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager_handle
));
5116 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.ServiceName
));
5117 if (r
->in
.ServiceName
) {
5118 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
5119 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5120 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
)));
5121 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.ServiceName
, ndr_charset_length(r
->in
.ServiceName
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
5125 if (flags
& NDR_OUT
) {
5126 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5128 return NDR_ERR_SUCCESS
;
5131 static enum ndr_err_code
ndr_pull_svcctl_OpenServiceA(struct ndr_pull
*ndr
, int flags
, struct svcctl_OpenServiceA
*r
)
5133 uint32_t _ptr_ServiceName
;
5134 TALLOC_CTX
*_mem_save_scmanager_handle_0
;
5135 TALLOC_CTX
*_mem_save_ServiceName_0
;
5136 if (flags
& NDR_IN
) {
5137 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5138 NDR_PULL_ALLOC(ndr
, r
->in
.scmanager_handle
);
5140 _mem_save_scmanager_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5141 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.scmanager_handle
, LIBNDR_FLAG_REF_ALLOC
);
5142 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager_handle
));
5143 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_scmanager_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5144 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ServiceName
));
5145 if (_ptr_ServiceName
) {
5146 NDR_PULL_ALLOC(ndr
, r
->in
.ServiceName
);
5148 r
->in
.ServiceName
= NULL
;
5150 if (r
->in
.ServiceName
) {
5151 _mem_save_ServiceName_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5152 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ServiceName
, 0);
5153 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.ServiceName
));
5154 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.ServiceName
));
5155 if (ndr_get_array_length(ndr
, &r
->in
.ServiceName
) > ndr_get_array_size(ndr
, &r
->in
.ServiceName
)) {
5156 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
));
5158 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t)));
5159 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.ServiceName
, ndr_get_array_length(ndr
, &r
->in
.ServiceName
), sizeof(uint16_t), CH_UTF16
));
5160 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ServiceName_0
, 0);
5162 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
5164 if (flags
& NDR_OUT
) {
5165 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5167 return NDR_ERR_SUCCESS
;
5170 _PUBLIC_
void ndr_print_svcctl_OpenServiceA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_OpenServiceA
*r
)
5172 ndr_print_struct(ndr
, name
, "svcctl_OpenServiceA");
5174 if (flags
& NDR_SET_VALUES
) {
5175 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5177 if (flags
& NDR_IN
) {
5178 ndr_print_struct(ndr
, "in", "svcctl_OpenServiceA");
5180 ndr_print_ptr(ndr
, "scmanager_handle", r
->in
.scmanager_handle
);
5182 ndr_print_policy_handle(ndr
, "scmanager_handle", r
->in
.scmanager_handle
);
5184 ndr_print_ptr(ndr
, "ServiceName", r
->in
.ServiceName
);
5186 if (r
->in
.ServiceName
) {
5187 ndr_print_string(ndr
, "ServiceName", r
->in
.ServiceName
);
5190 ndr_print_uint32(ndr
, "access_mask", r
->in
.access_mask
);
5193 if (flags
& NDR_OUT
) {
5194 ndr_print_struct(ndr
, "out", "svcctl_OpenServiceA");
5196 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5202 static enum ndr_err_code
ndr_push_svcctl_QueryServiceConfigA(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceConfigA
*r
)
5204 if (flags
& NDR_IN
) {
5205 if (r
->in
.handle
== NULL
) {
5206 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5208 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5209 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
5211 if (flags
& NDR_OUT
) {
5212 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.query
, r
->in
.offered
));
5213 if (r
->out
.needed
== NULL
) {
5214 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5216 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
5217 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5219 return NDR_ERR_SUCCESS
;
5222 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceConfigA
*r
)
5224 TALLOC_CTX
*_mem_save_handle_0
;
5225 TALLOC_CTX
*_mem_save_needed_0
;
5226 if (flags
& NDR_IN
) {
5227 ZERO_STRUCT(r
->out
);
5229 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5230 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5232 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5233 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5234 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5235 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5236 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
5237 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
5238 ZERO_STRUCTP(r
->out
.needed
);
5240 if (flags
& NDR_OUT
) {
5241 NDR_PULL_ALLOC_N(ndr
, r
->out
.query
, r
->in
.offered
);
5242 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.query
, r
->in
.offered
));
5243 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5244 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
5246 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5247 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
5248 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
5249 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
5250 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5252 return NDR_ERR_SUCCESS
;
5255 _PUBLIC_
void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceConfigA
*r
)
5257 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceConfigA");
5259 if (flags
& NDR_SET_VALUES
) {
5260 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5262 if (flags
& NDR_IN
) {
5263 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceConfigA");
5265 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5267 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5269 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
5272 if (flags
& NDR_OUT
) {
5273 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceConfigA");
5275 ndr_print_array_uint8(ndr
, "query", r
->out
.query
, r
->in
.offered
);
5276 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
5278 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
5280 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5286 static enum ndr_err_code
ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceLockStatusA
*r
)
5288 if (flags
& NDR_IN
) {
5289 if (r
->in
.handle
== NULL
) {
5290 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5292 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5293 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
5295 if (flags
& NDR_OUT
) {
5296 if (r
->out
.lock_status
== NULL
) {
5297 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5299 NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.lock_status
));
5300 if (r
->out
.needed
== NULL
) {
5301 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5303 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
5304 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5306 return NDR_ERR_SUCCESS
;
5309 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceLockStatusA
*r
)
5311 TALLOC_CTX
*_mem_save_handle_0
;
5312 TALLOC_CTX
*_mem_save_lock_status_0
;
5313 TALLOC_CTX
*_mem_save_needed_0
;
5314 if (flags
& NDR_IN
) {
5315 ZERO_STRUCT(r
->out
);
5317 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5318 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5320 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5321 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5322 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5323 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5324 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
5325 NDR_PULL_ALLOC(ndr
, r
->out
.lock_status
);
5326 ZERO_STRUCTP(r
->out
.lock_status
);
5327 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
5328 ZERO_STRUCTP(r
->out
.needed
);
5330 if (flags
& NDR_OUT
) {
5331 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5332 NDR_PULL_ALLOC(ndr
, r
->out
.lock_status
);
5334 _mem_save_lock_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5335 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.lock_status
, LIBNDR_FLAG_REF_ALLOC
);
5336 NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.lock_status
));
5337 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_lock_status_0
, LIBNDR_FLAG_REF_ALLOC
);
5338 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5339 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
5341 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5342 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
5343 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
5344 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
5345 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5347 return NDR_ERR_SUCCESS
;
5350 _PUBLIC_
void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceLockStatusA
*r
)
5352 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceLockStatusA");
5354 if (flags
& NDR_SET_VALUES
) {
5355 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5357 if (flags
& NDR_IN
) {
5358 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceLockStatusA");
5360 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5362 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5364 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
5367 if (flags
& NDR_OUT
) {
5368 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceLockStatusA");
5370 ndr_print_ptr(ndr
, "lock_status", r
->out
.lock_status
);
5372 ndr_print_SERVICE_LOCK_STATUS(ndr
, "lock_status", r
->out
.lock_status
);
5374 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
5376 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
5378 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5384 static enum ndr_err_code
ndr_push_svcctl_StartServiceA(struct ndr_push
*ndr
, int flags
, const struct svcctl_StartServiceA
*r
)
5386 if (flags
& NDR_IN
) {
5387 if (r
->in
.handle
== NULL
) {
5388 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5390 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5391 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.NumArgs
));
5392 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.Arguments
));
5393 if (r
->in
.Arguments
) {
5394 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Arguments
, CH_UTF16
)));
5395 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5396 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.Arguments
, CH_UTF16
)));
5397 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.Arguments
, ndr_charset_length(r
->in
.Arguments
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5400 if (flags
& NDR_OUT
) {
5401 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5403 return NDR_ERR_SUCCESS
;
5406 static enum ndr_err_code
ndr_pull_svcctl_StartServiceA(struct ndr_pull
*ndr
, int flags
, struct svcctl_StartServiceA
*r
)
5408 uint32_t _ptr_Arguments
;
5409 TALLOC_CTX
*_mem_save_handle_0
;
5410 TALLOC_CTX
*_mem_save_Arguments_0
;
5411 if (flags
& NDR_IN
) {
5412 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5413 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5415 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5416 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5417 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5418 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5419 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.NumArgs
));
5420 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_Arguments
));
5421 if (_ptr_Arguments
) {
5422 NDR_PULL_ALLOC(ndr
, r
->in
.Arguments
);
5424 r
->in
.Arguments
= NULL
;
5426 if (r
->in
.Arguments
) {
5427 _mem_save_Arguments_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5428 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.Arguments
, 0);
5429 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.Arguments
));
5430 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.Arguments
));
5431 if (ndr_get_array_length(ndr
, &r
->in
.Arguments
) > ndr_get_array_size(ndr
, &r
->in
.Arguments
)) {
5432 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
));
5434 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.Arguments
), sizeof(uint16_t)));
5435 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.Arguments
, ndr_get_array_length(ndr
, &r
->in
.Arguments
), sizeof(uint16_t), CH_UTF16
));
5436 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_Arguments_0
, 0);
5439 if (flags
& NDR_OUT
) {
5440 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5442 return NDR_ERR_SUCCESS
;
5445 _PUBLIC_
void ndr_print_svcctl_StartServiceA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_StartServiceA
*r
)
5447 ndr_print_struct(ndr
, name
, "svcctl_StartServiceA");
5449 if (flags
& NDR_SET_VALUES
) {
5450 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5452 if (flags
& NDR_IN
) {
5453 ndr_print_struct(ndr
, "in", "svcctl_StartServiceA");
5455 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5457 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5459 ndr_print_uint32(ndr
, "NumArgs", r
->in
.NumArgs
);
5460 ndr_print_ptr(ndr
, "Arguments", r
->in
.Arguments
);
5462 if (r
->in
.Arguments
) {
5463 ndr_print_string(ndr
, "Arguments", r
->in
.Arguments
);
5468 if (flags
& NDR_OUT
) {
5469 ndr_print_struct(ndr
, "out", "svcctl_StartServiceA");
5471 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5477 static enum ndr_err_code
ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push
*ndr
, int flags
, const struct svcctl_GetServiceDisplayNameA
*r
)
5479 if (flags
& NDR_IN
) {
5480 if (r
->in
.handle
== NULL
) {
5481 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5483 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5484 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_name
));
5485 if (r
->in
.service_name
) {
5486 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
5487 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5488 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
5489 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
));
5491 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.display_name_length
));
5492 if (r
->in
.display_name_length
) {
5493 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.display_name_length
));
5496 if (flags
& NDR_OUT
) {
5497 if (r
->out
.display_name
== NULL
) {
5498 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5500 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.display_name
));
5501 if (*r
->out
.display_name
) {
5502 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.display_name
, CH_UTF16
)));
5503 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5504 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.display_name
, CH_UTF16
)));
5505 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
));
5507 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.display_name_length
));
5508 if (r
->out
.display_name_length
) {
5509 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.display_name_length
));
5511 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5513 return NDR_ERR_SUCCESS
;
5516 static enum ndr_err_code
ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull
*ndr
, int flags
, struct svcctl_GetServiceDisplayNameA
*r
)
5518 uint32_t _ptr_service_name
;
5519 uint32_t _ptr_display_name
;
5520 uint32_t _ptr_display_name_length
;
5521 TALLOC_CTX
*_mem_save_handle_0
;
5522 TALLOC_CTX
*_mem_save_service_name_0
;
5523 TALLOC_CTX
*_mem_save_display_name_0
;
5524 TALLOC_CTX
*_mem_save_display_name_1
;
5525 TALLOC_CTX
*_mem_save_display_name_length_0
;
5526 if (flags
& NDR_IN
) {
5527 ZERO_STRUCT(r
->out
);
5529 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5530 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5532 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5533 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5534 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5535 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5536 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_name
));
5537 if (_ptr_service_name
) {
5538 NDR_PULL_ALLOC(ndr
, r
->in
.service_name
);
5540 r
->in
.service_name
= NULL
;
5542 if (r
->in
.service_name
) {
5543 _mem_save_service_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5544 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_name
, 0);
5545 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_name
));
5546 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_name
));
5547 if (ndr_get_array_length(ndr
, &r
->in
.service_name
) > ndr_get_array_size(ndr
, &r
->in
.service_name
)) {
5548 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
));
5550 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_name
), sizeof(uint16_t)));
5551 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
));
5552 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_name_0
, 0);
5554 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
5555 if (_ptr_display_name_length
) {
5556 NDR_PULL_ALLOC(ndr
, r
->in
.display_name_length
);
5558 r
->in
.display_name_length
= NULL
;
5560 if (r
->in
.display_name_length
) {
5561 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5562 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.display_name_length
, 0);
5563 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.display_name_length
));
5564 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
5566 NDR_PULL_ALLOC(ndr
, r
->out
.display_name
);
5567 ZERO_STRUCTP(r
->out
.display_name
);
5569 if (flags
& NDR_OUT
) {
5570 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5571 NDR_PULL_ALLOC(ndr
, r
->out
.display_name
);
5573 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5574 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.display_name
, LIBNDR_FLAG_REF_ALLOC
);
5575 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
5576 if (_ptr_display_name
) {
5577 NDR_PULL_ALLOC(ndr
, *r
->out
.display_name
);
5579 *r
->out
.display_name
= NULL
;
5581 if (*r
->out
.display_name
) {
5582 _mem_save_display_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5583 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.display_name
, 0);
5584 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.display_name
));
5585 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.display_name
));
5586 if (ndr_get_array_length(ndr
, r
->out
.display_name
) > ndr_get_array_size(ndr
, r
->out
.display_name
)) {
5587 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
));
5589 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.display_name
), sizeof(uint16_t)));
5590 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
));
5591 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_1
, 0);
5593 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, LIBNDR_FLAG_REF_ALLOC
);
5594 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
5595 if (_ptr_display_name_length
) {
5596 NDR_PULL_ALLOC(ndr
, r
->out
.display_name_length
);
5598 r
->out
.display_name_length
= NULL
;
5600 if (r
->out
.display_name_length
) {
5601 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5602 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.display_name_length
, 0);
5603 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.display_name_length
));
5604 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
5606 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5608 return NDR_ERR_SUCCESS
;
5611 _PUBLIC_
void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_GetServiceDisplayNameA
*r
)
5613 ndr_print_struct(ndr
, name
, "svcctl_GetServiceDisplayNameA");
5615 if (flags
& NDR_SET_VALUES
) {
5616 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5618 if (flags
& NDR_IN
) {
5619 ndr_print_struct(ndr
, "in", "svcctl_GetServiceDisplayNameA");
5621 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5623 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5625 ndr_print_ptr(ndr
, "service_name", r
->in
.service_name
);
5627 if (r
->in
.service_name
) {
5628 ndr_print_string(ndr
, "service_name", r
->in
.service_name
);
5631 ndr_print_ptr(ndr
, "display_name_length", r
->in
.display_name_length
);
5633 if (r
->in
.display_name_length
) {
5634 ndr_print_uint32(ndr
, "display_name_length", *r
->in
.display_name_length
);
5639 if (flags
& NDR_OUT
) {
5640 ndr_print_struct(ndr
, "out", "svcctl_GetServiceDisplayNameA");
5642 ndr_print_ptr(ndr
, "display_name", r
->out
.display_name
);
5644 ndr_print_ptr(ndr
, "display_name", *r
->out
.display_name
);
5646 if (*r
->out
.display_name
) {
5647 ndr_print_string(ndr
, "display_name", *r
->out
.display_name
);
5651 ndr_print_ptr(ndr
, "display_name_length", r
->out
.display_name_length
);
5653 if (r
->out
.display_name_length
) {
5654 ndr_print_uint32(ndr
, "display_name_length", *r
->out
.display_name_length
);
5657 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5663 static enum ndr_err_code
ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push
*ndr
, int flags
, const struct svcctl_GetServiceKeyNameA
*r
)
5665 if (flags
& NDR_IN
) {
5666 if (r
->in
.handle
== NULL
) {
5667 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5669 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5670 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.service_name
));
5671 if (r
->in
.service_name
) {
5672 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
5673 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5674 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.service_name
, CH_UTF16
)));
5675 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
));
5677 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.display_name_length
));
5678 if (r
->in
.display_name_length
) {
5679 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.display_name_length
));
5682 if (flags
& NDR_OUT
) {
5683 if (r
->out
.key_name
== NULL
) {
5684 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5686 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.key_name
));
5687 if (*r
->out
.key_name
) {
5688 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.key_name
, CH_UTF16
)));
5689 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5690 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.key_name
, CH_UTF16
)));
5691 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
));
5693 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.display_name_length
));
5694 if (r
->out
.display_name_length
) {
5695 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.display_name_length
));
5697 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5699 return NDR_ERR_SUCCESS
;
5702 static enum ndr_err_code
ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull
*ndr
, int flags
, struct svcctl_GetServiceKeyNameA
*r
)
5704 uint32_t _ptr_service_name
;
5705 uint32_t _ptr_key_name
;
5706 uint32_t _ptr_display_name_length
;
5707 TALLOC_CTX
*_mem_save_handle_0
;
5708 TALLOC_CTX
*_mem_save_service_name_0
;
5709 TALLOC_CTX
*_mem_save_key_name_0
;
5710 TALLOC_CTX
*_mem_save_key_name_1
;
5711 TALLOC_CTX
*_mem_save_display_name_length_0
;
5712 if (flags
& NDR_IN
) {
5713 ZERO_STRUCT(r
->out
);
5715 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5716 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5718 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5719 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5720 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5721 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5722 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_service_name
));
5723 if (_ptr_service_name
) {
5724 NDR_PULL_ALLOC(ndr
, r
->in
.service_name
);
5726 r
->in
.service_name
= NULL
;
5728 if (r
->in
.service_name
) {
5729 _mem_save_service_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5730 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.service_name
, 0);
5731 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.service_name
));
5732 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.service_name
));
5733 if (ndr_get_array_length(ndr
, &r
->in
.service_name
) > ndr_get_array_size(ndr
, &r
->in
.service_name
)) {
5734 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
));
5736 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.service_name
), sizeof(uint16_t)));
5737 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
));
5738 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_name_0
, 0);
5740 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
5741 if (_ptr_display_name_length
) {
5742 NDR_PULL_ALLOC(ndr
, r
->in
.display_name_length
);
5744 r
->in
.display_name_length
= NULL
;
5746 if (r
->in
.display_name_length
) {
5747 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5748 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.display_name_length
, 0);
5749 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.display_name_length
));
5750 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
5752 NDR_PULL_ALLOC(ndr
, r
->out
.key_name
);
5753 ZERO_STRUCTP(r
->out
.key_name
);
5755 if (flags
& NDR_OUT
) {
5756 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5757 NDR_PULL_ALLOC(ndr
, r
->out
.key_name
);
5759 _mem_save_key_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5760 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.key_name
, LIBNDR_FLAG_REF_ALLOC
);
5761 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_key_name
));
5762 if (_ptr_key_name
) {
5763 NDR_PULL_ALLOC(ndr
, *r
->out
.key_name
);
5765 *r
->out
.key_name
= NULL
;
5767 if (*r
->out
.key_name
) {
5768 _mem_save_key_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
5769 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.key_name
, 0);
5770 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.key_name
));
5771 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.key_name
));
5772 if (ndr_get_array_length(ndr
, r
->out
.key_name
) > ndr_get_array_size(ndr
, r
->out
.key_name
)) {
5773 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
));
5775 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.key_name
), sizeof(uint16_t)));
5776 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
));
5777 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_name_1
, 0);
5779 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_name_0
, LIBNDR_FLAG_REF_ALLOC
);
5780 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name_length
));
5781 if (_ptr_display_name_length
) {
5782 NDR_PULL_ALLOC(ndr
, r
->out
.display_name_length
);
5784 r
->out
.display_name_length
= NULL
;
5786 if (r
->out
.display_name_length
) {
5787 _mem_save_display_name_length_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5788 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.display_name_length
, 0);
5789 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.display_name_length
));
5790 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_length_0
, 0);
5792 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5794 return NDR_ERR_SUCCESS
;
5797 _PUBLIC_
void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_GetServiceKeyNameA
*r
)
5799 ndr_print_struct(ndr
, name
, "svcctl_GetServiceKeyNameA");
5801 if (flags
& NDR_SET_VALUES
) {
5802 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5804 if (flags
& NDR_IN
) {
5805 ndr_print_struct(ndr
, "in", "svcctl_GetServiceKeyNameA");
5807 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5809 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5811 ndr_print_ptr(ndr
, "service_name", r
->in
.service_name
);
5813 if (r
->in
.service_name
) {
5814 ndr_print_string(ndr
, "service_name", r
->in
.service_name
);
5817 ndr_print_ptr(ndr
, "display_name_length", r
->in
.display_name_length
);
5819 if (r
->in
.display_name_length
) {
5820 ndr_print_uint32(ndr
, "display_name_length", *r
->in
.display_name_length
);
5825 if (flags
& NDR_OUT
) {
5826 ndr_print_struct(ndr
, "out", "svcctl_GetServiceKeyNameA");
5828 ndr_print_ptr(ndr
, "key_name", r
->out
.key_name
);
5830 ndr_print_ptr(ndr
, "key_name", *r
->out
.key_name
);
5832 if (*r
->out
.key_name
) {
5833 ndr_print_string(ndr
, "key_name", *r
->out
.key_name
);
5837 ndr_print_ptr(ndr
, "display_name_length", r
->out
.display_name_length
);
5839 if (r
->out
.display_name_length
) {
5840 ndr_print_uint32(ndr
, "display_name_length", *r
->out
.display_name_length
);
5843 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5849 static enum ndr_err_code
ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push
*ndr
, int flags
, const struct svcctl_GetCurrentGroupeStateW
*r
)
5851 if (flags
& NDR_IN
) {
5853 if (flags
& NDR_OUT
) {
5854 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5856 return NDR_ERR_SUCCESS
;
5859 static enum ndr_err_code
ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull
*ndr
, int flags
, struct svcctl_GetCurrentGroupeStateW
*r
)
5861 if (flags
& NDR_IN
) {
5863 if (flags
& NDR_OUT
) {
5864 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5866 return NDR_ERR_SUCCESS
;
5869 _PUBLIC_
void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_GetCurrentGroupeStateW
*r
)
5871 ndr_print_struct(ndr
, name
, "svcctl_GetCurrentGroupeStateW");
5873 if (flags
& NDR_SET_VALUES
) {
5874 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5876 if (flags
& NDR_IN
) {
5877 ndr_print_struct(ndr
, "in", "svcctl_GetCurrentGroupeStateW");
5881 if (flags
& NDR_OUT
) {
5882 ndr_print_struct(ndr
, "out", "svcctl_GetCurrentGroupeStateW");
5884 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5890 static enum ndr_err_code
ndr_push_svcctl_EnumServiceGroupW(struct ndr_push
*ndr
, int flags
, const struct svcctl_EnumServiceGroupW
*r
)
5892 if (flags
& NDR_IN
) {
5894 if (flags
& NDR_OUT
) {
5895 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5897 return NDR_ERR_SUCCESS
;
5900 static enum ndr_err_code
ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull
*ndr
, int flags
, struct svcctl_EnumServiceGroupW
*r
)
5902 if (flags
& NDR_IN
) {
5904 if (flags
& NDR_OUT
) {
5905 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5907 return NDR_ERR_SUCCESS
;
5910 _PUBLIC_
void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_EnumServiceGroupW
*r
)
5912 ndr_print_struct(ndr
, name
, "svcctl_EnumServiceGroupW");
5914 if (flags
& NDR_SET_VALUES
) {
5915 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5917 if (flags
& NDR_IN
) {
5918 ndr_print_struct(ndr
, "in", "svcctl_EnumServiceGroupW");
5922 if (flags
& NDR_OUT
) {
5923 ndr_print_struct(ndr
, "out", "svcctl_EnumServiceGroupW");
5925 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
5931 static enum ndr_err_code
ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push
*ndr
, int flags
, const struct svcctl_ChangeServiceConfig2A
*r
)
5933 if (flags
& NDR_IN
) {
5934 if (r
->in
.handle
== NULL
) {
5935 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
5937 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.info_level
));
5939 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
5941 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->in
.info
));
5944 if (flags
& NDR_OUT
) {
5945 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
5947 return NDR_ERR_SUCCESS
;
5950 static enum ndr_err_code
ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull
*ndr
, int flags
, struct svcctl_ChangeServiceConfig2A
*r
)
5953 TALLOC_CTX
*_mem_save_handle_0
;
5954 TALLOC_CTX
*_mem_save_info_0
;
5955 if (flags
& NDR_IN
) {
5956 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
5957 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
5959 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5960 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
5961 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
5962 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
5963 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.info_level
));
5964 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
5966 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
5971 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5972 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
5973 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->in
.info
));
5974 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
5977 if (flags
& NDR_OUT
) {
5978 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
5980 return NDR_ERR_SUCCESS
;
5983 _PUBLIC_
void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_ChangeServiceConfig2A
*r
)
5985 ndr_print_struct(ndr
, name
, "svcctl_ChangeServiceConfig2A");
5987 if (flags
& NDR_SET_VALUES
) {
5988 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
5990 if (flags
& NDR_IN
) {
5991 ndr_print_struct(ndr
, "in", "svcctl_ChangeServiceConfig2A");
5993 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
5995 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
5997 ndr_print_uint32(ndr
, "info_level", r
->in
.info_level
);
5998 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6001 ndr_print_uint8(ndr
, "info", *r
->in
.info
);
6006 if (flags
& NDR_OUT
) {
6007 ndr_print_struct(ndr
, "out", "svcctl_ChangeServiceConfig2A");
6009 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6015 static enum ndr_err_code
ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push
*ndr
, int flags
, const struct svcctl_ChangeServiceConfig2W
*r
)
6017 if (flags
& NDR_IN
) {
6018 if (r
->in
.handle
== NULL
) {
6019 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6021 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6022 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.info_level
));
6023 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.info
));
6025 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, *r
->in
.info
));
6028 if (flags
& NDR_OUT
) {
6029 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6031 return NDR_ERR_SUCCESS
;
6034 static enum ndr_err_code
ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull
*ndr
, int flags
, struct svcctl_ChangeServiceConfig2W
*r
)
6037 TALLOC_CTX
*_mem_save_handle_0
;
6038 TALLOC_CTX
*_mem_save_info_0
;
6039 if (flags
& NDR_IN
) {
6040 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6041 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6043 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6044 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6045 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6046 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6047 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.info_level
));
6048 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
6050 NDR_PULL_ALLOC(ndr
, r
->in
.info
);
6055 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6056 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info
, 0);
6057 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, r
->in
.info
));
6058 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
6061 if (flags
& NDR_OUT
) {
6062 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6064 return NDR_ERR_SUCCESS
;
6067 _PUBLIC_
void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_ChangeServiceConfig2W
*r
)
6069 ndr_print_struct(ndr
, name
, "svcctl_ChangeServiceConfig2W");
6071 if (flags
& NDR_SET_VALUES
) {
6072 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6074 if (flags
& NDR_IN
) {
6075 ndr_print_struct(ndr
, "in", "svcctl_ChangeServiceConfig2W");
6077 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6079 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6081 ndr_print_uint32(ndr
, "info_level", r
->in
.info_level
);
6082 ndr_print_ptr(ndr
, "info", r
->in
.info
);
6085 ndr_print_uint8(ndr
, "info", *r
->in
.info
);
6090 if (flags
& NDR_OUT
) {
6091 ndr_print_struct(ndr
, "out", "svcctl_ChangeServiceConfig2W");
6093 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6099 static enum ndr_err_code
ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceConfig2A
*r
)
6101 if (flags
& NDR_IN
) {
6102 if (r
->in
.handle
== NULL
) {
6103 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6105 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6106 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr
, NDR_SCALARS
, r
->in
.info_level
));
6107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
6109 if (flags
& NDR_OUT
) {
6110 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
6111 if (r
->out
.needed
== NULL
) {
6112 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
6115 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6117 return NDR_ERR_SUCCESS
;
6120 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceConfig2A
*r
)
6122 TALLOC_CTX
*_mem_save_handle_0
;
6123 TALLOC_CTX
*_mem_save_needed_0
;
6124 if (flags
& NDR_IN
) {
6125 ZERO_STRUCT(r
->out
);
6127 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6128 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6130 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6131 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6132 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6134 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr
, NDR_SCALARS
, &r
->in
.info_level
));
6135 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
6136 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6137 ZERO_STRUCTP(r
->out
.needed
);
6139 if (flags
& NDR_OUT
) {
6140 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, r
->in
.offered
);
6141 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
6142 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6143 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6145 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6146 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
6147 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
6148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
6149 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6151 return NDR_ERR_SUCCESS
;
6154 _PUBLIC_
void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceConfig2A
*r
)
6156 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceConfig2A");
6158 if (flags
& NDR_SET_VALUES
) {
6159 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6161 if (flags
& NDR_IN
) {
6162 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceConfig2A");
6164 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6166 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6168 ndr_print_svcctl_ConfigLevel(ndr
, "info_level", r
->in
.info_level
);
6169 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
6172 if (flags
& NDR_OUT
) {
6173 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceConfig2A");
6175 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.offered
);
6176 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
6178 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
6180 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6186 static enum ndr_err_code
ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceConfig2W
*r
)
6188 if (flags
& NDR_IN
) {
6189 if (r
->in
.handle
== NULL
) {
6190 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6192 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6193 NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr
, NDR_SCALARS
, r
->in
.info_level
));
6194 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
6196 if (flags
& NDR_OUT
) {
6197 if (r
->out
.buffer
== NULL
) {
6198 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6200 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
6201 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
6202 if (r
->out
.needed
== NULL
) {
6203 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6205 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
6206 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6208 return NDR_ERR_SUCCESS
;
6211 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceConfig2W
*r
)
6213 TALLOC_CTX
*_mem_save_handle_0
;
6214 TALLOC_CTX
*_mem_save_needed_0
;
6215 if (flags
& NDR_IN
) {
6216 ZERO_STRUCT(r
->out
);
6218 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6219 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6221 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6222 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6223 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6224 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6225 NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr
, NDR_SCALARS
, &r
->in
.info_level
));
6226 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
6227 if (r
->in
.offered
> 8192) {
6228 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6230 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, r
->in
.offered
);
6231 memset(r
->out
.buffer
, 0, (r
->in
.offered
) * sizeof(*r
->out
.buffer
));
6232 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6233 ZERO_STRUCTP(r
->out
.needed
);
6235 if (flags
& NDR_OUT
) {
6236 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
6237 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6238 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
6240 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
)));
6241 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6242 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6244 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6245 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
6246 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
6247 if (*r
->out
.needed
> 8192) {
6248 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6250 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
6251 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6252 if (r
->out
.buffer
) {
6253 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.offered
));
6256 return NDR_ERR_SUCCESS
;
6259 _PUBLIC_
void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceConfig2W
*r
)
6261 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceConfig2W");
6263 if (flags
& NDR_SET_VALUES
) {
6264 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6266 if (flags
& NDR_IN
) {
6267 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceConfig2W");
6269 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6271 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6273 ndr_print_svcctl_ConfigLevel(ndr
, "info_level", r
->in
.info_level
);
6274 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
6277 if (flags
& NDR_OUT
) {
6278 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceConfig2W");
6280 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
6282 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.offered
);
6284 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
6286 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
6288 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6294 static enum ndr_err_code
ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push
*ndr
, int flags
, const struct svcctl_QueryServiceStatusEx
*r
)
6296 if (flags
& NDR_IN
) {
6297 if (r
->in
.handle
== NULL
) {
6298 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6300 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6301 NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr
, NDR_SCALARS
, r
->in
.info_level
));
6302 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
6304 if (flags
& NDR_OUT
) {
6305 if (r
->out
.buffer
== NULL
) {
6306 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6308 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
6309 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
6310 if (r
->out
.needed
== NULL
) {
6311 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6313 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
6314 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6316 return NDR_ERR_SUCCESS
;
6319 static enum ndr_err_code
ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull
*ndr
, int flags
, struct svcctl_QueryServiceStatusEx
*r
)
6321 TALLOC_CTX
*_mem_save_handle_0
;
6322 TALLOC_CTX
*_mem_save_needed_0
;
6323 if (flags
& NDR_IN
) {
6324 ZERO_STRUCT(r
->out
);
6326 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6327 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
6329 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6330 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
6331 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
6332 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
6333 NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr
, NDR_SCALARS
, &r
->in
.info_level
));
6334 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
6335 if (r
->in
.offered
> 8192) {
6336 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6338 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, r
->in
.offered
);
6339 memset(r
->out
.buffer
, 0, (r
->in
.offered
) * sizeof(*r
->out
.buffer
));
6340 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6341 ZERO_STRUCTP(r
->out
.needed
);
6343 if (flags
& NDR_OUT
) {
6344 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
6345 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6346 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
6348 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
)));
6349 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6350 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6352 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6353 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
6354 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
6355 if (*r
->out
.needed
> 8192) {
6356 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6358 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
6359 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6360 if (r
->out
.buffer
) {
6361 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.offered
));
6364 return NDR_ERR_SUCCESS
;
6367 _PUBLIC_
void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_QueryServiceStatusEx
*r
)
6369 ndr_print_struct(ndr
, name
, "svcctl_QueryServiceStatusEx");
6371 if (flags
& NDR_SET_VALUES
) {
6372 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6374 if (flags
& NDR_IN
) {
6375 ndr_print_struct(ndr
, "in", "svcctl_QueryServiceStatusEx");
6377 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
6379 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
6381 ndr_print_svcctl_StatusLevel(ndr
, "info_level", r
->in
.info_level
);
6382 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
6385 if (flags
& NDR_OUT
) {
6386 ndr_print_struct(ndr
, "out", "svcctl_QueryServiceStatusEx");
6388 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
6390 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.offered
);
6392 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
6394 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
6396 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6402 static enum ndr_err_code
ndr_push_EnumServicesStatusExA(struct ndr_push
*ndr
, int flags
, const struct EnumServicesStatusExA
*r
)
6404 if (flags
& NDR_IN
) {
6405 if (r
->in
.scmanager
== NULL
) {
6406 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6408 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager
));
6409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.info_level
));
6410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
6411 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr
, NDR_SCALARS
, r
->in
.state
));
6412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
6413 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.resume_handle
));
6414 if (r
->in
.resume_handle
) {
6415 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6418 if (flags
& NDR_OUT
) {
6419 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.services
, r
->in
.offered
));
6420 if (r
->out
.needed
== NULL
) {
6421 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6423 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
6424 if (r
->out
.service_returned
== NULL
) {
6425 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6427 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.service_returned
));
6428 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.resume_handle
));
6429 if (r
->out
.resume_handle
) {
6430 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6432 if (r
->out
.group_name
== NULL
) {
6433 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6435 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.group_name
));
6436 if (*r
->out
.group_name
) {
6437 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.group_name
, CH_UTF16
)));
6438 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6439 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(*r
->out
.group_name
, CH_UTF16
)));
6440 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
));
6442 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6444 return NDR_ERR_SUCCESS
;
6447 static enum ndr_err_code
ndr_pull_EnumServicesStatusExA(struct ndr_pull
*ndr
, int flags
, struct EnumServicesStatusExA
*r
)
6449 uint32_t _ptr_resume_handle
;
6450 uint32_t _ptr_group_name
;
6451 TALLOC_CTX
*_mem_save_scmanager_0
;
6452 TALLOC_CTX
*_mem_save_needed_0
;
6453 TALLOC_CTX
*_mem_save_service_returned_0
;
6454 TALLOC_CTX
*_mem_save_resume_handle_0
;
6455 TALLOC_CTX
*_mem_save_group_name_0
;
6456 TALLOC_CTX
*_mem_save_group_name_1
;
6457 if (flags
& NDR_IN
) {
6458 ZERO_STRUCT(r
->out
);
6460 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6461 NDR_PULL_ALLOC(ndr
, r
->in
.scmanager
);
6463 _mem_save_scmanager_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6464 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.scmanager
, LIBNDR_FLAG_REF_ALLOC
);
6465 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager
));
6466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_scmanager_0
, LIBNDR_FLAG_REF_ALLOC
);
6467 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.info_level
));
6468 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
6469 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr
, NDR_SCALARS
, &r
->in
.state
));
6470 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
6471 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
6472 if (_ptr_resume_handle
) {
6473 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6475 r
->in
.resume_handle
= NULL
;
6477 if (r
->in
.resume_handle
) {
6478 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6479 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, 0);
6480 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
6483 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6484 ZERO_STRUCTP(r
->out
.needed
);
6485 NDR_PULL_ALLOC(ndr
, r
->out
.service_returned
);
6486 ZERO_STRUCTP(r
->out
.service_returned
);
6487 NDR_PULL_ALLOC(ndr
, r
->out
.group_name
);
6488 ZERO_STRUCTP(r
->out
.group_name
);
6490 if (flags
& NDR_OUT
) {
6491 NDR_PULL_ALLOC_N(ndr
, r
->out
.services
, r
->in
.offered
);
6492 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.services
, r
->in
.offered
));
6493 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6494 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6496 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6497 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
6498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
6499 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
6500 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6501 NDR_PULL_ALLOC(ndr
, r
->out
.service_returned
);
6503 _mem_save_service_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6504 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.service_returned
, LIBNDR_FLAG_REF_ALLOC
);
6505 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.service_returned
));
6506 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
6507 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
6508 if (_ptr_resume_handle
) {
6509 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6511 r
->out
.resume_handle
= NULL
;
6513 if (r
->out
.resume_handle
) {
6514 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6515 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, 0);
6516 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6517 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
6519 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6520 NDR_PULL_ALLOC(ndr
, r
->out
.group_name
);
6522 _mem_save_group_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6523 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.group_name
, LIBNDR_FLAG_REF_ALLOC
);
6524 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_group_name
));
6525 if (_ptr_group_name
) {
6526 NDR_PULL_ALLOC(ndr
, *r
->out
.group_name
);
6528 *r
->out
.group_name
= NULL
;
6530 if (*r
->out
.group_name
) {
6531 _mem_save_group_name_1
= NDR_PULL_GET_MEM_CTX(ndr
);
6532 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.group_name
, 0);
6533 NDR_CHECK(ndr_pull_array_size(ndr
, r
->out
.group_name
));
6534 NDR_CHECK(ndr_pull_array_length(ndr
, r
->out
.group_name
));
6535 if (ndr_get_array_length(ndr
, r
->out
.group_name
) > ndr_get_array_size(ndr
, r
->out
.group_name
)) {
6536 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
));
6538 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, r
->out
.group_name
), sizeof(uint16_t)));
6539 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
));
6540 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_name_1
, 0);
6542 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_name_0
, LIBNDR_FLAG_REF_ALLOC
);
6543 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6545 return NDR_ERR_SUCCESS
;
6548 _PUBLIC_
void ndr_print_EnumServicesStatusExA(struct ndr_print
*ndr
, const char *name
, int flags
, const struct EnumServicesStatusExA
*r
)
6550 ndr_print_struct(ndr
, name
, "EnumServicesStatusExA");
6552 if (flags
& NDR_SET_VALUES
) {
6553 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6555 if (flags
& NDR_IN
) {
6556 ndr_print_struct(ndr
, "in", "EnumServicesStatusExA");
6558 ndr_print_ptr(ndr
, "scmanager", r
->in
.scmanager
);
6560 ndr_print_policy_handle(ndr
, "scmanager", r
->in
.scmanager
);
6562 ndr_print_uint32(ndr
, "info_level", r
->in
.info_level
);
6563 ndr_print_uint32(ndr
, "type", r
->in
.type
);
6564 ndr_print_svcctl_ServiceState(ndr
, "state", r
->in
.state
);
6565 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
6566 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6568 if (r
->in
.resume_handle
) {
6569 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6574 if (flags
& NDR_OUT
) {
6575 ndr_print_struct(ndr
, "out", "EnumServicesStatusExA");
6577 ndr_print_array_uint8(ndr
, "services", r
->out
.services
, r
->in
.offered
);
6578 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
6580 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
6582 ndr_print_ptr(ndr
, "service_returned", r
->out
.service_returned
);
6584 ndr_print_uint32(ndr
, "service_returned", *r
->out
.service_returned
);
6586 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6588 if (r
->out
.resume_handle
) {
6589 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6592 ndr_print_ptr(ndr
, "group_name", r
->out
.group_name
);
6594 ndr_print_ptr(ndr
, "group_name", *r
->out
.group_name
);
6596 if (*r
->out
.group_name
) {
6597 ndr_print_string(ndr
, "group_name", *r
->out
.group_name
);
6601 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6607 static enum ndr_err_code
ndr_push_EnumServicesStatusExW(struct ndr_push
*ndr
, int flags
, const struct EnumServicesStatusExW
*r
)
6609 if (flags
& NDR_IN
) {
6610 if (r
->in
.scmanager
== NULL
) {
6611 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6613 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager
));
6614 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.info_level
));
6615 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.type
));
6616 NDR_CHECK(ndr_push_svcctl_ServiceState(ndr
, NDR_SCALARS
, r
->in
.state
));
6617 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
6618 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.resume_handle
));
6619 if (r
->in
.resume_handle
) {
6620 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.resume_handle
));
6622 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.group_name
));
6623 if (r
->in
.group_name
) {
6624 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.group_name
, CH_UTF16
)));
6625 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6626 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.group_name
, CH_UTF16
)));
6627 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
));
6630 if (flags
& NDR_OUT
) {
6631 if (r
->out
.services
== NULL
) {
6632 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6634 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
6635 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.services
, r
->in
.offered
));
6636 if (r
->out
.needed
== NULL
) {
6637 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
6640 if (r
->out
.service_returned
== NULL
) {
6641 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
6643 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.service_returned
));
6644 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.resume_handle
));
6645 if (r
->out
.resume_handle
) {
6646 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.resume_handle
));
6648 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6650 return NDR_ERR_SUCCESS
;
6653 static enum ndr_err_code
ndr_pull_EnumServicesStatusExW(struct ndr_pull
*ndr
, int flags
, struct EnumServicesStatusExW
*r
)
6655 uint32_t _ptr_resume_handle
;
6656 uint32_t _ptr_group_name
;
6657 TALLOC_CTX
*_mem_save_scmanager_0
;
6658 TALLOC_CTX
*_mem_save_needed_0
;
6659 TALLOC_CTX
*_mem_save_service_returned_0
;
6660 TALLOC_CTX
*_mem_save_resume_handle_0
;
6661 TALLOC_CTX
*_mem_save_group_name_0
;
6662 if (flags
& NDR_IN
) {
6663 ZERO_STRUCT(r
->out
);
6665 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6666 NDR_PULL_ALLOC(ndr
, r
->in
.scmanager
);
6668 _mem_save_scmanager_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6669 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.scmanager
, LIBNDR_FLAG_REF_ALLOC
);
6670 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.scmanager
));
6671 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_scmanager_0
, LIBNDR_FLAG_REF_ALLOC
);
6672 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.info_level
));
6673 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.type
));
6674 NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr
, NDR_SCALARS
, &r
->in
.state
));
6675 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
6676 if (r
->in
.offered
> 0x40000) {
6677 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6679 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
6680 if (_ptr_resume_handle
) {
6681 NDR_PULL_ALLOC(ndr
, r
->in
.resume_handle
);
6683 r
->in
.resume_handle
= NULL
;
6685 if (r
->in
.resume_handle
) {
6686 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6687 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.resume_handle
, 0);
6688 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.resume_handle
));
6689 if (*r
->in
.resume_handle
> 0x40000) {
6690 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6692 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
6694 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_group_name
));
6695 if (_ptr_group_name
) {
6696 NDR_PULL_ALLOC(ndr
, r
->in
.group_name
);
6698 r
->in
.group_name
= NULL
;
6700 if (r
->in
.group_name
) {
6701 _mem_save_group_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6702 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.group_name
, 0);
6703 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.group_name
));
6704 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.group_name
));
6705 if (ndr_get_array_length(ndr
, &r
->in
.group_name
) > ndr_get_array_size(ndr
, &r
->in
.group_name
)) {
6706 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
));
6708 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.group_name
), sizeof(uint16_t)));
6709 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
));
6710 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_group_name_0
, 0);
6712 NDR_PULL_ALLOC_N(ndr
, r
->out
.services
, r
->in
.offered
);
6713 memset(r
->out
.services
, 0, (r
->in
.offered
) * sizeof(*r
->out
.services
));
6714 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6715 ZERO_STRUCTP(r
->out
.needed
);
6716 NDR_PULL_ALLOC(ndr
, r
->out
.service_returned
);
6717 ZERO_STRUCTP(r
->out
.service_returned
);
6719 if (flags
& NDR_OUT
) {
6720 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.services
));
6721 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6722 NDR_PULL_ALLOC_N(ndr
, r
->out
.services
, ndr_get_array_size(ndr
, &r
->out
.services
));
6724 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.services
, ndr_get_array_size(ndr
, &r
->out
.services
)));
6725 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6726 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
6728 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6729 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
6730 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
6731 if (*r
->out
.needed
> 0x40000) {
6732 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6734 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
6735 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
6736 NDR_PULL_ALLOC(ndr
, r
->out
.service_returned
);
6738 _mem_save_service_returned_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6739 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.service_returned
, LIBNDR_FLAG_REF_ALLOC
);
6740 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.service_returned
));
6741 if (*r
->out
.service_returned
> 0x40000) {
6742 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6744 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_service_returned_0
, LIBNDR_FLAG_REF_ALLOC
);
6745 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_resume_handle
));
6746 if (_ptr_resume_handle
) {
6747 NDR_PULL_ALLOC(ndr
, r
->out
.resume_handle
);
6749 r
->out
.resume_handle
= NULL
;
6751 if (r
->out
.resume_handle
) {
6752 _mem_save_resume_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6753 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.resume_handle
, 0);
6754 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.resume_handle
));
6755 if (*r
->out
.resume_handle
> 0x40000) {
6756 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_resume_handle_0
, 0);
6760 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6761 if (r
->out
.services
) {
6762 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.services
, r
->in
.offered
));
6765 return NDR_ERR_SUCCESS
;
6768 _PUBLIC_
void ndr_print_EnumServicesStatusExW(struct ndr_print
*ndr
, const char *name
, int flags
, const struct EnumServicesStatusExW
*r
)
6770 ndr_print_struct(ndr
, name
, "EnumServicesStatusExW");
6772 if (flags
& NDR_SET_VALUES
) {
6773 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6775 if (flags
& NDR_IN
) {
6776 ndr_print_struct(ndr
, "in", "EnumServicesStatusExW");
6778 ndr_print_ptr(ndr
, "scmanager", r
->in
.scmanager
);
6780 ndr_print_policy_handle(ndr
, "scmanager", r
->in
.scmanager
);
6782 ndr_print_uint32(ndr
, "info_level", r
->in
.info_level
);
6783 ndr_print_uint32(ndr
, "type", r
->in
.type
);
6784 ndr_print_svcctl_ServiceState(ndr
, "state", r
->in
.state
);
6785 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
6786 ndr_print_ptr(ndr
, "resume_handle", r
->in
.resume_handle
);
6788 if (r
->in
.resume_handle
) {
6789 ndr_print_uint32(ndr
, "resume_handle", *r
->in
.resume_handle
);
6792 ndr_print_ptr(ndr
, "group_name", r
->in
.group_name
);
6794 if (r
->in
.group_name
) {
6795 ndr_print_string(ndr
, "group_name", r
->in
.group_name
);
6800 if (flags
& NDR_OUT
) {
6801 ndr_print_struct(ndr
, "out", "EnumServicesStatusExW");
6803 ndr_print_ptr(ndr
, "services", r
->out
.services
);
6805 ndr_print_array_uint8(ndr
, "services", r
->out
.services
, r
->in
.offered
);
6807 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
6809 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
6811 ndr_print_ptr(ndr
, "service_returned", r
->out
.service_returned
);
6813 ndr_print_uint32(ndr
, "service_returned", *r
->out
.service_returned
);
6815 ndr_print_ptr(ndr
, "resume_handle", r
->out
.resume_handle
);
6817 if (r
->out
.resume_handle
) {
6818 ndr_print_uint32(ndr
, "resume_handle", *r
->out
.resume_handle
);
6821 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6827 static enum ndr_err_code
ndr_push_svcctl_SCSendTSMessage(struct ndr_push
*ndr
, int flags
, const struct svcctl_SCSendTSMessage
*r
)
6829 if (flags
& NDR_IN
) {
6831 if (flags
& NDR_OUT
) {
6832 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
6834 return NDR_ERR_SUCCESS
;
6837 static enum ndr_err_code
ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull
*ndr
, int flags
, struct svcctl_SCSendTSMessage
*r
)
6839 if (flags
& NDR_IN
) {
6841 if (flags
& NDR_OUT
) {
6842 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
6844 return NDR_ERR_SUCCESS
;
6847 _PUBLIC_
void ndr_print_svcctl_SCSendTSMessage(struct ndr_print
*ndr
, const char *name
, int flags
, const struct svcctl_SCSendTSMessage
*r
)
6849 ndr_print_struct(ndr
, name
, "svcctl_SCSendTSMessage");
6851 if (flags
& NDR_SET_VALUES
) {
6852 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
6854 if (flags
& NDR_IN
) {
6855 ndr_print_struct(ndr
, "in", "svcctl_SCSendTSMessage");
6859 if (flags
& NDR_OUT
) {
6860 ndr_print_struct(ndr
, "out", "svcctl_SCSendTSMessage");
6862 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
6868 static const struct ndr_interface_call svcctl_calls
[] = {
6870 "svcctl_CloseServiceHandle",
6871 sizeof(struct svcctl_CloseServiceHandle
),
6872 (ndr_push_flags_fn_t
) ndr_push_svcctl_CloseServiceHandle
,
6873 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_CloseServiceHandle
,
6874 (ndr_print_function_t
) ndr_print_svcctl_CloseServiceHandle
,
6878 "svcctl_ControlService",
6879 sizeof(struct svcctl_ControlService
),
6880 (ndr_push_flags_fn_t
) ndr_push_svcctl_ControlService
,
6881 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_ControlService
,
6882 (ndr_print_function_t
) ndr_print_svcctl_ControlService
,
6886 "svcctl_DeleteService",
6887 sizeof(struct svcctl_DeleteService
),
6888 (ndr_push_flags_fn_t
) ndr_push_svcctl_DeleteService
,
6889 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_DeleteService
,
6890 (ndr_print_function_t
) ndr_print_svcctl_DeleteService
,
6894 "svcctl_LockServiceDatabase",
6895 sizeof(struct svcctl_LockServiceDatabase
),
6896 (ndr_push_flags_fn_t
) ndr_push_svcctl_LockServiceDatabase
,
6897 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_LockServiceDatabase
,
6898 (ndr_print_function_t
) ndr_print_svcctl_LockServiceDatabase
,
6902 "svcctl_QueryServiceObjectSecurity",
6903 sizeof(struct svcctl_QueryServiceObjectSecurity
),
6904 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceObjectSecurity
,
6905 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceObjectSecurity
,
6906 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceObjectSecurity
,
6910 "svcctl_SetServiceObjectSecurity",
6911 sizeof(struct svcctl_SetServiceObjectSecurity
),
6912 (ndr_push_flags_fn_t
) ndr_push_svcctl_SetServiceObjectSecurity
,
6913 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_SetServiceObjectSecurity
,
6914 (ndr_print_function_t
) ndr_print_svcctl_SetServiceObjectSecurity
,
6918 "svcctl_QueryServiceStatus",
6919 sizeof(struct svcctl_QueryServiceStatus
),
6920 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceStatus
,
6921 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceStatus
,
6922 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceStatus
,
6926 "svcctl_SetServiceStatus",
6927 sizeof(struct svcctl_SetServiceStatus
),
6928 (ndr_push_flags_fn_t
) ndr_push_svcctl_SetServiceStatus
,
6929 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_SetServiceStatus
,
6930 (ndr_print_function_t
) ndr_print_svcctl_SetServiceStatus
,
6934 "svcctl_UnlockServiceDatabase",
6935 sizeof(struct svcctl_UnlockServiceDatabase
),
6936 (ndr_push_flags_fn_t
) ndr_push_svcctl_UnlockServiceDatabase
,
6937 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_UnlockServiceDatabase
,
6938 (ndr_print_function_t
) ndr_print_svcctl_UnlockServiceDatabase
,
6942 "svcctl_NotifyBootConfigStatus",
6943 sizeof(struct svcctl_NotifyBootConfigStatus
),
6944 (ndr_push_flags_fn_t
) ndr_push_svcctl_NotifyBootConfigStatus
,
6945 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_NotifyBootConfigStatus
,
6946 (ndr_print_function_t
) ndr_print_svcctl_NotifyBootConfigStatus
,
6950 "svcctl_SCSetServiceBitsW",
6951 sizeof(struct svcctl_SCSetServiceBitsW
),
6952 (ndr_push_flags_fn_t
) ndr_push_svcctl_SCSetServiceBitsW
,
6953 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_SCSetServiceBitsW
,
6954 (ndr_print_function_t
) ndr_print_svcctl_SCSetServiceBitsW
,
6958 "svcctl_ChangeServiceConfigW",
6959 sizeof(struct svcctl_ChangeServiceConfigW
),
6960 (ndr_push_flags_fn_t
) ndr_push_svcctl_ChangeServiceConfigW
,
6961 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_ChangeServiceConfigW
,
6962 (ndr_print_function_t
) ndr_print_svcctl_ChangeServiceConfigW
,
6966 "svcctl_CreateServiceW",
6967 sizeof(struct svcctl_CreateServiceW
),
6968 (ndr_push_flags_fn_t
) ndr_push_svcctl_CreateServiceW
,
6969 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_CreateServiceW
,
6970 (ndr_print_function_t
) ndr_print_svcctl_CreateServiceW
,
6974 "svcctl_EnumDependentServicesW",
6975 sizeof(struct svcctl_EnumDependentServicesW
),
6976 (ndr_push_flags_fn_t
) ndr_push_svcctl_EnumDependentServicesW
,
6977 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_EnumDependentServicesW
,
6978 (ndr_print_function_t
) ndr_print_svcctl_EnumDependentServicesW
,
6982 "svcctl_EnumServicesStatusW",
6983 sizeof(struct svcctl_EnumServicesStatusW
),
6984 (ndr_push_flags_fn_t
) ndr_push_svcctl_EnumServicesStatusW
,
6985 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_EnumServicesStatusW
,
6986 (ndr_print_function_t
) ndr_print_svcctl_EnumServicesStatusW
,
6990 "svcctl_OpenSCManagerW",
6991 sizeof(struct svcctl_OpenSCManagerW
),
6992 (ndr_push_flags_fn_t
) ndr_push_svcctl_OpenSCManagerW
,
6993 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_OpenSCManagerW
,
6994 (ndr_print_function_t
) ndr_print_svcctl_OpenSCManagerW
,
6998 "svcctl_OpenServiceW",
6999 sizeof(struct svcctl_OpenServiceW
),
7000 (ndr_push_flags_fn_t
) ndr_push_svcctl_OpenServiceW
,
7001 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_OpenServiceW
,
7002 (ndr_print_function_t
) ndr_print_svcctl_OpenServiceW
,
7006 "svcctl_QueryServiceConfigW",
7007 sizeof(struct svcctl_QueryServiceConfigW
),
7008 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceConfigW
,
7009 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceConfigW
,
7010 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceConfigW
,
7014 "svcctl_QueryServiceLockStatusW",
7015 sizeof(struct svcctl_QueryServiceLockStatusW
),
7016 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceLockStatusW
,
7017 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceLockStatusW
,
7018 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceLockStatusW
,
7022 "svcctl_StartServiceW",
7023 sizeof(struct svcctl_StartServiceW
),
7024 (ndr_push_flags_fn_t
) ndr_push_svcctl_StartServiceW
,
7025 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_StartServiceW
,
7026 (ndr_print_function_t
) ndr_print_svcctl_StartServiceW
,
7030 "svcctl_GetServiceDisplayNameW",
7031 sizeof(struct svcctl_GetServiceDisplayNameW
),
7032 (ndr_push_flags_fn_t
) ndr_push_svcctl_GetServiceDisplayNameW
,
7033 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_GetServiceDisplayNameW
,
7034 (ndr_print_function_t
) ndr_print_svcctl_GetServiceDisplayNameW
,
7038 "svcctl_GetServiceKeyNameW",
7039 sizeof(struct svcctl_GetServiceKeyNameW
),
7040 (ndr_push_flags_fn_t
) ndr_push_svcctl_GetServiceKeyNameW
,
7041 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_GetServiceKeyNameW
,
7042 (ndr_print_function_t
) ndr_print_svcctl_GetServiceKeyNameW
,
7046 "svcctl_SCSetServiceBitsA",
7047 sizeof(struct svcctl_SCSetServiceBitsA
),
7048 (ndr_push_flags_fn_t
) ndr_push_svcctl_SCSetServiceBitsA
,
7049 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_SCSetServiceBitsA
,
7050 (ndr_print_function_t
) ndr_print_svcctl_SCSetServiceBitsA
,
7054 "svcctl_ChangeServiceConfigA",
7055 sizeof(struct svcctl_ChangeServiceConfigA
),
7056 (ndr_push_flags_fn_t
) ndr_push_svcctl_ChangeServiceConfigA
,
7057 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_ChangeServiceConfigA
,
7058 (ndr_print_function_t
) ndr_print_svcctl_ChangeServiceConfigA
,
7062 "svcctl_CreateServiceA",
7063 sizeof(struct svcctl_CreateServiceA
),
7064 (ndr_push_flags_fn_t
) ndr_push_svcctl_CreateServiceA
,
7065 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_CreateServiceA
,
7066 (ndr_print_function_t
) ndr_print_svcctl_CreateServiceA
,
7070 "svcctl_EnumDependentServicesA",
7071 sizeof(struct svcctl_EnumDependentServicesA
),
7072 (ndr_push_flags_fn_t
) ndr_push_svcctl_EnumDependentServicesA
,
7073 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_EnumDependentServicesA
,
7074 (ndr_print_function_t
) ndr_print_svcctl_EnumDependentServicesA
,
7078 "svcctl_EnumServicesStatusA",
7079 sizeof(struct svcctl_EnumServicesStatusA
),
7080 (ndr_push_flags_fn_t
) ndr_push_svcctl_EnumServicesStatusA
,
7081 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_EnumServicesStatusA
,
7082 (ndr_print_function_t
) ndr_print_svcctl_EnumServicesStatusA
,
7086 "svcctl_OpenSCManagerA",
7087 sizeof(struct svcctl_OpenSCManagerA
),
7088 (ndr_push_flags_fn_t
) ndr_push_svcctl_OpenSCManagerA
,
7089 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_OpenSCManagerA
,
7090 (ndr_print_function_t
) ndr_print_svcctl_OpenSCManagerA
,
7094 "svcctl_OpenServiceA",
7095 sizeof(struct svcctl_OpenServiceA
),
7096 (ndr_push_flags_fn_t
) ndr_push_svcctl_OpenServiceA
,
7097 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_OpenServiceA
,
7098 (ndr_print_function_t
) ndr_print_svcctl_OpenServiceA
,
7102 "svcctl_QueryServiceConfigA",
7103 sizeof(struct svcctl_QueryServiceConfigA
),
7104 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceConfigA
,
7105 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceConfigA
,
7106 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceConfigA
,
7110 "svcctl_QueryServiceLockStatusA",
7111 sizeof(struct svcctl_QueryServiceLockStatusA
),
7112 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceLockStatusA
,
7113 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceLockStatusA
,
7114 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceLockStatusA
,
7118 "svcctl_StartServiceA",
7119 sizeof(struct svcctl_StartServiceA
),
7120 (ndr_push_flags_fn_t
) ndr_push_svcctl_StartServiceA
,
7121 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_StartServiceA
,
7122 (ndr_print_function_t
) ndr_print_svcctl_StartServiceA
,
7126 "svcctl_GetServiceDisplayNameA",
7127 sizeof(struct svcctl_GetServiceDisplayNameA
),
7128 (ndr_push_flags_fn_t
) ndr_push_svcctl_GetServiceDisplayNameA
,
7129 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_GetServiceDisplayNameA
,
7130 (ndr_print_function_t
) ndr_print_svcctl_GetServiceDisplayNameA
,
7134 "svcctl_GetServiceKeyNameA",
7135 sizeof(struct svcctl_GetServiceKeyNameA
),
7136 (ndr_push_flags_fn_t
) ndr_push_svcctl_GetServiceKeyNameA
,
7137 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_GetServiceKeyNameA
,
7138 (ndr_print_function_t
) ndr_print_svcctl_GetServiceKeyNameA
,
7142 "svcctl_GetCurrentGroupeStateW",
7143 sizeof(struct svcctl_GetCurrentGroupeStateW
),
7144 (ndr_push_flags_fn_t
) ndr_push_svcctl_GetCurrentGroupeStateW
,
7145 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_GetCurrentGroupeStateW
,
7146 (ndr_print_function_t
) ndr_print_svcctl_GetCurrentGroupeStateW
,
7150 "svcctl_EnumServiceGroupW",
7151 sizeof(struct svcctl_EnumServiceGroupW
),
7152 (ndr_push_flags_fn_t
) ndr_push_svcctl_EnumServiceGroupW
,
7153 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_EnumServiceGroupW
,
7154 (ndr_print_function_t
) ndr_print_svcctl_EnumServiceGroupW
,
7158 "svcctl_ChangeServiceConfig2A",
7159 sizeof(struct svcctl_ChangeServiceConfig2A
),
7160 (ndr_push_flags_fn_t
) ndr_push_svcctl_ChangeServiceConfig2A
,
7161 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_ChangeServiceConfig2A
,
7162 (ndr_print_function_t
) ndr_print_svcctl_ChangeServiceConfig2A
,
7166 "svcctl_ChangeServiceConfig2W",
7167 sizeof(struct svcctl_ChangeServiceConfig2W
),
7168 (ndr_push_flags_fn_t
) ndr_push_svcctl_ChangeServiceConfig2W
,
7169 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_ChangeServiceConfig2W
,
7170 (ndr_print_function_t
) ndr_print_svcctl_ChangeServiceConfig2W
,
7174 "svcctl_QueryServiceConfig2A",
7175 sizeof(struct svcctl_QueryServiceConfig2A
),
7176 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceConfig2A
,
7177 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceConfig2A
,
7178 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceConfig2A
,
7182 "svcctl_QueryServiceConfig2W",
7183 sizeof(struct svcctl_QueryServiceConfig2W
),
7184 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceConfig2W
,
7185 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceConfig2W
,
7186 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceConfig2W
,
7190 "svcctl_QueryServiceStatusEx",
7191 sizeof(struct svcctl_QueryServiceStatusEx
),
7192 (ndr_push_flags_fn_t
) ndr_push_svcctl_QueryServiceStatusEx
,
7193 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_QueryServiceStatusEx
,
7194 (ndr_print_function_t
) ndr_print_svcctl_QueryServiceStatusEx
,
7198 "EnumServicesStatusExA",
7199 sizeof(struct EnumServicesStatusExA
),
7200 (ndr_push_flags_fn_t
) ndr_push_EnumServicesStatusExA
,
7201 (ndr_pull_flags_fn_t
) ndr_pull_EnumServicesStatusExA
,
7202 (ndr_print_function_t
) ndr_print_EnumServicesStatusExA
,
7206 "EnumServicesStatusExW",
7207 sizeof(struct EnumServicesStatusExW
),
7208 (ndr_push_flags_fn_t
) ndr_push_EnumServicesStatusExW
,
7209 (ndr_pull_flags_fn_t
) ndr_pull_EnumServicesStatusExW
,
7210 (ndr_print_function_t
) ndr_print_EnumServicesStatusExW
,
7214 "svcctl_SCSendTSMessage",
7215 sizeof(struct svcctl_SCSendTSMessage
),
7216 (ndr_push_flags_fn_t
) ndr_push_svcctl_SCSendTSMessage
,
7217 (ndr_pull_flags_fn_t
) ndr_pull_svcctl_SCSendTSMessage
,
7218 (ndr_print_function_t
) ndr_print_svcctl_SCSendTSMessage
,
7221 { NULL
, 0, NULL
, NULL
, NULL
, false }
7224 static const char * const svcctl_endpoint_strings
[] = {
7225 "ncacn_np:[\\pipe\\svcctl]",
7229 static const struct ndr_interface_string_array svcctl_endpoints
= {
7231 .names
= svcctl_endpoint_strings
7234 static const char * const svcctl_authservice_strings
[] = {
7238 static const struct ndr_interface_string_array svcctl_authservices
= {
7240 .names
= svcctl_authservice_strings
7244 const struct ndr_interface_table ndr_table_svcctl
= {
7247 {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
7250 .helpstring
= NDR_SVCCTL_HELPSTRING
,
7252 .calls
= svcctl_calls
,
7253 .endpoints
= &svcctl_endpoints
,
7254 .authservices
= &svcctl_authservices