Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_winspool.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_winreg.h"
9 : #include "librpc/gen_ndr/ndr_spoolss.h"
10 0 : static enum ndr_err_code ndr_push_winspool_NOTIFY_REPLY_CONTAINER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winspool_NOTIFY_REPLY_CONTAINER *r)
11 : {
12 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13 0 : if (ndr_flags & NDR_SCALARS) {
14 0 : NDR_CHECK(ndr_push_align(ndr, 5));
15 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pInfo));
16 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
17 : }
18 0 : if (ndr_flags & NDR_BUFFERS) {
19 0 : if (r->pInfo) {
20 0 : NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pInfo));
21 : }
22 : }
23 0 : return NDR_ERR_SUCCESS;
24 : }
25 :
26 0 : static enum ndr_err_code ndr_pull_winspool_NOTIFY_REPLY_CONTAINER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winspool_NOTIFY_REPLY_CONTAINER *r)
27 : {
28 0 : uint32_t _ptr_pInfo;
29 0 : TALLOC_CTX *_mem_save_pInfo_0 = NULL;
30 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
31 0 : if (ndr_flags & NDR_SCALARS) {
32 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
33 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pInfo));
34 0 : if (_ptr_pInfo) {
35 0 : NDR_PULL_ALLOC(ndr, r->pInfo);
36 : } else {
37 0 : r->pInfo = NULL;
38 : }
39 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
40 : }
41 0 : if (ndr_flags & NDR_BUFFERS) {
42 0 : if (r->pInfo) {
43 0 : _mem_save_pInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
44 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pInfo, 0);
45 0 : NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->pInfo));
46 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pInfo_0, 0);
47 : }
48 : }
49 0 : return NDR_ERR_SUCCESS;
50 : }
51 :
52 0 : _PUBLIC_ void ndr_print_winspool_NOTIFY_REPLY_CONTAINER(struct ndr_print *ndr, const char *name, const struct winspool_NOTIFY_REPLY_CONTAINER *r)
53 : {
54 0 : ndr_print_struct(ndr, name, "winspool_NOTIFY_REPLY_CONTAINER");
55 0 : if (r == NULL) { ndr_print_null(ndr); return; }
56 0 : ndr->depth++;
57 0 : ndr_print_ptr(ndr, "pInfo", r->pInfo);
58 0 : ndr->depth++;
59 0 : if (r->pInfo) {
60 0 : ndr_print_spoolss_NotifyInfo(ndr, "pInfo", r->pInfo);
61 : }
62 0 : ndr->depth--;
63 0 : ndr->depth--;
64 : }
65 :
66 0 : static enum ndr_err_code ndr_push_winspool_NOTIFY_OPTIONS_CONTAINER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winspool_NOTIFY_OPTIONS_CONTAINER *r)
67 : {
68 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
69 0 : if (ndr_flags & NDR_SCALARS) {
70 0 : NDR_CHECK(ndr_push_align(ndr, 5));
71 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pOptions));
72 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
73 : }
74 0 : if (ndr_flags & NDR_BUFFERS) {
75 0 : if (r->pOptions) {
76 0 : NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->pOptions));
77 : }
78 : }
79 0 : return NDR_ERR_SUCCESS;
80 : }
81 :
82 4 : static enum ndr_err_code ndr_pull_winspool_NOTIFY_OPTIONS_CONTAINER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winspool_NOTIFY_OPTIONS_CONTAINER *r)
83 : {
84 4 : uint32_t _ptr_pOptions;
85 4 : TALLOC_CTX *_mem_save_pOptions_0 = NULL;
86 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
87 4 : if (ndr_flags & NDR_SCALARS) {
88 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
89 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pOptions));
90 2 : if (_ptr_pOptions) {
91 2 : NDR_PULL_ALLOC(ndr, r->pOptions);
92 : } else {
93 0 : r->pOptions = NULL;
94 : }
95 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
96 : }
97 4 : if (ndr_flags & NDR_BUFFERS) {
98 2 : if (r->pOptions) {
99 2 : _mem_save_pOptions_0 = NDR_PULL_GET_MEM_CTX(ndr);
100 2 : NDR_PULL_SET_MEM_CTX(ndr, r->pOptions, 0);
101 2 : NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->pOptions));
102 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pOptions_0, 0);
103 : }
104 : }
105 0 : return NDR_ERR_SUCCESS;
106 : }
107 :
108 2 : _PUBLIC_ void ndr_print_winspool_NOTIFY_OPTIONS_CONTAINER(struct ndr_print *ndr, const char *name, const struct winspool_NOTIFY_OPTIONS_CONTAINER *r)
109 : {
110 2 : ndr_print_struct(ndr, name, "winspool_NOTIFY_OPTIONS_CONTAINER");
111 2 : if (r == NULL) { ndr_print_null(ndr); return; }
112 2 : ndr->depth++;
113 2 : ndr_print_ptr(ndr, "pOptions", r->pOptions);
114 2 : ndr->depth++;
115 2 : if (r->pOptions) {
116 2 : ndr_print_spoolss_NotifyOption(ndr, "pOptions", r->pOptions);
117 : }
118 2 : ndr->depth--;
119 2 : ndr->depth--;
120 : }
121 :
122 0 : static enum ndr_err_code ndr_push_winspool_PrintPropertyType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum winspool_PrintPropertyType r)
123 : {
124 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
125 0 : return NDR_ERR_SUCCESS;
126 : }
127 :
128 8 : static enum ndr_err_code ndr_pull_winspool_PrintPropertyType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum winspool_PrintPropertyType *r)
129 : {
130 8 : uint16_t v;
131 8 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
132 8 : *r = v;
133 8 : return NDR_ERR_SUCCESS;
134 : }
135 :
136 8 : _PUBLIC_ void ndr_print_winspool_PrintPropertyType(struct ndr_print *ndr, const char *name, enum winspool_PrintPropertyType r)
137 : {
138 8 : const char *val = NULL;
139 :
140 8 : switch (r) {
141 0 : case winspool_PropertyTypeString: val = "winspool_PropertyTypeString"; break;
142 6 : case winspool_PropertyTypeInt32: val = "winspool_PropertyTypeInt32"; break;
143 0 : case winspool_PropertyTypeInt64: val = "winspool_PropertyTypeInt64"; break;
144 0 : case winspool_PropertyTypeByte: val = "winspool_PropertyTypeByte"; break;
145 0 : case winspool_PropertyTypeTime: val = "winspool_PropertyTypeTime"; break;
146 0 : case winspool_PropertyTypeDevMode: val = "winspool_PropertyTypeDevMode"; break;
147 0 : case winspool_PropertyTypeSD: val = "winspool_PropertyTypeSD"; break;
148 0 : case winspool_PropertyTypeNotificationReply: val = "winspool_PropertyTypeNotificationReply"; break;
149 2 : case winspool_PropertyTypeNotificationOptions: val = "winspool_PropertyTypeNotificationOptions"; break;
150 : }
151 8 : ndr_print_enum(ndr, name, "ENUM", val, r);
152 8 : }
153 :
154 0 : static enum ndr_err_code ndr_push_winspool_PrintPropertyValueUnion(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union winspool_PrintPropertyValueUnion *r)
155 : {
156 0 : uint32_t level;
157 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
158 0 : if (ndr_flags & NDR_SCALARS) {
159 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
160 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
161 0 : NDR_CHECK(ndr_push_union_align(ndr, 8));
162 0 : NDR_CHECK(ndr_push_winspool_PrintPropertyType(ndr, NDR_SCALARS, level));
163 : /* ms_union is always aligned to the largest union arm*/
164 0 : NDR_CHECK(ndr_push_align(ndr, 8));
165 0 : switch (level) {
166 0 : case winspool_PropertyTypeString: {
167 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->propertyString));
168 0 : break; }
169 :
170 0 : case winspool_PropertyTypeInt32: {
171 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->propertyInt32));
172 0 : break; }
173 :
174 0 : case winspool_PropertyTypeInt64: {
175 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->propertyInt64));
176 0 : break; }
177 :
178 0 : case winspool_PropertyTypeByte: {
179 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->propertyByte));
180 0 : break; }
181 :
182 0 : case winspool_PropertyTypeTime: {
183 0 : NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr, NDR_SCALARS, &r->propertyTimeContainer));
184 0 : break; }
185 :
186 0 : case winspool_PropertyTypeDevMode: {
187 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS, &r->propertyDevModeContainer));
188 0 : break; }
189 :
190 0 : case winspool_PropertyTypeSD: {
191 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->propertySDContainer));
192 0 : break; }
193 :
194 0 : case winspool_PropertyTypeNotificationReply: {
195 0 : NDR_CHECK(ndr_push_winspool_NOTIFY_REPLY_CONTAINER(ndr, NDR_SCALARS, &r->propertyReplyContainer));
196 0 : break; }
197 :
198 0 : case winspool_PropertyTypeNotificationOptions: {
199 0 : NDR_CHECK(ndr_push_winspool_NOTIFY_OPTIONS_CONTAINER(ndr, NDR_SCALARS, &r->propertyOptionsContainer));
200 0 : break; }
201 :
202 0 : default:
203 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
204 : }
205 : }
206 0 : if (ndr_flags & NDR_BUFFERS) {
207 0 : if (!(ndr_flags & NDR_SCALARS)) {
208 : /* We didn't get it above, and the token is not needed after this. */
209 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
210 : }
211 0 : switch (level) {
212 0 : case winspool_PropertyTypeString:
213 0 : if (r->propertyString) {
214 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyString, CH_UTF16)));
215 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
216 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyString, CH_UTF16)));
217 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->propertyString, ndr_charset_length(r->propertyString, CH_UTF16), sizeof(uint16_t), CH_UTF16));
218 : }
219 0 : break;
220 :
221 0 : case winspool_PropertyTypeInt32:
222 0 : break;
223 :
224 0 : case winspool_PropertyTypeInt64:
225 0 : break;
226 :
227 0 : case winspool_PropertyTypeByte:
228 0 : break;
229 :
230 0 : case winspool_PropertyTypeTime:
231 0 : NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr, NDR_BUFFERS, &r->propertyTimeContainer));
232 0 : break;
233 :
234 0 : case winspool_PropertyTypeDevMode:
235 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_BUFFERS, &r->propertyDevModeContainer));
236 0 : break;
237 :
238 0 : case winspool_PropertyTypeSD:
239 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->propertySDContainer));
240 0 : break;
241 :
242 0 : case winspool_PropertyTypeNotificationReply:
243 0 : NDR_CHECK(ndr_push_winspool_NOTIFY_REPLY_CONTAINER(ndr, NDR_BUFFERS, &r->propertyReplyContainer));
244 0 : break;
245 :
246 0 : case winspool_PropertyTypeNotificationOptions:
247 0 : NDR_CHECK(ndr_push_winspool_NOTIFY_OPTIONS_CONTAINER(ndr, NDR_BUFFERS, &r->propertyOptionsContainer));
248 0 : break;
249 :
250 0 : default:
251 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
252 : }
253 : }
254 0 : return NDR_ERR_SUCCESS;
255 : }
256 :
257 16 : static enum ndr_err_code ndr_pull_winspool_PrintPropertyValueUnion(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union winspool_PrintPropertyValueUnion *r)
258 : {
259 16 : uint32_t level;
260 16 : uint16_t _level;
261 16 : TALLOC_CTX *_mem_save_propertyString_0 = NULL;
262 16 : uint32_t _ptr_propertyString;
263 16 : uint32_t size_propertyString_1 = 0;
264 16 : uint32_t length_propertyString_1 = 0;
265 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
266 16 : if (ndr_flags & NDR_SCALARS) {
267 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
268 8 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
269 8 : NDR_CHECK(ndr_pull_union_align(ndr, 8));
270 8 : NDR_CHECK(ndr_pull_uint1632(ndr, NDR_SCALARS, &_level));
271 8 : if (_level != level) {
272 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu16" for r at %s", (uint16_t)_level, __location__);
273 : }
274 : /* ms_union is always aligned to the largest union arm*/
275 8 : NDR_CHECK(ndr_pull_align(ndr, 8));
276 8 : switch (level) {
277 0 : case winspool_PropertyTypeString: {
278 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_propertyString));
279 0 : if (_ptr_propertyString) {
280 0 : NDR_PULL_ALLOC(ndr, r->propertyString);
281 : } else {
282 0 : r->propertyString = NULL;
283 : }
284 0 : break; }
285 :
286 6 : case winspool_PropertyTypeInt32: {
287 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->propertyInt32));
288 0 : break; }
289 :
290 0 : case winspool_PropertyTypeInt64: {
291 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->propertyInt64));
292 0 : break; }
293 :
294 0 : case winspool_PropertyTypeByte: {
295 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->propertyByte));
296 0 : break; }
297 :
298 0 : case winspool_PropertyTypeTime: {
299 0 : NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr, NDR_SCALARS, &r->propertyTimeContainer));
300 0 : break; }
301 :
302 0 : case winspool_PropertyTypeDevMode: {
303 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS, &r->propertyDevModeContainer));
304 0 : break; }
305 :
306 0 : case winspool_PropertyTypeSD: {
307 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->propertySDContainer));
308 0 : break; }
309 :
310 0 : case winspool_PropertyTypeNotificationReply: {
311 0 : NDR_CHECK(ndr_pull_winspool_NOTIFY_REPLY_CONTAINER(ndr, NDR_SCALARS, &r->propertyReplyContainer));
312 0 : break; }
313 :
314 2 : case winspool_PropertyTypeNotificationOptions: {
315 2 : NDR_CHECK(ndr_pull_winspool_NOTIFY_OPTIONS_CONTAINER(ndr, NDR_SCALARS, &r->propertyOptionsContainer));
316 0 : break; }
317 :
318 0 : default:
319 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
320 : }
321 : }
322 16 : if (ndr_flags & NDR_BUFFERS) {
323 8 : if (!(ndr_flags & NDR_SCALARS)) {
324 : /* We didn't get it above, and the token is not needed after this. */
325 8 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
326 : }
327 8 : switch (level) {
328 0 : case winspool_PropertyTypeString:
329 0 : if (r->propertyString) {
330 0 : _mem_save_propertyString_0 = NDR_PULL_GET_MEM_CTX(ndr);
331 0 : NDR_PULL_SET_MEM_CTX(ndr, r->propertyString, 0);
332 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->propertyString));
333 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->propertyString));
334 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->propertyString, &size_propertyString_1));
335 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->propertyString, &length_propertyString_1));
336 0 : if (length_propertyString_1 > size_propertyString_1) {
337 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_propertyString_1, length_propertyString_1);
338 : }
339 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_propertyString_1, sizeof(uint16_t)));
340 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->propertyString, length_propertyString_1, sizeof(uint16_t), CH_UTF16));
341 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_propertyString_0, 0);
342 : }
343 0 : break;
344 :
345 0 : case winspool_PropertyTypeInt32:
346 0 : break;
347 :
348 0 : case winspool_PropertyTypeInt64:
349 0 : break;
350 :
351 0 : case winspool_PropertyTypeByte:
352 0 : break;
353 :
354 0 : case winspool_PropertyTypeTime:
355 0 : NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr, NDR_BUFFERS, &r->propertyTimeContainer));
356 0 : break;
357 :
358 0 : case winspool_PropertyTypeDevMode:
359 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_BUFFERS, &r->propertyDevModeContainer));
360 0 : break;
361 :
362 0 : case winspool_PropertyTypeSD:
363 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->propertySDContainer));
364 0 : break;
365 :
366 0 : case winspool_PropertyTypeNotificationReply:
367 0 : NDR_CHECK(ndr_pull_winspool_NOTIFY_REPLY_CONTAINER(ndr, NDR_BUFFERS, &r->propertyReplyContainer));
368 0 : break;
369 :
370 2 : case winspool_PropertyTypeNotificationOptions:
371 2 : NDR_CHECK(ndr_pull_winspool_NOTIFY_OPTIONS_CONTAINER(ndr, NDR_BUFFERS, &r->propertyOptionsContainer));
372 0 : break;
373 :
374 0 : default:
375 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
376 : }
377 : }
378 0 : return NDR_ERR_SUCCESS;
379 : }
380 :
381 8 : _PUBLIC_ void ndr_print_winspool_PrintPropertyValueUnion(struct ndr_print *ndr, const char *name, const union winspool_PrintPropertyValueUnion *r)
382 : {
383 8 : uint32_t level;
384 8 : level = ndr_print_steal_switch_value(ndr, r);
385 8 : ndr_print_union(ndr, name, level, "winspool_PrintPropertyValueUnion");
386 8 : switch (level) {
387 0 : case winspool_PropertyTypeString:
388 0 : ndr_print_ptr(ndr, "propertyString", r->propertyString);
389 0 : ndr->depth++;
390 0 : if (r->propertyString) {
391 0 : ndr_print_string(ndr, "propertyString", r->propertyString);
392 : }
393 0 : ndr->depth--;
394 0 : break;
395 :
396 6 : case winspool_PropertyTypeInt32:
397 6 : ndr_print_uint32(ndr, "propertyInt32", r->propertyInt32);
398 6 : break;
399 :
400 0 : case winspool_PropertyTypeInt64:
401 0 : ndr_print_hyper(ndr, "propertyInt64", r->propertyInt64);
402 0 : break;
403 :
404 0 : case winspool_PropertyTypeByte:
405 0 : ndr_print_uint8(ndr, "propertyByte", r->propertyByte);
406 0 : break;
407 :
408 0 : case winspool_PropertyTypeTime:
409 0 : ndr_print_spoolss_TimeCtr(ndr, "propertyTimeContainer", &r->propertyTimeContainer);
410 0 : break;
411 :
412 0 : case winspool_PropertyTypeDevMode:
413 0 : ndr_print_spoolss_DevmodeContainer(ndr, "propertyDevModeContainer", &r->propertyDevModeContainer);
414 0 : break;
415 :
416 0 : case winspool_PropertyTypeSD:
417 0 : ndr_print_sec_desc_buf(ndr, "propertySDContainer", &r->propertySDContainer);
418 0 : break;
419 :
420 0 : case winspool_PropertyTypeNotificationReply:
421 0 : ndr_print_winspool_NOTIFY_REPLY_CONTAINER(ndr, "propertyReplyContainer", &r->propertyReplyContainer);
422 0 : break;
423 :
424 2 : case winspool_PropertyTypeNotificationOptions:
425 2 : ndr_print_winspool_NOTIFY_OPTIONS_CONTAINER(ndr, "propertyOptionsContainer", &r->propertyOptionsContainer);
426 2 : break;
427 :
428 0 : default:
429 0 : ndr_print_bad_level(ndr, name, level);
430 : }
431 8 : }
432 :
433 0 : static enum ndr_err_code ndr_push_winspool_PrintPropertyValue(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winspool_PrintPropertyValue *r)
434 : {
435 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
436 0 : if (ndr_flags & NDR_SCALARS) {
437 0 : NDR_CHECK(ndr_push_align(ndr, 8));
438 0 : NDR_CHECK(ndr_push_winspool_PrintPropertyType(ndr, NDR_SCALARS, r->PropertyType));
439 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->value, r->PropertyType));
440 0 : NDR_CHECK(ndr_push_winspool_PrintPropertyValueUnion(ndr, NDR_SCALARS, &r->value));
441 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
442 : }
443 0 : if (ndr_flags & NDR_BUFFERS) {
444 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->value, r->PropertyType));
445 0 : NDR_CHECK(ndr_push_winspool_PrintPropertyValueUnion(ndr, NDR_BUFFERS, &r->value));
446 : }
447 0 : return NDR_ERR_SUCCESS;
448 : }
449 :
450 16 : static enum ndr_err_code ndr_pull_winspool_PrintPropertyValue(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winspool_PrintPropertyValue *r)
451 : {
452 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
453 16 : if (ndr_flags & NDR_SCALARS) {
454 8 : NDR_CHECK(ndr_pull_align(ndr, 8));
455 16 : NDR_CHECK(ndr_pull_winspool_PrintPropertyType(ndr, NDR_SCALARS, &r->PropertyType));
456 8 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->value, r->PropertyType));
457 8 : NDR_CHECK(ndr_pull_winspool_PrintPropertyValueUnion(ndr, NDR_SCALARS, &r->value));
458 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
459 : }
460 16 : if (ndr_flags & NDR_BUFFERS) {
461 8 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->value, r->PropertyType));
462 8 : NDR_CHECK(ndr_pull_winspool_PrintPropertyValueUnion(ndr, NDR_BUFFERS, &r->value));
463 : }
464 0 : return NDR_ERR_SUCCESS;
465 : }
466 :
467 8 : _PUBLIC_ void ndr_print_winspool_PrintPropertyValue(struct ndr_print *ndr, const char *name, const struct winspool_PrintPropertyValue *r)
468 : {
469 8 : ndr_print_struct(ndr, name, "winspool_PrintPropertyValue");
470 8 : if (r == NULL) { ndr_print_null(ndr); return; }
471 8 : ndr->depth++;
472 8 : ndr_print_winspool_PrintPropertyType(ndr, "PropertyType", r->PropertyType);
473 8 : ndr_print_set_switch_value(ndr, &r->value, r->PropertyType);
474 8 : ndr_print_winspool_PrintPropertyValueUnion(ndr, "value", &r->value);
475 8 : ndr->depth--;
476 : }
477 :
478 0 : static enum ndr_err_code ndr_push_winspool_PrintNamedProperty(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winspool_PrintNamedProperty *r)
479 : {
480 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
481 0 : if (ndr_flags & NDR_SCALARS) {
482 0 : NDR_CHECK(ndr_push_align(ndr, 8));
483 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->propertyName));
484 0 : NDR_CHECK(ndr_push_winspool_PrintPropertyValue(ndr, NDR_SCALARS, &r->propertyValue));
485 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
486 : }
487 0 : if (ndr_flags & NDR_BUFFERS) {
488 0 : if (r->propertyName) {
489 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyName, CH_UTF16)));
490 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
491 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->propertyName, CH_UTF16)));
492 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->propertyName, ndr_charset_length(r->propertyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
493 : }
494 0 : NDR_CHECK(ndr_push_winspool_PrintPropertyValue(ndr, NDR_BUFFERS, &r->propertyValue));
495 : }
496 0 : return NDR_ERR_SUCCESS;
497 : }
498 :
499 16 : static enum ndr_err_code ndr_pull_winspool_PrintNamedProperty(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winspool_PrintNamedProperty *r)
500 : {
501 16 : uint32_t _ptr_propertyName;
502 16 : uint32_t size_propertyName_1 = 0;
503 16 : uint32_t length_propertyName_1 = 0;
504 16 : TALLOC_CTX *_mem_save_propertyName_0 = NULL;
505 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
506 16 : if (ndr_flags & NDR_SCALARS) {
507 8 : NDR_CHECK(ndr_pull_align(ndr, 8));
508 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_propertyName));
509 8 : if (_ptr_propertyName) {
510 8 : NDR_PULL_ALLOC(ndr, r->propertyName);
511 : } else {
512 0 : r->propertyName = NULL;
513 : }
514 8 : NDR_CHECK(ndr_pull_winspool_PrintPropertyValue(ndr, NDR_SCALARS, &r->propertyValue));
515 8 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
516 : }
517 16 : if (ndr_flags & NDR_BUFFERS) {
518 8 : if (r->propertyName) {
519 8 : _mem_save_propertyName_0 = NDR_PULL_GET_MEM_CTX(ndr);
520 8 : NDR_PULL_SET_MEM_CTX(ndr, r->propertyName, 0);
521 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->propertyName));
522 8 : NDR_CHECK(ndr_pull_array_length(ndr, &r->propertyName));
523 8 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->propertyName, &size_propertyName_1));
524 8 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->propertyName, &length_propertyName_1));
525 8 : if (length_propertyName_1 > size_propertyName_1) {
526 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_propertyName_1, length_propertyName_1);
527 : }
528 8 : NDR_CHECK(ndr_check_string_terminator(ndr, length_propertyName_1, sizeof(uint16_t)));
529 8 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->propertyName, length_propertyName_1, sizeof(uint16_t), CH_UTF16));
530 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_propertyName_0, 0);
531 : }
532 8 : NDR_CHECK(ndr_pull_winspool_PrintPropertyValue(ndr, NDR_BUFFERS, &r->propertyValue));
533 : }
534 0 : return NDR_ERR_SUCCESS;
535 : }
536 :
537 8 : _PUBLIC_ void ndr_print_winspool_PrintNamedProperty(struct ndr_print *ndr, const char *name, const struct winspool_PrintNamedProperty *r)
538 : {
539 8 : ndr_print_struct(ndr, name, "winspool_PrintNamedProperty");
540 8 : if (r == NULL) { ndr_print_null(ndr); return; }
541 8 : ndr->depth++;
542 8 : ndr_print_ptr(ndr, "propertyName", r->propertyName);
543 8 : ndr->depth++;
544 8 : if (r->propertyName) {
545 8 : ndr_print_string(ndr, "propertyName", r->propertyName);
546 : }
547 8 : ndr->depth--;
548 8 : ndr_print_winspool_PrintPropertyValue(ndr, "propertyValue", &r->propertyValue);
549 8 : ndr->depth--;
550 : }
551 :
552 0 : static enum ndr_err_code ndr_push_winspool_PrintPropertiesCollection(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winspool_PrintPropertiesCollection *r)
553 : {
554 0 : uint32_t cntr_propertiesCollection_1;
555 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
556 0 : if (ndr_flags & NDR_SCALARS) {
557 0 : NDR_CHECK(ndr_push_align(ndr, 5));
558 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numberOfProperties));
559 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->propertiesCollection));
560 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
561 : }
562 0 : if (ndr_flags & NDR_BUFFERS) {
563 0 : if (r->propertiesCollection) {
564 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->numberOfProperties));
565 0 : for (cntr_propertiesCollection_1 = 0; cntr_propertiesCollection_1 < (r->numberOfProperties); cntr_propertiesCollection_1++) {
566 0 : NDR_CHECK(ndr_push_winspool_PrintNamedProperty(ndr, NDR_SCALARS, &r->propertiesCollection[cntr_propertiesCollection_1]));
567 : }
568 0 : for (cntr_propertiesCollection_1 = 0; cntr_propertiesCollection_1 < (r->numberOfProperties); cntr_propertiesCollection_1++) {
569 0 : NDR_CHECK(ndr_push_winspool_PrintNamedProperty(ndr, NDR_BUFFERS, &r->propertiesCollection[cntr_propertiesCollection_1]));
570 : }
571 : }
572 : }
573 0 : return NDR_ERR_SUCCESS;
574 : }
575 :
576 2 : static enum ndr_err_code ndr_pull_winspool_PrintPropertiesCollection(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winspool_PrintPropertiesCollection *r)
577 : {
578 2 : uint32_t _ptr_propertiesCollection;
579 2 : uint32_t size_propertiesCollection_1 = 0;
580 2 : uint32_t cntr_propertiesCollection_1;
581 2 : TALLOC_CTX *_mem_save_propertiesCollection_0 = NULL;
582 2 : TALLOC_CTX *_mem_save_propertiesCollection_1 = NULL;
583 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
584 2 : if (ndr_flags & NDR_SCALARS) {
585 2 : NDR_CHECK(ndr_pull_align(ndr, 5));
586 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numberOfProperties));
587 2 : if (r->numberOfProperties > 50) {
588 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->numberOfProperties), (uint32_t)(0), (uint32_t)(50));
589 : }
590 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_propertiesCollection));
591 2 : if (_ptr_propertiesCollection) {
592 2 : NDR_PULL_ALLOC(ndr, r->propertiesCollection);
593 : } else {
594 0 : r->propertiesCollection = NULL;
595 : }
596 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
597 : }
598 2 : if (ndr_flags & NDR_BUFFERS) {
599 2 : if (r->propertiesCollection) {
600 2 : _mem_save_propertiesCollection_0 = NDR_PULL_GET_MEM_CTX(ndr);
601 2 : NDR_PULL_SET_MEM_CTX(ndr, r->propertiesCollection, 0);
602 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->propertiesCollection));
603 2 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->propertiesCollection, &size_propertiesCollection_1));
604 2 : NDR_PULL_ALLOC_N(ndr, r->propertiesCollection, size_propertiesCollection_1);
605 2 : _mem_save_propertiesCollection_1 = NDR_PULL_GET_MEM_CTX(ndr);
606 2 : NDR_PULL_SET_MEM_CTX(ndr, r->propertiesCollection, 0);
607 10 : for (cntr_propertiesCollection_1 = 0; cntr_propertiesCollection_1 < (size_propertiesCollection_1); cntr_propertiesCollection_1++) {
608 8 : NDR_CHECK(ndr_pull_winspool_PrintNamedProperty(ndr, NDR_SCALARS, &r->propertiesCollection[cntr_propertiesCollection_1]));
609 : }
610 10 : for (cntr_propertiesCollection_1 = 0; cntr_propertiesCollection_1 < (size_propertiesCollection_1); cntr_propertiesCollection_1++) {
611 8 : NDR_CHECK(ndr_pull_winspool_PrintNamedProperty(ndr, NDR_BUFFERS, &r->propertiesCollection[cntr_propertiesCollection_1]));
612 : }
613 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_propertiesCollection_1, 0);
614 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_propertiesCollection_0, 0);
615 : }
616 2 : if (r->propertiesCollection) {
617 2 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->propertiesCollection, r->numberOfProperties));
618 : }
619 10 : for (cntr_propertiesCollection_1 = 0; cntr_propertiesCollection_1 < (size_propertiesCollection_1); cntr_propertiesCollection_1++) {
620 8 : }
621 : }
622 0 : return NDR_ERR_SUCCESS;
623 : }
624 :
625 2 : _PUBLIC_ void ndr_print_winspool_PrintPropertiesCollection(struct ndr_print *ndr, const char *name, const struct winspool_PrintPropertiesCollection *r)
626 : {
627 2 : uint32_t cntr_propertiesCollection_1;
628 2 : ndr_print_struct(ndr, name, "winspool_PrintPropertiesCollection");
629 2 : if (r == NULL) { ndr_print_null(ndr); return; }
630 2 : ndr->depth++;
631 2 : ndr_print_uint32(ndr, "numberOfProperties", r->numberOfProperties);
632 2 : ndr_print_ptr(ndr, "propertiesCollection", r->propertiesCollection);
633 2 : ndr->depth++;
634 2 : if (r->propertiesCollection) {
635 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "propertiesCollection", (uint32_t)(r->numberOfProperties));
636 2 : ndr->depth++;
637 10 : for (cntr_propertiesCollection_1 = 0; cntr_propertiesCollection_1 < (r->numberOfProperties); cntr_propertiesCollection_1++) {
638 8 : ndr_print_winspool_PrintNamedProperty(ndr, "propertiesCollection", &r->propertiesCollection[cntr_propertiesCollection_1]);
639 : }
640 2 : ndr->depth--;
641 : }
642 2 : ndr->depth--;
643 2 : ndr->depth--;
644 : }
645 :
646 0 : static enum ndr_err_code ndr_push_winspool_InstallPrinterDriverFromPackageFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
647 : {
648 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
649 0 : return NDR_ERR_SUCCESS;
650 : }
651 :
652 0 : static enum ndr_err_code ndr_pull_winspool_InstallPrinterDriverFromPackageFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
653 : {
654 0 : uint32_t v;
655 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
656 0 : *r = v;
657 0 : return NDR_ERR_SUCCESS;
658 : }
659 :
660 0 : _PUBLIC_ void ndr_print_winspool_InstallPrinterDriverFromPackageFlags(struct ndr_print *ndr, const char *name, uint32_t r)
661 : {
662 0 : ndr_print_uint32(ndr, name, r);
663 0 : ndr->depth++;
664 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "IPDFP_FLAG_NONE", IPDFP_FLAG_NONE, r);
665 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "IPDFP_COPY_ALL_FILES", IPDFP_COPY_ALL_FILES, r);
666 0 : ndr->depth--;
667 0 : }
668 :
669 0 : static enum ndr_err_code ndr_push_winspool_UploadPrinterDriverPackageFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
670 : {
671 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
672 0 : return NDR_ERR_SUCCESS;
673 : }
674 :
675 0 : static enum ndr_err_code ndr_pull_winspool_UploadPrinterDriverPackageFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
676 : {
677 0 : uint32_t v;
678 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
679 0 : *r = v;
680 0 : return NDR_ERR_SUCCESS;
681 : }
682 :
683 0 : _PUBLIC_ void ndr_print_winspool_UploadPrinterDriverPackageFlags(struct ndr_print *ndr, const char *name, uint32_t r)
684 : {
685 0 : ndr_print_uint32(ndr, name, r);
686 0 : ndr->depth++;
687 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "UPDP_FLAG_NONE", UPDP_FLAG_NONE, r);
688 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "UPDP_UPLOAD_ALWAYS", UPDP_UPLOAD_ALWAYS, r);
689 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "UPDP_CHECK_DRIVERSTORE", UPDP_CHECK_DRIVERSTORE, r);
690 0 : ndr->depth--;
691 0 : }
692 :
693 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncOpenPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncOpenPrinter *r)
694 : {
695 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
696 0 : if (flags & NDR_IN) {
697 0 : if (r->in.pDevModeContainer == NULL) {
698 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
699 : }
700 0 : if (r->in.pClientInfo == NULL) {
701 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
702 : }
703 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPrinterName));
704 0 : if (r->in.pPrinterName) {
705 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrinterName, CH_UTF16)));
706 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
707 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrinterName, CH_UTF16)));
708 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPrinterName, ndr_charset_length(r->in.pPrinterName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
709 : }
710 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDatatype));
711 0 : if (r->in.pDatatype) {
712 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDatatype, CH_UTF16)));
713 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
714 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDatatype, CH_UTF16)));
715 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pDatatype, ndr_charset_length(r->in.pDatatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
716 : }
717 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
718 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.AccessRequired));
719 0 : NDR_CHECK(ndr_push_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pClientInfo));
720 : }
721 0 : if (flags & NDR_OUT) {
722 0 : if (r->out.pHandle == NULL) {
723 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
724 : }
725 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.pHandle));
726 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
727 : }
728 0 : return NDR_ERR_SUCCESS;
729 : }
730 :
731 8 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncOpenPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncOpenPrinter *r)
732 : {
733 8 : uint32_t _ptr_pPrinterName;
734 8 : uint32_t size_pPrinterName_1 = 0;
735 8 : uint32_t length_pPrinterName_1 = 0;
736 8 : uint32_t _ptr_pDatatype;
737 8 : uint32_t size_pDatatype_1 = 0;
738 8 : uint32_t length_pDatatype_1 = 0;
739 8 : TALLOC_CTX *_mem_save_pPrinterName_0 = NULL;
740 8 : TALLOC_CTX *_mem_save_pHandle_0 = NULL;
741 8 : TALLOC_CTX *_mem_save_pDatatype_0 = NULL;
742 8 : TALLOC_CTX *_mem_save_pDevModeContainer_0 = NULL;
743 8 : TALLOC_CTX *_mem_save_pClientInfo_0 = NULL;
744 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
745 8 : if (flags & NDR_IN) {
746 6 : NDR_ZERO_STRUCT(r->out);
747 :
748 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterName));
749 6 : if (_ptr_pPrinterName) {
750 6 : NDR_PULL_ALLOC(ndr, r->in.pPrinterName);
751 : } else {
752 0 : r->in.pPrinterName = NULL;
753 : }
754 6 : if (r->in.pPrinterName) {
755 6 : _mem_save_pPrinterName_0 = NDR_PULL_GET_MEM_CTX(ndr);
756 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrinterName, 0);
757 6 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrinterName));
758 6 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPrinterName));
759 6 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPrinterName, &size_pPrinterName_1));
760 6 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPrinterName, &length_pPrinterName_1));
761 6 : if (length_pPrinterName_1 > size_pPrinterName_1) {
762 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrinterName_1, length_pPrinterName_1);
763 : }
764 6 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrinterName_1, sizeof(uint16_t)));
765 6 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPrinterName, length_pPrinterName_1, sizeof(uint16_t), CH_UTF16));
766 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterName_0, 0);
767 : }
768 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDatatype));
769 6 : if (_ptr_pDatatype) {
770 0 : NDR_PULL_ALLOC(ndr, r->in.pDatatype);
771 : } else {
772 6 : r->in.pDatatype = NULL;
773 : }
774 6 : if (r->in.pDatatype) {
775 0 : _mem_save_pDatatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
776 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDatatype, 0);
777 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDatatype));
778 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pDatatype));
779 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pDatatype, &size_pDatatype_1));
780 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pDatatype, &length_pDatatype_1));
781 0 : if (length_pDatatype_1 > size_pDatatype_1) {
782 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDatatype_1, length_pDatatype_1);
783 : }
784 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDatatype_1, sizeof(uint16_t)));
785 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pDatatype, length_pDatatype_1, sizeof(uint16_t), CH_UTF16));
786 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDatatype_0, 0);
787 : }
788 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
789 6 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
790 : }
791 6 : _mem_save_pDevModeContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
792 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDevModeContainer, LIBNDR_FLAG_REF_ALLOC);
793 6 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
794 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDevModeContainer_0, LIBNDR_FLAG_REF_ALLOC);
795 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.AccessRequired));
796 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
797 6 : NDR_PULL_ALLOC(ndr, r->in.pClientInfo);
798 : }
799 6 : _mem_save_pClientInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
800 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pClientInfo, LIBNDR_FLAG_REF_ALLOC);
801 6 : NDR_CHECK(ndr_pull_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pClientInfo));
802 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pClientInfo_0, LIBNDR_FLAG_REF_ALLOC);
803 6 : NDR_PULL_ALLOC(ndr, r->out.pHandle);
804 6 : NDR_ZERO_STRUCTP(r->out.pHandle);
805 : }
806 8 : if (flags & NDR_OUT) {
807 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
808 : if (r->in.pDevModeContainer == NULL) {
809 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
810 : NDR_ZERO_STRUCTP(r->in.pDevModeContainer);
811 : }
812 : if (r->in.pClientInfo == NULL) {
813 : NDR_PULL_ALLOC(ndr, r->in.pClientInfo);
814 : NDR_ZERO_STRUCTP(r->in.pClientInfo);
815 : }
816 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
817 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
818 2 : NDR_PULL_ALLOC(ndr, r->out.pHandle);
819 : }
820 2 : _mem_save_pHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
821 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pHandle, LIBNDR_FLAG_REF_ALLOC);
822 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.pHandle));
823 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pHandle_0, LIBNDR_FLAG_REF_ALLOC);
824 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
825 : }
826 0 : return NDR_ERR_SUCCESS;
827 : }
828 :
829 8 : _PUBLIC_ void ndr_print_winspool_AsyncOpenPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncOpenPrinter *r)
830 : {
831 8 : ndr_print_struct(ndr, name, "winspool_AsyncOpenPrinter");
832 8 : if (r == NULL) { ndr_print_null(ndr); return; }
833 8 : ndr->depth++;
834 8 : if (flags & NDR_SET_VALUES) {
835 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
836 : }
837 8 : if (flags & NDR_IN) {
838 6 : ndr_print_struct(ndr, "in", "winspool_AsyncOpenPrinter");
839 6 : ndr->depth++;
840 6 : ndr_print_ptr(ndr, "pPrinterName", r->in.pPrinterName);
841 6 : ndr->depth++;
842 6 : if (r->in.pPrinterName) {
843 6 : ndr_print_string(ndr, "pPrinterName", r->in.pPrinterName);
844 : }
845 6 : ndr->depth--;
846 6 : ndr_print_ptr(ndr, "pDatatype", r->in.pDatatype);
847 6 : ndr->depth++;
848 6 : if (r->in.pDatatype) {
849 0 : ndr_print_string(ndr, "pDatatype", r->in.pDatatype);
850 : }
851 6 : ndr->depth--;
852 6 : ndr_print_ptr(ndr, "pDevModeContainer", r->in.pDevModeContainer);
853 6 : ndr->depth++;
854 6 : ndr_print_spoolss_DevmodeContainer(ndr, "pDevModeContainer", r->in.pDevModeContainer);
855 6 : ndr->depth--;
856 6 : ndr_print_uint32(ndr, "AccessRequired", r->in.AccessRequired);
857 6 : ndr_print_ptr(ndr, "pClientInfo", r->in.pClientInfo);
858 6 : ndr->depth++;
859 6 : ndr_print_spoolss_UserLevelCtr(ndr, "pClientInfo", r->in.pClientInfo);
860 6 : ndr->depth--;
861 6 : ndr->depth--;
862 : }
863 8 : if (flags & NDR_OUT) {
864 2 : ndr_print_struct(ndr, "out", "winspool_AsyncOpenPrinter");
865 2 : ndr->depth++;
866 2 : ndr_print_ptr(ndr, "pHandle", r->out.pHandle);
867 2 : ndr->depth++;
868 2 : ndr_print_policy_handle(ndr, "pHandle", r->out.pHandle);
869 2 : ndr->depth--;
870 2 : ndr_print_WERROR(ndr, "result", r->out.result);
871 2 : ndr->depth--;
872 : }
873 8 : ndr->depth--;
874 : }
875 :
876 0 : static enum ndr_err_code ndr_push_winspool_AsyncAddPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddPrinter *r)
877 : {
878 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
879 0 : if (flags & NDR_IN) {
880 0 : if (r->in.pPrinterContainer == NULL) {
881 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
882 : }
883 0 : if (r->in.pDevModeContainer == NULL) {
884 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
885 : }
886 0 : if (r->in.pSecurityContainer == NULL) {
887 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
888 : }
889 0 : if (r->in.pClientInfo == NULL) {
890 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
891 : }
892 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
893 0 : if (r->in.pName) {
894 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
895 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
896 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
897 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
898 : }
899 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPrinterContainer));
900 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
901 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pSecurityContainer));
902 0 : NDR_CHECK(ndr_push_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pClientInfo));
903 : }
904 0 : if (flags & NDR_OUT) {
905 0 : if (r->out.pHandle == NULL) {
906 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
907 : }
908 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.pHandle));
909 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
910 : }
911 0 : return NDR_ERR_SUCCESS;
912 : }
913 :
914 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAddPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddPrinter *r)
915 : {
916 0 : uint32_t _ptr_pName;
917 0 : uint32_t size_pName_1 = 0;
918 0 : uint32_t length_pName_1 = 0;
919 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
920 0 : TALLOC_CTX *_mem_save_pPrinterContainer_0 = NULL;
921 0 : TALLOC_CTX *_mem_save_pDevModeContainer_0 = NULL;
922 0 : TALLOC_CTX *_mem_save_pSecurityContainer_0 = NULL;
923 0 : TALLOC_CTX *_mem_save_pClientInfo_0 = NULL;
924 0 : TALLOC_CTX *_mem_save_pHandle_0 = NULL;
925 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
926 0 : if (flags & NDR_IN) {
927 0 : NDR_ZERO_STRUCT(r->out);
928 :
929 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
930 0 : if (_ptr_pName) {
931 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
932 : } else {
933 0 : r->in.pName = NULL;
934 : }
935 0 : if (r->in.pName) {
936 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
937 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
938 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
939 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
940 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
941 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
942 0 : if (length_pName_1 > size_pName_1) {
943 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
944 : }
945 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
946 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
947 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
948 : }
949 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
950 0 : NDR_PULL_ALLOC(ndr, r->in.pPrinterContainer);
951 : }
952 0 : _mem_save_pPrinterContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
953 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrinterContainer, LIBNDR_FLAG_REF_ALLOC);
954 0 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPrinterContainer));
955 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterContainer_0, LIBNDR_FLAG_REF_ALLOC);
956 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
957 0 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
958 : }
959 0 : _mem_save_pDevModeContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
960 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDevModeContainer, LIBNDR_FLAG_REF_ALLOC);
961 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
962 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDevModeContainer_0, LIBNDR_FLAG_REF_ALLOC);
963 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
964 0 : NDR_PULL_ALLOC(ndr, r->in.pSecurityContainer);
965 : }
966 0 : _mem_save_pSecurityContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
967 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pSecurityContainer, LIBNDR_FLAG_REF_ALLOC);
968 0 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pSecurityContainer));
969 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pSecurityContainer_0, LIBNDR_FLAG_REF_ALLOC);
970 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
971 0 : NDR_PULL_ALLOC(ndr, r->in.pClientInfo);
972 : }
973 0 : _mem_save_pClientInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
974 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pClientInfo, LIBNDR_FLAG_REF_ALLOC);
975 0 : NDR_CHECK(ndr_pull_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pClientInfo));
976 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pClientInfo_0, LIBNDR_FLAG_REF_ALLOC);
977 0 : NDR_PULL_ALLOC(ndr, r->out.pHandle);
978 0 : NDR_ZERO_STRUCTP(r->out.pHandle);
979 : }
980 0 : if (flags & NDR_OUT) {
981 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
982 : if (r->in.pPrinterContainer == NULL) {
983 : NDR_PULL_ALLOC(ndr, r->in.pPrinterContainer);
984 : NDR_ZERO_STRUCTP(r->in.pPrinterContainer);
985 : }
986 : if (r->in.pDevModeContainer == NULL) {
987 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
988 : NDR_ZERO_STRUCTP(r->in.pDevModeContainer);
989 : }
990 : if (r->in.pSecurityContainer == NULL) {
991 : NDR_PULL_ALLOC(ndr, r->in.pSecurityContainer);
992 : NDR_ZERO_STRUCTP(r->in.pSecurityContainer);
993 : }
994 : if (r->in.pClientInfo == NULL) {
995 : NDR_PULL_ALLOC(ndr, r->in.pClientInfo);
996 : NDR_ZERO_STRUCTP(r->in.pClientInfo);
997 : }
998 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
999 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1000 0 : NDR_PULL_ALLOC(ndr, r->out.pHandle);
1001 : }
1002 0 : _mem_save_pHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1003 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pHandle, LIBNDR_FLAG_REF_ALLOC);
1004 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.pHandle));
1005 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pHandle_0, LIBNDR_FLAG_REF_ALLOC);
1006 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1007 : }
1008 0 : return NDR_ERR_SUCCESS;
1009 : }
1010 :
1011 0 : _PUBLIC_ void ndr_print_winspool_AsyncAddPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddPrinter *r)
1012 : {
1013 0 : ndr_print_struct(ndr, name, "winspool_AsyncAddPrinter");
1014 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1015 0 : ndr->depth++;
1016 0 : if (flags & NDR_SET_VALUES) {
1017 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1018 : }
1019 0 : if (flags & NDR_IN) {
1020 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAddPrinter");
1021 0 : ndr->depth++;
1022 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
1023 0 : ndr->depth++;
1024 0 : if (r->in.pName) {
1025 0 : ndr_print_string(ndr, "pName", r->in.pName);
1026 : }
1027 0 : ndr->depth--;
1028 0 : ndr_print_ptr(ndr, "pPrinterContainer", r->in.pPrinterContainer);
1029 0 : ndr->depth++;
1030 0 : ndr_print_spoolss_SetPrinterInfoCtr(ndr, "pPrinterContainer", r->in.pPrinterContainer);
1031 0 : ndr->depth--;
1032 0 : ndr_print_ptr(ndr, "pDevModeContainer", r->in.pDevModeContainer);
1033 0 : ndr->depth++;
1034 0 : ndr_print_spoolss_DevmodeContainer(ndr, "pDevModeContainer", r->in.pDevModeContainer);
1035 0 : ndr->depth--;
1036 0 : ndr_print_ptr(ndr, "pSecurityContainer", r->in.pSecurityContainer);
1037 0 : ndr->depth++;
1038 0 : ndr_print_sec_desc_buf(ndr, "pSecurityContainer", r->in.pSecurityContainer);
1039 0 : ndr->depth--;
1040 0 : ndr_print_ptr(ndr, "pClientInfo", r->in.pClientInfo);
1041 0 : ndr->depth++;
1042 0 : ndr_print_spoolss_UserLevelCtr(ndr, "pClientInfo", r->in.pClientInfo);
1043 0 : ndr->depth--;
1044 0 : ndr->depth--;
1045 : }
1046 0 : if (flags & NDR_OUT) {
1047 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddPrinter");
1048 0 : ndr->depth++;
1049 0 : ndr_print_ptr(ndr, "pHandle", r->out.pHandle);
1050 0 : ndr->depth++;
1051 0 : ndr_print_policy_handle(ndr, "pHandle", r->out.pHandle);
1052 0 : ndr->depth--;
1053 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1054 0 : ndr->depth--;
1055 : }
1056 0 : ndr->depth--;
1057 : }
1058 :
1059 0 : static enum ndr_err_code ndr_push_winspool_AsyncSetJob(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSetJob *r)
1060 : {
1061 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1062 0 : if (flags & NDR_IN) {
1063 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1064 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
1065 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pJobContainer));
1066 0 : if (r->in.pJobContainer) {
1067 0 : NDR_CHECK(ndr_push_spoolss_JobInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pJobContainer));
1068 : }
1069 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Command));
1070 : }
1071 0 : if (flags & NDR_OUT) {
1072 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1073 : }
1074 0 : return NDR_ERR_SUCCESS;
1075 : }
1076 :
1077 0 : static enum ndr_err_code ndr_pull_winspool_AsyncSetJob(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSetJob *r)
1078 : {
1079 0 : uint32_t _ptr_pJobContainer;
1080 0 : TALLOC_CTX *_mem_save_pJobContainer_0 = NULL;
1081 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1082 0 : if (flags & NDR_IN) {
1083 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1084 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
1085 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pJobContainer));
1086 0 : if (_ptr_pJobContainer) {
1087 0 : NDR_PULL_ALLOC(ndr, r->in.pJobContainer);
1088 : } else {
1089 0 : r->in.pJobContainer = NULL;
1090 : }
1091 0 : if (r->in.pJobContainer) {
1092 0 : _mem_save_pJobContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1093 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pJobContainer, 0);
1094 0 : NDR_CHECK(ndr_pull_spoolss_JobInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pJobContainer));
1095 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pJobContainer_0, 0);
1096 : }
1097 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Command));
1098 : }
1099 0 : if (flags & NDR_OUT) {
1100 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1101 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1102 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1103 : }
1104 0 : return NDR_ERR_SUCCESS;
1105 : }
1106 :
1107 0 : _PUBLIC_ void ndr_print_winspool_AsyncSetJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSetJob *r)
1108 : {
1109 0 : ndr_print_struct(ndr, name, "winspool_AsyncSetJob");
1110 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1111 0 : ndr->depth++;
1112 0 : if (flags & NDR_SET_VALUES) {
1113 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1114 : }
1115 0 : if (flags & NDR_IN) {
1116 0 : ndr_print_struct(ndr, "in", "winspool_AsyncSetJob");
1117 0 : ndr->depth++;
1118 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1119 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
1120 0 : ndr_print_ptr(ndr, "pJobContainer", r->in.pJobContainer);
1121 0 : ndr->depth++;
1122 0 : if (r->in.pJobContainer) {
1123 0 : ndr_print_spoolss_JobInfoContainer(ndr, "pJobContainer", r->in.pJobContainer);
1124 : }
1125 0 : ndr->depth--;
1126 0 : ndr_print_uint32(ndr, "Command", r->in.Command);
1127 0 : ndr->depth--;
1128 : }
1129 0 : if (flags & NDR_OUT) {
1130 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSetJob");
1131 0 : ndr->depth++;
1132 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1133 0 : ndr->depth--;
1134 : }
1135 0 : ndr->depth--;
1136 : }
1137 :
1138 0 : static enum ndr_err_code ndr_push_winspool_AsyncGetJob(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetJob *r)
1139 : {
1140 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1141 0 : if (flags & NDR_IN) {
1142 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1143 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
1144 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
1145 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pJob));
1146 0 : if (r->in.pJob) {
1147 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1148 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pJob, r->in.cbBuf));
1149 : }
1150 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
1151 : }
1152 0 : if (flags & NDR_OUT) {
1153 0 : if (r->out.pcbNeeded == NULL) {
1154 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1155 : }
1156 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pJob));
1157 0 : if (r->out.pJob) {
1158 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1159 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pJob, r->in.cbBuf));
1160 : }
1161 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
1162 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1163 : }
1164 0 : return NDR_ERR_SUCCESS;
1165 : }
1166 :
1167 0 : static enum ndr_err_code ndr_pull_winspool_AsyncGetJob(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetJob *r)
1168 : {
1169 0 : uint32_t _ptr_pJob;
1170 0 : uint32_t size_pJob_1 = 0;
1171 0 : TALLOC_CTX *_mem_save_pJob_0 = NULL;
1172 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
1173 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1174 0 : if (flags & NDR_IN) {
1175 0 : NDR_ZERO_STRUCT(r->out);
1176 :
1177 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1178 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
1179 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
1180 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pJob));
1181 0 : if (_ptr_pJob) {
1182 0 : NDR_PULL_ALLOC(ndr, r->in.pJob);
1183 : } else {
1184 0 : r->in.pJob = NULL;
1185 : }
1186 0 : if (r->in.pJob) {
1187 0 : _mem_save_pJob_0 = NDR_PULL_GET_MEM_CTX(ndr);
1188 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pJob, 0);
1189 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pJob));
1190 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pJob, &size_pJob_1));
1191 0 : NDR_PULL_ALLOC_N(ndr, r->in.pJob, size_pJob_1);
1192 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pJob, size_pJob_1));
1193 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pJob_0, 0);
1194 : }
1195 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
1196 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1197 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
1198 0 : if (r->in.pJob) {
1199 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pJob, r->in.cbBuf));
1200 : }
1201 : }
1202 0 : if (flags & NDR_OUT) {
1203 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1204 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1205 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pJob));
1206 0 : if (_ptr_pJob) {
1207 0 : NDR_PULL_ALLOC(ndr, r->out.pJob);
1208 : } else {
1209 0 : r->out.pJob = NULL;
1210 : }
1211 0 : if (r->out.pJob) {
1212 0 : _mem_save_pJob_0 = NDR_PULL_GET_MEM_CTX(ndr);
1213 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pJob, 0);
1214 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pJob));
1215 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pJob, &size_pJob_1));
1216 0 : NDR_PULL_ALLOC_N(ndr, r->out.pJob, size_pJob_1);
1217 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pJob, size_pJob_1));
1218 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pJob_0, 0);
1219 : }
1220 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1221 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1222 : }
1223 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
1224 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
1225 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
1226 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
1227 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1228 0 : if (r->out.pJob) {
1229 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pJob, r->in.cbBuf));
1230 : }
1231 : }
1232 0 : return NDR_ERR_SUCCESS;
1233 : }
1234 :
1235 0 : _PUBLIC_ void ndr_print_winspool_AsyncGetJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetJob *r)
1236 : {
1237 0 : ndr_print_struct(ndr, name, "winspool_AsyncGetJob");
1238 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1239 0 : ndr->depth++;
1240 0 : if (flags & NDR_SET_VALUES) {
1241 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1242 : }
1243 0 : if (flags & NDR_IN) {
1244 0 : ndr_print_struct(ndr, "in", "winspool_AsyncGetJob");
1245 0 : ndr->depth++;
1246 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1247 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
1248 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
1249 0 : ndr_print_ptr(ndr, "pJob", r->in.pJob);
1250 0 : ndr->depth++;
1251 0 : if (r->in.pJob) {
1252 0 : ndr_print_array_uint8(ndr, "pJob", r->in.pJob, r->in.cbBuf);
1253 : }
1254 0 : ndr->depth--;
1255 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
1256 0 : ndr->depth--;
1257 : }
1258 0 : if (flags & NDR_OUT) {
1259 0 : ndr_print_struct(ndr, "out", "winspool_AsyncGetJob");
1260 0 : ndr->depth++;
1261 0 : ndr_print_ptr(ndr, "pJob", r->out.pJob);
1262 0 : ndr->depth++;
1263 0 : if (r->out.pJob) {
1264 0 : ndr_print_array_uint8(ndr, "pJob", r->out.pJob, r->in.cbBuf);
1265 : }
1266 0 : ndr->depth--;
1267 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
1268 0 : ndr->depth++;
1269 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
1270 0 : ndr->depth--;
1271 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1272 0 : ndr->depth--;
1273 : }
1274 0 : ndr->depth--;
1275 : }
1276 :
1277 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumJobs(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumJobs *r)
1278 : {
1279 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1280 0 : if (flags & NDR_IN) {
1281 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1282 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.FirstJob));
1283 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NoJobs));
1284 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
1285 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pJob));
1286 0 : if (r->in.pJob) {
1287 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1288 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pJob, r->in.cbBuf));
1289 : }
1290 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
1291 : }
1292 0 : if (flags & NDR_OUT) {
1293 0 : if (r->out.pcbNeeded == NULL) {
1294 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1295 : }
1296 0 : if (r->out.pcReturned == NULL) {
1297 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1298 : }
1299 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pJob));
1300 0 : if (r->out.pJob) {
1301 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1302 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pJob, r->in.cbBuf));
1303 : }
1304 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
1305 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
1306 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1307 : }
1308 0 : return NDR_ERR_SUCCESS;
1309 : }
1310 :
1311 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumJobs(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumJobs *r)
1312 : {
1313 0 : uint32_t _ptr_pJob;
1314 0 : uint32_t size_pJob_1 = 0;
1315 0 : TALLOC_CTX *_mem_save_pJob_0 = NULL;
1316 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
1317 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
1318 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1319 0 : if (flags & NDR_IN) {
1320 0 : NDR_ZERO_STRUCT(r->out);
1321 :
1322 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1323 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.FirstJob));
1324 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NoJobs));
1325 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
1326 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pJob));
1327 0 : if (_ptr_pJob) {
1328 0 : NDR_PULL_ALLOC(ndr, r->in.pJob);
1329 : } else {
1330 0 : r->in.pJob = NULL;
1331 : }
1332 0 : if (r->in.pJob) {
1333 0 : _mem_save_pJob_0 = NDR_PULL_GET_MEM_CTX(ndr);
1334 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pJob, 0);
1335 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pJob));
1336 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pJob, &size_pJob_1));
1337 0 : NDR_PULL_ALLOC_N(ndr, r->in.pJob, size_pJob_1);
1338 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pJob, size_pJob_1));
1339 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pJob_0, 0);
1340 : }
1341 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
1342 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1343 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
1344 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
1345 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
1346 0 : if (r->in.pJob) {
1347 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pJob, r->in.cbBuf));
1348 : }
1349 : }
1350 0 : if (flags & NDR_OUT) {
1351 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1352 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1353 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pJob));
1354 0 : if (_ptr_pJob) {
1355 0 : NDR_PULL_ALLOC(ndr, r->out.pJob);
1356 : } else {
1357 0 : r->out.pJob = NULL;
1358 : }
1359 0 : if (r->out.pJob) {
1360 0 : _mem_save_pJob_0 = NDR_PULL_GET_MEM_CTX(ndr);
1361 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pJob, 0);
1362 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pJob));
1363 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pJob, &size_pJob_1));
1364 0 : NDR_PULL_ALLOC_N(ndr, r->out.pJob, size_pJob_1);
1365 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pJob, size_pJob_1));
1366 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pJob_0, 0);
1367 : }
1368 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1369 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1370 : }
1371 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
1372 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
1373 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
1374 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
1375 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1376 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
1377 : }
1378 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
1379 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
1380 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
1381 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
1382 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1383 0 : if (r->out.pJob) {
1384 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pJob, r->in.cbBuf));
1385 : }
1386 : }
1387 0 : return NDR_ERR_SUCCESS;
1388 : }
1389 :
1390 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumJobs(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumJobs *r)
1391 : {
1392 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumJobs");
1393 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1394 0 : ndr->depth++;
1395 0 : if (flags & NDR_SET_VALUES) {
1396 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1397 : }
1398 0 : if (flags & NDR_IN) {
1399 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumJobs");
1400 0 : ndr->depth++;
1401 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1402 0 : ndr_print_uint32(ndr, "FirstJob", r->in.FirstJob);
1403 0 : ndr_print_uint32(ndr, "NoJobs", r->in.NoJobs);
1404 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
1405 0 : ndr_print_ptr(ndr, "pJob", r->in.pJob);
1406 0 : ndr->depth++;
1407 0 : if (r->in.pJob) {
1408 0 : ndr_print_array_uint8(ndr, "pJob", r->in.pJob, r->in.cbBuf);
1409 : }
1410 0 : ndr->depth--;
1411 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
1412 0 : ndr->depth--;
1413 : }
1414 0 : if (flags & NDR_OUT) {
1415 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumJobs");
1416 0 : ndr->depth++;
1417 0 : ndr_print_ptr(ndr, "pJob", r->out.pJob);
1418 0 : ndr->depth++;
1419 0 : if (r->out.pJob) {
1420 0 : ndr_print_array_uint8(ndr, "pJob", r->out.pJob, r->in.cbBuf);
1421 : }
1422 0 : ndr->depth--;
1423 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
1424 0 : ndr->depth++;
1425 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
1426 0 : ndr->depth--;
1427 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
1428 0 : ndr->depth++;
1429 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
1430 0 : ndr->depth--;
1431 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1432 0 : ndr->depth--;
1433 : }
1434 0 : ndr->depth--;
1435 : }
1436 :
1437 0 : static enum ndr_err_code ndr_push_winspool_AsyncAddJob(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddJob *r)
1438 : {
1439 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1440 0 : if (flags & NDR_IN) {
1441 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1442 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
1443 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pAddJob));
1444 0 : if (r->in.pAddJob) {
1445 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1446 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pAddJob, r->in.cbBuf));
1447 : }
1448 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
1449 : }
1450 0 : if (flags & NDR_OUT) {
1451 0 : if (r->out.pcbNeeded == NULL) {
1452 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1453 : }
1454 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pAddJob));
1455 0 : if (r->out.pAddJob) {
1456 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1457 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pAddJob, r->in.cbBuf));
1458 : }
1459 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
1460 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1461 : }
1462 0 : return NDR_ERR_SUCCESS;
1463 : }
1464 :
1465 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAddJob(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddJob *r)
1466 : {
1467 0 : uint32_t _ptr_pAddJob;
1468 0 : uint32_t size_pAddJob_1 = 0;
1469 0 : TALLOC_CTX *_mem_save_pAddJob_0 = NULL;
1470 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
1471 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1472 0 : if (flags & NDR_IN) {
1473 0 : NDR_ZERO_STRUCT(r->out);
1474 :
1475 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1476 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
1477 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAddJob));
1478 0 : if (_ptr_pAddJob) {
1479 0 : NDR_PULL_ALLOC(ndr, r->in.pAddJob);
1480 : } else {
1481 0 : r->in.pAddJob = NULL;
1482 : }
1483 0 : if (r->in.pAddJob) {
1484 0 : _mem_save_pAddJob_0 = NDR_PULL_GET_MEM_CTX(ndr);
1485 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pAddJob, 0);
1486 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pAddJob));
1487 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pAddJob, &size_pAddJob_1));
1488 0 : NDR_PULL_ALLOC_N(ndr, r->in.pAddJob, size_pAddJob_1);
1489 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pAddJob, size_pAddJob_1));
1490 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAddJob_0, 0);
1491 : }
1492 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
1493 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1494 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
1495 0 : if (r->in.pAddJob) {
1496 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pAddJob, r->in.cbBuf));
1497 : }
1498 : }
1499 0 : if (flags & NDR_OUT) {
1500 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1501 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1502 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAddJob));
1503 0 : if (_ptr_pAddJob) {
1504 0 : NDR_PULL_ALLOC(ndr, r->out.pAddJob);
1505 : } else {
1506 0 : r->out.pAddJob = NULL;
1507 : }
1508 0 : if (r->out.pAddJob) {
1509 0 : _mem_save_pAddJob_0 = NDR_PULL_GET_MEM_CTX(ndr);
1510 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pAddJob, 0);
1511 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pAddJob));
1512 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pAddJob, &size_pAddJob_1));
1513 0 : NDR_PULL_ALLOC_N(ndr, r->out.pAddJob, size_pAddJob_1);
1514 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pAddJob, size_pAddJob_1));
1515 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAddJob_0, 0);
1516 : }
1517 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1518 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1519 : }
1520 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
1521 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
1522 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
1523 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
1524 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1525 0 : if (r->out.pAddJob) {
1526 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pAddJob, r->in.cbBuf));
1527 : }
1528 : }
1529 0 : return NDR_ERR_SUCCESS;
1530 : }
1531 :
1532 0 : _PUBLIC_ void ndr_print_winspool_AsyncAddJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddJob *r)
1533 : {
1534 0 : ndr_print_struct(ndr, name, "winspool_AsyncAddJob");
1535 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1536 0 : ndr->depth++;
1537 0 : if (flags & NDR_SET_VALUES) {
1538 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1539 : }
1540 0 : if (flags & NDR_IN) {
1541 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAddJob");
1542 0 : ndr->depth++;
1543 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1544 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
1545 0 : ndr_print_ptr(ndr, "pAddJob", r->in.pAddJob);
1546 0 : ndr->depth++;
1547 0 : if (r->in.pAddJob) {
1548 0 : ndr_print_array_uint8(ndr, "pAddJob", r->in.pAddJob, r->in.cbBuf);
1549 : }
1550 0 : ndr->depth--;
1551 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
1552 0 : ndr->depth--;
1553 : }
1554 0 : if (flags & NDR_OUT) {
1555 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddJob");
1556 0 : ndr->depth++;
1557 0 : ndr_print_ptr(ndr, "pAddJob", r->out.pAddJob);
1558 0 : ndr->depth++;
1559 0 : if (r->out.pAddJob) {
1560 0 : ndr_print_array_uint8(ndr, "pAddJob", r->out.pAddJob, r->in.cbBuf);
1561 : }
1562 0 : ndr->depth--;
1563 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
1564 0 : ndr->depth++;
1565 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
1566 0 : ndr->depth--;
1567 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1568 0 : ndr->depth--;
1569 : }
1570 0 : ndr->depth--;
1571 : }
1572 :
1573 0 : static enum ndr_err_code ndr_push_winspool_AsyncScheduleJob(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncScheduleJob *r)
1574 : {
1575 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1576 0 : if (flags & NDR_IN) {
1577 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1578 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
1579 : }
1580 0 : if (flags & NDR_OUT) {
1581 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1582 : }
1583 0 : return NDR_ERR_SUCCESS;
1584 : }
1585 :
1586 0 : static enum ndr_err_code ndr_pull_winspool_AsyncScheduleJob(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncScheduleJob *r)
1587 : {
1588 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1589 0 : if (flags & NDR_IN) {
1590 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1591 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
1592 : }
1593 0 : if (flags & NDR_OUT) {
1594 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1595 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1596 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1597 : }
1598 0 : return NDR_ERR_SUCCESS;
1599 : }
1600 :
1601 0 : _PUBLIC_ void ndr_print_winspool_AsyncScheduleJob(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncScheduleJob *r)
1602 : {
1603 0 : ndr_print_struct(ndr, name, "winspool_AsyncScheduleJob");
1604 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1605 0 : ndr->depth++;
1606 0 : if (flags & NDR_SET_VALUES) {
1607 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1608 : }
1609 0 : if (flags & NDR_IN) {
1610 0 : ndr_print_struct(ndr, "in", "winspool_AsyncScheduleJob");
1611 0 : ndr->depth++;
1612 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1613 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
1614 0 : ndr->depth--;
1615 : }
1616 0 : if (flags & NDR_OUT) {
1617 0 : ndr_print_struct(ndr, "out", "winspool_AsyncScheduleJob");
1618 0 : ndr->depth++;
1619 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1620 0 : ndr->depth--;
1621 : }
1622 0 : ndr->depth--;
1623 : }
1624 :
1625 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinter *r)
1626 : {
1627 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1628 0 : if (flags & NDR_IN) {
1629 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1630 : }
1631 0 : if (flags & NDR_OUT) {
1632 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1633 : }
1634 0 : return NDR_ERR_SUCCESS;
1635 : }
1636 :
1637 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinter *r)
1638 : {
1639 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1640 0 : if (flags & NDR_IN) {
1641 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1642 : }
1643 0 : if (flags & NDR_OUT) {
1644 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1645 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1646 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1647 : }
1648 0 : return NDR_ERR_SUCCESS;
1649 : }
1650 :
1651 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinter *r)
1652 : {
1653 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinter");
1654 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1655 0 : ndr->depth++;
1656 0 : if (flags & NDR_SET_VALUES) {
1657 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1658 : }
1659 0 : if (flags & NDR_IN) {
1660 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinter");
1661 0 : ndr->depth++;
1662 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1663 0 : ndr->depth--;
1664 : }
1665 0 : if (flags & NDR_OUT) {
1666 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinter");
1667 0 : ndr->depth++;
1668 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1669 0 : ndr->depth--;
1670 : }
1671 0 : ndr->depth--;
1672 : }
1673 :
1674 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncSetPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSetPrinter *r)
1675 : {
1676 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1677 0 : if (flags & NDR_IN) {
1678 0 : if (r->in.pPrinterContainer == NULL) {
1679 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1680 : }
1681 0 : if (r->in.pDevModeContainer == NULL) {
1682 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1683 : }
1684 0 : if (r->in.pSecurityContainer == NULL) {
1685 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1686 : }
1687 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1688 0 : NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPrinterContainer));
1689 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
1690 0 : NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pSecurityContainer));
1691 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Command));
1692 : }
1693 0 : if (flags & NDR_OUT) {
1694 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1695 : }
1696 0 : return NDR_ERR_SUCCESS;
1697 : }
1698 :
1699 4 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncSetPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSetPrinter *r)
1700 : {
1701 4 : TALLOC_CTX *_mem_save_pPrinterContainer_0 = NULL;
1702 4 : TALLOC_CTX *_mem_save_pDevModeContainer_0 = NULL;
1703 4 : TALLOC_CTX *_mem_save_pSecurityContainer_0 = NULL;
1704 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1705 4 : if (flags & NDR_IN) {
1706 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1707 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1708 4 : NDR_PULL_ALLOC(ndr, r->in.pPrinterContainer);
1709 : }
1710 4 : _mem_save_pPrinterContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1711 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrinterContainer, LIBNDR_FLAG_REF_ALLOC);
1712 4 : NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPrinterContainer));
1713 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterContainer_0, LIBNDR_FLAG_REF_ALLOC);
1714 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1715 4 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
1716 : }
1717 4 : _mem_save_pDevModeContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1718 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDevModeContainer, LIBNDR_FLAG_REF_ALLOC);
1719 4 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
1720 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDevModeContainer_0, LIBNDR_FLAG_REF_ALLOC);
1721 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1722 4 : NDR_PULL_ALLOC(ndr, r->in.pSecurityContainer);
1723 : }
1724 4 : _mem_save_pSecurityContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1725 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pSecurityContainer, LIBNDR_FLAG_REF_ALLOC);
1726 4 : NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pSecurityContainer));
1727 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pSecurityContainer_0, LIBNDR_FLAG_REF_ALLOC);
1728 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Command));
1729 : }
1730 4 : if (flags & NDR_OUT) {
1731 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1732 : if (r->in.pPrinterContainer == NULL) {
1733 : NDR_PULL_ALLOC(ndr, r->in.pPrinterContainer);
1734 : NDR_ZERO_STRUCTP(r->in.pPrinterContainer);
1735 : }
1736 : if (r->in.pDevModeContainer == NULL) {
1737 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
1738 : NDR_ZERO_STRUCTP(r->in.pDevModeContainer);
1739 : }
1740 : if (r->in.pSecurityContainer == NULL) {
1741 : NDR_PULL_ALLOC(ndr, r->in.pSecurityContainer);
1742 : NDR_ZERO_STRUCTP(r->in.pSecurityContainer);
1743 : }
1744 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1745 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1746 : }
1747 0 : return NDR_ERR_SUCCESS;
1748 : }
1749 :
1750 4 : _PUBLIC_ void ndr_print_winspool_AsyncSetPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSetPrinter *r)
1751 : {
1752 4 : ndr_print_struct(ndr, name, "winspool_AsyncSetPrinter");
1753 4 : if (r == NULL) { ndr_print_null(ndr); return; }
1754 4 : ndr->depth++;
1755 4 : if (flags & NDR_SET_VALUES) {
1756 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1757 : }
1758 4 : if (flags & NDR_IN) {
1759 4 : ndr_print_struct(ndr, "in", "winspool_AsyncSetPrinter");
1760 4 : ndr->depth++;
1761 4 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1762 4 : ndr_print_ptr(ndr, "pPrinterContainer", r->in.pPrinterContainer);
1763 4 : ndr->depth++;
1764 4 : ndr_print_spoolss_SetPrinterInfoCtr(ndr, "pPrinterContainer", r->in.pPrinterContainer);
1765 4 : ndr->depth--;
1766 4 : ndr_print_ptr(ndr, "pDevModeContainer", r->in.pDevModeContainer);
1767 4 : ndr->depth++;
1768 4 : ndr_print_spoolss_DevmodeContainer(ndr, "pDevModeContainer", r->in.pDevModeContainer);
1769 4 : ndr->depth--;
1770 4 : ndr_print_ptr(ndr, "pSecurityContainer", r->in.pSecurityContainer);
1771 4 : ndr->depth++;
1772 4 : ndr_print_sec_desc_buf(ndr, "pSecurityContainer", r->in.pSecurityContainer);
1773 4 : ndr->depth--;
1774 4 : ndr_print_uint32(ndr, "Command", r->in.Command);
1775 4 : ndr->depth--;
1776 : }
1777 4 : if (flags & NDR_OUT) {
1778 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSetPrinter");
1779 0 : ndr->depth++;
1780 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1781 0 : ndr->depth--;
1782 : }
1783 4 : ndr->depth--;
1784 : }
1785 :
1786 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncGetPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetPrinter *r)
1787 : {
1788 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1789 0 : if (flags & NDR_IN) {
1790 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1791 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
1792 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPrinter));
1793 0 : if (r->in.pPrinter) {
1794 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1795 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pPrinter, r->in.cbBuf));
1796 : }
1797 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
1798 : }
1799 0 : if (flags & NDR_OUT) {
1800 0 : if (r->out.pcbNeeded == NULL) {
1801 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1802 : }
1803 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pPrinter));
1804 0 : if (r->out.pPrinter) {
1805 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
1806 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pPrinter, r->in.cbBuf));
1807 : }
1808 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
1809 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1810 : }
1811 0 : return NDR_ERR_SUCCESS;
1812 : }
1813 :
1814 4 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncGetPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetPrinter *r)
1815 : {
1816 4 : uint32_t _ptr_pPrinter;
1817 4 : uint32_t size_pPrinter_1 = 0;
1818 4 : TALLOC_CTX *_mem_save_pPrinter_0 = NULL;
1819 4 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
1820 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1821 4 : if (flags & NDR_IN) {
1822 2 : NDR_ZERO_STRUCT(r->out);
1823 :
1824 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1825 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
1826 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinter));
1827 2 : if (_ptr_pPrinter) {
1828 0 : NDR_PULL_ALLOC(ndr, r->in.pPrinter);
1829 : } else {
1830 2 : r->in.pPrinter = NULL;
1831 : }
1832 2 : if (r->in.pPrinter) {
1833 0 : _mem_save_pPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
1834 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrinter, 0);
1835 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrinter));
1836 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pPrinter, &size_pPrinter_1));
1837 0 : NDR_PULL_ALLOC_N(ndr, r->in.pPrinter, size_pPrinter_1);
1838 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pPrinter, size_pPrinter_1));
1839 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinter_0, 0);
1840 : }
1841 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
1842 2 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1843 2 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
1844 2 : if (r->in.pPrinter) {
1845 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pPrinter, r->in.cbBuf));
1846 : }
1847 : }
1848 4 : if (flags & NDR_OUT) {
1849 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1850 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1851 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinter));
1852 2 : if (_ptr_pPrinter) {
1853 0 : NDR_PULL_ALLOC(ndr, r->out.pPrinter);
1854 : } else {
1855 2 : r->out.pPrinter = NULL;
1856 : }
1857 2 : if (r->out.pPrinter) {
1858 0 : _mem_save_pPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
1859 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pPrinter, 0);
1860 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pPrinter));
1861 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pPrinter, &size_pPrinter_1));
1862 0 : NDR_PULL_ALLOC_N(ndr, r->out.pPrinter, size_pPrinter_1);
1863 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pPrinter, size_pPrinter_1));
1864 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinter_0, 0);
1865 : }
1866 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1867 2 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
1868 : }
1869 2 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
1870 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
1871 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
1872 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
1873 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1874 2 : if (r->out.pPrinter) {
1875 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pPrinter, r->in.cbBuf));
1876 : }
1877 : }
1878 0 : return NDR_ERR_SUCCESS;
1879 : }
1880 :
1881 4 : _PUBLIC_ void ndr_print_winspool_AsyncGetPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetPrinter *r)
1882 : {
1883 4 : ndr_print_struct(ndr, name, "winspool_AsyncGetPrinter");
1884 4 : if (r == NULL) { ndr_print_null(ndr); return; }
1885 4 : ndr->depth++;
1886 4 : if (flags & NDR_SET_VALUES) {
1887 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1888 : }
1889 4 : if (flags & NDR_IN) {
1890 2 : ndr_print_struct(ndr, "in", "winspool_AsyncGetPrinter");
1891 2 : ndr->depth++;
1892 2 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1893 2 : ndr_print_uint32(ndr, "Level", r->in.Level);
1894 2 : ndr_print_ptr(ndr, "pPrinter", r->in.pPrinter);
1895 2 : ndr->depth++;
1896 2 : if (r->in.pPrinter) {
1897 0 : ndr_print_array_uint8(ndr, "pPrinter", r->in.pPrinter, r->in.cbBuf);
1898 : }
1899 2 : ndr->depth--;
1900 2 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
1901 2 : ndr->depth--;
1902 : }
1903 4 : if (flags & NDR_OUT) {
1904 2 : ndr_print_struct(ndr, "out", "winspool_AsyncGetPrinter");
1905 2 : ndr->depth++;
1906 2 : ndr_print_ptr(ndr, "pPrinter", r->out.pPrinter);
1907 2 : ndr->depth++;
1908 2 : if (r->out.pPrinter) {
1909 0 : ndr_print_array_uint8(ndr, "pPrinter", r->out.pPrinter, r->in.cbBuf);
1910 : }
1911 2 : ndr->depth--;
1912 2 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
1913 2 : ndr->depth++;
1914 2 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
1915 2 : ndr->depth--;
1916 2 : ndr_print_WERROR(ndr, "result", r->out.result);
1917 2 : ndr->depth--;
1918 : }
1919 4 : ndr->depth--;
1920 : }
1921 :
1922 0 : static enum ndr_err_code ndr_push_winspool_AsyncStartDocPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncStartDocPrinter *r)
1923 : {
1924 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1925 0 : if (flags & NDR_IN) {
1926 0 : if (r->in.pDocInfoContainer == NULL) {
1927 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1928 : }
1929 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1930 0 : NDR_CHECK(ndr_push_spoolss_DocumentInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDocInfoContainer));
1931 : }
1932 0 : if (flags & NDR_OUT) {
1933 0 : if (r->out.pJobId == NULL) {
1934 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1935 : }
1936 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pJobId));
1937 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1938 : }
1939 0 : return NDR_ERR_SUCCESS;
1940 : }
1941 :
1942 0 : static enum ndr_err_code ndr_pull_winspool_AsyncStartDocPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncStartDocPrinter *r)
1943 : {
1944 0 : TALLOC_CTX *_mem_save_pDocInfoContainer_0 = NULL;
1945 0 : TALLOC_CTX *_mem_save_pJobId_0 = NULL;
1946 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1947 0 : if (flags & NDR_IN) {
1948 0 : NDR_ZERO_STRUCT(r->out);
1949 :
1950 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
1951 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1952 0 : NDR_PULL_ALLOC(ndr, r->in.pDocInfoContainer);
1953 : }
1954 0 : _mem_save_pDocInfoContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1955 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDocInfoContainer, LIBNDR_FLAG_REF_ALLOC);
1956 0 : NDR_CHECK(ndr_pull_spoolss_DocumentInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDocInfoContainer));
1957 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDocInfoContainer_0, LIBNDR_FLAG_REF_ALLOC);
1958 0 : NDR_PULL_ALLOC(ndr, r->out.pJobId);
1959 0 : NDR_ZERO_STRUCTP(r->out.pJobId);
1960 : }
1961 0 : if (flags & NDR_OUT) {
1962 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1963 : if (r->in.pDocInfoContainer == NULL) {
1964 : NDR_PULL_ALLOC(ndr, r->in.pDocInfoContainer);
1965 : NDR_ZERO_STRUCTP(r->in.pDocInfoContainer);
1966 : }
1967 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1968 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1969 0 : NDR_PULL_ALLOC(ndr, r->out.pJobId);
1970 : }
1971 0 : _mem_save_pJobId_0 = NDR_PULL_GET_MEM_CTX(ndr);
1972 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pJobId, LIBNDR_FLAG_REF_ALLOC);
1973 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pJobId));
1974 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pJobId_0, LIBNDR_FLAG_REF_ALLOC);
1975 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1976 : }
1977 0 : return NDR_ERR_SUCCESS;
1978 : }
1979 :
1980 0 : _PUBLIC_ void ndr_print_winspool_AsyncStartDocPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncStartDocPrinter *r)
1981 : {
1982 0 : ndr_print_struct(ndr, name, "winspool_AsyncStartDocPrinter");
1983 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1984 0 : ndr->depth++;
1985 0 : if (flags & NDR_SET_VALUES) {
1986 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1987 : }
1988 0 : if (flags & NDR_IN) {
1989 0 : ndr_print_struct(ndr, "in", "winspool_AsyncStartDocPrinter");
1990 0 : ndr->depth++;
1991 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
1992 0 : ndr_print_ptr(ndr, "pDocInfoContainer", r->in.pDocInfoContainer);
1993 0 : ndr->depth++;
1994 0 : ndr_print_spoolss_DocumentInfoCtr(ndr, "pDocInfoContainer", r->in.pDocInfoContainer);
1995 0 : ndr->depth--;
1996 0 : ndr->depth--;
1997 : }
1998 0 : if (flags & NDR_OUT) {
1999 0 : ndr_print_struct(ndr, "out", "winspool_AsyncStartDocPrinter");
2000 0 : ndr->depth++;
2001 0 : ndr_print_ptr(ndr, "pJobId", r->out.pJobId);
2002 0 : ndr->depth++;
2003 0 : ndr_print_uint32(ndr, "pJobId", *r->out.pJobId);
2004 0 : ndr->depth--;
2005 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2006 0 : ndr->depth--;
2007 : }
2008 0 : ndr->depth--;
2009 : }
2010 :
2011 0 : static enum ndr_err_code ndr_push_winspool_AsyncStartPagePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncStartPagePrinter *r)
2012 : {
2013 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2014 0 : if (flags & NDR_IN) {
2015 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2016 : }
2017 0 : if (flags & NDR_OUT) {
2018 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2019 : }
2020 0 : return NDR_ERR_SUCCESS;
2021 : }
2022 :
2023 0 : static enum ndr_err_code ndr_pull_winspool_AsyncStartPagePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncStartPagePrinter *r)
2024 : {
2025 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2026 0 : if (flags & NDR_IN) {
2027 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2028 : }
2029 0 : if (flags & NDR_OUT) {
2030 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2031 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2032 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2033 : }
2034 0 : return NDR_ERR_SUCCESS;
2035 : }
2036 :
2037 0 : _PUBLIC_ void ndr_print_winspool_AsyncStartPagePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncStartPagePrinter *r)
2038 : {
2039 0 : ndr_print_struct(ndr, name, "winspool_AsyncStartPagePrinter");
2040 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2041 0 : ndr->depth++;
2042 0 : if (flags & NDR_SET_VALUES) {
2043 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2044 : }
2045 0 : if (flags & NDR_IN) {
2046 0 : ndr_print_struct(ndr, "in", "winspool_AsyncStartPagePrinter");
2047 0 : ndr->depth++;
2048 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2049 0 : ndr->depth--;
2050 : }
2051 0 : if (flags & NDR_OUT) {
2052 0 : ndr_print_struct(ndr, "out", "winspool_AsyncStartPagePrinter");
2053 0 : ndr->depth++;
2054 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2055 0 : ndr->depth--;
2056 : }
2057 0 : ndr->depth--;
2058 : }
2059 :
2060 0 : static enum ndr_err_code ndr_push_winspool_AsyncWritePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncWritePrinter *r)
2061 : {
2062 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2063 0 : if (flags & NDR_IN) {
2064 0 : if (r->in.pBuf == NULL) {
2065 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2066 : }
2067 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2068 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
2069 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pBuf, r->in.cbBuf));
2070 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
2071 : }
2072 0 : if (flags & NDR_OUT) {
2073 0 : if (r->out.pcWritten == NULL) {
2074 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2075 : }
2076 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcWritten));
2077 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2078 : }
2079 0 : return NDR_ERR_SUCCESS;
2080 : }
2081 :
2082 0 : static enum ndr_err_code ndr_pull_winspool_AsyncWritePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncWritePrinter *r)
2083 : {
2084 0 : uint32_t size_pBuf_1 = 0;
2085 0 : TALLOC_CTX *_mem_save_pcWritten_0 = NULL;
2086 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2087 0 : if (flags & NDR_IN) {
2088 0 : NDR_ZERO_STRUCT(r->out);
2089 :
2090 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2091 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pBuf));
2092 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pBuf, &size_pBuf_1));
2093 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2094 0 : NDR_PULL_ALLOC_N(ndr, r->in.pBuf, size_pBuf_1);
2095 : }
2096 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pBuf, size_pBuf_1));
2097 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
2098 0 : NDR_PULL_ALLOC(ndr, r->out.pcWritten);
2099 0 : NDR_ZERO_STRUCTP(r->out.pcWritten);
2100 0 : if (r->in.pBuf) {
2101 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pBuf, r->in.cbBuf));
2102 : }
2103 : }
2104 0 : if (flags & NDR_OUT) {
2105 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2106 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2107 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2108 0 : NDR_PULL_ALLOC(ndr, r->out.pcWritten);
2109 : }
2110 0 : _mem_save_pcWritten_0 = NDR_PULL_GET_MEM_CTX(ndr);
2111 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcWritten, LIBNDR_FLAG_REF_ALLOC);
2112 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcWritten));
2113 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcWritten_0, LIBNDR_FLAG_REF_ALLOC);
2114 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2115 : }
2116 0 : return NDR_ERR_SUCCESS;
2117 : }
2118 :
2119 0 : _PUBLIC_ void ndr_print_winspool_AsyncWritePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncWritePrinter *r)
2120 : {
2121 0 : ndr_print_struct(ndr, name, "winspool_AsyncWritePrinter");
2122 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2123 0 : ndr->depth++;
2124 0 : if (flags & NDR_SET_VALUES) {
2125 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2126 : }
2127 0 : if (flags & NDR_IN) {
2128 0 : ndr_print_struct(ndr, "in", "winspool_AsyncWritePrinter");
2129 0 : ndr->depth++;
2130 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2131 0 : ndr_print_ptr(ndr, "pBuf", r->in.pBuf);
2132 0 : ndr->depth++;
2133 0 : ndr_print_array_uint8(ndr, "pBuf", r->in.pBuf, r->in.cbBuf);
2134 0 : ndr->depth--;
2135 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
2136 0 : ndr->depth--;
2137 : }
2138 0 : if (flags & NDR_OUT) {
2139 0 : ndr_print_struct(ndr, "out", "winspool_AsyncWritePrinter");
2140 0 : ndr->depth++;
2141 0 : ndr_print_ptr(ndr, "pcWritten", r->out.pcWritten);
2142 0 : ndr->depth++;
2143 0 : ndr_print_uint32(ndr, "pcWritten", *r->out.pcWritten);
2144 0 : ndr->depth--;
2145 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2146 0 : ndr->depth--;
2147 : }
2148 0 : ndr->depth--;
2149 : }
2150 :
2151 0 : static enum ndr_err_code ndr_push_winspool_AsyncEndPagePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEndPagePrinter *r)
2152 : {
2153 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2154 0 : if (flags & NDR_IN) {
2155 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2156 : }
2157 0 : if (flags & NDR_OUT) {
2158 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2159 : }
2160 0 : return NDR_ERR_SUCCESS;
2161 : }
2162 :
2163 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEndPagePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEndPagePrinter *r)
2164 : {
2165 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2166 0 : if (flags & NDR_IN) {
2167 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2168 : }
2169 0 : if (flags & NDR_OUT) {
2170 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2171 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2172 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2173 : }
2174 0 : return NDR_ERR_SUCCESS;
2175 : }
2176 :
2177 0 : _PUBLIC_ void ndr_print_winspool_AsyncEndPagePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEndPagePrinter *r)
2178 : {
2179 0 : ndr_print_struct(ndr, name, "winspool_AsyncEndPagePrinter");
2180 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2181 0 : ndr->depth++;
2182 0 : if (flags & NDR_SET_VALUES) {
2183 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2184 : }
2185 0 : if (flags & NDR_IN) {
2186 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEndPagePrinter");
2187 0 : ndr->depth++;
2188 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2189 0 : ndr->depth--;
2190 : }
2191 0 : if (flags & NDR_OUT) {
2192 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEndPagePrinter");
2193 0 : ndr->depth++;
2194 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2195 0 : ndr->depth--;
2196 : }
2197 0 : ndr->depth--;
2198 : }
2199 :
2200 0 : static enum ndr_err_code ndr_push_winspool_AsyncEndDocPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEndDocPrinter *r)
2201 : {
2202 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2203 0 : if (flags & NDR_IN) {
2204 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2205 : }
2206 0 : if (flags & NDR_OUT) {
2207 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2208 : }
2209 0 : return NDR_ERR_SUCCESS;
2210 : }
2211 :
2212 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEndDocPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEndDocPrinter *r)
2213 : {
2214 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2215 0 : if (flags & NDR_IN) {
2216 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2217 : }
2218 0 : if (flags & NDR_OUT) {
2219 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2220 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2221 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2222 : }
2223 0 : return NDR_ERR_SUCCESS;
2224 : }
2225 :
2226 0 : _PUBLIC_ void ndr_print_winspool_AsyncEndDocPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEndDocPrinter *r)
2227 : {
2228 0 : ndr_print_struct(ndr, name, "winspool_AsyncEndDocPrinter");
2229 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2230 0 : ndr->depth++;
2231 0 : if (flags & NDR_SET_VALUES) {
2232 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2233 : }
2234 0 : if (flags & NDR_IN) {
2235 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEndDocPrinter");
2236 0 : ndr->depth++;
2237 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2238 0 : ndr->depth--;
2239 : }
2240 0 : if (flags & NDR_OUT) {
2241 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEndDocPrinter");
2242 0 : ndr->depth++;
2243 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2244 0 : ndr->depth--;
2245 : }
2246 0 : ndr->depth--;
2247 : }
2248 :
2249 0 : static enum ndr_err_code ndr_push_winspool_AsyncAbortPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAbortPrinter *r)
2250 : {
2251 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2252 0 : if (flags & NDR_IN) {
2253 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2254 : }
2255 0 : if (flags & NDR_OUT) {
2256 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2257 : }
2258 0 : return NDR_ERR_SUCCESS;
2259 : }
2260 :
2261 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAbortPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAbortPrinter *r)
2262 : {
2263 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2264 0 : if (flags & NDR_IN) {
2265 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2266 : }
2267 0 : if (flags & NDR_OUT) {
2268 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2269 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2270 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2271 : }
2272 0 : return NDR_ERR_SUCCESS;
2273 : }
2274 :
2275 0 : _PUBLIC_ void ndr_print_winspool_AsyncAbortPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAbortPrinter *r)
2276 : {
2277 0 : ndr_print_struct(ndr, name, "winspool_AsyncAbortPrinter");
2278 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2279 0 : ndr->depth++;
2280 0 : if (flags & NDR_SET_VALUES) {
2281 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2282 : }
2283 0 : if (flags & NDR_IN) {
2284 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAbortPrinter");
2285 0 : ndr->depth++;
2286 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2287 0 : ndr->depth--;
2288 : }
2289 0 : if (flags & NDR_OUT) {
2290 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAbortPrinter");
2291 0 : ndr->depth++;
2292 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2293 0 : ndr->depth--;
2294 : }
2295 0 : ndr->depth--;
2296 : }
2297 :
2298 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncGetPrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetPrinterData *r)
2299 : {
2300 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2301 0 : if (flags & NDR_IN) {
2302 0 : if (r->in.pValueName == NULL) {
2303 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2304 : }
2305 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2306 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2307 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2308 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2309 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pValueName, ndr_charset_length(r->in.pValueName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2310 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.nSize));
2311 : }
2312 0 : if (flags & NDR_OUT) {
2313 0 : if (r->out.pType == NULL) {
2314 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2315 : }
2316 0 : if (r->out.pData == NULL) {
2317 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2318 : }
2319 0 : if (r->out.pcbNeeded == NULL) {
2320 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2321 : }
2322 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pType));
2323 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.nSize));
2324 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pData, r->in.nSize));
2325 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
2326 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2327 : }
2328 0 : return NDR_ERR_SUCCESS;
2329 : }
2330 :
2331 6 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncGetPrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetPrinterData *r)
2332 : {
2333 6 : uint32_t size_pValueName_1 = 0;
2334 6 : uint32_t length_pValueName_1 = 0;
2335 6 : uint32_t size_pData_1 = 0;
2336 6 : TALLOC_CTX *_mem_save_pType_0 = NULL;
2337 6 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
2338 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2339 6 : if (flags & NDR_IN) {
2340 4 : NDR_ZERO_STRUCT(r->out);
2341 :
2342 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2343 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pValueName));
2344 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pValueName));
2345 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pValueName, &size_pValueName_1));
2346 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pValueName, &length_pValueName_1));
2347 4 : if (length_pValueName_1 > size_pValueName_1) {
2348 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pValueName_1, length_pValueName_1);
2349 : }
2350 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pValueName_1, sizeof(uint16_t)));
2351 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pValueName, length_pValueName_1, sizeof(uint16_t), CH_UTF16));
2352 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.nSize));
2353 4 : NDR_PULL_ALLOC(ndr, r->out.pType);
2354 4 : NDR_ZERO_STRUCTP(r->out.pType);
2355 4 : NDR_PULL_ALLOC_N(ndr, r->out.pData, r->in.nSize);
2356 4 : memset(r->out.pData, 0, (r->in.nSize) * sizeof(*r->out.pData));
2357 4 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
2358 4 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
2359 : }
2360 6 : if (flags & NDR_OUT) {
2361 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2362 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2363 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2364 2 : NDR_PULL_ALLOC(ndr, r->out.pType);
2365 : }
2366 2 : _mem_save_pType_0 = NDR_PULL_GET_MEM_CTX(ndr);
2367 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pType, LIBNDR_FLAG_REF_ALLOC);
2368 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pType));
2369 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pType_0, LIBNDR_FLAG_REF_ALLOC);
2370 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pData));
2371 2 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pData, &size_pData_1));
2372 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2373 2 : NDR_PULL_ALLOC_N(ndr, r->out.pData, size_pData_1);
2374 : }
2375 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pData, size_pData_1));
2376 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2377 2 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
2378 : }
2379 2 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
2380 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
2381 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
2382 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
2383 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2384 2 : if (r->out.pData) {
2385 2 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pData, r->in.nSize));
2386 : }
2387 : }
2388 0 : return NDR_ERR_SUCCESS;
2389 : }
2390 :
2391 6 : _PUBLIC_ void ndr_print_winspool_AsyncGetPrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetPrinterData *r)
2392 : {
2393 6 : ndr_print_struct(ndr, name, "winspool_AsyncGetPrinterData");
2394 6 : if (r == NULL) { ndr_print_null(ndr); return; }
2395 6 : ndr->depth++;
2396 6 : if (flags & NDR_SET_VALUES) {
2397 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2398 : }
2399 6 : if (flags & NDR_IN) {
2400 4 : ndr_print_struct(ndr, "in", "winspool_AsyncGetPrinterData");
2401 4 : ndr->depth++;
2402 4 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2403 4 : ndr_print_ptr(ndr, "pValueName", r->in.pValueName);
2404 4 : ndr->depth++;
2405 4 : ndr_print_string(ndr, "pValueName", r->in.pValueName);
2406 4 : ndr->depth--;
2407 4 : ndr_print_uint32(ndr, "nSize", r->in.nSize);
2408 4 : ndr->depth--;
2409 : }
2410 6 : if (flags & NDR_OUT) {
2411 2 : ndr_print_struct(ndr, "out", "winspool_AsyncGetPrinterData");
2412 2 : ndr->depth++;
2413 2 : ndr_print_ptr(ndr, "pType", r->out.pType);
2414 2 : ndr->depth++;
2415 2 : ndr_print_uint32(ndr, "pType", *r->out.pType);
2416 2 : ndr->depth--;
2417 2 : ndr_print_ptr(ndr, "pData", r->out.pData);
2418 2 : ndr->depth++;
2419 2 : ndr_print_array_uint8(ndr, "pData", r->out.pData, r->in.nSize);
2420 2 : ndr->depth--;
2421 2 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
2422 2 : ndr->depth++;
2423 2 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
2424 2 : ndr->depth--;
2425 2 : ndr_print_WERROR(ndr, "result", r->out.result);
2426 2 : ndr->depth--;
2427 : }
2428 6 : ndr->depth--;
2429 : }
2430 :
2431 0 : static enum ndr_err_code ndr_push_winspool_AsyncGetPrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDataEx *r)
2432 : {
2433 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2434 0 : if (flags & NDR_IN) {
2435 0 : if (r->in.pKeyName == NULL) {
2436 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2437 : }
2438 0 : if (r->in.pValueName == NULL) {
2439 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2440 : }
2441 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2442 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
2443 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2444 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
2445 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pKeyName, ndr_charset_length(r->in.pKeyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2446 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2447 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2448 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2449 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pValueName, ndr_charset_length(r->in.pValueName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2450 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.nSize));
2451 : }
2452 0 : if (flags & NDR_OUT) {
2453 0 : if (r->out.pType == NULL) {
2454 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2455 : }
2456 0 : if (r->out.pData == NULL) {
2457 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2458 : }
2459 0 : if (r->out.pcbNeeded == NULL) {
2460 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2461 : }
2462 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pType));
2463 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.nSize));
2464 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pData, r->in.nSize));
2465 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
2466 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2467 : }
2468 0 : return NDR_ERR_SUCCESS;
2469 : }
2470 :
2471 0 : static enum ndr_err_code ndr_pull_winspool_AsyncGetPrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetPrinterDataEx *r)
2472 : {
2473 0 : uint32_t size_pKeyName_1 = 0;
2474 0 : uint32_t length_pKeyName_1 = 0;
2475 0 : uint32_t size_pValueName_1 = 0;
2476 0 : uint32_t length_pValueName_1 = 0;
2477 0 : uint32_t size_pData_1 = 0;
2478 0 : TALLOC_CTX *_mem_save_pType_0 = NULL;
2479 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
2480 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2481 0 : if (flags & NDR_IN) {
2482 0 : NDR_ZERO_STRUCT(r->out);
2483 :
2484 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2485 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pKeyName));
2486 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pKeyName));
2487 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pKeyName, &size_pKeyName_1));
2488 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pKeyName, &length_pKeyName_1));
2489 0 : if (length_pKeyName_1 > size_pKeyName_1) {
2490 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pKeyName_1, length_pKeyName_1);
2491 : }
2492 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pKeyName_1, sizeof(uint16_t)));
2493 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pKeyName, length_pKeyName_1, sizeof(uint16_t), CH_UTF16));
2494 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pValueName));
2495 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pValueName));
2496 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pValueName, &size_pValueName_1));
2497 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pValueName, &length_pValueName_1));
2498 0 : if (length_pValueName_1 > size_pValueName_1) {
2499 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pValueName_1, length_pValueName_1);
2500 : }
2501 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pValueName_1, sizeof(uint16_t)));
2502 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pValueName, length_pValueName_1, sizeof(uint16_t), CH_UTF16));
2503 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.nSize));
2504 0 : NDR_PULL_ALLOC(ndr, r->out.pType);
2505 0 : NDR_ZERO_STRUCTP(r->out.pType);
2506 0 : NDR_PULL_ALLOC_N(ndr, r->out.pData, r->in.nSize);
2507 0 : memset(r->out.pData, 0, (r->in.nSize) * sizeof(*r->out.pData));
2508 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
2509 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
2510 : }
2511 0 : if (flags & NDR_OUT) {
2512 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2513 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2514 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2515 0 : NDR_PULL_ALLOC(ndr, r->out.pType);
2516 : }
2517 0 : _mem_save_pType_0 = NDR_PULL_GET_MEM_CTX(ndr);
2518 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pType, LIBNDR_FLAG_REF_ALLOC);
2519 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pType));
2520 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pType_0, LIBNDR_FLAG_REF_ALLOC);
2521 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pData));
2522 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pData, &size_pData_1));
2523 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2524 0 : NDR_PULL_ALLOC_N(ndr, r->out.pData, size_pData_1);
2525 : }
2526 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pData, size_pData_1));
2527 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2528 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
2529 : }
2530 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
2531 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
2532 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
2533 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
2534 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2535 0 : if (r->out.pData) {
2536 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pData, r->in.nSize));
2537 : }
2538 : }
2539 0 : return NDR_ERR_SUCCESS;
2540 : }
2541 :
2542 0 : _PUBLIC_ void ndr_print_winspool_AsyncGetPrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDataEx *r)
2543 : {
2544 0 : ndr_print_struct(ndr, name, "winspool_AsyncGetPrinterDataEx");
2545 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2546 0 : ndr->depth++;
2547 0 : if (flags & NDR_SET_VALUES) {
2548 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2549 : }
2550 0 : if (flags & NDR_IN) {
2551 0 : ndr_print_struct(ndr, "in", "winspool_AsyncGetPrinterDataEx");
2552 0 : ndr->depth++;
2553 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2554 0 : ndr_print_ptr(ndr, "pKeyName", r->in.pKeyName);
2555 0 : ndr->depth++;
2556 0 : ndr_print_string(ndr, "pKeyName", r->in.pKeyName);
2557 0 : ndr->depth--;
2558 0 : ndr_print_ptr(ndr, "pValueName", r->in.pValueName);
2559 0 : ndr->depth++;
2560 0 : ndr_print_string(ndr, "pValueName", r->in.pValueName);
2561 0 : ndr->depth--;
2562 0 : ndr_print_uint32(ndr, "nSize", r->in.nSize);
2563 0 : ndr->depth--;
2564 : }
2565 0 : if (flags & NDR_OUT) {
2566 0 : ndr_print_struct(ndr, "out", "winspool_AsyncGetPrinterDataEx");
2567 0 : ndr->depth++;
2568 0 : ndr_print_ptr(ndr, "pType", r->out.pType);
2569 0 : ndr->depth++;
2570 0 : ndr_print_uint32(ndr, "pType", *r->out.pType);
2571 0 : ndr->depth--;
2572 0 : ndr_print_ptr(ndr, "pData", r->out.pData);
2573 0 : ndr->depth++;
2574 0 : ndr_print_array_uint8(ndr, "pData", r->out.pData, r->in.nSize);
2575 0 : ndr->depth--;
2576 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
2577 0 : ndr->depth++;
2578 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
2579 0 : ndr->depth--;
2580 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2581 0 : ndr->depth--;
2582 : }
2583 0 : ndr->depth--;
2584 : }
2585 :
2586 0 : static enum ndr_err_code ndr_push_winspool_AsyncSetPrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSetPrinterData *r)
2587 : {
2588 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2589 0 : if (flags & NDR_IN) {
2590 0 : if (r->in.pValueName == NULL) {
2591 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2592 : }
2593 0 : if (r->in.pData == NULL) {
2594 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2595 : }
2596 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2597 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2598 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2599 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2600 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pValueName, ndr_charset_length(r->in.pValueName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2601 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Type));
2602 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbData));
2603 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pData, r->in.cbData));
2604 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbData));
2605 : }
2606 0 : if (flags & NDR_OUT) {
2607 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2608 : }
2609 0 : return NDR_ERR_SUCCESS;
2610 : }
2611 :
2612 0 : static enum ndr_err_code ndr_pull_winspool_AsyncSetPrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSetPrinterData *r)
2613 : {
2614 0 : uint32_t size_pValueName_1 = 0;
2615 0 : uint32_t length_pValueName_1 = 0;
2616 0 : uint32_t size_pData_1 = 0;
2617 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2618 0 : if (flags & NDR_IN) {
2619 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2620 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pValueName));
2621 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pValueName));
2622 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pValueName, &size_pValueName_1));
2623 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pValueName, &length_pValueName_1));
2624 0 : if (length_pValueName_1 > size_pValueName_1) {
2625 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pValueName_1, length_pValueName_1);
2626 : }
2627 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pValueName_1, sizeof(uint16_t)));
2628 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pValueName, length_pValueName_1, sizeof(uint16_t), CH_UTF16));
2629 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Type));
2630 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pData));
2631 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pData, &size_pData_1));
2632 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2633 0 : NDR_PULL_ALLOC_N(ndr, r->in.pData, size_pData_1);
2634 : }
2635 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pData, size_pData_1));
2636 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbData));
2637 0 : if (r->in.pData) {
2638 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pData, r->in.cbData));
2639 : }
2640 : }
2641 0 : if (flags & NDR_OUT) {
2642 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2643 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2644 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2645 : }
2646 0 : return NDR_ERR_SUCCESS;
2647 : }
2648 :
2649 0 : _PUBLIC_ void ndr_print_winspool_AsyncSetPrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSetPrinterData *r)
2650 : {
2651 0 : ndr_print_struct(ndr, name, "winspool_AsyncSetPrinterData");
2652 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2653 0 : ndr->depth++;
2654 0 : if (flags & NDR_SET_VALUES) {
2655 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2656 : }
2657 0 : if (flags & NDR_IN) {
2658 0 : ndr_print_struct(ndr, "in", "winspool_AsyncSetPrinterData");
2659 0 : ndr->depth++;
2660 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2661 0 : ndr_print_ptr(ndr, "pValueName", r->in.pValueName);
2662 0 : ndr->depth++;
2663 0 : ndr_print_string(ndr, "pValueName", r->in.pValueName);
2664 0 : ndr->depth--;
2665 0 : ndr_print_uint32(ndr, "Type", r->in.Type);
2666 0 : ndr_print_ptr(ndr, "pData", r->in.pData);
2667 0 : ndr->depth++;
2668 0 : ndr_print_array_uint8(ndr, "pData", r->in.pData, r->in.cbData);
2669 0 : ndr->depth--;
2670 0 : ndr_print_uint32(ndr, "cbData", r->in.cbData);
2671 0 : ndr->depth--;
2672 : }
2673 0 : if (flags & NDR_OUT) {
2674 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSetPrinterData");
2675 0 : ndr->depth++;
2676 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2677 0 : ndr->depth--;
2678 : }
2679 0 : ndr->depth--;
2680 : }
2681 :
2682 0 : static enum ndr_err_code ndr_push_winspool_AsyncSetPrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSetPrinterDataEx *r)
2683 : {
2684 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2685 0 : if (flags & NDR_IN) {
2686 0 : if (r->in.pKeyName == NULL) {
2687 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2688 : }
2689 0 : if (r->in.pValueName == NULL) {
2690 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2691 : }
2692 0 : if (r->in.pData == NULL) {
2693 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2694 : }
2695 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2696 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
2697 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2698 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
2699 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pKeyName, ndr_charset_length(r->in.pKeyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2700 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2701 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2702 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
2703 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pValueName, ndr_charset_length(r->in.pValueName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2704 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Type));
2705 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbData));
2706 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pData, r->in.cbData));
2707 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbData));
2708 : }
2709 0 : if (flags & NDR_OUT) {
2710 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2711 : }
2712 0 : return NDR_ERR_SUCCESS;
2713 : }
2714 :
2715 0 : static enum ndr_err_code ndr_pull_winspool_AsyncSetPrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSetPrinterDataEx *r)
2716 : {
2717 0 : uint32_t size_pKeyName_1 = 0;
2718 0 : uint32_t length_pKeyName_1 = 0;
2719 0 : uint32_t size_pValueName_1 = 0;
2720 0 : uint32_t length_pValueName_1 = 0;
2721 0 : uint32_t size_pData_1 = 0;
2722 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2723 0 : if (flags & NDR_IN) {
2724 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2725 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pKeyName));
2726 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pKeyName));
2727 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pKeyName, &size_pKeyName_1));
2728 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pKeyName, &length_pKeyName_1));
2729 0 : if (length_pKeyName_1 > size_pKeyName_1) {
2730 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pKeyName_1, length_pKeyName_1);
2731 : }
2732 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pKeyName_1, sizeof(uint16_t)));
2733 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pKeyName, length_pKeyName_1, sizeof(uint16_t), CH_UTF16));
2734 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pValueName));
2735 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pValueName));
2736 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pValueName, &size_pValueName_1));
2737 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pValueName, &length_pValueName_1));
2738 0 : if (length_pValueName_1 > size_pValueName_1) {
2739 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pValueName_1, length_pValueName_1);
2740 : }
2741 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pValueName_1, sizeof(uint16_t)));
2742 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pValueName, length_pValueName_1, sizeof(uint16_t), CH_UTF16));
2743 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Type));
2744 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pData));
2745 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pData, &size_pData_1));
2746 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2747 0 : NDR_PULL_ALLOC_N(ndr, r->in.pData, size_pData_1);
2748 : }
2749 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pData, size_pData_1));
2750 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbData));
2751 0 : if (r->in.pData) {
2752 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pData, r->in.cbData));
2753 : }
2754 : }
2755 0 : if (flags & NDR_OUT) {
2756 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2757 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2758 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2759 : }
2760 0 : return NDR_ERR_SUCCESS;
2761 : }
2762 :
2763 0 : _PUBLIC_ void ndr_print_winspool_AsyncSetPrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSetPrinterDataEx *r)
2764 : {
2765 0 : ndr_print_struct(ndr, name, "winspool_AsyncSetPrinterDataEx");
2766 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2767 0 : ndr->depth++;
2768 0 : if (flags & NDR_SET_VALUES) {
2769 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2770 : }
2771 0 : if (flags & NDR_IN) {
2772 0 : ndr_print_struct(ndr, "in", "winspool_AsyncSetPrinterDataEx");
2773 0 : ndr->depth++;
2774 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2775 0 : ndr_print_ptr(ndr, "pKeyName", r->in.pKeyName);
2776 0 : ndr->depth++;
2777 0 : ndr_print_string(ndr, "pKeyName", r->in.pKeyName);
2778 0 : ndr->depth--;
2779 0 : ndr_print_ptr(ndr, "pValueName", r->in.pValueName);
2780 0 : ndr->depth++;
2781 0 : ndr_print_string(ndr, "pValueName", r->in.pValueName);
2782 0 : ndr->depth--;
2783 0 : ndr_print_uint32(ndr, "Type", r->in.Type);
2784 0 : ndr_print_ptr(ndr, "pData", r->in.pData);
2785 0 : ndr->depth++;
2786 0 : ndr_print_array_uint8(ndr, "pData", r->in.pData, r->in.cbData);
2787 0 : ndr->depth--;
2788 0 : ndr_print_uint32(ndr, "cbData", r->in.cbData);
2789 0 : ndr->depth--;
2790 : }
2791 0 : if (flags & NDR_OUT) {
2792 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSetPrinterDataEx");
2793 0 : ndr->depth++;
2794 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2795 0 : ndr->depth--;
2796 : }
2797 0 : ndr->depth--;
2798 : }
2799 :
2800 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncClosePrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncClosePrinter *r)
2801 : {
2802 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2803 0 : if (flags & NDR_IN) {
2804 0 : if (r->in.phPrinter == NULL) {
2805 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2806 : }
2807 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.phPrinter));
2808 : }
2809 0 : if (flags & NDR_OUT) {
2810 0 : if (r->out.phPrinter == NULL) {
2811 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2812 : }
2813 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.phPrinter));
2814 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2815 : }
2816 0 : return NDR_ERR_SUCCESS;
2817 : }
2818 :
2819 4 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncClosePrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncClosePrinter *r)
2820 : {
2821 4 : TALLOC_CTX *_mem_save_phPrinter_0 = NULL;
2822 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2823 4 : if (flags & NDR_IN) {
2824 2 : NDR_ZERO_STRUCT(r->out);
2825 :
2826 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2827 2 : NDR_PULL_ALLOC(ndr, r->in.phPrinter);
2828 : }
2829 2 : _mem_save_phPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
2830 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.phPrinter, LIBNDR_FLAG_REF_ALLOC);
2831 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.phPrinter));
2832 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phPrinter_0, LIBNDR_FLAG_REF_ALLOC);
2833 2 : NDR_PULL_ALLOC(ndr, r->out.phPrinter);
2834 2 : *r->out.phPrinter = *r->in.phPrinter;
2835 : }
2836 4 : if (flags & NDR_OUT) {
2837 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2838 : if (r->in.phPrinter == NULL) {
2839 : NDR_PULL_ALLOC(ndr, r->in.phPrinter);
2840 : NDR_ZERO_STRUCTP(r->in.phPrinter);
2841 : }
2842 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2843 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2844 2 : NDR_PULL_ALLOC(ndr, r->out.phPrinter);
2845 : }
2846 2 : _mem_save_phPrinter_0 = NDR_PULL_GET_MEM_CTX(ndr);
2847 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.phPrinter, LIBNDR_FLAG_REF_ALLOC);
2848 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.phPrinter));
2849 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phPrinter_0, LIBNDR_FLAG_REF_ALLOC);
2850 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2851 : }
2852 0 : return NDR_ERR_SUCCESS;
2853 : }
2854 :
2855 4 : _PUBLIC_ void ndr_print_winspool_AsyncClosePrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncClosePrinter *r)
2856 : {
2857 4 : ndr_print_struct(ndr, name, "winspool_AsyncClosePrinter");
2858 4 : if (r == NULL) { ndr_print_null(ndr); return; }
2859 4 : ndr->depth++;
2860 4 : if (flags & NDR_SET_VALUES) {
2861 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2862 : }
2863 4 : if (flags & NDR_IN) {
2864 2 : ndr_print_struct(ndr, "in", "winspool_AsyncClosePrinter");
2865 2 : ndr->depth++;
2866 2 : ndr_print_ptr(ndr, "phPrinter", r->in.phPrinter);
2867 2 : ndr->depth++;
2868 2 : ndr_print_policy_handle(ndr, "phPrinter", r->in.phPrinter);
2869 2 : ndr->depth--;
2870 2 : ndr->depth--;
2871 : }
2872 4 : if (flags & NDR_OUT) {
2873 2 : ndr_print_struct(ndr, "out", "winspool_AsyncClosePrinter");
2874 2 : ndr->depth++;
2875 2 : ndr_print_ptr(ndr, "phPrinter", r->out.phPrinter);
2876 2 : ndr->depth++;
2877 2 : ndr_print_policy_handle(ndr, "phPrinter", r->out.phPrinter);
2878 2 : ndr->depth--;
2879 2 : ndr_print_WERROR(ndr, "result", r->out.result);
2880 2 : ndr->depth--;
2881 : }
2882 4 : ndr->depth--;
2883 : }
2884 :
2885 0 : static enum ndr_err_code ndr_push_winspool_AsyncAddForm(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddForm *r)
2886 : {
2887 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2888 0 : if (flags & NDR_IN) {
2889 0 : if (r->in.pFormInfoContainer == NULL) {
2890 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2891 : }
2892 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2893 0 : NDR_CHECK(ndr_push_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pFormInfoContainer));
2894 : }
2895 0 : if (flags & NDR_OUT) {
2896 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2897 : }
2898 0 : return NDR_ERR_SUCCESS;
2899 : }
2900 :
2901 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAddForm(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddForm *r)
2902 : {
2903 0 : TALLOC_CTX *_mem_save_pFormInfoContainer_0 = NULL;
2904 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2905 0 : if (flags & NDR_IN) {
2906 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2907 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2908 0 : NDR_PULL_ALLOC(ndr, r->in.pFormInfoContainer);
2909 : }
2910 0 : _mem_save_pFormInfoContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
2911 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pFormInfoContainer, LIBNDR_FLAG_REF_ALLOC);
2912 0 : NDR_CHECK(ndr_pull_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pFormInfoContainer));
2913 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pFormInfoContainer_0, LIBNDR_FLAG_REF_ALLOC);
2914 : }
2915 0 : if (flags & NDR_OUT) {
2916 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2917 : if (r->in.pFormInfoContainer == NULL) {
2918 : NDR_PULL_ALLOC(ndr, r->in.pFormInfoContainer);
2919 : NDR_ZERO_STRUCTP(r->in.pFormInfoContainer);
2920 : }
2921 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2922 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2923 : }
2924 0 : return NDR_ERR_SUCCESS;
2925 : }
2926 :
2927 0 : _PUBLIC_ void ndr_print_winspool_AsyncAddForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddForm *r)
2928 : {
2929 0 : ndr_print_struct(ndr, name, "winspool_AsyncAddForm");
2930 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2931 0 : ndr->depth++;
2932 0 : if (flags & NDR_SET_VALUES) {
2933 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2934 : }
2935 0 : if (flags & NDR_IN) {
2936 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAddForm");
2937 0 : ndr->depth++;
2938 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
2939 0 : ndr_print_ptr(ndr, "pFormInfoContainer", r->in.pFormInfoContainer);
2940 0 : ndr->depth++;
2941 0 : ndr_print_spoolss_AddFormInfoCtr(ndr, "pFormInfoContainer", r->in.pFormInfoContainer);
2942 0 : ndr->depth--;
2943 0 : ndr->depth--;
2944 : }
2945 0 : if (flags & NDR_OUT) {
2946 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddForm");
2947 0 : ndr->depth++;
2948 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2949 0 : ndr->depth--;
2950 : }
2951 0 : ndr->depth--;
2952 : }
2953 :
2954 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeleteForm(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeleteForm *r)
2955 : {
2956 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2957 0 : if (flags & NDR_IN) {
2958 0 : if (r->in.pFormName == NULL) {
2959 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2960 : }
2961 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2962 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pFormName, CH_UTF16)));
2963 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2964 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pFormName, CH_UTF16)));
2965 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pFormName, ndr_charset_length(r->in.pFormName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2966 : }
2967 0 : if (flags & NDR_OUT) {
2968 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2969 : }
2970 0 : return NDR_ERR_SUCCESS;
2971 : }
2972 :
2973 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeleteForm(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeleteForm *r)
2974 : {
2975 0 : uint32_t size_pFormName_1 = 0;
2976 0 : uint32_t length_pFormName_1 = 0;
2977 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2978 0 : if (flags & NDR_IN) {
2979 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
2980 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pFormName));
2981 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pFormName));
2982 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pFormName, &size_pFormName_1));
2983 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pFormName, &length_pFormName_1));
2984 0 : if (length_pFormName_1 > size_pFormName_1) {
2985 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pFormName_1, length_pFormName_1);
2986 : }
2987 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pFormName_1, sizeof(uint16_t)));
2988 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pFormName, length_pFormName_1, sizeof(uint16_t), CH_UTF16));
2989 : }
2990 0 : if (flags & NDR_OUT) {
2991 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2992 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2993 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2994 : }
2995 0 : return NDR_ERR_SUCCESS;
2996 : }
2997 :
2998 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeleteForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeleteForm *r)
2999 : {
3000 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeleteForm");
3001 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3002 0 : ndr->depth++;
3003 0 : if (flags & NDR_SET_VALUES) {
3004 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3005 : }
3006 0 : if (flags & NDR_IN) {
3007 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeleteForm");
3008 0 : ndr->depth++;
3009 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
3010 0 : ndr_print_ptr(ndr, "pFormName", r->in.pFormName);
3011 0 : ndr->depth++;
3012 0 : ndr_print_string(ndr, "pFormName", r->in.pFormName);
3013 0 : ndr->depth--;
3014 0 : ndr->depth--;
3015 : }
3016 0 : if (flags & NDR_OUT) {
3017 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeleteForm");
3018 0 : ndr->depth++;
3019 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3020 0 : ndr->depth--;
3021 : }
3022 0 : ndr->depth--;
3023 : }
3024 :
3025 0 : static enum ndr_err_code ndr_push_winspool_AsyncGetForm(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetForm *r)
3026 : {
3027 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3028 0 : if (flags & NDR_IN) {
3029 0 : if (r->in.pFormName == NULL) {
3030 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3031 : }
3032 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3033 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pFormName, CH_UTF16)));
3034 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3035 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pFormName, CH_UTF16)));
3036 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pFormName, ndr_charset_length(r->in.pFormName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3037 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
3038 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pForm));
3039 0 : if (r->in.pForm) {
3040 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
3041 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pForm, r->in.cbBuf));
3042 : }
3043 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
3044 : }
3045 0 : if (flags & NDR_OUT) {
3046 0 : if (r->out.pcbNeeded == NULL) {
3047 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3048 : }
3049 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pForm));
3050 0 : if (r->out.pForm) {
3051 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
3052 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pForm, r->in.cbBuf));
3053 : }
3054 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
3055 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3056 : }
3057 0 : return NDR_ERR_SUCCESS;
3058 : }
3059 :
3060 0 : static enum ndr_err_code ndr_pull_winspool_AsyncGetForm(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetForm *r)
3061 : {
3062 0 : uint32_t size_pFormName_1 = 0;
3063 0 : uint32_t length_pFormName_1 = 0;
3064 0 : uint32_t _ptr_pForm;
3065 0 : uint32_t size_pForm_1 = 0;
3066 0 : TALLOC_CTX *_mem_save_pForm_0 = NULL;
3067 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
3068 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3069 0 : if (flags & NDR_IN) {
3070 0 : NDR_ZERO_STRUCT(r->out);
3071 :
3072 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3073 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pFormName));
3074 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pFormName));
3075 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pFormName, &size_pFormName_1));
3076 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pFormName, &length_pFormName_1));
3077 0 : if (length_pFormName_1 > size_pFormName_1) {
3078 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pFormName_1, length_pFormName_1);
3079 : }
3080 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pFormName_1, sizeof(uint16_t)));
3081 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pFormName, length_pFormName_1, sizeof(uint16_t), CH_UTF16));
3082 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
3083 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pForm));
3084 0 : if (_ptr_pForm) {
3085 0 : NDR_PULL_ALLOC(ndr, r->in.pForm);
3086 : } else {
3087 0 : r->in.pForm = NULL;
3088 : }
3089 0 : if (r->in.pForm) {
3090 0 : _mem_save_pForm_0 = NDR_PULL_GET_MEM_CTX(ndr);
3091 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pForm, 0);
3092 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pForm));
3093 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pForm, &size_pForm_1));
3094 0 : NDR_PULL_ALLOC_N(ndr, r->in.pForm, size_pForm_1);
3095 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pForm, size_pForm_1));
3096 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pForm_0, 0);
3097 : }
3098 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
3099 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
3100 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
3101 0 : if (r->in.pForm) {
3102 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pForm, r->in.cbBuf));
3103 : }
3104 : }
3105 0 : if (flags & NDR_OUT) {
3106 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3107 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3108 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pForm));
3109 0 : if (_ptr_pForm) {
3110 0 : NDR_PULL_ALLOC(ndr, r->out.pForm);
3111 : } else {
3112 0 : r->out.pForm = NULL;
3113 : }
3114 0 : if (r->out.pForm) {
3115 0 : _mem_save_pForm_0 = NDR_PULL_GET_MEM_CTX(ndr);
3116 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pForm, 0);
3117 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pForm));
3118 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pForm, &size_pForm_1));
3119 0 : NDR_PULL_ALLOC_N(ndr, r->out.pForm, size_pForm_1);
3120 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pForm, size_pForm_1));
3121 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pForm_0, 0);
3122 : }
3123 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3124 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
3125 : }
3126 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
3127 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
3128 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
3129 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
3130 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3131 0 : if (r->out.pForm) {
3132 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pForm, r->in.cbBuf));
3133 : }
3134 : }
3135 0 : return NDR_ERR_SUCCESS;
3136 : }
3137 :
3138 0 : _PUBLIC_ void ndr_print_winspool_AsyncGetForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetForm *r)
3139 : {
3140 0 : ndr_print_struct(ndr, name, "winspool_AsyncGetForm");
3141 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3142 0 : ndr->depth++;
3143 0 : if (flags & NDR_SET_VALUES) {
3144 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3145 : }
3146 0 : if (flags & NDR_IN) {
3147 0 : ndr_print_struct(ndr, "in", "winspool_AsyncGetForm");
3148 0 : ndr->depth++;
3149 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
3150 0 : ndr_print_ptr(ndr, "pFormName", r->in.pFormName);
3151 0 : ndr->depth++;
3152 0 : ndr_print_string(ndr, "pFormName", r->in.pFormName);
3153 0 : ndr->depth--;
3154 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
3155 0 : ndr_print_ptr(ndr, "pForm", r->in.pForm);
3156 0 : ndr->depth++;
3157 0 : if (r->in.pForm) {
3158 0 : ndr_print_array_uint8(ndr, "pForm", r->in.pForm, r->in.cbBuf);
3159 : }
3160 0 : ndr->depth--;
3161 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
3162 0 : ndr->depth--;
3163 : }
3164 0 : if (flags & NDR_OUT) {
3165 0 : ndr_print_struct(ndr, "out", "winspool_AsyncGetForm");
3166 0 : ndr->depth++;
3167 0 : ndr_print_ptr(ndr, "pForm", r->out.pForm);
3168 0 : ndr->depth++;
3169 0 : if (r->out.pForm) {
3170 0 : ndr_print_array_uint8(ndr, "pForm", r->out.pForm, r->in.cbBuf);
3171 : }
3172 0 : ndr->depth--;
3173 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
3174 0 : ndr->depth++;
3175 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
3176 0 : ndr->depth--;
3177 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3178 0 : ndr->depth--;
3179 : }
3180 0 : ndr->depth--;
3181 : }
3182 :
3183 0 : static enum ndr_err_code ndr_push_winspool_AsyncSetForm(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSetForm *r)
3184 : {
3185 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3186 0 : if (flags & NDR_IN) {
3187 0 : if (r->in.pFormName == NULL) {
3188 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3189 : }
3190 0 : if (r->in.pFormInfoContainer == NULL) {
3191 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3192 : }
3193 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3194 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pFormName, CH_UTF16)));
3195 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3196 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pFormName, CH_UTF16)));
3197 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pFormName, ndr_charset_length(r->in.pFormName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3198 0 : NDR_CHECK(ndr_push_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pFormInfoContainer));
3199 : }
3200 0 : if (flags & NDR_OUT) {
3201 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3202 : }
3203 0 : return NDR_ERR_SUCCESS;
3204 : }
3205 :
3206 0 : static enum ndr_err_code ndr_pull_winspool_AsyncSetForm(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSetForm *r)
3207 : {
3208 0 : uint32_t size_pFormName_1 = 0;
3209 0 : uint32_t length_pFormName_1 = 0;
3210 0 : TALLOC_CTX *_mem_save_pFormInfoContainer_0 = NULL;
3211 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3212 0 : if (flags & NDR_IN) {
3213 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3214 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pFormName));
3215 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pFormName));
3216 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pFormName, &size_pFormName_1));
3217 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pFormName, &length_pFormName_1));
3218 0 : if (length_pFormName_1 > size_pFormName_1) {
3219 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pFormName_1, length_pFormName_1);
3220 : }
3221 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pFormName_1, sizeof(uint16_t)));
3222 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pFormName, length_pFormName_1, sizeof(uint16_t), CH_UTF16));
3223 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3224 0 : NDR_PULL_ALLOC(ndr, r->in.pFormInfoContainer);
3225 : }
3226 0 : _mem_save_pFormInfoContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
3227 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pFormInfoContainer, LIBNDR_FLAG_REF_ALLOC);
3228 0 : NDR_CHECK(ndr_pull_spoolss_AddFormInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pFormInfoContainer));
3229 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pFormInfoContainer_0, LIBNDR_FLAG_REF_ALLOC);
3230 : }
3231 0 : if (flags & NDR_OUT) {
3232 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3233 : if (r->in.pFormInfoContainer == NULL) {
3234 : NDR_PULL_ALLOC(ndr, r->in.pFormInfoContainer);
3235 : NDR_ZERO_STRUCTP(r->in.pFormInfoContainer);
3236 : }
3237 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3238 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3239 : }
3240 0 : return NDR_ERR_SUCCESS;
3241 : }
3242 :
3243 0 : _PUBLIC_ void ndr_print_winspool_AsyncSetForm(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSetForm *r)
3244 : {
3245 0 : ndr_print_struct(ndr, name, "winspool_AsyncSetForm");
3246 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3247 0 : ndr->depth++;
3248 0 : if (flags & NDR_SET_VALUES) {
3249 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3250 : }
3251 0 : if (flags & NDR_IN) {
3252 0 : ndr_print_struct(ndr, "in", "winspool_AsyncSetForm");
3253 0 : ndr->depth++;
3254 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
3255 0 : ndr_print_ptr(ndr, "pFormName", r->in.pFormName);
3256 0 : ndr->depth++;
3257 0 : ndr_print_string(ndr, "pFormName", r->in.pFormName);
3258 0 : ndr->depth--;
3259 0 : ndr_print_ptr(ndr, "pFormInfoContainer", r->in.pFormInfoContainer);
3260 0 : ndr->depth++;
3261 0 : ndr_print_spoolss_AddFormInfoCtr(ndr, "pFormInfoContainer", r->in.pFormInfoContainer);
3262 0 : ndr->depth--;
3263 0 : ndr->depth--;
3264 : }
3265 0 : if (flags & NDR_OUT) {
3266 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSetForm");
3267 0 : ndr->depth++;
3268 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3269 0 : ndr->depth--;
3270 : }
3271 0 : ndr->depth--;
3272 : }
3273 :
3274 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncEnumForms(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumForms *r)
3275 : {
3276 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3277 0 : if (flags & NDR_IN) {
3278 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3279 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
3280 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pForm));
3281 0 : if (r->in.pForm) {
3282 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
3283 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pForm, r->in.cbBuf));
3284 : }
3285 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
3286 : }
3287 0 : if (flags & NDR_OUT) {
3288 0 : if (r->out.pcbNeeded == NULL) {
3289 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3290 : }
3291 0 : if (r->out.pcReturned == NULL) {
3292 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3293 : }
3294 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pForm));
3295 0 : if (r->out.pForm) {
3296 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
3297 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pForm, r->in.cbBuf));
3298 : }
3299 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
3300 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
3301 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3302 : }
3303 0 : return NDR_ERR_SUCCESS;
3304 : }
3305 :
3306 4 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncEnumForms(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumForms *r)
3307 : {
3308 4 : uint32_t _ptr_pForm;
3309 4 : uint32_t size_pForm_1 = 0;
3310 4 : TALLOC_CTX *_mem_save_pForm_0 = NULL;
3311 4 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
3312 4 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
3313 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3314 4 : if (flags & NDR_IN) {
3315 2 : NDR_ZERO_STRUCT(r->out);
3316 :
3317 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3318 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
3319 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pForm));
3320 2 : if (_ptr_pForm) {
3321 0 : NDR_PULL_ALLOC(ndr, r->in.pForm);
3322 : } else {
3323 2 : r->in.pForm = NULL;
3324 : }
3325 2 : if (r->in.pForm) {
3326 0 : _mem_save_pForm_0 = NDR_PULL_GET_MEM_CTX(ndr);
3327 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pForm, 0);
3328 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pForm));
3329 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pForm, &size_pForm_1));
3330 0 : NDR_PULL_ALLOC_N(ndr, r->in.pForm, size_pForm_1);
3331 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pForm, size_pForm_1));
3332 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pForm_0, 0);
3333 : }
3334 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
3335 2 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
3336 2 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
3337 2 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
3338 2 : NDR_ZERO_STRUCTP(r->out.pcReturned);
3339 2 : if (r->in.pForm) {
3340 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pForm, r->in.cbBuf));
3341 : }
3342 : }
3343 4 : if (flags & NDR_OUT) {
3344 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3345 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3346 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pForm));
3347 2 : if (_ptr_pForm) {
3348 0 : NDR_PULL_ALLOC(ndr, r->out.pForm);
3349 : } else {
3350 2 : r->out.pForm = NULL;
3351 : }
3352 2 : if (r->out.pForm) {
3353 0 : _mem_save_pForm_0 = NDR_PULL_GET_MEM_CTX(ndr);
3354 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pForm, 0);
3355 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pForm));
3356 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pForm, &size_pForm_1));
3357 0 : NDR_PULL_ALLOC_N(ndr, r->out.pForm, size_pForm_1);
3358 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pForm, size_pForm_1));
3359 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pForm_0, 0);
3360 : }
3361 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3362 2 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
3363 : }
3364 2 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
3365 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
3366 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
3367 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
3368 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3369 2 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
3370 : }
3371 2 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
3372 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
3373 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
3374 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
3375 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3376 2 : if (r->out.pForm) {
3377 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pForm, r->in.cbBuf));
3378 : }
3379 : }
3380 0 : return NDR_ERR_SUCCESS;
3381 : }
3382 :
3383 4 : _PUBLIC_ void ndr_print_winspool_AsyncEnumForms(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumForms *r)
3384 : {
3385 4 : ndr_print_struct(ndr, name, "winspool_AsyncEnumForms");
3386 4 : if (r == NULL) { ndr_print_null(ndr); return; }
3387 4 : ndr->depth++;
3388 4 : if (flags & NDR_SET_VALUES) {
3389 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3390 : }
3391 4 : if (flags & NDR_IN) {
3392 2 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumForms");
3393 2 : ndr->depth++;
3394 2 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
3395 2 : ndr_print_uint32(ndr, "Level", r->in.Level);
3396 2 : ndr_print_ptr(ndr, "pForm", r->in.pForm);
3397 2 : ndr->depth++;
3398 2 : if (r->in.pForm) {
3399 0 : ndr_print_array_uint8(ndr, "pForm", r->in.pForm, r->in.cbBuf);
3400 : }
3401 2 : ndr->depth--;
3402 2 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
3403 2 : ndr->depth--;
3404 : }
3405 4 : if (flags & NDR_OUT) {
3406 2 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumForms");
3407 2 : ndr->depth++;
3408 2 : ndr_print_ptr(ndr, "pForm", r->out.pForm);
3409 2 : ndr->depth++;
3410 2 : if (r->out.pForm) {
3411 0 : ndr_print_array_uint8(ndr, "pForm", r->out.pForm, r->in.cbBuf);
3412 : }
3413 2 : ndr->depth--;
3414 2 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
3415 2 : ndr->depth++;
3416 2 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
3417 2 : ndr->depth--;
3418 2 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
3419 2 : ndr->depth++;
3420 2 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
3421 2 : ndr->depth--;
3422 2 : ndr_print_WERROR(ndr, "result", r->out.result);
3423 2 : ndr->depth--;
3424 : }
3425 4 : ndr->depth--;
3426 : }
3427 :
3428 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncGetPrinterDriver(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDriver *r)
3429 : {
3430 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3431 0 : if (flags & NDR_IN) {
3432 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3433 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pEnvironment));
3434 0 : if (r->in.pEnvironment) {
3435 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
3436 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3437 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
3438 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3439 : }
3440 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
3441 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDriver));
3442 0 : if (r->in.pDriver) {
3443 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
3444 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pDriver, r->in.cbBuf));
3445 : }
3446 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
3447 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwClientMajorVersion));
3448 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwClientMinorVersion));
3449 : }
3450 0 : if (flags & NDR_OUT) {
3451 0 : if (r->out.pcbNeeded == NULL) {
3452 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3453 : }
3454 0 : if (r->out.pdwServerMaxVersion == NULL) {
3455 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3456 : }
3457 0 : if (r->out.pdwServerMinVersion == NULL) {
3458 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3459 : }
3460 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pDriver));
3461 0 : if (r->out.pDriver) {
3462 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
3463 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pDriver, r->in.cbBuf));
3464 : }
3465 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
3466 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pdwServerMaxVersion));
3467 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pdwServerMinVersion));
3468 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3469 : }
3470 0 : return NDR_ERR_SUCCESS;
3471 : }
3472 :
3473 6 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncGetPrinterDriver(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetPrinterDriver *r)
3474 : {
3475 6 : uint32_t _ptr_pEnvironment;
3476 6 : uint32_t size_pEnvironment_1 = 0;
3477 6 : uint32_t length_pEnvironment_1 = 0;
3478 6 : uint32_t _ptr_pDriver;
3479 6 : uint32_t size_pDriver_1 = 0;
3480 6 : TALLOC_CTX *_mem_save_pEnvironment_0 = NULL;
3481 6 : TALLOC_CTX *_mem_save_pDriver_0 = NULL;
3482 6 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
3483 6 : TALLOC_CTX *_mem_save_pdwServerMaxVersion_0 = NULL;
3484 6 : TALLOC_CTX *_mem_save_pdwServerMinVersion_0 = NULL;
3485 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3486 6 : if (flags & NDR_IN) {
3487 4 : NDR_ZERO_STRUCT(r->out);
3488 :
3489 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3490 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pEnvironment));
3491 4 : if (_ptr_pEnvironment) {
3492 4 : NDR_PULL_ALLOC(ndr, r->in.pEnvironment);
3493 : } else {
3494 0 : r->in.pEnvironment = NULL;
3495 : }
3496 4 : if (r->in.pEnvironment) {
3497 4 : _mem_save_pEnvironment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3498 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pEnvironment, 0);
3499 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
3500 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
3501 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
3502 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
3503 4 : if (length_pEnvironment_1 > size_pEnvironment_1) {
3504 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
3505 : }
3506 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
3507 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
3508 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pEnvironment_0, 0);
3509 : }
3510 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
3511 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDriver));
3512 4 : if (_ptr_pDriver) {
3513 4 : NDR_PULL_ALLOC(ndr, r->in.pDriver);
3514 : } else {
3515 0 : r->in.pDriver = NULL;
3516 : }
3517 4 : if (r->in.pDriver) {
3518 4 : _mem_save_pDriver_0 = NDR_PULL_GET_MEM_CTX(ndr);
3519 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDriver, 0);
3520 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDriver));
3521 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pDriver, &size_pDriver_1));
3522 4 : NDR_PULL_ALLOC_N(ndr, r->in.pDriver, size_pDriver_1);
3523 4 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pDriver, size_pDriver_1));
3524 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDriver_0, 0);
3525 : }
3526 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
3527 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwClientMajorVersion));
3528 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwClientMinorVersion));
3529 4 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
3530 4 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
3531 4 : NDR_PULL_ALLOC(ndr, r->out.pdwServerMaxVersion);
3532 4 : NDR_ZERO_STRUCTP(r->out.pdwServerMaxVersion);
3533 4 : NDR_PULL_ALLOC(ndr, r->out.pdwServerMinVersion);
3534 4 : NDR_ZERO_STRUCTP(r->out.pdwServerMinVersion);
3535 4 : if (r->in.pDriver) {
3536 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pDriver, r->in.cbBuf));
3537 : }
3538 : }
3539 6 : if (flags & NDR_OUT) {
3540 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3541 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3542 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDriver));
3543 2 : if (_ptr_pDriver) {
3544 2 : NDR_PULL_ALLOC(ndr, r->out.pDriver);
3545 : } else {
3546 0 : r->out.pDriver = NULL;
3547 : }
3548 2 : if (r->out.pDriver) {
3549 2 : _mem_save_pDriver_0 = NDR_PULL_GET_MEM_CTX(ndr);
3550 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pDriver, 0);
3551 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pDriver));
3552 2 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pDriver, &size_pDriver_1));
3553 2 : NDR_PULL_ALLOC_N(ndr, r->out.pDriver, size_pDriver_1);
3554 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pDriver, size_pDriver_1));
3555 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDriver_0, 0);
3556 : }
3557 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3558 2 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
3559 : }
3560 2 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
3561 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
3562 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
3563 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
3564 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3565 2 : NDR_PULL_ALLOC(ndr, r->out.pdwServerMaxVersion);
3566 : }
3567 2 : _mem_save_pdwServerMaxVersion_0 = NDR_PULL_GET_MEM_CTX(ndr);
3568 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwServerMaxVersion, LIBNDR_FLAG_REF_ALLOC);
3569 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pdwServerMaxVersion));
3570 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwServerMaxVersion_0, LIBNDR_FLAG_REF_ALLOC);
3571 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3572 2 : NDR_PULL_ALLOC(ndr, r->out.pdwServerMinVersion);
3573 : }
3574 2 : _mem_save_pdwServerMinVersion_0 = NDR_PULL_GET_MEM_CTX(ndr);
3575 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwServerMinVersion, LIBNDR_FLAG_REF_ALLOC);
3576 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pdwServerMinVersion));
3577 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwServerMinVersion_0, LIBNDR_FLAG_REF_ALLOC);
3578 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3579 2 : if (r->out.pDriver) {
3580 2 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pDriver, r->in.cbBuf));
3581 : }
3582 : }
3583 0 : return NDR_ERR_SUCCESS;
3584 : }
3585 :
3586 6 : _PUBLIC_ void ndr_print_winspool_AsyncGetPrinterDriver(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDriver *r)
3587 : {
3588 6 : ndr_print_struct(ndr, name, "winspool_AsyncGetPrinterDriver");
3589 6 : if (r == NULL) { ndr_print_null(ndr); return; }
3590 6 : ndr->depth++;
3591 6 : if (flags & NDR_SET_VALUES) {
3592 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3593 : }
3594 6 : if (flags & NDR_IN) {
3595 4 : ndr_print_struct(ndr, "in", "winspool_AsyncGetPrinterDriver");
3596 4 : ndr->depth++;
3597 4 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
3598 4 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
3599 4 : ndr->depth++;
3600 4 : if (r->in.pEnvironment) {
3601 4 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
3602 : }
3603 4 : ndr->depth--;
3604 4 : ndr_print_uint32(ndr, "Level", r->in.Level);
3605 4 : ndr_print_ptr(ndr, "pDriver", r->in.pDriver);
3606 4 : ndr->depth++;
3607 4 : if (r->in.pDriver) {
3608 4 : ndr_print_array_uint8(ndr, "pDriver", r->in.pDriver, r->in.cbBuf);
3609 : }
3610 4 : ndr->depth--;
3611 4 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
3612 4 : ndr_print_uint32(ndr, "dwClientMajorVersion", r->in.dwClientMajorVersion);
3613 4 : ndr_print_uint32(ndr, "dwClientMinorVersion", r->in.dwClientMinorVersion);
3614 4 : ndr->depth--;
3615 : }
3616 6 : if (flags & NDR_OUT) {
3617 2 : ndr_print_struct(ndr, "out", "winspool_AsyncGetPrinterDriver");
3618 2 : ndr->depth++;
3619 2 : ndr_print_ptr(ndr, "pDriver", r->out.pDriver);
3620 2 : ndr->depth++;
3621 2 : if (r->out.pDriver) {
3622 2 : ndr_print_array_uint8(ndr, "pDriver", r->out.pDriver, r->in.cbBuf);
3623 : }
3624 2 : ndr->depth--;
3625 2 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
3626 2 : ndr->depth++;
3627 2 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
3628 2 : ndr->depth--;
3629 2 : ndr_print_ptr(ndr, "pdwServerMaxVersion", r->out.pdwServerMaxVersion);
3630 2 : ndr->depth++;
3631 2 : ndr_print_uint32(ndr, "pdwServerMaxVersion", *r->out.pdwServerMaxVersion);
3632 2 : ndr->depth--;
3633 2 : ndr_print_ptr(ndr, "pdwServerMinVersion", r->out.pdwServerMinVersion);
3634 2 : ndr->depth++;
3635 2 : ndr_print_uint32(ndr, "pdwServerMinVersion", *r->out.pdwServerMinVersion);
3636 2 : ndr->depth--;
3637 2 : ndr_print_WERROR(ndr, "result", r->out.result);
3638 2 : ndr->depth--;
3639 : }
3640 6 : ndr->depth--;
3641 : }
3642 :
3643 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumPrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterData *r)
3644 : {
3645 0 : uint32_t cntr_pValueName_1;
3646 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3647 0 : if (flags & NDR_IN) {
3648 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3649 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwIndex));
3650 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbValueName));
3651 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbData));
3652 : }
3653 0 : if (flags & NDR_OUT) {
3654 0 : if (r->out.pValueName == NULL) {
3655 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3656 : }
3657 0 : if (r->out.pcbValueName == NULL) {
3658 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3659 : }
3660 0 : if (r->out.pType == NULL) {
3661 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3662 : }
3663 0 : if (r->out.pData == NULL) {
3664 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3665 : }
3666 0 : if (r->out.pcbData == NULL) {
3667 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3668 : }
3669 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbValueName / 2));
3670 0 : for (cntr_pValueName_1 = 0; cntr_pValueName_1 < (r->in.cbValueName / 2); cntr_pValueName_1++) {
3671 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.pValueName[cntr_pValueName_1]));
3672 : }
3673 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbValueName));
3674 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pType));
3675 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbData));
3676 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pData, r->in.cbData));
3677 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbData));
3678 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3679 : }
3680 0 : return NDR_ERR_SUCCESS;
3681 : }
3682 :
3683 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumPrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPrinterData *r)
3684 : {
3685 0 : uint32_t size_pValueName_1 = 0;
3686 0 : uint32_t cntr_pValueName_1;
3687 0 : uint32_t size_pData_1 = 0;
3688 0 : TALLOC_CTX *_mem_save_pValueName_1 = NULL;
3689 0 : TALLOC_CTX *_mem_save_pcbValueName_0 = NULL;
3690 0 : TALLOC_CTX *_mem_save_pType_0 = NULL;
3691 0 : TALLOC_CTX *_mem_save_pcbData_0 = NULL;
3692 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3693 0 : if (flags & NDR_IN) {
3694 0 : NDR_ZERO_STRUCT(r->out);
3695 :
3696 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3697 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwIndex));
3698 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbValueName));
3699 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbData));
3700 0 : NDR_PULL_ALLOC_N(ndr, r->out.pValueName, r->in.cbValueName / 2);
3701 0 : memset(r->out.pValueName, 0, (r->in.cbValueName / 2) * sizeof(*r->out.pValueName));
3702 0 : NDR_PULL_ALLOC(ndr, r->out.pcbValueName);
3703 0 : NDR_ZERO_STRUCTP(r->out.pcbValueName);
3704 0 : NDR_PULL_ALLOC(ndr, r->out.pType);
3705 0 : NDR_ZERO_STRUCTP(r->out.pType);
3706 0 : NDR_PULL_ALLOC_N(ndr, r->out.pData, r->in.cbData);
3707 0 : memset(r->out.pData, 0, (r->in.cbData) * sizeof(*r->out.pData));
3708 0 : NDR_PULL_ALLOC(ndr, r->out.pcbData);
3709 0 : NDR_ZERO_STRUCTP(r->out.pcbData);
3710 : }
3711 0 : if (flags & NDR_OUT) {
3712 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3713 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3714 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pValueName));
3715 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pValueName, &size_pValueName_1));
3716 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3717 0 : NDR_PULL_ALLOC_N(ndr, r->out.pValueName, size_pValueName_1);
3718 : }
3719 0 : _mem_save_pValueName_1 = NDR_PULL_GET_MEM_CTX(ndr);
3720 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pValueName, 0);
3721 0 : for (cntr_pValueName_1 = 0; cntr_pValueName_1 < (size_pValueName_1); cntr_pValueName_1++) {
3722 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.pValueName[cntr_pValueName_1]));
3723 : }
3724 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pValueName_1, 0);
3725 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3726 0 : NDR_PULL_ALLOC(ndr, r->out.pcbValueName);
3727 : }
3728 0 : _mem_save_pcbValueName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3729 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbValueName, LIBNDR_FLAG_REF_ALLOC);
3730 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbValueName));
3731 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbValueName_0, LIBNDR_FLAG_REF_ALLOC);
3732 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3733 0 : NDR_PULL_ALLOC(ndr, r->out.pType);
3734 : }
3735 0 : _mem_save_pType_0 = NDR_PULL_GET_MEM_CTX(ndr);
3736 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pType, LIBNDR_FLAG_REF_ALLOC);
3737 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pType));
3738 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pType_0, LIBNDR_FLAG_REF_ALLOC);
3739 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pData));
3740 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pData, &size_pData_1));
3741 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3742 0 : NDR_PULL_ALLOC_N(ndr, r->out.pData, size_pData_1);
3743 : }
3744 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pData, size_pData_1));
3745 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3746 0 : NDR_PULL_ALLOC(ndr, r->out.pcbData);
3747 : }
3748 0 : _mem_save_pcbData_0 = NDR_PULL_GET_MEM_CTX(ndr);
3749 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbData, LIBNDR_FLAG_REF_ALLOC);
3750 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbData));
3751 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbData_0, LIBNDR_FLAG_REF_ALLOC);
3752 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3753 0 : if (r->out.pValueName) {
3754 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pValueName, r->in.cbValueName / 2));
3755 : }
3756 0 : if (r->out.pData) {
3757 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pData, r->in.cbData));
3758 : }
3759 : }
3760 0 : return NDR_ERR_SUCCESS;
3761 : }
3762 :
3763 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterData *r)
3764 : {
3765 0 : uint32_t cntr_pValueName_1;
3766 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPrinterData");
3767 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3768 0 : ndr->depth++;
3769 0 : if (flags & NDR_SET_VALUES) {
3770 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3771 : }
3772 0 : if (flags & NDR_IN) {
3773 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPrinterData");
3774 0 : ndr->depth++;
3775 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
3776 0 : ndr_print_uint32(ndr, "dwIndex", r->in.dwIndex);
3777 0 : ndr_print_uint32(ndr, "cbValueName", r->in.cbValueName);
3778 0 : ndr_print_uint32(ndr, "cbData", r->in.cbData);
3779 0 : ndr->depth--;
3780 : }
3781 0 : if (flags & NDR_OUT) {
3782 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPrinterData");
3783 0 : ndr->depth++;
3784 0 : ndr_print_ptr(ndr, "pValueName", r->out.pValueName);
3785 0 : ndr->depth++;
3786 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pValueName", (uint32_t)(r->in.cbValueName / 2));
3787 0 : ndr->depth++;
3788 0 : for (cntr_pValueName_1 = 0; cntr_pValueName_1 < (r->in.cbValueName / 2); cntr_pValueName_1++) {
3789 0 : ndr_print_uint16(ndr, "pValueName", r->out.pValueName[cntr_pValueName_1]);
3790 : }
3791 0 : ndr->depth--;
3792 0 : ndr->depth--;
3793 0 : ndr_print_ptr(ndr, "pcbValueName", r->out.pcbValueName);
3794 0 : ndr->depth++;
3795 0 : ndr_print_uint32(ndr, "pcbValueName", *r->out.pcbValueName);
3796 0 : ndr->depth--;
3797 0 : ndr_print_ptr(ndr, "pType", r->out.pType);
3798 0 : ndr->depth++;
3799 0 : ndr_print_uint32(ndr, "pType", *r->out.pType);
3800 0 : ndr->depth--;
3801 0 : ndr_print_ptr(ndr, "pData", r->out.pData);
3802 0 : ndr->depth++;
3803 0 : ndr_print_array_uint8(ndr, "pData", r->out.pData, r->in.cbData);
3804 0 : ndr->depth--;
3805 0 : ndr_print_ptr(ndr, "pcbData", r->out.pcbData);
3806 0 : ndr->depth++;
3807 0 : ndr_print_uint32(ndr, "pcbData", *r->out.pcbData);
3808 0 : ndr->depth--;
3809 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3810 0 : ndr->depth--;
3811 : }
3812 0 : ndr->depth--;
3813 : }
3814 :
3815 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncEnumPrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterDataEx *r)
3816 : {
3817 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3818 0 : if (flags & NDR_IN) {
3819 0 : if (r->in.pKeyName == NULL) {
3820 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3821 : }
3822 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3823 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
3824 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3825 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
3826 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pKeyName, ndr_charset_length(r->in.pKeyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3827 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbEnumValues));
3828 : }
3829 0 : if (flags & NDR_OUT) {
3830 0 : if (r->out.pEnumValues == NULL) {
3831 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3832 : }
3833 0 : if (r->out.pcbEnumValues == NULL) {
3834 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3835 : }
3836 0 : if (r->out.pnEnumValues == NULL) {
3837 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3838 : }
3839 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbEnumValues));
3840 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pEnumValues, r->in.cbEnumValues));
3841 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbEnumValues));
3842 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pnEnumValues));
3843 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3844 : }
3845 0 : return NDR_ERR_SUCCESS;
3846 : }
3847 :
3848 8 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncEnumPrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPrinterDataEx *r)
3849 : {
3850 8 : uint32_t size_pKeyName_1 = 0;
3851 8 : uint32_t length_pKeyName_1 = 0;
3852 8 : uint32_t size_pEnumValues_1 = 0;
3853 8 : TALLOC_CTX *_mem_save_pcbEnumValues_0 = NULL;
3854 8 : TALLOC_CTX *_mem_save_pnEnumValues_0 = NULL;
3855 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3856 8 : if (flags & NDR_IN) {
3857 4 : NDR_ZERO_STRUCT(r->out);
3858 :
3859 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3860 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pKeyName));
3861 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pKeyName));
3862 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pKeyName, &size_pKeyName_1));
3863 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pKeyName, &length_pKeyName_1));
3864 4 : if (length_pKeyName_1 > size_pKeyName_1) {
3865 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pKeyName_1, length_pKeyName_1);
3866 : }
3867 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pKeyName_1, sizeof(uint16_t)));
3868 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pKeyName, length_pKeyName_1, sizeof(uint16_t), CH_UTF16));
3869 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbEnumValues));
3870 4 : NDR_PULL_ALLOC_N(ndr, r->out.pEnumValues, r->in.cbEnumValues);
3871 4 : memset(r->out.pEnumValues, 0, (r->in.cbEnumValues) * sizeof(*r->out.pEnumValues));
3872 4 : NDR_PULL_ALLOC(ndr, r->out.pcbEnumValues);
3873 4 : NDR_ZERO_STRUCTP(r->out.pcbEnumValues);
3874 4 : NDR_PULL_ALLOC(ndr, r->out.pnEnumValues);
3875 4 : NDR_ZERO_STRUCTP(r->out.pnEnumValues);
3876 : }
3877 8 : if (flags & NDR_OUT) {
3878 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3879 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3880 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pEnumValues));
3881 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pEnumValues, &size_pEnumValues_1));
3882 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3883 4 : NDR_PULL_ALLOC_N(ndr, r->out.pEnumValues, size_pEnumValues_1);
3884 : }
3885 4 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pEnumValues, size_pEnumValues_1));
3886 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3887 4 : NDR_PULL_ALLOC(ndr, r->out.pcbEnumValues);
3888 : }
3889 4 : _mem_save_pcbEnumValues_0 = NDR_PULL_GET_MEM_CTX(ndr);
3890 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbEnumValues, LIBNDR_FLAG_REF_ALLOC);
3891 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbEnumValues));
3892 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbEnumValues_0, LIBNDR_FLAG_REF_ALLOC);
3893 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3894 4 : NDR_PULL_ALLOC(ndr, r->out.pnEnumValues);
3895 : }
3896 4 : _mem_save_pnEnumValues_0 = NDR_PULL_GET_MEM_CTX(ndr);
3897 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pnEnumValues, LIBNDR_FLAG_REF_ALLOC);
3898 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pnEnumValues));
3899 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pnEnumValues_0, LIBNDR_FLAG_REF_ALLOC);
3900 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3901 4 : if (r->out.pEnumValues) {
3902 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pEnumValues, r->in.cbEnumValues));
3903 : }
3904 : }
3905 0 : return NDR_ERR_SUCCESS;
3906 : }
3907 :
3908 8 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterDataEx *r)
3909 : {
3910 8 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPrinterDataEx");
3911 8 : if (r == NULL) { ndr_print_null(ndr); return; }
3912 8 : ndr->depth++;
3913 8 : if (flags & NDR_SET_VALUES) {
3914 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3915 : }
3916 8 : if (flags & NDR_IN) {
3917 4 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPrinterDataEx");
3918 4 : ndr->depth++;
3919 4 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
3920 4 : ndr_print_ptr(ndr, "pKeyName", r->in.pKeyName);
3921 4 : ndr->depth++;
3922 4 : ndr_print_string(ndr, "pKeyName", r->in.pKeyName);
3923 4 : ndr->depth--;
3924 4 : ndr_print_uint32(ndr, "cbEnumValues", r->in.cbEnumValues);
3925 4 : ndr->depth--;
3926 : }
3927 8 : if (flags & NDR_OUT) {
3928 4 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPrinterDataEx");
3929 4 : ndr->depth++;
3930 4 : ndr_print_ptr(ndr, "pEnumValues", r->out.pEnumValues);
3931 4 : ndr->depth++;
3932 4 : ndr_print_array_uint8(ndr, "pEnumValues", r->out.pEnumValues, r->in.cbEnumValues);
3933 4 : ndr->depth--;
3934 4 : ndr_print_ptr(ndr, "pcbEnumValues", r->out.pcbEnumValues);
3935 4 : ndr->depth++;
3936 4 : ndr_print_uint32(ndr, "pcbEnumValues", *r->out.pcbEnumValues);
3937 4 : ndr->depth--;
3938 4 : ndr_print_ptr(ndr, "pnEnumValues", r->out.pnEnumValues);
3939 4 : ndr->depth++;
3940 4 : ndr_print_uint32(ndr, "pnEnumValues", *r->out.pnEnumValues);
3941 4 : ndr->depth--;
3942 4 : ndr_print_WERROR(ndr, "result", r->out.result);
3943 4 : ndr->depth--;
3944 : }
3945 8 : ndr->depth--;
3946 : }
3947 :
3948 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncEnumPrinterKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterKey *r)
3949 : {
3950 0 : uint32_t cntr_pSubkey_1;
3951 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3952 0 : if (flags & NDR_IN) {
3953 0 : if (r->in.pKeyName == NULL) {
3954 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3955 : }
3956 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3957 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
3958 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3959 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
3960 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pKeyName, ndr_charset_length(r->in.pKeyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3961 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbSubkey));
3962 : }
3963 0 : if (flags & NDR_OUT) {
3964 0 : if (r->out.pSubkey == NULL) {
3965 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3966 : }
3967 0 : if (r->out.pcbSubkey == NULL) {
3968 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3969 : }
3970 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbSubkey / 2));
3971 0 : for (cntr_pSubkey_1 = 0; cntr_pSubkey_1 < (r->in.cbSubkey / 2); cntr_pSubkey_1++) {
3972 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.pSubkey[cntr_pSubkey_1]));
3973 : }
3974 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbSubkey));
3975 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3976 : }
3977 0 : return NDR_ERR_SUCCESS;
3978 : }
3979 :
3980 8 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncEnumPrinterKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPrinterKey *r)
3981 : {
3982 8 : uint32_t size_pKeyName_1 = 0;
3983 8 : uint32_t length_pKeyName_1 = 0;
3984 8 : uint32_t size_pSubkey_1 = 0;
3985 8 : uint32_t cntr_pSubkey_1;
3986 8 : TALLOC_CTX *_mem_save_pSubkey_1 = NULL;
3987 8 : TALLOC_CTX *_mem_save_pcbSubkey_0 = NULL;
3988 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3989 8 : if (flags & NDR_IN) {
3990 4 : NDR_ZERO_STRUCT(r->out);
3991 :
3992 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
3993 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pKeyName));
3994 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pKeyName));
3995 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pKeyName, &size_pKeyName_1));
3996 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pKeyName, &length_pKeyName_1));
3997 4 : if (length_pKeyName_1 > size_pKeyName_1) {
3998 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pKeyName_1, length_pKeyName_1);
3999 : }
4000 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pKeyName_1, sizeof(uint16_t)));
4001 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pKeyName, length_pKeyName_1, sizeof(uint16_t), CH_UTF16));
4002 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbSubkey));
4003 4 : NDR_PULL_ALLOC_N(ndr, r->out.pSubkey, r->in.cbSubkey / 2);
4004 4 : memset(r->out.pSubkey, 0, (r->in.cbSubkey / 2) * sizeof(*r->out.pSubkey));
4005 4 : NDR_PULL_ALLOC(ndr, r->out.pcbSubkey);
4006 4 : NDR_ZERO_STRUCTP(r->out.pcbSubkey);
4007 : }
4008 8 : if (flags & NDR_OUT) {
4009 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4010 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4011 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pSubkey));
4012 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pSubkey, &size_pSubkey_1));
4013 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4014 4 : NDR_PULL_ALLOC_N(ndr, r->out.pSubkey, size_pSubkey_1);
4015 : }
4016 4 : _mem_save_pSubkey_1 = NDR_PULL_GET_MEM_CTX(ndr);
4017 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pSubkey, 0);
4018 4 : for (cntr_pSubkey_1 = 0; cntr_pSubkey_1 < (size_pSubkey_1); cntr_pSubkey_1++) {
4019 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.pSubkey[cntr_pSubkey_1]));
4020 : }
4021 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pSubkey_1, 0);
4022 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4023 4 : NDR_PULL_ALLOC(ndr, r->out.pcbSubkey);
4024 : }
4025 4 : _mem_save_pcbSubkey_0 = NDR_PULL_GET_MEM_CTX(ndr);
4026 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbSubkey, LIBNDR_FLAG_REF_ALLOC);
4027 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbSubkey));
4028 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbSubkey_0, LIBNDR_FLAG_REF_ALLOC);
4029 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4030 4 : if (r->out.pSubkey) {
4031 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pSubkey, r->in.cbSubkey / 2));
4032 : }
4033 : }
4034 0 : return NDR_ERR_SUCCESS;
4035 : }
4036 :
4037 8 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPrinterKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterKey *r)
4038 : {
4039 8 : uint32_t cntr_pSubkey_1;
4040 8 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPrinterKey");
4041 8 : if (r == NULL) { ndr_print_null(ndr); return; }
4042 8 : ndr->depth++;
4043 8 : if (flags & NDR_SET_VALUES) {
4044 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4045 : }
4046 8 : if (flags & NDR_IN) {
4047 4 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPrinterKey");
4048 4 : ndr->depth++;
4049 4 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
4050 4 : ndr_print_ptr(ndr, "pKeyName", r->in.pKeyName);
4051 4 : ndr->depth++;
4052 4 : ndr_print_string(ndr, "pKeyName", r->in.pKeyName);
4053 4 : ndr->depth--;
4054 4 : ndr_print_uint32(ndr, "cbSubkey", r->in.cbSubkey);
4055 4 : ndr->depth--;
4056 : }
4057 8 : if (flags & NDR_OUT) {
4058 4 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPrinterKey");
4059 4 : ndr->depth++;
4060 4 : ndr_print_ptr(ndr, "pSubkey", r->out.pSubkey);
4061 4 : ndr->depth++;
4062 4 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pSubkey", (uint32_t)(r->in.cbSubkey / 2));
4063 4 : ndr->depth++;
4064 4 : for (cntr_pSubkey_1 = 0; cntr_pSubkey_1 < (r->in.cbSubkey / 2); cntr_pSubkey_1++) {
4065 0 : ndr_print_uint16(ndr, "pSubkey", r->out.pSubkey[cntr_pSubkey_1]);
4066 : }
4067 4 : ndr->depth--;
4068 4 : ndr->depth--;
4069 4 : ndr_print_ptr(ndr, "pcbSubkey", r->out.pcbSubkey);
4070 4 : ndr->depth++;
4071 4 : ndr_print_uint32(ndr, "pcbSubkey", *r->out.pcbSubkey);
4072 4 : ndr->depth--;
4073 4 : ndr_print_WERROR(ndr, "result", r->out.result);
4074 4 : ndr->depth--;
4075 : }
4076 8 : ndr->depth--;
4077 : }
4078 :
4079 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinterData(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterData *r)
4080 : {
4081 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4082 0 : if (flags & NDR_IN) {
4083 0 : if (r->in.pValueName == NULL) {
4084 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4085 : }
4086 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4087 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
4088 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4089 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
4090 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pValueName, ndr_charset_length(r->in.pValueName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4091 : }
4092 0 : if (flags & NDR_OUT) {
4093 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4094 : }
4095 0 : return NDR_ERR_SUCCESS;
4096 : }
4097 :
4098 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinterData(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinterData *r)
4099 : {
4100 0 : uint32_t size_pValueName_1 = 0;
4101 0 : uint32_t length_pValueName_1 = 0;
4102 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4103 0 : if (flags & NDR_IN) {
4104 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4105 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pValueName));
4106 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pValueName));
4107 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pValueName, &size_pValueName_1));
4108 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pValueName, &length_pValueName_1));
4109 0 : if (length_pValueName_1 > size_pValueName_1) {
4110 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pValueName_1, length_pValueName_1);
4111 : }
4112 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pValueName_1, sizeof(uint16_t)));
4113 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pValueName, length_pValueName_1, sizeof(uint16_t), CH_UTF16));
4114 : }
4115 0 : if (flags & NDR_OUT) {
4116 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4117 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4118 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4119 : }
4120 0 : return NDR_ERR_SUCCESS;
4121 : }
4122 :
4123 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinterData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterData *r)
4124 : {
4125 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinterData");
4126 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4127 0 : ndr->depth++;
4128 0 : if (flags & NDR_SET_VALUES) {
4129 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4130 : }
4131 0 : if (flags & NDR_IN) {
4132 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinterData");
4133 0 : ndr->depth++;
4134 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
4135 0 : ndr_print_ptr(ndr, "pValueName", r->in.pValueName);
4136 0 : ndr->depth++;
4137 0 : ndr_print_string(ndr, "pValueName", r->in.pValueName);
4138 0 : ndr->depth--;
4139 0 : ndr->depth--;
4140 : }
4141 0 : if (flags & NDR_OUT) {
4142 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinterData");
4143 0 : ndr->depth++;
4144 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4145 0 : ndr->depth--;
4146 : }
4147 0 : ndr->depth--;
4148 : }
4149 :
4150 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinterDataEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDataEx *r)
4151 : {
4152 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4153 0 : if (flags & NDR_IN) {
4154 0 : if (r->in.pKeyName == NULL) {
4155 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4156 : }
4157 0 : if (r->in.pValueName == NULL) {
4158 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4159 : }
4160 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4161 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
4162 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4163 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
4164 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pKeyName, ndr_charset_length(r->in.pKeyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4165 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
4166 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4167 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pValueName, CH_UTF16)));
4168 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pValueName, ndr_charset_length(r->in.pValueName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4169 : }
4170 0 : if (flags & NDR_OUT) {
4171 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4172 : }
4173 0 : return NDR_ERR_SUCCESS;
4174 : }
4175 :
4176 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinterDataEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinterDataEx *r)
4177 : {
4178 0 : uint32_t size_pKeyName_1 = 0;
4179 0 : uint32_t length_pKeyName_1 = 0;
4180 0 : uint32_t size_pValueName_1 = 0;
4181 0 : uint32_t length_pValueName_1 = 0;
4182 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4183 0 : if (flags & NDR_IN) {
4184 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4185 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pKeyName));
4186 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pKeyName));
4187 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pKeyName, &size_pKeyName_1));
4188 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pKeyName, &length_pKeyName_1));
4189 0 : if (length_pKeyName_1 > size_pKeyName_1) {
4190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pKeyName_1, length_pKeyName_1);
4191 : }
4192 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pKeyName_1, sizeof(uint16_t)));
4193 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pKeyName, length_pKeyName_1, sizeof(uint16_t), CH_UTF16));
4194 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pValueName));
4195 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pValueName));
4196 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pValueName, &size_pValueName_1));
4197 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pValueName, &length_pValueName_1));
4198 0 : if (length_pValueName_1 > size_pValueName_1) {
4199 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pValueName_1, length_pValueName_1);
4200 : }
4201 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pValueName_1, sizeof(uint16_t)));
4202 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pValueName, length_pValueName_1, sizeof(uint16_t), CH_UTF16));
4203 : }
4204 0 : if (flags & NDR_OUT) {
4205 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4206 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4207 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4208 : }
4209 0 : return NDR_ERR_SUCCESS;
4210 : }
4211 :
4212 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinterDataEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDataEx *r)
4213 : {
4214 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinterDataEx");
4215 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4216 0 : ndr->depth++;
4217 0 : if (flags & NDR_SET_VALUES) {
4218 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4219 : }
4220 0 : if (flags & NDR_IN) {
4221 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinterDataEx");
4222 0 : ndr->depth++;
4223 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
4224 0 : ndr_print_ptr(ndr, "pKeyName", r->in.pKeyName);
4225 0 : ndr->depth++;
4226 0 : ndr_print_string(ndr, "pKeyName", r->in.pKeyName);
4227 0 : ndr->depth--;
4228 0 : ndr_print_ptr(ndr, "pValueName", r->in.pValueName);
4229 0 : ndr->depth++;
4230 0 : ndr_print_string(ndr, "pValueName", r->in.pValueName);
4231 0 : ndr->depth--;
4232 0 : ndr->depth--;
4233 : }
4234 0 : if (flags & NDR_OUT) {
4235 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinterDataEx");
4236 0 : ndr->depth++;
4237 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4238 0 : ndr->depth--;
4239 : }
4240 0 : ndr->depth--;
4241 : }
4242 :
4243 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinterKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterKey *r)
4244 : {
4245 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4246 0 : if (flags & NDR_IN) {
4247 0 : if (r->in.pKeyName == NULL) {
4248 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4249 : }
4250 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4251 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
4252 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4253 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pKeyName, CH_UTF16)));
4254 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pKeyName, ndr_charset_length(r->in.pKeyName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4255 : }
4256 0 : if (flags & NDR_OUT) {
4257 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4258 : }
4259 0 : return NDR_ERR_SUCCESS;
4260 : }
4261 :
4262 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinterKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinterKey *r)
4263 : {
4264 0 : uint32_t size_pKeyName_1 = 0;
4265 0 : uint32_t length_pKeyName_1 = 0;
4266 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4267 0 : if (flags & NDR_IN) {
4268 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4269 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pKeyName));
4270 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pKeyName));
4271 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pKeyName, &size_pKeyName_1));
4272 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pKeyName, &length_pKeyName_1));
4273 0 : if (length_pKeyName_1 > size_pKeyName_1) {
4274 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pKeyName_1, length_pKeyName_1);
4275 : }
4276 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pKeyName_1, sizeof(uint16_t)));
4277 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pKeyName, length_pKeyName_1, sizeof(uint16_t), CH_UTF16));
4278 : }
4279 0 : if (flags & NDR_OUT) {
4280 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4281 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4282 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4283 : }
4284 0 : return NDR_ERR_SUCCESS;
4285 : }
4286 :
4287 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinterKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterKey *r)
4288 : {
4289 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinterKey");
4290 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4291 0 : ndr->depth++;
4292 0 : if (flags & NDR_SET_VALUES) {
4293 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4294 : }
4295 0 : if (flags & NDR_IN) {
4296 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinterKey");
4297 0 : ndr->depth++;
4298 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
4299 0 : ndr_print_ptr(ndr, "pKeyName", r->in.pKeyName);
4300 0 : ndr->depth++;
4301 0 : ndr_print_string(ndr, "pKeyName", r->in.pKeyName);
4302 0 : ndr->depth--;
4303 0 : ndr->depth--;
4304 : }
4305 0 : if (flags & NDR_OUT) {
4306 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinterKey");
4307 0 : ndr->depth++;
4308 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4309 0 : ndr->depth--;
4310 : }
4311 0 : ndr->depth--;
4312 : }
4313 :
4314 0 : static enum ndr_err_code ndr_push_winspool_AsyncXcvData(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncXcvData *r)
4315 : {
4316 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4317 0 : if (flags & NDR_IN) {
4318 0 : if (r->in.pszDataName == NULL) {
4319 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4320 : }
4321 0 : if (r->in.pInputData == NULL) {
4322 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4323 : }
4324 0 : if (r->in.pdwStatus == NULL) {
4325 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4326 : }
4327 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hXcv));
4328 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszDataName, CH_UTF16)));
4329 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4330 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszDataName, CH_UTF16)));
4331 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszDataName, ndr_charset_length(r->in.pszDataName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4332 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbInputData));
4333 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pInputData, r->in.cbInputData));
4334 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbInputData));
4335 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbOutputData));
4336 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pdwStatus));
4337 : }
4338 0 : if (flags & NDR_OUT) {
4339 0 : if (r->out.pOutputData == NULL) {
4340 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4341 : }
4342 0 : if (r->out.pcbOutputNeeded == NULL) {
4343 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4344 : }
4345 0 : if (r->out.pdwStatus == NULL) {
4346 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4347 : }
4348 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbOutputData));
4349 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pOutputData, r->in.cbOutputData));
4350 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbOutputNeeded));
4351 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pdwStatus));
4352 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4353 : }
4354 0 : return NDR_ERR_SUCCESS;
4355 : }
4356 :
4357 0 : static enum ndr_err_code ndr_pull_winspool_AsyncXcvData(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncXcvData *r)
4358 : {
4359 0 : uint32_t size_pszDataName_1 = 0;
4360 0 : uint32_t length_pszDataName_1 = 0;
4361 0 : uint32_t size_pInputData_1 = 0;
4362 0 : uint32_t size_pOutputData_1 = 0;
4363 0 : TALLOC_CTX *_mem_save_pcbOutputNeeded_0 = NULL;
4364 0 : TALLOC_CTX *_mem_save_pdwStatus_0 = NULL;
4365 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4366 0 : if (flags & NDR_IN) {
4367 0 : NDR_ZERO_STRUCT(r->out);
4368 :
4369 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hXcv));
4370 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszDataName));
4371 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszDataName));
4372 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszDataName, &size_pszDataName_1));
4373 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszDataName, &length_pszDataName_1));
4374 0 : if (length_pszDataName_1 > size_pszDataName_1) {
4375 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDataName_1, length_pszDataName_1);
4376 : }
4377 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDataName_1, sizeof(uint16_t)));
4378 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszDataName, length_pszDataName_1, sizeof(uint16_t), CH_UTF16));
4379 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pInputData));
4380 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pInputData, &size_pInputData_1));
4381 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4382 0 : NDR_PULL_ALLOC_N(ndr, r->in.pInputData, size_pInputData_1);
4383 : }
4384 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pInputData, size_pInputData_1));
4385 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbInputData));
4386 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbOutputData));
4387 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4388 0 : NDR_PULL_ALLOC(ndr, r->in.pdwStatus);
4389 : }
4390 0 : _mem_save_pdwStatus_0 = NDR_PULL_GET_MEM_CTX(ndr);
4391 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pdwStatus, LIBNDR_FLAG_REF_ALLOC);
4392 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pdwStatus));
4393 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwStatus_0, LIBNDR_FLAG_REF_ALLOC);
4394 0 : NDR_PULL_ALLOC_N(ndr, r->out.pOutputData, r->in.cbOutputData);
4395 0 : memset(r->out.pOutputData, 0, (r->in.cbOutputData) * sizeof(*r->out.pOutputData));
4396 0 : NDR_PULL_ALLOC(ndr, r->out.pcbOutputNeeded);
4397 0 : NDR_ZERO_STRUCTP(r->out.pcbOutputNeeded);
4398 0 : NDR_PULL_ALLOC(ndr, r->out.pdwStatus);
4399 0 : *r->out.pdwStatus = *r->in.pdwStatus;
4400 0 : if (r->in.pInputData) {
4401 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pInputData, r->in.cbInputData));
4402 : }
4403 : }
4404 0 : if (flags & NDR_OUT) {
4405 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4406 : if (r->in.pdwStatus == NULL) {
4407 : NDR_PULL_ALLOC(ndr, r->in.pdwStatus);
4408 : NDR_ZERO_STRUCTP(r->in.pdwStatus);
4409 : }
4410 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4411 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pOutputData));
4412 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pOutputData, &size_pOutputData_1));
4413 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4414 0 : NDR_PULL_ALLOC_N(ndr, r->out.pOutputData, size_pOutputData_1);
4415 : }
4416 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pOutputData, size_pOutputData_1));
4417 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4418 0 : NDR_PULL_ALLOC(ndr, r->out.pcbOutputNeeded);
4419 : }
4420 0 : _mem_save_pcbOutputNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
4421 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbOutputNeeded, LIBNDR_FLAG_REF_ALLOC);
4422 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbOutputNeeded));
4423 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbOutputNeeded_0, LIBNDR_FLAG_REF_ALLOC);
4424 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4425 0 : NDR_PULL_ALLOC(ndr, r->out.pdwStatus);
4426 : }
4427 0 : _mem_save_pdwStatus_0 = NDR_PULL_GET_MEM_CTX(ndr);
4428 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pdwStatus, LIBNDR_FLAG_REF_ALLOC);
4429 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pdwStatus));
4430 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pdwStatus_0, LIBNDR_FLAG_REF_ALLOC);
4431 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4432 0 : if (r->out.pOutputData) {
4433 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pOutputData, r->in.cbOutputData));
4434 : }
4435 : }
4436 0 : return NDR_ERR_SUCCESS;
4437 : }
4438 :
4439 0 : _PUBLIC_ void ndr_print_winspool_AsyncXcvData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncXcvData *r)
4440 : {
4441 0 : ndr_print_struct(ndr, name, "winspool_AsyncXcvData");
4442 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4443 0 : ndr->depth++;
4444 0 : if (flags & NDR_SET_VALUES) {
4445 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4446 : }
4447 0 : if (flags & NDR_IN) {
4448 0 : ndr_print_struct(ndr, "in", "winspool_AsyncXcvData");
4449 0 : ndr->depth++;
4450 0 : ndr_print_policy_handle(ndr, "hXcv", &r->in.hXcv);
4451 0 : ndr_print_ptr(ndr, "pszDataName", r->in.pszDataName);
4452 0 : ndr->depth++;
4453 0 : ndr_print_string(ndr, "pszDataName", r->in.pszDataName);
4454 0 : ndr->depth--;
4455 0 : ndr_print_ptr(ndr, "pInputData", r->in.pInputData);
4456 0 : ndr->depth++;
4457 0 : ndr_print_array_uint8(ndr, "pInputData", r->in.pInputData, r->in.cbInputData);
4458 0 : ndr->depth--;
4459 0 : ndr_print_uint32(ndr, "cbInputData", r->in.cbInputData);
4460 0 : ndr_print_uint32(ndr, "cbOutputData", r->in.cbOutputData);
4461 0 : ndr_print_ptr(ndr, "pdwStatus", r->in.pdwStatus);
4462 0 : ndr->depth++;
4463 0 : ndr_print_uint32(ndr, "pdwStatus", *r->in.pdwStatus);
4464 0 : ndr->depth--;
4465 0 : ndr->depth--;
4466 : }
4467 0 : if (flags & NDR_OUT) {
4468 0 : ndr_print_struct(ndr, "out", "winspool_AsyncXcvData");
4469 0 : ndr->depth++;
4470 0 : ndr_print_ptr(ndr, "pOutputData", r->out.pOutputData);
4471 0 : ndr->depth++;
4472 0 : ndr_print_array_uint8(ndr, "pOutputData", r->out.pOutputData, r->in.cbOutputData);
4473 0 : ndr->depth--;
4474 0 : ndr_print_ptr(ndr, "pcbOutputNeeded", r->out.pcbOutputNeeded);
4475 0 : ndr->depth++;
4476 0 : ndr_print_uint32(ndr, "pcbOutputNeeded", *r->out.pcbOutputNeeded);
4477 0 : ndr->depth--;
4478 0 : ndr_print_ptr(ndr, "pdwStatus", r->out.pdwStatus);
4479 0 : ndr->depth++;
4480 0 : ndr_print_uint32(ndr, "pdwStatus", *r->out.pdwStatus);
4481 0 : ndr->depth--;
4482 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4483 0 : ndr->depth--;
4484 : }
4485 0 : ndr->depth--;
4486 : }
4487 :
4488 0 : static enum ndr_err_code ndr_push_winspool_AsyncSendRecvBidiData(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSendRecvBidiData *r)
4489 : {
4490 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4491 0 : if (flags & NDR_IN) {
4492 0 : if (r->in.pReqData == NULL) {
4493 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4494 : }
4495 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4496 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pAction));
4497 0 : if (r->in.pAction) {
4498 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pAction, CH_UTF16)));
4499 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4500 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pAction, CH_UTF16)));
4501 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pAction, ndr_charset_length(r->in.pAction, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4502 : }
4503 0 : NDR_CHECK(ndr_push_RPC_BIDI_REQUEST_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pReqData));
4504 : }
4505 0 : if (flags & NDR_OUT) {
4506 0 : if (r->out.ppRespData == NULL) {
4507 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4508 : }
4509 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ppRespData));
4510 0 : if (*r->out.ppRespData) {
4511 0 : NDR_CHECK(ndr_push_RPC_BIDI_RESPONSE_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppRespData));
4512 : }
4513 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4514 : }
4515 0 : return NDR_ERR_SUCCESS;
4516 : }
4517 :
4518 0 : static enum ndr_err_code ndr_pull_winspool_AsyncSendRecvBidiData(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSendRecvBidiData *r)
4519 : {
4520 0 : uint32_t _ptr_pAction;
4521 0 : uint32_t size_pAction_1 = 0;
4522 0 : uint32_t length_pAction_1 = 0;
4523 0 : uint32_t _ptr_ppRespData;
4524 0 : TALLOC_CTX *_mem_save_pAction_0 = NULL;
4525 0 : TALLOC_CTX *_mem_save_pReqData_0 = NULL;
4526 0 : TALLOC_CTX *_mem_save_ppRespData_0 = NULL;
4527 0 : TALLOC_CTX *_mem_save_ppRespData_1 = NULL;
4528 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4529 0 : if (flags & NDR_IN) {
4530 0 : NDR_ZERO_STRUCT(r->out);
4531 :
4532 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4533 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pAction));
4534 0 : if (_ptr_pAction) {
4535 0 : NDR_PULL_ALLOC(ndr, r->in.pAction);
4536 : } else {
4537 0 : r->in.pAction = NULL;
4538 : }
4539 0 : if (r->in.pAction) {
4540 0 : _mem_save_pAction_0 = NDR_PULL_GET_MEM_CTX(ndr);
4541 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pAction, 0);
4542 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pAction));
4543 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pAction));
4544 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pAction, &size_pAction_1));
4545 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pAction, &length_pAction_1));
4546 0 : if (length_pAction_1 > size_pAction_1) {
4547 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pAction_1, length_pAction_1);
4548 : }
4549 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pAction_1, sizeof(uint16_t)));
4550 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pAction, length_pAction_1, sizeof(uint16_t), CH_UTF16));
4551 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pAction_0, 0);
4552 : }
4553 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4554 0 : NDR_PULL_ALLOC(ndr, r->in.pReqData);
4555 : }
4556 0 : _mem_save_pReqData_0 = NDR_PULL_GET_MEM_CTX(ndr);
4557 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pReqData, LIBNDR_FLAG_REF_ALLOC);
4558 0 : NDR_CHECK(ndr_pull_RPC_BIDI_REQUEST_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pReqData));
4559 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReqData_0, LIBNDR_FLAG_REF_ALLOC);
4560 0 : NDR_PULL_ALLOC(ndr, r->out.ppRespData);
4561 0 : NDR_ZERO_STRUCTP(r->out.ppRespData);
4562 : }
4563 0 : if (flags & NDR_OUT) {
4564 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4565 : if (r->in.pReqData == NULL) {
4566 : NDR_PULL_ALLOC(ndr, r->in.pReqData);
4567 : NDR_ZERO_STRUCTP(r->in.pReqData);
4568 : }
4569 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4570 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4571 0 : NDR_PULL_ALLOC(ndr, r->out.ppRespData);
4572 : }
4573 0 : _mem_save_ppRespData_0 = NDR_PULL_GET_MEM_CTX(ndr);
4574 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppRespData, LIBNDR_FLAG_REF_ALLOC);
4575 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppRespData));
4576 0 : if (_ptr_ppRespData) {
4577 0 : NDR_PULL_ALLOC(ndr, *r->out.ppRespData);
4578 : } else {
4579 0 : *r->out.ppRespData = NULL;
4580 : }
4581 0 : if (*r->out.ppRespData) {
4582 0 : _mem_save_ppRespData_1 = NDR_PULL_GET_MEM_CTX(ndr);
4583 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppRespData, 0);
4584 0 : NDR_CHECK(ndr_pull_RPC_BIDI_RESPONSE_CONTAINER(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppRespData));
4585 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppRespData_1, 0);
4586 : }
4587 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppRespData_0, LIBNDR_FLAG_REF_ALLOC);
4588 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4589 : }
4590 0 : return NDR_ERR_SUCCESS;
4591 : }
4592 :
4593 0 : _PUBLIC_ void ndr_print_winspool_AsyncSendRecvBidiData(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSendRecvBidiData *r)
4594 : {
4595 0 : ndr_print_struct(ndr, name, "winspool_AsyncSendRecvBidiData");
4596 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4597 0 : ndr->depth++;
4598 0 : if (flags & NDR_SET_VALUES) {
4599 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4600 : }
4601 0 : if (flags & NDR_IN) {
4602 0 : ndr_print_struct(ndr, "in", "winspool_AsyncSendRecvBidiData");
4603 0 : ndr->depth++;
4604 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
4605 0 : ndr_print_ptr(ndr, "pAction", r->in.pAction);
4606 0 : ndr->depth++;
4607 0 : if (r->in.pAction) {
4608 0 : ndr_print_string(ndr, "pAction", r->in.pAction);
4609 : }
4610 0 : ndr->depth--;
4611 0 : ndr_print_ptr(ndr, "pReqData", r->in.pReqData);
4612 0 : ndr->depth++;
4613 0 : ndr_print_RPC_BIDI_REQUEST_CONTAINER(ndr, "pReqData", r->in.pReqData);
4614 0 : ndr->depth--;
4615 0 : ndr->depth--;
4616 : }
4617 0 : if (flags & NDR_OUT) {
4618 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSendRecvBidiData");
4619 0 : ndr->depth++;
4620 0 : ndr_print_ptr(ndr, "ppRespData", r->out.ppRespData);
4621 0 : ndr->depth++;
4622 0 : ndr_print_ptr(ndr, "ppRespData", *r->out.ppRespData);
4623 0 : ndr->depth++;
4624 0 : if (*r->out.ppRespData) {
4625 0 : ndr_print_RPC_BIDI_RESPONSE_CONTAINER(ndr, "ppRespData", *r->out.ppRespData);
4626 : }
4627 0 : ndr->depth--;
4628 0 : ndr->depth--;
4629 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4630 0 : ndr->depth--;
4631 : }
4632 0 : ndr->depth--;
4633 : }
4634 :
4635 0 : static enum ndr_err_code ndr_push_winspool_AsyncCreatePrinterIC(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncCreatePrinterIC *r)
4636 : {
4637 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4638 0 : if (flags & NDR_IN) {
4639 0 : if (r->in.pDevModeContainer == NULL) {
4640 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4641 : }
4642 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4643 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
4644 : }
4645 0 : if (flags & NDR_OUT) {
4646 0 : if (r->out.pHandle == NULL) {
4647 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4648 : }
4649 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.pHandle));
4650 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4651 : }
4652 0 : return NDR_ERR_SUCCESS;
4653 : }
4654 :
4655 0 : static enum ndr_err_code ndr_pull_winspool_AsyncCreatePrinterIC(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncCreatePrinterIC *r)
4656 : {
4657 0 : TALLOC_CTX *_mem_save_pHandle_0 = NULL;
4658 0 : TALLOC_CTX *_mem_save_pDevModeContainer_0 = NULL;
4659 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4660 0 : if (flags & NDR_IN) {
4661 0 : NDR_ZERO_STRUCT(r->out);
4662 :
4663 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
4664 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4665 0 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
4666 : }
4667 0 : _mem_save_pDevModeContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
4668 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDevModeContainer, LIBNDR_FLAG_REF_ALLOC);
4669 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
4670 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDevModeContainer_0, LIBNDR_FLAG_REF_ALLOC);
4671 0 : NDR_PULL_ALLOC(ndr, r->out.pHandle);
4672 0 : NDR_ZERO_STRUCTP(r->out.pHandle);
4673 : }
4674 0 : if (flags & NDR_OUT) {
4675 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4676 : if (r->in.pDevModeContainer == NULL) {
4677 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
4678 : NDR_ZERO_STRUCTP(r->in.pDevModeContainer);
4679 : }
4680 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4681 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4682 0 : NDR_PULL_ALLOC(ndr, r->out.pHandle);
4683 : }
4684 0 : _mem_save_pHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4685 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pHandle, LIBNDR_FLAG_REF_ALLOC);
4686 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.pHandle));
4687 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pHandle_0, LIBNDR_FLAG_REF_ALLOC);
4688 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4689 : }
4690 0 : return NDR_ERR_SUCCESS;
4691 : }
4692 :
4693 0 : _PUBLIC_ void ndr_print_winspool_AsyncCreatePrinterIC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncCreatePrinterIC *r)
4694 : {
4695 0 : ndr_print_struct(ndr, name, "winspool_AsyncCreatePrinterIC");
4696 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4697 0 : ndr->depth++;
4698 0 : if (flags & NDR_SET_VALUES) {
4699 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4700 : }
4701 0 : if (flags & NDR_IN) {
4702 0 : ndr_print_struct(ndr, "in", "winspool_AsyncCreatePrinterIC");
4703 0 : ndr->depth++;
4704 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
4705 0 : ndr_print_ptr(ndr, "pDevModeContainer", r->in.pDevModeContainer);
4706 0 : ndr->depth++;
4707 0 : ndr_print_spoolss_DevmodeContainer(ndr, "pDevModeContainer", r->in.pDevModeContainer);
4708 0 : ndr->depth--;
4709 0 : ndr->depth--;
4710 : }
4711 0 : if (flags & NDR_OUT) {
4712 0 : ndr_print_struct(ndr, "out", "winspool_AsyncCreatePrinterIC");
4713 0 : ndr->depth++;
4714 0 : ndr_print_ptr(ndr, "pHandle", r->out.pHandle);
4715 0 : ndr->depth++;
4716 0 : ndr_print_policy_handle(ndr, "pHandle", r->out.pHandle);
4717 0 : ndr->depth--;
4718 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4719 0 : ndr->depth--;
4720 : }
4721 0 : ndr->depth--;
4722 : }
4723 :
4724 0 : static enum ndr_err_code ndr_push_winspool_AsyncPlayGdiScriptOnPrinterIC(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncPlayGdiScriptOnPrinterIC *r)
4725 : {
4726 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4727 0 : if (flags & NDR_IN) {
4728 0 : if (r->in.pIn == NULL) {
4729 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4730 : }
4731 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinterIC));
4732 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cIn));
4733 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pIn, r->in.cIn));
4734 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cIn));
4735 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cOut));
4736 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ul));
4737 : }
4738 0 : if (flags & NDR_OUT) {
4739 0 : if (r->out.pOut == NULL) {
4740 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4741 : }
4742 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cOut));
4743 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pOut, r->in.cOut));
4744 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4745 : }
4746 0 : return NDR_ERR_SUCCESS;
4747 : }
4748 :
4749 0 : static enum ndr_err_code ndr_pull_winspool_AsyncPlayGdiScriptOnPrinterIC(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncPlayGdiScriptOnPrinterIC *r)
4750 : {
4751 0 : uint32_t size_pIn_1 = 0;
4752 0 : uint32_t size_pOut_1 = 0;
4753 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4754 0 : if (flags & NDR_IN) {
4755 0 : NDR_ZERO_STRUCT(r->out);
4756 :
4757 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinterIC));
4758 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pIn));
4759 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pIn, &size_pIn_1));
4760 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4761 0 : NDR_PULL_ALLOC_N(ndr, r->in.pIn, size_pIn_1);
4762 : }
4763 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pIn, size_pIn_1));
4764 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cIn));
4765 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cOut));
4766 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ul));
4767 0 : NDR_PULL_ALLOC_N(ndr, r->out.pOut, r->in.cOut);
4768 0 : memset(r->out.pOut, 0, (r->in.cOut) * sizeof(*r->out.pOut));
4769 0 : if (r->in.pIn) {
4770 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pIn, r->in.cIn));
4771 : }
4772 : }
4773 0 : if (flags & NDR_OUT) {
4774 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4775 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4776 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pOut));
4777 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pOut, &size_pOut_1));
4778 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4779 0 : NDR_PULL_ALLOC_N(ndr, r->out.pOut, size_pOut_1);
4780 : }
4781 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pOut, size_pOut_1));
4782 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4783 0 : if (r->out.pOut) {
4784 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pOut, r->in.cOut));
4785 : }
4786 : }
4787 0 : return NDR_ERR_SUCCESS;
4788 : }
4789 :
4790 0 : _PUBLIC_ void ndr_print_winspool_AsyncPlayGdiScriptOnPrinterIC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncPlayGdiScriptOnPrinterIC *r)
4791 : {
4792 0 : ndr_print_struct(ndr, name, "winspool_AsyncPlayGdiScriptOnPrinterIC");
4793 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4794 0 : ndr->depth++;
4795 0 : if (flags & NDR_SET_VALUES) {
4796 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4797 : }
4798 0 : if (flags & NDR_IN) {
4799 0 : ndr_print_struct(ndr, "in", "winspool_AsyncPlayGdiScriptOnPrinterIC");
4800 0 : ndr->depth++;
4801 0 : ndr_print_policy_handle(ndr, "hPrinterIC", &r->in.hPrinterIC);
4802 0 : ndr_print_ptr(ndr, "pIn", r->in.pIn);
4803 0 : ndr->depth++;
4804 0 : ndr_print_array_uint8(ndr, "pIn", r->in.pIn, r->in.cIn);
4805 0 : ndr->depth--;
4806 0 : ndr_print_uint32(ndr, "cIn", r->in.cIn);
4807 0 : ndr_print_uint32(ndr, "cOut", r->in.cOut);
4808 0 : ndr_print_uint32(ndr, "ul", r->in.ul);
4809 0 : ndr->depth--;
4810 : }
4811 0 : if (flags & NDR_OUT) {
4812 0 : ndr_print_struct(ndr, "out", "winspool_AsyncPlayGdiScriptOnPrinterIC");
4813 0 : ndr->depth++;
4814 0 : ndr_print_ptr(ndr, "pOut", r->out.pOut);
4815 0 : ndr->depth++;
4816 0 : ndr_print_array_uint8(ndr, "pOut", r->out.pOut, r->in.cOut);
4817 0 : ndr->depth--;
4818 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4819 0 : ndr->depth--;
4820 : }
4821 0 : ndr->depth--;
4822 : }
4823 :
4824 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinterIC(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterIC *r)
4825 : {
4826 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4827 0 : if (flags & NDR_IN) {
4828 0 : if (r->in.phPrinterIC == NULL) {
4829 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4830 : }
4831 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.phPrinterIC));
4832 : }
4833 0 : if (flags & NDR_OUT) {
4834 0 : if (r->out.phPrinterIC == NULL) {
4835 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4836 : }
4837 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.phPrinterIC));
4838 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4839 : }
4840 0 : return NDR_ERR_SUCCESS;
4841 : }
4842 :
4843 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinterIC(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinterIC *r)
4844 : {
4845 0 : TALLOC_CTX *_mem_save_phPrinterIC_0 = NULL;
4846 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4847 0 : if (flags & NDR_IN) {
4848 0 : NDR_ZERO_STRUCT(r->out);
4849 :
4850 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4851 0 : NDR_PULL_ALLOC(ndr, r->in.phPrinterIC);
4852 : }
4853 0 : _mem_save_phPrinterIC_0 = NDR_PULL_GET_MEM_CTX(ndr);
4854 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.phPrinterIC, LIBNDR_FLAG_REF_ALLOC);
4855 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.phPrinterIC));
4856 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phPrinterIC_0, LIBNDR_FLAG_REF_ALLOC);
4857 0 : NDR_PULL_ALLOC(ndr, r->out.phPrinterIC);
4858 0 : *r->out.phPrinterIC = *r->in.phPrinterIC;
4859 : }
4860 0 : if (flags & NDR_OUT) {
4861 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4862 : if (r->in.phPrinterIC == NULL) {
4863 : NDR_PULL_ALLOC(ndr, r->in.phPrinterIC);
4864 : NDR_ZERO_STRUCTP(r->in.phPrinterIC);
4865 : }
4866 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4867 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4868 0 : NDR_PULL_ALLOC(ndr, r->out.phPrinterIC);
4869 : }
4870 0 : _mem_save_phPrinterIC_0 = NDR_PULL_GET_MEM_CTX(ndr);
4871 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.phPrinterIC, LIBNDR_FLAG_REF_ALLOC);
4872 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.phPrinterIC));
4873 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phPrinterIC_0, LIBNDR_FLAG_REF_ALLOC);
4874 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4875 : }
4876 0 : return NDR_ERR_SUCCESS;
4877 : }
4878 :
4879 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinterIC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterIC *r)
4880 : {
4881 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinterIC");
4882 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4883 0 : ndr->depth++;
4884 0 : if (flags & NDR_SET_VALUES) {
4885 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4886 : }
4887 0 : if (flags & NDR_IN) {
4888 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinterIC");
4889 0 : ndr->depth++;
4890 0 : ndr_print_ptr(ndr, "phPrinterIC", r->in.phPrinterIC);
4891 0 : ndr->depth++;
4892 0 : ndr_print_policy_handle(ndr, "phPrinterIC", r->in.phPrinterIC);
4893 0 : ndr->depth--;
4894 0 : ndr->depth--;
4895 : }
4896 0 : if (flags & NDR_OUT) {
4897 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinterIC");
4898 0 : ndr->depth++;
4899 0 : ndr_print_ptr(ndr, "phPrinterIC", r->out.phPrinterIC);
4900 0 : ndr->depth++;
4901 0 : ndr_print_policy_handle(ndr, "phPrinterIC", r->out.phPrinterIC);
4902 0 : ndr->depth--;
4903 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4904 0 : ndr->depth--;
4905 : }
4906 0 : ndr->depth--;
4907 : }
4908 :
4909 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumPrinters(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPrinters *r)
4910 : {
4911 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4912 0 : if (flags & NDR_IN) {
4913 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Flags));
4914 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
4915 0 : if (r->in.pName) {
4916 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
4917 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4918 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
4919 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4920 : }
4921 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
4922 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPrinterEnum));
4923 0 : if (r->in.pPrinterEnum) {
4924 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
4925 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pPrinterEnum, r->in.cbBuf));
4926 : }
4927 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
4928 : }
4929 0 : if (flags & NDR_OUT) {
4930 0 : if (r->out.pcbNeeded == NULL) {
4931 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4932 : }
4933 0 : if (r->out.pcReturned == NULL) {
4934 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4935 : }
4936 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pPrinterEnum));
4937 0 : if (r->out.pPrinterEnum) {
4938 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
4939 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pPrinterEnum, r->in.cbBuf));
4940 : }
4941 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
4942 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
4943 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4944 : }
4945 0 : return NDR_ERR_SUCCESS;
4946 : }
4947 :
4948 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumPrinters(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPrinters *r)
4949 : {
4950 0 : uint32_t _ptr_pName;
4951 0 : uint32_t size_pName_1 = 0;
4952 0 : uint32_t length_pName_1 = 0;
4953 0 : uint32_t _ptr_pPrinterEnum;
4954 0 : uint32_t size_pPrinterEnum_1 = 0;
4955 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
4956 0 : TALLOC_CTX *_mem_save_pPrinterEnum_0 = NULL;
4957 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
4958 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
4959 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4960 0 : if (flags & NDR_IN) {
4961 0 : NDR_ZERO_STRUCT(r->out);
4962 :
4963 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Flags));
4964 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
4965 0 : if (_ptr_pName) {
4966 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
4967 : } else {
4968 0 : r->in.pName = NULL;
4969 : }
4970 0 : if (r->in.pName) {
4971 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4972 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
4973 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
4974 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
4975 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
4976 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
4977 0 : if (length_pName_1 > size_pName_1) {
4978 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
4979 : }
4980 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
4981 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
4982 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
4983 : }
4984 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
4985 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterEnum));
4986 0 : if (_ptr_pPrinterEnum) {
4987 0 : NDR_PULL_ALLOC(ndr, r->in.pPrinterEnum);
4988 : } else {
4989 0 : r->in.pPrinterEnum = NULL;
4990 : }
4991 0 : if (r->in.pPrinterEnum) {
4992 0 : _mem_save_pPrinterEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
4993 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrinterEnum, 0);
4994 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrinterEnum));
4995 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pPrinterEnum, &size_pPrinterEnum_1));
4996 0 : NDR_PULL_ALLOC_N(ndr, r->in.pPrinterEnum, size_pPrinterEnum_1);
4997 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pPrinterEnum, size_pPrinterEnum_1));
4998 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterEnum_0, 0);
4999 : }
5000 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
5001 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
5002 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
5003 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
5004 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
5005 0 : if (r->in.pPrinterEnum) {
5006 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pPrinterEnum, r->in.cbBuf));
5007 : }
5008 : }
5009 0 : if (flags & NDR_OUT) {
5010 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5011 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5012 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterEnum));
5013 0 : if (_ptr_pPrinterEnum) {
5014 0 : NDR_PULL_ALLOC(ndr, r->out.pPrinterEnum);
5015 : } else {
5016 0 : r->out.pPrinterEnum = NULL;
5017 : }
5018 0 : if (r->out.pPrinterEnum) {
5019 0 : _mem_save_pPrinterEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
5020 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pPrinterEnum, 0);
5021 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pPrinterEnum));
5022 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pPrinterEnum, &size_pPrinterEnum_1));
5023 0 : NDR_PULL_ALLOC_N(ndr, r->out.pPrinterEnum, size_pPrinterEnum_1);
5024 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pPrinterEnum, size_pPrinterEnum_1));
5025 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterEnum_0, 0);
5026 : }
5027 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5028 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
5029 : }
5030 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
5031 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
5032 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
5033 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
5034 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5035 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
5036 : }
5037 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
5038 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
5039 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
5040 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
5041 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5042 0 : if (r->out.pPrinterEnum) {
5043 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pPrinterEnum, r->in.cbBuf));
5044 : }
5045 : }
5046 0 : return NDR_ERR_SUCCESS;
5047 : }
5048 :
5049 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPrinters(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPrinters *r)
5050 : {
5051 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPrinters");
5052 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5053 0 : ndr->depth++;
5054 0 : if (flags & NDR_SET_VALUES) {
5055 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5056 : }
5057 0 : if (flags & NDR_IN) {
5058 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPrinters");
5059 0 : ndr->depth++;
5060 0 : ndr_print_uint32(ndr, "Flags", r->in.Flags);
5061 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
5062 0 : ndr->depth++;
5063 0 : if (r->in.pName) {
5064 0 : ndr_print_string(ndr, "pName", r->in.pName);
5065 : }
5066 0 : ndr->depth--;
5067 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
5068 0 : ndr_print_ptr(ndr, "pPrinterEnum", r->in.pPrinterEnum);
5069 0 : ndr->depth++;
5070 0 : if (r->in.pPrinterEnum) {
5071 0 : ndr_print_array_uint8(ndr, "pPrinterEnum", r->in.pPrinterEnum, r->in.cbBuf);
5072 : }
5073 0 : ndr->depth--;
5074 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
5075 0 : ndr->depth--;
5076 : }
5077 0 : if (flags & NDR_OUT) {
5078 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPrinters");
5079 0 : ndr->depth++;
5080 0 : ndr_print_ptr(ndr, "pPrinterEnum", r->out.pPrinterEnum);
5081 0 : ndr->depth++;
5082 0 : if (r->out.pPrinterEnum) {
5083 0 : ndr_print_array_uint8(ndr, "pPrinterEnum", r->out.pPrinterEnum, r->in.cbBuf);
5084 : }
5085 0 : ndr->depth--;
5086 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
5087 0 : ndr->depth++;
5088 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
5089 0 : ndr->depth--;
5090 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
5091 0 : ndr->depth++;
5092 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
5093 0 : ndr->depth--;
5094 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5095 0 : ndr->depth--;
5096 : }
5097 0 : ndr->depth--;
5098 : }
5099 :
5100 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncAddPrinterDriver(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddPrinterDriver *r)
5101 : {
5102 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5103 0 : if (flags & NDR_IN) {
5104 0 : if (r->in.pDriverContainer == NULL) {
5105 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5106 : }
5107 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
5108 0 : if (r->in.pName) {
5109 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5110 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5111 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5112 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5113 : }
5114 0 : NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDriverContainer));
5115 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwFileCopyFlags));
5116 : }
5117 0 : if (flags & NDR_OUT) {
5118 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5119 : }
5120 0 : return NDR_ERR_SUCCESS;
5121 : }
5122 :
5123 2 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncAddPrinterDriver(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddPrinterDriver *r)
5124 : {
5125 2 : uint32_t _ptr_pName;
5126 2 : uint32_t size_pName_1 = 0;
5127 2 : uint32_t length_pName_1 = 0;
5128 2 : TALLOC_CTX *_mem_save_pName_0 = NULL;
5129 2 : TALLOC_CTX *_mem_save_pDriverContainer_0 = NULL;
5130 2 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5131 2 : if (flags & NDR_IN) {
5132 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
5133 2 : if (_ptr_pName) {
5134 2 : NDR_PULL_ALLOC(ndr, r->in.pName);
5135 : } else {
5136 0 : r->in.pName = NULL;
5137 : }
5138 2 : if (r->in.pName) {
5139 2 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5140 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
5141 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
5142 2 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
5143 2 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
5144 2 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
5145 2 : if (length_pName_1 > size_pName_1) {
5146 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
5147 : }
5148 2 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
5149 2 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
5150 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
5151 : }
5152 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5153 2 : NDR_PULL_ALLOC(ndr, r->in.pDriverContainer);
5154 : }
5155 2 : _mem_save_pDriverContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
5156 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDriverContainer, LIBNDR_FLAG_REF_ALLOC);
5157 2 : NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDriverContainer));
5158 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDriverContainer_0, LIBNDR_FLAG_REF_ALLOC);
5159 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwFileCopyFlags));
5160 : }
5161 2 : if (flags & NDR_OUT) {
5162 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5163 : if (r->in.pDriverContainer == NULL) {
5164 : NDR_PULL_ALLOC(ndr, r->in.pDriverContainer);
5165 : NDR_ZERO_STRUCTP(r->in.pDriverContainer);
5166 : }
5167 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5168 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5169 : }
5170 0 : return NDR_ERR_SUCCESS;
5171 : }
5172 :
5173 2 : _PUBLIC_ void ndr_print_winspool_AsyncAddPrinterDriver(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddPrinterDriver *r)
5174 : {
5175 2 : ndr_print_struct(ndr, name, "winspool_AsyncAddPrinterDriver");
5176 2 : if (r == NULL) { ndr_print_null(ndr); return; }
5177 2 : ndr->depth++;
5178 2 : if (flags & NDR_SET_VALUES) {
5179 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5180 : }
5181 2 : if (flags & NDR_IN) {
5182 2 : ndr_print_struct(ndr, "in", "winspool_AsyncAddPrinterDriver");
5183 2 : ndr->depth++;
5184 2 : ndr_print_ptr(ndr, "pName", r->in.pName);
5185 2 : ndr->depth++;
5186 2 : if (r->in.pName) {
5187 2 : ndr_print_string(ndr, "pName", r->in.pName);
5188 : }
5189 2 : ndr->depth--;
5190 2 : ndr_print_ptr(ndr, "pDriverContainer", r->in.pDriverContainer);
5191 2 : ndr->depth++;
5192 2 : ndr_print_spoolss_AddDriverInfoCtr(ndr, "pDriverContainer", r->in.pDriverContainer);
5193 2 : ndr->depth--;
5194 2 : ndr_print_uint32(ndr, "dwFileCopyFlags", r->in.dwFileCopyFlags);
5195 2 : ndr->depth--;
5196 : }
5197 2 : if (flags & NDR_OUT) {
5198 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddPrinterDriver");
5199 0 : ndr->depth++;
5200 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5201 0 : ndr->depth--;
5202 : }
5203 2 : ndr->depth--;
5204 : }
5205 :
5206 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumPrinterDrivers(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterDrivers *r)
5207 : {
5208 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5209 0 : if (flags & NDR_IN) {
5210 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
5211 0 : if (r->in.pName) {
5212 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5213 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5214 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5215 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5216 : }
5217 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pEnvironment));
5218 0 : if (r->in.pEnvironment) {
5219 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5220 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5221 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5222 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5223 : }
5224 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
5225 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDrivers));
5226 0 : if (r->in.pDrivers) {
5227 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
5228 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pDrivers, r->in.cbBuf));
5229 : }
5230 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
5231 : }
5232 0 : if (flags & NDR_OUT) {
5233 0 : if (r->out.pcbNeeded == NULL) {
5234 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5235 : }
5236 0 : if (r->out.pcReturned == NULL) {
5237 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5238 : }
5239 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pDrivers));
5240 0 : if (r->out.pDrivers) {
5241 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
5242 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pDrivers, r->in.cbBuf));
5243 : }
5244 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
5245 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
5246 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5247 : }
5248 0 : return NDR_ERR_SUCCESS;
5249 : }
5250 :
5251 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumPrinterDrivers(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPrinterDrivers *r)
5252 : {
5253 0 : uint32_t _ptr_pName;
5254 0 : uint32_t size_pName_1 = 0;
5255 0 : uint32_t length_pName_1 = 0;
5256 0 : uint32_t _ptr_pEnvironment;
5257 0 : uint32_t size_pEnvironment_1 = 0;
5258 0 : uint32_t length_pEnvironment_1 = 0;
5259 0 : uint32_t _ptr_pDrivers;
5260 0 : uint32_t size_pDrivers_1 = 0;
5261 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
5262 0 : TALLOC_CTX *_mem_save_pEnvironment_0 = NULL;
5263 0 : TALLOC_CTX *_mem_save_pDrivers_0 = NULL;
5264 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
5265 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
5266 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5267 0 : if (flags & NDR_IN) {
5268 0 : NDR_ZERO_STRUCT(r->out);
5269 :
5270 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
5271 0 : if (_ptr_pName) {
5272 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
5273 : } else {
5274 0 : r->in.pName = NULL;
5275 : }
5276 0 : if (r->in.pName) {
5277 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5278 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
5279 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
5280 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
5281 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
5282 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
5283 0 : if (length_pName_1 > size_pName_1) {
5284 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
5285 : }
5286 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
5287 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
5288 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
5289 : }
5290 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pEnvironment));
5291 0 : if (_ptr_pEnvironment) {
5292 0 : NDR_PULL_ALLOC(ndr, r->in.pEnvironment);
5293 : } else {
5294 0 : r->in.pEnvironment = NULL;
5295 : }
5296 0 : if (r->in.pEnvironment) {
5297 0 : _mem_save_pEnvironment_0 = NDR_PULL_GET_MEM_CTX(ndr);
5298 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pEnvironment, 0);
5299 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
5300 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
5301 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
5302 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
5303 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
5304 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
5305 : }
5306 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
5307 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
5308 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pEnvironment_0, 0);
5309 : }
5310 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
5311 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDrivers));
5312 0 : if (_ptr_pDrivers) {
5313 0 : NDR_PULL_ALLOC(ndr, r->in.pDrivers);
5314 : } else {
5315 0 : r->in.pDrivers = NULL;
5316 : }
5317 0 : if (r->in.pDrivers) {
5318 0 : _mem_save_pDrivers_0 = NDR_PULL_GET_MEM_CTX(ndr);
5319 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDrivers, 0);
5320 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDrivers));
5321 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pDrivers, &size_pDrivers_1));
5322 0 : NDR_PULL_ALLOC_N(ndr, r->in.pDrivers, size_pDrivers_1);
5323 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pDrivers, size_pDrivers_1));
5324 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDrivers_0, 0);
5325 : }
5326 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
5327 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
5328 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
5329 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
5330 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
5331 0 : if (r->in.pDrivers) {
5332 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pDrivers, r->in.cbBuf));
5333 : }
5334 : }
5335 0 : if (flags & NDR_OUT) {
5336 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5337 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5338 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDrivers));
5339 0 : if (_ptr_pDrivers) {
5340 0 : NDR_PULL_ALLOC(ndr, r->out.pDrivers);
5341 : } else {
5342 0 : r->out.pDrivers = NULL;
5343 : }
5344 0 : if (r->out.pDrivers) {
5345 0 : _mem_save_pDrivers_0 = NDR_PULL_GET_MEM_CTX(ndr);
5346 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pDrivers, 0);
5347 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pDrivers));
5348 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pDrivers, &size_pDrivers_1));
5349 0 : NDR_PULL_ALLOC_N(ndr, r->out.pDrivers, size_pDrivers_1);
5350 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pDrivers, size_pDrivers_1));
5351 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDrivers_0, 0);
5352 : }
5353 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5354 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
5355 : }
5356 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
5357 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
5358 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
5359 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
5360 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5361 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
5362 : }
5363 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
5364 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
5365 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
5366 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
5367 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5368 0 : if (r->out.pDrivers) {
5369 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pDrivers, r->in.cbBuf));
5370 : }
5371 : }
5372 0 : return NDR_ERR_SUCCESS;
5373 : }
5374 :
5375 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPrinterDrivers(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPrinterDrivers *r)
5376 : {
5377 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPrinterDrivers");
5378 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5379 0 : ndr->depth++;
5380 0 : if (flags & NDR_SET_VALUES) {
5381 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5382 : }
5383 0 : if (flags & NDR_IN) {
5384 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPrinterDrivers");
5385 0 : ndr->depth++;
5386 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
5387 0 : ndr->depth++;
5388 0 : if (r->in.pName) {
5389 0 : ndr_print_string(ndr, "pName", r->in.pName);
5390 : }
5391 0 : ndr->depth--;
5392 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
5393 0 : ndr->depth++;
5394 0 : if (r->in.pEnvironment) {
5395 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
5396 : }
5397 0 : ndr->depth--;
5398 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
5399 0 : ndr_print_ptr(ndr, "pDrivers", r->in.pDrivers);
5400 0 : ndr->depth++;
5401 0 : if (r->in.pDrivers) {
5402 0 : ndr_print_array_uint8(ndr, "pDrivers", r->in.pDrivers, r->in.cbBuf);
5403 : }
5404 0 : ndr->depth--;
5405 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
5406 0 : ndr->depth--;
5407 : }
5408 0 : if (flags & NDR_OUT) {
5409 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPrinterDrivers");
5410 0 : ndr->depth++;
5411 0 : ndr_print_ptr(ndr, "pDrivers", r->out.pDrivers);
5412 0 : ndr->depth++;
5413 0 : if (r->out.pDrivers) {
5414 0 : ndr_print_array_uint8(ndr, "pDrivers", r->out.pDrivers, r->in.cbBuf);
5415 : }
5416 0 : ndr->depth--;
5417 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
5418 0 : ndr->depth++;
5419 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
5420 0 : ndr->depth--;
5421 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
5422 0 : ndr->depth++;
5423 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
5424 0 : ndr->depth--;
5425 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5426 0 : ndr->depth--;
5427 : }
5428 0 : ndr->depth--;
5429 : }
5430 :
5431 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncGetPrinterDriverDirectory(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDriverDirectory *r)
5432 : {
5433 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5434 0 : if (flags & NDR_IN) {
5435 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
5436 0 : if (r->in.pName) {
5437 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5438 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5439 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5440 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5441 : }
5442 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pEnvironment));
5443 0 : if (r->in.pEnvironment) {
5444 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5445 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5446 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5447 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5448 : }
5449 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
5450 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDriverDirectory));
5451 0 : if (r->in.pDriverDirectory) {
5452 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
5453 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pDriverDirectory, r->in.cbBuf));
5454 : }
5455 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
5456 : }
5457 0 : if (flags & NDR_OUT) {
5458 0 : if (r->out.pcbNeeded == NULL) {
5459 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5460 : }
5461 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pDriverDirectory));
5462 0 : if (r->out.pDriverDirectory) {
5463 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
5464 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pDriverDirectory, r->in.cbBuf));
5465 : }
5466 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
5467 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5468 : }
5469 0 : return NDR_ERR_SUCCESS;
5470 : }
5471 :
5472 6 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncGetPrinterDriverDirectory(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetPrinterDriverDirectory *r)
5473 : {
5474 6 : uint32_t _ptr_pName;
5475 6 : uint32_t size_pName_1 = 0;
5476 6 : uint32_t length_pName_1 = 0;
5477 6 : uint32_t _ptr_pEnvironment;
5478 6 : uint32_t size_pEnvironment_1 = 0;
5479 6 : uint32_t length_pEnvironment_1 = 0;
5480 6 : uint32_t _ptr_pDriverDirectory;
5481 6 : uint32_t size_pDriverDirectory_1 = 0;
5482 6 : TALLOC_CTX *_mem_save_pName_0 = NULL;
5483 6 : TALLOC_CTX *_mem_save_pEnvironment_0 = NULL;
5484 6 : TALLOC_CTX *_mem_save_pDriverDirectory_0 = NULL;
5485 6 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
5486 6 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5487 6 : if (flags & NDR_IN) {
5488 4 : NDR_ZERO_STRUCT(r->out);
5489 :
5490 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
5491 4 : if (_ptr_pName) {
5492 4 : NDR_PULL_ALLOC(ndr, r->in.pName);
5493 : } else {
5494 0 : r->in.pName = NULL;
5495 : }
5496 4 : if (r->in.pName) {
5497 4 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5498 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
5499 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
5500 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
5501 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
5502 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
5503 4 : if (length_pName_1 > size_pName_1) {
5504 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
5505 : }
5506 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
5507 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
5508 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
5509 : }
5510 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pEnvironment));
5511 4 : if (_ptr_pEnvironment) {
5512 4 : NDR_PULL_ALLOC(ndr, r->in.pEnvironment);
5513 : } else {
5514 0 : r->in.pEnvironment = NULL;
5515 : }
5516 4 : if (r->in.pEnvironment) {
5517 4 : _mem_save_pEnvironment_0 = NDR_PULL_GET_MEM_CTX(ndr);
5518 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pEnvironment, 0);
5519 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
5520 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
5521 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
5522 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
5523 4 : if (length_pEnvironment_1 > size_pEnvironment_1) {
5524 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
5525 : }
5526 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
5527 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
5528 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pEnvironment_0, 0);
5529 : }
5530 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
5531 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDriverDirectory));
5532 4 : if (_ptr_pDriverDirectory) {
5533 4 : NDR_PULL_ALLOC(ndr, r->in.pDriverDirectory);
5534 : } else {
5535 0 : r->in.pDriverDirectory = NULL;
5536 : }
5537 4 : if (r->in.pDriverDirectory) {
5538 4 : _mem_save_pDriverDirectory_0 = NDR_PULL_GET_MEM_CTX(ndr);
5539 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDriverDirectory, 0);
5540 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDriverDirectory));
5541 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pDriverDirectory, &size_pDriverDirectory_1));
5542 4 : NDR_PULL_ALLOC_N(ndr, r->in.pDriverDirectory, size_pDriverDirectory_1);
5543 4 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pDriverDirectory, size_pDriverDirectory_1));
5544 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDriverDirectory_0, 0);
5545 : }
5546 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
5547 4 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
5548 4 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
5549 4 : if (r->in.pDriverDirectory) {
5550 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pDriverDirectory, r->in.cbBuf));
5551 : }
5552 : }
5553 6 : if (flags & NDR_OUT) {
5554 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5555 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5556 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDriverDirectory));
5557 2 : if (_ptr_pDriverDirectory) {
5558 2 : NDR_PULL_ALLOC(ndr, r->out.pDriverDirectory);
5559 : } else {
5560 0 : r->out.pDriverDirectory = NULL;
5561 : }
5562 2 : if (r->out.pDriverDirectory) {
5563 2 : _mem_save_pDriverDirectory_0 = NDR_PULL_GET_MEM_CTX(ndr);
5564 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pDriverDirectory, 0);
5565 2 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pDriverDirectory));
5566 2 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pDriverDirectory, &size_pDriverDirectory_1));
5567 2 : NDR_PULL_ALLOC_N(ndr, r->out.pDriverDirectory, size_pDriverDirectory_1);
5568 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pDriverDirectory, size_pDriverDirectory_1));
5569 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDriverDirectory_0, 0);
5570 : }
5571 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5572 2 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
5573 : }
5574 2 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
5575 2 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
5576 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
5577 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
5578 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5579 2 : if (r->out.pDriverDirectory) {
5580 2 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pDriverDirectory, r->in.cbBuf));
5581 : }
5582 : }
5583 0 : return NDR_ERR_SUCCESS;
5584 : }
5585 :
5586 6 : _PUBLIC_ void ndr_print_winspool_AsyncGetPrinterDriverDirectory(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDriverDirectory *r)
5587 : {
5588 6 : ndr_print_struct(ndr, name, "winspool_AsyncGetPrinterDriverDirectory");
5589 6 : if (r == NULL) { ndr_print_null(ndr); return; }
5590 6 : ndr->depth++;
5591 6 : if (flags & NDR_SET_VALUES) {
5592 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5593 : }
5594 6 : if (flags & NDR_IN) {
5595 4 : ndr_print_struct(ndr, "in", "winspool_AsyncGetPrinterDriverDirectory");
5596 4 : ndr->depth++;
5597 4 : ndr_print_ptr(ndr, "pName", r->in.pName);
5598 4 : ndr->depth++;
5599 4 : if (r->in.pName) {
5600 4 : ndr_print_string(ndr, "pName", r->in.pName);
5601 : }
5602 4 : ndr->depth--;
5603 4 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
5604 4 : ndr->depth++;
5605 4 : if (r->in.pEnvironment) {
5606 4 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
5607 : }
5608 4 : ndr->depth--;
5609 4 : ndr_print_uint32(ndr, "Level", r->in.Level);
5610 4 : ndr_print_ptr(ndr, "pDriverDirectory", r->in.pDriverDirectory);
5611 4 : ndr->depth++;
5612 4 : if (r->in.pDriverDirectory) {
5613 4 : ndr_print_array_uint8(ndr, "pDriverDirectory", r->in.pDriverDirectory, r->in.cbBuf);
5614 : }
5615 4 : ndr->depth--;
5616 4 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
5617 4 : ndr->depth--;
5618 : }
5619 6 : if (flags & NDR_OUT) {
5620 2 : ndr_print_struct(ndr, "out", "winspool_AsyncGetPrinterDriverDirectory");
5621 2 : ndr->depth++;
5622 2 : ndr_print_ptr(ndr, "pDriverDirectory", r->out.pDriverDirectory);
5623 2 : ndr->depth++;
5624 2 : if (r->out.pDriverDirectory) {
5625 2 : ndr_print_array_uint8(ndr, "pDriverDirectory", r->out.pDriverDirectory, r->in.cbBuf);
5626 : }
5627 2 : ndr->depth--;
5628 2 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
5629 2 : ndr->depth++;
5630 2 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
5631 2 : ndr->depth--;
5632 2 : ndr_print_WERROR(ndr, "result", r->out.result);
5633 2 : ndr->depth--;
5634 : }
5635 6 : ndr->depth--;
5636 : }
5637 :
5638 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinterDriver(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDriver *r)
5639 : {
5640 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5641 0 : if (flags & NDR_IN) {
5642 0 : if (r->in.pEnvironment == NULL) {
5643 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5644 : }
5645 0 : if (r->in.pDriverName == NULL) {
5646 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5647 : }
5648 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
5649 0 : if (r->in.pName) {
5650 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5651 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5652 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5653 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5654 : }
5655 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5656 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5657 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5658 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5659 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDriverName, CH_UTF16)));
5660 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5661 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDriverName, CH_UTF16)));
5662 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pDriverName, ndr_charset_length(r->in.pDriverName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5663 : }
5664 0 : if (flags & NDR_OUT) {
5665 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5666 : }
5667 0 : return NDR_ERR_SUCCESS;
5668 : }
5669 :
5670 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinterDriver(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinterDriver *r)
5671 : {
5672 0 : uint32_t _ptr_pName;
5673 0 : uint32_t size_pName_1 = 0;
5674 0 : uint32_t length_pName_1 = 0;
5675 0 : uint32_t size_pEnvironment_1 = 0;
5676 0 : uint32_t length_pEnvironment_1 = 0;
5677 0 : uint32_t size_pDriverName_1 = 0;
5678 0 : uint32_t length_pDriverName_1 = 0;
5679 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
5680 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5681 0 : if (flags & NDR_IN) {
5682 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
5683 0 : if (_ptr_pName) {
5684 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
5685 : } else {
5686 0 : r->in.pName = NULL;
5687 : }
5688 0 : if (r->in.pName) {
5689 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5690 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
5691 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
5692 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
5693 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
5694 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
5695 0 : if (length_pName_1 > size_pName_1) {
5696 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
5697 : }
5698 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
5699 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
5700 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
5701 : }
5702 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
5703 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
5704 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
5705 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
5706 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
5707 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
5708 : }
5709 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
5710 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
5711 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDriverName));
5712 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pDriverName));
5713 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pDriverName, &size_pDriverName_1));
5714 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pDriverName, &length_pDriverName_1));
5715 0 : if (length_pDriverName_1 > size_pDriverName_1) {
5716 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDriverName_1, length_pDriverName_1);
5717 : }
5718 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDriverName_1, sizeof(uint16_t)));
5719 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pDriverName, length_pDriverName_1, sizeof(uint16_t), CH_UTF16));
5720 : }
5721 0 : if (flags & NDR_OUT) {
5722 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5723 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5724 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5725 : }
5726 0 : return NDR_ERR_SUCCESS;
5727 : }
5728 :
5729 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinterDriver(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDriver *r)
5730 : {
5731 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinterDriver");
5732 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5733 0 : ndr->depth++;
5734 0 : if (flags & NDR_SET_VALUES) {
5735 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5736 : }
5737 0 : if (flags & NDR_IN) {
5738 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinterDriver");
5739 0 : ndr->depth++;
5740 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
5741 0 : ndr->depth++;
5742 0 : if (r->in.pName) {
5743 0 : ndr_print_string(ndr, "pName", r->in.pName);
5744 : }
5745 0 : ndr->depth--;
5746 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
5747 0 : ndr->depth++;
5748 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
5749 0 : ndr->depth--;
5750 0 : ndr_print_ptr(ndr, "pDriverName", r->in.pDriverName);
5751 0 : ndr->depth++;
5752 0 : ndr_print_string(ndr, "pDriverName", r->in.pDriverName);
5753 0 : ndr->depth--;
5754 0 : ndr->depth--;
5755 : }
5756 0 : if (flags & NDR_OUT) {
5757 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinterDriver");
5758 0 : ndr->depth++;
5759 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5760 0 : ndr->depth--;
5761 : }
5762 0 : ndr->depth--;
5763 : }
5764 :
5765 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinterDriverEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDriverEx *r)
5766 : {
5767 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5768 0 : if (flags & NDR_IN) {
5769 0 : if (r->in.pEnvironment == NULL) {
5770 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5771 : }
5772 0 : if (r->in.pDriverName == NULL) {
5773 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5774 : }
5775 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
5776 0 : if (r->in.pName) {
5777 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5778 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5779 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5780 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5781 : }
5782 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5783 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5784 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5785 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5786 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDriverName, CH_UTF16)));
5787 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5788 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDriverName, CH_UTF16)));
5789 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pDriverName, ndr_charset_length(r->in.pDriverName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5790 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDeleteFlag));
5791 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwVersionNum));
5792 : }
5793 0 : if (flags & NDR_OUT) {
5794 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5795 : }
5796 0 : return NDR_ERR_SUCCESS;
5797 : }
5798 :
5799 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinterDriverEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinterDriverEx *r)
5800 : {
5801 0 : uint32_t _ptr_pName;
5802 0 : uint32_t size_pName_1 = 0;
5803 0 : uint32_t length_pName_1 = 0;
5804 0 : uint32_t size_pEnvironment_1 = 0;
5805 0 : uint32_t length_pEnvironment_1 = 0;
5806 0 : uint32_t size_pDriverName_1 = 0;
5807 0 : uint32_t length_pDriverName_1 = 0;
5808 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
5809 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5810 0 : if (flags & NDR_IN) {
5811 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
5812 0 : if (_ptr_pName) {
5813 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
5814 : } else {
5815 0 : r->in.pName = NULL;
5816 : }
5817 0 : if (r->in.pName) {
5818 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5819 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
5820 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
5821 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
5822 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
5823 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
5824 0 : if (length_pName_1 > size_pName_1) {
5825 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
5826 : }
5827 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
5828 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
5829 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
5830 : }
5831 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
5832 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
5833 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
5834 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
5835 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
5836 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
5837 : }
5838 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
5839 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
5840 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDriverName));
5841 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pDriverName));
5842 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pDriverName, &size_pDriverName_1));
5843 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pDriverName, &length_pDriverName_1));
5844 0 : if (length_pDriverName_1 > size_pDriverName_1) {
5845 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDriverName_1, length_pDriverName_1);
5846 : }
5847 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDriverName_1, sizeof(uint16_t)));
5848 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pDriverName, length_pDriverName_1, sizeof(uint16_t), CH_UTF16));
5849 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDeleteFlag));
5850 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwVersionNum));
5851 : }
5852 0 : if (flags & NDR_OUT) {
5853 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5854 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5855 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5856 : }
5857 0 : return NDR_ERR_SUCCESS;
5858 : }
5859 :
5860 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinterDriverEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDriverEx *r)
5861 : {
5862 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinterDriverEx");
5863 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5864 0 : ndr->depth++;
5865 0 : if (flags & NDR_SET_VALUES) {
5866 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5867 : }
5868 0 : if (flags & NDR_IN) {
5869 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinterDriverEx");
5870 0 : ndr->depth++;
5871 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
5872 0 : ndr->depth++;
5873 0 : if (r->in.pName) {
5874 0 : ndr_print_string(ndr, "pName", r->in.pName);
5875 : }
5876 0 : ndr->depth--;
5877 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
5878 0 : ndr->depth++;
5879 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
5880 0 : ndr->depth--;
5881 0 : ndr_print_ptr(ndr, "pDriverName", r->in.pDriverName);
5882 0 : ndr->depth++;
5883 0 : ndr_print_string(ndr, "pDriverName", r->in.pDriverName);
5884 0 : ndr->depth--;
5885 0 : ndr_print_uint32(ndr, "dwDeleteFlag", r->in.dwDeleteFlag);
5886 0 : ndr_print_uint32(ndr, "dwVersionNum", r->in.dwVersionNum);
5887 0 : ndr->depth--;
5888 : }
5889 0 : if (flags & NDR_OUT) {
5890 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinterDriverEx");
5891 0 : ndr->depth++;
5892 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5893 0 : ndr->depth--;
5894 : }
5895 0 : ndr->depth--;
5896 : }
5897 :
5898 0 : static enum ndr_err_code ndr_push_winspool_AsyncAddPrintProcessor(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddPrintProcessor *r)
5899 : {
5900 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5901 0 : if (flags & NDR_IN) {
5902 0 : if (r->in.pEnvironment == NULL) {
5903 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5904 : }
5905 0 : if (r->in.pPathName == NULL) {
5906 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5907 : }
5908 0 : if (r->in.pPrintProcessorName == NULL) {
5909 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5910 : }
5911 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
5912 0 : if (r->in.pName) {
5913 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5914 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5915 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
5916 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5917 : }
5918 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5919 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5920 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
5921 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5922 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPathName, CH_UTF16)));
5923 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5924 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPathName, CH_UTF16)));
5925 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPathName, ndr_charset_length(r->in.pPathName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5926 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16)));
5927 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5928 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16)));
5929 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPrintProcessorName, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5930 : }
5931 0 : if (flags & NDR_OUT) {
5932 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5933 : }
5934 0 : return NDR_ERR_SUCCESS;
5935 : }
5936 :
5937 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAddPrintProcessor(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddPrintProcessor *r)
5938 : {
5939 0 : uint32_t _ptr_pName;
5940 0 : uint32_t size_pName_1 = 0;
5941 0 : uint32_t length_pName_1 = 0;
5942 0 : uint32_t size_pEnvironment_1 = 0;
5943 0 : uint32_t length_pEnvironment_1 = 0;
5944 0 : uint32_t size_pPathName_1 = 0;
5945 0 : uint32_t length_pPathName_1 = 0;
5946 0 : uint32_t size_pPrintProcessorName_1 = 0;
5947 0 : uint32_t length_pPrintProcessorName_1 = 0;
5948 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
5949 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5950 0 : if (flags & NDR_IN) {
5951 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
5952 0 : if (_ptr_pName) {
5953 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
5954 : } else {
5955 0 : r->in.pName = NULL;
5956 : }
5957 0 : if (r->in.pName) {
5958 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5959 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
5960 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
5961 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
5962 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
5963 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
5964 0 : if (length_pName_1 > size_pName_1) {
5965 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
5966 : }
5967 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
5968 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
5969 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
5970 : }
5971 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
5972 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
5973 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
5974 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
5975 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
5976 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
5977 : }
5978 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
5979 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
5980 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPathName));
5981 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPathName));
5982 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPathName, &size_pPathName_1));
5983 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPathName, &length_pPathName_1));
5984 0 : if (length_pPathName_1 > size_pPathName_1) {
5985 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPathName_1, length_pPathName_1);
5986 : }
5987 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPathName_1, sizeof(uint16_t)));
5988 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPathName, length_pPathName_1, sizeof(uint16_t), CH_UTF16));
5989 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrintProcessorName));
5990 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPrintProcessorName));
5991 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPrintProcessorName, &size_pPrintProcessorName_1));
5992 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPrintProcessorName, &length_pPrintProcessorName_1));
5993 0 : if (length_pPrintProcessorName_1 > size_pPrintProcessorName_1) {
5994 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrintProcessorName_1, length_pPrintProcessorName_1);
5995 : }
5996 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrintProcessorName_1, sizeof(uint16_t)));
5997 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPrintProcessorName, length_pPrintProcessorName_1, sizeof(uint16_t), CH_UTF16));
5998 : }
5999 0 : if (flags & NDR_OUT) {
6000 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6001 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6002 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6003 : }
6004 0 : return NDR_ERR_SUCCESS;
6005 : }
6006 :
6007 0 : _PUBLIC_ void ndr_print_winspool_AsyncAddPrintProcessor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddPrintProcessor *r)
6008 : {
6009 0 : ndr_print_struct(ndr, name, "winspool_AsyncAddPrintProcessor");
6010 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6011 0 : ndr->depth++;
6012 0 : if (flags & NDR_SET_VALUES) {
6013 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6014 : }
6015 0 : if (flags & NDR_IN) {
6016 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAddPrintProcessor");
6017 0 : ndr->depth++;
6018 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
6019 0 : ndr->depth++;
6020 0 : if (r->in.pName) {
6021 0 : ndr_print_string(ndr, "pName", r->in.pName);
6022 : }
6023 0 : ndr->depth--;
6024 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
6025 0 : ndr->depth++;
6026 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
6027 0 : ndr->depth--;
6028 0 : ndr_print_ptr(ndr, "pPathName", r->in.pPathName);
6029 0 : ndr->depth++;
6030 0 : ndr_print_string(ndr, "pPathName", r->in.pPathName);
6031 0 : ndr->depth--;
6032 0 : ndr_print_ptr(ndr, "pPrintProcessorName", r->in.pPrintProcessorName);
6033 0 : ndr->depth++;
6034 0 : ndr_print_string(ndr, "pPrintProcessorName", r->in.pPrintProcessorName);
6035 0 : ndr->depth--;
6036 0 : ndr->depth--;
6037 : }
6038 0 : if (flags & NDR_OUT) {
6039 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddPrintProcessor");
6040 0 : ndr->depth++;
6041 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6042 0 : ndr->depth--;
6043 : }
6044 0 : ndr->depth--;
6045 : }
6046 :
6047 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumPrintProcessors(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPrintProcessors *r)
6048 : {
6049 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6050 0 : if (flags & NDR_IN) {
6051 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
6052 0 : if (r->in.pName) {
6053 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6054 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6055 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6056 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6057 : }
6058 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pEnvironment));
6059 0 : if (r->in.pEnvironment) {
6060 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
6061 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6062 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
6063 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6064 : }
6065 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
6066 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPrintProcessorInfo));
6067 0 : if (r->in.pPrintProcessorInfo) {
6068 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6069 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pPrintProcessorInfo, r->in.cbBuf));
6070 : }
6071 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
6072 : }
6073 0 : if (flags & NDR_OUT) {
6074 0 : if (r->out.pcbNeeded == NULL) {
6075 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6076 : }
6077 0 : if (r->out.pcReturned == NULL) {
6078 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6079 : }
6080 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pPrintProcessorInfo));
6081 0 : if (r->out.pPrintProcessorInfo) {
6082 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6083 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pPrintProcessorInfo, r->in.cbBuf));
6084 : }
6085 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
6086 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
6087 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6088 : }
6089 0 : return NDR_ERR_SUCCESS;
6090 : }
6091 :
6092 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumPrintProcessors(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPrintProcessors *r)
6093 : {
6094 0 : uint32_t _ptr_pName;
6095 0 : uint32_t size_pName_1 = 0;
6096 0 : uint32_t length_pName_1 = 0;
6097 0 : uint32_t _ptr_pEnvironment;
6098 0 : uint32_t size_pEnvironment_1 = 0;
6099 0 : uint32_t length_pEnvironment_1 = 0;
6100 0 : uint32_t _ptr_pPrintProcessorInfo;
6101 0 : uint32_t size_pPrintProcessorInfo_1 = 0;
6102 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
6103 0 : TALLOC_CTX *_mem_save_pEnvironment_0 = NULL;
6104 0 : TALLOC_CTX *_mem_save_pPrintProcessorInfo_0 = NULL;
6105 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
6106 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
6107 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6108 0 : if (flags & NDR_IN) {
6109 0 : NDR_ZERO_STRUCT(r->out);
6110 :
6111 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
6112 0 : if (_ptr_pName) {
6113 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
6114 : } else {
6115 0 : r->in.pName = NULL;
6116 : }
6117 0 : if (r->in.pName) {
6118 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6119 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
6120 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
6121 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
6122 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
6123 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
6124 0 : if (length_pName_1 > size_pName_1) {
6125 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
6126 : }
6127 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
6128 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
6129 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
6130 : }
6131 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pEnvironment));
6132 0 : if (_ptr_pEnvironment) {
6133 0 : NDR_PULL_ALLOC(ndr, r->in.pEnvironment);
6134 : } else {
6135 0 : r->in.pEnvironment = NULL;
6136 : }
6137 0 : if (r->in.pEnvironment) {
6138 0 : _mem_save_pEnvironment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6139 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pEnvironment, 0);
6140 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
6141 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
6142 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
6143 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
6144 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
6145 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
6146 : }
6147 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
6148 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
6149 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pEnvironment_0, 0);
6150 : }
6151 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
6152 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrintProcessorInfo));
6153 0 : if (_ptr_pPrintProcessorInfo) {
6154 0 : NDR_PULL_ALLOC(ndr, r->in.pPrintProcessorInfo);
6155 : } else {
6156 0 : r->in.pPrintProcessorInfo = NULL;
6157 : }
6158 0 : if (r->in.pPrintProcessorInfo) {
6159 0 : _mem_save_pPrintProcessorInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
6160 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrintProcessorInfo, 0);
6161 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrintProcessorInfo));
6162 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pPrintProcessorInfo, &size_pPrintProcessorInfo_1));
6163 0 : NDR_PULL_ALLOC_N(ndr, r->in.pPrintProcessorInfo, size_pPrintProcessorInfo_1);
6164 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pPrintProcessorInfo, size_pPrintProcessorInfo_1));
6165 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrintProcessorInfo_0, 0);
6166 : }
6167 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
6168 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6169 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
6170 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
6171 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
6172 0 : if (r->in.pPrintProcessorInfo) {
6173 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pPrintProcessorInfo, r->in.cbBuf));
6174 : }
6175 : }
6176 0 : if (flags & NDR_OUT) {
6177 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6178 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6179 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrintProcessorInfo));
6180 0 : if (_ptr_pPrintProcessorInfo) {
6181 0 : NDR_PULL_ALLOC(ndr, r->out.pPrintProcessorInfo);
6182 : } else {
6183 0 : r->out.pPrintProcessorInfo = NULL;
6184 : }
6185 0 : if (r->out.pPrintProcessorInfo) {
6186 0 : _mem_save_pPrintProcessorInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
6187 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pPrintProcessorInfo, 0);
6188 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pPrintProcessorInfo));
6189 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pPrintProcessorInfo, &size_pPrintProcessorInfo_1));
6190 0 : NDR_PULL_ALLOC_N(ndr, r->out.pPrintProcessorInfo, size_pPrintProcessorInfo_1);
6191 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pPrintProcessorInfo, size_pPrintProcessorInfo_1));
6192 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrintProcessorInfo_0, 0);
6193 : }
6194 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6195 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6196 : }
6197 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
6198 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
6199 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
6200 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
6201 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6202 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
6203 : }
6204 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6205 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
6206 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
6207 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
6208 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6209 0 : if (r->out.pPrintProcessorInfo) {
6210 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pPrintProcessorInfo, r->in.cbBuf));
6211 : }
6212 : }
6213 0 : return NDR_ERR_SUCCESS;
6214 : }
6215 :
6216 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPrintProcessors(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPrintProcessors *r)
6217 : {
6218 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPrintProcessors");
6219 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6220 0 : ndr->depth++;
6221 0 : if (flags & NDR_SET_VALUES) {
6222 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6223 : }
6224 0 : if (flags & NDR_IN) {
6225 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPrintProcessors");
6226 0 : ndr->depth++;
6227 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
6228 0 : ndr->depth++;
6229 0 : if (r->in.pName) {
6230 0 : ndr_print_string(ndr, "pName", r->in.pName);
6231 : }
6232 0 : ndr->depth--;
6233 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
6234 0 : ndr->depth++;
6235 0 : if (r->in.pEnvironment) {
6236 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
6237 : }
6238 0 : ndr->depth--;
6239 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
6240 0 : ndr_print_ptr(ndr, "pPrintProcessorInfo", r->in.pPrintProcessorInfo);
6241 0 : ndr->depth++;
6242 0 : if (r->in.pPrintProcessorInfo) {
6243 0 : ndr_print_array_uint8(ndr, "pPrintProcessorInfo", r->in.pPrintProcessorInfo, r->in.cbBuf);
6244 : }
6245 0 : ndr->depth--;
6246 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
6247 0 : ndr->depth--;
6248 : }
6249 0 : if (flags & NDR_OUT) {
6250 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPrintProcessors");
6251 0 : ndr->depth++;
6252 0 : ndr_print_ptr(ndr, "pPrintProcessorInfo", r->out.pPrintProcessorInfo);
6253 0 : ndr->depth++;
6254 0 : if (r->out.pPrintProcessorInfo) {
6255 0 : ndr_print_array_uint8(ndr, "pPrintProcessorInfo", r->out.pPrintProcessorInfo, r->in.cbBuf);
6256 : }
6257 0 : ndr->depth--;
6258 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
6259 0 : ndr->depth++;
6260 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
6261 0 : ndr->depth--;
6262 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
6263 0 : ndr->depth++;
6264 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
6265 0 : ndr->depth--;
6266 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6267 0 : ndr->depth--;
6268 : }
6269 0 : ndr->depth--;
6270 : }
6271 :
6272 0 : static enum ndr_err_code ndr_push_winspool_AsyncGetPrintProcessorDirectory(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetPrintProcessorDirectory *r)
6273 : {
6274 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6275 0 : if (flags & NDR_IN) {
6276 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
6277 0 : if (r->in.pName) {
6278 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6279 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6280 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6281 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6282 : }
6283 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pEnvironment));
6284 0 : if (r->in.pEnvironment) {
6285 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
6286 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6287 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
6288 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6289 : }
6290 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
6291 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPrintProcessorDirectory));
6292 0 : if (r->in.pPrintProcessorDirectory) {
6293 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6294 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pPrintProcessorDirectory, r->in.cbBuf));
6295 : }
6296 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
6297 : }
6298 0 : if (flags & NDR_OUT) {
6299 0 : if (r->out.pcbNeeded == NULL) {
6300 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6301 : }
6302 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pPrintProcessorDirectory));
6303 0 : if (r->out.pPrintProcessorDirectory) {
6304 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6305 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pPrintProcessorDirectory, r->in.cbBuf));
6306 : }
6307 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
6308 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6309 : }
6310 0 : return NDR_ERR_SUCCESS;
6311 : }
6312 :
6313 0 : static enum ndr_err_code ndr_pull_winspool_AsyncGetPrintProcessorDirectory(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetPrintProcessorDirectory *r)
6314 : {
6315 0 : uint32_t _ptr_pName;
6316 0 : uint32_t size_pName_1 = 0;
6317 0 : uint32_t length_pName_1 = 0;
6318 0 : uint32_t _ptr_pEnvironment;
6319 0 : uint32_t size_pEnvironment_1 = 0;
6320 0 : uint32_t length_pEnvironment_1 = 0;
6321 0 : uint32_t _ptr_pPrintProcessorDirectory;
6322 0 : uint32_t size_pPrintProcessorDirectory_1 = 0;
6323 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
6324 0 : TALLOC_CTX *_mem_save_pEnvironment_0 = NULL;
6325 0 : TALLOC_CTX *_mem_save_pPrintProcessorDirectory_0 = NULL;
6326 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
6327 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6328 0 : if (flags & NDR_IN) {
6329 0 : NDR_ZERO_STRUCT(r->out);
6330 :
6331 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
6332 0 : if (_ptr_pName) {
6333 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
6334 : } else {
6335 0 : r->in.pName = NULL;
6336 : }
6337 0 : if (r->in.pName) {
6338 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6339 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
6340 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
6341 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
6342 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
6343 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
6344 0 : if (length_pName_1 > size_pName_1) {
6345 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
6346 : }
6347 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
6348 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
6349 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
6350 : }
6351 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pEnvironment));
6352 0 : if (_ptr_pEnvironment) {
6353 0 : NDR_PULL_ALLOC(ndr, r->in.pEnvironment);
6354 : } else {
6355 0 : r->in.pEnvironment = NULL;
6356 : }
6357 0 : if (r->in.pEnvironment) {
6358 0 : _mem_save_pEnvironment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6359 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pEnvironment, 0);
6360 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
6361 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
6362 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
6363 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
6364 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
6365 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
6366 : }
6367 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
6368 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
6369 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pEnvironment_0, 0);
6370 : }
6371 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
6372 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrintProcessorDirectory));
6373 0 : if (_ptr_pPrintProcessorDirectory) {
6374 0 : NDR_PULL_ALLOC(ndr, r->in.pPrintProcessorDirectory);
6375 : } else {
6376 0 : r->in.pPrintProcessorDirectory = NULL;
6377 : }
6378 0 : if (r->in.pPrintProcessorDirectory) {
6379 0 : _mem_save_pPrintProcessorDirectory_0 = NDR_PULL_GET_MEM_CTX(ndr);
6380 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrintProcessorDirectory, 0);
6381 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrintProcessorDirectory));
6382 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pPrintProcessorDirectory, &size_pPrintProcessorDirectory_1));
6383 0 : NDR_PULL_ALLOC_N(ndr, r->in.pPrintProcessorDirectory, size_pPrintProcessorDirectory_1);
6384 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pPrintProcessorDirectory, size_pPrintProcessorDirectory_1));
6385 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrintProcessorDirectory_0, 0);
6386 : }
6387 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
6388 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6389 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
6390 0 : if (r->in.pPrintProcessorDirectory) {
6391 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pPrintProcessorDirectory, r->in.cbBuf));
6392 : }
6393 : }
6394 0 : if (flags & NDR_OUT) {
6395 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6396 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6397 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrintProcessorDirectory));
6398 0 : if (_ptr_pPrintProcessorDirectory) {
6399 0 : NDR_PULL_ALLOC(ndr, r->out.pPrintProcessorDirectory);
6400 : } else {
6401 0 : r->out.pPrintProcessorDirectory = NULL;
6402 : }
6403 0 : if (r->out.pPrintProcessorDirectory) {
6404 0 : _mem_save_pPrintProcessorDirectory_0 = NDR_PULL_GET_MEM_CTX(ndr);
6405 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pPrintProcessorDirectory, 0);
6406 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pPrintProcessorDirectory));
6407 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pPrintProcessorDirectory, &size_pPrintProcessorDirectory_1));
6408 0 : NDR_PULL_ALLOC_N(ndr, r->out.pPrintProcessorDirectory, size_pPrintProcessorDirectory_1);
6409 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pPrintProcessorDirectory, size_pPrintProcessorDirectory_1));
6410 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrintProcessorDirectory_0, 0);
6411 : }
6412 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6413 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6414 : }
6415 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
6416 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
6417 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
6418 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
6419 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6420 0 : if (r->out.pPrintProcessorDirectory) {
6421 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pPrintProcessorDirectory, r->in.cbBuf));
6422 : }
6423 : }
6424 0 : return NDR_ERR_SUCCESS;
6425 : }
6426 :
6427 0 : _PUBLIC_ void ndr_print_winspool_AsyncGetPrintProcessorDirectory(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetPrintProcessorDirectory *r)
6428 : {
6429 0 : ndr_print_struct(ndr, name, "winspool_AsyncGetPrintProcessorDirectory");
6430 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6431 0 : ndr->depth++;
6432 0 : if (flags & NDR_SET_VALUES) {
6433 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6434 : }
6435 0 : if (flags & NDR_IN) {
6436 0 : ndr_print_struct(ndr, "in", "winspool_AsyncGetPrintProcessorDirectory");
6437 0 : ndr->depth++;
6438 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
6439 0 : ndr->depth++;
6440 0 : if (r->in.pName) {
6441 0 : ndr_print_string(ndr, "pName", r->in.pName);
6442 : }
6443 0 : ndr->depth--;
6444 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
6445 0 : ndr->depth++;
6446 0 : if (r->in.pEnvironment) {
6447 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
6448 : }
6449 0 : ndr->depth--;
6450 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
6451 0 : ndr_print_ptr(ndr, "pPrintProcessorDirectory", r->in.pPrintProcessorDirectory);
6452 0 : ndr->depth++;
6453 0 : if (r->in.pPrintProcessorDirectory) {
6454 0 : ndr_print_array_uint8(ndr, "pPrintProcessorDirectory", r->in.pPrintProcessorDirectory, r->in.cbBuf);
6455 : }
6456 0 : ndr->depth--;
6457 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
6458 0 : ndr->depth--;
6459 : }
6460 0 : if (flags & NDR_OUT) {
6461 0 : ndr_print_struct(ndr, "out", "winspool_AsyncGetPrintProcessorDirectory");
6462 0 : ndr->depth++;
6463 0 : ndr_print_ptr(ndr, "pPrintProcessorDirectory", r->out.pPrintProcessorDirectory);
6464 0 : ndr->depth++;
6465 0 : if (r->out.pPrintProcessorDirectory) {
6466 0 : ndr_print_array_uint8(ndr, "pPrintProcessorDirectory", r->out.pPrintProcessorDirectory, r->in.cbBuf);
6467 : }
6468 0 : ndr->depth--;
6469 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
6470 0 : ndr->depth++;
6471 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
6472 0 : ndr->depth--;
6473 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6474 0 : ndr->depth--;
6475 : }
6476 0 : ndr->depth--;
6477 : }
6478 :
6479 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumPorts(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPorts *r)
6480 : {
6481 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6482 0 : if (flags & NDR_IN) {
6483 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
6484 0 : if (r->in.pName) {
6485 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6486 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6487 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6488 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6489 : }
6490 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
6491 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPort));
6492 0 : if (r->in.pPort) {
6493 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6494 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pPort, r->in.cbBuf));
6495 : }
6496 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
6497 : }
6498 0 : if (flags & NDR_OUT) {
6499 0 : if (r->out.pcbNeeded == NULL) {
6500 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6501 : }
6502 0 : if (r->out.pcReturned == NULL) {
6503 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6504 : }
6505 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pPort));
6506 0 : if (r->out.pPort) {
6507 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6508 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pPort, r->in.cbBuf));
6509 : }
6510 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
6511 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
6512 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6513 : }
6514 0 : return NDR_ERR_SUCCESS;
6515 : }
6516 :
6517 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumPorts(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPorts *r)
6518 : {
6519 0 : uint32_t _ptr_pName;
6520 0 : uint32_t size_pName_1 = 0;
6521 0 : uint32_t length_pName_1 = 0;
6522 0 : uint32_t _ptr_pPort;
6523 0 : uint32_t size_pPort_1 = 0;
6524 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
6525 0 : TALLOC_CTX *_mem_save_pPort_0 = NULL;
6526 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
6527 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
6528 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6529 0 : if (flags & NDR_IN) {
6530 0 : NDR_ZERO_STRUCT(r->out);
6531 :
6532 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
6533 0 : if (_ptr_pName) {
6534 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
6535 : } else {
6536 0 : r->in.pName = NULL;
6537 : }
6538 0 : if (r->in.pName) {
6539 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6540 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
6541 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
6542 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
6543 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
6544 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
6545 0 : if (length_pName_1 > size_pName_1) {
6546 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
6547 : }
6548 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
6549 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
6550 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
6551 : }
6552 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
6553 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPort));
6554 0 : if (_ptr_pPort) {
6555 0 : NDR_PULL_ALLOC(ndr, r->in.pPort);
6556 : } else {
6557 0 : r->in.pPort = NULL;
6558 : }
6559 0 : if (r->in.pPort) {
6560 0 : _mem_save_pPort_0 = NDR_PULL_GET_MEM_CTX(ndr);
6561 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPort, 0);
6562 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPort));
6563 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pPort, &size_pPort_1));
6564 0 : NDR_PULL_ALLOC_N(ndr, r->in.pPort, size_pPort_1);
6565 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pPort, size_pPort_1));
6566 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPort_0, 0);
6567 : }
6568 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
6569 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6570 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
6571 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
6572 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
6573 0 : if (r->in.pPort) {
6574 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pPort, r->in.cbBuf));
6575 : }
6576 : }
6577 0 : if (flags & NDR_OUT) {
6578 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6579 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6580 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPort));
6581 0 : if (_ptr_pPort) {
6582 0 : NDR_PULL_ALLOC(ndr, r->out.pPort);
6583 : } else {
6584 0 : r->out.pPort = NULL;
6585 : }
6586 0 : if (r->out.pPort) {
6587 0 : _mem_save_pPort_0 = NDR_PULL_GET_MEM_CTX(ndr);
6588 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pPort, 0);
6589 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pPort));
6590 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pPort, &size_pPort_1));
6591 0 : NDR_PULL_ALLOC_N(ndr, r->out.pPort, size_pPort_1);
6592 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pPort, size_pPort_1));
6593 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPort_0, 0);
6594 : }
6595 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6596 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6597 : }
6598 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
6599 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
6600 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
6601 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
6602 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6603 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
6604 : }
6605 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6606 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
6607 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
6608 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
6609 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6610 0 : if (r->out.pPort) {
6611 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pPort, r->in.cbBuf));
6612 : }
6613 : }
6614 0 : return NDR_ERR_SUCCESS;
6615 : }
6616 :
6617 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPorts(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPorts *r)
6618 : {
6619 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPorts");
6620 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6621 0 : ndr->depth++;
6622 0 : if (flags & NDR_SET_VALUES) {
6623 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6624 : }
6625 0 : if (flags & NDR_IN) {
6626 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPorts");
6627 0 : ndr->depth++;
6628 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
6629 0 : ndr->depth++;
6630 0 : if (r->in.pName) {
6631 0 : ndr_print_string(ndr, "pName", r->in.pName);
6632 : }
6633 0 : ndr->depth--;
6634 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
6635 0 : ndr_print_ptr(ndr, "pPort", r->in.pPort);
6636 0 : ndr->depth++;
6637 0 : if (r->in.pPort) {
6638 0 : ndr_print_array_uint8(ndr, "pPort", r->in.pPort, r->in.cbBuf);
6639 : }
6640 0 : ndr->depth--;
6641 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
6642 0 : ndr->depth--;
6643 : }
6644 0 : if (flags & NDR_OUT) {
6645 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPorts");
6646 0 : ndr->depth++;
6647 0 : ndr_print_ptr(ndr, "pPort", r->out.pPort);
6648 0 : ndr->depth++;
6649 0 : if (r->out.pPort) {
6650 0 : ndr_print_array_uint8(ndr, "pPort", r->out.pPort, r->in.cbBuf);
6651 : }
6652 0 : ndr->depth--;
6653 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
6654 0 : ndr->depth++;
6655 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
6656 0 : ndr->depth--;
6657 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
6658 0 : ndr->depth++;
6659 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
6660 0 : ndr->depth--;
6661 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6662 0 : ndr->depth--;
6663 : }
6664 0 : ndr->depth--;
6665 : }
6666 :
6667 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumMonitors(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumMonitors *r)
6668 : {
6669 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6670 0 : if (flags & NDR_IN) {
6671 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
6672 0 : if (r->in.pName) {
6673 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6674 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6675 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6676 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6677 : }
6678 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
6679 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pMonitor));
6680 0 : if (r->in.pMonitor) {
6681 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6682 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pMonitor, r->in.cbBuf));
6683 : }
6684 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
6685 : }
6686 0 : if (flags & NDR_OUT) {
6687 0 : if (r->out.pcbNeeded == NULL) {
6688 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6689 : }
6690 0 : if (r->out.pcReturned == NULL) {
6691 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6692 : }
6693 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pMonitor));
6694 0 : if (r->out.pMonitor) {
6695 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
6696 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pMonitor, r->in.cbBuf));
6697 : }
6698 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
6699 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
6700 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6701 : }
6702 0 : return NDR_ERR_SUCCESS;
6703 : }
6704 :
6705 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumMonitors(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumMonitors *r)
6706 : {
6707 0 : uint32_t _ptr_pName;
6708 0 : uint32_t size_pName_1 = 0;
6709 0 : uint32_t length_pName_1 = 0;
6710 0 : uint32_t _ptr_pMonitor;
6711 0 : uint32_t size_pMonitor_1 = 0;
6712 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
6713 0 : TALLOC_CTX *_mem_save_pMonitor_0 = NULL;
6714 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
6715 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
6716 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6717 0 : if (flags & NDR_IN) {
6718 0 : NDR_ZERO_STRUCT(r->out);
6719 :
6720 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
6721 0 : if (_ptr_pName) {
6722 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
6723 : } else {
6724 0 : r->in.pName = NULL;
6725 : }
6726 0 : if (r->in.pName) {
6727 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6728 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
6729 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
6730 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
6731 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
6732 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
6733 0 : if (length_pName_1 > size_pName_1) {
6734 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
6735 : }
6736 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
6737 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
6738 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
6739 : }
6740 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
6741 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pMonitor));
6742 0 : if (_ptr_pMonitor) {
6743 0 : NDR_PULL_ALLOC(ndr, r->in.pMonitor);
6744 : } else {
6745 0 : r->in.pMonitor = NULL;
6746 : }
6747 0 : if (r->in.pMonitor) {
6748 0 : _mem_save_pMonitor_0 = NDR_PULL_GET_MEM_CTX(ndr);
6749 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pMonitor, 0);
6750 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pMonitor));
6751 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pMonitor, &size_pMonitor_1));
6752 0 : NDR_PULL_ALLOC_N(ndr, r->in.pMonitor, size_pMonitor_1);
6753 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pMonitor, size_pMonitor_1));
6754 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pMonitor_0, 0);
6755 : }
6756 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
6757 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6758 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
6759 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
6760 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
6761 0 : if (r->in.pMonitor) {
6762 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pMonitor, r->in.cbBuf));
6763 : }
6764 : }
6765 0 : if (flags & NDR_OUT) {
6766 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6767 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6768 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pMonitor));
6769 0 : if (_ptr_pMonitor) {
6770 0 : NDR_PULL_ALLOC(ndr, r->out.pMonitor);
6771 : } else {
6772 0 : r->out.pMonitor = NULL;
6773 : }
6774 0 : if (r->out.pMonitor) {
6775 0 : _mem_save_pMonitor_0 = NDR_PULL_GET_MEM_CTX(ndr);
6776 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pMonitor, 0);
6777 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pMonitor));
6778 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pMonitor, &size_pMonitor_1));
6779 0 : NDR_PULL_ALLOC_N(ndr, r->out.pMonitor, size_pMonitor_1);
6780 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pMonitor, size_pMonitor_1));
6781 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pMonitor_0, 0);
6782 : }
6783 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6784 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
6785 : }
6786 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
6787 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
6788 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
6789 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
6790 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6791 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
6792 : }
6793 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
6794 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
6795 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
6796 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
6797 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6798 0 : if (r->out.pMonitor) {
6799 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pMonitor, r->in.cbBuf));
6800 : }
6801 : }
6802 0 : return NDR_ERR_SUCCESS;
6803 : }
6804 :
6805 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumMonitors(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumMonitors *r)
6806 : {
6807 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumMonitors");
6808 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6809 0 : ndr->depth++;
6810 0 : if (flags & NDR_SET_VALUES) {
6811 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6812 : }
6813 0 : if (flags & NDR_IN) {
6814 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumMonitors");
6815 0 : ndr->depth++;
6816 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
6817 0 : ndr->depth++;
6818 0 : if (r->in.pName) {
6819 0 : ndr_print_string(ndr, "pName", r->in.pName);
6820 : }
6821 0 : ndr->depth--;
6822 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
6823 0 : ndr_print_ptr(ndr, "pMonitor", r->in.pMonitor);
6824 0 : ndr->depth++;
6825 0 : if (r->in.pMonitor) {
6826 0 : ndr_print_array_uint8(ndr, "pMonitor", r->in.pMonitor, r->in.cbBuf);
6827 : }
6828 0 : ndr->depth--;
6829 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
6830 0 : ndr->depth--;
6831 : }
6832 0 : if (flags & NDR_OUT) {
6833 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumMonitors");
6834 0 : ndr->depth++;
6835 0 : ndr_print_ptr(ndr, "pMonitor", r->out.pMonitor);
6836 0 : ndr->depth++;
6837 0 : if (r->out.pMonitor) {
6838 0 : ndr_print_array_uint8(ndr, "pMonitor", r->out.pMonitor, r->in.cbBuf);
6839 : }
6840 0 : ndr->depth--;
6841 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
6842 0 : ndr->depth++;
6843 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
6844 0 : ndr->depth--;
6845 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
6846 0 : ndr->depth++;
6847 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
6848 0 : ndr->depth--;
6849 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6850 0 : ndr->depth--;
6851 : }
6852 0 : ndr->depth--;
6853 : }
6854 :
6855 0 : static enum ndr_err_code ndr_push_winspool_AsyncAddPort(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddPort *r)
6856 : {
6857 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6858 0 : if (flags & NDR_IN) {
6859 0 : if (r->in.pPortContainer == NULL) {
6860 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6861 : }
6862 0 : if (r->in.pPortVarContainer == NULL) {
6863 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6864 : }
6865 0 : if (r->in.pMonitorName == NULL) {
6866 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6867 : }
6868 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
6869 0 : if (r->in.pName) {
6870 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6871 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6872 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
6873 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6874 : }
6875 0 : NDR_CHECK(ndr_push_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPortContainer));
6876 0 : NDR_CHECK(ndr_push_spoolss_PortVarContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPortVarContainer));
6877 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pMonitorName, CH_UTF16)));
6878 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6879 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pMonitorName, CH_UTF16)));
6880 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pMonitorName, ndr_charset_length(r->in.pMonitorName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6881 : }
6882 0 : if (flags & NDR_OUT) {
6883 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6884 : }
6885 0 : return NDR_ERR_SUCCESS;
6886 : }
6887 :
6888 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAddPort(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddPort *r)
6889 : {
6890 0 : uint32_t _ptr_pName;
6891 0 : uint32_t size_pName_1 = 0;
6892 0 : uint32_t length_pName_1 = 0;
6893 0 : uint32_t size_pMonitorName_1 = 0;
6894 0 : uint32_t length_pMonitorName_1 = 0;
6895 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
6896 0 : TALLOC_CTX *_mem_save_pPortContainer_0 = NULL;
6897 0 : TALLOC_CTX *_mem_save_pPortVarContainer_0 = NULL;
6898 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6899 0 : if (flags & NDR_IN) {
6900 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
6901 0 : if (_ptr_pName) {
6902 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
6903 : } else {
6904 0 : r->in.pName = NULL;
6905 : }
6906 0 : if (r->in.pName) {
6907 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
6908 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
6909 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
6910 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
6911 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
6912 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
6913 0 : if (length_pName_1 > size_pName_1) {
6914 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
6915 : }
6916 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
6917 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
6918 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
6919 : }
6920 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6921 0 : NDR_PULL_ALLOC(ndr, r->in.pPortContainer);
6922 : }
6923 0 : _mem_save_pPortContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
6924 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPortContainer, LIBNDR_FLAG_REF_ALLOC);
6925 0 : NDR_CHECK(ndr_pull_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPortContainer));
6926 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPortContainer_0, LIBNDR_FLAG_REF_ALLOC);
6927 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6928 0 : NDR_PULL_ALLOC(ndr, r->in.pPortVarContainer);
6929 : }
6930 0 : _mem_save_pPortVarContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
6931 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPortVarContainer, LIBNDR_FLAG_REF_ALLOC);
6932 0 : NDR_CHECK(ndr_pull_spoolss_PortVarContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPortVarContainer));
6933 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPortVarContainer_0, LIBNDR_FLAG_REF_ALLOC);
6934 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pMonitorName));
6935 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pMonitorName));
6936 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pMonitorName, &size_pMonitorName_1));
6937 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pMonitorName, &length_pMonitorName_1));
6938 0 : if (length_pMonitorName_1 > size_pMonitorName_1) {
6939 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pMonitorName_1, length_pMonitorName_1);
6940 : }
6941 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pMonitorName_1, sizeof(uint16_t)));
6942 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pMonitorName, length_pMonitorName_1, sizeof(uint16_t), CH_UTF16));
6943 : }
6944 0 : if (flags & NDR_OUT) {
6945 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6946 : if (r->in.pPortContainer == NULL) {
6947 : NDR_PULL_ALLOC(ndr, r->in.pPortContainer);
6948 : NDR_ZERO_STRUCTP(r->in.pPortContainer);
6949 : }
6950 : if (r->in.pPortVarContainer == NULL) {
6951 : NDR_PULL_ALLOC(ndr, r->in.pPortVarContainer);
6952 : NDR_ZERO_STRUCTP(r->in.pPortVarContainer);
6953 : }
6954 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6955 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6956 : }
6957 0 : return NDR_ERR_SUCCESS;
6958 : }
6959 :
6960 0 : _PUBLIC_ void ndr_print_winspool_AsyncAddPort(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddPort *r)
6961 : {
6962 0 : ndr_print_struct(ndr, name, "winspool_AsyncAddPort");
6963 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6964 0 : ndr->depth++;
6965 0 : if (flags & NDR_SET_VALUES) {
6966 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6967 : }
6968 0 : if (flags & NDR_IN) {
6969 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAddPort");
6970 0 : ndr->depth++;
6971 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
6972 0 : ndr->depth++;
6973 0 : if (r->in.pName) {
6974 0 : ndr_print_string(ndr, "pName", r->in.pName);
6975 : }
6976 0 : ndr->depth--;
6977 0 : ndr_print_ptr(ndr, "pPortContainer", r->in.pPortContainer);
6978 0 : ndr->depth++;
6979 0 : ndr_print_spoolss_SetPortInfoContainer(ndr, "pPortContainer", r->in.pPortContainer);
6980 0 : ndr->depth--;
6981 0 : ndr_print_ptr(ndr, "pPortVarContainer", r->in.pPortVarContainer);
6982 0 : ndr->depth++;
6983 0 : ndr_print_spoolss_PortVarContainer(ndr, "pPortVarContainer", r->in.pPortVarContainer);
6984 0 : ndr->depth--;
6985 0 : ndr_print_ptr(ndr, "pMonitorName", r->in.pMonitorName);
6986 0 : ndr->depth++;
6987 0 : ndr_print_string(ndr, "pMonitorName", r->in.pMonitorName);
6988 0 : ndr->depth--;
6989 0 : ndr->depth--;
6990 : }
6991 0 : if (flags & NDR_OUT) {
6992 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddPort");
6993 0 : ndr->depth++;
6994 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6995 0 : ndr->depth--;
6996 : }
6997 0 : ndr->depth--;
6998 : }
6999 :
7000 0 : static enum ndr_err_code ndr_push_winspool_AsyncSetPort(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSetPort *r)
7001 : {
7002 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7003 0 : if (flags & NDR_IN) {
7004 0 : if (r->in.pPortContainer == NULL) {
7005 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7006 : }
7007 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
7008 0 : if (r->in.pName) {
7009 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
7010 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7011 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
7012 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7013 : }
7014 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPortName));
7015 0 : if (r->in.pPortName) {
7016 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPortName, CH_UTF16)));
7017 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7018 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPortName, CH_UTF16)));
7019 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPortName, ndr_charset_length(r->in.pPortName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7020 : }
7021 0 : NDR_CHECK(ndr_push_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPortContainer));
7022 : }
7023 0 : if (flags & NDR_OUT) {
7024 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7025 : }
7026 0 : return NDR_ERR_SUCCESS;
7027 : }
7028 :
7029 0 : static enum ndr_err_code ndr_pull_winspool_AsyncSetPort(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSetPort *r)
7030 : {
7031 0 : uint32_t _ptr_pName;
7032 0 : uint32_t size_pName_1 = 0;
7033 0 : uint32_t length_pName_1 = 0;
7034 0 : uint32_t _ptr_pPortName;
7035 0 : uint32_t size_pPortName_1 = 0;
7036 0 : uint32_t length_pPortName_1 = 0;
7037 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
7038 0 : TALLOC_CTX *_mem_save_pPortName_0 = NULL;
7039 0 : TALLOC_CTX *_mem_save_pPortContainer_0 = NULL;
7040 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7041 0 : if (flags & NDR_IN) {
7042 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
7043 0 : if (_ptr_pName) {
7044 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
7045 : } else {
7046 0 : r->in.pName = NULL;
7047 : }
7048 0 : if (r->in.pName) {
7049 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7050 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
7051 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
7052 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
7053 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
7054 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
7055 0 : if (length_pName_1 > size_pName_1) {
7056 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
7057 : }
7058 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
7059 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
7060 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
7061 : }
7062 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPortName));
7063 0 : if (_ptr_pPortName) {
7064 0 : NDR_PULL_ALLOC(ndr, r->in.pPortName);
7065 : } else {
7066 0 : r->in.pPortName = NULL;
7067 : }
7068 0 : if (r->in.pPortName) {
7069 0 : _mem_save_pPortName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7070 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPortName, 0);
7071 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPortName));
7072 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPortName));
7073 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPortName, &size_pPortName_1));
7074 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPortName, &length_pPortName_1));
7075 0 : if (length_pPortName_1 > size_pPortName_1) {
7076 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPortName_1, length_pPortName_1);
7077 : }
7078 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPortName_1, sizeof(uint16_t)));
7079 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPortName, length_pPortName_1, sizeof(uint16_t), CH_UTF16));
7080 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPortName_0, 0);
7081 : }
7082 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7083 0 : NDR_PULL_ALLOC(ndr, r->in.pPortContainer);
7084 : }
7085 0 : _mem_save_pPortContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
7086 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPortContainer, LIBNDR_FLAG_REF_ALLOC);
7087 0 : NDR_CHECK(ndr_pull_spoolss_SetPortInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pPortContainer));
7088 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPortContainer_0, LIBNDR_FLAG_REF_ALLOC);
7089 : }
7090 0 : if (flags & NDR_OUT) {
7091 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7092 : if (r->in.pPortContainer == NULL) {
7093 : NDR_PULL_ALLOC(ndr, r->in.pPortContainer);
7094 : NDR_ZERO_STRUCTP(r->in.pPortContainer);
7095 : }
7096 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7097 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7098 : }
7099 0 : return NDR_ERR_SUCCESS;
7100 : }
7101 :
7102 0 : _PUBLIC_ void ndr_print_winspool_AsyncSetPort(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSetPort *r)
7103 : {
7104 0 : ndr_print_struct(ndr, name, "winspool_AsyncSetPort");
7105 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7106 0 : ndr->depth++;
7107 0 : if (flags & NDR_SET_VALUES) {
7108 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7109 : }
7110 0 : if (flags & NDR_IN) {
7111 0 : ndr_print_struct(ndr, "in", "winspool_AsyncSetPort");
7112 0 : ndr->depth++;
7113 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
7114 0 : ndr->depth++;
7115 0 : if (r->in.pName) {
7116 0 : ndr_print_string(ndr, "pName", r->in.pName);
7117 : }
7118 0 : ndr->depth--;
7119 0 : ndr_print_ptr(ndr, "pPortName", r->in.pPortName);
7120 0 : ndr->depth++;
7121 0 : if (r->in.pPortName) {
7122 0 : ndr_print_string(ndr, "pPortName", r->in.pPortName);
7123 : }
7124 0 : ndr->depth--;
7125 0 : ndr_print_ptr(ndr, "pPortContainer", r->in.pPortContainer);
7126 0 : ndr->depth++;
7127 0 : ndr_print_spoolss_SetPortInfoContainer(ndr, "pPortContainer", r->in.pPortContainer);
7128 0 : ndr->depth--;
7129 0 : ndr->depth--;
7130 : }
7131 0 : if (flags & NDR_OUT) {
7132 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSetPort");
7133 0 : ndr->depth++;
7134 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7135 0 : ndr->depth--;
7136 : }
7137 0 : ndr->depth--;
7138 : }
7139 :
7140 0 : static enum ndr_err_code ndr_push_winspool_AsyncAddMonitor(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddMonitor *r)
7141 : {
7142 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7143 0 : if (flags & NDR_IN) {
7144 0 : if (r->in.pMonitorContainer == NULL) {
7145 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7146 : }
7147 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Name));
7148 0 : if (r->in.Name) {
7149 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Name, CH_UTF16)));
7150 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7151 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Name, CH_UTF16)));
7152 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Name, ndr_charset_length(r->in.Name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7153 : }
7154 0 : NDR_CHECK(ndr_push_spoolss_MonitorContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pMonitorContainer));
7155 : }
7156 0 : if (flags & NDR_OUT) {
7157 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7158 : }
7159 0 : return NDR_ERR_SUCCESS;
7160 : }
7161 :
7162 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAddMonitor(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddMonitor *r)
7163 : {
7164 0 : uint32_t _ptr_Name;
7165 0 : uint32_t size_Name_1 = 0;
7166 0 : uint32_t length_Name_1 = 0;
7167 0 : TALLOC_CTX *_mem_save_Name_0 = NULL;
7168 0 : TALLOC_CTX *_mem_save_pMonitorContainer_0 = NULL;
7169 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7170 0 : if (flags & NDR_IN) {
7171 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Name));
7172 0 : if (_ptr_Name) {
7173 0 : NDR_PULL_ALLOC(ndr, r->in.Name);
7174 : } else {
7175 0 : r->in.Name = NULL;
7176 : }
7177 0 : if (r->in.Name) {
7178 0 : _mem_save_Name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7179 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Name, 0);
7180 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Name));
7181 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Name));
7182 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Name, &size_Name_1));
7183 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Name, &length_Name_1));
7184 0 : if (length_Name_1 > size_Name_1) {
7185 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Name_1, length_Name_1);
7186 : }
7187 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Name_1, sizeof(uint16_t)));
7188 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Name, length_Name_1, sizeof(uint16_t), CH_UTF16));
7189 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Name_0, 0);
7190 : }
7191 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7192 0 : NDR_PULL_ALLOC(ndr, r->in.pMonitorContainer);
7193 : }
7194 0 : _mem_save_pMonitorContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
7195 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pMonitorContainer, LIBNDR_FLAG_REF_ALLOC);
7196 0 : NDR_CHECK(ndr_pull_spoolss_MonitorContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pMonitorContainer));
7197 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pMonitorContainer_0, LIBNDR_FLAG_REF_ALLOC);
7198 : }
7199 0 : if (flags & NDR_OUT) {
7200 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7201 : if (r->in.pMonitorContainer == NULL) {
7202 : NDR_PULL_ALLOC(ndr, r->in.pMonitorContainer);
7203 : NDR_ZERO_STRUCTP(r->in.pMonitorContainer);
7204 : }
7205 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7206 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7207 : }
7208 0 : return NDR_ERR_SUCCESS;
7209 : }
7210 :
7211 0 : _PUBLIC_ void ndr_print_winspool_AsyncAddMonitor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddMonitor *r)
7212 : {
7213 0 : ndr_print_struct(ndr, name, "winspool_AsyncAddMonitor");
7214 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7215 0 : ndr->depth++;
7216 0 : if (flags & NDR_SET_VALUES) {
7217 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7218 : }
7219 0 : if (flags & NDR_IN) {
7220 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAddMonitor");
7221 0 : ndr->depth++;
7222 0 : ndr_print_ptr(ndr, "Name", r->in.Name);
7223 0 : ndr->depth++;
7224 0 : if (r->in.Name) {
7225 0 : ndr_print_string(ndr, "Name", r->in.Name);
7226 : }
7227 0 : ndr->depth--;
7228 0 : ndr_print_ptr(ndr, "pMonitorContainer", r->in.pMonitorContainer);
7229 0 : ndr->depth++;
7230 0 : ndr_print_spoolss_MonitorContainer(ndr, "pMonitorContainer", r->in.pMonitorContainer);
7231 0 : ndr->depth--;
7232 0 : ndr->depth--;
7233 : }
7234 0 : if (flags & NDR_OUT) {
7235 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddMonitor");
7236 0 : ndr->depth++;
7237 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7238 0 : ndr->depth--;
7239 : }
7240 0 : ndr->depth--;
7241 : }
7242 :
7243 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeleteMonitor(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeleteMonitor *r)
7244 : {
7245 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7246 0 : if (flags & NDR_IN) {
7247 0 : if (r->in.pMonitorName == NULL) {
7248 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7249 : }
7250 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Name));
7251 0 : if (r->in.Name) {
7252 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Name, CH_UTF16)));
7253 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7254 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Name, CH_UTF16)));
7255 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Name, ndr_charset_length(r->in.Name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7256 : }
7257 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pEnvironment));
7258 0 : if (r->in.pEnvironment) {
7259 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
7260 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7261 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
7262 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7263 : }
7264 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pMonitorName, CH_UTF16)));
7265 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7266 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pMonitorName, CH_UTF16)));
7267 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pMonitorName, ndr_charset_length(r->in.pMonitorName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7268 : }
7269 0 : if (flags & NDR_OUT) {
7270 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7271 : }
7272 0 : return NDR_ERR_SUCCESS;
7273 : }
7274 :
7275 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeleteMonitor(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeleteMonitor *r)
7276 : {
7277 0 : uint32_t _ptr_Name;
7278 0 : uint32_t size_Name_1 = 0;
7279 0 : uint32_t length_Name_1 = 0;
7280 0 : uint32_t _ptr_pEnvironment;
7281 0 : uint32_t size_pEnvironment_1 = 0;
7282 0 : uint32_t length_pEnvironment_1 = 0;
7283 0 : uint32_t size_pMonitorName_1 = 0;
7284 0 : uint32_t length_pMonitorName_1 = 0;
7285 0 : TALLOC_CTX *_mem_save_Name_0 = NULL;
7286 0 : TALLOC_CTX *_mem_save_pEnvironment_0 = NULL;
7287 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7288 0 : if (flags & NDR_IN) {
7289 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Name));
7290 0 : if (_ptr_Name) {
7291 0 : NDR_PULL_ALLOC(ndr, r->in.Name);
7292 : } else {
7293 0 : r->in.Name = NULL;
7294 : }
7295 0 : if (r->in.Name) {
7296 0 : _mem_save_Name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7297 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Name, 0);
7298 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Name));
7299 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Name));
7300 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Name, &size_Name_1));
7301 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Name, &length_Name_1));
7302 0 : if (length_Name_1 > size_Name_1) {
7303 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Name_1, length_Name_1);
7304 : }
7305 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Name_1, sizeof(uint16_t)));
7306 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Name, length_Name_1, sizeof(uint16_t), CH_UTF16));
7307 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Name_0, 0);
7308 : }
7309 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pEnvironment));
7310 0 : if (_ptr_pEnvironment) {
7311 0 : NDR_PULL_ALLOC(ndr, r->in.pEnvironment);
7312 : } else {
7313 0 : r->in.pEnvironment = NULL;
7314 : }
7315 0 : if (r->in.pEnvironment) {
7316 0 : _mem_save_pEnvironment_0 = NDR_PULL_GET_MEM_CTX(ndr);
7317 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pEnvironment, 0);
7318 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
7319 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
7320 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
7321 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
7322 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
7323 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
7324 : }
7325 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
7326 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
7327 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pEnvironment_0, 0);
7328 : }
7329 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pMonitorName));
7330 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pMonitorName));
7331 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pMonitorName, &size_pMonitorName_1));
7332 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pMonitorName, &length_pMonitorName_1));
7333 0 : if (length_pMonitorName_1 > size_pMonitorName_1) {
7334 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pMonitorName_1, length_pMonitorName_1);
7335 : }
7336 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pMonitorName_1, sizeof(uint16_t)));
7337 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pMonitorName, length_pMonitorName_1, sizeof(uint16_t), CH_UTF16));
7338 : }
7339 0 : if (flags & NDR_OUT) {
7340 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7341 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7342 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7343 : }
7344 0 : return NDR_ERR_SUCCESS;
7345 : }
7346 :
7347 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeleteMonitor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeleteMonitor *r)
7348 : {
7349 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeleteMonitor");
7350 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7351 0 : ndr->depth++;
7352 0 : if (flags & NDR_SET_VALUES) {
7353 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7354 : }
7355 0 : if (flags & NDR_IN) {
7356 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeleteMonitor");
7357 0 : ndr->depth++;
7358 0 : ndr_print_ptr(ndr, "Name", r->in.Name);
7359 0 : ndr->depth++;
7360 0 : if (r->in.Name) {
7361 0 : ndr_print_string(ndr, "Name", r->in.Name);
7362 : }
7363 0 : ndr->depth--;
7364 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
7365 0 : ndr->depth++;
7366 0 : if (r->in.pEnvironment) {
7367 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
7368 : }
7369 0 : ndr->depth--;
7370 0 : ndr_print_ptr(ndr, "pMonitorName", r->in.pMonitorName);
7371 0 : ndr->depth++;
7372 0 : ndr_print_string(ndr, "pMonitorName", r->in.pMonitorName);
7373 0 : ndr->depth--;
7374 0 : ndr->depth--;
7375 : }
7376 0 : if (flags & NDR_OUT) {
7377 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeleteMonitor");
7378 0 : ndr->depth++;
7379 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7380 0 : ndr->depth--;
7381 : }
7382 0 : ndr->depth--;
7383 : }
7384 :
7385 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrintProcessor(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrintProcessor *r)
7386 : {
7387 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7388 0 : if (flags & NDR_IN) {
7389 0 : if (r->in.pPrintProcessorName == NULL) {
7390 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7391 : }
7392 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Name));
7393 0 : if (r->in.Name) {
7394 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Name, CH_UTF16)));
7395 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7396 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Name, CH_UTF16)));
7397 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Name, ndr_charset_length(r->in.Name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7398 : }
7399 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pEnvironment));
7400 0 : if (r->in.pEnvironment) {
7401 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
7402 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7403 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pEnvironment, CH_UTF16)));
7404 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pEnvironment, ndr_charset_length(r->in.pEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7405 : }
7406 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16)));
7407 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7408 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16)));
7409 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPrintProcessorName, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7410 : }
7411 0 : if (flags & NDR_OUT) {
7412 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7413 : }
7414 0 : return NDR_ERR_SUCCESS;
7415 : }
7416 :
7417 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrintProcessor(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrintProcessor *r)
7418 : {
7419 0 : uint32_t _ptr_Name;
7420 0 : uint32_t size_Name_1 = 0;
7421 0 : uint32_t length_Name_1 = 0;
7422 0 : uint32_t _ptr_pEnvironment;
7423 0 : uint32_t size_pEnvironment_1 = 0;
7424 0 : uint32_t length_pEnvironment_1 = 0;
7425 0 : uint32_t size_pPrintProcessorName_1 = 0;
7426 0 : uint32_t length_pPrintProcessorName_1 = 0;
7427 0 : TALLOC_CTX *_mem_save_Name_0 = NULL;
7428 0 : TALLOC_CTX *_mem_save_pEnvironment_0 = NULL;
7429 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7430 0 : if (flags & NDR_IN) {
7431 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Name));
7432 0 : if (_ptr_Name) {
7433 0 : NDR_PULL_ALLOC(ndr, r->in.Name);
7434 : } else {
7435 0 : r->in.Name = NULL;
7436 : }
7437 0 : if (r->in.Name) {
7438 0 : _mem_save_Name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7439 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Name, 0);
7440 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Name));
7441 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Name));
7442 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Name, &size_Name_1));
7443 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Name, &length_Name_1));
7444 0 : if (length_Name_1 > size_Name_1) {
7445 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Name_1, length_Name_1);
7446 : }
7447 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Name_1, sizeof(uint16_t)));
7448 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Name, length_Name_1, sizeof(uint16_t), CH_UTF16));
7449 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Name_0, 0);
7450 : }
7451 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pEnvironment));
7452 0 : if (_ptr_pEnvironment) {
7453 0 : NDR_PULL_ALLOC(ndr, r->in.pEnvironment);
7454 : } else {
7455 0 : r->in.pEnvironment = NULL;
7456 : }
7457 0 : if (r->in.pEnvironment) {
7458 0 : _mem_save_pEnvironment_0 = NDR_PULL_GET_MEM_CTX(ndr);
7459 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pEnvironment, 0);
7460 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pEnvironment));
7461 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pEnvironment));
7462 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pEnvironment, &size_pEnvironment_1));
7463 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pEnvironment, &length_pEnvironment_1));
7464 0 : if (length_pEnvironment_1 > size_pEnvironment_1) {
7465 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pEnvironment_1, length_pEnvironment_1);
7466 : }
7467 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pEnvironment_1, sizeof(uint16_t)));
7468 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pEnvironment, length_pEnvironment_1, sizeof(uint16_t), CH_UTF16));
7469 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pEnvironment_0, 0);
7470 : }
7471 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrintProcessorName));
7472 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPrintProcessorName));
7473 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPrintProcessorName, &size_pPrintProcessorName_1));
7474 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPrintProcessorName, &length_pPrintProcessorName_1));
7475 0 : if (length_pPrintProcessorName_1 > size_pPrintProcessorName_1) {
7476 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrintProcessorName_1, length_pPrintProcessorName_1);
7477 : }
7478 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrintProcessorName_1, sizeof(uint16_t)));
7479 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPrintProcessorName, length_pPrintProcessorName_1, sizeof(uint16_t), CH_UTF16));
7480 : }
7481 0 : if (flags & NDR_OUT) {
7482 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7483 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7484 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7485 : }
7486 0 : return NDR_ERR_SUCCESS;
7487 : }
7488 :
7489 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrintProcessor(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrintProcessor *r)
7490 : {
7491 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrintProcessor");
7492 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7493 0 : ndr->depth++;
7494 0 : if (flags & NDR_SET_VALUES) {
7495 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7496 : }
7497 0 : if (flags & NDR_IN) {
7498 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrintProcessor");
7499 0 : ndr->depth++;
7500 0 : ndr_print_ptr(ndr, "Name", r->in.Name);
7501 0 : ndr->depth++;
7502 0 : if (r->in.Name) {
7503 0 : ndr_print_string(ndr, "Name", r->in.Name);
7504 : }
7505 0 : ndr->depth--;
7506 0 : ndr_print_ptr(ndr, "pEnvironment", r->in.pEnvironment);
7507 0 : ndr->depth++;
7508 0 : if (r->in.pEnvironment) {
7509 0 : ndr_print_string(ndr, "pEnvironment", r->in.pEnvironment);
7510 : }
7511 0 : ndr->depth--;
7512 0 : ndr_print_ptr(ndr, "pPrintProcessorName", r->in.pPrintProcessorName);
7513 0 : ndr->depth++;
7514 0 : ndr_print_string(ndr, "pPrintProcessorName", r->in.pPrintProcessorName);
7515 0 : ndr->depth--;
7516 0 : ndr->depth--;
7517 : }
7518 0 : if (flags & NDR_OUT) {
7519 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrintProcessor");
7520 0 : ndr->depth++;
7521 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7522 0 : ndr->depth--;
7523 : }
7524 0 : ndr->depth--;
7525 : }
7526 :
7527 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumPrintProcessorDatatypes(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPrintProcessorDatatypes *r)
7528 : {
7529 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7530 0 : if (flags & NDR_IN) {
7531 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pName));
7532 0 : if (r->in.pName) {
7533 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
7534 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7535 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pName, CH_UTF16)));
7536 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pName, ndr_charset_length(r->in.pName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7537 : }
7538 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPrintProcessorName));
7539 0 : if (r->in.pPrintProcessorName) {
7540 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16)));
7541 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7542 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16)));
7543 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPrintProcessorName, ndr_charset_length(r->in.pPrintProcessorName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7544 : }
7545 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.Level));
7546 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDatatypes));
7547 0 : if (r->in.pDatatypes) {
7548 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
7549 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pDatatypes, r->in.cbBuf));
7550 : }
7551 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
7552 : }
7553 0 : if (flags & NDR_OUT) {
7554 0 : if (r->out.pcbNeeded == NULL) {
7555 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7556 : }
7557 0 : if (r->out.pcReturned == NULL) {
7558 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7559 : }
7560 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pDatatypes));
7561 0 : if (r->out.pDatatypes) {
7562 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
7563 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pDatatypes, r->in.cbBuf));
7564 : }
7565 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
7566 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
7567 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7568 : }
7569 0 : return NDR_ERR_SUCCESS;
7570 : }
7571 :
7572 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumPrintProcessorDatatypes(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPrintProcessorDatatypes *r)
7573 : {
7574 0 : uint32_t _ptr_pName;
7575 0 : uint32_t size_pName_1 = 0;
7576 0 : uint32_t length_pName_1 = 0;
7577 0 : uint32_t _ptr_pPrintProcessorName;
7578 0 : uint32_t size_pPrintProcessorName_1 = 0;
7579 0 : uint32_t length_pPrintProcessorName_1 = 0;
7580 0 : uint32_t _ptr_pDatatypes;
7581 0 : uint32_t size_pDatatypes_1 = 0;
7582 0 : TALLOC_CTX *_mem_save_pName_0 = NULL;
7583 0 : TALLOC_CTX *_mem_save_pPrintProcessorName_0 = NULL;
7584 0 : TALLOC_CTX *_mem_save_pDatatypes_0 = NULL;
7585 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
7586 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
7587 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7588 0 : if (flags & NDR_IN) {
7589 0 : NDR_ZERO_STRUCT(r->out);
7590 :
7591 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pName));
7592 0 : if (_ptr_pName) {
7593 0 : NDR_PULL_ALLOC(ndr, r->in.pName);
7594 : } else {
7595 0 : r->in.pName = NULL;
7596 : }
7597 0 : if (r->in.pName) {
7598 0 : _mem_save_pName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7599 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pName, 0);
7600 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pName));
7601 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pName));
7602 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pName, &size_pName_1));
7603 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pName, &length_pName_1));
7604 0 : if (length_pName_1 > size_pName_1) {
7605 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pName_1, length_pName_1);
7606 : }
7607 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pName_1, sizeof(uint16_t)));
7608 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pName, length_pName_1, sizeof(uint16_t), CH_UTF16));
7609 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pName_0, 0);
7610 : }
7611 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrintProcessorName));
7612 0 : if (_ptr_pPrintProcessorName) {
7613 0 : NDR_PULL_ALLOC(ndr, r->in.pPrintProcessorName);
7614 : } else {
7615 0 : r->in.pPrintProcessorName = NULL;
7616 : }
7617 0 : if (r->in.pPrintProcessorName) {
7618 0 : _mem_save_pPrintProcessorName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7619 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrintProcessorName, 0);
7620 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrintProcessorName));
7621 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPrintProcessorName));
7622 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPrintProcessorName, &size_pPrintProcessorName_1));
7623 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPrintProcessorName, &length_pPrintProcessorName_1));
7624 0 : if (length_pPrintProcessorName_1 > size_pPrintProcessorName_1) {
7625 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrintProcessorName_1, length_pPrintProcessorName_1);
7626 : }
7627 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrintProcessorName_1, sizeof(uint16_t)));
7628 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPrintProcessorName, length_pPrintProcessorName_1, sizeof(uint16_t), CH_UTF16));
7629 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrintProcessorName_0, 0);
7630 : }
7631 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.Level));
7632 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDatatypes));
7633 0 : if (_ptr_pDatatypes) {
7634 0 : NDR_PULL_ALLOC(ndr, r->in.pDatatypes);
7635 : } else {
7636 0 : r->in.pDatatypes = NULL;
7637 : }
7638 0 : if (r->in.pDatatypes) {
7639 0 : _mem_save_pDatatypes_0 = NDR_PULL_GET_MEM_CTX(ndr);
7640 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDatatypes, 0);
7641 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDatatypes));
7642 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pDatatypes, &size_pDatatypes_1));
7643 0 : NDR_PULL_ALLOC_N(ndr, r->in.pDatatypes, size_pDatatypes_1);
7644 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pDatatypes, size_pDatatypes_1));
7645 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDatatypes_0, 0);
7646 : }
7647 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
7648 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
7649 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
7650 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
7651 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
7652 0 : if (r->in.pDatatypes) {
7653 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pDatatypes, r->in.cbBuf));
7654 : }
7655 : }
7656 0 : if (flags & NDR_OUT) {
7657 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7658 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7659 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDatatypes));
7660 0 : if (_ptr_pDatatypes) {
7661 0 : NDR_PULL_ALLOC(ndr, r->out.pDatatypes);
7662 : } else {
7663 0 : r->out.pDatatypes = NULL;
7664 : }
7665 0 : if (r->out.pDatatypes) {
7666 0 : _mem_save_pDatatypes_0 = NDR_PULL_GET_MEM_CTX(ndr);
7667 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pDatatypes, 0);
7668 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pDatatypes));
7669 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pDatatypes, &size_pDatatypes_1));
7670 0 : NDR_PULL_ALLOC_N(ndr, r->out.pDatatypes, size_pDatatypes_1);
7671 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pDatatypes, size_pDatatypes_1));
7672 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDatatypes_0, 0);
7673 : }
7674 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7675 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
7676 : }
7677 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
7678 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
7679 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
7680 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
7681 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7682 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
7683 : }
7684 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
7685 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
7686 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
7687 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
7688 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7689 0 : if (r->out.pDatatypes) {
7690 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pDatatypes, r->in.cbBuf));
7691 : }
7692 : }
7693 0 : return NDR_ERR_SUCCESS;
7694 : }
7695 :
7696 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPrintProcessorDatatypes(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPrintProcessorDatatypes *r)
7697 : {
7698 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPrintProcessorDatatypes");
7699 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7700 0 : ndr->depth++;
7701 0 : if (flags & NDR_SET_VALUES) {
7702 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7703 : }
7704 0 : if (flags & NDR_IN) {
7705 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPrintProcessorDatatypes");
7706 0 : ndr->depth++;
7707 0 : ndr_print_ptr(ndr, "pName", r->in.pName);
7708 0 : ndr->depth++;
7709 0 : if (r->in.pName) {
7710 0 : ndr_print_string(ndr, "pName", r->in.pName);
7711 : }
7712 0 : ndr->depth--;
7713 0 : ndr_print_ptr(ndr, "pPrintProcessorName", r->in.pPrintProcessorName);
7714 0 : ndr->depth++;
7715 0 : if (r->in.pPrintProcessorName) {
7716 0 : ndr_print_string(ndr, "pPrintProcessorName", r->in.pPrintProcessorName);
7717 : }
7718 0 : ndr->depth--;
7719 0 : ndr_print_uint32(ndr, "Level", r->in.Level);
7720 0 : ndr_print_ptr(ndr, "pDatatypes", r->in.pDatatypes);
7721 0 : ndr->depth++;
7722 0 : if (r->in.pDatatypes) {
7723 0 : ndr_print_array_uint8(ndr, "pDatatypes", r->in.pDatatypes, r->in.cbBuf);
7724 : }
7725 0 : ndr->depth--;
7726 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
7727 0 : ndr->depth--;
7728 : }
7729 0 : if (flags & NDR_OUT) {
7730 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPrintProcessorDatatypes");
7731 0 : ndr->depth++;
7732 0 : ndr_print_ptr(ndr, "pDatatypes", r->out.pDatatypes);
7733 0 : ndr->depth++;
7734 0 : if (r->out.pDatatypes) {
7735 0 : ndr_print_array_uint8(ndr, "pDatatypes", r->out.pDatatypes, r->in.cbBuf);
7736 : }
7737 0 : ndr->depth--;
7738 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
7739 0 : ndr->depth++;
7740 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
7741 0 : ndr->depth--;
7742 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
7743 0 : ndr->depth++;
7744 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
7745 0 : ndr->depth--;
7746 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7747 0 : ndr->depth--;
7748 : }
7749 0 : ndr->depth--;
7750 : }
7751 :
7752 0 : static enum ndr_err_code ndr_push_winspool_AsyncAddPerMachineConnection(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncAddPerMachineConnection *r)
7753 : {
7754 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7755 0 : if (flags & NDR_IN) {
7756 0 : if (r->in.pPrinterName == NULL) {
7757 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7758 : }
7759 0 : if (r->in.pPrintServer == NULL) {
7760 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7761 : }
7762 0 : if (r->in.pProvider == NULL) {
7763 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7764 : }
7765 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pServer));
7766 0 : if (r->in.pServer) {
7767 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pServer, CH_UTF16)));
7768 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pServer, CH_UTF16)));
7770 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pServer, ndr_charset_length(r->in.pServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7771 : }
7772 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrinterName, CH_UTF16)));
7773 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7774 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrinterName, CH_UTF16)));
7775 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPrinterName, ndr_charset_length(r->in.pPrinterName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7776 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintServer, CH_UTF16)));
7777 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7778 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrintServer, CH_UTF16)));
7779 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPrintServer, ndr_charset_length(r->in.pPrintServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7780 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pProvider, CH_UTF16)));
7781 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7782 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pProvider, CH_UTF16)));
7783 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pProvider, ndr_charset_length(r->in.pProvider, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7784 : }
7785 0 : if (flags & NDR_OUT) {
7786 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7787 : }
7788 0 : return NDR_ERR_SUCCESS;
7789 : }
7790 :
7791 0 : static enum ndr_err_code ndr_pull_winspool_AsyncAddPerMachineConnection(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncAddPerMachineConnection *r)
7792 : {
7793 0 : uint32_t _ptr_pServer;
7794 0 : uint32_t size_pServer_1 = 0;
7795 0 : uint32_t length_pServer_1 = 0;
7796 0 : uint32_t size_pPrinterName_1 = 0;
7797 0 : uint32_t length_pPrinterName_1 = 0;
7798 0 : uint32_t size_pPrintServer_1 = 0;
7799 0 : uint32_t length_pPrintServer_1 = 0;
7800 0 : uint32_t size_pProvider_1 = 0;
7801 0 : uint32_t length_pProvider_1 = 0;
7802 0 : TALLOC_CTX *_mem_save_pServer_0 = NULL;
7803 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7804 0 : if (flags & NDR_IN) {
7805 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pServer));
7806 0 : if (_ptr_pServer) {
7807 0 : NDR_PULL_ALLOC(ndr, r->in.pServer);
7808 : } else {
7809 0 : r->in.pServer = NULL;
7810 : }
7811 0 : if (r->in.pServer) {
7812 0 : _mem_save_pServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
7813 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pServer, 0);
7814 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pServer));
7815 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pServer));
7816 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pServer, &size_pServer_1));
7817 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pServer, &length_pServer_1));
7818 0 : if (length_pServer_1 > size_pServer_1) {
7819 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pServer_1, length_pServer_1);
7820 : }
7821 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pServer_1, sizeof(uint16_t)));
7822 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pServer, length_pServer_1, sizeof(uint16_t), CH_UTF16));
7823 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pServer_0, 0);
7824 : }
7825 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrinterName));
7826 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPrinterName));
7827 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPrinterName, &size_pPrinterName_1));
7828 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPrinterName, &length_pPrinterName_1));
7829 0 : if (length_pPrinterName_1 > size_pPrinterName_1) {
7830 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrinterName_1, length_pPrinterName_1);
7831 : }
7832 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrinterName_1, sizeof(uint16_t)));
7833 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPrinterName, length_pPrinterName_1, sizeof(uint16_t), CH_UTF16));
7834 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrintServer));
7835 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPrintServer));
7836 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPrintServer, &size_pPrintServer_1));
7837 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPrintServer, &length_pPrintServer_1));
7838 0 : if (length_pPrintServer_1 > size_pPrintServer_1) {
7839 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrintServer_1, length_pPrintServer_1);
7840 : }
7841 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrintServer_1, sizeof(uint16_t)));
7842 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPrintServer, length_pPrintServer_1, sizeof(uint16_t), CH_UTF16));
7843 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pProvider));
7844 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pProvider));
7845 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pProvider, &size_pProvider_1));
7846 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pProvider, &length_pProvider_1));
7847 0 : if (length_pProvider_1 > size_pProvider_1) {
7848 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pProvider_1, length_pProvider_1);
7849 : }
7850 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pProvider_1, sizeof(uint16_t)));
7851 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pProvider, length_pProvider_1, sizeof(uint16_t), CH_UTF16));
7852 : }
7853 0 : if (flags & NDR_OUT) {
7854 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7855 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7856 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7857 : }
7858 0 : return NDR_ERR_SUCCESS;
7859 : }
7860 :
7861 0 : _PUBLIC_ void ndr_print_winspool_AsyncAddPerMachineConnection(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncAddPerMachineConnection *r)
7862 : {
7863 0 : ndr_print_struct(ndr, name, "winspool_AsyncAddPerMachineConnection");
7864 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7865 0 : ndr->depth++;
7866 0 : if (flags & NDR_SET_VALUES) {
7867 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7868 : }
7869 0 : if (flags & NDR_IN) {
7870 0 : ndr_print_struct(ndr, "in", "winspool_AsyncAddPerMachineConnection");
7871 0 : ndr->depth++;
7872 0 : ndr_print_ptr(ndr, "pServer", r->in.pServer);
7873 0 : ndr->depth++;
7874 0 : if (r->in.pServer) {
7875 0 : ndr_print_string(ndr, "pServer", r->in.pServer);
7876 : }
7877 0 : ndr->depth--;
7878 0 : ndr_print_ptr(ndr, "pPrinterName", r->in.pPrinterName);
7879 0 : ndr->depth++;
7880 0 : ndr_print_string(ndr, "pPrinterName", r->in.pPrinterName);
7881 0 : ndr->depth--;
7882 0 : ndr_print_ptr(ndr, "pPrintServer", r->in.pPrintServer);
7883 0 : ndr->depth++;
7884 0 : ndr_print_string(ndr, "pPrintServer", r->in.pPrintServer);
7885 0 : ndr->depth--;
7886 0 : ndr_print_ptr(ndr, "pProvider", r->in.pProvider);
7887 0 : ndr->depth++;
7888 0 : ndr_print_string(ndr, "pProvider", r->in.pProvider);
7889 0 : ndr->depth--;
7890 0 : ndr->depth--;
7891 : }
7892 0 : if (flags & NDR_OUT) {
7893 0 : ndr_print_struct(ndr, "out", "winspool_AsyncAddPerMachineConnection");
7894 0 : ndr->depth++;
7895 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7896 0 : ndr->depth--;
7897 : }
7898 0 : ndr->depth--;
7899 : }
7900 :
7901 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePerMachineConnection(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePerMachineConnection *r)
7902 : {
7903 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7904 0 : if (flags & NDR_IN) {
7905 0 : if (r->in.pPrinterName == NULL) {
7906 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7907 : }
7908 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pServer));
7909 0 : if (r->in.pServer) {
7910 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pServer, CH_UTF16)));
7911 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7912 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pServer, CH_UTF16)));
7913 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pServer, ndr_charset_length(r->in.pServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7914 : }
7915 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrinterName, CH_UTF16)));
7916 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7917 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pPrinterName, CH_UTF16)));
7918 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pPrinterName, ndr_charset_length(r->in.pPrinterName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7919 : }
7920 0 : if (flags & NDR_OUT) {
7921 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7922 : }
7923 0 : return NDR_ERR_SUCCESS;
7924 : }
7925 :
7926 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePerMachineConnection(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePerMachineConnection *r)
7927 : {
7928 0 : uint32_t _ptr_pServer;
7929 0 : uint32_t size_pServer_1 = 0;
7930 0 : uint32_t length_pServer_1 = 0;
7931 0 : uint32_t size_pPrinterName_1 = 0;
7932 0 : uint32_t length_pPrinterName_1 = 0;
7933 0 : TALLOC_CTX *_mem_save_pServer_0 = NULL;
7934 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7935 0 : if (flags & NDR_IN) {
7936 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pServer));
7937 0 : if (_ptr_pServer) {
7938 0 : NDR_PULL_ALLOC(ndr, r->in.pServer);
7939 : } else {
7940 0 : r->in.pServer = NULL;
7941 : }
7942 0 : if (r->in.pServer) {
7943 0 : _mem_save_pServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
7944 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pServer, 0);
7945 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pServer));
7946 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pServer));
7947 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pServer, &size_pServer_1));
7948 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pServer, &length_pServer_1));
7949 0 : if (length_pServer_1 > size_pServer_1) {
7950 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pServer_1, length_pServer_1);
7951 : }
7952 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pServer_1, sizeof(uint16_t)));
7953 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pServer, length_pServer_1, sizeof(uint16_t), CH_UTF16));
7954 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pServer_0, 0);
7955 : }
7956 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrinterName));
7957 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pPrinterName));
7958 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pPrinterName, &size_pPrinterName_1));
7959 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pPrinterName, &length_pPrinterName_1));
7960 0 : if (length_pPrinterName_1 > size_pPrinterName_1) {
7961 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pPrinterName_1, length_pPrinterName_1);
7962 : }
7963 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pPrinterName_1, sizeof(uint16_t)));
7964 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pPrinterName, length_pPrinterName_1, sizeof(uint16_t), CH_UTF16));
7965 : }
7966 0 : if (flags & NDR_OUT) {
7967 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7968 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7969 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7970 : }
7971 0 : return NDR_ERR_SUCCESS;
7972 : }
7973 :
7974 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePerMachineConnection(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePerMachineConnection *r)
7975 : {
7976 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePerMachineConnection");
7977 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7978 0 : ndr->depth++;
7979 0 : if (flags & NDR_SET_VALUES) {
7980 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7981 : }
7982 0 : if (flags & NDR_IN) {
7983 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePerMachineConnection");
7984 0 : ndr->depth++;
7985 0 : ndr_print_ptr(ndr, "pServer", r->in.pServer);
7986 0 : ndr->depth++;
7987 0 : if (r->in.pServer) {
7988 0 : ndr_print_string(ndr, "pServer", r->in.pServer);
7989 : }
7990 0 : ndr->depth--;
7991 0 : ndr_print_ptr(ndr, "pPrinterName", r->in.pPrinterName);
7992 0 : ndr->depth++;
7993 0 : ndr_print_string(ndr, "pPrinterName", r->in.pPrinterName);
7994 0 : ndr->depth--;
7995 0 : ndr->depth--;
7996 : }
7997 0 : if (flags & NDR_OUT) {
7998 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePerMachineConnection");
7999 0 : ndr->depth++;
8000 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8001 0 : ndr->depth--;
8002 : }
8003 0 : ndr->depth--;
8004 : }
8005 :
8006 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumPerMachineConnections(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumPerMachineConnections *r)
8007 : {
8008 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8009 0 : if (flags & NDR_IN) {
8010 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pServer));
8011 0 : if (r->in.pServer) {
8012 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pServer, CH_UTF16)));
8013 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8014 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pServer, CH_UTF16)));
8015 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pServer, ndr_charset_length(r->in.pServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8016 : }
8017 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pPrinterEnum));
8018 0 : if (r->in.pPrinterEnum) {
8019 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
8020 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.pPrinterEnum, r->in.cbBuf));
8021 : }
8022 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
8023 : }
8024 0 : if (flags & NDR_OUT) {
8025 0 : if (r->out.pcbNeeded == NULL) {
8026 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8027 : }
8028 0 : if (r->out.pcReturned == NULL) {
8029 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8030 : }
8031 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pPrinterEnum));
8032 0 : if (r->out.pPrinterEnum) {
8033 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
8034 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pPrinterEnum, r->in.cbBuf));
8035 : }
8036 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcbNeeded));
8037 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcReturned));
8038 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8039 : }
8040 0 : return NDR_ERR_SUCCESS;
8041 : }
8042 :
8043 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumPerMachineConnections(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumPerMachineConnections *r)
8044 : {
8045 0 : uint32_t _ptr_pServer;
8046 0 : uint32_t size_pServer_1 = 0;
8047 0 : uint32_t length_pServer_1 = 0;
8048 0 : uint32_t _ptr_pPrinterEnum;
8049 0 : uint32_t size_pPrinterEnum_1 = 0;
8050 0 : TALLOC_CTX *_mem_save_pServer_0 = NULL;
8051 0 : TALLOC_CTX *_mem_save_pPrinterEnum_0 = NULL;
8052 0 : TALLOC_CTX *_mem_save_pcbNeeded_0 = NULL;
8053 0 : TALLOC_CTX *_mem_save_pcReturned_0 = NULL;
8054 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8055 0 : if (flags & NDR_IN) {
8056 0 : NDR_ZERO_STRUCT(r->out);
8057 :
8058 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pServer));
8059 0 : if (_ptr_pServer) {
8060 0 : NDR_PULL_ALLOC(ndr, r->in.pServer);
8061 : } else {
8062 0 : r->in.pServer = NULL;
8063 : }
8064 0 : if (r->in.pServer) {
8065 0 : _mem_save_pServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
8066 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pServer, 0);
8067 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pServer));
8068 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pServer));
8069 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pServer, &size_pServer_1));
8070 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pServer, &length_pServer_1));
8071 0 : if (length_pServer_1 > size_pServer_1) {
8072 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pServer_1, length_pServer_1);
8073 : }
8074 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pServer_1, sizeof(uint16_t)));
8075 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pServer, length_pServer_1, sizeof(uint16_t), CH_UTF16));
8076 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pServer_0, 0);
8077 : }
8078 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterEnum));
8079 0 : if (_ptr_pPrinterEnum) {
8080 0 : NDR_PULL_ALLOC(ndr, r->in.pPrinterEnum);
8081 : } else {
8082 0 : r->in.pPrinterEnum = NULL;
8083 : }
8084 0 : if (r->in.pPrinterEnum) {
8085 0 : _mem_save_pPrinterEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
8086 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pPrinterEnum, 0);
8087 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pPrinterEnum));
8088 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pPrinterEnum, &size_pPrinterEnum_1));
8089 0 : NDR_PULL_ALLOC_N(ndr, r->in.pPrinterEnum, size_pPrinterEnum_1);
8090 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.pPrinterEnum, size_pPrinterEnum_1));
8091 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterEnum_0, 0);
8092 : }
8093 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
8094 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
8095 0 : NDR_ZERO_STRUCTP(r->out.pcbNeeded);
8096 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
8097 0 : NDR_ZERO_STRUCTP(r->out.pcReturned);
8098 0 : if (r->in.pPrinterEnum) {
8099 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pPrinterEnum, r->in.cbBuf));
8100 : }
8101 : }
8102 0 : if (flags & NDR_OUT) {
8103 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8104 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8105 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pPrinterEnum));
8106 0 : if (_ptr_pPrinterEnum) {
8107 0 : NDR_PULL_ALLOC(ndr, r->out.pPrinterEnum);
8108 : } else {
8109 0 : r->out.pPrinterEnum = NULL;
8110 : }
8111 0 : if (r->out.pPrinterEnum) {
8112 0 : _mem_save_pPrinterEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
8113 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pPrinterEnum, 0);
8114 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pPrinterEnum));
8115 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pPrinterEnum, &size_pPrinterEnum_1));
8116 0 : NDR_PULL_ALLOC_N(ndr, r->out.pPrinterEnum, size_pPrinterEnum_1);
8117 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pPrinterEnum, size_pPrinterEnum_1));
8118 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pPrinterEnum_0, 0);
8119 : }
8120 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8121 0 : NDR_PULL_ALLOC(ndr, r->out.pcbNeeded);
8122 : }
8123 0 : _mem_save_pcbNeeded_0 = NDR_PULL_GET_MEM_CTX(ndr);
8124 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcbNeeded, LIBNDR_FLAG_REF_ALLOC);
8125 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcbNeeded));
8126 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcbNeeded_0, LIBNDR_FLAG_REF_ALLOC);
8127 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8128 0 : NDR_PULL_ALLOC(ndr, r->out.pcReturned);
8129 : }
8130 0 : _mem_save_pcReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
8131 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcReturned, LIBNDR_FLAG_REF_ALLOC);
8132 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcReturned));
8133 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcReturned_0, LIBNDR_FLAG_REF_ALLOC);
8134 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8135 0 : if (r->out.pPrinterEnum) {
8136 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pPrinterEnum, r->in.cbBuf));
8137 : }
8138 : }
8139 0 : return NDR_ERR_SUCCESS;
8140 : }
8141 :
8142 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumPerMachineConnections(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumPerMachineConnections *r)
8143 : {
8144 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumPerMachineConnections");
8145 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8146 0 : ndr->depth++;
8147 0 : if (flags & NDR_SET_VALUES) {
8148 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8149 : }
8150 0 : if (flags & NDR_IN) {
8151 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumPerMachineConnections");
8152 0 : ndr->depth++;
8153 0 : ndr_print_ptr(ndr, "pServer", r->in.pServer);
8154 0 : ndr->depth++;
8155 0 : if (r->in.pServer) {
8156 0 : ndr_print_string(ndr, "pServer", r->in.pServer);
8157 : }
8158 0 : ndr->depth--;
8159 0 : ndr_print_ptr(ndr, "pPrinterEnum", r->in.pPrinterEnum);
8160 0 : ndr->depth++;
8161 0 : if (r->in.pPrinterEnum) {
8162 0 : ndr_print_array_uint8(ndr, "pPrinterEnum", r->in.pPrinterEnum, r->in.cbBuf);
8163 : }
8164 0 : ndr->depth--;
8165 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
8166 0 : ndr->depth--;
8167 : }
8168 0 : if (flags & NDR_OUT) {
8169 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumPerMachineConnections");
8170 0 : ndr->depth++;
8171 0 : ndr_print_ptr(ndr, "pPrinterEnum", r->out.pPrinterEnum);
8172 0 : ndr->depth++;
8173 0 : if (r->out.pPrinterEnum) {
8174 0 : ndr_print_array_uint8(ndr, "pPrinterEnum", r->out.pPrinterEnum, r->in.cbBuf);
8175 : }
8176 0 : ndr->depth--;
8177 0 : ndr_print_ptr(ndr, "pcbNeeded", r->out.pcbNeeded);
8178 0 : ndr->depth++;
8179 0 : ndr_print_uint32(ndr, "pcbNeeded", *r->out.pcbNeeded);
8180 0 : ndr->depth--;
8181 0 : ndr_print_ptr(ndr, "pcReturned", r->out.pcReturned);
8182 0 : ndr->depth++;
8183 0 : ndr_print_uint32(ndr, "pcReturned", *r->out.pcReturned);
8184 0 : ndr->depth--;
8185 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8186 0 : ndr->depth--;
8187 : }
8188 0 : ndr->depth--;
8189 : }
8190 :
8191 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_SyncRegisterForRemoteNotifications(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_SyncRegisterForRemoteNotifications *r)
8192 : {
8193 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8194 0 : if (flags & NDR_IN) {
8195 0 : if (r->in.pNotifyFilter == NULL) {
8196 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8197 : }
8198 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
8199 0 : NDR_CHECK(ndr_push_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pNotifyFilter));
8200 : }
8201 0 : if (flags & NDR_OUT) {
8202 0 : if (r->out.phRpcHandle == NULL) {
8203 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8204 : }
8205 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.phRpcHandle));
8206 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
8207 : }
8208 0 : return NDR_ERR_SUCCESS;
8209 : }
8210 :
8211 2 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_SyncRegisterForRemoteNotifications(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_SyncRegisterForRemoteNotifications *r)
8212 : {
8213 2 : TALLOC_CTX *_mem_save_pNotifyFilter_0 = NULL;
8214 2 : TALLOC_CTX *_mem_save_phRpcHandle_0 = NULL;
8215 2 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8216 2 : if (flags & NDR_IN) {
8217 2 : NDR_ZERO_STRUCT(r->out);
8218 :
8219 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
8220 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8221 2 : NDR_PULL_ALLOC(ndr, r->in.pNotifyFilter);
8222 : }
8223 2 : _mem_save_pNotifyFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
8224 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pNotifyFilter, LIBNDR_FLAG_REF_ALLOC);
8225 2 : NDR_CHECK(ndr_pull_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pNotifyFilter));
8226 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pNotifyFilter_0, LIBNDR_FLAG_REF_ALLOC);
8227 2 : NDR_PULL_ALLOC(ndr, r->out.phRpcHandle);
8228 2 : NDR_ZERO_STRUCTP(r->out.phRpcHandle);
8229 : }
8230 2 : if (flags & NDR_OUT) {
8231 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8232 : if (r->in.pNotifyFilter == NULL) {
8233 : NDR_PULL_ALLOC(ndr, r->in.pNotifyFilter);
8234 : NDR_ZERO_STRUCTP(r->in.pNotifyFilter);
8235 : }
8236 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8237 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8238 0 : NDR_PULL_ALLOC(ndr, r->out.phRpcHandle);
8239 : }
8240 0 : _mem_save_phRpcHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8241 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.phRpcHandle, LIBNDR_FLAG_REF_ALLOC);
8242 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.phRpcHandle));
8243 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phRpcHandle_0, LIBNDR_FLAG_REF_ALLOC);
8244 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
8245 : }
8246 0 : return NDR_ERR_SUCCESS;
8247 : }
8248 :
8249 2 : _PUBLIC_ void ndr_print_winspool_SyncRegisterForRemoteNotifications(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_SyncRegisterForRemoteNotifications *r)
8250 : {
8251 2 : ndr_print_struct(ndr, name, "winspool_SyncRegisterForRemoteNotifications");
8252 2 : if (r == NULL) { ndr_print_null(ndr); return; }
8253 2 : ndr->depth++;
8254 2 : if (flags & NDR_SET_VALUES) {
8255 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8256 : }
8257 2 : if (flags & NDR_IN) {
8258 2 : ndr_print_struct(ndr, "in", "winspool_SyncRegisterForRemoteNotifications");
8259 2 : ndr->depth++;
8260 2 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
8261 2 : ndr_print_ptr(ndr, "pNotifyFilter", r->in.pNotifyFilter);
8262 2 : ndr->depth++;
8263 2 : ndr_print_winspool_PrintPropertiesCollection(ndr, "pNotifyFilter", r->in.pNotifyFilter);
8264 2 : ndr->depth--;
8265 2 : ndr->depth--;
8266 : }
8267 2 : if (flags & NDR_OUT) {
8268 0 : ndr_print_struct(ndr, "out", "winspool_SyncRegisterForRemoteNotifications");
8269 0 : ndr->depth++;
8270 0 : ndr_print_ptr(ndr, "phRpcHandle", r->out.phRpcHandle);
8271 0 : ndr->depth++;
8272 0 : ndr_print_policy_handle(ndr, "phRpcHandle", r->out.phRpcHandle);
8273 0 : ndr->depth--;
8274 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
8275 0 : ndr->depth--;
8276 : }
8277 2 : ndr->depth--;
8278 : }
8279 :
8280 0 : static enum ndr_err_code ndr_push_winspool_SyncUnRegisterForRemoteNotifications(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_SyncUnRegisterForRemoteNotifications *r)
8281 : {
8282 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8283 0 : if (flags & NDR_IN) {
8284 0 : if (r->in.phRpcHandle == NULL) {
8285 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8286 : }
8287 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.phRpcHandle));
8288 : }
8289 0 : if (flags & NDR_OUT) {
8290 0 : if (r->out.phRpcHandle == NULL) {
8291 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8292 : }
8293 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.phRpcHandle));
8294 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
8295 : }
8296 0 : return NDR_ERR_SUCCESS;
8297 : }
8298 :
8299 0 : static enum ndr_err_code ndr_pull_winspool_SyncUnRegisterForRemoteNotifications(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_SyncUnRegisterForRemoteNotifications *r)
8300 : {
8301 0 : TALLOC_CTX *_mem_save_phRpcHandle_0 = NULL;
8302 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8303 0 : if (flags & NDR_IN) {
8304 0 : NDR_ZERO_STRUCT(r->out);
8305 :
8306 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8307 0 : NDR_PULL_ALLOC(ndr, r->in.phRpcHandle);
8308 : }
8309 0 : _mem_save_phRpcHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8310 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.phRpcHandle, LIBNDR_FLAG_REF_ALLOC);
8311 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.phRpcHandle));
8312 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phRpcHandle_0, LIBNDR_FLAG_REF_ALLOC);
8313 0 : NDR_PULL_ALLOC(ndr, r->out.phRpcHandle);
8314 0 : *r->out.phRpcHandle = *r->in.phRpcHandle;
8315 : }
8316 0 : if (flags & NDR_OUT) {
8317 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8318 : if (r->in.phRpcHandle == NULL) {
8319 : NDR_PULL_ALLOC(ndr, r->in.phRpcHandle);
8320 : NDR_ZERO_STRUCTP(r->in.phRpcHandle);
8321 : }
8322 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8323 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8324 0 : NDR_PULL_ALLOC(ndr, r->out.phRpcHandle);
8325 : }
8326 0 : _mem_save_phRpcHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8327 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.phRpcHandle, LIBNDR_FLAG_REF_ALLOC);
8328 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.phRpcHandle));
8329 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phRpcHandle_0, LIBNDR_FLAG_REF_ALLOC);
8330 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
8331 : }
8332 0 : return NDR_ERR_SUCCESS;
8333 : }
8334 :
8335 0 : _PUBLIC_ void ndr_print_winspool_SyncUnRegisterForRemoteNotifications(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_SyncUnRegisterForRemoteNotifications *r)
8336 : {
8337 0 : ndr_print_struct(ndr, name, "winspool_SyncUnRegisterForRemoteNotifications");
8338 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8339 0 : ndr->depth++;
8340 0 : if (flags & NDR_SET_VALUES) {
8341 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8342 : }
8343 0 : if (flags & NDR_IN) {
8344 0 : ndr_print_struct(ndr, "in", "winspool_SyncUnRegisterForRemoteNotifications");
8345 0 : ndr->depth++;
8346 0 : ndr_print_ptr(ndr, "phRpcHandle", r->in.phRpcHandle);
8347 0 : ndr->depth++;
8348 0 : ndr_print_policy_handle(ndr, "phRpcHandle", r->in.phRpcHandle);
8349 0 : ndr->depth--;
8350 0 : ndr->depth--;
8351 : }
8352 0 : if (flags & NDR_OUT) {
8353 0 : ndr_print_struct(ndr, "out", "winspool_SyncUnRegisterForRemoteNotifications");
8354 0 : ndr->depth++;
8355 0 : ndr_print_ptr(ndr, "phRpcHandle", r->out.phRpcHandle);
8356 0 : ndr->depth++;
8357 0 : ndr_print_policy_handle(ndr, "phRpcHandle", r->out.phRpcHandle);
8358 0 : ndr->depth--;
8359 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
8360 0 : ndr->depth--;
8361 : }
8362 0 : ndr->depth--;
8363 : }
8364 :
8365 0 : static enum ndr_err_code ndr_push_winspool_SyncRefreshRemoteNotifications(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_SyncRefreshRemoteNotifications *r)
8366 : {
8367 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8368 0 : if (flags & NDR_IN) {
8369 0 : if (r->in.pNotifyFilter == NULL) {
8370 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8371 : }
8372 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hRpcHandle));
8373 0 : NDR_CHECK(ndr_push_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pNotifyFilter));
8374 : }
8375 0 : if (flags & NDR_OUT) {
8376 0 : if (r->out.ppNotifyData == NULL) {
8377 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8378 : }
8379 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ppNotifyData));
8380 0 : if (*r->out.ppNotifyData) {
8381 0 : NDR_CHECK(ndr_push_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppNotifyData));
8382 : }
8383 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
8384 : }
8385 0 : return NDR_ERR_SUCCESS;
8386 : }
8387 :
8388 0 : static enum ndr_err_code ndr_pull_winspool_SyncRefreshRemoteNotifications(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_SyncRefreshRemoteNotifications *r)
8389 : {
8390 0 : uint32_t _ptr_ppNotifyData;
8391 0 : TALLOC_CTX *_mem_save_pNotifyFilter_0 = NULL;
8392 0 : TALLOC_CTX *_mem_save_ppNotifyData_0 = NULL;
8393 0 : TALLOC_CTX *_mem_save_ppNotifyData_1 = NULL;
8394 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8395 0 : if (flags & NDR_IN) {
8396 0 : NDR_ZERO_STRUCT(r->out);
8397 :
8398 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hRpcHandle));
8399 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8400 0 : NDR_PULL_ALLOC(ndr, r->in.pNotifyFilter);
8401 : }
8402 0 : _mem_save_pNotifyFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
8403 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pNotifyFilter, LIBNDR_FLAG_REF_ALLOC);
8404 0 : NDR_CHECK(ndr_pull_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pNotifyFilter));
8405 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pNotifyFilter_0, LIBNDR_FLAG_REF_ALLOC);
8406 0 : NDR_PULL_ALLOC(ndr, r->out.ppNotifyData);
8407 0 : NDR_ZERO_STRUCTP(r->out.ppNotifyData);
8408 : }
8409 0 : if (flags & NDR_OUT) {
8410 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8411 : if (r->in.pNotifyFilter == NULL) {
8412 : NDR_PULL_ALLOC(ndr, r->in.pNotifyFilter);
8413 : NDR_ZERO_STRUCTP(r->in.pNotifyFilter);
8414 : }
8415 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8416 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8417 0 : NDR_PULL_ALLOC(ndr, r->out.ppNotifyData);
8418 : }
8419 0 : _mem_save_ppNotifyData_0 = NDR_PULL_GET_MEM_CTX(ndr);
8420 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppNotifyData, LIBNDR_FLAG_REF_ALLOC);
8421 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppNotifyData));
8422 0 : if (_ptr_ppNotifyData) {
8423 0 : NDR_PULL_ALLOC(ndr, *r->out.ppNotifyData);
8424 : } else {
8425 0 : *r->out.ppNotifyData = NULL;
8426 : }
8427 0 : if (*r->out.ppNotifyData) {
8428 0 : _mem_save_ppNotifyData_1 = NDR_PULL_GET_MEM_CTX(ndr);
8429 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppNotifyData, 0);
8430 0 : NDR_CHECK(ndr_pull_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppNotifyData));
8431 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppNotifyData_1, 0);
8432 : }
8433 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppNotifyData_0, LIBNDR_FLAG_REF_ALLOC);
8434 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
8435 : }
8436 0 : return NDR_ERR_SUCCESS;
8437 : }
8438 :
8439 0 : _PUBLIC_ void ndr_print_winspool_SyncRefreshRemoteNotifications(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_SyncRefreshRemoteNotifications *r)
8440 : {
8441 0 : ndr_print_struct(ndr, name, "winspool_SyncRefreshRemoteNotifications");
8442 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8443 0 : ndr->depth++;
8444 0 : if (flags & NDR_SET_VALUES) {
8445 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8446 : }
8447 0 : if (flags & NDR_IN) {
8448 0 : ndr_print_struct(ndr, "in", "winspool_SyncRefreshRemoteNotifications");
8449 0 : ndr->depth++;
8450 0 : ndr_print_policy_handle(ndr, "hRpcHandle", &r->in.hRpcHandle);
8451 0 : ndr_print_ptr(ndr, "pNotifyFilter", r->in.pNotifyFilter);
8452 0 : ndr->depth++;
8453 0 : ndr_print_winspool_PrintPropertiesCollection(ndr, "pNotifyFilter", r->in.pNotifyFilter);
8454 0 : ndr->depth--;
8455 0 : ndr->depth--;
8456 : }
8457 0 : if (flags & NDR_OUT) {
8458 0 : ndr_print_struct(ndr, "out", "winspool_SyncRefreshRemoteNotifications");
8459 0 : ndr->depth++;
8460 0 : ndr_print_ptr(ndr, "ppNotifyData", r->out.ppNotifyData);
8461 0 : ndr->depth++;
8462 0 : ndr_print_ptr(ndr, "ppNotifyData", *r->out.ppNotifyData);
8463 0 : ndr->depth++;
8464 0 : if (*r->out.ppNotifyData) {
8465 0 : ndr_print_winspool_PrintPropertiesCollection(ndr, "ppNotifyData", *r->out.ppNotifyData);
8466 : }
8467 0 : ndr->depth--;
8468 0 : ndr->depth--;
8469 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
8470 0 : ndr->depth--;
8471 : }
8472 0 : ndr->depth--;
8473 : }
8474 :
8475 0 : static enum ndr_err_code ndr_push_winspool_AsyncGetRemoteNotifications(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetRemoteNotifications *r)
8476 : {
8477 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8478 0 : if (flags & NDR_IN) {
8479 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hRpcHandle));
8480 : }
8481 0 : if (flags & NDR_OUT) {
8482 0 : if (r->out.ppNotifyData == NULL) {
8483 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8484 : }
8485 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ppNotifyData));
8486 0 : if (*r->out.ppNotifyData) {
8487 0 : NDR_CHECK(ndr_push_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppNotifyData));
8488 : }
8489 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
8490 : }
8491 0 : return NDR_ERR_SUCCESS;
8492 : }
8493 :
8494 0 : static enum ndr_err_code ndr_pull_winspool_AsyncGetRemoteNotifications(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetRemoteNotifications *r)
8495 : {
8496 0 : uint32_t _ptr_ppNotifyData;
8497 0 : TALLOC_CTX *_mem_save_ppNotifyData_0 = NULL;
8498 0 : TALLOC_CTX *_mem_save_ppNotifyData_1 = NULL;
8499 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8500 0 : if (flags & NDR_IN) {
8501 0 : NDR_ZERO_STRUCT(r->out);
8502 :
8503 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hRpcHandle));
8504 0 : NDR_PULL_ALLOC(ndr, r->out.ppNotifyData);
8505 0 : NDR_ZERO_STRUCTP(r->out.ppNotifyData);
8506 : }
8507 0 : if (flags & NDR_OUT) {
8508 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8509 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8510 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8511 0 : NDR_PULL_ALLOC(ndr, r->out.ppNotifyData);
8512 : }
8513 0 : _mem_save_ppNotifyData_0 = NDR_PULL_GET_MEM_CTX(ndr);
8514 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppNotifyData, LIBNDR_FLAG_REF_ALLOC);
8515 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppNotifyData));
8516 0 : if (_ptr_ppNotifyData) {
8517 0 : NDR_PULL_ALLOC(ndr, *r->out.ppNotifyData);
8518 : } else {
8519 0 : *r->out.ppNotifyData = NULL;
8520 : }
8521 0 : if (*r->out.ppNotifyData) {
8522 0 : _mem_save_ppNotifyData_1 = NDR_PULL_GET_MEM_CTX(ndr);
8523 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppNotifyData, 0);
8524 0 : NDR_CHECK(ndr_pull_winspool_PrintPropertiesCollection(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.ppNotifyData));
8525 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppNotifyData_1, 0);
8526 : }
8527 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppNotifyData_0, LIBNDR_FLAG_REF_ALLOC);
8528 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
8529 : }
8530 0 : return NDR_ERR_SUCCESS;
8531 : }
8532 :
8533 0 : _PUBLIC_ void ndr_print_winspool_AsyncGetRemoteNotifications(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetRemoteNotifications *r)
8534 : {
8535 0 : ndr_print_struct(ndr, name, "winspool_AsyncGetRemoteNotifications");
8536 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8537 0 : ndr->depth++;
8538 0 : if (flags & NDR_SET_VALUES) {
8539 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8540 : }
8541 0 : if (flags & NDR_IN) {
8542 0 : ndr_print_struct(ndr, "in", "winspool_AsyncGetRemoteNotifications");
8543 0 : ndr->depth++;
8544 0 : ndr_print_policy_handle(ndr, "hRpcHandle", &r->in.hRpcHandle);
8545 0 : ndr->depth--;
8546 : }
8547 0 : if (flags & NDR_OUT) {
8548 0 : ndr_print_struct(ndr, "out", "winspool_AsyncGetRemoteNotifications");
8549 0 : ndr->depth++;
8550 0 : ndr_print_ptr(ndr, "ppNotifyData", r->out.ppNotifyData);
8551 0 : ndr->depth++;
8552 0 : ndr_print_ptr(ndr, "ppNotifyData", *r->out.ppNotifyData);
8553 0 : ndr->depth++;
8554 0 : if (*r->out.ppNotifyData) {
8555 0 : ndr_print_winspool_PrintPropertiesCollection(ndr, "ppNotifyData", *r->out.ppNotifyData);
8556 : }
8557 0 : ndr->depth--;
8558 0 : ndr->depth--;
8559 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
8560 0 : ndr->depth--;
8561 : }
8562 0 : ndr->depth--;
8563 : }
8564 :
8565 0 : static enum ndr_err_code ndr_push_winspool_AsyncInstallPrinterDriverFromPackage(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncInstallPrinterDriverFromPackage *r)
8566 : {
8567 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8568 0 : if (flags & NDR_IN) {
8569 0 : if (r->in.pszDriverName == NULL) {
8570 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8571 : }
8572 0 : if (r->in.pszEnvironment == NULL) {
8573 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8574 : }
8575 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszServer));
8576 0 : if (r->in.pszServer) {
8577 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
8578 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8579 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
8580 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszServer, ndr_charset_length(r->in.pszServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8581 : }
8582 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszInfPath));
8583 0 : if (r->in.pszInfPath) {
8584 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszInfPath, CH_UTF16)));
8585 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8586 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszInfPath, CH_UTF16)));
8587 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszInfPath, ndr_charset_length(r->in.pszInfPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8588 : }
8589 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszDriverName, CH_UTF16)));
8590 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8591 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszDriverName, CH_UTF16)));
8592 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszDriverName, ndr_charset_length(r->in.pszDriverName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8593 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
8594 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8595 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
8596 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszEnvironment, ndr_charset_length(r->in.pszEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8597 0 : NDR_CHECK(ndr_push_winspool_InstallPrinterDriverFromPackageFlags(ndr, NDR_SCALARS, r->in.dwFlags));
8598 : }
8599 0 : if (flags & NDR_OUT) {
8600 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
8601 : }
8602 0 : return NDR_ERR_SUCCESS;
8603 : }
8604 :
8605 0 : static enum ndr_err_code ndr_pull_winspool_AsyncInstallPrinterDriverFromPackage(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncInstallPrinterDriverFromPackage *r)
8606 : {
8607 0 : uint32_t _ptr_pszServer;
8608 0 : uint32_t size_pszServer_1 = 0;
8609 0 : uint32_t length_pszServer_1 = 0;
8610 0 : uint32_t _ptr_pszInfPath;
8611 0 : uint32_t size_pszInfPath_1 = 0;
8612 0 : uint32_t length_pszInfPath_1 = 0;
8613 0 : uint32_t size_pszDriverName_1 = 0;
8614 0 : uint32_t length_pszDriverName_1 = 0;
8615 0 : uint32_t size_pszEnvironment_1 = 0;
8616 0 : uint32_t length_pszEnvironment_1 = 0;
8617 0 : TALLOC_CTX *_mem_save_pszServer_0 = NULL;
8618 0 : TALLOC_CTX *_mem_save_pszInfPath_0 = NULL;
8619 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8620 0 : if (flags & NDR_IN) {
8621 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServer));
8622 0 : if (_ptr_pszServer) {
8623 0 : NDR_PULL_ALLOC(ndr, r->in.pszServer);
8624 : } else {
8625 0 : r->in.pszServer = NULL;
8626 : }
8627 0 : if (r->in.pszServer) {
8628 0 : _mem_save_pszServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
8629 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszServer, 0);
8630 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszServer));
8631 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszServer));
8632 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszServer, &size_pszServer_1));
8633 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszServer, &length_pszServer_1));
8634 0 : if (length_pszServer_1 > size_pszServer_1) {
8635 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServer_1, length_pszServer_1);
8636 : }
8637 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServer_1, sizeof(uint16_t)));
8638 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszServer, length_pszServer_1, sizeof(uint16_t), CH_UTF16));
8639 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServer_0, 0);
8640 : }
8641 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszInfPath));
8642 0 : if (_ptr_pszInfPath) {
8643 0 : NDR_PULL_ALLOC(ndr, r->in.pszInfPath);
8644 : } else {
8645 0 : r->in.pszInfPath = NULL;
8646 : }
8647 0 : if (r->in.pszInfPath) {
8648 0 : _mem_save_pszInfPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
8649 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszInfPath, 0);
8650 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszInfPath));
8651 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszInfPath));
8652 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszInfPath, &size_pszInfPath_1));
8653 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszInfPath, &length_pszInfPath_1));
8654 0 : if (length_pszInfPath_1 > size_pszInfPath_1) {
8655 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszInfPath_1, length_pszInfPath_1);
8656 : }
8657 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszInfPath_1, sizeof(uint16_t)));
8658 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszInfPath, length_pszInfPath_1, sizeof(uint16_t), CH_UTF16));
8659 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszInfPath_0, 0);
8660 : }
8661 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszDriverName));
8662 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszDriverName));
8663 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszDriverName, &size_pszDriverName_1));
8664 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszDriverName, &length_pszDriverName_1));
8665 0 : if (length_pszDriverName_1 > size_pszDriverName_1) {
8666 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszDriverName_1, length_pszDriverName_1);
8667 : }
8668 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszDriverName_1, sizeof(uint16_t)));
8669 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszDriverName, length_pszDriverName_1, sizeof(uint16_t), CH_UTF16));
8670 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszEnvironment));
8671 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszEnvironment));
8672 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszEnvironment, &size_pszEnvironment_1));
8673 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszEnvironment, &length_pszEnvironment_1));
8674 0 : if (length_pszEnvironment_1 > size_pszEnvironment_1) {
8675 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszEnvironment_1, length_pszEnvironment_1);
8676 : }
8677 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszEnvironment_1, sizeof(uint16_t)));
8678 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszEnvironment, length_pszEnvironment_1, sizeof(uint16_t), CH_UTF16));
8679 0 : NDR_CHECK(ndr_pull_winspool_InstallPrinterDriverFromPackageFlags(ndr, NDR_SCALARS, &r->in.dwFlags));
8680 : }
8681 0 : if (flags & NDR_OUT) {
8682 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8683 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8684 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
8685 : }
8686 0 : return NDR_ERR_SUCCESS;
8687 : }
8688 :
8689 0 : _PUBLIC_ void ndr_print_winspool_AsyncInstallPrinterDriverFromPackage(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncInstallPrinterDriverFromPackage *r)
8690 : {
8691 0 : ndr_print_struct(ndr, name, "winspool_AsyncInstallPrinterDriverFromPackage");
8692 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8693 0 : ndr->depth++;
8694 0 : if (flags & NDR_SET_VALUES) {
8695 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8696 : }
8697 0 : if (flags & NDR_IN) {
8698 0 : ndr_print_struct(ndr, "in", "winspool_AsyncInstallPrinterDriverFromPackage");
8699 0 : ndr->depth++;
8700 0 : ndr_print_ptr(ndr, "pszServer", r->in.pszServer);
8701 0 : ndr->depth++;
8702 0 : if (r->in.pszServer) {
8703 0 : ndr_print_string(ndr, "pszServer", r->in.pszServer);
8704 : }
8705 0 : ndr->depth--;
8706 0 : ndr_print_ptr(ndr, "pszInfPath", r->in.pszInfPath);
8707 0 : ndr->depth++;
8708 0 : if (r->in.pszInfPath) {
8709 0 : ndr_print_string(ndr, "pszInfPath", r->in.pszInfPath);
8710 : }
8711 0 : ndr->depth--;
8712 0 : ndr_print_ptr(ndr, "pszDriverName", r->in.pszDriverName);
8713 0 : ndr->depth++;
8714 0 : ndr_print_string(ndr, "pszDriverName", r->in.pszDriverName);
8715 0 : ndr->depth--;
8716 0 : ndr_print_ptr(ndr, "pszEnvironment", r->in.pszEnvironment);
8717 0 : ndr->depth++;
8718 0 : ndr_print_string(ndr, "pszEnvironment", r->in.pszEnvironment);
8719 0 : ndr->depth--;
8720 0 : ndr_print_winspool_InstallPrinterDriverFromPackageFlags(ndr, "dwFlags", r->in.dwFlags);
8721 0 : ndr->depth--;
8722 : }
8723 0 : if (flags & NDR_OUT) {
8724 0 : ndr_print_struct(ndr, "out", "winspool_AsyncInstallPrinterDriverFromPackage");
8725 0 : ndr->depth++;
8726 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
8727 0 : ndr->depth--;
8728 : }
8729 0 : ndr->depth--;
8730 : }
8731 :
8732 0 : static enum ndr_err_code ndr_push_winspool_AsyncUploadPrinterDriverPackage(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncUploadPrinterDriverPackage *r)
8733 : {
8734 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8735 0 : if (flags & NDR_IN) {
8736 0 : if (r->in.pszInfPath == NULL) {
8737 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8738 : }
8739 0 : if (r->in.pszEnvironment == NULL) {
8740 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8741 : }
8742 0 : if (r->in.pcchDestInfPath == NULL) {
8743 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8744 : }
8745 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszServer));
8746 0 : if (r->in.pszServer) {
8747 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
8748 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8749 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
8750 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszServer, ndr_charset_length(r->in.pszServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8751 : }
8752 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszInfPath, CH_UTF16)));
8753 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8754 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszInfPath, CH_UTF16)));
8755 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszInfPath, ndr_charset_length(r->in.pszInfPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8756 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
8757 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8758 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
8759 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszEnvironment, ndr_charset_length(r->in.pszEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8760 0 : NDR_CHECK(ndr_push_winspool_UploadPrinterDriverPackageFlags(ndr, NDR_SCALARS, r->in.dwFlags));
8761 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszDestInfPath));
8762 0 : if (r->in.pszDestInfPath) {
8763 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.pcchDestInfPath));
8764 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszDestInfPath, *r->in.pcchDestInfPath, sizeof(uint16_t), CH_UTF16));
8765 : }
8766 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pcchDestInfPath));
8767 : }
8768 0 : if (flags & NDR_OUT) {
8769 0 : if (r->out.pcchDestInfPath == NULL) {
8770 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8771 : }
8772 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pszDestInfPath));
8773 0 : if (r->out.pszDestInfPath) {
8774 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.pcchDestInfPath));
8775 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.pszDestInfPath, *r->out.pcchDestInfPath, sizeof(uint16_t), CH_UTF16));
8776 : }
8777 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcchDestInfPath));
8778 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
8779 : }
8780 0 : return NDR_ERR_SUCCESS;
8781 : }
8782 :
8783 0 : static enum ndr_err_code ndr_pull_winspool_AsyncUploadPrinterDriverPackage(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncUploadPrinterDriverPackage *r)
8784 : {
8785 0 : uint32_t _ptr_pszServer;
8786 0 : uint32_t size_pszServer_1 = 0;
8787 0 : uint32_t length_pszServer_1 = 0;
8788 0 : uint32_t size_pszInfPath_1 = 0;
8789 0 : uint32_t length_pszInfPath_1 = 0;
8790 0 : uint32_t size_pszEnvironment_1 = 0;
8791 0 : uint32_t length_pszEnvironment_1 = 0;
8792 0 : uint32_t _ptr_pszDestInfPath;
8793 0 : uint32_t size_pszDestInfPath_1 = 0;
8794 0 : TALLOC_CTX *_mem_save_pszServer_0 = NULL;
8795 0 : TALLOC_CTX *_mem_save_pszDestInfPath_0 = NULL;
8796 0 : TALLOC_CTX *_mem_save_pcchDestInfPath_0 = NULL;
8797 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8798 0 : if (flags & NDR_IN) {
8799 0 : NDR_ZERO_STRUCT(r->out);
8800 :
8801 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServer));
8802 0 : if (_ptr_pszServer) {
8803 0 : NDR_PULL_ALLOC(ndr, r->in.pszServer);
8804 : } else {
8805 0 : r->in.pszServer = NULL;
8806 : }
8807 0 : if (r->in.pszServer) {
8808 0 : _mem_save_pszServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
8809 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszServer, 0);
8810 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszServer));
8811 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszServer));
8812 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszServer, &size_pszServer_1));
8813 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszServer, &length_pszServer_1));
8814 0 : if (length_pszServer_1 > size_pszServer_1) {
8815 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServer_1, length_pszServer_1);
8816 : }
8817 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServer_1, sizeof(uint16_t)));
8818 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszServer, length_pszServer_1, sizeof(uint16_t), CH_UTF16));
8819 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServer_0, 0);
8820 : }
8821 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszInfPath));
8822 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszInfPath));
8823 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszInfPath, &size_pszInfPath_1));
8824 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszInfPath, &length_pszInfPath_1));
8825 0 : if (length_pszInfPath_1 > size_pszInfPath_1) {
8826 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszInfPath_1, length_pszInfPath_1);
8827 : }
8828 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszInfPath_1, sizeof(uint16_t)));
8829 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszInfPath, length_pszInfPath_1, sizeof(uint16_t), CH_UTF16));
8830 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszEnvironment));
8831 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszEnvironment));
8832 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszEnvironment, &size_pszEnvironment_1));
8833 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszEnvironment, &length_pszEnvironment_1));
8834 0 : if (length_pszEnvironment_1 > size_pszEnvironment_1) {
8835 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszEnvironment_1, length_pszEnvironment_1);
8836 : }
8837 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszEnvironment_1, sizeof(uint16_t)));
8838 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszEnvironment, length_pszEnvironment_1, sizeof(uint16_t), CH_UTF16));
8839 0 : NDR_CHECK(ndr_pull_winspool_UploadPrinterDriverPackageFlags(ndr, NDR_SCALARS, &r->in.dwFlags));
8840 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDestInfPath));
8841 0 : if (_ptr_pszDestInfPath) {
8842 0 : NDR_PULL_ALLOC(ndr, r->in.pszDestInfPath);
8843 : } else {
8844 0 : r->in.pszDestInfPath = NULL;
8845 : }
8846 0 : if (r->in.pszDestInfPath) {
8847 0 : _mem_save_pszDestInfPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
8848 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszDestInfPath, 0);
8849 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszDestInfPath));
8850 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pszDestInfPath, &size_pszDestInfPath_1));
8851 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszDestInfPath, size_pszDestInfPath_1, sizeof(uint16_t), CH_UTF16));
8852 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDestInfPath_0, 0);
8853 : }
8854 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8855 0 : NDR_PULL_ALLOC(ndr, r->in.pcchDestInfPath);
8856 : }
8857 0 : _mem_save_pcchDestInfPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
8858 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pcchDestInfPath, LIBNDR_FLAG_REF_ALLOC);
8859 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pcchDestInfPath));
8860 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcchDestInfPath_0, LIBNDR_FLAG_REF_ALLOC);
8861 0 : NDR_PULL_ALLOC(ndr, r->out.pcchDestInfPath);
8862 0 : *r->out.pcchDestInfPath = *r->in.pcchDestInfPath;
8863 0 : if (r->in.pszDestInfPath) {
8864 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pszDestInfPath, *r->in.pcchDestInfPath));
8865 : }
8866 : }
8867 0 : if (flags & NDR_OUT) {
8868 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8869 : if (r->in.pcchDestInfPath == NULL) {
8870 : NDR_PULL_ALLOC(ndr, r->in.pcchDestInfPath);
8871 : NDR_ZERO_STRUCTP(r->in.pcchDestInfPath);
8872 : }
8873 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8874 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDestInfPath));
8875 0 : if (_ptr_pszDestInfPath) {
8876 0 : NDR_PULL_ALLOC(ndr, r->out.pszDestInfPath);
8877 : } else {
8878 0 : r->out.pszDestInfPath = NULL;
8879 : }
8880 0 : if (r->out.pszDestInfPath) {
8881 0 : _mem_save_pszDestInfPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
8882 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pszDestInfPath, 0);
8883 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pszDestInfPath));
8884 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pszDestInfPath, &size_pszDestInfPath_1));
8885 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.pszDestInfPath, size_pszDestInfPath_1, sizeof(uint16_t), CH_UTF16));
8886 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDestInfPath_0, 0);
8887 : }
8888 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8889 0 : NDR_PULL_ALLOC(ndr, r->out.pcchDestInfPath);
8890 : }
8891 0 : _mem_save_pcchDestInfPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
8892 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcchDestInfPath, LIBNDR_FLAG_REF_ALLOC);
8893 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcchDestInfPath));
8894 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcchDestInfPath_0, LIBNDR_FLAG_REF_ALLOC);
8895 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
8896 0 : if (r->out.pszDestInfPath) {
8897 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pszDestInfPath, *r->out.pcchDestInfPath));
8898 : }
8899 : }
8900 0 : return NDR_ERR_SUCCESS;
8901 : }
8902 :
8903 0 : _PUBLIC_ void ndr_print_winspool_AsyncUploadPrinterDriverPackage(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncUploadPrinterDriverPackage *r)
8904 : {
8905 0 : ndr_print_struct(ndr, name, "winspool_AsyncUploadPrinterDriverPackage");
8906 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8907 0 : ndr->depth++;
8908 0 : if (flags & NDR_SET_VALUES) {
8909 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8910 : }
8911 0 : if (flags & NDR_IN) {
8912 0 : ndr_print_struct(ndr, "in", "winspool_AsyncUploadPrinterDriverPackage");
8913 0 : ndr->depth++;
8914 0 : ndr_print_ptr(ndr, "pszServer", r->in.pszServer);
8915 0 : ndr->depth++;
8916 0 : if (r->in.pszServer) {
8917 0 : ndr_print_string(ndr, "pszServer", r->in.pszServer);
8918 : }
8919 0 : ndr->depth--;
8920 0 : ndr_print_ptr(ndr, "pszInfPath", r->in.pszInfPath);
8921 0 : ndr->depth++;
8922 0 : ndr_print_string(ndr, "pszInfPath", r->in.pszInfPath);
8923 0 : ndr->depth--;
8924 0 : ndr_print_ptr(ndr, "pszEnvironment", r->in.pszEnvironment);
8925 0 : ndr->depth++;
8926 0 : ndr_print_string(ndr, "pszEnvironment", r->in.pszEnvironment);
8927 0 : ndr->depth--;
8928 0 : ndr_print_winspool_UploadPrinterDriverPackageFlags(ndr, "dwFlags", r->in.dwFlags);
8929 0 : ndr_print_ptr(ndr, "pszDestInfPath", r->in.pszDestInfPath);
8930 0 : ndr->depth++;
8931 0 : if (r->in.pszDestInfPath) {
8932 0 : ndr_print_string(ndr, "pszDestInfPath", r->in.pszDestInfPath);
8933 : }
8934 0 : ndr->depth--;
8935 0 : ndr_print_ptr(ndr, "pcchDestInfPath", r->in.pcchDestInfPath);
8936 0 : ndr->depth++;
8937 0 : ndr_print_uint32(ndr, "pcchDestInfPath", *r->in.pcchDestInfPath);
8938 0 : ndr->depth--;
8939 0 : ndr->depth--;
8940 : }
8941 0 : if (flags & NDR_OUT) {
8942 0 : ndr_print_struct(ndr, "out", "winspool_AsyncUploadPrinterDriverPackage");
8943 0 : ndr->depth++;
8944 0 : ndr_print_ptr(ndr, "pszDestInfPath", r->out.pszDestInfPath);
8945 0 : ndr->depth++;
8946 0 : if (r->out.pszDestInfPath) {
8947 0 : ndr_print_string(ndr, "pszDestInfPath", r->out.pszDestInfPath);
8948 : }
8949 0 : ndr->depth--;
8950 0 : ndr_print_ptr(ndr, "pcchDestInfPath", r->out.pcchDestInfPath);
8951 0 : ndr->depth++;
8952 0 : ndr_print_uint32(ndr, "pcchDestInfPath", *r->out.pcchDestInfPath);
8953 0 : ndr->depth--;
8954 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
8955 0 : ndr->depth--;
8956 : }
8957 0 : ndr->depth--;
8958 : }
8959 :
8960 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncGetCorePrinterDrivers(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetCorePrinterDrivers *r)
8961 : {
8962 0 : uint32_t cntr_pszzCoreDriverDependencies_1;
8963 0 : uint32_t cntr_pCorePrinterDrivers_1;
8964 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8965 0 : if (flags & NDR_IN) {
8966 0 : if (r->in.pszEnvironment == NULL) {
8967 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8968 : }
8969 0 : if (r->in.pszzCoreDriverDependencies == NULL) {
8970 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8971 : }
8972 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszServer));
8973 0 : if (r->in.pszServer) {
8974 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
8975 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8976 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
8977 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszServer, ndr_charset_length(r->in.pszServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8978 : }
8979 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
8980 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8981 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
8982 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszEnvironment, ndr_charset_length(r->in.pszEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8983 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cchCoreDrivers));
8984 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cchCoreDrivers));
8985 0 : for (cntr_pszzCoreDriverDependencies_1 = 0; cntr_pszzCoreDriverDependencies_1 < (r->in.cchCoreDrivers); cntr_pszzCoreDriverDependencies_1++) {
8986 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.pszzCoreDriverDependencies[cntr_pszzCoreDriverDependencies_1]));
8987 : }
8988 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cCorePrinterDrivers));
8989 : }
8990 0 : if (flags & NDR_OUT) {
8991 0 : if (r->out.pCorePrinterDrivers == NULL) {
8992 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8993 : }
8994 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cCorePrinterDrivers));
8995 0 : for (cntr_pCorePrinterDrivers_1 = 0; cntr_pCorePrinterDrivers_1 < (r->in.cCorePrinterDrivers); cntr_pCorePrinterDrivers_1++) {
8996 0 : NDR_CHECK(ndr_push_spoolss_CorePrinterDriver(ndr, NDR_SCALARS, &r->out.pCorePrinterDrivers[cntr_pCorePrinterDrivers_1]));
8997 : }
8998 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
8999 : }
9000 0 : return NDR_ERR_SUCCESS;
9001 : }
9002 :
9003 14 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncGetCorePrinterDrivers(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetCorePrinterDrivers *r)
9004 : {
9005 14 : uint32_t _ptr_pszServer;
9006 14 : uint32_t size_pszServer_1 = 0;
9007 14 : uint32_t length_pszServer_1 = 0;
9008 14 : uint32_t size_pszEnvironment_1 = 0;
9009 14 : uint32_t length_pszEnvironment_1 = 0;
9010 14 : uint32_t size_pszzCoreDriverDependencies_1 = 0;
9011 14 : uint32_t cntr_pszzCoreDriverDependencies_1;
9012 14 : uint32_t size_pCorePrinterDrivers_1 = 0;
9013 14 : uint32_t cntr_pCorePrinterDrivers_1;
9014 14 : TALLOC_CTX *_mem_save_pszServer_0 = NULL;
9015 14 : TALLOC_CTX *_mem_save_pszzCoreDriverDependencies_1 = NULL;
9016 14 : TALLOC_CTX *_mem_save_pCorePrinterDrivers_1 = NULL;
9017 14 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9018 14 : if (flags & NDR_IN) {
9019 10 : NDR_ZERO_STRUCT(r->out);
9020 :
9021 10 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServer));
9022 10 : if (_ptr_pszServer) {
9023 10 : NDR_PULL_ALLOC(ndr, r->in.pszServer);
9024 : } else {
9025 0 : r->in.pszServer = NULL;
9026 : }
9027 10 : if (r->in.pszServer) {
9028 10 : _mem_save_pszServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9029 10 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszServer, 0);
9030 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszServer));
9031 10 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszServer));
9032 10 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszServer, &size_pszServer_1));
9033 10 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszServer, &length_pszServer_1));
9034 10 : if (length_pszServer_1 > size_pszServer_1) {
9035 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServer_1, length_pszServer_1);
9036 : }
9037 10 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServer_1, sizeof(uint16_t)));
9038 10 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszServer, length_pszServer_1, sizeof(uint16_t), CH_UTF16));
9039 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServer_0, 0);
9040 : }
9041 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszEnvironment));
9042 10 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszEnvironment));
9043 10 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszEnvironment, &size_pszEnvironment_1));
9044 10 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszEnvironment, &length_pszEnvironment_1));
9045 10 : if (length_pszEnvironment_1 > size_pszEnvironment_1) {
9046 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszEnvironment_1, length_pszEnvironment_1);
9047 : }
9048 10 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszEnvironment_1, sizeof(uint16_t)));
9049 10 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszEnvironment, length_pszEnvironment_1, sizeof(uint16_t), CH_UTF16));
9050 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cchCoreDrivers));
9051 10 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszzCoreDriverDependencies));
9052 10 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pszzCoreDriverDependencies, &size_pszzCoreDriverDependencies_1));
9053 10 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9054 10 : NDR_PULL_ALLOC_N(ndr, r->in.pszzCoreDriverDependencies, size_pszzCoreDriverDependencies_1);
9055 : }
9056 10 : _mem_save_pszzCoreDriverDependencies_1 = NDR_PULL_GET_MEM_CTX(ndr);
9057 10 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszzCoreDriverDependencies, 0);
9058 540 : for (cntr_pszzCoreDriverDependencies_1 = 0; cntr_pszzCoreDriverDependencies_1 < (size_pszzCoreDriverDependencies_1); cntr_pszzCoreDriverDependencies_1++) {
9059 530 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.pszzCoreDriverDependencies[cntr_pszzCoreDriverDependencies_1]));
9060 : }
9061 10 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszzCoreDriverDependencies_1, 0);
9062 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cCorePrinterDrivers));
9063 10 : NDR_PULL_ALLOC_N(ndr, r->out.pCorePrinterDrivers, r->in.cCorePrinterDrivers);
9064 10 : memset(r->out.pCorePrinterDrivers, 0, (r->in.cCorePrinterDrivers) * sizeof(*r->out.pCorePrinterDrivers));
9065 10 : if (r->in.pszzCoreDriverDependencies) {
9066 10 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pszzCoreDriverDependencies, r->in.cchCoreDrivers));
9067 : }
9068 : }
9069 14 : if (flags & NDR_OUT) {
9070 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9071 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9072 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pCorePrinterDrivers));
9073 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pCorePrinterDrivers, &size_pCorePrinterDrivers_1));
9074 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9075 4 : NDR_PULL_ALLOC_N(ndr, r->out.pCorePrinterDrivers, size_pCorePrinterDrivers_1);
9076 : }
9077 4 : _mem_save_pCorePrinterDrivers_1 = NDR_PULL_GET_MEM_CTX(ndr);
9078 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pCorePrinterDrivers, 0);
9079 8 : for (cntr_pCorePrinterDrivers_1 = 0; cntr_pCorePrinterDrivers_1 < (size_pCorePrinterDrivers_1); cntr_pCorePrinterDrivers_1++) {
9080 4 : NDR_CHECK(ndr_pull_spoolss_CorePrinterDriver(ndr, NDR_SCALARS, &r->out.pCorePrinterDrivers[cntr_pCorePrinterDrivers_1]));
9081 : }
9082 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pCorePrinterDrivers_1, 0);
9083 4 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
9084 4 : if (r->out.pCorePrinterDrivers) {
9085 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pCorePrinterDrivers, r->in.cCorePrinterDrivers));
9086 : }
9087 : }
9088 0 : return NDR_ERR_SUCCESS;
9089 : }
9090 :
9091 14 : _PUBLIC_ void ndr_print_winspool_AsyncGetCorePrinterDrivers(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetCorePrinterDrivers *r)
9092 : {
9093 14 : uint32_t cntr_pszzCoreDriverDependencies_1;
9094 14 : uint32_t cntr_pCorePrinterDrivers_1;
9095 14 : ndr_print_struct(ndr, name, "winspool_AsyncGetCorePrinterDrivers");
9096 14 : if (r == NULL) { ndr_print_null(ndr); return; }
9097 14 : ndr->depth++;
9098 14 : if (flags & NDR_SET_VALUES) {
9099 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9100 : }
9101 14 : if (flags & NDR_IN) {
9102 10 : ndr_print_struct(ndr, "in", "winspool_AsyncGetCorePrinterDrivers");
9103 10 : ndr->depth++;
9104 10 : ndr_print_ptr(ndr, "pszServer", r->in.pszServer);
9105 10 : ndr->depth++;
9106 10 : if (r->in.pszServer) {
9107 10 : ndr_print_string(ndr, "pszServer", r->in.pszServer);
9108 : }
9109 10 : ndr->depth--;
9110 10 : ndr_print_ptr(ndr, "pszEnvironment", r->in.pszEnvironment);
9111 10 : ndr->depth++;
9112 10 : ndr_print_string(ndr, "pszEnvironment", r->in.pszEnvironment);
9113 10 : ndr->depth--;
9114 10 : ndr_print_uint32(ndr, "cchCoreDrivers", r->in.cchCoreDrivers);
9115 10 : ndr_print_ptr(ndr, "pszzCoreDriverDependencies", r->in.pszzCoreDriverDependencies);
9116 10 : ndr->depth++;
9117 10 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pszzCoreDriverDependencies", (uint32_t)(r->in.cchCoreDrivers));
9118 10 : ndr->depth++;
9119 540 : for (cntr_pszzCoreDriverDependencies_1 = 0; cntr_pszzCoreDriverDependencies_1 < (r->in.cchCoreDrivers); cntr_pszzCoreDriverDependencies_1++) {
9120 530 : ndr_print_uint16(ndr, "pszzCoreDriverDependencies", r->in.pszzCoreDriverDependencies[cntr_pszzCoreDriverDependencies_1]);
9121 : }
9122 10 : ndr->depth--;
9123 10 : ndr->depth--;
9124 10 : ndr_print_uint32(ndr, "cCorePrinterDrivers", r->in.cCorePrinterDrivers);
9125 10 : ndr->depth--;
9126 : }
9127 14 : if (flags & NDR_OUT) {
9128 4 : ndr_print_struct(ndr, "out", "winspool_AsyncGetCorePrinterDrivers");
9129 4 : ndr->depth++;
9130 4 : ndr_print_ptr(ndr, "pCorePrinterDrivers", r->out.pCorePrinterDrivers);
9131 4 : ndr->depth++;
9132 4 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pCorePrinterDrivers", (uint32_t)(r->in.cCorePrinterDrivers));
9133 4 : ndr->depth++;
9134 8 : for (cntr_pCorePrinterDrivers_1 = 0; cntr_pCorePrinterDrivers_1 < (r->in.cCorePrinterDrivers); cntr_pCorePrinterDrivers_1++) {
9135 4 : ndr_print_spoolss_CorePrinterDriver(ndr, "pCorePrinterDrivers", &r->out.pCorePrinterDrivers[cntr_pCorePrinterDrivers_1]);
9136 : }
9137 4 : ndr->depth--;
9138 4 : ndr->depth--;
9139 4 : ndr_print_HRESULT(ndr, "result", r->out.result);
9140 4 : ndr->depth--;
9141 : }
9142 14 : ndr->depth--;
9143 : }
9144 :
9145 0 : static enum ndr_err_code ndr_push_winspool_AsyncCorePrinterDriverInstalled(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncCorePrinterDriverInstalled *r)
9146 : {
9147 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9148 0 : if (flags & NDR_IN) {
9149 0 : if (r->in.pszEnvironment == NULL) {
9150 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9151 : }
9152 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszServer));
9153 0 : if (r->in.pszServer) {
9154 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
9155 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9156 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
9157 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszServer, ndr_charset_length(r->in.pszServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9158 : }
9159 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
9160 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9161 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
9162 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszEnvironment, ndr_charset_length(r->in.pszEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9163 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->in.CoreDriverGUID));
9164 0 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->in.ftDriverDate));
9165 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.dwlDriverVersion));
9166 : }
9167 0 : if (flags & NDR_OUT) {
9168 0 : if (r->out.pbDriverInstalled == NULL) {
9169 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9170 : }
9171 0 : NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, *r->out.pbDriverInstalled));
9172 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
9173 : }
9174 0 : return NDR_ERR_SUCCESS;
9175 : }
9176 :
9177 0 : static enum ndr_err_code ndr_pull_winspool_AsyncCorePrinterDriverInstalled(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncCorePrinterDriverInstalled *r)
9178 : {
9179 0 : uint32_t _ptr_pszServer;
9180 0 : uint32_t size_pszServer_1 = 0;
9181 0 : uint32_t length_pszServer_1 = 0;
9182 0 : uint32_t size_pszEnvironment_1 = 0;
9183 0 : uint32_t length_pszEnvironment_1 = 0;
9184 0 : TALLOC_CTX *_mem_save_pszServer_0 = NULL;
9185 0 : TALLOC_CTX *_mem_save_pbDriverInstalled_0 = NULL;
9186 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9187 0 : if (flags & NDR_IN) {
9188 0 : NDR_ZERO_STRUCT(r->out);
9189 :
9190 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServer));
9191 0 : if (_ptr_pszServer) {
9192 0 : NDR_PULL_ALLOC(ndr, r->in.pszServer);
9193 : } else {
9194 0 : r->in.pszServer = NULL;
9195 : }
9196 0 : if (r->in.pszServer) {
9197 0 : _mem_save_pszServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9198 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszServer, 0);
9199 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszServer));
9200 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszServer));
9201 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszServer, &size_pszServer_1));
9202 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszServer, &length_pszServer_1));
9203 0 : if (length_pszServer_1 > size_pszServer_1) {
9204 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServer_1, length_pszServer_1);
9205 : }
9206 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServer_1, sizeof(uint16_t)));
9207 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszServer, length_pszServer_1, sizeof(uint16_t), CH_UTF16));
9208 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServer_0, 0);
9209 : }
9210 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszEnvironment));
9211 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszEnvironment));
9212 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszEnvironment, &size_pszEnvironment_1));
9213 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszEnvironment, &length_pszEnvironment_1));
9214 0 : if (length_pszEnvironment_1 > size_pszEnvironment_1) {
9215 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszEnvironment_1, length_pszEnvironment_1);
9216 : }
9217 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszEnvironment_1, sizeof(uint16_t)));
9218 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszEnvironment, length_pszEnvironment_1, sizeof(uint16_t), CH_UTF16));
9219 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->in.CoreDriverGUID));
9220 0 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->in.ftDriverDate));
9221 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.dwlDriverVersion));
9222 0 : NDR_PULL_ALLOC(ndr, r->out.pbDriverInstalled);
9223 0 : NDR_ZERO_STRUCTP(r->out.pbDriverInstalled);
9224 : }
9225 0 : if (flags & NDR_OUT) {
9226 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9227 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9228 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9229 0 : NDR_PULL_ALLOC(ndr, r->out.pbDriverInstalled);
9230 : }
9231 0 : _mem_save_pbDriverInstalled_0 = NDR_PULL_GET_MEM_CTX(ndr);
9232 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pbDriverInstalled, LIBNDR_FLAG_REF_ALLOC);
9233 0 : NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, r->out.pbDriverInstalled));
9234 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pbDriverInstalled_0, LIBNDR_FLAG_REF_ALLOC);
9235 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
9236 : }
9237 0 : return NDR_ERR_SUCCESS;
9238 : }
9239 :
9240 0 : _PUBLIC_ void ndr_print_winspool_AsyncCorePrinterDriverInstalled(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncCorePrinterDriverInstalled *r)
9241 : {
9242 0 : ndr_print_struct(ndr, name, "winspool_AsyncCorePrinterDriverInstalled");
9243 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9244 0 : ndr->depth++;
9245 0 : if (flags & NDR_SET_VALUES) {
9246 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9247 : }
9248 0 : if (flags & NDR_IN) {
9249 0 : ndr_print_struct(ndr, "in", "winspool_AsyncCorePrinterDriverInstalled");
9250 0 : ndr->depth++;
9251 0 : ndr_print_ptr(ndr, "pszServer", r->in.pszServer);
9252 0 : ndr->depth++;
9253 0 : if (r->in.pszServer) {
9254 0 : ndr_print_string(ndr, "pszServer", r->in.pszServer);
9255 : }
9256 0 : ndr->depth--;
9257 0 : ndr_print_ptr(ndr, "pszEnvironment", r->in.pszEnvironment);
9258 0 : ndr->depth++;
9259 0 : ndr_print_string(ndr, "pszEnvironment", r->in.pszEnvironment);
9260 0 : ndr->depth--;
9261 0 : ndr_print_GUID(ndr, "CoreDriverGUID", &r->in.CoreDriverGUID);
9262 0 : ndr_print_NTTIME(ndr, "ftDriverDate", r->in.ftDriverDate);
9263 0 : ndr_print_hyper(ndr, "dwlDriverVersion", r->in.dwlDriverVersion);
9264 0 : ndr->depth--;
9265 : }
9266 0 : if (flags & NDR_OUT) {
9267 0 : ndr_print_struct(ndr, "out", "winspool_AsyncCorePrinterDriverInstalled");
9268 0 : ndr->depth++;
9269 0 : ndr_print_ptr(ndr, "pbDriverInstalled", r->out.pbDriverInstalled);
9270 0 : ndr->depth++;
9271 0 : ndr_print_int32(ndr, "pbDriverInstalled", *r->out.pbDriverInstalled);
9272 0 : ndr->depth--;
9273 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
9274 0 : ndr->depth--;
9275 : }
9276 0 : ndr->depth--;
9277 : }
9278 :
9279 0 : static enum ndr_err_code ndr_push_winspool_AsyncGetPrinterDriverPackagePath(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDriverPackagePath *r)
9280 : {
9281 0 : uint32_t cntr_pszDriverPackageCab_1;
9282 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9283 0 : if (flags & NDR_IN) {
9284 0 : if (r->in.pszEnvironment == NULL) {
9285 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9286 : }
9287 0 : if (r->in.pszPackageID == NULL) {
9288 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9289 : }
9290 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszServer));
9291 0 : if (r->in.pszServer) {
9292 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
9293 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9294 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
9295 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszServer, ndr_charset_length(r->in.pszServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9296 : }
9297 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
9298 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9299 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
9300 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszEnvironment, ndr_charset_length(r->in.pszEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9301 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszLanguage));
9302 0 : if (r->in.pszLanguage) {
9303 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszLanguage, CH_UTF16)));
9304 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9305 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszLanguage, CH_UTF16)));
9306 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszLanguage, ndr_charset_length(r->in.pszLanguage, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9307 : }
9308 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszPackageID, CH_UTF16)));
9309 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9310 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszPackageID, CH_UTF16)));
9311 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszPackageID, ndr_charset_length(r->in.pszPackageID, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9312 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszDriverPackageCab));
9313 0 : if (r->in.pszDriverPackageCab) {
9314 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cchDriverPackageCab));
9315 0 : for (cntr_pszDriverPackageCab_1 = 0; cntr_pszDriverPackageCab_1 < (r->in.cchDriverPackageCab); cntr_pszDriverPackageCab_1++) {
9316 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.pszDriverPackageCab[cntr_pszDriverPackageCab_1]));
9317 : }
9318 : }
9319 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cchDriverPackageCab));
9320 : }
9321 0 : if (flags & NDR_OUT) {
9322 0 : if (r->out.pcchRequiredSize == NULL) {
9323 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9324 : }
9325 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.pszDriverPackageCab));
9326 0 : if (r->out.pszDriverPackageCab) {
9327 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cchDriverPackageCab));
9328 0 : for (cntr_pszDriverPackageCab_1 = 0; cntr_pszDriverPackageCab_1 < (r->in.cchDriverPackageCab); cntr_pszDriverPackageCab_1++) {
9329 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.pszDriverPackageCab[cntr_pszDriverPackageCab_1]));
9330 : }
9331 : }
9332 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcchRequiredSize));
9333 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
9334 : }
9335 0 : return NDR_ERR_SUCCESS;
9336 : }
9337 :
9338 0 : static enum ndr_err_code ndr_pull_winspool_AsyncGetPrinterDriverPackagePath(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetPrinterDriverPackagePath *r)
9339 : {
9340 0 : uint32_t _ptr_pszServer;
9341 0 : uint32_t size_pszServer_1 = 0;
9342 0 : uint32_t length_pszServer_1 = 0;
9343 0 : uint32_t size_pszEnvironment_1 = 0;
9344 0 : uint32_t length_pszEnvironment_1 = 0;
9345 0 : uint32_t _ptr_pszLanguage;
9346 0 : uint32_t size_pszLanguage_1 = 0;
9347 0 : uint32_t length_pszLanguage_1 = 0;
9348 0 : uint32_t size_pszPackageID_1 = 0;
9349 0 : uint32_t length_pszPackageID_1 = 0;
9350 0 : uint32_t _ptr_pszDriverPackageCab;
9351 0 : uint32_t size_pszDriverPackageCab_1 = 0;
9352 0 : uint32_t cntr_pszDriverPackageCab_1;
9353 0 : TALLOC_CTX *_mem_save_pszServer_0 = NULL;
9354 0 : TALLOC_CTX *_mem_save_pszLanguage_0 = NULL;
9355 0 : TALLOC_CTX *_mem_save_pszDriverPackageCab_0 = NULL;
9356 0 : TALLOC_CTX *_mem_save_pszDriverPackageCab_1 = NULL;
9357 0 : TALLOC_CTX *_mem_save_pcchRequiredSize_0 = NULL;
9358 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9359 0 : if (flags & NDR_IN) {
9360 0 : NDR_ZERO_STRUCT(r->out);
9361 :
9362 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServer));
9363 0 : if (_ptr_pszServer) {
9364 0 : NDR_PULL_ALLOC(ndr, r->in.pszServer);
9365 : } else {
9366 0 : r->in.pszServer = NULL;
9367 : }
9368 0 : if (r->in.pszServer) {
9369 0 : _mem_save_pszServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9370 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszServer, 0);
9371 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszServer));
9372 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszServer));
9373 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszServer, &size_pszServer_1));
9374 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszServer, &length_pszServer_1));
9375 0 : if (length_pszServer_1 > size_pszServer_1) {
9376 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServer_1, length_pszServer_1);
9377 : }
9378 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServer_1, sizeof(uint16_t)));
9379 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszServer, length_pszServer_1, sizeof(uint16_t), CH_UTF16));
9380 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServer_0, 0);
9381 : }
9382 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszEnvironment));
9383 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszEnvironment));
9384 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszEnvironment, &size_pszEnvironment_1));
9385 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszEnvironment, &length_pszEnvironment_1));
9386 0 : if (length_pszEnvironment_1 > size_pszEnvironment_1) {
9387 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszEnvironment_1, length_pszEnvironment_1);
9388 : }
9389 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszEnvironment_1, sizeof(uint16_t)));
9390 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszEnvironment, length_pszEnvironment_1, sizeof(uint16_t), CH_UTF16));
9391 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszLanguage));
9392 0 : if (_ptr_pszLanguage) {
9393 0 : NDR_PULL_ALLOC(ndr, r->in.pszLanguage);
9394 : } else {
9395 0 : r->in.pszLanguage = NULL;
9396 : }
9397 0 : if (r->in.pszLanguage) {
9398 0 : _mem_save_pszLanguage_0 = NDR_PULL_GET_MEM_CTX(ndr);
9399 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszLanguage, 0);
9400 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszLanguage));
9401 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszLanguage));
9402 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszLanguage, &size_pszLanguage_1));
9403 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszLanguage, &length_pszLanguage_1));
9404 0 : if (length_pszLanguage_1 > size_pszLanguage_1) {
9405 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszLanguage_1, length_pszLanguage_1);
9406 : }
9407 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszLanguage_1, sizeof(uint16_t)));
9408 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszLanguage, length_pszLanguage_1, sizeof(uint16_t), CH_UTF16));
9409 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszLanguage_0, 0);
9410 : }
9411 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszPackageID));
9412 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszPackageID));
9413 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszPackageID, &size_pszPackageID_1));
9414 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszPackageID, &length_pszPackageID_1));
9415 0 : if (length_pszPackageID_1 > size_pszPackageID_1) {
9416 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszPackageID_1, length_pszPackageID_1);
9417 : }
9418 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszPackageID_1, sizeof(uint16_t)));
9419 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszPackageID, length_pszPackageID_1, sizeof(uint16_t), CH_UTF16));
9420 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDriverPackageCab));
9421 0 : if (_ptr_pszDriverPackageCab) {
9422 0 : NDR_PULL_ALLOC(ndr, r->in.pszDriverPackageCab);
9423 : } else {
9424 0 : r->in.pszDriverPackageCab = NULL;
9425 : }
9426 0 : if (r->in.pszDriverPackageCab) {
9427 0 : _mem_save_pszDriverPackageCab_0 = NDR_PULL_GET_MEM_CTX(ndr);
9428 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszDriverPackageCab, 0);
9429 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszDriverPackageCab));
9430 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.pszDriverPackageCab, &size_pszDriverPackageCab_1));
9431 0 : NDR_PULL_ALLOC_N(ndr, r->in.pszDriverPackageCab, size_pszDriverPackageCab_1);
9432 0 : _mem_save_pszDriverPackageCab_1 = NDR_PULL_GET_MEM_CTX(ndr);
9433 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszDriverPackageCab, 0);
9434 0 : for (cntr_pszDriverPackageCab_1 = 0; cntr_pszDriverPackageCab_1 < (size_pszDriverPackageCab_1); cntr_pszDriverPackageCab_1++) {
9435 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.pszDriverPackageCab[cntr_pszDriverPackageCab_1]));
9436 : }
9437 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDriverPackageCab_1, 0);
9438 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDriverPackageCab_0, 0);
9439 : }
9440 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cchDriverPackageCab));
9441 0 : NDR_PULL_ALLOC(ndr, r->out.pcchRequiredSize);
9442 0 : NDR_ZERO_STRUCTP(r->out.pcchRequiredSize);
9443 0 : if (r->in.pszDriverPackageCab) {
9444 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.pszDriverPackageCab, r->in.cchDriverPackageCab));
9445 : }
9446 : }
9447 0 : if (flags & NDR_OUT) {
9448 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9449 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9450 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszDriverPackageCab));
9451 0 : if (_ptr_pszDriverPackageCab) {
9452 0 : NDR_PULL_ALLOC(ndr, r->out.pszDriverPackageCab);
9453 : } else {
9454 0 : r->out.pszDriverPackageCab = NULL;
9455 : }
9456 0 : if (r->out.pszDriverPackageCab) {
9457 0 : _mem_save_pszDriverPackageCab_0 = NDR_PULL_GET_MEM_CTX(ndr);
9458 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pszDriverPackageCab, 0);
9459 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pszDriverPackageCab));
9460 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pszDriverPackageCab, &size_pszDriverPackageCab_1));
9461 0 : NDR_PULL_ALLOC_N(ndr, r->out.pszDriverPackageCab, size_pszDriverPackageCab_1);
9462 0 : _mem_save_pszDriverPackageCab_1 = NDR_PULL_GET_MEM_CTX(ndr);
9463 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pszDriverPackageCab, 0);
9464 0 : for (cntr_pszDriverPackageCab_1 = 0; cntr_pszDriverPackageCab_1 < (size_pszDriverPackageCab_1); cntr_pszDriverPackageCab_1++) {
9465 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.pszDriverPackageCab[cntr_pszDriverPackageCab_1]));
9466 : }
9467 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDriverPackageCab_1, 0);
9468 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszDriverPackageCab_0, 0);
9469 : }
9470 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9471 0 : NDR_PULL_ALLOC(ndr, r->out.pcchRequiredSize);
9472 : }
9473 0 : _mem_save_pcchRequiredSize_0 = NDR_PULL_GET_MEM_CTX(ndr);
9474 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcchRequiredSize, LIBNDR_FLAG_REF_ALLOC);
9475 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcchRequiredSize));
9476 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcchRequiredSize_0, LIBNDR_FLAG_REF_ALLOC);
9477 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
9478 0 : if (r->out.pszDriverPackageCab) {
9479 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pszDriverPackageCab, r->in.cchDriverPackageCab));
9480 : }
9481 : }
9482 0 : return NDR_ERR_SUCCESS;
9483 : }
9484 :
9485 0 : _PUBLIC_ void ndr_print_winspool_AsyncGetPrinterDriverPackagePath(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetPrinterDriverPackagePath *r)
9486 : {
9487 0 : uint32_t cntr_pszDriverPackageCab_1;
9488 0 : ndr_print_struct(ndr, name, "winspool_AsyncGetPrinterDriverPackagePath");
9489 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9490 0 : ndr->depth++;
9491 0 : if (flags & NDR_SET_VALUES) {
9492 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9493 : }
9494 0 : if (flags & NDR_IN) {
9495 0 : ndr_print_struct(ndr, "in", "winspool_AsyncGetPrinterDriverPackagePath");
9496 0 : ndr->depth++;
9497 0 : ndr_print_ptr(ndr, "pszServer", r->in.pszServer);
9498 0 : ndr->depth++;
9499 0 : if (r->in.pszServer) {
9500 0 : ndr_print_string(ndr, "pszServer", r->in.pszServer);
9501 : }
9502 0 : ndr->depth--;
9503 0 : ndr_print_ptr(ndr, "pszEnvironment", r->in.pszEnvironment);
9504 0 : ndr->depth++;
9505 0 : ndr_print_string(ndr, "pszEnvironment", r->in.pszEnvironment);
9506 0 : ndr->depth--;
9507 0 : ndr_print_ptr(ndr, "pszLanguage", r->in.pszLanguage);
9508 0 : ndr->depth++;
9509 0 : if (r->in.pszLanguage) {
9510 0 : ndr_print_string(ndr, "pszLanguage", r->in.pszLanguage);
9511 : }
9512 0 : ndr->depth--;
9513 0 : ndr_print_ptr(ndr, "pszPackageID", r->in.pszPackageID);
9514 0 : ndr->depth++;
9515 0 : ndr_print_string(ndr, "pszPackageID", r->in.pszPackageID);
9516 0 : ndr->depth--;
9517 0 : ndr_print_ptr(ndr, "pszDriverPackageCab", r->in.pszDriverPackageCab);
9518 0 : ndr->depth++;
9519 0 : if (r->in.pszDriverPackageCab) {
9520 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pszDriverPackageCab", (uint32_t)(r->in.cchDriverPackageCab));
9521 0 : ndr->depth++;
9522 0 : for (cntr_pszDriverPackageCab_1 = 0; cntr_pszDriverPackageCab_1 < (r->in.cchDriverPackageCab); cntr_pszDriverPackageCab_1++) {
9523 0 : ndr_print_uint16(ndr, "pszDriverPackageCab", r->in.pszDriverPackageCab[cntr_pszDriverPackageCab_1]);
9524 : }
9525 0 : ndr->depth--;
9526 : }
9527 0 : ndr->depth--;
9528 0 : ndr_print_uint32(ndr, "cchDriverPackageCab", r->in.cchDriverPackageCab);
9529 0 : ndr->depth--;
9530 : }
9531 0 : if (flags & NDR_OUT) {
9532 0 : ndr_print_struct(ndr, "out", "winspool_AsyncGetPrinterDriverPackagePath");
9533 0 : ndr->depth++;
9534 0 : ndr_print_ptr(ndr, "pszDriverPackageCab", r->out.pszDriverPackageCab);
9535 0 : ndr->depth++;
9536 0 : if (r->out.pszDriverPackageCab) {
9537 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pszDriverPackageCab", (uint32_t)(r->in.cchDriverPackageCab));
9538 0 : ndr->depth++;
9539 0 : for (cntr_pszDriverPackageCab_1 = 0; cntr_pszDriverPackageCab_1 < (r->in.cchDriverPackageCab); cntr_pszDriverPackageCab_1++) {
9540 0 : ndr_print_uint16(ndr, "pszDriverPackageCab", r->out.pszDriverPackageCab[cntr_pszDriverPackageCab_1]);
9541 : }
9542 0 : ndr->depth--;
9543 : }
9544 0 : ndr->depth--;
9545 0 : ndr_print_ptr(ndr, "pcchRequiredSize", r->out.pcchRequiredSize);
9546 0 : ndr->depth++;
9547 0 : ndr_print_uint32(ndr, "pcchRequiredSize", *r->out.pcchRequiredSize);
9548 0 : ndr->depth--;
9549 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
9550 0 : ndr->depth--;
9551 : }
9552 0 : ndr->depth--;
9553 : }
9554 :
9555 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeletePrinterDriverPackage(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDriverPackage *r)
9556 : {
9557 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9558 0 : if (flags & NDR_IN) {
9559 0 : if (r->in.pszInfPath == NULL) {
9560 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9561 : }
9562 0 : if (r->in.pszEnvironment == NULL) {
9563 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9564 : }
9565 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pszServer));
9566 0 : if (r->in.pszServer) {
9567 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
9568 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9569 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszServer, CH_UTF16)));
9570 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszServer, ndr_charset_length(r->in.pszServer, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9571 : }
9572 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszInfPath, CH_UTF16)));
9573 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9574 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszInfPath, CH_UTF16)));
9575 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszInfPath, ndr_charset_length(r->in.pszInfPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9576 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
9577 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9578 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszEnvironment, CH_UTF16)));
9579 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszEnvironment, ndr_charset_length(r->in.pszEnvironment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9580 : }
9581 0 : if (flags & NDR_OUT) {
9582 0 : NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
9583 : }
9584 0 : return NDR_ERR_SUCCESS;
9585 : }
9586 :
9587 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeletePrinterDriverPackage(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeletePrinterDriverPackage *r)
9588 : {
9589 0 : uint32_t _ptr_pszServer;
9590 0 : uint32_t size_pszServer_1 = 0;
9591 0 : uint32_t length_pszServer_1 = 0;
9592 0 : uint32_t size_pszInfPath_1 = 0;
9593 0 : uint32_t length_pszInfPath_1 = 0;
9594 0 : uint32_t size_pszEnvironment_1 = 0;
9595 0 : uint32_t length_pszEnvironment_1 = 0;
9596 0 : TALLOC_CTX *_mem_save_pszServer_0 = NULL;
9597 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9598 0 : if (flags & NDR_IN) {
9599 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServer));
9600 0 : if (_ptr_pszServer) {
9601 0 : NDR_PULL_ALLOC(ndr, r->in.pszServer);
9602 : } else {
9603 0 : r->in.pszServer = NULL;
9604 : }
9605 0 : if (r->in.pszServer) {
9606 0 : _mem_save_pszServer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9607 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pszServer, 0);
9608 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszServer));
9609 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszServer));
9610 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszServer, &size_pszServer_1));
9611 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszServer, &length_pszServer_1));
9612 0 : if (length_pszServer_1 > size_pszServer_1) {
9613 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServer_1, length_pszServer_1);
9614 : }
9615 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServer_1, sizeof(uint16_t)));
9616 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszServer, length_pszServer_1, sizeof(uint16_t), CH_UTF16));
9617 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServer_0, 0);
9618 : }
9619 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszInfPath));
9620 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszInfPath));
9621 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszInfPath, &size_pszInfPath_1));
9622 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszInfPath, &length_pszInfPath_1));
9623 0 : if (length_pszInfPath_1 > size_pszInfPath_1) {
9624 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszInfPath_1, length_pszInfPath_1);
9625 : }
9626 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszInfPath_1, sizeof(uint16_t)));
9627 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszInfPath, length_pszInfPath_1, sizeof(uint16_t), CH_UTF16));
9628 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszEnvironment));
9629 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszEnvironment));
9630 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszEnvironment, &size_pszEnvironment_1));
9631 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszEnvironment, &length_pszEnvironment_1));
9632 0 : if (length_pszEnvironment_1 > size_pszEnvironment_1) {
9633 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszEnvironment_1, length_pszEnvironment_1);
9634 : }
9635 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszEnvironment_1, sizeof(uint16_t)));
9636 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszEnvironment, length_pszEnvironment_1, sizeof(uint16_t), CH_UTF16));
9637 : }
9638 0 : if (flags & NDR_OUT) {
9639 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9640 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9641 0 : NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
9642 : }
9643 0 : return NDR_ERR_SUCCESS;
9644 : }
9645 :
9646 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeletePrinterDriverPackage(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeletePrinterDriverPackage *r)
9647 : {
9648 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeletePrinterDriverPackage");
9649 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9650 0 : ndr->depth++;
9651 0 : if (flags & NDR_SET_VALUES) {
9652 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9653 : }
9654 0 : if (flags & NDR_IN) {
9655 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeletePrinterDriverPackage");
9656 0 : ndr->depth++;
9657 0 : ndr_print_ptr(ndr, "pszServer", r->in.pszServer);
9658 0 : ndr->depth++;
9659 0 : if (r->in.pszServer) {
9660 0 : ndr_print_string(ndr, "pszServer", r->in.pszServer);
9661 : }
9662 0 : ndr->depth--;
9663 0 : ndr_print_ptr(ndr, "pszInfPath", r->in.pszInfPath);
9664 0 : ndr->depth++;
9665 0 : ndr_print_string(ndr, "pszInfPath", r->in.pszInfPath);
9666 0 : ndr->depth--;
9667 0 : ndr_print_ptr(ndr, "pszEnvironment", r->in.pszEnvironment);
9668 0 : ndr->depth++;
9669 0 : ndr_print_string(ndr, "pszEnvironment", r->in.pszEnvironment);
9670 0 : ndr->depth--;
9671 0 : ndr->depth--;
9672 : }
9673 0 : if (flags & NDR_OUT) {
9674 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeletePrinterDriverPackage");
9675 0 : ndr->depth++;
9676 0 : ndr_print_HRESULT(ndr, "result", r->out.result);
9677 0 : ndr->depth--;
9678 : }
9679 0 : ndr->depth--;
9680 : }
9681 :
9682 0 : static enum ndr_err_code ndr_push_winspool_AsyncReadPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncReadPrinter *r)
9683 : {
9684 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9685 0 : if (flags & NDR_IN) {
9686 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9687 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.cbBuf));
9688 : }
9689 0 : if (flags & NDR_OUT) {
9690 0 : if (r->out.pBuf == NULL) {
9691 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9692 : }
9693 0 : if (r->out.pcNoBytesRead == NULL) {
9694 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9695 : }
9696 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.cbBuf));
9697 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.pBuf, r->in.cbBuf));
9698 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcNoBytesRead));
9699 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9700 : }
9701 0 : return NDR_ERR_SUCCESS;
9702 : }
9703 :
9704 0 : static enum ndr_err_code ndr_pull_winspool_AsyncReadPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncReadPrinter *r)
9705 : {
9706 0 : uint32_t size_pBuf_1 = 0;
9707 0 : TALLOC_CTX *_mem_save_pcNoBytesRead_0 = NULL;
9708 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9709 0 : if (flags & NDR_IN) {
9710 0 : NDR_ZERO_STRUCT(r->out);
9711 :
9712 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9713 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.cbBuf));
9714 0 : NDR_PULL_ALLOC_N(ndr, r->out.pBuf, r->in.cbBuf);
9715 0 : memset(r->out.pBuf, 0, (r->in.cbBuf) * sizeof(*r->out.pBuf));
9716 0 : NDR_PULL_ALLOC(ndr, r->out.pcNoBytesRead);
9717 0 : NDR_ZERO_STRUCTP(r->out.pcNoBytesRead);
9718 : }
9719 0 : if (flags & NDR_OUT) {
9720 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9721 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9722 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.pBuf));
9723 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.pBuf, &size_pBuf_1));
9724 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9725 0 : NDR_PULL_ALLOC_N(ndr, r->out.pBuf, size_pBuf_1);
9726 : }
9727 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.pBuf, size_pBuf_1));
9728 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9729 0 : NDR_PULL_ALLOC(ndr, r->out.pcNoBytesRead);
9730 : }
9731 0 : _mem_save_pcNoBytesRead_0 = NDR_PULL_GET_MEM_CTX(ndr);
9732 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcNoBytesRead, LIBNDR_FLAG_REF_ALLOC);
9733 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcNoBytesRead));
9734 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcNoBytesRead_0, LIBNDR_FLAG_REF_ALLOC);
9735 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9736 0 : if (r->out.pBuf) {
9737 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.pBuf, r->in.cbBuf));
9738 : }
9739 : }
9740 0 : return NDR_ERR_SUCCESS;
9741 : }
9742 :
9743 0 : _PUBLIC_ void ndr_print_winspool_AsyncReadPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncReadPrinter *r)
9744 : {
9745 0 : ndr_print_struct(ndr, name, "winspool_AsyncReadPrinter");
9746 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9747 0 : ndr->depth++;
9748 0 : if (flags & NDR_SET_VALUES) {
9749 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9750 : }
9751 0 : if (flags & NDR_IN) {
9752 0 : ndr_print_struct(ndr, "in", "winspool_AsyncReadPrinter");
9753 0 : ndr->depth++;
9754 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
9755 0 : ndr_print_uint32(ndr, "cbBuf", r->in.cbBuf);
9756 0 : ndr->depth--;
9757 : }
9758 0 : if (flags & NDR_OUT) {
9759 0 : ndr_print_struct(ndr, "out", "winspool_AsyncReadPrinter");
9760 0 : ndr->depth++;
9761 0 : ndr_print_ptr(ndr, "pBuf", r->out.pBuf);
9762 0 : ndr->depth++;
9763 0 : ndr_print_array_uint8(ndr, "pBuf", r->out.pBuf, r->in.cbBuf);
9764 0 : ndr->depth--;
9765 0 : ndr_print_ptr(ndr, "pcNoBytesRead", r->out.pcNoBytesRead);
9766 0 : ndr->depth++;
9767 0 : ndr_print_uint32(ndr, "pcNoBytesRead", *r->out.pcNoBytesRead);
9768 0 : ndr->depth--;
9769 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9770 0 : ndr->depth--;
9771 : }
9772 0 : ndr->depth--;
9773 : }
9774 :
9775 0 : static enum ndr_err_code ndr_push_winspool_AsyncResetPrinter(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncResetPrinter *r)
9776 : {
9777 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9778 0 : if (flags & NDR_IN) {
9779 0 : if (r->in.pDevModeContainer == NULL) {
9780 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9781 : }
9782 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9783 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.pDatatype));
9784 0 : if (r->in.pDatatype) {
9785 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDatatype, CH_UTF16)));
9786 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9787 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pDatatype, CH_UTF16)));
9788 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pDatatype, ndr_charset_length(r->in.pDatatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9789 : }
9790 0 : NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
9791 : }
9792 0 : if (flags & NDR_OUT) {
9793 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9794 : }
9795 0 : return NDR_ERR_SUCCESS;
9796 : }
9797 :
9798 0 : static enum ndr_err_code ndr_pull_winspool_AsyncResetPrinter(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncResetPrinter *r)
9799 : {
9800 0 : uint32_t _ptr_pDatatype;
9801 0 : uint32_t size_pDatatype_1 = 0;
9802 0 : uint32_t length_pDatatype_1 = 0;
9803 0 : TALLOC_CTX *_mem_save_pDatatype_0 = NULL;
9804 0 : TALLOC_CTX *_mem_save_pDevModeContainer_0 = NULL;
9805 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9806 0 : if (flags & NDR_IN) {
9807 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9808 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDatatype));
9809 0 : if (_ptr_pDatatype) {
9810 0 : NDR_PULL_ALLOC(ndr, r->in.pDatatype);
9811 : } else {
9812 0 : r->in.pDatatype = NULL;
9813 : }
9814 0 : if (r->in.pDatatype) {
9815 0 : _mem_save_pDatatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
9816 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDatatype, 0);
9817 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pDatatype));
9818 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pDatatype));
9819 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pDatatype, &size_pDatatype_1));
9820 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pDatatype, &length_pDatatype_1));
9821 0 : if (length_pDatatype_1 > size_pDatatype_1) {
9822 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pDatatype_1, length_pDatatype_1);
9823 : }
9824 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pDatatype_1, sizeof(uint16_t)));
9825 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pDatatype, length_pDatatype_1, sizeof(uint16_t), CH_UTF16));
9826 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDatatype_0, 0);
9827 : }
9828 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9829 0 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
9830 : }
9831 0 : _mem_save_pDevModeContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
9832 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pDevModeContainer, LIBNDR_FLAG_REF_ALLOC);
9833 0 : NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pDevModeContainer));
9834 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDevModeContainer_0, LIBNDR_FLAG_REF_ALLOC);
9835 : }
9836 0 : if (flags & NDR_OUT) {
9837 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9838 : if (r->in.pDevModeContainer == NULL) {
9839 : NDR_PULL_ALLOC(ndr, r->in.pDevModeContainer);
9840 : NDR_ZERO_STRUCTP(r->in.pDevModeContainer);
9841 : }
9842 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9843 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9844 : }
9845 0 : return NDR_ERR_SUCCESS;
9846 : }
9847 :
9848 0 : _PUBLIC_ void ndr_print_winspool_AsyncResetPrinter(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncResetPrinter *r)
9849 : {
9850 0 : ndr_print_struct(ndr, name, "winspool_AsyncResetPrinter");
9851 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9852 0 : ndr->depth++;
9853 0 : if (flags & NDR_SET_VALUES) {
9854 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9855 : }
9856 0 : if (flags & NDR_IN) {
9857 0 : ndr_print_struct(ndr, "in", "winspool_AsyncResetPrinter");
9858 0 : ndr->depth++;
9859 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
9860 0 : ndr_print_ptr(ndr, "pDatatype", r->in.pDatatype);
9861 0 : ndr->depth++;
9862 0 : if (r->in.pDatatype) {
9863 0 : ndr_print_string(ndr, "pDatatype", r->in.pDatatype);
9864 : }
9865 0 : ndr->depth--;
9866 0 : ndr_print_ptr(ndr, "pDevModeContainer", r->in.pDevModeContainer);
9867 0 : ndr->depth++;
9868 0 : ndr_print_spoolss_DevmodeContainer(ndr, "pDevModeContainer", r->in.pDevModeContainer);
9869 0 : ndr->depth--;
9870 0 : ndr->depth--;
9871 : }
9872 0 : if (flags & NDR_OUT) {
9873 0 : ndr_print_struct(ndr, "out", "winspool_AsyncResetPrinter");
9874 0 : ndr->depth++;
9875 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9876 0 : ndr->depth--;
9877 : }
9878 0 : ndr->depth--;
9879 : }
9880 :
9881 0 : static enum ndr_err_code ndr_push_winspool_AsyncGetJobNamedPropertyValue(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncGetJobNamedPropertyValue *r)
9882 : {
9883 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9884 0 : if (flags & NDR_IN) {
9885 0 : if (r->in.pszName == NULL) {
9886 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9887 : }
9888 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9889 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
9890 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
9891 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9892 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
9893 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszName, ndr_charset_length(r->in.pszName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9894 : }
9895 0 : if (flags & NDR_OUT) {
9896 0 : if (r->out.pValue == NULL) {
9897 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9898 : }
9899 0 : NDR_CHECK(ndr_push_spoolss_PrintPropertyValue(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pValue));
9900 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9901 : }
9902 0 : return NDR_ERR_SUCCESS;
9903 : }
9904 :
9905 0 : static enum ndr_err_code ndr_pull_winspool_AsyncGetJobNamedPropertyValue(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncGetJobNamedPropertyValue *r)
9906 : {
9907 0 : uint32_t size_pszName_1 = 0;
9908 0 : uint32_t length_pszName_1 = 0;
9909 0 : TALLOC_CTX *_mem_save_pValue_0 = NULL;
9910 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9911 0 : if (flags & NDR_IN) {
9912 0 : NDR_ZERO_STRUCT(r->out);
9913 :
9914 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9915 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
9916 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszName));
9917 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszName));
9918 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszName, &size_pszName_1));
9919 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszName, &length_pszName_1));
9920 0 : if (length_pszName_1 > size_pszName_1) {
9921 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszName_1, length_pszName_1);
9922 : }
9923 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszName_1, sizeof(uint16_t)));
9924 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszName, length_pszName_1, sizeof(uint16_t), CH_UTF16));
9925 0 : NDR_PULL_ALLOC(ndr, r->out.pValue);
9926 0 : NDR_ZERO_STRUCTP(r->out.pValue);
9927 : }
9928 0 : if (flags & NDR_OUT) {
9929 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9930 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9931 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9932 0 : NDR_PULL_ALLOC(ndr, r->out.pValue);
9933 : }
9934 0 : _mem_save_pValue_0 = NDR_PULL_GET_MEM_CTX(ndr);
9935 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pValue, LIBNDR_FLAG_REF_ALLOC);
9936 0 : NDR_CHECK(ndr_pull_spoolss_PrintPropertyValue(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pValue));
9937 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pValue_0, LIBNDR_FLAG_REF_ALLOC);
9938 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9939 : }
9940 0 : return NDR_ERR_SUCCESS;
9941 : }
9942 :
9943 0 : _PUBLIC_ void ndr_print_winspool_AsyncGetJobNamedPropertyValue(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncGetJobNamedPropertyValue *r)
9944 : {
9945 0 : ndr_print_struct(ndr, name, "winspool_AsyncGetJobNamedPropertyValue");
9946 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9947 0 : ndr->depth++;
9948 0 : if (flags & NDR_SET_VALUES) {
9949 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9950 : }
9951 0 : if (flags & NDR_IN) {
9952 0 : ndr_print_struct(ndr, "in", "winspool_AsyncGetJobNamedPropertyValue");
9953 0 : ndr->depth++;
9954 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
9955 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
9956 0 : ndr_print_ptr(ndr, "pszName", r->in.pszName);
9957 0 : ndr->depth++;
9958 0 : ndr_print_string(ndr, "pszName", r->in.pszName);
9959 0 : ndr->depth--;
9960 0 : ndr->depth--;
9961 : }
9962 0 : if (flags & NDR_OUT) {
9963 0 : ndr_print_struct(ndr, "out", "winspool_AsyncGetJobNamedPropertyValue");
9964 0 : ndr->depth++;
9965 0 : ndr_print_ptr(ndr, "pValue", r->out.pValue);
9966 0 : ndr->depth++;
9967 0 : ndr_print_spoolss_PrintPropertyValue(ndr, "pValue", r->out.pValue);
9968 0 : ndr->depth--;
9969 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9970 0 : ndr->depth--;
9971 : }
9972 0 : ndr->depth--;
9973 : }
9974 :
9975 0 : _PUBLIC_ enum ndr_err_code ndr_push_winspool_AsyncSetJobNamedProperty(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncSetJobNamedProperty *r)
9976 : {
9977 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9978 0 : if (flags & NDR_IN) {
9979 0 : if (r->in.pProperty == NULL) {
9980 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9981 : }
9982 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9983 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
9984 0 : NDR_CHECK(ndr_push_spoolss_PrintNamedProperty(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pProperty));
9985 : }
9986 0 : if (flags & NDR_OUT) {
9987 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9988 : }
9989 0 : return NDR_ERR_SUCCESS;
9990 : }
9991 :
9992 2 : _PUBLIC_ enum ndr_err_code ndr_pull_winspool_AsyncSetJobNamedProperty(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncSetJobNamedProperty *r)
9993 : {
9994 2 : TALLOC_CTX *_mem_save_pProperty_0 = NULL;
9995 2 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9996 2 : if (flags & NDR_IN) {
9997 2 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
9998 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
9999 2 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10000 2 : NDR_PULL_ALLOC(ndr, r->in.pProperty);
10001 : }
10002 2 : _mem_save_pProperty_0 = NDR_PULL_GET_MEM_CTX(ndr);
10003 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pProperty, LIBNDR_FLAG_REF_ALLOC);
10004 2 : NDR_CHECK(ndr_pull_spoolss_PrintNamedProperty(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pProperty));
10005 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pProperty_0, LIBNDR_FLAG_REF_ALLOC);
10006 : }
10007 2 : if (flags & NDR_OUT) {
10008 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10009 : if (r->in.pProperty == NULL) {
10010 : NDR_PULL_ALLOC(ndr, r->in.pProperty);
10011 : NDR_ZERO_STRUCTP(r->in.pProperty);
10012 : }
10013 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10014 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10015 : }
10016 0 : return NDR_ERR_SUCCESS;
10017 : }
10018 :
10019 2 : _PUBLIC_ void ndr_print_winspool_AsyncSetJobNamedProperty(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncSetJobNamedProperty *r)
10020 : {
10021 2 : ndr_print_struct(ndr, name, "winspool_AsyncSetJobNamedProperty");
10022 2 : if (r == NULL) { ndr_print_null(ndr); return; }
10023 2 : ndr->depth++;
10024 2 : if (flags & NDR_SET_VALUES) {
10025 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10026 : }
10027 2 : if (flags & NDR_IN) {
10028 2 : ndr_print_struct(ndr, "in", "winspool_AsyncSetJobNamedProperty");
10029 2 : ndr->depth++;
10030 2 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
10031 2 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
10032 2 : ndr_print_ptr(ndr, "pProperty", r->in.pProperty);
10033 2 : ndr->depth++;
10034 2 : ndr_print_spoolss_PrintNamedProperty(ndr, "pProperty", r->in.pProperty);
10035 2 : ndr->depth--;
10036 2 : ndr->depth--;
10037 : }
10038 2 : if (flags & NDR_OUT) {
10039 0 : ndr_print_struct(ndr, "out", "winspool_AsyncSetJobNamedProperty");
10040 0 : ndr->depth++;
10041 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10042 0 : ndr->depth--;
10043 : }
10044 2 : ndr->depth--;
10045 : }
10046 :
10047 0 : static enum ndr_err_code ndr_push_winspool_AsyncDeleteJobNamedProperty(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncDeleteJobNamedProperty *r)
10048 : {
10049 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10050 0 : if (flags & NDR_IN) {
10051 0 : if (r->in.pszName == NULL) {
10052 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10053 : }
10054 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
10055 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
10056 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
10057 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10058 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.pszName, CH_UTF16)));
10059 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.pszName, ndr_charset_length(r->in.pszName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10060 : }
10061 0 : if (flags & NDR_OUT) {
10062 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10063 : }
10064 0 : return NDR_ERR_SUCCESS;
10065 : }
10066 :
10067 0 : static enum ndr_err_code ndr_pull_winspool_AsyncDeleteJobNamedProperty(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncDeleteJobNamedProperty *r)
10068 : {
10069 0 : uint32_t size_pszName_1 = 0;
10070 0 : uint32_t length_pszName_1 = 0;
10071 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10072 0 : if (flags & NDR_IN) {
10073 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
10074 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
10075 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.pszName));
10076 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.pszName));
10077 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.pszName, &size_pszName_1));
10078 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.pszName, &length_pszName_1));
10079 0 : if (length_pszName_1 > size_pszName_1) {
10080 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszName_1, length_pszName_1);
10081 : }
10082 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszName_1, sizeof(uint16_t)));
10083 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.pszName, length_pszName_1, sizeof(uint16_t), CH_UTF16));
10084 : }
10085 0 : if (flags & NDR_OUT) {
10086 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10087 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10088 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10089 : }
10090 0 : return NDR_ERR_SUCCESS;
10091 : }
10092 :
10093 0 : _PUBLIC_ void ndr_print_winspool_AsyncDeleteJobNamedProperty(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncDeleteJobNamedProperty *r)
10094 : {
10095 0 : ndr_print_struct(ndr, name, "winspool_AsyncDeleteJobNamedProperty");
10096 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10097 0 : ndr->depth++;
10098 0 : if (flags & NDR_SET_VALUES) {
10099 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10100 : }
10101 0 : if (flags & NDR_IN) {
10102 0 : ndr_print_struct(ndr, "in", "winspool_AsyncDeleteJobNamedProperty");
10103 0 : ndr->depth++;
10104 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
10105 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
10106 0 : ndr_print_ptr(ndr, "pszName", r->in.pszName);
10107 0 : ndr->depth++;
10108 0 : ndr_print_string(ndr, "pszName", r->in.pszName);
10109 0 : ndr->depth--;
10110 0 : ndr->depth--;
10111 : }
10112 0 : if (flags & NDR_OUT) {
10113 0 : ndr_print_struct(ndr, "out", "winspool_AsyncDeleteJobNamedProperty");
10114 0 : ndr->depth++;
10115 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10116 0 : ndr->depth--;
10117 : }
10118 0 : ndr->depth--;
10119 : }
10120 :
10121 0 : static enum ndr_err_code ndr_push_winspool_AsyncEnumJobNamedProperties(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncEnumJobNamedProperties *r)
10122 : {
10123 0 : uint32_t cntr_ppProperties_2;
10124 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10125 0 : if (flags & NDR_IN) {
10126 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
10127 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.JobId));
10128 : }
10129 0 : if (flags & NDR_OUT) {
10130 0 : if (r->out.pcProperties == NULL) {
10131 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10132 : }
10133 0 : if (r->out.ppProperties == NULL) {
10134 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10135 : }
10136 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pcProperties));
10137 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.ppProperties));
10138 0 : if (*r->out.ppProperties) {
10139 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.pcProperties));
10140 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (*r->out.pcProperties); cntr_ppProperties_2++) {
10141 0 : NDR_CHECK(ndr_push_spoolss_PrintNamedProperty(ndr, NDR_SCALARS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
10142 : }
10143 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (*r->out.pcProperties); cntr_ppProperties_2++) {
10144 0 : NDR_CHECK(ndr_push_spoolss_PrintNamedProperty(ndr, NDR_BUFFERS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
10145 : }
10146 : }
10147 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10148 : }
10149 0 : return NDR_ERR_SUCCESS;
10150 : }
10151 :
10152 0 : static enum ndr_err_code ndr_pull_winspool_AsyncEnumJobNamedProperties(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncEnumJobNamedProperties *r)
10153 : {
10154 0 : uint32_t _ptr_ppProperties;
10155 0 : uint32_t size_ppProperties_2 = 0;
10156 0 : uint32_t cntr_ppProperties_2;
10157 0 : TALLOC_CTX *_mem_save_pcProperties_0 = NULL;
10158 0 : TALLOC_CTX *_mem_save_ppProperties_0 = NULL;
10159 0 : TALLOC_CTX *_mem_save_ppProperties_1 = NULL;
10160 0 : TALLOC_CTX *_mem_save_ppProperties_2 = NULL;
10161 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10162 0 : if (flags & NDR_IN) {
10163 0 : NDR_ZERO_STRUCT(r->out);
10164 :
10165 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
10166 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.JobId));
10167 0 : NDR_PULL_ALLOC(ndr, r->out.pcProperties);
10168 0 : NDR_ZERO_STRUCTP(r->out.pcProperties);
10169 0 : NDR_PULL_ALLOC(ndr, r->out.ppProperties);
10170 0 : NDR_ZERO_STRUCTP(r->out.ppProperties);
10171 : }
10172 0 : if (flags & NDR_OUT) {
10173 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10174 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10175 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10176 0 : NDR_PULL_ALLOC(ndr, r->out.pcProperties);
10177 : }
10178 0 : _mem_save_pcProperties_0 = NDR_PULL_GET_MEM_CTX(ndr);
10179 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pcProperties, LIBNDR_FLAG_REF_ALLOC);
10180 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pcProperties));
10181 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pcProperties_0, LIBNDR_FLAG_REF_ALLOC);
10182 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10183 0 : NDR_PULL_ALLOC(ndr, r->out.ppProperties);
10184 : }
10185 0 : _mem_save_ppProperties_0 = NDR_PULL_GET_MEM_CTX(ndr);
10186 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppProperties, LIBNDR_FLAG_REF_ALLOC);
10187 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ppProperties));
10188 0 : if (_ptr_ppProperties) {
10189 0 : NDR_PULL_ALLOC(ndr, *r->out.ppProperties);
10190 : } else {
10191 0 : *r->out.ppProperties = NULL;
10192 : }
10193 0 : if (*r->out.ppProperties) {
10194 0 : _mem_save_ppProperties_1 = NDR_PULL_GET_MEM_CTX(ndr);
10195 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppProperties, 0);
10196 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.ppProperties));
10197 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)r->out.ppProperties, &size_ppProperties_2));
10198 0 : NDR_PULL_ALLOC_N(ndr, *r->out.ppProperties, size_ppProperties_2);
10199 0 : _mem_save_ppProperties_2 = NDR_PULL_GET_MEM_CTX(ndr);
10200 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.ppProperties, 0);
10201 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (size_ppProperties_2); cntr_ppProperties_2++) {
10202 0 : NDR_CHECK(ndr_pull_spoolss_PrintNamedProperty(ndr, NDR_SCALARS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
10203 : }
10204 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (size_ppProperties_2); cntr_ppProperties_2++) {
10205 0 : NDR_CHECK(ndr_pull_spoolss_PrintNamedProperty(ndr, NDR_BUFFERS, &(*r->out.ppProperties)[cntr_ppProperties_2]));
10206 : }
10207 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppProperties_2, 0);
10208 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppProperties_1, 0);
10209 : }
10210 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppProperties_0, LIBNDR_FLAG_REF_ALLOC);
10211 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10212 0 : if (*r->out.ppProperties) {
10213 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.ppProperties, *r->out.pcProperties));
10214 : }
10215 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (size_ppProperties_2); cntr_ppProperties_2++) {
10216 0 : }
10217 : }
10218 0 : return NDR_ERR_SUCCESS;
10219 : }
10220 :
10221 0 : _PUBLIC_ void ndr_print_winspool_AsyncEnumJobNamedProperties(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncEnumJobNamedProperties *r)
10222 : {
10223 0 : uint32_t cntr_ppProperties_2;
10224 0 : ndr_print_struct(ndr, name, "winspool_AsyncEnumJobNamedProperties");
10225 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10226 0 : ndr->depth++;
10227 0 : if (flags & NDR_SET_VALUES) {
10228 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10229 : }
10230 0 : if (flags & NDR_IN) {
10231 0 : ndr_print_struct(ndr, "in", "winspool_AsyncEnumJobNamedProperties");
10232 0 : ndr->depth++;
10233 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
10234 0 : ndr_print_uint32(ndr, "JobId", r->in.JobId);
10235 0 : ndr->depth--;
10236 : }
10237 0 : if (flags & NDR_OUT) {
10238 0 : ndr_print_struct(ndr, "out", "winspool_AsyncEnumJobNamedProperties");
10239 0 : ndr->depth++;
10240 0 : ndr_print_ptr(ndr, "pcProperties", r->out.pcProperties);
10241 0 : ndr->depth++;
10242 0 : ndr_print_uint32(ndr, "pcProperties", *r->out.pcProperties);
10243 0 : ndr->depth--;
10244 0 : ndr_print_ptr(ndr, "ppProperties", r->out.ppProperties);
10245 0 : ndr->depth++;
10246 0 : ndr_print_ptr(ndr, "ppProperties", *r->out.ppProperties);
10247 0 : ndr->depth++;
10248 0 : if (*r->out.ppProperties) {
10249 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "ppProperties", (uint32_t)(*r->out.pcProperties));
10250 0 : ndr->depth++;
10251 0 : for (cntr_ppProperties_2 = 0; cntr_ppProperties_2 < (*r->out.pcProperties); cntr_ppProperties_2++) {
10252 0 : ndr_print_spoolss_PrintNamedProperty(ndr, "ppProperties", &(*r->out.ppProperties)[cntr_ppProperties_2]);
10253 : }
10254 0 : ndr->depth--;
10255 : }
10256 0 : ndr->depth--;
10257 0 : ndr->depth--;
10258 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10259 0 : ndr->depth--;
10260 : }
10261 0 : ndr->depth--;
10262 : }
10263 :
10264 0 : static enum ndr_err_code ndr_push_winspool_AsyncLogJobInfoForBranchOffice(struct ndr_push *ndr, ndr_flags_type flags, const struct winspool_AsyncLogJobInfoForBranchOffice *r)
10265 : {
10266 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10267 0 : if (flags & NDR_IN) {
10268 0 : if (r->in.pBranchOfficeJobDataContainer == NULL) {
10269 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10270 : }
10271 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
10272 0 : NDR_CHECK(ndr_push_spoolss_BranchOfficeJobDataContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pBranchOfficeJobDataContainer));
10273 : }
10274 0 : if (flags & NDR_OUT) {
10275 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10276 : }
10277 0 : return NDR_ERR_SUCCESS;
10278 : }
10279 :
10280 0 : static enum ndr_err_code ndr_pull_winspool_AsyncLogJobInfoForBranchOffice(struct ndr_pull *ndr, ndr_flags_type flags, struct winspool_AsyncLogJobInfoForBranchOffice *r)
10281 : {
10282 0 : TALLOC_CTX *_mem_save_pBranchOfficeJobDataContainer_0 = NULL;
10283 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10284 0 : if (flags & NDR_IN) {
10285 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hPrinter));
10286 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10287 0 : NDR_PULL_ALLOC(ndr, r->in.pBranchOfficeJobDataContainer);
10288 : }
10289 0 : _mem_save_pBranchOfficeJobDataContainer_0 = NDR_PULL_GET_MEM_CTX(ndr);
10290 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pBranchOfficeJobDataContainer, LIBNDR_FLAG_REF_ALLOC);
10291 0 : NDR_CHECK(ndr_pull_spoolss_BranchOfficeJobDataContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pBranchOfficeJobDataContainer));
10292 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pBranchOfficeJobDataContainer_0, LIBNDR_FLAG_REF_ALLOC);
10293 : }
10294 0 : if (flags & NDR_OUT) {
10295 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10296 : if (r->in.pBranchOfficeJobDataContainer == NULL) {
10297 : NDR_PULL_ALLOC(ndr, r->in.pBranchOfficeJobDataContainer);
10298 : NDR_ZERO_STRUCTP(r->in.pBranchOfficeJobDataContainer);
10299 : }
10300 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10301 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10302 : }
10303 0 : return NDR_ERR_SUCCESS;
10304 : }
10305 :
10306 0 : _PUBLIC_ void ndr_print_winspool_AsyncLogJobInfoForBranchOffice(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winspool_AsyncLogJobInfoForBranchOffice *r)
10307 : {
10308 0 : ndr_print_struct(ndr, name, "winspool_AsyncLogJobInfoForBranchOffice");
10309 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10310 0 : ndr->depth++;
10311 0 : if (flags & NDR_SET_VALUES) {
10312 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10313 : }
10314 0 : if (flags & NDR_IN) {
10315 0 : ndr_print_struct(ndr, "in", "winspool_AsyncLogJobInfoForBranchOffice");
10316 0 : ndr->depth++;
10317 0 : ndr_print_policy_handle(ndr, "hPrinter", &r->in.hPrinter);
10318 0 : ndr_print_ptr(ndr, "pBranchOfficeJobDataContainer", r->in.pBranchOfficeJobDataContainer);
10319 0 : ndr->depth++;
10320 0 : ndr_print_spoolss_BranchOfficeJobDataContainer(ndr, "pBranchOfficeJobDataContainer", r->in.pBranchOfficeJobDataContainer);
10321 0 : ndr->depth--;
10322 0 : ndr->depth--;
10323 : }
10324 0 : if (flags & NDR_OUT) {
10325 0 : ndr_print_struct(ndr, "out", "winspool_AsyncLogJobInfoForBranchOffice");
10326 0 : ndr->depth++;
10327 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10328 0 : ndr->depth--;
10329 : }
10330 0 : ndr->depth--;
10331 : }
10332 :
10333 : #ifndef SKIP_NDR_TABLE_iremotewinspool
10334 : static const struct ndr_interface_public_struct iremotewinspool_public_structs[] = {
10335 : { .name = NULL }
10336 : };
10337 :
10338 : static const struct ndr_interface_call iremotewinspool_calls[] = {
10339 : {
10340 : "winspool_AsyncOpenPrinter",
10341 : sizeof(struct winspool_AsyncOpenPrinter),
10342 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncOpenPrinter,
10343 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncOpenPrinter,
10344 : (ndr_print_function_t) ndr_print_winspool_AsyncOpenPrinter,
10345 : { 0, NULL },
10346 : { 0, NULL },
10347 : },
10348 : {
10349 : "winspool_AsyncAddPrinter",
10350 : sizeof(struct winspool_AsyncAddPrinter),
10351 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddPrinter,
10352 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddPrinter,
10353 : (ndr_print_function_t) ndr_print_winspool_AsyncAddPrinter,
10354 : { 0, NULL },
10355 : { 0, NULL },
10356 : },
10357 : {
10358 : "winspool_AsyncSetJob",
10359 : sizeof(struct winspool_AsyncSetJob),
10360 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSetJob,
10361 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSetJob,
10362 : (ndr_print_function_t) ndr_print_winspool_AsyncSetJob,
10363 : { 0, NULL },
10364 : { 0, NULL },
10365 : },
10366 : {
10367 : "winspool_AsyncGetJob",
10368 : sizeof(struct winspool_AsyncGetJob),
10369 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetJob,
10370 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetJob,
10371 : (ndr_print_function_t) ndr_print_winspool_AsyncGetJob,
10372 : { 0, NULL },
10373 : { 0, NULL },
10374 : },
10375 : {
10376 : "winspool_AsyncEnumJobs",
10377 : sizeof(struct winspool_AsyncEnumJobs),
10378 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumJobs,
10379 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumJobs,
10380 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumJobs,
10381 : { 0, NULL },
10382 : { 0, NULL },
10383 : },
10384 : {
10385 : "winspool_AsyncAddJob",
10386 : sizeof(struct winspool_AsyncAddJob),
10387 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddJob,
10388 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddJob,
10389 : (ndr_print_function_t) ndr_print_winspool_AsyncAddJob,
10390 : { 0, NULL },
10391 : { 0, NULL },
10392 : },
10393 : {
10394 : "winspool_AsyncScheduleJob",
10395 : sizeof(struct winspool_AsyncScheduleJob),
10396 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncScheduleJob,
10397 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncScheduleJob,
10398 : (ndr_print_function_t) ndr_print_winspool_AsyncScheduleJob,
10399 : { 0, NULL },
10400 : { 0, NULL },
10401 : },
10402 : {
10403 : "winspool_AsyncDeletePrinter",
10404 : sizeof(struct winspool_AsyncDeletePrinter),
10405 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinter,
10406 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinter,
10407 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinter,
10408 : { 0, NULL },
10409 : { 0, NULL },
10410 : },
10411 : {
10412 : "winspool_AsyncSetPrinter",
10413 : sizeof(struct winspool_AsyncSetPrinter),
10414 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSetPrinter,
10415 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSetPrinter,
10416 : (ndr_print_function_t) ndr_print_winspool_AsyncSetPrinter,
10417 : { 0, NULL },
10418 : { 0, NULL },
10419 : },
10420 : {
10421 : "winspool_AsyncGetPrinter",
10422 : sizeof(struct winspool_AsyncGetPrinter),
10423 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetPrinter,
10424 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetPrinter,
10425 : (ndr_print_function_t) ndr_print_winspool_AsyncGetPrinter,
10426 : { 0, NULL },
10427 : { 0, NULL },
10428 : },
10429 : {
10430 : "winspool_AsyncStartDocPrinter",
10431 : sizeof(struct winspool_AsyncStartDocPrinter),
10432 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncStartDocPrinter,
10433 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncStartDocPrinter,
10434 : (ndr_print_function_t) ndr_print_winspool_AsyncStartDocPrinter,
10435 : { 0, NULL },
10436 : { 0, NULL },
10437 : },
10438 : {
10439 : "winspool_AsyncStartPagePrinter",
10440 : sizeof(struct winspool_AsyncStartPagePrinter),
10441 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncStartPagePrinter,
10442 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncStartPagePrinter,
10443 : (ndr_print_function_t) ndr_print_winspool_AsyncStartPagePrinter,
10444 : { 0, NULL },
10445 : { 0, NULL },
10446 : },
10447 : {
10448 : "winspool_AsyncWritePrinter",
10449 : sizeof(struct winspool_AsyncWritePrinter),
10450 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncWritePrinter,
10451 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncWritePrinter,
10452 : (ndr_print_function_t) ndr_print_winspool_AsyncWritePrinter,
10453 : { 0, NULL },
10454 : { 0, NULL },
10455 : },
10456 : {
10457 : "winspool_AsyncEndPagePrinter",
10458 : sizeof(struct winspool_AsyncEndPagePrinter),
10459 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEndPagePrinter,
10460 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEndPagePrinter,
10461 : (ndr_print_function_t) ndr_print_winspool_AsyncEndPagePrinter,
10462 : { 0, NULL },
10463 : { 0, NULL },
10464 : },
10465 : {
10466 : "winspool_AsyncEndDocPrinter",
10467 : sizeof(struct winspool_AsyncEndDocPrinter),
10468 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEndDocPrinter,
10469 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEndDocPrinter,
10470 : (ndr_print_function_t) ndr_print_winspool_AsyncEndDocPrinter,
10471 : { 0, NULL },
10472 : { 0, NULL },
10473 : },
10474 : {
10475 : "winspool_AsyncAbortPrinter",
10476 : sizeof(struct winspool_AsyncAbortPrinter),
10477 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAbortPrinter,
10478 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAbortPrinter,
10479 : (ndr_print_function_t) ndr_print_winspool_AsyncAbortPrinter,
10480 : { 0, NULL },
10481 : { 0, NULL },
10482 : },
10483 : {
10484 : "winspool_AsyncGetPrinterData",
10485 : sizeof(struct winspool_AsyncGetPrinterData),
10486 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetPrinterData,
10487 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetPrinterData,
10488 : (ndr_print_function_t) ndr_print_winspool_AsyncGetPrinterData,
10489 : { 0, NULL },
10490 : { 0, NULL },
10491 : },
10492 : {
10493 : "winspool_AsyncGetPrinterDataEx",
10494 : sizeof(struct winspool_AsyncGetPrinterDataEx),
10495 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetPrinterDataEx,
10496 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetPrinterDataEx,
10497 : (ndr_print_function_t) ndr_print_winspool_AsyncGetPrinterDataEx,
10498 : { 0, NULL },
10499 : { 0, NULL },
10500 : },
10501 : {
10502 : "winspool_AsyncSetPrinterData",
10503 : sizeof(struct winspool_AsyncSetPrinterData),
10504 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSetPrinterData,
10505 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSetPrinterData,
10506 : (ndr_print_function_t) ndr_print_winspool_AsyncSetPrinterData,
10507 : { 0, NULL },
10508 : { 0, NULL },
10509 : },
10510 : {
10511 : "winspool_AsyncSetPrinterDataEx",
10512 : sizeof(struct winspool_AsyncSetPrinterDataEx),
10513 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSetPrinterDataEx,
10514 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSetPrinterDataEx,
10515 : (ndr_print_function_t) ndr_print_winspool_AsyncSetPrinterDataEx,
10516 : { 0, NULL },
10517 : { 0, NULL },
10518 : },
10519 : {
10520 : "winspool_AsyncClosePrinter",
10521 : sizeof(struct winspool_AsyncClosePrinter),
10522 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncClosePrinter,
10523 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncClosePrinter,
10524 : (ndr_print_function_t) ndr_print_winspool_AsyncClosePrinter,
10525 : { 0, NULL },
10526 : { 0, NULL },
10527 : },
10528 : {
10529 : "winspool_AsyncAddForm",
10530 : sizeof(struct winspool_AsyncAddForm),
10531 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddForm,
10532 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddForm,
10533 : (ndr_print_function_t) ndr_print_winspool_AsyncAddForm,
10534 : { 0, NULL },
10535 : { 0, NULL },
10536 : },
10537 : {
10538 : "winspool_AsyncDeleteForm",
10539 : sizeof(struct winspool_AsyncDeleteForm),
10540 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeleteForm,
10541 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeleteForm,
10542 : (ndr_print_function_t) ndr_print_winspool_AsyncDeleteForm,
10543 : { 0, NULL },
10544 : { 0, NULL },
10545 : },
10546 : {
10547 : "winspool_AsyncGetForm",
10548 : sizeof(struct winspool_AsyncGetForm),
10549 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetForm,
10550 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetForm,
10551 : (ndr_print_function_t) ndr_print_winspool_AsyncGetForm,
10552 : { 0, NULL },
10553 : { 0, NULL },
10554 : },
10555 : {
10556 : "winspool_AsyncSetForm",
10557 : sizeof(struct winspool_AsyncSetForm),
10558 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSetForm,
10559 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSetForm,
10560 : (ndr_print_function_t) ndr_print_winspool_AsyncSetForm,
10561 : { 0, NULL },
10562 : { 0, NULL },
10563 : },
10564 : {
10565 : "winspool_AsyncEnumForms",
10566 : sizeof(struct winspool_AsyncEnumForms),
10567 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumForms,
10568 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumForms,
10569 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumForms,
10570 : { 0, NULL },
10571 : { 0, NULL },
10572 : },
10573 : {
10574 : "winspool_AsyncGetPrinterDriver",
10575 : sizeof(struct winspool_AsyncGetPrinterDriver),
10576 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetPrinterDriver,
10577 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetPrinterDriver,
10578 : (ndr_print_function_t) ndr_print_winspool_AsyncGetPrinterDriver,
10579 : { 0, NULL },
10580 : { 0, NULL },
10581 : },
10582 : {
10583 : "winspool_AsyncEnumPrinterData",
10584 : sizeof(struct winspool_AsyncEnumPrinterData),
10585 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPrinterData,
10586 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPrinterData,
10587 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPrinterData,
10588 : { 0, NULL },
10589 : { 0, NULL },
10590 : },
10591 : {
10592 : "winspool_AsyncEnumPrinterDataEx",
10593 : sizeof(struct winspool_AsyncEnumPrinterDataEx),
10594 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPrinterDataEx,
10595 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPrinterDataEx,
10596 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPrinterDataEx,
10597 : { 0, NULL },
10598 : { 0, NULL },
10599 : },
10600 : {
10601 : "winspool_AsyncEnumPrinterKey",
10602 : sizeof(struct winspool_AsyncEnumPrinterKey),
10603 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPrinterKey,
10604 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPrinterKey,
10605 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPrinterKey,
10606 : { 0, NULL },
10607 : { 0, NULL },
10608 : },
10609 : {
10610 : "winspool_AsyncDeletePrinterData",
10611 : sizeof(struct winspool_AsyncDeletePrinterData),
10612 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinterData,
10613 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinterData,
10614 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinterData,
10615 : { 0, NULL },
10616 : { 0, NULL },
10617 : },
10618 : {
10619 : "winspool_AsyncDeletePrinterDataEx",
10620 : sizeof(struct winspool_AsyncDeletePrinterDataEx),
10621 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinterDataEx,
10622 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinterDataEx,
10623 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinterDataEx,
10624 : { 0, NULL },
10625 : { 0, NULL },
10626 : },
10627 : {
10628 : "winspool_AsyncDeletePrinterKey",
10629 : sizeof(struct winspool_AsyncDeletePrinterKey),
10630 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinterKey,
10631 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinterKey,
10632 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinterKey,
10633 : { 0, NULL },
10634 : { 0, NULL },
10635 : },
10636 : {
10637 : "winspool_AsyncXcvData",
10638 : sizeof(struct winspool_AsyncXcvData),
10639 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncXcvData,
10640 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncXcvData,
10641 : (ndr_print_function_t) ndr_print_winspool_AsyncXcvData,
10642 : { 0, NULL },
10643 : { 0, NULL },
10644 : },
10645 : {
10646 : "winspool_AsyncSendRecvBidiData",
10647 : sizeof(struct winspool_AsyncSendRecvBidiData),
10648 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSendRecvBidiData,
10649 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSendRecvBidiData,
10650 : (ndr_print_function_t) ndr_print_winspool_AsyncSendRecvBidiData,
10651 : { 0, NULL },
10652 : { 0, NULL },
10653 : },
10654 : {
10655 : "winspool_AsyncCreatePrinterIC",
10656 : sizeof(struct winspool_AsyncCreatePrinterIC),
10657 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncCreatePrinterIC,
10658 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncCreatePrinterIC,
10659 : (ndr_print_function_t) ndr_print_winspool_AsyncCreatePrinterIC,
10660 : { 0, NULL },
10661 : { 0, NULL },
10662 : },
10663 : {
10664 : "winspool_AsyncPlayGdiScriptOnPrinterIC",
10665 : sizeof(struct winspool_AsyncPlayGdiScriptOnPrinterIC),
10666 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncPlayGdiScriptOnPrinterIC,
10667 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncPlayGdiScriptOnPrinterIC,
10668 : (ndr_print_function_t) ndr_print_winspool_AsyncPlayGdiScriptOnPrinterIC,
10669 : { 0, NULL },
10670 : { 0, NULL },
10671 : },
10672 : {
10673 : "winspool_AsyncDeletePrinterIC",
10674 : sizeof(struct winspool_AsyncDeletePrinterIC),
10675 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinterIC,
10676 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinterIC,
10677 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinterIC,
10678 : { 0, NULL },
10679 : { 0, NULL },
10680 : },
10681 : {
10682 : "winspool_AsyncEnumPrinters",
10683 : sizeof(struct winspool_AsyncEnumPrinters),
10684 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPrinters,
10685 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPrinters,
10686 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPrinters,
10687 : { 0, NULL },
10688 : { 0, NULL },
10689 : },
10690 : {
10691 : "winspool_AsyncAddPrinterDriver",
10692 : sizeof(struct winspool_AsyncAddPrinterDriver),
10693 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddPrinterDriver,
10694 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddPrinterDriver,
10695 : (ndr_print_function_t) ndr_print_winspool_AsyncAddPrinterDriver,
10696 : { 0, NULL },
10697 : { 0, NULL },
10698 : },
10699 : {
10700 : "winspool_AsyncEnumPrinterDrivers",
10701 : sizeof(struct winspool_AsyncEnumPrinterDrivers),
10702 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPrinterDrivers,
10703 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPrinterDrivers,
10704 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPrinterDrivers,
10705 : { 0, NULL },
10706 : { 0, NULL },
10707 : },
10708 : {
10709 : "winspool_AsyncGetPrinterDriverDirectory",
10710 : sizeof(struct winspool_AsyncGetPrinterDriverDirectory),
10711 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetPrinterDriverDirectory,
10712 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetPrinterDriverDirectory,
10713 : (ndr_print_function_t) ndr_print_winspool_AsyncGetPrinterDriverDirectory,
10714 : { 0, NULL },
10715 : { 0, NULL },
10716 : },
10717 : {
10718 : "winspool_AsyncDeletePrinterDriver",
10719 : sizeof(struct winspool_AsyncDeletePrinterDriver),
10720 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinterDriver,
10721 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinterDriver,
10722 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinterDriver,
10723 : { 0, NULL },
10724 : { 0, NULL },
10725 : },
10726 : {
10727 : "winspool_AsyncDeletePrinterDriverEx",
10728 : sizeof(struct winspool_AsyncDeletePrinterDriverEx),
10729 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinterDriverEx,
10730 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinterDriverEx,
10731 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinterDriverEx,
10732 : { 0, NULL },
10733 : { 0, NULL },
10734 : },
10735 : {
10736 : "winspool_AsyncAddPrintProcessor",
10737 : sizeof(struct winspool_AsyncAddPrintProcessor),
10738 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddPrintProcessor,
10739 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddPrintProcessor,
10740 : (ndr_print_function_t) ndr_print_winspool_AsyncAddPrintProcessor,
10741 : { 0, NULL },
10742 : { 0, NULL },
10743 : },
10744 : {
10745 : "winspool_AsyncEnumPrintProcessors",
10746 : sizeof(struct winspool_AsyncEnumPrintProcessors),
10747 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPrintProcessors,
10748 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPrintProcessors,
10749 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPrintProcessors,
10750 : { 0, NULL },
10751 : { 0, NULL },
10752 : },
10753 : {
10754 : "winspool_AsyncGetPrintProcessorDirectory",
10755 : sizeof(struct winspool_AsyncGetPrintProcessorDirectory),
10756 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetPrintProcessorDirectory,
10757 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetPrintProcessorDirectory,
10758 : (ndr_print_function_t) ndr_print_winspool_AsyncGetPrintProcessorDirectory,
10759 : { 0, NULL },
10760 : { 0, NULL },
10761 : },
10762 : {
10763 : "winspool_AsyncEnumPorts",
10764 : sizeof(struct winspool_AsyncEnumPorts),
10765 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPorts,
10766 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPorts,
10767 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPorts,
10768 : { 0, NULL },
10769 : { 0, NULL },
10770 : },
10771 : {
10772 : "winspool_AsyncEnumMonitors",
10773 : sizeof(struct winspool_AsyncEnumMonitors),
10774 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumMonitors,
10775 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumMonitors,
10776 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumMonitors,
10777 : { 0, NULL },
10778 : { 0, NULL },
10779 : },
10780 : {
10781 : "winspool_AsyncAddPort",
10782 : sizeof(struct winspool_AsyncAddPort),
10783 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddPort,
10784 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddPort,
10785 : (ndr_print_function_t) ndr_print_winspool_AsyncAddPort,
10786 : { 0, NULL },
10787 : { 0, NULL },
10788 : },
10789 : {
10790 : "winspool_AsyncSetPort",
10791 : sizeof(struct winspool_AsyncSetPort),
10792 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSetPort,
10793 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSetPort,
10794 : (ndr_print_function_t) ndr_print_winspool_AsyncSetPort,
10795 : { 0, NULL },
10796 : { 0, NULL },
10797 : },
10798 : {
10799 : "winspool_AsyncAddMonitor",
10800 : sizeof(struct winspool_AsyncAddMonitor),
10801 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddMonitor,
10802 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddMonitor,
10803 : (ndr_print_function_t) ndr_print_winspool_AsyncAddMonitor,
10804 : { 0, NULL },
10805 : { 0, NULL },
10806 : },
10807 : {
10808 : "winspool_AsyncDeleteMonitor",
10809 : sizeof(struct winspool_AsyncDeleteMonitor),
10810 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeleteMonitor,
10811 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeleteMonitor,
10812 : (ndr_print_function_t) ndr_print_winspool_AsyncDeleteMonitor,
10813 : { 0, NULL },
10814 : { 0, NULL },
10815 : },
10816 : {
10817 : "winspool_AsyncDeletePrintProcessor",
10818 : sizeof(struct winspool_AsyncDeletePrintProcessor),
10819 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrintProcessor,
10820 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrintProcessor,
10821 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrintProcessor,
10822 : { 0, NULL },
10823 : { 0, NULL },
10824 : },
10825 : {
10826 : "winspool_AsyncEnumPrintProcessorDatatypes",
10827 : sizeof(struct winspool_AsyncEnumPrintProcessorDatatypes),
10828 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPrintProcessorDatatypes,
10829 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPrintProcessorDatatypes,
10830 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPrintProcessorDatatypes,
10831 : { 0, NULL },
10832 : { 0, NULL },
10833 : },
10834 : {
10835 : "winspool_AsyncAddPerMachineConnection",
10836 : sizeof(struct winspool_AsyncAddPerMachineConnection),
10837 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncAddPerMachineConnection,
10838 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncAddPerMachineConnection,
10839 : (ndr_print_function_t) ndr_print_winspool_AsyncAddPerMachineConnection,
10840 : { 0, NULL },
10841 : { 0, NULL },
10842 : },
10843 : {
10844 : "winspool_AsyncDeletePerMachineConnection",
10845 : sizeof(struct winspool_AsyncDeletePerMachineConnection),
10846 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePerMachineConnection,
10847 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePerMachineConnection,
10848 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePerMachineConnection,
10849 : { 0, NULL },
10850 : { 0, NULL },
10851 : },
10852 : {
10853 : "winspool_AsyncEnumPerMachineConnections",
10854 : sizeof(struct winspool_AsyncEnumPerMachineConnections),
10855 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumPerMachineConnections,
10856 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumPerMachineConnections,
10857 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumPerMachineConnections,
10858 : { 0, NULL },
10859 : { 0, NULL },
10860 : },
10861 : {
10862 : "winspool_SyncRegisterForRemoteNotifications",
10863 : sizeof(struct winspool_SyncRegisterForRemoteNotifications),
10864 : (ndr_push_flags_fn_t) ndr_push_winspool_SyncRegisterForRemoteNotifications,
10865 : (ndr_pull_flags_fn_t) ndr_pull_winspool_SyncRegisterForRemoteNotifications,
10866 : (ndr_print_function_t) ndr_print_winspool_SyncRegisterForRemoteNotifications,
10867 : { 0, NULL },
10868 : { 0, NULL },
10869 : },
10870 : {
10871 : "winspool_SyncUnRegisterForRemoteNotifications",
10872 : sizeof(struct winspool_SyncUnRegisterForRemoteNotifications),
10873 : (ndr_push_flags_fn_t) ndr_push_winspool_SyncUnRegisterForRemoteNotifications,
10874 : (ndr_pull_flags_fn_t) ndr_pull_winspool_SyncUnRegisterForRemoteNotifications,
10875 : (ndr_print_function_t) ndr_print_winspool_SyncUnRegisterForRemoteNotifications,
10876 : { 0, NULL },
10877 : { 0, NULL },
10878 : },
10879 : {
10880 : "winspool_SyncRefreshRemoteNotifications",
10881 : sizeof(struct winspool_SyncRefreshRemoteNotifications),
10882 : (ndr_push_flags_fn_t) ndr_push_winspool_SyncRefreshRemoteNotifications,
10883 : (ndr_pull_flags_fn_t) ndr_pull_winspool_SyncRefreshRemoteNotifications,
10884 : (ndr_print_function_t) ndr_print_winspool_SyncRefreshRemoteNotifications,
10885 : { 0, NULL },
10886 : { 0, NULL },
10887 : },
10888 : {
10889 : "winspool_AsyncGetRemoteNotifications",
10890 : sizeof(struct winspool_AsyncGetRemoteNotifications),
10891 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetRemoteNotifications,
10892 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetRemoteNotifications,
10893 : (ndr_print_function_t) ndr_print_winspool_AsyncGetRemoteNotifications,
10894 : { 0, NULL },
10895 : { 0, NULL },
10896 : },
10897 : {
10898 : "winspool_AsyncInstallPrinterDriverFromPackage",
10899 : sizeof(struct winspool_AsyncInstallPrinterDriverFromPackage),
10900 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncInstallPrinterDriverFromPackage,
10901 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncInstallPrinterDriverFromPackage,
10902 : (ndr_print_function_t) ndr_print_winspool_AsyncInstallPrinterDriverFromPackage,
10903 : { 0, NULL },
10904 : { 0, NULL },
10905 : },
10906 : {
10907 : "winspool_AsyncUploadPrinterDriverPackage",
10908 : sizeof(struct winspool_AsyncUploadPrinterDriverPackage),
10909 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncUploadPrinterDriverPackage,
10910 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncUploadPrinterDriverPackage,
10911 : (ndr_print_function_t) ndr_print_winspool_AsyncUploadPrinterDriverPackage,
10912 : { 0, NULL },
10913 : { 0, NULL },
10914 : },
10915 : {
10916 : "winspool_AsyncGetCorePrinterDrivers",
10917 : sizeof(struct winspool_AsyncGetCorePrinterDrivers),
10918 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetCorePrinterDrivers,
10919 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetCorePrinterDrivers,
10920 : (ndr_print_function_t) ndr_print_winspool_AsyncGetCorePrinterDrivers,
10921 : { 0, NULL },
10922 : { 0, NULL },
10923 : },
10924 : {
10925 : "winspool_AsyncCorePrinterDriverInstalled",
10926 : sizeof(struct winspool_AsyncCorePrinterDriverInstalled),
10927 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncCorePrinterDriverInstalled,
10928 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncCorePrinterDriverInstalled,
10929 : (ndr_print_function_t) ndr_print_winspool_AsyncCorePrinterDriverInstalled,
10930 : { 0, NULL },
10931 : { 0, NULL },
10932 : },
10933 : {
10934 : "winspool_AsyncGetPrinterDriverPackagePath",
10935 : sizeof(struct winspool_AsyncGetPrinterDriverPackagePath),
10936 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetPrinterDriverPackagePath,
10937 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetPrinterDriverPackagePath,
10938 : (ndr_print_function_t) ndr_print_winspool_AsyncGetPrinterDriverPackagePath,
10939 : { 0, NULL },
10940 : { 0, NULL },
10941 : },
10942 : {
10943 : "winspool_AsyncDeletePrinterDriverPackage",
10944 : sizeof(struct winspool_AsyncDeletePrinterDriverPackage),
10945 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeletePrinterDriverPackage,
10946 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeletePrinterDriverPackage,
10947 : (ndr_print_function_t) ndr_print_winspool_AsyncDeletePrinterDriverPackage,
10948 : { 0, NULL },
10949 : { 0, NULL },
10950 : },
10951 : {
10952 : "winspool_AsyncReadPrinter",
10953 : sizeof(struct winspool_AsyncReadPrinter),
10954 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncReadPrinter,
10955 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncReadPrinter,
10956 : (ndr_print_function_t) ndr_print_winspool_AsyncReadPrinter,
10957 : { 0, NULL },
10958 : { 0, NULL },
10959 : },
10960 : {
10961 : "winspool_AsyncResetPrinter",
10962 : sizeof(struct winspool_AsyncResetPrinter),
10963 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncResetPrinter,
10964 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncResetPrinter,
10965 : (ndr_print_function_t) ndr_print_winspool_AsyncResetPrinter,
10966 : { 0, NULL },
10967 : { 0, NULL },
10968 : },
10969 : {
10970 : "winspool_AsyncGetJobNamedPropertyValue",
10971 : sizeof(struct winspool_AsyncGetJobNamedPropertyValue),
10972 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncGetJobNamedPropertyValue,
10973 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncGetJobNamedPropertyValue,
10974 : (ndr_print_function_t) ndr_print_winspool_AsyncGetJobNamedPropertyValue,
10975 : { 0, NULL },
10976 : { 0, NULL },
10977 : },
10978 : {
10979 : "winspool_AsyncSetJobNamedProperty",
10980 : sizeof(struct winspool_AsyncSetJobNamedProperty),
10981 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncSetJobNamedProperty,
10982 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncSetJobNamedProperty,
10983 : (ndr_print_function_t) ndr_print_winspool_AsyncSetJobNamedProperty,
10984 : { 0, NULL },
10985 : { 0, NULL },
10986 : },
10987 : {
10988 : "winspool_AsyncDeleteJobNamedProperty",
10989 : sizeof(struct winspool_AsyncDeleteJobNamedProperty),
10990 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncDeleteJobNamedProperty,
10991 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncDeleteJobNamedProperty,
10992 : (ndr_print_function_t) ndr_print_winspool_AsyncDeleteJobNamedProperty,
10993 : { 0, NULL },
10994 : { 0, NULL },
10995 : },
10996 : {
10997 : "winspool_AsyncEnumJobNamedProperties",
10998 : sizeof(struct winspool_AsyncEnumJobNamedProperties),
10999 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncEnumJobNamedProperties,
11000 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncEnumJobNamedProperties,
11001 : (ndr_print_function_t) ndr_print_winspool_AsyncEnumJobNamedProperties,
11002 : { 0, NULL },
11003 : { 0, NULL },
11004 : },
11005 : {
11006 : "winspool_AsyncLogJobInfoForBranchOffice",
11007 : sizeof(struct winspool_AsyncLogJobInfoForBranchOffice),
11008 : (ndr_push_flags_fn_t) ndr_push_winspool_AsyncLogJobInfoForBranchOffice,
11009 : (ndr_pull_flags_fn_t) ndr_pull_winspool_AsyncLogJobInfoForBranchOffice,
11010 : (ndr_print_function_t) ndr_print_winspool_AsyncLogJobInfoForBranchOffice,
11011 : { 0, NULL },
11012 : { 0, NULL },
11013 : },
11014 : { .name = NULL }
11015 : };
11016 :
11017 : static const char * const iremotewinspool_endpoint_strings[] = {
11018 : "ncacn_ip_tcp:",
11019 : };
11020 :
11021 : static const struct ndr_interface_string_array iremotewinspool_endpoints = {
11022 : .count = 1,
11023 : .names = iremotewinspool_endpoint_strings
11024 : };
11025 :
11026 : static const char * const iremotewinspool_authservice_strings[] = {
11027 : "host",
11028 : };
11029 :
11030 : static const struct ndr_interface_string_array iremotewinspool_authservices = {
11031 : .count = 1,
11032 : .names = iremotewinspool_authservice_strings
11033 : };
11034 :
11035 :
11036 : const struct ndr_interface_table ndr_table_iremotewinspool = {
11037 : .name = "iremotewinspool",
11038 : .syntax_id = {
11039 : {0x76f03f96,0xcdfd,0x44fc,{0xa2,0x2c},{0x64,0x95,0x0a,0x00,0x12,0x09}},
11040 : NDR_IREMOTEWINSPOOL_VERSION
11041 : },
11042 : .helpstring = NDR_IREMOTEWINSPOOL_HELPSTRING,
11043 : .num_calls = 75,
11044 : .calls = iremotewinspool_calls,
11045 : .num_public_structs = 0,
11046 : .public_structs = iremotewinspool_public_structs,
11047 : .endpoints = &iremotewinspool_endpoints,
11048 : .authservices = &iremotewinspool_authservices
11049 : };
11050 :
11051 : #endif /* SKIP_NDR_TABLE_iremotewinspool */
|